import type { Signer } from '../cryptography/index.js'; import type { Transaction } from '../transactions/index.js'; import type { IotaTransport } from './http-transport.js'; import type { AddressMetrics, AllEpochsAddressMetrics, Checkpoint, CheckpointPage, CoinBalance, CoinMetadata, CoinSupply, CommitteeInfo, DelegatedStake, DevInspectResults, DevInspectTransactionBlockParams, DryRunTransactionBlockParams, DryRunTransactionBlockResponse, DynamicFieldPage, EpochInfo, EpochMetricsPage, EpochPage, ExecuteTransactionBlockParams, GetAllBalancesParams, GetAllCoinsParams, GetBalanceParams, GetCheckpointParams, GetCheckpointsParams, GetCoinMetadataParams, GetCoinsParams, GetCommitteeInfoParams, GetDynamicFieldObjectParams, GetDynamicFieldsParams, GetMoveFunctionArgTypesParams, GetNormalizedMoveFunctionParams, GetNormalizedMoveModuleParams, GetNormalizedMoveModulesByPackageParams, GetNormalizedMoveStructParams, GetObjectParams, GetOwnedObjectsParams, GetProtocolConfigParams, GetStakesByIdsParams, GetStakesParams, GetTotalSupplyParams, GetTransactionBlockParams, MoveCallMetrics, MultiGetObjectsParams, MultiGetTransactionBlocksParams, NetworkMetrics, ObjectRead, Order, PaginatedCoins, PaginatedEvents, PaginatedObjectsResponse, PaginatedTransactionResponse, ProtocolConfig, QueryEventsParams, QueryTransactionBlocksParams, SubscribeEventParams, SubscribeTransactionParams, IotaEvent, IotaMoveFunctionArgType, IotaMoveNormalizedFunction, IotaMoveNormalizedModule, IotaMoveNormalizedModules, IotaMoveNormalizedStruct, IotaObjectResponse, IotaSystemStateSummary, IotaTransactionBlockResponse, TransactionEffects, TryGetPastObjectParams, Unsubscribe, ValidatorsApy, GetTimelockedStakesParams, DelegatedTimelockedStake, GetTimelockedStakesByIdsParams, IotaSystemStateSummaryV1, LatestIotaSystemStateSummary, ParticipationMetrics, IotaCirculatingSupply, GetDynamicFieldObjectV2Params, IotaNamesLookupParams, IotaNameRecord, IotaNamesReverseLookupParams, IotaNamesFindAllRegistrationNFTsParams, IsTransactionIndexedOnNodeParams, IotaMoveViewCallResults, ViewParams } from './types/index.js'; export interface PaginationArguments { /** Optional paging cursor */ cursor?: Cursor; /** Maximum item returned per page */ limit?: number | null; } export interface OrderArguments { order?: Order | null; } /** * Configuration options for the IotaClient * You must provide either a `url` or a `transport` */ export type IotaClientOptions = NetworkOrTransport; type NetworkOrTransport = { url: string; transport?: never; } | { transport: IotaTransport; url?: never; }; export declare function isIotaClient(client: unknown): client is IotaClient; export declare class IotaClient { protected transport: IotaTransport; /** * Establish a connection to an IOTA RPC endpoint * * @param options configuration options for the API Client */ constructor(options: IotaClientOptions); getRpcApiVersion({ signal }?: { signal?: AbortSignal; }): Promise; /** * Get all Coin<`coin_type`> objects owned by an address. */ getCoins(input: GetCoinsParams): Promise; /** * Get all Coin objects owned by an address. */ getAllCoins(input: GetAllCoinsParams): Promise; /** * Get the total coin balance for one coin type, owned by the address owner. */ getBalance(input: GetBalanceParams): Promise; /** * Get the total coin balance for all coin types, owned by the address owner. */ getAllBalances(input: GetAllBalancesParams): Promise; /** * Fetch CoinMetadata for a given coin type */ getCoinMetadata(input: GetCoinMetadataParams): Promise; /** * Fetch total supply for a coin */ getTotalSupply(input: GetTotalSupplyParams): Promise; /** * Fetch circulating supply for a coin */ getCirculatingSupply({ signal, }?: { signal?: AbortSignal; }): Promise; /** * Invoke any RPC method * @param method the method to be invoked * @param args the arguments to be passed to the RPC request */ call(method: string, params: unknown[], { signal }?: { signal?: AbortSignal; }): Promise; /** * Get Move function argument types like read, write and full access */ getMoveFunctionArgTypes(input: GetMoveFunctionArgTypesParams): Promise; /** * Get a map from module name to * structured representations of Move modules */ getNormalizedMoveModulesByPackage(input: GetNormalizedMoveModulesByPackageParams): Promise; /** * Get a structured representation of Move module */ getNormalizedMoveModule(input: GetNormalizedMoveModuleParams): Promise; /** * Get a structured representation of Move function */ getNormalizedMoveFunction(input: GetNormalizedMoveFunctionParams): Promise; /** * Get a structured representation of Move struct */ getNormalizedMoveStruct(input: GetNormalizedMoveStructParams): Promise; /** * Get all objects owned by an address */ getOwnedObjects(input: GetOwnedObjectsParams): Promise; /** * Get details about an object */ getObject(input: GetObjectParams): Promise; tryGetPastObject(input: TryGetPastObjectParams): Promise; /** * Batch get details about a list of objects. If any of the object ids are duplicates the call will fail */ multiGetObjects(input: MultiGetObjectsParams): Promise; /** * Get transaction blocks for a given query criteria */ queryTransactionBlocks(input: QueryTransactionBlocksParams): Promise; getTransactionBlock(input: GetTransactionBlockParams): Promise; multiGetTransactionBlocks(input: MultiGetTransactionBlocksParams): Promise; executeTransactionBlock({ transactionBlock, signature, options, signal, }: ExecuteTransactionBlockParams): Promise; signAndExecuteTransaction({ transaction, signer, ...input }: { transaction: Uint8Array | Transaction; signer: Signer; } & Omit): Promise; /** * Get total number of transactions */ getTotalTransactionBlocks({ signal }?: { signal?: AbortSignal; }): Promise; /** * Getting the reference gas price for the network */ getReferenceGasPrice({ signal }?: { signal?: AbortSignal; }): Promise; /** * Return the delegated stakes for an address */ getStakes(input: GetStakesParams): Promise; /** * Return the timelocked delegated stakes for an address */ getTimelockedStakes(input: GetTimelockedStakesParams): Promise; /** * Return the delegated stakes queried by id. */ getStakesByIds(input: GetStakesByIdsParams): Promise; /** * Return the timelocked delegated stakes queried by id. */ getTimelockedStakesByIds(input: GetTimelockedStakesByIdsParams): Promise; /** * Return the latest IOTA system state object on networks supporting protocol version `< 5`. * These are networks with node software release version `< 0.11`. * @deprecated Use `getLatestIotaSystemState` instead. */ getLatestIotaSystemStateV1({ signal, }?: { signal?: AbortSignal; }): Promise; /** * Return the latest IOTA system state object on networks supporting protocol version `>= 5`. * These are networks with node software release version `>= 0.11`. * * You probably want to use `getLatestIotaSystemState` instead to prevent issues with future deprecations * or in case the node does not support protocol version `>= 5`. */ getLatestIotaSystemStateV2({ signal, }?: { signal?: AbortSignal; }): Promise; /** * Return the latest supported IOTA system state object. * * This returns a backwards-compatible system state object that dynamically uses the V1 or V2 * depending on the protocol version supported by the node. This method will continue to be supported * as more protocol versions are released with changes to the system state. * * This is quite useful in case your app does not know in advance what node is it going to be using, * this way you as developer dont need to handle each possible system state variant, * this is already handled by this method. */ getLatestIotaSystemState({ signal, }?: { signal?: AbortSignal; }): Promise; /** * Get events for a given query criteria */ queryEvents(input: QueryEventsParams): Promise; /** * Subscribe to get notifications whenever an event matching the filter occurs * * @deprecated */ subscribeEvent(input: SubscribeEventParams & { /** function to run when we receive a notification of a new event matching the filter */ onMessage: (event: IotaEvent) => void; }): Promise; /** * @deprecated */ subscribeTransaction(input: SubscribeTransactionParams & { /** function to run when we receive a notification of a new event matching the filter */ onMessage: (event: TransactionEffects) => void; }): Promise; /** * Runs the transaction block in dev-inspect mode. Which allows for nearly any * transaction (or Move call) with any arguments. Detailed results are * provided, including both the transaction effects and any return values. */ devInspectTransactionBlock(input: DevInspectTransactionBlockParams): Promise; /** * Dry run a transaction block and return the result. */ dryRunTransactionBlock(input: DryRunTransactionBlockParams): Promise; /** * Return the list of dynamic field objects owned by an object */ getDynamicFields(input: GetDynamicFieldsParams): Promise; /** * Return the dynamic field object information for a specified object * Uses the V2. */ getDynamicFieldObject(input: GetDynamicFieldObjectV2Params): Promise; /** * Return the dynamic field object information for a specified object * @deprecated `getDynamicFieldObjectV1` is deprecated, prefer to use `getDynamicFieldObject` which uses V2. */ getDynamicFieldObjectV1(input: GetDynamicFieldObjectParams): Promise; /** * Return the dynamic field object information for a specified object with content options. */ getDynamicFieldObjectV2(input: GetDynamicFieldObjectV2Params): Promise; /** * Get the sequence number of the latest checkpoint that has been executed */ getLatestCheckpointSequenceNumber({ signal, }?: { signal?: AbortSignal; }): Promise; /** * Returns information about a given checkpoint */ getCheckpoint(input: GetCheckpointParams): Promise; /** * Returns historical checkpoints paginated */ getCheckpoints(input: PaginationArguments & GetCheckpointsParams): Promise; /** * Return the committee information for the asked epoch */ getCommitteeInfo(input?: GetCommitteeInfoParams): Promise; getNetworkMetrics({ signal }?: { signal?: AbortSignal; }): Promise; getAddressMetrics({ signal }?: { signal?: AbortSignal; }): Promise; getEpochMetrics(input?: { descendingOrder?: boolean; signal?: AbortSignal; } & PaginationArguments): Promise; getAllEpochAddressMetrics(input?: { descendingOrder?: boolean; signal?: AbortSignal; }): Promise; getCheckpointAddressMetrics(input?: { checkpoint: string; signal?: AbortSignal; }): Promise; /** * Return the committee information for the asked epoch */ getEpochs(input?: { descendingOrder?: boolean; signal?: AbortSignal; } & PaginationArguments): Promise; /** * Returns list of top move calls by usage */ getMoveCallMetrics({ signal }?: { signal?: AbortSignal; }): Promise; /** * Return the committee information for the asked epoch */ getCurrentEpoch({ signal }?: { signal?: AbortSignal; }): Promise; getTotalTransactions({ signal }?: { signal?: AbortSignal; }): Promise; /** * Return the Validators APYs */ getValidatorsApy({ signal }?: { signal?: AbortSignal; }): Promise; getChainIdentifier({ signal }?: { signal?: AbortSignal; }): Promise; getProtocolConfig(input?: GetProtocolConfigParams): Promise; /** * Returns the participation metrics (total unique addresses with delegated stake in the current epoch). */ getParticipationMetrics({ signal, }?: { signal?: AbortSignal; }): Promise; /** * Wait for a transaction block result to be available over the API. * This can be used in conjunction with `executeTransactionBlock` to wait for the transaction to * be available via the API. * This currently polls the `getTransactionBlock` API to check for the transaction. */ waitForTransaction({ signal, timeout, pollInterval, waitMode, ...input }: { /** An optional abort signal that can be used to cancel */ signal?: AbortSignal; /** The amount of time to wait for a transaction block. Defaults to one minute. */ timeout?: number; /** The amount of time to wait between checks for the transaction block. Defaults to 2 seconds. */ pollInterval?: number; /** Whether to wait the transaction to have been checkpointed or indexed on the node. * A transaction might be indexed but not checkpointed yet, but a checkpointed transaction is guaranteed to be indexed. * The default is 'checkpoint'. */ waitMode?: 'checkpoint' | 'indexed-on-node'; } & Parameters[0]): Promise; /** * Return the resolved record for the given name. */ iotaNamesLookup(input: IotaNamesLookupParams): Promise; /** * Return the resolved name for the given address. */ iotaNamesReverseLookup(input: IotaNamesReverseLookupParams): Promise; /** * Find all registration NFTs for the given address. */ iotaNamesFindAllRegistrationNFTs(input: IotaNamesFindAllRegistrationNFTsParams): Promise; /** * Check if a Transaction has been indexed on the Node. */ isTransactionIndexedOnNode(input: IsTransactionIndexedOnNodeParams): Promise; /** * Calls a move view function. */ view(input: ViewParams): Promise; } export {}; //# sourceMappingURL=client.d.ts.map