UNPKG

@maestro-org/typescript-sdk

Version:

TypeScript SDK for the Maestro Dapp Platform

1,394 lines (1,379 loc) 158 kB
import { AxiosRequestConfig, AxiosInstance } from 'axios'; type MaestroSupportedNetworks = 'Mainnet' | 'Preprod' | 'Preview'; interface ConfigurationParameters { readonly apiKey?: string; readonly baseUrl?: string; readonly network: MaestroSupportedNetworks; readonly baseOptions?: AxiosRequestConfig; readonly axiosInstance?: AxiosInstance; } declare class Configuration { /** * parameter for apiKey security * @param name security name * @memberof Configuration */ readonly apiKey: string; /** * base url of network request * * @type {string} * @memberof Configuration */ readonly baseUrl: string; /** * base options for axios calls * * @type {AxiosRequestConfig} * @memberof Configuration */ readonly baseOptions?: AxiosRequestConfig; readonly axiosInstance: AxiosInstance; constructor(param: ConfigurationParameters); /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * application/vnd.company+json * @param mime - MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ isJsonMime(mime: string): boolean; } /** * * @export * @class BaseAPI */ declare class BaseAPI { protected configuration: Configuration; constructor(configuration: Configuration); } /** * Query parameters for accountAddresses. * @export * @interface AccountAddressesQueryParams * */ interface AccountAddressesQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof AccountAddressesQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof AccountAddressesQueryParams */ cursor?: string | null; /** * Include addresses that have been seen on-chain but have no balance. * @type {boolean | null} * @memberof AccountAddressesQueryParams */ include_empty?: boolean | null; } /** * Query parameters for accountAssets. * @export * @interface AccountAssetsQueryParams * */ interface AccountAssetsQueryParams { /** * Filter results to only show assets of the specified policy * @type {string | null} * @memberof AccountAssetsQueryParams */ policy?: string | null; /** * The max number of results per page. * @type {number | null} * @memberof AccountAssetsQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof AccountAssetsQueryParams */ cursor?: string | null; } /** * Query parameters for accountHistory. * @export * @interface AccountHistoryQueryParams * */ interface AccountHistoryQueryParams { /** * Fetch result for only a specific epoch * @type {string | null} * @memberof AccountHistoryQueryParams */ epochNo?: number | null; /** * The max number of results per page. * @type {number | null} * @memberof AccountHistoryQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof AccountHistoryQueryParams */ cursor?: string | null; } /** * Query parameters for accountRewards. * @export * @interface AccountRewardsQueryParams * */ interface AccountRewardsQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof AccountRewardsQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof AccountRewardsQueryParams */ cursor?: string | null; } /** * Query parameters for accountUpdates. * @export * @interface AccountUpdatesQueryParams * */ interface AccountUpdatesQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof AccountUpdatesQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof AccountUpdatesQueryParams */ cursor?: string | null; } /** * Query parameters for accountDelegationHistory. * @export * @interface AccountDelegationHistoryQueryParams * */ interface AccountDelegationHistoryQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof AccountDelegationHistoryQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof AccountDelegationHistoryQueryParams */ cursor?: string | null; } /** * AccountsApi - object-oriented interface * @export * @class AccountsApi * @extends {BaseAPI} */ declare class AccountsApi extends BaseAPI { /** * Returns a list of addresses seen on-chain which use the specified stake key * @summary Stake account addresses * @param {string} stakeAddr Bech32 encoded stake/reward address (\&#39;stake1...\&#39;) * @param {AccountAddressesQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountsApi */ accountAddresses(stakeAddr: string, queryParams?: AccountAddressesQueryParams, options?: AxiosRequestConfig): Promise<PaginatedAddress>; /** * Returns a list of native assets which are owned by addresses with the specified stake key * @summary Stake account assets * @param {string} stakeAddr Bech32 encoded reward/stake address (\&#39;stake1...\&#39;) * @param {AccountAssetsQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountsApi */ accountAssets(stakeAddr: string, queryParams?: AccountAssetsQueryParams, options?: AxiosRequestConfig): Promise<PaginatedAsset>; /** * Returns per-epoch history for the specified stake key * @summary Stake account history * @param {string} stakeAddr Bech32 encoded stake/reward address (\&#39;stake1...\&#39;) * @param {AccountHistoryQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountsApi */ accountHistory(stakeAddr: string, queryParams?: AccountHistoryQueryParams, options?: AxiosRequestConfig): Promise<PaginatedAccountHistory>; /** * * Returns list of delegation actions relating to a stake account * @summary Stake account history * @param {string} stakeAddr Bech32 encoded stake/reward address (\&#39;stake1...\&#39;) * @param {AccountDelegationHistoryQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountsApi */ accountDelegationHistory(stakeAddr: string, queryParams?: AccountDelegationHistoryQueryParams, options?: AxiosRequestConfig): Promise<PaginatedAccountDelegationHistory>; /** * Returns various information regarding a stake account * @summary Stake account information * @param {string} stakeAddr Bech32 encoded reward/stake address (\&#39;stake1...\&#39;) * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountsApi */ accountInfo(stakeAddr: string, options?: AxiosRequestConfig): Promise<TimestampedAccountInfo>; /** * Returns a list of staking-related rewards for the specified stake key (pool `member` or `leader` rewards, deposit `refund`) * @summary Stake account rewards * @param {string} stakeAddr Bech32 encoded stake/reward address (\&#39;stake1...\&#39;) * @param {AccountRewardsQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountsApi */ accountRewards(stakeAddr: string, queryParams?: AccountRewardsQueryParams, options?: AxiosRequestConfig): Promise<PaginatedAccountReward>; /** * Returns a list of updates relating to the specified stake key ( `registration`, `deregistration`, `delegation`, `withdrawal`) * @summary Stake account updates * @param {string} stakeAddr Bech32 encoded stake/reward address (\&#39;stake1...\&#39;) * @param {AccountUpdatesQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountsApi */ accountUpdates(stakeAddr: string, queryParams?: AccountUpdatesQueryParams, options?: AxiosRequestConfig): Promise<PaginatedAccountUpdate>; } /** * @export */ declare const TxsByAddressOrderEnum: { readonly Asc: "asc"; readonly Desc: "desc"; }; type TxsByAddressOrderEnum = (typeof TxsByAddressOrderEnum)[keyof typeof TxsByAddressOrderEnum]; /** * @export */ declare const TxsByPaymentCredOrderEnum: { readonly Asc: "asc"; readonly Desc: "desc"; }; type TxsByPaymentCredOrderEnum = (typeof TxsByPaymentCredOrderEnum)[keyof typeof TxsByPaymentCredOrderEnum]; /** * @export */ declare const UtxoRefsAtAddressOrderEnum: { readonly Asc: "asc"; readonly Desc: "desc"; }; type UtxoRefsAtAddressOrderEnum = (typeof UtxoRefsAtAddressOrderEnum)[keyof typeof UtxoRefsAtAddressOrderEnum]; /** * @export */ declare const UtxosByAddressOrderEnum: { readonly Asc: "asc"; readonly Desc: "desc"; }; type UtxosByAddressOrderEnum = (typeof UtxosByAddressOrderEnum)[keyof typeof UtxosByAddressOrderEnum]; /** * @export */ declare const UtxosByPaymentCredOrderEnum: { readonly Asc: "asc"; readonly Desc: "desc"; }; type UtxosByPaymentCredOrderEnum = (typeof UtxosByPaymentCredOrderEnum)[keyof typeof UtxosByPaymentCredOrderEnum]; /** * Query parameters for txsByAddress. * @export * @interface TxsByAddressQueryParams * */ interface TxsByAddressQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof TxsByAddressQueryParams */ count?: number | null; /** * The order in which the results are sorted, by transaction age * @type {TxsByAddressOrderEnum} * @memberof TxsByAddressQueryParams */ order?: TxsByAddressOrderEnum; /** * Return only transactions minted on or after a specific slot * @type {number | null} * @memberof TxsByAddressQueryParams */ from?: number | null; /** * Return only transactions minted on or before a specific slot * @type {number | null} * @memberof TxsByAddressQueryParams */ to?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof TxsByAddressQueryParams */ cursor?: string | null; } /** * Query parameters for txsByPaymentCred. * @export * @interface TxsByPaymentCredQueryParams * */ interface TxsByPaymentCredQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof TxsByPaymentCredQueryParams */ count?: number | null; /** * The order in which the results are sorted, by transaction age * @type {TxsByPaymentCredOrderEnum} * @memberof TxsByPaymentCredQueryParams */ order?: TxsByPaymentCredOrderEnum; /** * Return only transactions minted on or after a specific slot * @type {number | null} * @memberof TxsByPaymentCredQueryParams */ from?: number | null; /** * Return only transactions minted on or before a specific slot * @type {number | null} * @memberof TxsByPaymentCredQueryParams */ to?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof TxsByPaymentCredQueryParams */ cursor?: string | null; } /** * Query parameters for txsByPaymentCreds. * @export * @interface TxsByPaymentCredsQueryParams * */ interface TxsByPaymentCredsQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof TxsByPaymentCredsQueryParams */ count?: number | null; /** * The order in which the results are sorted, by transaction age * @type {TxsByPaymentCredOrderEnum} * @memberof TxsByPaymentCredsQueryParams */ order?: TxsByPaymentCredOrderEnum; /** * Return only transactions minted on or after a specific slot * @type {number | null} * @memberof TxsByPaymentCredsQueryParams */ from?: number | null; /** * Return only transactions minted on or before a specific slot * @type {number | null} * @memberof TxsByPaymentCredsQueryParams */ to?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof TxsByPaymentCredsQueryParams */ cursor?: string | null; } /** * Query parameters for utxoRefsAtAddress. * @export * @interface UtxoRefsAtAddressQueryParams * */ interface UtxoRefsAtAddressQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof UtxoRefsAtAddressQueryParams */ count?: number | null; /** * The order in which the results are sorted (by slot at which UTxO was produced) * @type {UtxoRefsAtAddressOrderEnum} * @memberof UtxoRefsAtAddressQueryParams */ order?: UtxoRefsAtAddressOrderEnum; /** * Return only UTxOs created on or after a specific slot * @type {number | null} * @memberof UtxoRefsAtAddressQueryParams */ from?: number | null; /** * Return only UTxOs created before a specific slot * @type {number | null} * @memberof UtxoRefsAtAddressQueryParams */ to?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof UtxoRefsAtAddressQueryParams */ cursor?: string | null; } /** * Query parameters for utxosByAddress. * @export * @interface UtxosByAddressQueryParams * */ interface UtxosByAddressQueryParams { /** * Return only UTxOs which contain some of a specific asset (asset formatted as concatenation of hex encoded policy and asset name) * @type {string | null} * @memberof UtxosByAddressQueryParams */ asset?: string | null; /** * Try find and include the corresponding datums for datum hashes * @type {boolean | null} * @memberof UtxosByAddressQueryParams */ resolve_datums?: boolean | null; /** * Include the CBOR encodings of the transaction outputs in the response * @type {boolean | null} * @memberof UtxosByAddressQueryParams */ with_cbor?: boolean | null; /** * The max number of results per page. * @type {number | null} * @memberof UtxosByAddressQueryParams */ count?: number | null; /** * The order in which the results are sorted (by slot at which UTxO was produced) * @type {UtxosByAddressOrderEnum} * @memberof UtxosByAddressQueryParams */ order?: UtxosByAddressOrderEnum; /** * Return only UTxOs created on or after a specific slot * @type {number | null} * @memberof UtxosByAddressQueryParams */ from?: number | null; /** * Return only UTxOs created before a specific slot * @type {number | null} * @memberof UtxosByAddressQueryParams */ to?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof UtxosByAddressQueryParams */ cursor?: string | null; } /** * Query parameters for utxosByAddresses. * @export * @interface UtxosByAddressesQueryParams * */ interface UtxosByAddressesQueryParams { /** * Try find and include the corresponding datums for datum hashes * @type {boolean | null} * @memberof UtxosByAddressesQueryParams */ resolve_datums?: boolean | null; /** * Include the CBOR encodings of the transaction outputs in the response * @type {boolean | null} * @memberof UtxosByAddressesQueryParams */ with_cbor?: boolean | null; /** * The max number of results per page. * @type {number | null} * @memberof UtxosByAddressesQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof UtxosByAddressesQueryParams */ cursor?: string | null; } /** * Query parameters for utxosByPaymentCred. * @export * @interface UtxosByPaymentCredQueryParams * */ interface UtxosByPaymentCredQueryParams { /** * Return only UTxOs which contain some of a specific asset (asset formatted as concatenation of hex encoded policy and asset name) * @type {string | null} * @memberof UtxosByAddressQueryParams */ asset?: string | null; /** * Try find and include the corresponding datums for datum hashes * @type {boolean | null} * @memberof UtxosByPaymentCredQueryParams */ resolve_datums?: boolean | null; /** * Include the CBOR encodings of the transaction outputs in the response * @type {boolean | null} * @memberof UtxosByPaymentCredQueryParams */ with_cbor?: boolean | null; /** * The max number of results per page. * @type {number | null} * @memberof UtxosByPaymentCredQueryParams */ count?: number | null; /** * The order in which the results are sorted (by slot at which UTxO was produced) * @type {UtxosByPaymentCredOrderEnum} * @memberof UtxosByPaymentCredQueryParams */ order?: UtxosByPaymentCredOrderEnum; /** * Return only UTxOs created on or after a specific slot * @type {number | null} * @memberof UtxosByPaymentCredQueryParams */ from?: number | null; /** * Return only UTxOs created on or before a specific slot * @type {number | null} * @memberof UtxosByPaymentCredQueryParams */ to?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof UtxosByPaymentCredQueryParams */ cursor?: string | null; } /** * AddressesApi - object-oriented interface * @export * @class AddressesApi * @extends {BaseAPI} */ declare class AddressesApi extends BaseAPI { /** * Returns the different information encoded within a Cardano address, including details of the payment and delegation parts of the address * @summary Decode address * @param {string} address Address in bech32/hex/base58 format * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AddressesApi */ decodeAddress(address: string, options?: AxiosRequestConfig): Promise<AddressInfo>; /** * Return total amount of assets, including ADA, in UTxOs controlled by a specific payment credential * @summary Address Balance * @param {string} credential Payment credential in bech32 format * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AddressesApi */ addressBalance(credential: string, options?: AxiosRequestConfig): Promise<AddressBalance>; /** * Returns the number of transactions in which the address spent or received some funds. Specifically, the number of transactions where: the address controlled at least one of the transaction inputs and/or receives one of the outputs AND the transaction is phase-2 valid, OR, the address controlled at least one of the collateral inputs and/or receives the collateral return output AND the transaction is phase-2 invalid. [Read more](https://docs.cardano.org/plutus/collateral-mechanism/). * @summary Address transaction count * @param {string} address Address in bech32 format * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AddressesApi */ txCountByAddress(address: string, options?: AxiosRequestConfig): Promise<TimestampedTxCount>; /** * Returns transactions in which the specified address spent or received funds. Specifically, the transactions where: the address controlled at least one of the transaction inputs and/or receives one of the outputs AND the transaction is phase-2 valid, OR, the address controlled at least one of the collateral inputs and/or receives the collateral return output AND the transaction is phase-2 invalid. [Read more](https://docs.cardano.org/plutus/collateral-mechanism/). * @summary Address transactions * @param {string} address Address in bech32 format * @param {TxsByAddressQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AddressesApi */ txsByAddress(address: string, queryParams?: TxsByAddressQueryParams, options?: AxiosRequestConfig): Promise<PaginatedAddressTransaction>; /** * Returns transactions in which the specified payment credential spent or received funds. Specifically, the transactions where: the payment credential was used in an address which controlled at least one of the transaction inputs and/or receives one of the outputs AND the transaction is phase-2 valid, OR, the address controlled at least one of the collateral inputs and/or receives the collateral return output AND the transaction is phase-2 invalid. [Read more](https://docs.cardano.org/plutus/collateral-mechanism/). * @summary Payment credential transactions * @param {string} credential Payment credential in bech32 format * @param {TxsByPaymentCredQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AddressesApi */ txsByPaymentCred(credential: string, queryParams?: TxsByPaymentCredQueryParams, options?: AxiosRequestConfig): Promise<PaginatedPaymentCredentialTransaction>; /** * Returns transactions in which the specified payment credentials spent or received funds. Specifically, the transactions where: the payment credentials were used in an address which controlled at least one of the transaction inputs and/or receives one of the outputs AND the transaction is phase-2 valid, OR, the address controlled at least one of the collateral inputs and/or receives the collateral return output AND the transaction is phase-2 invalid. [Read more](https://docs.cardano.org/plutus/collateral-mechanism/). * @summary Payment credentials transactions * @param {Array<string>} requestBody Payment credentials in bech32 format * @param {TxsByPaymentCredQueryParams} [localVarQueryParameter] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ txsByPaymentCreds(requestBody: Array<string>, queryParams?: TxsByPaymentCredsQueryParams, options?: AxiosRequestConfig): Promise<PaginatedPaymentCredentialTransaction>; /** * Returns references (pair of transaction hash and output index in transaction) for UTxOs controlled by the specified address * @summary UTxO references at an address * @param {string} address Address in bech32 format * @param {UtxoRefsAtAddressQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AddressesApi */ utxoRefsAtAddress(address: string, queryParams?: TxsByPaymentCredQueryParams, options?: AxiosRequestConfig): Promise<PaginatedUtxoRef>; /** * Return detailed information on UTxOs controlled by an address * @summary UTxOs at an address * @param {string} address Address in bech32 format * @param {UtxosByAddressQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AddressesApi */ utxosByAddress(address: string, queryParams?: UtxosByAddressQueryParams, options?: AxiosRequestConfig): Promise<PaginatedUtxoWithSlot>; /** * Return detailed information on UTxOs which are controlled by some address in the specified list of addresses * @summary UTxOs at multiple addresses * @param {Array<string>} requestBody * @param {UtxosByAddressesQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AddressesApi */ utxosByAddresses(requestBody: Array<string>, queryParams?: UtxosByAddressesQueryParams, options?: AxiosRequestConfig): Promise<PaginatedUtxoWithSlot>; /** * Return detailed information on UTxOs controlled by addresses which use the specified payment credential * @summary UTxOs by payment credential * @param {string} credential Payment credential in bech32 format * @param {UtxosByPaymentCredQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AddressesApi */ utxosByPaymentCred(credential: string, queryParams?: UtxosByPaymentCredQueryParams, options?: AxiosRequestConfig): Promise<PaginatedUtxoWithSlot>; /** * Return detailed information on UTxOs which are controlled by some payment creds in the specified list of payment creds * @summary UTxOs at multiple payment creds * @param {Array<string>} requestBody * @param {UtxosByAddressesQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AddressesApi */ utxosByPaymentCreds(requestBody: Array<string>, queryParams?: UtxosByAddressesQueryParams, options?: AxiosRequestConfig): Promise<PaginatedUtxoWithSlot>; } /** * @export */ declare const AssetTxsOrderEnum: { readonly Asc: "asc"; readonly Desc: "desc"; }; type AssetTxsOrderEnum = (typeof AssetTxsOrderEnum)[keyof typeof AssetTxsOrderEnum]; /** * @export */ declare const AssetUpdatesOrderEnum: { readonly Asc: "asc"; readonly Desc: "desc"; }; type AssetUpdatesOrderEnum = (typeof AssetUpdatesOrderEnum)[keyof typeof AssetUpdatesOrderEnum]; /** * @export */ declare const AssetUtxosOrderEnum: { readonly Asc: "asc"; readonly Desc: "desc"; }; type AssetUtxosOrderEnum = (typeof AssetUtxosOrderEnum)[keyof typeof AssetUtxosOrderEnum]; /** * @export */ declare const PolicyTxsOrderEnum: { readonly Asc: "asc"; readonly Desc: "desc"; }; type PolicyTxsOrderEnum = (typeof PolicyTxsOrderEnum)[keyof typeof PolicyTxsOrderEnum]; /** * @export */ declare const PolicyUtxosOrderEnum: { readonly Asc: "asc"; readonly Desc: "desc"; }; type PolicyUtxosOrderEnum = (typeof PolicyUtxosOrderEnum)[keyof typeof PolicyUtxosOrderEnum]; /** * Query parameters for assetAccounts. * @export * @interface AssetAccountsQueryParams * */ interface AssetAccountsQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof AssetAccountsQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof AssetAccountsQueryParams */ cursor?: string | null; } /** * Query parameters for assetAddresses. * @export * @interface AssetAddressesQueryParams * */ interface AssetAddressesQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof AssetAddressesQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof AssetAddressesQueryParams */ cursor?: string | null; } /** * Query parameters for assetTxs. * @export * @interface AssetTxsQueryParams * */ interface AssetTxsQueryParams { /** * Return only transactions after supplied block height * @type {number | null} * @memberof AssetTxsQueryParams */ fromHeight?: number | null; /** * The max number of results per page. * @type {number | null} * @memberof AssetTxsQueryParams */ count?: number | null; /** * The order in which the results are sorted (by block height) * @type {AssetTxsOrderEnum} * @memberof AssetTxsQueryParams */ order?: AssetTxsOrderEnum; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof AssetTxsQueryParams */ cursor?: string | null; } /** * Query parameters for assetUpdates. * @export * @interface AssetUpdatesQueryParams * */ interface AssetUpdatesQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof AssetUpdatesQueryParams */ count?: number | null; /** * The order in which the results are sorted (by block height) * @type {AssetUpdatesOrderEnum} * @memberof AssetUpdatesQueryParams */ order?: AssetUpdatesOrderEnum; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof AssetUpdatesQueryParams */ cursor?: string | null; } /** * Query parameters for assetUtxos. * @export * @interface AssetUtxosQueryParams * */ interface AssetUtxosQueryParams { /** * Return only UTxOs controlled by a specific address (bech32 encoding) * @type {string | null} * @memberof AssetUtxosQueryParams */ address?: string | null; /** * The max number of results per page. * @type {number | null} * @memberof AssetUtxosQueryParams */ count?: number | null; /** * The order in which the results are sorted (by slot at which UTxO was produced) * @type {AssetUtxosOrderEnum} * @memberof AssetUtxosQueryParams */ order?: AssetUtxosOrderEnum; /** * Return only UTxOs created on or after a specific slot * @type {number | null} * @memberof AssetUtxosQueryParams */ from?: number | null; /** * Return only UTxOs created before a specific slot * @type {number | null} * @memberof AssetUtxosQueryParams */ to?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof AssetUtxosQueryParams */ cursor?: string | null; } /** * Query parameters for policyAccounts. * @export * @interface PolicyAccountsQueryParams * */ interface PolicyAccountsQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof PolicyAccountsQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof PolicyAccountsQueryParams */ cursor?: string | null; } /** * Query parameters for policyAddresses. * @export * @interface PolicyAddressesQueryParams * */ interface PolicyAddressesQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof PolicyAddressesQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof PolicyAddressesQueryParams */ cursor?: string | null; } /** * Query parameters for policyInfo. * @export * @interface PolicyInfoQueryParams * */ interface PolicyInfoQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof PolicyInfoQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof PolicyInfoQueryParams */ cursor?: string | null; } /** * Query parameters for policyTxs. * @export * @interface PolicyTxsQueryParams * */ interface PolicyTxsQueryParams { /** * Return only transactions after supplied block height * @type {number | null} * @memberof PolicyTxsQueryParams */ fromHeight?: number | null; /** * The max number of results per page. * @type {number | null} * @memberof PolicyTxsQueryParams */ count?: number | null; /** * The order in which the results are sorted (by block height) * @type {PolicyTxsOrderEnum} * @memberof PolicyTxsQueryParams */ order?: PolicyTxsOrderEnum; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof PolicyTxsQueryParams */ cursor?: string | null; } /** * Query parameters for policyUtxos. * @export * @interface PolicyUtxosQueryParams * */ interface PolicyUtxosQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof PolicyUtxosQueryParams */ count?: number | null; /** * The order in which the results are sorted (by slot at which UTxO was produced) * @type {PolicyUtxosOrderEnum} * @memberof PolicyUtxosQueryParams */ order?: PolicyUtxosOrderEnum; /** * Return only UTxOs created on or after a specific slot * @type {number | null} * @memberof PolicyUtxosQueryParams */ from?: number | null; /** * Return only UTxOs created before a specific slot * @type {number | null} * @memberof PolicyUtxosQueryParams */ to?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof PolicyUtxosQueryParams */ cursor?: string | null; } /** * AssetsApi - object-oriented interface * @export * @class AssetsApi * @extends {BaseAPI} */ declare class AssetsApi extends BaseAPI { /** * Returns a list of accounts (as stake/reward addresses) associated with addresses which control some of the specified asset; in other words, instead of returning the addresses which hold some of the asset, the addresses are merged by their delegation part/account. Assets controlled by Byron, enterprise, or pointer addresses are omitted. CAUTION: An asset being associated with a particular stake account does not necessarily mean the owner of that account controls the asset; use \"asset addresses\" unless you are sure you want to work with stake keys. Read more [here]( https://medium.com/adamant-security/multi-sig-concerns-mangled-addresses-and-the-dangers-of-using-stake-keys-in-your-cardano-project-94894319b1d8). * @summary Accounts of addresses holding specific asset * @param {string} asset Asset, encoded as concatenation of hex of policy ID and asset name * @param {AssetAccountsQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetsApi */ assetAccounts(asset: string, queryParams?: AssetAccountsQueryParams, options?: AxiosRequestConfig): Promise<PaginatedAssetHolderAccount>; /** * Returns a list of addresses which control some amount of the specified asset * @summary Native asset addresses * @param {string} asset Asset, encoded as concatenation of hex of policy ID and asset name * @param {AssetAddressesQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetsApi */ assetAddresses(asset: string, queryParams?: AssetAddressesQueryParams, options?: AxiosRequestConfig): Promise<PaginatedAssetHolder>; /** * Return a summary of information about an asset * @summary Native asset information * @param {string} asset Asset, encoded as concatenation of hex of policy ID and asset name * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetsApi */ assetInfo(asset: string, options?: AxiosRequestConfig): Promise<TimestampedAssetInfo>; /** * Returns a list of transactions in which a transaction input or output contains some of the specified asset * @summary Native asset transactions * @param {string} asset Asset, encoded as concatenation of hex of policy ID and asset name * @param {AssetTxsQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetsApi */ assetTxs(asset: string, queryParams?: AssetTxsQueryParams, options?: AxiosRequestConfig): Promise<PaginatedAssetTx>; /** * Returns a list of transactions in which some of the specified asset was minted or burned * @summary Native asset updates * @param {string} asset Asset, encoded as concatenation of hex of policy ID and asset name * @param {AssetUpdatesQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetsApi */ assetUpdates(asset: string, queryParams?: AssetUpdatesQueryParams, options?: AxiosRequestConfig): Promise<PaginatedMintingTx>; /** * Returns references for UTxOs which contain some of the specified asset, each paired with the amount of the asset contained in the UTxO * @summary Native asset UTxOs * @param {string} asset Asset, encoded as concatenation of hex of policy ID and asset name * @param {AssetUtxosQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetsApi */ assetUtxos(asset: string, queryParams?: AssetUtxosQueryParams, options?: AxiosRequestConfig): Promise<PaginatedAssetUtxo>; /** * Returns a list of accounts (as stake/reward addresses) associated with addresses which control some of an asset of the specified policy; in other words, instead of returning the addresses which hold the assets, the addresses are merged by their delegation part/account. Assets controlled by Byron, enterprise, or pointer addresses are omitted. CAUTION: An asset being associated with a particular stake account does not necessarily mean the owner of that account controls the asset; use \"asset addresses\" unless you are sure you want to work with stake keys. Read more [here]( https://medium.com/adamant-security/multi-sig-concerns-mangled-addresses-and-the-dangers-of-using-stake-keys-in-your-cardano-project-94894319b1d8). * @summary Accounts of addresses holding assets of specific policy * @param {string} policy Hex encoded Policy ID * @param {PolicyAccountsQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetsApi */ policyAccounts(policy: string, queryParams?: PolicyAccountsQueryParams, options?: AxiosRequestConfig): Promise<PaginatedPolicyHolderAccount>; /** * Returns a list of addresses which hold some of an asset of the specified policy ID * @summary Addresses holding assets of specific policy * @param {string} policy Hex encoded Policy ID * @param {PolicyAddressesQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetsApi */ policyAddresses(policy: string, queryParams?: PolicyAddressesQueryParams, options?: AxiosRequestConfig): Promise<PaginatedPolicyHolder>; /** * Returns information about assets of the specified minting policy ID * @summary Information on assets of specific policy * @param {string} policy Hex encoded policy ID * @param {PolicyInfoQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetsApi */ policyInfo(policy: string, queryParams?: PolicyInfoQueryParams, options?: AxiosRequestConfig): Promise<PaginatedAssetInfo>; /** * Returns a list of transactions in which a transaction input or output contains some of at least one asset of the specified minting policy ID * @summary Transactions moving assets of specific policy * @param {string} policy Hex encoded policy ID * @param {PolicyTxsQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetsApi */ policyTxs(policy: string, queryParams?: PolicyTxsQueryParams, options?: AxiosRequestConfig): Promise<PaginatedAssetTx>; /** * Returns UTxO references of UTxOs which contain some of at least one asset of the specified policy ID, each paired with a list of assets of the policy contained in the UTxO and the corresponding amounts * @summary UTxOs containing assets of specific policy * @param {string} policy Hex encoded policy ID * @param {PolicyUtxosQueryParams} [queryParams] Query parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetsApi */ policyUtxos(policy: string, queryParams?: PolicyUtxosQueryParams, options?: AxiosRequestConfig): Promise<PaginatedPolicyUtxo>; } /** * BlocksApi - object-oriented interface * @export * @class BlocksApi * @extends {BaseAPI} */ declare class BlocksApi extends BaseAPI { /** * Returns information about the specified block including more advanced technical properties * @summary Block information * @param {string} hashOrHeight Block height or hex encoded block hash * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlocksApi */ blockInfo(hashOrHeight: string, options?: AxiosRequestConfig): Promise<TimestampedBlockInfo>; /** * Returns information about the latest block * @summary Latest block * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlocksApi */ blockLatest(options?: AxiosRequestConfig): Promise<TimestampedBlockInfo>; } /** * DatumApi - object-oriented interface * @export * @class DatumApi * @extends {BaseAPI} */ declare class DatumApi extends BaseAPI { /** * Returns the datum corresponding to the specified datum hash, if the datum has been seen on-chain * @summary Datum by datum hash * @param {string} datumHash Hex encoded datum hash * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DatumApi */ lookupDatum(datumHash: string, options?: AxiosRequestConfig): Promise<TimestampedDatum>; /** * Returns the datums corresponding to the specified datum hashes, for the datums which have been seen on-chain * @summary Datums by datum hashes * @param {Array<string>} requestBody Array of hex encoded datum hashes * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DatumApi */ lookupDatums(requestBody: Array<string>, options?: AxiosRequestConfig): Promise<TimestampedDatums>; } /** * EcosystemApi - object-oriented interface * @export * @class EcosystemApi * @extends {BaseAPI} */ declare class EcosystemApi extends BaseAPI { /** * Returns the Cardano address corresponding to an ADA Handle * @summary Resolve ADA Handle * @param {string} handle Ada Handle to resolve * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EcosystemApi */ adahandleResolve(handle: string, options?: AxiosRequestConfig): Promise<TimestampedAddress>; } /** * EpochsApi - object-oriented interface * @export * @class EpochsApi * @extends {BaseAPI} */ declare class EpochsApi extends BaseAPI { /** * Returns a summary of information about the current epoch * @summary Current epoch details * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EpochsApi */ currentEpoch(options?: AxiosRequestConfig): Promise<TimestampedCurrentEpochInfo>; /** * Returns a summary of information about a specific epoch * @summary Specific epoch details * @param {number} epochNo Epoch number to return information about * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EpochsApi */ epochInfo(epochNo: number, options?: AxiosRequestConfig): Promise<TimestampedEpochInfo>; } /** * GeneralApi - object-oriented interface * @export * @class GeneralApi * @extends {BaseAPI} */ declare class GeneralApi extends BaseAPI { /** * Returns the identifier of the most recently processed block on the network * @summary Chain tip * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GeneralApi */ chainTip(options?: AxiosRequestConfig): Promise<TimestampedChainTip>; /** * Returns the blockchain era summaries * @summary Era summaries * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GeneralApi */ eraSummaries(options?: AxiosRequestConfig): Promise<TimestampedEraSummaries>; /** * Returns the current blockchain protocol parameters * @summary Protocol parameters * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GeneralApi */ protocolParameters(options?: AxiosRequestConfig): Promise<TimestampedProtocolParameters>; /** * Returns the blockchain system start time * @summary Blockchain system start * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GeneralApi */ systemStart(options?: AxiosRequestConfig): Promise<TimestampedSystemStart>; } /** * @export */ declare const PoolBlocksOrderEnum: { readonly Asc: "asc"; readonly Desc: "desc"; }; type PoolBlocksOrderEnum = (typeof PoolBlocksOrderEnum)[keyof typeof PoolBlocksOrderEnum]; /** * @export */ declare const PoolHistoryOrderEnum: { readonly Asc: "asc"; readonly Desc: "desc"; }; type PoolHistoryOrderEnum = (typeof PoolHistoryOrderEnum)[keyof typeof PoolHistoryOrderEnum]; /** * Query parameters for listPools. * @export * @interface ListPoolsQueryParams * */ interface ListPoolsQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof ListPoolsQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof ListPoolsQueryParams */ cursor?: string | null; } /** * Query parameters for poolBlocks. * @export * @interface PoolBlocksQueryParams * */ interface PoolBlocksQueryParams { /** * Epoch number to fetch results for * @type {number | null} * @memberof PoolBlocksQueryParams */ epochNo?: number | null; /** * The max number of results per page. * @type {number | null} * @memberof PoolBlocksQueryParams */ count?: number | null; /** * The order in which the results are sorted (by block absolute slot) * @type {PoolBlocksOrderEnum} * @memberof PoolBlocksQueryParams */ order?: PoolBlocksOrderEnum; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof PoolBlocksQueryParams */ cursor?: string | null; } /** * Query parameters for poolDelegators. * @export * @interface PoolDelegatorsQueryParams * */ interface PoolDelegatorsQueryParams { /** * The max number of results per page. * @type {number | null} * @memberof PoolDelegatorsQueryParams */ count?: number | null; /** * Pagination cursor string, use the cursor included in a page of results to fetch the next page. * @type {string | null} * @memberof PoolDelegatorsQueryParams */ cursor?: string | null; } /** * Query parameters for poolHistory. * @export * @interface PoolHistoryQueryParams * */ interface PoolHistoryQueryParams { /** * Epoch number to fetch results for * @type {number | null} * @memberof PoolHistoryQueryParams