UNPKG

blockfrost-js-ratelimited

Version:

A JavaScript/TypeScript SDK for interacting with the https://blockfrost.io API

735 lines (733 loc) 18.1 kB
import { AxiosInstance } from 'axios'; import { getAccount } from './account'; import { accounts, accountsDelegations, accountsDelegationsAll, accountsRegistrations, accountsRegistrationsAll, accountsRewards, accountsRewardsAll, accountsHistory, accountsHistoryAll, accountsWithdrawals, accountsWithdrawalsAll, accountsMirs, accountsMirsAll, accountsAddresses, accountsAddressesAll, accountsAddressesAssets, accountsAddressesAssetsAll } from './endpoints/api/accounts'; import { addresses, addressesTotal, addressesTransactions, addressesTransactionsAll, addressesUtxos, addressesUtxosAll } from './endpoints/api/addresses'; import { assets, assetsById, assetsHistory, assetsHistoryAll, assetsTransactions, assetsAddresses, assetsPolicyById, assetsPolicyByIdAll } from './endpoints/api/assets'; import { blocks, blocksLatest, blocksLatestTxs, blocksLatestTxsAll, blocksNext, blocksPrevious, blocksTxs, blocksTxsAll } from './endpoints/api/blocks'; import { epochs, epochsBlocks, epochsBlocksByPoolId, epochsLatest, epochsNext, epochsParameters, epochsPrevious, epochsStakes, epochsStakesByPoolId } from './endpoints/api/epochs'; import { pools, poolMetadata, poolsById, poolsByIdBlocks, poolsByIdDelegators, poolsByIdHistory, poolsByIdRelays, poolsByIdUpdates, poolsRetired, poolsRetiring } from './endpoints/api/pools'; import { genesis } from './endpoints/api/ledger'; import { root } from './endpoints/api/root'; import { metadataTxsLabel, metadataTxsLabelCbor, metadataTxsLabels } from './endpoints/api/metadata'; import { health, healthClock } from './endpoints/api/health'; import { metrics, metricsEndpoints } from './endpoints/api/metrics'; import { txs, txsDelegations, txsMetadataCbor, txsPoolRetires, txsPoolUpdates, txsStakes, txsUtxos, txsWithdrawals, txsMirs, txsMetadata, txsRedeemers, txSubmit } from './endpoints/api/txs'; import { scripts, script, scriptDatum, scriptRedeemers, scriptJson, scriptCbor } from './endpoints/api/scripts'; import { nutlinkAddress, nutlinkAddressTicker, nutlinkAddressTickers, nutlinkAddressTickersAll, nutlinkAddressTickerAll, nutlinkTickers, nutlinkTickersAll } from './endpoints/api/nutlink'; import { network } from './endpoints/api/network'; import { Options, ValidatedOptions } from './types'; declare class BlockFrostAPI { apiUrl: string; projectId?: string; userAgent?: string; options: ValidatedOptions; axiosInstance: AxiosInstance; constructor(options?: Options); /** * accounts - Obtain information about a specific stake account. * * @param stakeAddress - Bech32 stake address * @returns Information about a specific stake account. * */ accounts: typeof accounts; /** * accountsDelegations - Obtain information about the delegation of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the delegation of a specific account. * */ accountsDelegations: typeof accountsDelegations; /** * accountsDelegationsAll - Obtain information about all delegations of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the delegation of a specific account. * */ accountsDelegationsAll: typeof accountsDelegationsAll; /** * accountsRegistrations - Obtain information about the registrations and deregistrations of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the registrations and deregistrations of a specific account. * */ accountsRegistrations: typeof accountsRegistrations; /** * accountsRegistrationsAll - Obtain information about all registrations and deregistrations of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the registrations and deregistrations of a specific account. * */ accountsRegistrationsAll: typeof accountsRegistrationsAll; /** * accountsRewards - Obtain information about the history of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the history of a specific account. * */ accountsRewards: typeof accountsRewards; /** * accountsRewardsAll - Obtain information about whole history of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the history of a specific account. * */ accountsRewardsAll: typeof accountsRewardsAll; /** * accountsHistory - Obtain information about the history of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the history of a specific account. * */ accountsHistory: typeof accountsHistory; /** * accountsHistoryAll - Obtain information about whole history of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the history of a specific account. * */ accountsHistoryAll: typeof accountsHistoryAll; /** * accountsWithdrawals - Obtain information about the withdrawals of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the withdrawals of a specific account. * */ accountsWithdrawals: typeof accountsWithdrawals; /** * accountsWithdrawalsAll - Obtain information about all withdrawals of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the withdrawals of a specific account. * */ accountsWithdrawalsAll: typeof accountsWithdrawalsAll; /** * accountsMirs - Obtain information about the MIRs of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the MIRs of a specific account. * */ accountsMirs: typeof accountsMirs; /** * accountsMirsAll - Obtain information about all MIRs of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the MIRs of a specific account. * */ accountsMirsAll: typeof accountsMirsAll; /** * accountsAddresses - Obtain information about the addresses of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the addresses of a specific account. * */ accountsAddresses: typeof accountsAddresses; /** * accountsAddressesAll - Obtain information about all addresses of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Information about the addresses of a specific account. * */ accountsAddressesAll: typeof accountsAddressesAll; /** * accountsAddressesAssets - Obtain information about assets associated with addresses of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Assets associated with the account addresses * */ accountsAddressesAssets: typeof accountsAddressesAssets; /** * accountsAddressesAssets - Obtain information about assets associated with addresses of a specific account. * * @param stakeAddress - Bech32 stake address * @returns Assets associated with the account addresses * */ accountsAddressesAssetsAll: typeof accountsAddressesAssetsAll; /** * assets - List of assets. * * @returns List of assets. * */ assets: typeof assets; /** * assetsById - Information about a specific asset. * * @param asset - Concatenation of the policy_id and hex-encoded asset_name * @returns Information about a specific asset. * */ assetsById: typeof assetsById; /** * assetsHistory - History of a specific asset. * * @param asset - Concatenation of the policy_id and hex-encoded asset_name * @returns History of a specific asset. * */ assetsHistory: typeof assetsHistory; /** * assetsHistoryAll - Whole history of a specific asset. * * @param asset - Concatenation of the policy_id and hex-encoded asset_name * @returns History of a specific asset. * */ assetsHistoryAll: typeof assetsHistoryAll; /** * assetsTransactions - List of a specific asset transactions. * * @param asset - Concatenation of the policy_id and hex-encoded asset_name * @returns List of a specific asset transactions. * */ assetsTransactions: typeof assetsTransactions; /** * assetsAddresses - List of a addresses containing a specific asset. * * @param asset - Concatenation of the policy_id and hex-encoded asset_name * @returns List of a addresses containing a specific asset. * */ assetsAddresses: typeof assetsAddresses; /** * assetsPolicyById - List of asset minted under a specific policy. * * @param policyId - Specific policy_id * @returns List of asset minted under a specific policy. * */ assetsPolicyById: typeof assetsPolicyById; /** * assetsPolicyByIdAll - List of all assets minted under a specific policy. * * @param policyId - Specific policy_id * @returns List of asset minted under a specific policy. * */ assetsPolicyByIdAll: typeof assetsPolicyByIdAll; /** * addresses * * @param address * @returns xxx * */ addresses: typeof addresses; /** * addressesTotal * * @param address * @returns xxx * */ addressesTotal: typeof addressesTotal; /** * addressesTransactions * * @param address * @returns xxx * */ addressesTransactions: typeof addressesTransactions; /** * addressesTransactionsAll * * @param address * @returns xxx * */ addressesTransactionsAll: typeof addressesTransactionsAll; /** * addressesUtxos * * @param address * @returns xxx * */ addressesUtxos: typeof addressesUtxos; /** * addressesUtxosAll * * @param address * @returns xxx * */ addressesUtxosAll: typeof addressesUtxosAll; /** * addressesUtxos * * @param address * @returns xxx * */ blocks: typeof blocks; /** * blocksLatest * * @returns xxx * */ blocksLatest: typeof blocksLatest; blocksLatestTxs: typeof blocksLatestTxs; blocksLatestTxsAll: typeof blocksLatestTxsAll; /** * blocksNext * * @param address * @returns xxx * */ blocksNext: typeof blocksNext; /** * blockPrevious * * @param address * @returns xxx * */ blocksPrevious: typeof blocksPrevious; /** * addressesUtxos * * @param blocksTxs * @returns xxx * */ blocksTxs: typeof blocksTxs; /** * blocksTxsAll * * @param blocksTxsAll * @returns xxx * */ blocksTxsAll: typeof blocksTxsAll; /** * epochs * * @param number * @returns xxx * */ epochs: typeof epochs; /** * epochsBlocks * * @param number * @returns xxx * */ epochsBlocks: typeof epochsBlocks; /** * epochsBlocksByPoolId * * @param blocksTxs * @returns xxx * */ epochsBlocksByPoolId: typeof epochsBlocksByPoolId; /** * epochsLatest * * @returns xxx * */ epochsLatest: typeof epochsLatest; /** * epochsNext * * @param number * @returns xxx * */ epochsNext: typeof epochsNext; /** * epochsParameters * * @param number * @returns xxx * */ epochsParameters: typeof epochsParameters; /** * epochsPrevious * * @param number * @returns xxx * */ epochsPrevious: typeof epochsPrevious; /** * epochsStakes * * @param number * @returns xxx * */ epochsStakes: typeof epochsStakes; /** * epochsStakesByPoolId * * @param number * @returns xxx * */ epochsStakesByPoolId: typeof epochsStakesByPoolId; /** * health * * @returns xxx * */ health: typeof health; /** * healthClock * * @returns xxx * */ healthClock: typeof healthClock; /** * ledger * * @returns xxx * */ genesis: typeof genesis; /** * metadataTxsLabel * * @param label * @returns xxx * */ metadataTxsLabel: typeof metadataTxsLabel; /** * metadataTxsLabelCbor * * @param label * @returns xxx * */ metadataTxsLabelCbor: typeof metadataTxsLabelCbor; /** * metadataTxsLabels * * @returns xxx * */ metadataTxsLabels: typeof metadataTxsLabels; /** * metrics * * @returns xxx * */ metrics: typeof metrics; /** * metricsEndpoints * * @returns xxx * */ metricsEndpoints: typeof metricsEndpoints; /** * nutlinkAddress * * @returns xxx * */ nutlinkAddress: typeof nutlinkAddress; /** * nutlinkAddressTicker * * @returns xxx * */ nutlinkAddressTicker: typeof nutlinkAddressTicker; /** * nutlinkAddressTickers * * @returns xxx * */ nutlinkAddressTickers: typeof nutlinkAddressTickers; /** * nutlinkAddressTickersAll * * @returns xxx * */ nutlinkAddressTickersAll: typeof nutlinkAddressTickersAll; /** * nutlinkAddressTickerAll * * @returns xxx * */ nutlinkAddressTickerAll: typeof nutlinkAddressTickerAll; /** * nutlinkTickers * * @returns xxx * */ nutlinkTickers: typeof nutlinkTickers; /** * nutlinkTickersAll * * @returns xxx * */ nutlinkTickersAll: typeof nutlinkTickersAll; /** * pools * * @returns xxx * */ pools: typeof pools; /** * poolMetadata * * @param poolId * @returns xxx * */ poolMetadata: typeof poolMetadata; /** * poolsById * * @param poolId * @returns xxx * */ poolsById: typeof poolsById; /** * poolsByIdBlocks * * @param poolId * @returns xxx * */ poolsByIdBlocks: typeof poolsByIdBlocks; /** * poolsByIdDelegators * * @param poolId * @returns xxx * */ poolsByIdDelegators: typeof poolsByIdDelegators; /** * poolsByIdHistory * * @param poolId * @returns xxx * */ poolsByIdHistory: typeof poolsByIdHistory; /** * poolsByIdRelays * * @param poolId * @returns xxx * */ poolsByIdRelays: typeof poolsByIdRelays; /** * poolsByIdUpdates * * @param poolId * @returns xxx * */ poolsByIdUpdates: typeof poolsByIdUpdates; /** * poolsRetired * * @returns xxx * */ poolsRetired: typeof poolsRetired; /** * poolsRetiring * * @returns xxx * */ poolsRetiring: typeof poolsRetiring; /** * root * * @returns xxx * */ root: typeof root; /** * List scripts * * @returns List of script hashes * */ scripts: typeof scripts; /** * Information about a specific script * * @returns Information about a specific script * */ script: typeof script; /** * */ scriptJson: typeof scriptJson; /** * */ scriptCbor: typeof scriptCbor; /** * */ scriptDatum: typeof scriptDatum; /** * List of redeemers of a specific script * * @returns List the information about redeemers of a specific script * */ scriptRedeemers: typeof scriptRedeemers; /** * txs * * @param hash * @returns xxx * */ txs: typeof txs; /** * txsMetadataCbor * * @param hash * @returns xxx * */ txsMetadataCbor: typeof txsMetadataCbor; /** * txsDelegations * * @param hash * @returns xxx * */ txsDelegations: typeof txsDelegations; /** * txsPoolRetires * * @param hash * @returns xxx * */ txsPoolRetires: typeof txsPoolRetires; /** * txsPoolUpdates * * @param hash * @returns xxx * */ txsPoolUpdates: typeof txsPoolUpdates; /** * txsStakes * * @param hash * @returns xxx * */ txsStakes: typeof txsStakes; /** * txsUtxos * * @param hash * @returns xxx * */ txsUtxos: typeof txsUtxos; /** * txsWithdrawals * * @param hash * @returns xxx * */ txsWithdrawals: typeof txsWithdrawals; /** * txsMirs * * @param hash * @returns xxx * */ txsMirs: typeof txsMirs; /** * txsMetadata * * @param hash * @returns xxx * */ txsMetadata: typeof txsMetadata; txsRedeemers: typeof txsRedeemers; /** * txSubmit * * @param hash * @returns xxx * */ txSubmit: typeof txSubmit; /** * deriveAddress * * @param hash * @returns xxx * */ deriveAddress: (publicKey: string, addressIndex: number, type: 0 | 1) => { address: string; path: string; }; /** * txSubmit * * @param hash * @returns xxx * */ getAccount: typeof getAccount; /** * network * * @returns Detailed network information. * */ network: typeof network; } export { BlockFrostAPI };