import { GraphQLClient, RequestOptions } from 'graphql-request'; import gql from 'graphql-tag'; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; export type MakeEmpty = { [_ in K]?: never }; export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type GraphQLClientRequestHeaders = RequestOptions['requestHeaders']; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: { input: string; output: string; } String: { input: string; output: string; } Boolean: { input: boolean; output: boolean; } Int: { input: number; output: number; } Float: { input: number; output: number; } BigDecimal: { input: any; output: any; } BigInt: { input: any; output: any; } Bytes: { input: any; output: any; } Int8: { input: any; output: any; } Timestamp: { input: any; output: any; } }; export enum Aggregation_Interval { Day = 'day', Hour = 'hour' } export type BlockChangedFilter = { number_gte: Scalars['Int']['input']; }; export type Block_Height = { hash?: InputMaybe; number?: InputMaybe; number_gte?: InputMaybe; }; export type Key = { __typename?: 'Key'; /** Invoked by a Lock manager to expire the user's key and perform a refund and cancellation of the key */ cancelled?: Maybe; /** Timestamp of the block in which the key was created */ createdAt: Scalars['BigInt']['output']; /** Block key was created */ createdAtBlock: Scalars['BigInt']['output']; /** Time the key expires */ expiration: Scalars['BigInt']['output']; /** Unique identifier for a key (combination of lock address and token id) */ id: Scalars['ID']['output']; /** In the Unlock ecosystem, a “Lock” is a smart contract that creates (or “mints”) NFTs */ lock: Lock; /** An assigned title set on an Unlock key which gives a specific wallet address authorization to transfer, share or cancel */ manager?: Maybe; /** The address of the key owner */ owner: Scalars['Bytes']['output']; /** TokenId for a given key */ tokenId: Scalars['BigInt']['output']; /** The tokenURI on an NFT is a unique identifier */ tokenURI?: Maybe; /** list of transaction hashes for purchase/extensions of a specific token */ transactionsHash?: Maybe>; }; export type Key_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; and?: InputMaybe>>; cancelled?: InputMaybe; cancelled_in?: InputMaybe>; cancelled_not?: InputMaybe; cancelled_not_in?: InputMaybe>; createdAt?: InputMaybe; createdAtBlock?: InputMaybe; createdAtBlock_gt?: InputMaybe; createdAtBlock_gte?: InputMaybe; createdAtBlock_in?: InputMaybe>; createdAtBlock_lt?: InputMaybe; createdAtBlock_lte?: InputMaybe; createdAtBlock_not?: InputMaybe; createdAtBlock_not_in?: InputMaybe>; createdAt_gt?: InputMaybe; createdAt_gte?: InputMaybe; createdAt_in?: InputMaybe>; createdAt_lt?: InputMaybe; createdAt_lte?: InputMaybe; createdAt_not?: InputMaybe; createdAt_not_in?: InputMaybe>; expiration?: InputMaybe; expiration_gt?: InputMaybe; expiration_gte?: InputMaybe; expiration_in?: InputMaybe>; expiration_lt?: InputMaybe; expiration_lte?: InputMaybe; expiration_not?: InputMaybe; expiration_not_in?: InputMaybe>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; id_in?: InputMaybe>; id_lt?: InputMaybe; id_lte?: InputMaybe; id_not?: InputMaybe; id_not_in?: InputMaybe>; lock?: InputMaybe; lock_?: InputMaybe; lock_contains?: InputMaybe; lock_contains_nocase?: InputMaybe; lock_ends_with?: InputMaybe; lock_ends_with_nocase?: InputMaybe; lock_gt?: InputMaybe; lock_gte?: InputMaybe; lock_in?: InputMaybe>; lock_lt?: InputMaybe; lock_lte?: InputMaybe; lock_not?: InputMaybe; lock_not_contains?: InputMaybe; lock_not_contains_nocase?: InputMaybe; lock_not_ends_with?: InputMaybe; lock_not_ends_with_nocase?: InputMaybe; lock_not_in?: InputMaybe>; lock_not_starts_with?: InputMaybe; lock_not_starts_with_nocase?: InputMaybe; lock_starts_with?: InputMaybe; lock_starts_with_nocase?: InputMaybe; manager?: InputMaybe; manager_contains?: InputMaybe; manager_gt?: InputMaybe; manager_gte?: InputMaybe; manager_in?: InputMaybe>; manager_lt?: InputMaybe; manager_lte?: InputMaybe; manager_not?: InputMaybe; manager_not_contains?: InputMaybe; manager_not_in?: InputMaybe>; or?: InputMaybe>>; owner?: InputMaybe; owner_contains?: InputMaybe; owner_gt?: InputMaybe; owner_gte?: InputMaybe; owner_in?: InputMaybe>; owner_lt?: InputMaybe; owner_lte?: InputMaybe; owner_not?: InputMaybe; owner_not_contains?: InputMaybe; owner_not_in?: InputMaybe>; tokenId?: InputMaybe; tokenId_gt?: InputMaybe; tokenId_gte?: InputMaybe; tokenId_in?: InputMaybe>; tokenId_lt?: InputMaybe; tokenId_lte?: InputMaybe; tokenId_not?: InputMaybe; tokenId_not_in?: InputMaybe>; tokenURI?: InputMaybe; tokenURI_contains?: InputMaybe; tokenURI_contains_nocase?: InputMaybe; tokenURI_ends_with?: InputMaybe; tokenURI_ends_with_nocase?: InputMaybe; tokenURI_gt?: InputMaybe; tokenURI_gte?: InputMaybe; tokenURI_in?: InputMaybe>; tokenURI_lt?: InputMaybe; tokenURI_lte?: InputMaybe; tokenURI_not?: InputMaybe; tokenURI_not_contains?: InputMaybe; tokenURI_not_contains_nocase?: InputMaybe; tokenURI_not_ends_with?: InputMaybe; tokenURI_not_ends_with_nocase?: InputMaybe; tokenURI_not_in?: InputMaybe>; tokenURI_not_starts_with?: InputMaybe; tokenURI_not_starts_with_nocase?: InputMaybe; tokenURI_starts_with?: InputMaybe; tokenURI_starts_with_nocase?: InputMaybe; transactionsHash?: InputMaybe>; transactionsHash_contains?: InputMaybe>; transactionsHash_contains_nocase?: InputMaybe>; transactionsHash_not?: InputMaybe>; transactionsHash_not_contains?: InputMaybe>; transactionsHash_not_contains_nocase?: InputMaybe>; }; export enum Key_OrderBy { Cancelled = 'cancelled', CreatedAt = 'createdAt', CreatedAtBlock = 'createdAtBlock', Expiration = 'expiration', Id = 'id', Lock = 'lock', LockAddress = 'lock__address', LockCreatedAtBlock = 'lock__createdAtBlock', LockCreationTransactionHash = 'lock__creationTransactionHash', LockDeployer = 'lock__deployer', LockExpirationDuration = 'lock__expirationDuration', LockId = 'lock__id', LockLastKeyMintedAt = 'lock__lastKeyMintedAt', LockLastKeyRenewedAt = 'lock__lastKeyRenewedAt', LockMaxKeysPerAddress = 'lock__maxKeysPerAddress', LockMaxNumberOfKeys = 'lock__maxNumberOfKeys', LockName = 'lock__name', LockNumberOfCancelReceipts = 'lock__numberOfCancelReceipts', LockNumberOfReceipts = 'lock__numberOfReceipts', LockPrice = 'lock__price', LockSymbol = 'lock__symbol', LockTokenAddress = 'lock__tokenAddress', LockTotalKeys = 'lock__totalKeys', LockVersion = 'lock__version', Manager = 'manager', Owner = 'owner', TokenId = 'tokenId', TokenUri = 'tokenURI', TransactionsHash = 'transactionsHash' } export type Lock = { __typename?: 'Lock'; /** Address of the lock */ address: Scalars['Bytes']['output']; /** Which block the lock was created */ createdAtBlock?: Maybe; /** transaction hash of the lock's creation */ creationTransactionHash: Scalars['String']['output']; /** Address of the lock deployer */ deployer: Scalars['Bytes']['output']; /** Duration is set the on the lock when you deploy and the expiration which is set on each key when they are minted */ expirationDuration?: Maybe; /** Unique ID for the Lock object (uses the lock address) */ id: Scalars['ID']['output']; /** * Key Granters role for key. * The lock creator is the default KeyGranter. * The primary reason for this role is to support additional purchase mechanisms beyond direct key purchases like credit-card purchases. * */ keyGranters: Array; /** Refer to key entity */ keys?: Maybe>; /** The timestamp of the block in which the last key was minted */ lastKeyMintedAt?: Maybe; /** The timestamp of the block in which the last key was renewed */ lastKeyRenewedAt?: Maybe; /** An assigned role set on a Lock contract which gives the highest level of permissions to the wallet address set to that role */ lockManagers: Array; /** The maximum number of keys allowed for a single address */ maxKeysPerAddress?: Maybe; /** Maximum number of keys for sale */ maxNumberOfKeys?: Maybe; /** A descriptive name for a collection of NFTs in this contract */ name?: Maybe; /** Number of cancel receipts of lock */ numberOfCancelReceipts: Scalars['BigInt']['output']; /** Number of receipts of lock */ numberOfReceipts: Scalars['BigInt']['output']; /** Price of the keys sold by the lock */ price: Scalars['BigInt']['output']; /** Referrers fees set per custom address */ referrerFees: Array; /** Token symbol */ symbol?: Maybe; /** Address of the 'currency' ERC20 contract if the keys are priced using an ERC20 */ tokenAddress: Scalars['Bytes']['output']; /** Number of keys minted (expired or not) */ totalKeys: Scalars['BigInt']['output']; /** Unlock Protocol version of a minting contract */ version: Scalars['BigInt']['output']; }; export type LockKeysArgs = { first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; where?: InputMaybe; }; export type LockReferrerFeesArgs = { first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; where?: InputMaybe; }; export type LockStats = { __typename?: 'LockStats'; /** Transaction Hash */ id: Scalars['ID']['output']; /** Total keys sold */ totalKeysSold: Scalars['BigInt']['output']; /** Total locks deployed */ totalLocksDeployed: Scalars['BigInt']['output']; }; export type LockStats_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; and?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; id_in?: InputMaybe>; id_lt?: InputMaybe; id_lte?: InputMaybe; id_not?: InputMaybe; id_not_in?: InputMaybe>; or?: InputMaybe>>; totalKeysSold?: InputMaybe; totalKeysSold_gt?: InputMaybe; totalKeysSold_gte?: InputMaybe; totalKeysSold_in?: InputMaybe>; totalKeysSold_lt?: InputMaybe; totalKeysSold_lte?: InputMaybe; totalKeysSold_not?: InputMaybe; totalKeysSold_not_in?: InputMaybe>; totalLocksDeployed?: InputMaybe; totalLocksDeployed_gt?: InputMaybe; totalLocksDeployed_gte?: InputMaybe; totalLocksDeployed_in?: InputMaybe>; totalLocksDeployed_lt?: InputMaybe; totalLocksDeployed_lte?: InputMaybe; totalLocksDeployed_not?: InputMaybe; totalLocksDeployed_not_in?: InputMaybe>; }; export enum LockStats_OrderBy { Id = 'id', TotalKeysSold = 'totalKeysSold', TotalLocksDeployed = 'totalLocksDeployed' } export type Lock_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; address?: InputMaybe; address_contains?: InputMaybe; address_gt?: InputMaybe; address_gte?: InputMaybe; address_in?: InputMaybe>; address_lt?: InputMaybe; address_lte?: InputMaybe; address_not?: InputMaybe; address_not_contains?: InputMaybe; address_not_in?: InputMaybe>; and?: InputMaybe>>; createdAtBlock?: InputMaybe; createdAtBlock_gt?: InputMaybe; createdAtBlock_gte?: InputMaybe; createdAtBlock_in?: InputMaybe>; createdAtBlock_lt?: InputMaybe; createdAtBlock_lte?: InputMaybe; createdAtBlock_not?: InputMaybe; createdAtBlock_not_in?: InputMaybe>; creationTransactionHash?: InputMaybe; creationTransactionHash_contains?: InputMaybe; creationTransactionHash_contains_nocase?: InputMaybe; creationTransactionHash_ends_with?: InputMaybe; creationTransactionHash_ends_with_nocase?: InputMaybe; creationTransactionHash_gt?: InputMaybe; creationTransactionHash_gte?: InputMaybe; creationTransactionHash_in?: InputMaybe>; creationTransactionHash_lt?: InputMaybe; creationTransactionHash_lte?: InputMaybe; creationTransactionHash_not?: InputMaybe; creationTransactionHash_not_contains?: InputMaybe; creationTransactionHash_not_contains_nocase?: InputMaybe; creationTransactionHash_not_ends_with?: InputMaybe; creationTransactionHash_not_ends_with_nocase?: InputMaybe; creationTransactionHash_not_in?: InputMaybe>; creationTransactionHash_not_starts_with?: InputMaybe; creationTransactionHash_not_starts_with_nocase?: InputMaybe; creationTransactionHash_starts_with?: InputMaybe; creationTransactionHash_starts_with_nocase?: InputMaybe; deployer?: InputMaybe; deployer_contains?: InputMaybe; deployer_gt?: InputMaybe; deployer_gte?: InputMaybe; deployer_in?: InputMaybe>; deployer_lt?: InputMaybe; deployer_lte?: InputMaybe; deployer_not?: InputMaybe; deployer_not_contains?: InputMaybe; deployer_not_in?: InputMaybe>; expirationDuration?: InputMaybe; expirationDuration_gt?: InputMaybe; expirationDuration_gte?: InputMaybe; expirationDuration_in?: InputMaybe>; expirationDuration_lt?: InputMaybe; expirationDuration_lte?: InputMaybe; expirationDuration_not?: InputMaybe; expirationDuration_not_in?: InputMaybe>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; id_in?: InputMaybe>; id_lt?: InputMaybe; id_lte?: InputMaybe; id_not?: InputMaybe; id_not_in?: InputMaybe>; keyGranters?: InputMaybe>; keyGranters_contains?: InputMaybe>; keyGranters_contains_nocase?: InputMaybe>; keyGranters_not?: InputMaybe>; keyGranters_not_contains?: InputMaybe>; keyGranters_not_contains_nocase?: InputMaybe>; keys_?: InputMaybe; lastKeyMintedAt?: InputMaybe; lastKeyMintedAt_gt?: InputMaybe; lastKeyMintedAt_gte?: InputMaybe; lastKeyMintedAt_in?: InputMaybe>; lastKeyMintedAt_lt?: InputMaybe; lastKeyMintedAt_lte?: InputMaybe; lastKeyMintedAt_not?: InputMaybe; lastKeyMintedAt_not_in?: InputMaybe>; lastKeyRenewedAt?: InputMaybe; lastKeyRenewedAt_gt?: InputMaybe; lastKeyRenewedAt_gte?: InputMaybe; lastKeyRenewedAt_in?: InputMaybe>; lastKeyRenewedAt_lt?: InputMaybe; lastKeyRenewedAt_lte?: InputMaybe; lastKeyRenewedAt_not?: InputMaybe; lastKeyRenewedAt_not_in?: InputMaybe>; lockManagers?: InputMaybe>; lockManagers_contains?: InputMaybe>; lockManagers_contains_nocase?: InputMaybe>; lockManagers_not?: InputMaybe>; lockManagers_not_contains?: InputMaybe>; lockManagers_not_contains_nocase?: InputMaybe>; maxKeysPerAddress?: InputMaybe; maxKeysPerAddress_gt?: InputMaybe; maxKeysPerAddress_gte?: InputMaybe; maxKeysPerAddress_in?: InputMaybe>; maxKeysPerAddress_lt?: InputMaybe; maxKeysPerAddress_lte?: InputMaybe; maxKeysPerAddress_not?: InputMaybe; maxKeysPerAddress_not_in?: InputMaybe>; maxNumberOfKeys?: InputMaybe; maxNumberOfKeys_gt?: InputMaybe; maxNumberOfKeys_gte?: InputMaybe; maxNumberOfKeys_in?: InputMaybe>; maxNumberOfKeys_lt?: InputMaybe; maxNumberOfKeys_lte?: InputMaybe; maxNumberOfKeys_not?: InputMaybe; maxNumberOfKeys_not_in?: InputMaybe>; name?: InputMaybe; name_contains?: InputMaybe; name_contains_nocase?: InputMaybe; name_ends_with?: InputMaybe; name_ends_with_nocase?: InputMaybe; name_gt?: InputMaybe; name_gte?: InputMaybe; name_in?: InputMaybe>; name_lt?: InputMaybe; name_lte?: InputMaybe; name_not?: InputMaybe; name_not_contains?: InputMaybe; name_not_contains_nocase?: InputMaybe; name_not_ends_with?: InputMaybe; name_not_ends_with_nocase?: InputMaybe; name_not_in?: InputMaybe>; name_not_starts_with?: InputMaybe; name_not_starts_with_nocase?: InputMaybe; name_starts_with?: InputMaybe; name_starts_with_nocase?: InputMaybe; numberOfCancelReceipts?: InputMaybe; numberOfCancelReceipts_gt?: InputMaybe; numberOfCancelReceipts_gte?: InputMaybe; numberOfCancelReceipts_in?: InputMaybe>; numberOfCancelReceipts_lt?: InputMaybe; numberOfCancelReceipts_lte?: InputMaybe; numberOfCancelReceipts_not?: InputMaybe; numberOfCancelReceipts_not_in?: InputMaybe>; numberOfReceipts?: InputMaybe; numberOfReceipts_gt?: InputMaybe; numberOfReceipts_gte?: InputMaybe; numberOfReceipts_in?: InputMaybe>; numberOfReceipts_lt?: InputMaybe; numberOfReceipts_lte?: InputMaybe; numberOfReceipts_not?: InputMaybe; numberOfReceipts_not_in?: InputMaybe>; or?: InputMaybe>>; price?: InputMaybe; price_gt?: InputMaybe; price_gte?: InputMaybe; price_in?: InputMaybe>; price_lt?: InputMaybe; price_lte?: InputMaybe; price_not?: InputMaybe; price_not_in?: InputMaybe>; referrerFees_?: InputMaybe; symbol?: InputMaybe; symbol_contains?: InputMaybe; symbol_contains_nocase?: InputMaybe; symbol_ends_with?: InputMaybe; symbol_ends_with_nocase?: InputMaybe; symbol_gt?: InputMaybe; symbol_gte?: InputMaybe; symbol_in?: InputMaybe>; symbol_lt?: InputMaybe; symbol_lte?: InputMaybe; symbol_not?: InputMaybe; symbol_not_contains?: InputMaybe; symbol_not_contains_nocase?: InputMaybe; symbol_not_ends_with?: InputMaybe; symbol_not_ends_with_nocase?: InputMaybe; symbol_not_in?: InputMaybe>; symbol_not_starts_with?: InputMaybe; symbol_not_starts_with_nocase?: InputMaybe; symbol_starts_with?: InputMaybe; symbol_starts_with_nocase?: InputMaybe; tokenAddress?: InputMaybe; tokenAddress_contains?: InputMaybe; tokenAddress_gt?: InputMaybe; tokenAddress_gte?: InputMaybe; tokenAddress_in?: InputMaybe>; tokenAddress_lt?: InputMaybe; tokenAddress_lte?: InputMaybe; tokenAddress_not?: InputMaybe; tokenAddress_not_contains?: InputMaybe; tokenAddress_not_in?: InputMaybe>; totalKeys?: InputMaybe; totalKeys_gt?: InputMaybe; totalKeys_gte?: InputMaybe; totalKeys_in?: InputMaybe>; totalKeys_lt?: InputMaybe; totalKeys_lte?: InputMaybe; totalKeys_not?: InputMaybe; totalKeys_not_in?: InputMaybe>; version?: InputMaybe; version_gt?: InputMaybe; version_gte?: InputMaybe; version_in?: InputMaybe>; version_lt?: InputMaybe; version_lte?: InputMaybe; version_not?: InputMaybe; version_not_in?: InputMaybe>; }; export enum Lock_OrderBy { Address = 'address', CreatedAtBlock = 'createdAtBlock', CreationTransactionHash = 'creationTransactionHash', Deployer = 'deployer', ExpirationDuration = 'expirationDuration', Id = 'id', KeyGranters = 'keyGranters', Keys = 'keys', LastKeyMintedAt = 'lastKeyMintedAt', LastKeyRenewedAt = 'lastKeyRenewedAt', LockManagers = 'lockManagers', MaxKeysPerAddress = 'maxKeysPerAddress', MaxNumberOfKeys = 'maxNumberOfKeys', Name = 'name', NumberOfCancelReceipts = 'numberOfCancelReceipts', NumberOfReceipts = 'numberOfReceipts', Price = 'price', ReferrerFees = 'referrerFees', Symbol = 'symbol', TokenAddress = 'tokenAddress', TotalKeys = 'totalKeys', Version = 'version' } /** Defines the order direction, either ascending or descending */ export enum OrderDirection { Asc = 'asc', Desc = 'desc' } export type Query = { __typename?: 'Query'; /** Access to subgraph metadata */ _meta?: Maybe<_Meta_>; key?: Maybe; keys: Array; lock?: Maybe; lockStats?: Maybe; lockStats_collection: Array; locks: Array; receipt?: Maybe; receipts: Array; referrerFee?: Maybe; referrerFees: Array; unlockDailyData?: Maybe; unlockDailyDatas: Array; unlockStats?: Maybe; unlockStats_collection: Array; }; export type Query_MetaArgs = { block?: InputMaybe; }; export type QueryKeyArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type QueryKeysArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type QueryLockArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type QueryLockStatsArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type QueryLockStats_CollectionArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type QueryLocksArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type QueryReceiptArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type QueryReceiptsArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type QueryReferrerFeeArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type QueryReferrerFeesArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type QueryUnlockDailyDataArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type QueryUnlockDailyDatasArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type QueryUnlockStatsArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type QueryUnlockStats_CollectionArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type Receipt = { __typename?: 'Receipt'; /** amount */ amountTransferred: Scalars['BigInt']['output']; /** Total gas paid */ gasTotal: Scalars['BigInt']['output']; /** Transaction Hash */ id: Scalars['ID']['output']; /** Address of the Lock smart contract */ lockAddress: Scalars['String']['output']; /** Payer in the case of an ERC20 lock renewal, the sender and payer might differ */ payer?: Maybe; /** Increasing number of receipt */ receiptNumber: Scalars['BigInt']['output']; /** Fund receiver */ recipient?: Maybe; /** Sender of the transaction */ sender: Scalars['String']['output']; /** Timestamp */ timestamp: Scalars['BigInt']['output']; /** Address of the 'currency' ERC20 contract if the keys are priced using an ERC20 */ tokenAddress: Scalars['String']['output']; }; export type Receipt_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; amountTransferred?: InputMaybe; amountTransferred_gt?: InputMaybe; amountTransferred_gte?: InputMaybe; amountTransferred_in?: InputMaybe>; amountTransferred_lt?: InputMaybe; amountTransferred_lte?: InputMaybe; amountTransferred_not?: InputMaybe; amountTransferred_not_in?: InputMaybe>; and?: InputMaybe>>; gasTotal?: InputMaybe; gasTotal_gt?: InputMaybe; gasTotal_gte?: InputMaybe; gasTotal_in?: InputMaybe>; gasTotal_lt?: InputMaybe; gasTotal_lte?: InputMaybe; gasTotal_not?: InputMaybe; gasTotal_not_in?: InputMaybe>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; id_in?: InputMaybe>; id_lt?: InputMaybe; id_lte?: InputMaybe; id_not?: InputMaybe; id_not_in?: InputMaybe>; lockAddress?: InputMaybe; lockAddress_contains?: InputMaybe; lockAddress_contains_nocase?: InputMaybe; lockAddress_ends_with?: InputMaybe; lockAddress_ends_with_nocase?: InputMaybe; lockAddress_gt?: InputMaybe; lockAddress_gte?: InputMaybe; lockAddress_in?: InputMaybe>; lockAddress_lt?: InputMaybe; lockAddress_lte?: InputMaybe; lockAddress_not?: InputMaybe; lockAddress_not_contains?: InputMaybe; lockAddress_not_contains_nocase?: InputMaybe; lockAddress_not_ends_with?: InputMaybe; lockAddress_not_ends_with_nocase?: InputMaybe; lockAddress_not_in?: InputMaybe>; lockAddress_not_starts_with?: InputMaybe; lockAddress_not_starts_with_nocase?: InputMaybe; lockAddress_starts_with?: InputMaybe; lockAddress_starts_with_nocase?: InputMaybe; or?: InputMaybe>>; payer?: InputMaybe; payer_contains?: InputMaybe; payer_contains_nocase?: InputMaybe; payer_ends_with?: InputMaybe; payer_ends_with_nocase?: InputMaybe; payer_gt?: InputMaybe; payer_gte?: InputMaybe; payer_in?: InputMaybe>; payer_lt?: InputMaybe; payer_lte?: InputMaybe; payer_not?: InputMaybe; payer_not_contains?: InputMaybe; payer_not_contains_nocase?: InputMaybe; payer_not_ends_with?: InputMaybe; payer_not_ends_with_nocase?: InputMaybe; payer_not_in?: InputMaybe>; payer_not_starts_with?: InputMaybe; payer_not_starts_with_nocase?: InputMaybe; payer_starts_with?: InputMaybe; payer_starts_with_nocase?: InputMaybe; receiptNumber?: InputMaybe; receiptNumber_gt?: InputMaybe; receiptNumber_gte?: InputMaybe; receiptNumber_in?: InputMaybe>; receiptNumber_lt?: InputMaybe; receiptNumber_lte?: InputMaybe; receiptNumber_not?: InputMaybe; receiptNumber_not_in?: InputMaybe>; recipient?: InputMaybe; recipient_contains?: InputMaybe; recipient_contains_nocase?: InputMaybe; recipient_ends_with?: InputMaybe; recipient_ends_with_nocase?: InputMaybe; recipient_gt?: InputMaybe; recipient_gte?: InputMaybe; recipient_in?: InputMaybe>; recipient_lt?: InputMaybe; recipient_lte?: InputMaybe; recipient_not?: InputMaybe; recipient_not_contains?: InputMaybe; recipient_not_contains_nocase?: InputMaybe; recipient_not_ends_with?: InputMaybe; recipient_not_ends_with_nocase?: InputMaybe; recipient_not_in?: InputMaybe>; recipient_not_starts_with?: InputMaybe; recipient_not_starts_with_nocase?: InputMaybe; recipient_starts_with?: InputMaybe; recipient_starts_with_nocase?: InputMaybe; sender?: InputMaybe; sender_contains?: InputMaybe; sender_contains_nocase?: InputMaybe; sender_ends_with?: InputMaybe; sender_ends_with_nocase?: InputMaybe; sender_gt?: InputMaybe; sender_gte?: InputMaybe; sender_in?: InputMaybe>; sender_lt?: InputMaybe; sender_lte?: InputMaybe; sender_not?: InputMaybe; sender_not_contains?: InputMaybe; sender_not_contains_nocase?: InputMaybe; sender_not_ends_with?: InputMaybe; sender_not_ends_with_nocase?: InputMaybe; sender_not_in?: InputMaybe>; sender_not_starts_with?: InputMaybe; sender_not_starts_with_nocase?: InputMaybe; sender_starts_with?: InputMaybe; sender_starts_with_nocase?: InputMaybe; timestamp?: InputMaybe; timestamp_gt?: InputMaybe; timestamp_gte?: InputMaybe; timestamp_in?: InputMaybe>; timestamp_lt?: InputMaybe; timestamp_lte?: InputMaybe; timestamp_not?: InputMaybe; timestamp_not_in?: InputMaybe>; tokenAddress?: InputMaybe; tokenAddress_contains?: InputMaybe; tokenAddress_contains_nocase?: InputMaybe; tokenAddress_ends_with?: InputMaybe; tokenAddress_ends_with_nocase?: InputMaybe; tokenAddress_gt?: InputMaybe; tokenAddress_gte?: InputMaybe; tokenAddress_in?: InputMaybe>; tokenAddress_lt?: InputMaybe; tokenAddress_lte?: InputMaybe; tokenAddress_not?: InputMaybe; tokenAddress_not_contains?: InputMaybe; tokenAddress_not_contains_nocase?: InputMaybe; tokenAddress_not_ends_with?: InputMaybe; tokenAddress_not_ends_with_nocase?: InputMaybe; tokenAddress_not_in?: InputMaybe>; tokenAddress_not_starts_with?: InputMaybe; tokenAddress_not_starts_with_nocase?: InputMaybe; tokenAddress_starts_with?: InputMaybe; tokenAddress_starts_with_nocase?: InputMaybe; }; export enum Receipt_OrderBy { AmountTransferred = 'amountTransferred', GasTotal = 'gasTotal', Id = 'id', LockAddress = 'lockAddress', Payer = 'payer', ReceiptNumber = 'receiptNumber', Recipient = 'recipient', Sender = 'sender', Timestamp = 'timestamp', TokenAddress = 'tokenAddress' } export type ReferrerFee = { __typename?: 'ReferrerFee'; /** Fee attributed to the referrer. E.g., 200 represents 20%. */ fee: Scalars['BigInt']['output']; /** Address of the Referrer */ id: Scalars['ID']['output']; /** In the Unlock ecosystem, a “Lock” is a smart contract that creates (or “mints”) NFTs */ lock: Lock; /** Address of the referrer. */ referrer: Scalars['Bytes']['output']; }; export type ReferrerFee_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; and?: InputMaybe>>; fee?: InputMaybe; fee_gt?: InputMaybe; fee_gte?: InputMaybe; fee_in?: InputMaybe>; fee_lt?: InputMaybe; fee_lte?: InputMaybe; fee_not?: InputMaybe; fee_not_in?: InputMaybe>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; id_in?: InputMaybe>; id_lt?: InputMaybe; id_lte?: InputMaybe; id_not?: InputMaybe; id_not_in?: InputMaybe>; lock?: InputMaybe; lock_?: InputMaybe; lock_contains?: InputMaybe; lock_contains_nocase?: InputMaybe; lock_ends_with?: InputMaybe; lock_ends_with_nocase?: InputMaybe; lock_gt?: InputMaybe; lock_gte?: InputMaybe; lock_in?: InputMaybe>; lock_lt?: InputMaybe; lock_lte?: InputMaybe; lock_not?: InputMaybe; lock_not_contains?: InputMaybe; lock_not_contains_nocase?: InputMaybe; lock_not_ends_with?: InputMaybe; lock_not_ends_with_nocase?: InputMaybe; lock_not_in?: InputMaybe>; lock_not_starts_with?: InputMaybe; lock_not_starts_with_nocase?: InputMaybe; lock_starts_with?: InputMaybe; lock_starts_with_nocase?: InputMaybe; or?: InputMaybe>>; referrer?: InputMaybe; referrer_contains?: InputMaybe; referrer_gt?: InputMaybe; referrer_gte?: InputMaybe; referrer_in?: InputMaybe>; referrer_lt?: InputMaybe; referrer_lte?: InputMaybe; referrer_not?: InputMaybe; referrer_not_contains?: InputMaybe; referrer_not_in?: InputMaybe>; }; export enum ReferrerFee_OrderBy { Fee = 'fee', Id = 'id', Lock = 'lock', LockAddress = 'lock__address', LockCreatedAtBlock = 'lock__createdAtBlock', LockCreationTransactionHash = 'lock__creationTransactionHash', LockDeployer = 'lock__deployer', LockExpirationDuration = 'lock__expirationDuration', LockId = 'lock__id', LockLastKeyMintedAt = 'lock__lastKeyMintedAt', LockLastKeyRenewedAt = 'lock__lastKeyRenewedAt', LockMaxKeysPerAddress = 'lock__maxKeysPerAddress', LockMaxNumberOfKeys = 'lock__maxNumberOfKeys', LockName = 'lock__name', LockNumberOfCancelReceipts = 'lock__numberOfCancelReceipts', LockNumberOfReceipts = 'lock__numberOfReceipts', LockPrice = 'lock__price', LockSymbol = 'lock__symbol', LockTokenAddress = 'lock__tokenAddress', LockTotalKeys = 'lock__totalKeys', LockVersion = 'lock__version', Referrer = 'referrer' } export type Subscription = { __typename?: 'Subscription'; /** Access to subgraph metadata */ _meta?: Maybe<_Meta_>; key?: Maybe; keys: Array; lock?: Maybe; lockStats?: Maybe; lockStats_collection: Array; locks: Array; receipt?: Maybe; receipts: Array; referrerFee?: Maybe; referrerFees: Array; unlockDailyData?: Maybe; unlockDailyDatas: Array; unlockStats?: Maybe; unlockStats_collection: Array; }; export type Subscription_MetaArgs = { block?: InputMaybe; }; export type SubscriptionKeyArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type SubscriptionKeysArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type SubscriptionLockArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type SubscriptionLockStatsArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type SubscriptionLockStats_CollectionArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type SubscriptionLocksArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type SubscriptionReceiptArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type SubscriptionReceiptsArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type SubscriptionReferrerFeeArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type SubscriptionReferrerFeesArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type SubscriptionUnlockDailyDataArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type SubscriptionUnlockDailyDatasArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type SubscriptionUnlockStatsArgs = { block?: InputMaybe; id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; export type SubscriptionUnlockStats_CollectionArgs = { block?: InputMaybe; first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type UnlockDailyData = { __typename?: 'UnlockDailyData'; /** Daily number of active locks (active locks have minted at least one membership in the last 30 days */ activeLocks?: Maybe>; /** Total value exchanged on the network */ grossNetworkProduct: Scalars['BigInt']['output']; /** Day identifier */ id: Scalars['ID']['output']; /** Daily number of keys sold */ keysSold: Scalars['BigInt']['output']; /** Number of locks deployed on that day */ lockDeployed: Scalars['BigInt']['output']; /** Total number of keys sold */ totalKeysSold: Scalars['BigInt']['output']; /** Total number of locks deployed */ totalLockDeployed: Scalars['BigInt']['output']; }; export type UnlockDailyData_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; activeLocks?: InputMaybe>; activeLocks_contains?: InputMaybe>; activeLocks_contains_nocase?: InputMaybe>; activeLocks_not?: InputMaybe>; activeLocks_not_contains?: InputMaybe>; activeLocks_not_contains_nocase?: InputMaybe>; and?: InputMaybe>>; grossNetworkProduct?: InputMaybe; grossNetworkProduct_gt?: InputMaybe; grossNetworkProduct_gte?: InputMaybe; grossNetworkProduct_in?: InputMaybe>; grossNetworkProduct_lt?: InputMaybe; grossNetworkProduct_lte?: InputMaybe; grossNetworkProduct_not?: InputMaybe; grossNetworkProduct_not_in?: InputMaybe>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; id_in?: InputMaybe>; id_lt?: InputMaybe; id_lte?: InputMaybe; id_not?: InputMaybe; id_not_in?: InputMaybe>; keysSold?: InputMaybe; keysSold_gt?: InputMaybe; keysSold_gte?: InputMaybe; keysSold_in?: InputMaybe>; keysSold_lt?: InputMaybe; keysSold_lte?: InputMaybe; keysSold_not?: InputMaybe; keysSold_not_in?: InputMaybe>; lockDeployed?: InputMaybe; lockDeployed_gt?: InputMaybe; lockDeployed_gte?: InputMaybe; lockDeployed_in?: InputMaybe>; lockDeployed_lt?: InputMaybe; lockDeployed_lte?: InputMaybe; lockDeployed_not?: InputMaybe; lockDeployed_not_in?: InputMaybe>; or?: InputMaybe>>; totalKeysSold?: InputMaybe; totalKeysSold_gt?: InputMaybe; totalKeysSold_gte?: InputMaybe; totalKeysSold_in?: InputMaybe>; totalKeysSold_lt?: InputMaybe; totalKeysSold_lte?: InputMaybe; totalKeysSold_not?: InputMaybe; totalKeysSold_not_in?: InputMaybe>; totalLockDeployed?: InputMaybe; totalLockDeployed_gt?: InputMaybe; totalLockDeployed_gte?: InputMaybe; totalLockDeployed_in?: InputMaybe>; totalLockDeployed_lt?: InputMaybe; totalLockDeployed_lte?: InputMaybe; totalLockDeployed_not?: InputMaybe; totalLockDeployed_not_in?: InputMaybe>; }; export enum UnlockDailyData_OrderBy { ActiveLocks = 'activeLocks', GrossNetworkProduct = 'grossNetworkProduct', Id = 'id', KeysSold = 'keysSold', LockDeployed = 'lockDeployed', TotalKeysSold = 'totalKeysSold', TotalLockDeployed = 'totalLockDeployed' } export type UnlockStats = { __typename?: 'UnlockStats'; /** Total value exchanged on the network */ grossNetworkProduct: Scalars['BigInt']['output']; /** Identifier */ id: Scalars['ID']['output']; /** Total number of keys sold */ totalKeysSold: Scalars['BigInt']['output']; /** Total number of locks deployed */ totalLockDeployed: Scalars['BigInt']['output']; }; export type UnlockStats_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; and?: InputMaybe>>; grossNetworkProduct?: InputMaybe; grossNetworkProduct_gt?: InputMaybe; grossNetworkProduct_gte?: InputMaybe; grossNetworkProduct_in?: InputMaybe>; grossNetworkProduct_lt?: InputMaybe; grossNetworkProduct_lte?: InputMaybe; grossNetworkProduct_not?: InputMaybe; grossNetworkProduct_not_in?: InputMaybe>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; id_in?: InputMaybe>; id_lt?: InputMaybe; id_lte?: InputMaybe; id_not?: InputMaybe; id_not_in?: InputMaybe>; or?: InputMaybe>>; totalKeysSold?: InputMaybe; totalKeysSold_gt?: InputMaybe; totalKeysSold_gte?: InputMaybe; totalKeysSold_in?: InputMaybe>; totalKeysSold_lt?: InputMaybe; totalKeysSold_lte?: InputMaybe; totalKeysSold_not?: InputMaybe; totalKeysSold_not_in?: InputMaybe>; totalLockDeployed?: InputMaybe; totalLockDeployed_gt?: InputMaybe; totalLockDeployed_gte?: InputMaybe; totalLockDeployed_in?: InputMaybe>; totalLockDeployed_lt?: InputMaybe; totalLockDeployed_lte?: InputMaybe; totalLockDeployed_not?: InputMaybe; totalLockDeployed_not_in?: InputMaybe>; }; export enum UnlockStats_OrderBy { GrossNetworkProduct = 'grossNetworkProduct', Id = 'id', TotalKeysSold = 'totalKeysSold', TotalLockDeployed = 'totalLockDeployed' } export type _Block_ = { __typename?: '_Block_'; /** The hash of the block */ hash?: Maybe; /** The block number */ number: Scalars['Int']['output']; /** The hash of the parent block */ parentHash?: Maybe; /** Integer representation of the timestamp stored in blocks for the chain */ timestamp?: Maybe; }; /** The type for the top-level _meta field */ export type _Meta_ = { __typename?: '_Meta_'; /** * Information about a specific subgraph block. The hash of the block * will be null if the _meta field has a block constraint that asks for * a block number. It will be filled if the _meta field has no block constraint * and therefore asks for the latest block * */ block: _Block_; /** The deployment ID */ deployment: Scalars['String']['output']; /** If `true`, the subgraph encountered indexing errors at some past block */ hasIndexingErrors: Scalars['Boolean']['output']; }; export enum _SubgraphErrorPolicy_ { /** Data will be returned even if the subgraph has indexing errors */ Allow = 'allow', /** If the subgraph has indexing errors, data will be omitted. The default. */ Deny = 'deny' } export type AllLocksQueryVariables = Exact<{ first?: InputMaybe; skip?: InputMaybe; where?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; referrerFeeSkip?: InputMaybe; }>; export type AllLocksQuery = { __typename?: 'Query', locks: Array<{ __typename?: 'Lock', id: string, address: any, name?: string | null, expirationDuration?: any | null, tokenAddress: any, symbol?: string | null, price: any, lockManagers: Array, keyGranters: Array, version: any, maxNumberOfKeys?: any | null, maxKeysPerAddress?: any | null, createdAtBlock?: any | null, creationTransactionHash: string, totalKeys: any, referrerFees: Array<{ __typename?: 'ReferrerFee', id: string, referrer: any, fee: any }> }> }; export type AllKeysQueryVariables = Exact<{ first?: InputMaybe; skip?: InputMaybe; where?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; }>; export type AllKeysQuery = { __typename?: 'Query', keys: Array<{ __typename?: 'Key', id: string, tokenId: any, owner: any, manager?: any | null, expiration: any, tokenURI?: string | null, createdAt: any, createdAtBlock: any, cancelled?: boolean | null, transactionsHash?: Array | null, lock: { __typename?: 'Lock', id: string, address: any, name?: string | null, expirationDuration?: any | null, tokenAddress: any, symbol?: string | null, price: any, lockManagers: Array, keyGranters: Array, version: any, maxNumberOfKeys?: any | null, maxKeysPerAddress?: any | null, createdAtBlock?: any | null, totalKeys: any } }> }; export type AllReceiptsQueryVariables = Exact<{ first?: InputMaybe; skip?: InputMaybe; where?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; }>; export type AllReceiptsQuery = { __typename?: 'Query', receipts: Array<{ __typename?: 'Receipt', id: string, receiptNumber: any, timestamp: any, sender: string, payer?: string | null, recipient?: string | null, lockAddress: string, tokenAddress: string, gasTotal: any, amountTransferred: any }> }; export type AllLocksWithKeysQueryVariables = Exact<{ first?: InputMaybe; skip?: InputMaybe; where?: InputMaybe; keyFilter?: InputMaybe; orderBy?: InputMaybe; keyOrderBy?: InputMaybe; orderDirection?: InputMaybe; }>; export type AllLocksWithKeysQuery = { __typename?: 'Query', locks: Array<{ __typename?: 'Lock', id: string, address: any, name?: string | null, expirationDuration?: any | null, tokenAddress: any, symbol?: string | null, price: any, lockManagers: Array, keyGranters: Array, version: any, maxNumberOfKeys?: any | null, maxKeysPerAddress?: any | null, createdAtBlock?: any | null, totalKeys: any, keys?: Array<{ __typename?: 'Key', id: string, tokenId: any, owner: any, manager?: any | null, expiration: any, tokenURI?: string | null, createdAt: any, createdAtBlock: any, cancelled?: boolean | null, transactionsHash?: Array | null }> | null }> }; export const AllLocksDocument = gql` query allLocks($first: Int = 1, $skip: Int, $where: Lock_filter, $orderBy: Lock_orderBy, $orderDirection: OrderDirection, $referrerFeeSkip: Int = 0) { locks( first: $first skip: $skip where: $where orderBy: $orderBy orderDirection: $orderDirection ) { id address name expirationDuration tokenAddress symbol price lockManagers keyGranters version maxNumberOfKeys maxKeysPerAddress createdAtBlock creationTransactionHash totalKeys referrerFees(skip: $referrerFeeSkip) { id referrer fee } } } `; export const AllKeysDocument = gql` query AllKeys($first: Int = 1, $skip: Int, $where: Key_filter, $orderBy: Key_orderBy, $orderDirection: OrderDirection) { keys( first: $first skip: $skip where: $where orderBy: $orderBy orderDirection: $orderDirection ) { id lock { id address name expirationDuration tokenAddress symbol price lockManagers keyGranters version maxNumberOfKeys maxKeysPerAddress createdAtBlock totalKeys } tokenId owner manager expiration tokenURI createdAt createdAtBlock cancelled transactionsHash } } `; export const AllReceiptsDocument = gql` query AllReceipts($first: Int = 100, $skip: Int, $where: Receipt_filter, $orderBy: Receipt_orderBy, $orderDirection: OrderDirection) { receipts( first: $first skip: $skip where: $where orderBy: $orderBy orderDirection: $orderDirection ) { id receiptNumber timestamp sender payer recipient lockAddress tokenAddress gasTotal amountTransferred } } `; export const AllLocksWithKeysDocument = gql` query allLocksWithKeys($first: Int = 1, $skip: Int, $where: Lock_filter, $keyFilter: Key_filter, $orderBy: Lock_orderBy, $keyOrderBy: Key_orderBy, $orderDirection: OrderDirection) { locks(where: $where, orderBy: $orderBy, orderDirection: $orderDirection) { id address name expirationDuration tokenAddress symbol price lockManagers keyGranters version maxNumberOfKeys maxKeysPerAddress createdAtBlock totalKeys keys(where: $keyFilter, orderBy: $keyOrderBy, first: $first, skip: $skip) { id tokenId owner manager expiration tokenURI createdAt createdAtBlock cancelled transactionsHash } } } `; export type SdkFunctionWrapper = (action: (requestHeaders?:Record) => Promise, operationName: string, operationType?: string, variables?: any) => Promise; const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType, _variables) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { allLocks(variables?: AllLocksQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise { return withWrapper((wrappedRequestHeaders) => client.request(AllLocksDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'allLocks', 'query', variables); }, AllKeys(variables?: AllKeysQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise { return withWrapper((wrappedRequestHeaders) => client.request(AllKeysDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'AllKeys', 'query', variables); }, AllReceipts(variables?: AllReceiptsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise { return withWrapper((wrappedRequestHeaders) => client.request(AllReceiptsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'AllReceipts', 'query', variables); }, allLocksWithKeys(variables?: AllLocksWithKeysQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise { return withWrapper((wrappedRequestHeaders) => client.request(AllLocksWithKeysDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'allLocksWithKeys', 'query', variables); } }; } export type Sdk = ReturnType;