@aeternity/aepp-sdk
Version:
SDK for the æternity blockchain
426 lines (425 loc) • 25.2 kB
TypeScript
import * as coreClient from "@azure/core-client";
import { MiddlewareOptionalParams, GetAccountActivitiesOptionalParams, GetAccountActivitiesResponse, GetAex141OwnedTokensOptionalParams, GetAex141OwnedTokensResponse, GetAex9AccountBalancesOptionalParams, GetAex9AccountBalancesResponse, GetAccountDexSwapsOptionalParams, GetAccountDexSwapsResponse, GetAccountNameClaimsOptionalParams, GetAccountNameClaimsResponse, GetAccountPointeesOptionalParams, GetAccountPointeesResponse, GetAccountTransactionsCountOptionalParams, GetAccountTransactionsCountResponse, GetSortedAex141ContractsOptionalParams, GetSortedAex141ContractsResponse, GetAex141ContractTemplatesOptionalParams, GetAex141ContractTemplatesResponse, GetAex141TemplateTokensOptionalParams, GetAex141TemplateTokensResponse, GetAex141ContractTokensOptionalParams, GetAex141ContractTokensResponse, GetAex141TokenOwnerOptionalParams, GetAex141TokenOwnerResponse, GetAex141ContractTransfersOptionalParams, GetAex141ContractTransfersResponse, GetAex141ByContractOptionalParams, GetAex141ByContractResponse, GetSortedAex9TokensOptionalParams, GetSortedAex9TokensResponse, GetAex9TokensCountOptionalParams, GetAex9TokensCountResponse, GetAex9ContractBalancesOptionalParams, GetAex9ContractBalancesResponse, GetAex9ContractAccountBalanceOptionalParams, GetAex9ContractAccountBalanceResponse, GetAex9ContractAccountBalanceHistoryOptionalParams, GetAex9ContractAccountBalanceHistoryResponse, GetAex9ByContractOptionalParams, GetAex9ByContractResponse, GetChannelsOptionalParams, GetChannelsResponse, GetChannelOptionalParams, GetChannelResponse, GetContractCallsOptionalParams, GetContractCallsResponse, GetContractLogsOptionalParams, GetContractLogsResponse, GetContractOptionalParams, GetContractResponse, GetDexSwapsOptionalParams, GetDexSwapsResponse, GetDexSwapsByContractIdOptionalParams, GetDexSwapsByContractIdResponse, GetEpochsOptionalParams, GetEpochsResponse, GetEpochTopOptionalParams, GetEpochTopResponse, GetSchedulesOptionalParams, GetSchedulesResponse, GetScheduleOptionalParams, GetScheduleResponse, GetValidatorsOptionalParams, GetValidatorsResponse, GetValidatorOptionalParams, GetValidatorResponse, GetValidatorDelegatesOptionalParams, GetValidatorDelegatesResponse, GetTopValidatorDelegatesOptionalParams, GetTopValidatorDelegatesResponse, GetKeyBlocksOptionalParams, GetKeyBlocksResponse, GetKeyBlockOptionalParams, GetKeyBlockResponse, GetKeyBlockMicroBlocksOptionalParams, GetKeyBlockMicroBlocksResponse, GetMicroBlockOptionalParams, GetMicroBlockResponse, GetMicroBlockTransactionsOptionalParams, GetMicroBlockTransactionsResponse, GetNamesOptionalParams, GetNamesResponse, GetNamesAuctionsOptionalParams, GetNamesAuctionsResponse, GetNameAuctionOptionalParams, GetNameAuctionResponse, GetNameAuctionClaimsOptionalParams, GetNameAuctionClaimsResponse, GetNamesCountOptionalParams, GetNamesCountResponse, GetNameOptionalParams, GetNameResponse, GetNameClaimsOptionalParams, GetNameClaimsResponse, GetNameTransfersOptionalParams, GetNameTransfersResponse, GetNameUpdatesOptionalParams, GetNameUpdatesResponse, GetOraclesOptionalParams, GetOraclesResponse, GetOracleOptionalParams, GetOracleResponse, GetOracleExtendsOptionalParams, GetOracleExtendsResponse, GetOracleQueriesOptionalParams, GetOracleQueriesResponse, GetOracleResponsesOptionalParams, GetOracleResponsesResponse, GetStatsOptionalParams, GetStatsResponse, GetActiveAccountsStatsOptionalParams, GetActiveAccountsStatsResponse, GetAex9TransfersStatsOptionalParams, GetAex9TransfersStatsResponse, GetBlocksStatsOptionalParams, GetBlocksStatsResponse, GetContractsStatsOptionalParams, GetContractsStatsResponse, GetDeltaStatsOptionalParams, GetDeltaStatsResponse, GetDifficultyStatsOptionalParams, GetDifficultyStatsResponse, GetHashrateStatsOptionalParams, GetHashrateStatsResponse, GetMinerStatsOptionalParams, GetMinerStatsResponse, GetNamesStatsOptionalParams, GetNamesStatsResponse, GetTotalStatsOptionalParams, GetTotalStatsResponse, GetTotalAccountsStatsOptionalParams, GetTotalAccountsStatsResponse, GetTransactionsStatsOptionalParams, GetTransactionsStatsResponse, GetStatusOptionalParams, GetStatusResponse, GetTransactionsOptionalParams, GetTransactionsResponse, GetTransactionsCountOptionalParams, GetTransactionsCountResponse, GetPendingTransactionsOptionalParams, GetPendingTransactionsResponse, GetPendingTransactionsCountOptionalParams, GetPendingTransactionsCountResponse, GetTransactionOptionalParams, GetTransactionResponse, GetTransfersOptionalParams, GetTransfersResponse } from "./models/index.js";
export declare class Middleware extends coreClient.ServiceClient {
readonly $host: string;
/**
* Initializes a new instance of the Middleware class.
* @param $host server parameter
* @param options The parameter options
*/
constructor($host: string, options?: MiddlewareOptionalParams);
/**
* Get an account activities.
* @param accountId The account address Account address
* @param options The options parameters.
*/
getAccountActivities(accountId: `ak_${string}`, options?: GetAccountActivitiesOptionalParams): Promise<GetAccountActivitiesResponse>;
/**
* Get tokens owned by an account.
* @param accountId The account id Account address
* @param options The options parameters.
*/
getAex141OwnedTokens(accountId: `ak_${string}`, options?: GetAex141OwnedTokensOptionalParams): Promise<GetAex141OwnedTokensResponse>;
/**
* Get all AEX9 balances for an account on the last block.
* @param accountId Account id Account address
* @param options The options parameters.
*/
getAex9AccountBalances(accountId: `ak_${string}`, options?: GetAex9AccountBalancesOptionalParams): Promise<GetAex9AccountBalancesResponse>;
/**
* Get DEX swap tokens
* @param accountId The account id Account address
* @param options The options parameters.
*/
getAccountDexSwaps(accountId: `ak_${string}`, options?: GetAccountDexSwapsOptionalParams): Promise<GetAccountDexSwapsResponse>;
/**
* Get all name claims of an account
* @param accountId The account that made the claims Account address
* @param options The options parameters.
*/
getAccountNameClaims(accountId: `ak_${string}`, options?: GetAccountNameClaimsOptionalParams): Promise<GetAccountNameClaimsResponse>;
/**
* Get account pointees
* @param accountId The account that names point to Account address
* @param options The options parameters.
*/
getAccountPointees(accountId: `ak_${string}`, options?: GetAccountPointeesOptionalParams): Promise<GetAccountPointeesResponse>;
/**
* Get transactions count and its type for given aeternity ID.
* @param accountId The ID of the address/name/oracle/etc Account address
* @param options The options parameters.
*/
getAccountTransactionsCount(accountId: `ak_${string}`, options?: GetAccountTransactionsCountOptionalParams): Promise<GetAccountTransactionsCountResponse>;
/**
* Get AEX141 contracts sorted by creation time, name or symbol.
* @param options The options parameters.
*/
getSortedAex141Contracts(options?: GetSortedAex141ContractsOptionalParams): Promise<GetSortedAex141ContractsResponse>;
/**
* Get templates AEX-141 contract tokens.
* @param contractId The contract id Contract address
* @param options The options parameters.
*/
getAex141ContractTemplates(contractId: `ct_${string}`, options?: GetAex141ContractTemplatesOptionalParams): Promise<GetAex141ContractTemplatesResponse>;
/**
* Get AEX-141 template tokens.
* @param contractId Contract id Contract address
* @param templateId Template id
* @param options The options parameters.
*/
getAex141TemplateTokens(contractId: `ct_${string}`, templateId: number, options?: GetAex141TemplateTokensOptionalParams): Promise<GetAex141TemplateTokensResponse>;
/**
* Get owners of tokens of a AEX-141 contract.
* @param contractId The contract id Contract address
* @param options The options parameters.
*/
getAex141ContractTokens(contractId: `ct_${string}`, options?: GetAex141ContractTokensOptionalParams): Promise<GetAex141ContractTokensResponse>;
/**
* Get owner of a NFT (AEX-141 token).
* @param contractId The contract id Contract address
* @param tokenId The nft token id
* @param options The options parameters.
*/
getAex141TokenOwner(contractId: `ct_${string}`, tokenId: number, options?: GetAex141TokenOwnerOptionalParams): Promise<GetAex141TokenOwnerResponse>;
/**
* Get AEX-141 transfers on a contract.
* @param contractId Contract id Contract address
* @param options The options parameters.
*/
getAex141ContractTransfers(contractId: `ct_${string}`, options?: GetAex141ContractTransfersOptionalParams): Promise<GetAex141ContractTransfersResponse>;
/**
* Get AEX141 contract meta-info, extensions, limits and stats.
* @param id The contract id Contract address
* @param options The options parameters.
*/
getAex141ByContract(id: `ct_${string}`, options?: GetAex141ByContractOptionalParams): Promise<GetAex141ByContractResponse>;
/**
* Get AEX9 tokens sorted by creation time, name or symbol.
* @param options The options parameters.
*/
getSortedAex9Tokens(options?: GetSortedAex9TokensOptionalParams): Promise<GetSortedAex9TokensResponse>;
/**
* Get AEX9 tokens count.
* @param options The options parameters.
*/
getAex9TokensCount(options?: GetAex9TokensCountOptionalParams): Promise<GetAex9TokensCountResponse>;
/**
* Get AEX9 balances on a contract.
* @param contractId Contract id Contract address
* @param options The options parameters.
*/
getAex9ContractBalances(contractId: `ct_${string}`, options?: GetAex9ContractBalancesOptionalParams): Promise<GetAex9ContractBalancesResponse>;
/**
* Get AEX9 balance for an account on a contract.
* @param contractId Contract id Contract address
* @param accountId Account id Account address
* @param options The options parameters.
*/
getAex9ContractAccountBalance(contractId: `ct_${string}`, accountId: `ak_${string}`, options?: GetAex9ContractAccountBalanceOptionalParams): Promise<GetAex9ContractAccountBalanceResponse>;
/**
* Get AEX9 account balance on a contract throughout all heights when changed.
* @param contractId Contract id Contract address
* @param accountId Account id Account address
* @param options The options parameters.
*/
getAex9ContractAccountBalanceHistory(contractId: `ct_${string}`, accountId: `ak_${string}`, options?: GetAex9ContractAccountBalanceHistoryOptionalParams): Promise<GetAex9ContractAccountBalanceHistoryResponse>;
/**
* Get AEX9 creation and meta_info information by contract id.
* @param id The contract id Contract address
* @param options The options parameters.
*/
getAex9ByContract(id: `ct_${string}`, options?: GetAex9ByContractOptionalParams): Promise<GetAex9ByContractResponse>;
/**
* Get multiple channels.
* @param options The options parameters.
*/
getChannels(options?: GetChannelsOptionalParams): Promise<GetChannelsResponse>;
/**
* Get a single channel.
* @param id The channel Channel ID
* @param options The options parameters.
*/
getChannel(id: `ch_${string}`, options?: GetChannelOptionalParams): Promise<GetChannelResponse>;
/**
* Get contract calls.
* @param options The options parameters.
*/
getContractCalls(options?: GetContractCallsOptionalParams): Promise<GetContractCallsResponse>;
/**
* Get contract logs.
* @param options The options parameters.
*/
getContractLogs(options?: GetContractLogsOptionalParams): Promise<GetContractLogsResponse>;
/**
* Gets contract creation info.
* @param id Contract that emitted the logs Contract address
* @param options The options parameters.
*/
getContract(id: `ct_${string}`, options?: GetContractOptionalParams): Promise<GetContractResponse>;
/**
* Get DEX swap tokens
* @param options The options parameters.
*/
getDexSwaps(options?: GetDexSwapsOptionalParams): Promise<GetDexSwapsResponse>;
/**
* Get DEX swap tokens
* @param contractId The contract id Contract address
* @param options The options parameters.
*/
getDexSwapsByContractId(contractId: `ct_${string}`, options?: GetDexSwapsByContractIdOptionalParams): Promise<GetDexSwapsByContractIdResponse>;
/**
* Get Epoch information
* @param options The options parameters.
*/
getEpochs(options?: GetEpochsOptionalParams): Promise<GetEpochsResponse>;
/**
* Get Top Epoch information
* @param options The options parameters.
*/
getEpochTop(options?: GetEpochTopOptionalParams): Promise<GetEpochTopResponse>;
/**
* Get Schedule information
* @param options The options parameters.
*/
getSchedules(options?: GetSchedulesOptionalParams): Promise<GetSchedulesResponse>;
/**
* Get Schedule information
* @param height Schedule height
* @param options The options parameters.
*/
getSchedule(height: number, options?: GetScheduleOptionalParams): Promise<GetScheduleResponse>;
/**
* Get Validators information
* @param options The options parameters.
*/
getValidators(options?: GetValidatorsOptionalParams): Promise<GetValidatorsResponse>;
/**
* Get Validator information
* @param validator Validator address Account address
* @param options The options parameters.
*/
getValidator(validator: `ak_${string}`, options?: GetValidatorOptionalParams): Promise<GetValidatorResponse>;
/**
* Get Delegates information for validator
* @param validator Validator address Account address
* @param options The options parameters.
*/
getValidatorDelegates(validator: `ak_${string}`, options?: GetValidatorDelegatesOptionalParams): Promise<GetValidatorDelegatesResponse>;
/**
* Get top Delegates information for validator
* @param validator Validator address Account address
* @param options The options parameters.
*/
getTopValidatorDelegates(validator: `ak_${string}`, options?: GetTopValidatorDelegatesOptionalParams): Promise<GetTopValidatorDelegatesResponse>;
/**
* Get multiple key blocks.
* @param options The options parameters.
*/
getKeyBlocks(options?: GetKeyBlocksOptionalParams): Promise<GetKeyBlocksResponse>;
/**
* Get a single key block.
* @param hashOrKbi The key block encoded hash or key block index
* @param options The options parameters.
*/
getKeyBlock(hashOrKbi: `kh_${string}` | number, options?: GetKeyBlockOptionalParams): Promise<GetKeyBlockResponse>;
/**
* Get the key block micro blocks.
* @param hashOrKbi The key block encoded hash or key block index
* @param options The options parameters.
*/
getKeyBlockMicroBlocks(hashOrKbi: `kh_${string}` | number, options?: GetKeyBlockMicroBlocksOptionalParams): Promise<GetKeyBlockMicroBlocksResponse>;
/**
* Get a micro block
* @param hash The micro block encoded hash Micro block hash
* @param options The options parameters.
*/
getMicroBlock(hash: `mh_${string}`, options?: GetMicroBlockOptionalParams): Promise<GetMicroBlockResponse>;
/**
* Get a micro block transactions
* @param hash The micro block encoded hash Micro block hash
* @param options The options parameters.
*/
getMicroBlockTransactions(hash: `mh_${string}`, options?: GetMicroBlockTransactionsOptionalParams): Promise<GetMicroBlockTransactionsResponse>;
/**
* Get multiple names.
* @param options The options parameters.
*/
getNames(options?: GetNamesOptionalParams): Promise<GetNamesResponse>;
/**
* Get multiple names.
* @param options The options parameters.
*/
getNamesAuctions(options?: GetNamesAuctionsOptionalParams): Promise<GetNamesAuctionsResponse>;
/**
* Get name auction
* @param id The name
* @param options The options parameters.
*/
getNameAuction(id: `${string}.chain` | `nm_${string}`, options?: GetNameAuctionOptionalParams): Promise<GetNameAuctionResponse>;
/**
* Get name auction claims
* @param id The name
* @param options The options parameters.
*/
getNameAuctionClaims(id: `${string}.chain` | `nm_${string}`, options?: GetNameAuctionClaimsOptionalParams): Promise<GetNameAuctionClaimsResponse>;
/**
* Get the total number of active names.
* @param options The options parameters.
*/
getNamesCount(options?: GetNamesCountOptionalParams): Promise<GetNamesCountResponse>;
/**
* Get a single name.
* @param id The name
* @param options The options parameters.
*/
getName(id: `${string}.chain` | `nm_${string}`, options?: GetNameOptionalParams): Promise<GetNameResponse>;
/**
* Get name claims
* @param id The name or name hash
* @param options The options parameters.
*/
getNameClaims(id: `${string}.chain` | `nm_${string}`, options?: GetNameClaimsOptionalParams): Promise<GetNameClaimsResponse>;
/**
* Get name transfers
* @param id The name or name hash
* @param options The options parameters.
*/
getNameTransfers(id: `${string}.chain` | `nm_${string}`, options?: GetNameTransfersOptionalParams): Promise<GetNameTransfersResponse>;
/**
* Get name updates
* @param id The name or name hash
* @param options The options parameters.
*/
getNameUpdates(id: `${string}.chain` | `nm_${string}`, options?: GetNameUpdatesOptionalParams): Promise<GetNameUpdatesResponse>;
/**
* Get multiple oracles.
* @param options The options parameters.
*/
getOracles(options?: GetOraclesOptionalParams): Promise<GetOraclesResponse>;
/**
* Get a single oracle.
* @param id The oracle Oracle address
* @param options The options parameters.
*/
getOracle(id: `ok_${string}`, options?: GetOracleOptionalParams): Promise<GetOracleResponse>;
/**
* Get an oracle's extensions.
* @param id The oracle Oracle address
* @param options The options parameters.
*/
getOracleExtends(id: `ok_${string}`, options?: GetOracleExtendsOptionalParams): Promise<GetOracleExtendsResponse>;
/**
* Get an oracle's queries.
* @param id The oracle Oracle address
* @param options The options parameters.
*/
getOracleQueries(id: `ok_${string}`, options?: GetOracleQueriesOptionalParams): Promise<GetOracleQueriesResponse>;
/**
* Get an oracle's responses.
* @param id The oracle Oracle address
* @param options The options parameters.
*/
getOracleResponses(id: `ok_${string}`, options?: GetOracleResponsesOptionalParams): Promise<GetOracleResponsesResponse>;
/**
* Get stats.
* @param options The options parameters.
*/
getStats(options?: GetStatsOptionalParams): Promise<GetStatsResponse>;
/**
* Get active accounts stats.
* @param options The options parameters.
*/
getActiveAccountsStats(options?: GetActiveAccountsStatsOptionalParams): Promise<GetActiveAccountsStatsResponse>;
/**
* Get total AEx9 token transfers.
* @param options The options parameters.
*/
getAex9TransfersStats(options?: GetAex9TransfersStatsOptionalParams): Promise<GetAex9TransfersStatsResponse>;
/**
* Get total blocks count stats.
* @param options The options parameters.
*/
getBlocksStats(options?: GetBlocksStatsOptionalParams): Promise<GetBlocksStatsResponse>;
/**
* Get the created contracts count per interval.
* @param options The options parameters.
*/
getContractsStats(options?: GetContractsStatsOptionalParams): Promise<GetContractsStatsResponse>;
/**
* Get delta stats.
* @param options The options parameters.
*/
getDeltaStats(options?: GetDeltaStatsOptionalParams): Promise<GetDeltaStatsResponse>;
/**
* Get total blocks difficulty stats.
* @param options The options parameters.
*/
getDifficultyStats(options?: GetDifficultyStatsOptionalParams): Promise<GetDifficultyStatsResponse>;
/**
* Get total blocks hashrate stats.
* @param options The options parameters.
*/
getHashrateStats(options?: GetHashrateStatsOptionalParams): Promise<GetHashrateStatsResponse>;
/**
* Get miners list with total rewards obtained through mining.
* @param options The options parameters.
*/
getMinerStats(options?: GetMinerStatsOptionalParams): Promise<GetMinerStatsResponse>;
/**
* Get total names count stats.
* @param options The options parameters.
*/
getNamesStats(options?: GetNamesStatsOptionalParams): Promise<GetNamesStatsResponse>;
/**
* Get total accumulated stats.
* @param options The options parameters.
*/
getTotalStats(options?: GetTotalStatsOptionalParams): Promise<GetTotalStatsResponse>;
/**
* Get total accounts created per interval stats.
* @param options The options parameters.
*/
getTotalAccountsStats(options?: GetTotalAccountsStatsOptionalParams): Promise<GetTotalAccountsStatsResponse>;
/**
* Get total transactions count stats.
* @param options The options parameters.
*/
getTransactionsStats(options?: GetTransactionsStatsOptionalParams): Promise<GetTransactionsStatsResponse>;
/**
* Gets the current syncing status of both middleware and the node
* @param options The options parameters.
*/
getStatus(options?: GetStatusOptionalParams): Promise<GetStatusResponse>;
/**
* Get multiple transactions.
* @param options The options parameters.
*/
getTransactions(options?: GetTransactionsOptionalParams): Promise<GetTransactionsResponse>;
/**
* Get count of transactions at the latest height.
* @param options The options parameters.
*/
getTransactionsCount(options?: GetTransactionsCountOptionalParams): Promise<GetTransactionsCountResponse>;
/**
* Get pending transactions.
* @param options The options parameters.
*/
getPendingTransactions(options?: GetPendingTransactionsOptionalParams): Promise<GetPendingTransactionsResponse>;
/**
* Get count of pending transactions.
* @param options The options parameters.
*/
getPendingTransactionsCount(options?: GetPendingTransactionsCountOptionalParams): Promise<GetPendingTransactionsCountResponse>;
/**
* Get a single transaction.
* @param hash The transaction encoded hash Transaction hash
* @param options The options parameters.
*/
getTransaction(hash: `th_${string}`, options?: GetTransactionOptionalParams): Promise<GetTransactionResponse>;
/**
* Get multiple transfers.
* @param options The options parameters.
*/
getTransfers(options?: GetTransfersOptionalParams): Promise<GetTransfersResponse>;
}
export declare const operationSpecs: readonly [coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec, coreClient.OperationSpec];