diff --git a/sdk/graphql-transport/src/generated/queries.ts b/sdk/graphql-transport/src/generated/queries.ts index c2ba411eb1b..9df5eb93c14 100644 --- a/sdk/graphql-transport/src/generated/queries.ts +++ b/sdk/graphql-transport/src/generated/queries.ts @@ -164,16 +164,6 @@ export type Address = IOwner & { * `0x2::iota::IOTA`. */ coins: CoinConnection; - /** - * The domain explicitly configured as the default domain pointing to this - * address. - */ - defaultIotansName?: Maybe; - /** - * The IotansRegistration NFTs owned by this address. These grant the owner - * the capability to manage the associated domain. - */ - iotansRegistrations: IotansRegistrationConnection; /** Objects owned by this address, optionally `filter`-ed. */ objects: MoveObjectConnection; /** The `0x3::staking_pool::StakedIota` objects owned by this address. */ @@ -221,27 +211,6 @@ export type AddressCoinsArgs = { }; -/** - * The 32-byte address that is an account address (corresponding to a public - * key). - */ -export type AddressDefaultIotansNameArgs = { - format?: InputMaybe; -}; - - -/** - * The 32-byte address that is an account address (corresponding to a public - * key). - */ -export type AddressIotansRegistrationsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - /** * The 32-byte address that is an account address (corresponding to a public * key). @@ -612,11 +581,6 @@ export type Coin = IMoveObject & IObject & IOwner & { * signature, and the BCS of the corresponding data. */ contents?: Maybe; - /** - * The domain explicitly configured as the default domain pointing to this - * object. - */ - defaultIotansName?: Maybe; /** * 32-byte hash that identifies the object's contents, encoded as a Base58 * string. @@ -662,11 +626,6 @@ export type Coin = IMoveObject & IObject & IOwner & { * have the `key` and `store` abilities. */ hasPublicTransfer: Scalars['Boolean']['output']; - /** - * The IotansRegistration NFTs owned by this object. These grant the owner - * the capability to manage the associated domain. - */ - iotansRegistrations: IotansRegistrationConnection; /** Objects owned by this object, optionally `filter`-ed. */ objects: MoveObjectConnection; /** The owner type of this object: Immutable, Shared, Parent, Address */ @@ -724,12 +683,6 @@ export type CoinCoinsArgs = { }; -/** Some 0x2::coin::Coin Move object. */ -export type CoinDefaultIotansNameArgs = { - format?: InputMaybe; -}; - - /** Some 0x2::coin::Coin Move object. */ export type CoinDynamicFieldArgs = { name: DynamicFieldName; @@ -751,15 +704,6 @@ export type CoinDynamicObjectFieldArgs = { }; -/** Some 0x2::coin::Coin Move object. */ -export type CoinIotansRegistrationsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - /** Some 0x2::coin::Coin Move object. */ export type CoinObjectsArgs = { after?: InputMaybe; @@ -841,11 +785,6 @@ export type CoinMetadata = IMoveObject & IObject & IOwner & { contents?: Maybe; /** The number of decimal places used to represent the token. */ decimals?: Maybe; - /** - * The domain explicitly configured as the default domain pointing to this - * object. - */ - defaultIotansName?: Maybe; /** Optional description of the token, provided by the creator of the token. */ description?: Maybe; /** @@ -894,11 +833,6 @@ export type CoinMetadata = IMoveObject & IObject & IOwner & { */ hasPublicTransfer: Scalars['Boolean']['output']; iconUrl?: Maybe; - /** - * The IotansRegistration NFTs owned by this object. These grant the owner - * the capability to manage the associated domain. - */ - iotansRegistrations: IotansRegistrationConnection; /** Full, official name of the token. */ name?: Maybe; /** Objects owned by this object, optionally `filter`-ed. */ @@ -962,12 +896,6 @@ export type CoinMetadataCoinsArgs = { }; -/** The metadata for a coin type. */ -export type CoinMetadataDefaultIotansNameArgs = { - format?: InputMaybe; -}; - - /** The metadata for a coin type. */ export type CoinMetadataDynamicFieldArgs = { name: DynamicFieldName; @@ -989,15 +917,6 @@ export type CoinMetadataDynamicObjectFieldArgs = { }; -/** The metadata for a coin type. */ -export type CoinMetadataIotansRegistrationsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - /** The metadata for a coin type. */ export type CoinMetadataObjectsArgs = { after?: InputMaybe; @@ -1080,11 +999,6 @@ export type DisplayEntry = { value?: Maybe; }; -export enum DomainFormat { - At = 'AT', - Dot = 'DOT' -} - export type DryRunEffect = { __typename?: 'DryRunEffect'; /** @@ -1479,8 +1393,6 @@ export enum Feature { Coins = 'COINS', /** Querying an object's dynamic fields. */ DynamicFields = 'DYNAMIC_FIELDS', - /** IotaNS name and reverse name look-up. */ - NameService = 'NAME_SERVICE', /** Transaction and Event subscriptions. */ Subscriptions = 'SUBSCRIPTIONS', /** @@ -1705,10 +1617,6 @@ export type IOwner = { * `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. */ coins: CoinConnection; - /** The domain explicitly configured as the default domain pointing to this object or address. */ - defaultIotansName?: Maybe; - /** The IotansRegistration NFTs owned by this object or address. These grant the owner the capability to manage the associated domain. */ - iotansRegistrations: IotansRegistrationConnection; /** Objects owned by this object or address, optionally `filter`-ed. */ objects: MoveObjectConnection; /** The `0x3::staking_pool::StakedIota` objects owned by this object or address. */ @@ -1759,33 +1667,6 @@ export type IOwnerCoinsArgs = { }; -/** - * Interface implemented by GraphQL types representing entities that can own - * objects. Object owners are identified by an address which can represent - * either the public key of an account or another object. The same address can - * only refer to an account or an object, never both, but it is not possible to - * know which up-front. - */ -export type IOwnerDefaultIotansNameArgs = { - format?: InputMaybe; -}; - - -/** - * Interface implemented by GraphQL types representing entities that can own - * objects. Object owners are identified by an address which can represent - * either the public key of an account or another object. The same address can - * only refer to an account or an object, never both, but it is not possible to - * know which up-front. - */ -export type IOwnerIotansRegistrationsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - /** * Interface implemented by GraphQL types representing entities that can own * objects. Object owners are identified by an address which can represent @@ -1835,217 +1716,6 @@ export type Input = { ix: Scalars['Int']['output']; }; -export type IotansRegistration = IMoveObject & IObject & IOwner & { - __typename?: 'IotansRegistration'; - address: Scalars['IotaAddress']['output']; - /** - * Total balance of all coins with marker type owned by this object. If - * type is not supplied, it defaults to `0x2::iota::IOTA`. - */ - balance?: Maybe; - /** The balances of all coin types owned by this object. */ - balances: BalanceConnection; - /** The Base64-encoded BCS serialization of the object's content. */ - bcs?: Maybe; - /** - * The coin objects for this object. - * - * `type` is a filter on the coin's type parameter, defaulting to - * `0x2::iota::IOTA`. - */ - coins: CoinConnection; - /** - * Displays the contents of the Move object in a JSON string and through - * GraphQL types. Also provides the flat representation of the type - * signature, and the BCS of the corresponding data. - */ - contents?: Maybe; - /** - * The domain explicitly configured as the default domain pointing to this - * object. - */ - defaultIotansName?: Maybe; - /** - * 32-byte hash that identifies the object's contents, encoded as a Base58 - * string. - */ - digest?: Maybe; - /** - * The set of named templates defined on-chain for the type of this object, - * to be handled off-chain. The server substitutes data from the object - * into these templates to generate a display string per template. - */ - display?: Maybe>; - /** Domain name of the IotansRegistration object */ - domain: Scalars['String']['output']; - /** - * Access a dynamic field on an object using its name. Names are arbitrary - * Move values whose type have `copy`, `drop`, and `store`, and are - * specified using their type, and their BCS contents, Base64 encoded. - * - * Dynamic fields on wrapped objects can be accessed by using the same API - * under the Owner type. - */ - dynamicField?: Maybe; - /** - * The dynamic fields and dynamic object fields on an object. - * - * Dynamic fields on wrapped objects can be accessed by using the same API - * under the Owner type. - */ - dynamicFields: DynamicFieldConnection; - /** - * Access a dynamic object field on an object using its name. Names are - * arbitrary Move values whose type have `copy`, `drop`, and `store`, - * and are specified using their type, and their BCS contents, Base64 - * encoded. The value of a dynamic object field can also be accessed - * off-chain directly via its address (e.g. using `Query.object`). - * - * Dynamic fields on wrapped objects can be accessed by using the same API - * under the Owner type. - */ - dynamicObjectField?: Maybe; - /** - * Determines whether a transaction can transfer this object, using the - * TransferObjects transaction command or - * `iota::transfer::public_transfer`, both of which require the object to - * have the `key` and `store` abilities. - */ - hasPublicTransfer: Scalars['Boolean']['output']; - /** - * The IotansRegistration NFTs owned by this object. These grant the owner - * the capability to manage the associated domain. - */ - iotansRegistrations: IotansRegistrationConnection; - /** Objects owned by this object, optionally `filter`-ed. */ - objects: MoveObjectConnection; - /** The owner type of this object: Immutable, Shared, Parent, Address */ - owner?: Maybe; - /** The transaction block that created this version of the object. */ - previousTransactionBlock?: Maybe; - /** The transaction blocks that sent objects to this object. */ - receivedTransactionBlocks: TransactionBlockConnection; - /** The `0x3::staking_pool::StakedIota` objects owned by this object. */ - stakedIotas: StakedIotaConnection; - /** - * The current status of the object as read from the off-chain store. The - * possible states are: NOT_INDEXED, the object is loaded from - * serialized data, such as the contents of a genesis or system package - * upgrade transaction. LIVE, the version returned is the most recent for - * the object, and it is not deleted or wrapped at that version. - * HISTORICAL, the object was referenced at a specific version or - * checkpoint, so is fetched from historical tables and may not be the - * latest version of the object. WRAPPED_OR_DELETED, the object is deleted - * or wrapped and only partial information can be loaded." - */ - status: ObjectKind; - /** - * The amount of IOTA we would rebate if this object gets deleted or - * mutated. This number is recalculated based on the present storage - * gas price. - */ - storageRebate?: Maybe; - version: Scalars['Int']['output']; -}; - - -export type IotansRegistrationBalanceArgs = { - type?: InputMaybe; -}; - - -export type IotansRegistrationBalancesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - -export type IotansRegistrationCoinsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - type?: InputMaybe; -}; - - -export type IotansRegistrationDefaultIotansNameArgs = { - format?: InputMaybe; -}; - - -export type IotansRegistrationDynamicFieldArgs = { - name: DynamicFieldName; -}; - - -export type IotansRegistrationDynamicFieldsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - -export type IotansRegistrationDynamicObjectFieldArgs = { - name: DynamicFieldName; -}; - - -export type IotansRegistrationIotansRegistrationsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - -export type IotansRegistrationObjectsArgs = { - after?: InputMaybe; - before?: InputMaybe; - filter?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - -export type IotansRegistrationReceivedTransactionBlocksArgs = { - after?: InputMaybe; - before?: InputMaybe; - filter?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - -export type IotansRegistrationStakedIotasArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type IotansRegistrationConnection = { - __typename?: 'IotansRegistrationConnection'; - /** A list of edges. */ - edges: Array; - /** A list of nodes. */ - nodes: Array; - /** Information to aid in pagination. */ - pageInfo: PageInfo; -}; - -/** An edge in a connection. */ -export type IotansRegistrationEdge = { - __typename?: 'IotansRegistrationEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node: IotansRegistration; -}; - /** * Information used by a package to link to a specific version of its * dependency. @@ -2294,8 +1964,6 @@ export type MoveObject = IMoveObject & IObject & IOwner & { asCoin?: Maybe; /** Attempts to convert the Move object into a `0x2::coin::CoinMetadata`. */ asCoinMetadata?: Maybe; - /** Attempts to convert the Move object into a `IotansRegistration` object. */ - asIotansRegistration?: Maybe; /** * Attempts to convert the Move object into a * `0x3::staking_pool::StakedIota`. @@ -2323,11 +1991,6 @@ export type MoveObject = IMoveObject & IObject & IOwner & { * signature, and the BCS of the corresponding data. */ contents?: Maybe; - /** - * The domain explicitly configured as the default domain pointing to this - * object. - */ - defaultIotansName?: Maybe; /** * 32-byte hash that identifies the object's contents, encoded as a Base58 * string. @@ -2373,11 +2036,6 @@ export type MoveObject = IMoveObject & IObject & IOwner & { * have the `key` and `store` abilities. */ hasPublicTransfer: Scalars['Boolean']['output']; - /** - * The IotansRegistration NFTs owned by this object. These grant the owner - * the capability to manage the associated domain. - */ - iotansRegistrations: IotansRegistrationConnection; /** Objects owned by this object, optionally `filter`-ed. */ objects: MoveObjectConnection; /** The owner type of this object: Immutable, Shared, Parent, Address */ @@ -2447,16 +2105,6 @@ export type MoveObjectCoinsArgs = { }; -/** - * The representation of an object as a Move Object, which exposes additional - * information (content, module that governs it, version, is transferrable, - * etc.) about this object. - */ -export type MoveObjectDefaultIotansNameArgs = { - format?: InputMaybe; -}; - - /** * The representation of an object as a Move Object, which exposes additional * information (content, module that governs it, version, is transferrable, @@ -2490,19 +2138,6 @@ export type MoveObjectDynamicObjectFieldArgs = { }; -/** - * The representation of an object as a Move Object, which exposes additional - * information (content, module that governs it, version, is transferrable, - * etc.) about this object. - */ -export type MoveObjectIotansRegistrationsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - /** * The representation of an object as a Move Object, which exposes additional * information (content, module that governs it, version, is transferrable, @@ -2597,24 +2232,11 @@ export type MovePackage = IObject & IOwner & { * are immutable and cannot be owned by an address. */ coins: CoinConnection; - /** - * The domain explicitly configured as the default domain pointing to this - * object. - */ - defaultIotansName?: Maybe; /** * 32-byte hash that identifies the package's contents, encoded as a Base58 * string. */ digest?: Maybe; - /** - * The IotansRegistration NFTs owned by this package. These grant the owner - * the capability to manage the associated domain. - * - * Note that objects owned by a package are inaccessible, because packages - * are immutable and cannot be owned by an address. - */ - iotansRegistrations: IotansRegistrationConnection; /** The transitive dependencies of this package. */ linkage?: Maybe>; /** @@ -2721,29 +2343,6 @@ export type MovePackageCoinsArgs = { }; -/** - * A MovePackage is a kind of Move object that represents code that has been - * published on chain. It exposes information about its modules, type - * definitions, functions, and dependencies. - */ -export type MovePackageDefaultIotansNameArgs = { - format?: InputMaybe; -}; - - -/** - * A MovePackage is a kind of Move object that represents code that has been - * published on chain. It exposes information about its modules, type - * definitions, functions, and dependencies. - */ -export type MovePackageIotansRegistrationsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - /** * A MovePackage is a kind of Move object that represents code that has been * published on chain. It exposes information about its modules, type @@ -2994,11 +2593,6 @@ export type Object = IObject & IOwner & { * `0x2::iota::IOTA`. */ coins: CoinConnection; - /** - * The domain explicitly configured as the default domain pointing to this - * object. - */ - defaultIotansName?: Maybe; /** * 32-byte hash that identifies the object's current contents, encoded as a * Base58 string. @@ -3037,11 +2631,6 @@ export type Object = IObject & IOwner & { * under the Owner type. */ dynamicObjectField?: Maybe; - /** - * The IotansRegistration NFTs owned by this object. These grant the owner - * the capability to manage the associated domain. - */ - iotansRegistrations: IotansRegistrationConnection; /** Objects owned by this object, optionally `filter`-ed. */ objects: MoveObjectConnection; /** @@ -3117,17 +2706,6 @@ export type ObjectCoinsArgs = { }; -/** - * An object in Iota is a package (set of Move bytecode modules) or object - * (typed data structure with fields) with additional metadata detailing its - * id, version, transaction digest, owner field indicating how this object can - * be accessed. - */ -export type ObjectDefaultIotansNameArgs = { - format?: InputMaybe; -}; - - /** * An object in Iota is a package (set of Move bytecode modules) or object * (typed data structure with fields) with additional metadata detailing its @@ -3164,20 +2742,6 @@ export type ObjectDynamicObjectFieldArgs = { }; -/** - * An object in Iota is a package (set of Move bytecode modules) or object - * (typed data structure with fields) with additional metadata detailing its - * id, version, transaction digest, owner field indicating how this object can - * be accessed. - */ -export type ObjectIotansRegistrationsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - /** * An object in Iota is a package (set of Move bytecode modules) or object * (typed data structure with fields) with additional metadata detailing its @@ -3398,11 +2962,6 @@ export type Owner = IOwner & { * `0x2::iota::IOTA`. */ coins: CoinConnection; - /** - * The domain explicitly configured as the default domain pointing to this - * object or address. - */ - defaultIotansName?: Maybe; /** * Access a dynamic field on an object using its name. Names are arbitrary * Move values whose type have `copy`, `drop`, and `store`, and are @@ -3430,11 +2989,6 @@ export type Owner = IOwner & { * wrapped object. */ dynamicObjectField?: Maybe; - /** - * The IotansRegistration NFTs owned by this object or address. These grant - * the owner the capability to manage the associated domain. - */ - iotansRegistrations: IotansRegistrationConnection; /** Objects owned by this object or address, optionally `filter`-ed. */ objects: MoveObjectConnection; /** @@ -3485,17 +3039,6 @@ export type OwnerCoinsArgs = { }; -/** - * An Owner is an entity that can own an object. Each Owner is identified by a - * IotaAddress which represents either an Address (corresponding to a public - * key of an account) or an Object, but never both (it is not known up-front - * whether a given Owner is an Address or an Object). - */ -export type OwnerDefaultIotansNameArgs = { - format?: InputMaybe; -}; - - /** * An Owner is an entity that can own an object. Each Owner is identified by a * IotaAddress which represents either an Address (corresponding to a public @@ -3532,20 +3075,6 @@ export type OwnerDynamicObjectFieldArgs = { }; -/** - * An Owner is an entity that can own an object. Each Owner is identified by a - * IotaAddress which represents either an Address (corresponding to a public - * key of an account) or an Object, but never both (it is not known up-front - * whether a given Owner is an Address or an Object). - */ -export type OwnerIotansRegistrationsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - /** * An Owner is an entity that can own an object. Each Owner is identified by a * IotaAddress which represents either an Address (corresponding to a public @@ -3815,8 +3344,6 @@ export type Query = { * protocol version known to the GraphQL service). */ protocolConfig: ProtocolConfigs; - /** Resolves a IotaNS `domain` name to an address, if it has been bound. */ - resolveIotansAddress?: Maybe
; /** Configuration for this RPC service */ serviceConfig: ServiceConfig; /** Fetch a transaction block by its transaction digest. */ @@ -3926,11 +3453,6 @@ export type QueryProtocolConfigArgs = { }; -export type QueryResolveIotansAddressArgs = { - domain: Scalars['String']['input']; -}; - - export type QueryTransactionBlockArgs = { digest: Scalars['String']['input']; }; @@ -4209,11 +3731,6 @@ export type StakedIota = IMoveObject & IObject & IOwner & { * signature, and the BCS of the corresponding data. */ contents?: Maybe; - /** - * The domain explicitly configured as the default domain pointing to this - * object. - */ - defaultIotansName?: Maybe; /** * 32-byte hash that identifies the object's contents, encoded as a Base58 * string. @@ -4273,11 +3790,6 @@ export type StakedIota = IMoveObject & IObject & IOwner & { * have the `key` and `store` abilities. */ hasPublicTransfer: Scalars['Boolean']['output']; - /** - * The IotansRegistration NFTs owned by this object. These grant the owner - * the capability to manage the associated domain. - */ - iotansRegistrations: IotansRegistrationConnection; /** Objects owned by this object, optionally `filter`-ed. */ objects: MoveObjectConnection; /** The owner type of this object: Immutable, Shared, Parent, Address */ @@ -4343,12 +3855,6 @@ export type StakedIotaCoinsArgs = { }; -/** Represents a `0x3::staking_pool::StakedIota` Move object on-chain. */ -export type StakedIotaDefaultIotansNameArgs = { - format?: InputMaybe; -}; - - /** Represents a `0x3::staking_pool::StakedIota` Move object on-chain. */ export type StakedIotaDynamicFieldArgs = { name: DynamicFieldName; @@ -4370,15 +3876,6 @@ export type StakedIotaDynamicObjectFieldArgs = { }; -/** Represents a `0x3::staking_pool::StakedIota` Move object on-chain. */ -export type StakedIotaIotansRegistrationsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - /** Represents a `0x3::staking_pool::StakedIota` Move object on-chain. */ export type StakedIotaObjectsArgs = { after?: InputMaybe; @@ -5231,22 +4728,6 @@ export type GetValidatorsApyQueryVariables = Exact<{ [key: string]: never; }>; export type GetValidatorsApyQuery = { __typename?: 'Query', epoch?: { __typename?: 'Epoch', epochId: number, validatorSet?: { __typename?: 'ValidatorSet', activeValidators: { __typename?: 'ValidatorConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'Validator', apy?: number | null, address: { __typename?: 'Address', address: any } }> } } | null } | null }; -export type ResolveNameServiceAddressQueryVariables = Exact<{ - domain: Scalars['String']['input']; -}>; - - -export type ResolveNameServiceAddressQuery = { __typename?: 'Query', resolveIotansAddress?: { __typename?: 'Address', address: any } | null }; - -export type ResolveNameServiceNamesQueryVariables = Exact<{ - address: Scalars['IotaAddress']['input']; - limit?: InputMaybe; - cursor?: InputMaybe; -}>; - - -export type ResolveNameServiceNamesQuery = { __typename?: 'Query', address?: { __typename?: 'Address', iotansRegistrations: { __typename?: 'IotansRegistrationConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'IotansRegistration', domain: string }> } } | null }; - export type GetOwnedObjectsQueryVariables = Exact<{ owner: Scalars['IotaAddress']['input']; limit?: InputMaybe; @@ -7685,28 +7166,6 @@ export const GetValidatorsApyDocument = new TypedDocumentString(` } } `) as unknown as TypedDocumentString; -export const ResolveNameServiceAddressDocument = new TypedDocumentString(` - query resolveNameServiceAddress($domain: String!) { - resolveIotansAddress(domain: $domain) { - address - } -} - `) as unknown as TypedDocumentString; -export const ResolveNameServiceNamesDocument = new TypedDocumentString(` - query resolveNameServiceNames($address: IotaAddress!, $limit: Int, $cursor: String) { - address(address: $address) { - iotansRegistrations(first: $limit, after: $cursor) { - pageInfo { - hasNextPage - endCursor - } - nodes { - domain - } - } - } -} - `) as unknown as TypedDocumentString; export const GetOwnedObjectsDocument = new TypedDocumentString(` query getOwnedObjects($owner: IotaAddress!, $limit: Int, $cursor: String, $showBcs: Boolean = false, $showContent: Boolean = false, $showDisplay: Boolean = false, $showType: Boolean = false, $showOwner: Boolean = false, $showPreviousTransaction: Boolean = false, $showStorageRebate: Boolean = false, $filter: ObjectFilter) { address(address: $owner) { @@ -8803,4 +8262,4 @@ fragment PAGINATE_TRANSACTION_LISTS on TransactionBlock { } } } -}`) as unknown as TypedDocumentString; +}`) as unknown as TypedDocumentString; \ No newline at end of file diff --git a/sdk/graphql-transport/src/methods.ts b/sdk/graphql-transport/src/methods.ts index 541fd744c00..72b521f5d23 100644 --- a/sdk/graphql-transport/src/methods.ts +++ b/sdk/graphql-transport/src/methods.ts @@ -60,8 +60,6 @@ import { PaginateTransactionBlockListsDocument, QueryEventsDocument, QueryTransactionBlocksDocument, - ResolveNameServiceAddressDocument, - ResolveNameServiceNamesDocument, TransactionBlockKindInput, TryGetPastObjectDocument, } from './generated/queries.js'; @@ -1272,7 +1270,7 @@ export const RPC_METHODS: { epochTotalTransactions: '0', // TODO firstCheckpointId: epoch.firstCheckpoint?.nodes[0]?.sequenceNumber.toString()!, endOfEpochInfo: null, - referenceGasPrice: Number.parseInt(epoch.referenceGasPrice, 10), + referenceGasPrice: epoch.referenceGasPrice, epochStartTimestamp: new Date(epoch.startTimestamp).getTime().toString(), }; }, @@ -1391,35 +1389,6 @@ export const RPC_METHODS: { featureFlags, }; }, - async resolveNameServiceAddress(transport, [name]): Promise { - const data = await transport.graphqlQuery({ - query: ResolveNameServiceAddressDocument, - variables: { - domain: name, - }, - }); - - return data.resolveIotansAddress?.address ?? null; - }, - async resolveNameServiceNames(transport, [address, cursor, limit]) { - const iotansRegistrations = await transport.graphqlQuery( - { - query: ResolveNameServiceNamesDocument, - variables: { - address: address, - cursor, - limit, - }, - }, - (data) => data.address?.iotansRegistrations, - ); - - return { - hasNextPage: iotansRegistrations.pageInfo.hasNextPage, - nextCursor: iotansRegistrations.pageInfo.endCursor ?? null, - data: iotansRegistrations?.nodes.map((node) => node.domain) ?? [], - }; - }, }; export class UnsupportedParamError extends Error { diff --git a/sdk/graphql-transport/test/compatability.test.ts b/sdk/graphql-transport/test/compatability.test.ts index 0f83c49b3e5..a12ba95142f 100644 --- a/sdk/graphql-transport/test/compatability.test.ts +++ b/sdk/graphql-transport/test/compatability.test.ts @@ -687,6 +687,13 @@ describe('GraphQL IotaClient compatibility', () => { expect(graphql).toEqual(rpc); }); + test.skip('getCheckpointAddressMetrics', async () => { + const rpc = await toolbox.client.getCheckpointAddressMetrics({ checkpoint: '3' }); + const graphql = await graphQLClient!.getCheckpointAddressMetrics({ checkpoint: '3' }); + + expect(graphql).toEqual(rpc); + }); + test.skip('getEpochs', async () => { const rpc = await toolbox.client.getEpochs(); const graphql = await graphQLClient!.getEpochs(); @@ -701,6 +708,13 @@ describe('GraphQL IotaClient compatibility', () => { expect(graphql).toEqual(rpc); }); + test.skip('getTotalTransactions', async () => { + const rpc = await toolbox.client.getTotalTransactions(); + const graphql = await graphQLClient!.getTotalTransactions(); + + expect(graphql).toEqual(rpc); + }); + test('getValidatorsApy', async () => { const rpc = await toolbox.client.getValidatorsApy(); const graphql = await graphQLClient!.getValidatorsApy(); diff --git a/sdk/typescript/src/client/client.ts b/sdk/typescript/src/client/client.ts index 0229e4f81fb..f2800aa5389 100644 --- a/sdk/typescript/src/client/client.ts +++ b/sdk/typescript/src/client/client.ts @@ -70,8 +70,6 @@ import type { QueryEventsParams, QueryTransactionBlocksParams, ResolvedNameServiceNames, - ResolveNameServiceAddressParams, - ResolveNameServiceNamesParams, SubscribeEventParams, SubscribeTransactionParams, IotaEvent, @@ -734,6 +732,13 @@ export class IotaClient { }); } + async getCheckpointAddressMetrics(input?: { checkpoint: string }): Promise { + return await this.transport.request({ + method: 'iotax_getCheckpointAddressMetrics', + params: [input?.checkpoint], + }); + } + /** * Return the committee information for the asked epoch */ @@ -762,6 +767,14 @@ export class IotaClient { return await this.transport.request({ method: 'iotax_getCurrentEpoch', params: [] }); } + async getTotalTransactions(): Promise { + const resp = await this.transport.request({ + method: 'iotax_getTotalTransactions', + params: [], + }); + return String(resp); + } + /** * Return the Validators APYs */ @@ -776,22 +789,16 @@ export class IotaClient { return toHEX(bytes.slice(0, 4)); } - async resolveNameServiceAddress( - input: ResolveNameServiceAddressParams, - ): Promise { - return await this.transport.request({ - method: 'iotax_resolveNameServiceAddress', - params: [input.name], - }); + async resolveNameServiceAddress(_input: any): Promise { + return 'remove_me'; } - async resolveNameServiceNames( - input: ResolveNameServiceNamesParams, - ): Promise { - return await this.transport.request({ - method: 'iotax_resolveNameServiceNames', - params: [input.address, input.cursor, input.limit], - }); + async resolveNameServiceNames(_input: any): Promise { + return { + data: [], + hasNextPage: false, + nextCursor: null, + }; } async getProtocolConfig(input?: GetProtocolConfigParams): Promise { diff --git a/sdk/typescript/src/client/types/chain.ts b/sdk/typescript/src/client/types/chain.ts index 595ba4519fb..8124c20121c 100644 --- a/sdk/typescript/src/client/types/chain.ts +++ b/sdk/typescript/src/client/types/chain.ts @@ -3,13 +3,15 @@ // SPDX-License-Identifier: Apache-2.0 import type { + AddressMetrics, Checkpoint, DynamicFieldInfo, + EpochInfo, + EpochMetrics, IotaCallArg, IotaMoveNormalizedModule, IotaParsedData, IotaTransaction, - IotaValidatorSummary, } from './generated.js'; export type ResolvedNameServiceNames = { @@ -18,24 +20,6 @@ export type ResolvedNameServiceNames = { nextCursor: string | null; }; -export type EpochInfo = { - epoch: string; - validators: IotaValidatorSummary[]; - epochTotalTransactions: string; - firstCheckpointId: string; - epochStartTimestamp: string; - endOfEpochInfo: EndOfEpochInfo | null; - referenceGasPrice: number | null; -}; - -export type EpochMetrics = { - epoch: string; - epochTotalTransactions: string; - firstCheckpointId: string; - epochStartTimestamp: string; - endOfEpochInfo: EndOfEpochInfo | null; -}; - export type EpochPage = { data: EpochInfo[]; nextCursor: string | null; @@ -48,54 +32,14 @@ export type EpochMetricsPage = { hasNextPage: boolean; }; -export type EndOfEpochInfo = { - lastCheckpointId: string; - epochEndTimestamp: string; - protocolVersion: string; - referenceGasPrice: string; - totalStake: string; - storageCharge: string; - storageRebate: string; - storageFundBalance: string; - totalGasFees: string; - totalStakeRewardsDistributed: string; - burntTokensAmount: string; - mintedTokensAmount: string; -}; - export type CheckpointPage = { data: Checkpoint[]; nextCursor: string | null; hasNextPage: boolean; }; -export type NetworkMetrics = { - currentTps: number; - tps30Days: number; - currentCheckpoint: string; - currentEpoch: string; - totalAddresses: string; - totalObjects: string; - totalPackages: string; -}; - -export type AddressMetrics = { - checkpoint: number; - epoch: number; - timestampMs: number; - cumulativeAddresses: number; - cumulativeActiveAddresses: number; - dailyActiveAddresses: number; -}; - export type AllEpochsAddressMetrics = AddressMetrics[]; -export type MoveCallMetrics = { - rank3Days: MoveCallMetric[]; - rank7Days: MoveCallMetric[]; - rank30Days: MoveCallMetric[]; -}; - export type MoveCallMetric = [ { module: string; diff --git a/sdk/typescript/src/client/types/generated.ts b/sdk/typescript/src/client/types/generated.ts index 448f4f6e65c..7142e999490 100644 --- a/sdk/typescript/src/client/types/generated.ts +++ b/sdk/typescript/src/client/types/generated.ts @@ -11,6 +11,21 @@ * /crates/iota-open-rpc/spec/openrpc.json */ +/** Provides metrics about the addresses. */ +export interface AddressMetrics { + /** The checkpoint sequence number at which the metrics were computed. */ + checkpoint: string; + /** The count of sender addresses. */ + cumulativeActiveAddresses: string; + /** The count of sender and recipient addresses. */ + cumulativeAddresses: string; + /** The count of daily unique sender addresses. */ + dailyActiveAddresses: string; + /** The epoch to which the checkpoint is assigned. */ + epoch: string; + /** The checkpoint timestamp. */ + timestampMs: string; +} export interface Balance { coinObjectCount: number; coinType: string; @@ -204,6 +219,50 @@ export interface EndOfEpochData { */ nextEpochProtocolVersion: string; } +export interface EndOfEpochInfo { + burntTokensAmount: string; + epochEndTimestamp: string; + lastCheckpointId: string; + mintedTokensAmount: string; + /** existing fields from `SystemEpochInfoEvent` (without epoch) */ + protocolVersion: string; + referenceGasPrice: string; + storageCharge: string; + storageFundBalance: string; + storageRebate: string; + totalGasFees: string; + totalStake: string; + totalStakeRewardsDistributed: string; +} +export interface EpochInfo { + /** The end of epoch information. */ + endOfEpochInfo?: EndOfEpochInfo | null; + /** Epoch number */ + epoch: string; + /** The timestamp when the epoch started. */ + epochStartTimestamp: string; + /** Count of tx in epoch */ + epochTotalTransactions: string; + /** First, last checkpoint sequence numbers */ + firstCheckpointId: string; + /** The reference gas price for the given epoch. */ + referenceGasPrice?: string | null; + /** List of validators included in epoch */ + validators: IotaValidatorSummary[]; +} +/** A light-weight version of `EpochInfo` for faster loading */ +export interface EpochMetrics { + /** The end of epoch information. */ + endOfEpochInfo?: EndOfEpochInfo | null; + /** The current epoch ID. */ + epoch: string; + /** The timestamp when the epoch started. */ + epochStartTimestamp: string; + /** The total number of transactions in the epoch. */ + epochTotalTransactions: string; + /** The first checkpoint ID of the epoch. */ + firstCheckpointId: string; +} export interface IotaEvent { /** Base 58 encoded bcs bytes of the move event */ bcs: string; @@ -789,6 +848,14 @@ export interface LoadedChildObject { export interface LoadedChildObjectsResponse { loadedChildObjects: LoadedChildObject[]; } +export interface MoveCallMetrics { + /** The count of calls of each function in the last 30 days. */ + rank30Days: [MoveFunctionName, string][]; + /** The count of calls of each function in the last 3 days. */ + rank3Days: [MoveFunctionName, string][]; + /** The count of calls of each function in the last 7 days. */ + rank7Days: [MoveFunctionName, string][]; +} export interface MoveCallParams { arguments: unknown[]; function: string; @@ -801,6 +868,15 @@ export type IotaMoveFunctionArgType = | { Object: ObjectValueKind; }; +/** Identifies a Move function. */ +export interface MoveFunctionName { + /** The function name. */ + function: string; + /** The module name to which the function belongs. */ + module: string; + /** The package ID to which the function belongs. */ + package: string; +} export type MoveStruct = | MoveValue[] | { @@ -873,6 +949,22 @@ export interface MultiSigPublicKeyLegacy { */ threshold: number; } +export interface NetworkMetrics { + /** Current checkpoint number */ + currentCheckpoint: string; + /** Current epoch number */ + currentEpoch: string; + /** Current TPS - Transaction Blocks per Second. */ + currentTps: number; + /** Total number of addresses seen in the network */ + totalAddresses: string; + /** Total number of live objects in the network */ + totalObjects: string; + /** Total number of packages published in the network */ + totalPackages: string; + /** Peak TPS in the past 30 days */ + tps30Days: number; +} /** * ObjectChange are derived from the object mutations in the TransactionEffect to provide richer object * information. @@ -1106,18 +1198,18 @@ export interface PaginatedDynamicFieldInfos { * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first * item. */ -export interface PaginatedEvents { - data: IotaEvent[]; +export interface PaginatedEpochInfos { + data: EpochInfo[]; hasNextPage: boolean; - nextCursor?: EventId | null; + nextCursor?: string | null; } /** * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first * item. */ -export interface PaginatedObjectsResponse { - data: IotaObjectResponse[]; +export interface PaginatedEpochMetricss { + data: EpochMetrics[]; hasNextPage: boolean; nextCursor?: string | null; } @@ -1126,8 +1218,18 @@ export interface PaginatedObjectsResponse { * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first * item. */ -export interface PaginatedStrings { - data: string[]; +export interface PaginatedEvents { + data: IotaEvent[]; + hasNextPage: boolean; + nextCursor?: EventId | null; +} +/** + * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the + * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first + * item. + */ +export interface PaginatedObjectsResponse { + data: IotaObjectResponse[]; hasNextPage: boolean; nextCursor?: string | null; } diff --git a/sdk/typescript/src/client/types/params.ts b/sdk/typescript/src/client/types/params.ts index a2a674dd196..47e698171ab 100644 --- a/sdk/typescript/src/client/types/params.ts +++ b/sdk/typescript/src/client/types/params.ts @@ -197,6 +197,9 @@ export interface GetAllCoinsParams { /** maximum number of items per page */ limit?: number | null | undefined; } +export interface GetAllEpochAddressMetricsParams { + descendingOrder?: boolean | null | undefined; +} /** Return the total coin balance for one coin type, owned by the address owner. */ export interface GetBalanceParams { /** the owner's Iota address */ @@ -207,7 +210,10 @@ export interface GetBalanceParams { */ coinType?: string | null | undefined; } -/** Return metadata(e.g., symbol, decimals) for a coin */ +export interface GetCheckpointAddressMetricsParams { + checkpoint: string; +} +/** Return metadata (e.g., symbol, decimals) for a coin. */ export interface GetCoinMetadataParams { /** type name for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC) */ coinType: string; @@ -231,6 +237,8 @@ export interface GetCommitteeInfoParams { /** The epoch of interest. If None, default to the latest epoch */ epoch?: string | null | undefined; } +/** Return current epoch info */ +export interface GetCurrentEpochParams {} /** Return the dynamic field object information for a specified object */ export interface GetDynamicFieldObjectParams { /** The ID of the queried parent object */ @@ -250,8 +258,32 @@ export interface GetDynamicFieldsParams { /** Maximum item returned per page, default to [QUERY_MAX_RESULT_LIMIT] if not specified. */ limit?: number | null | undefined; } +/** Return a list of epoch metrics, which is a subset of epoch info */ +export interface GetEpochMetricsParams { + /** Optional paging cursor */ + cursor?: string | null | undefined; + /** Maximum number of items per page */ + limit?: number | null | undefined; + /** Flag to return results in descending order */ + descendingOrder?: boolean | null | undefined; +} +/** Return a list of epoch info */ +export interface GetEpochsParams { + /** Optional paging cursor */ + cursor?: string | null | undefined; + /** Maximum number of items per page */ + limit?: number | null | undefined; + /** Flag to return results in descending order */ + descendingOrder?: boolean | null | undefined; +} +/** Address related metrics */ +export interface GetLatestAddressMetricsParams {} /** Return the latest IOTA system state object on-chain. */ export interface GetLatestIotaSystemStateParams {} +/** Return move call metrics */ +export interface GetMoveCallMetricsParams {} +/** Return Network metrics */ +export interface GetNetworkMetricsParams {} /** * Return the list of objects owned by an address. Note that if the address owns more than * `QUERY_MAX_RESULT_LIMIT` objects, the pagination is not accurate, because previous page may have @@ -286,11 +318,12 @@ export interface GetTimelockedStakesParams { export interface GetTimelockedStakesByIdsParams { timelockedStakedIotaIds: string[]; } -/** Return total supply for a coin */ +/** Return total supply for a coin. */ export interface GetTotalSupplyParams { /** type name for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC) */ coinType: string; } +export interface GetTotalTransactionsParams {} /** Return the validator APY */ export interface GetValidatorsApyParams {} /** Return list of events for a specified query criteria. */ @@ -319,21 +352,6 @@ export type QueryTransactionBlocksParams = { /** query result ordering, default to false (ascending order), oldest record first. */ order?: 'ascending' | 'descending' | null | undefined; } & RpcTypes.IotaTransactionBlockResponseQuery; -/** Return the resolved address given resolver and name */ -export interface ResolveNameServiceAddressParams { - /** The name to resolve */ - name: string; -} -/** - * Return the resolved names given address, if multiple names are resolved, the first one is the - * primary name. - */ -export interface ResolveNameServiceNamesParams { - /** The address to resolve */ - address: string; - cursor?: string | null | undefined; - limit?: number | null | undefined; -} /** Subscribe to a stream of Iota event */ export interface SubscribeEventParams { /**