UNPKG

@aeternity/aepp-sdk

Version:

SDK for the æternity blockchain

1,414 lines 97.2 kB
import { MiddlewarePage } from "../../../utils/MiddlewarePage.js"; import * as coreClient from "@azure/core-client"; /** Activity related to an account */ export interface Activity { /** Micro block hash */ blockHash: `mh_${string}`; blockTime: Date; /** The block height */ height: number; /** The event type */ type: ActivityType; /** A mix of all activity types. */ payload: ActivityPayload; } /** A mix of all activity types. */ export interface ActivityPayload { /** The micro block hash in which the transaction happened */ blockHash?: `mh_${string}`; blockHeight?: number; /** Encoded transaction */ encodedTx?: `tx_${string}`; /** Transaction hash */ hash?: `th_${string}`; /** The micro block index */ microIndex?: number; microTime?: Date; /** The signatures */ signatures?: string[]; /** The transaction */ tx?: Tx; /** The amount of AE tokens */ amount?: bigint; /** Contract address */ contractId?: `ct_${string}`; logIdx?: number; /** Account address */ recipientId?: `ak_${string}`; /** Account address */ senderId?: `ak_${string}`; /** Transaction hash */ txHash?: `th_${string}`; /** Account address */ recipient?: `ak_${string}`; /** Account address */ sender?: `ak_${string}`; tokenId?: number; /** The contract creation transaction hash */ contractTxHash?: `th_${string}`; /** The contract call transaction hash */ callTxHash?: `th_${string}`; /** The name of the function */ function?: string; /** The transaction object */ internalTx?: Record<string, unknown>; /** The height in which the internal call happened */ height?: number; /** The kind of internal transfer */ kind?: ActivityPayloadKind; /** The transaction hash of a transaction related to the internal transfer */ refTxHash?: `th_${string}`; } /** A mix of all transaction types. */ export interface Tx { /** Base58Check encoded tagged pubkey */ recipientId?: string; amount?: bigint; fee: bigint; ttl?: number; /** Base58Check encoded tagged pubkey */ senderId?: string; nonce?: number; /** Base64Check encoded tagged byte array */ payload?: string; /** Base58Check encoded tagged pubkey */ initiatorId?: string; initiatorAmount?: bigint; /** Base58Check encoded tagged pubkey */ responderId?: string; responderAmount?: bigint; channelReserve?: bigint; lockPeriod?: number; /** Base58Check encoded tagged pubkey */ stateHash?: string; delegateIds?: Delegates; /** Base58Check encoded tagged pubkey */ channelId?: string; /** Base58Check encoded tagged pubkey */ fromId?: string; round?: number; /** Base58Check encoded tagged pubkey */ toId?: string; update?: OffChainUpdate; /** Base64Check encoded tagged byte array */ offchainTrees?: string; initiatorAmountFinal?: number; responderAmountFinal?: number; /** Base64Check encoded tagged byte array */ poi?: string; initiatorDelegateIds?: string[]; responderDelegateIds?: string[]; queryFormat?: string; responseFormat?: string; queryFee?: bigint; oracleTtl?: RelativeTTL; /** Base58Check encoded tagged pubkey */ accountId?: string; abiVersion?: number; /** Base58Check encoded tagged pubkey */ oracleId?: string; query?: string; queryTtl?: Ttl; responseTtl?: RelativeTTL; /** Base58Check encoded tagged value */ queryId?: string; response?: string; /** Base58Check encoded tagged value */ commitmentId?: string; name?: string; nameSalt?: number; nameFee?: bigint; /** Base58Check encoded tagged value */ nameId?: string; nameTtl?: number; pointers?: NamePointer[]; clientTtl?: number; /** Base58Check encoded tagged pubkey */ ownerId?: string; /** Base64Check encoded tagged byte array */ code?: string; vmVersion?: number; deposit?: bigint; gas?: number; gasPrice?: bigint; /** Base64Check encoded tagged byte array */ callData?: string; /** Base58Check encoded tagged pubkey */ callerId?: string; /** Base58Check encoded tagged pubkey */ contractId?: string; /** Contract authorization function hash (hex encoded) */ authFun?: string; /** Base58Check encoded tagged pubkey */ gaId?: string; /** Base64Check encoded tagged byte array */ authData?: string; tx?: SignedTx; /** Base58Check encoded tagged pubkey */ payerId?: string; version: number; type: TxType; } export interface Delegates { initiator?: string[]; responder?: string[]; } export interface OffChainUpdate { /** Polymorphic discriminator, which specifies the different types this object can be */ op: "OffChainUpdate"; } export interface RelativeTTL { type: "delta"; value: number; } export interface Ttl { type: TTLType; value: number; } export interface NamePointer { key: string; /** Base58Check encoded tagged value */ encodedKey?: string; /** Base58Check encoded tagged pubkey */ id: string; } export interface SignedTx { /** A mix of all transaction types. */ tx: Tx; blockHeight?: number; /** Base58Check encoded tagged hash */ blockHash?: string; /** Base58Check encoded tagged hash */ hash?: string; /** Base64Check encoded tagged byte array */ encodedTx?: string; /** At least one signature is required unless for Generalized Account Meta transactions */ signatures?: string[]; } /** Error response from the API */ export interface ErrorResponse { /** The message of the error raised */ error: string; } /** Response Schema for owners of AEX-141 tokens */ export interface Aex141TokenResponse { /** NFT contract id */ contractId: `ct_${string}`; /** Account address */ ownerId?: `ak_${string}`; /** Non-fungible token id */ tokenId: number; } /** Response Schema for AEX9 balance responses */ export interface Aex9BalanceResponse { /** Amount of AEX9 token */ amount: bigint; /** Block hash, indicating a state of a balance for that block */ blockHash: number; /** Contract id of AEX9 token */ contractId: `ct_${string}`; /** Number of decimals of AEX9 token */ decimals: number; /** Block height, indicating a state of a balance for that block height */ height: number; /** Name of AEX9 token */ tokenName: string; /** Symbol of AEX9 token */ tokenSymbol: string; /** Transaction hash, indicating a state of a balance for that block height */ txHash: `th_${string}`; /** Transaction index, indicating a state of a balance for that block height */ txIndex: number; /** Transaction type, indicating a state of a balance for that block height */ txType: string; } /** DEX swap */ export interface DexSwap { amounts: DexSwapAmounts; action: DexSwapAction; /** Account address */ caller: `ak_${string}`; fromToken: string; toToken: string; logIdx: number; /** Account address */ toAccount: `ak_${string}`; /** Transaction hash */ txHash: `th_${string}`; /** Contract address */ fromContract: `ct_${string}`; /** Contract address */ toContract: `ct_${string}`; fromAmount: bigint; toAmount: bigint; fromDecimals: number; toDecimals: number; microTime: Date; height: number; } export interface DexSwapAmounts { amount0In: bigint; amount1In: bigint; amount0Out: bigint; amount1Out: bigint; } /** Name Claim */ export interface NameClaim { activeFrom: number; /** Transaction hash */ sourceTxHash: `th_${string}`; sourceTxType: string; /** Micro block hash */ blockHash: `mh_${string}`; height: number; tx: NameClaimTx; internalSource?: boolean; } export interface NameClaimTx { name: string; nameSalt: number; nameFee?: bigint; fee: bigint; ttl?: number; /** Base58Check encoded tagged pubkey */ accountId: string; nonce?: number; } /** Resource not found on the API */ export interface NotFoundResponse { /** The message of the error raised */ error: string; } /** Pointee */ export interface Pointee { active: boolean; /** AENS name */ name: `${string}.chain`; key: string; /** Micro block hash */ blockHash: `mh_${string}`; tx: NameUpdateTx; sourceTxType: string; /** Transaction hash */ sourceTxHash: `th_${string}`; blockHeight: number; blockTime: Date; } export interface NameUpdateTx { /** Base58Check encoded tagged value */ nameId: string; nameTtl: number; pointers: NamePointer[]; clientTtl: number; fee: bigint; ttl?: number; /** Base58Check encoded tagged pubkey */ accountId: string; nonce?: number; } export interface PathsXcg812V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchema { /** The contract create transactions count */ contractCreateTx?: Get200ApplicationJsonProperties; /** The contract call transactions count */ contractCallTx?: PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx; /** The ga attach transactions count */ gaAttachTx?: Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx; /** The ga meta transactions count */ gaMetaTx?: Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx; /** The channel close mutual transactions count */ channelCloseMutualTx?: PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx; /** The channel close solo transactions count */ channelCloseSoloTx?: Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx; /** The channel create transactions count */ channelCreateTx?: PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx; /** The channel deposit transactions count */ channelDepositTx?: Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx; /** The channel force progress transactions count */ channelForceProgressTx?: Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx; /** The channel set delegates transactions count */ channelSetDelegatesTx?: PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx; /** The channel settle transactions count */ channelSettleTx?: PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx; /** The channel slash transactions count */ channelSlashTx?: PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx; /** The channel snapshot solo transactions count */ channelSnapshotSoloTx?: Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx; /** The channel withdraw transactions count */ channelWithdrawTx?: Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx; /** The name claim transactions count */ nameClaimTx?: PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx; /** The name preclaim transactions count */ namePreclaimTx?: Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx; /** The name revoke transactions count */ nameRevokeTx?: PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx; /** The name transfer transactions count */ nameTransferTx?: PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx; /** The name update transactions count */ nameUpdateTx?: PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx; /** The oracle extend transactions count */ oracleExtendTx?: Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx; /** The oracle query transactions count */ oracleQueryTx?: Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx; /** The oracle register transactions count */ oracleRegisterTx?: PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx; /** The oracle response transactions count */ oracleResponseTx?: Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx; /** The paying for transactions count */ payingForTx?: Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx; /** The spend transactions count */ spendTx?: Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx; /** The channel offchain transactions count */ channelOffchainTx?: Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx; /** The total transactions count */ total: number; } /** The contract create transactions count */ export interface Get200ApplicationJsonProperties { /** The number of times the account was owner id in contract create transaction */ ownerId?: number; } /** The contract call transactions count */ export interface PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx { /** The number of times the account was contract id in contract call transaction */ contractId?: number; /** The number of times the account was caller id in contract call transaction */ callerId?: number; } /** The ga attach transactions count */ export interface Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx { /** The number of times the account was owner id in ga attach transaction */ ownerId?: number; } /** The ga meta transactions count */ export interface Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx { /** The number of times the account was ga id in ga meta transaction */ gaId?: number; } /** The channel close mutual transactions count */ export interface PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx { /** The number of times the account was channel id in channel close mutual transaction */ channelId?: number; /** The number of times the account was from id in channel close mutual transaction */ fromId?: number; } /** The channel close solo transactions count */ export interface Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx { /** The number of times the account was channel id in channel close solo transaction */ channelId?: number; /** The number of times the account was from id in channel close solo transaction */ fromId?: number; } /** The channel create transactions count */ export interface PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx { /** The number of times the account was initiator id in channel create transaction */ initiatorId?: number; /** The number of times the account was responder id in channel create transaction */ responderId?: number; } /** The channel deposit transactions count */ export interface Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx { /** The number of times the account was channel id in channel deposit transaction */ channelId?: number; /** The number of times the account was from id in channel deposit transaction */ fromId?: number; } /** The channel force progress transactions count */ export interface Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx { /** The number of times the account was channel id in channel force progress transaction */ channelId?: number; /** The number of times the account was from id in channel force progress transaction */ fromId?: number; } /** The channel set delegates transactions count */ export interface PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx { /** The number of times the account was channel id in channel set delegates transaction */ channelId?: number; /** The number of times the account was from id in channel set delegates transaction */ fromId?: number; } /** The channel settle transactions count */ export interface PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx { /** The number of times the account was channel id in channel settle transaction */ channelId?: number; /** The number of times the account was from id in channel settle transaction */ fromId?: number; } /** The channel slash transactions count */ export interface PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx { /** The number of times the account was channel id in channel slash transaction */ channelId?: number; /** The number of times the account was from id in channel slash transaction */ fromId?: number; } /** The channel snapshot solo transactions count */ export interface Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx { /** The number of times the account was channel id in channel snapshot solo transaction */ channelId?: number; /** The number of times the account was from id in channel snapshot solo transaction */ fromId?: number; } /** The channel withdraw transactions count */ export interface Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx { /** The number of times the account was channel id in channel withdraw transaction */ channelId?: number; /** The number of times the account was to id in channel withdraw transaction */ toId?: number; } /** The name claim transactions count */ export interface PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx { /** The number of times the account was account id in name claim transaction */ accountId?: number; } /** The name preclaim transactions count */ export interface Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx { /** The number of times the account was account id in name preclaim transaction */ accountId?: number; /** The number of times the account was commitment id in name preclaim transaction */ commitmentId?: number; } /** The name revoke transactions count */ export interface PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx { /** The number of times the account was account id in name revoke transaction */ accountId?: number; /** The number of times the account was name id in name revoke transaction */ nameId?: number; } /** The name transfer transactions count */ export interface PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx { /** The number of times the account was recipient id in name transfer transaction */ recipientId?: number; /** The number of times the account was account id in name transfer transaction */ accountId?: number; /** The number of times the account was name id in name transfer transaction */ nameId?: number; } /** The name update transactions count */ export interface PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx { /** The number of times the account was account id in name update transaction */ accountId?: number; /** The number of times the account was name id in name update transaction */ nameId?: number; } /** The oracle extend transactions count */ export interface Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx { /** The number of times the account was oracle id in oracle extend transaction */ oracleId?: number; } /** The oracle query transactions count */ export interface Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx { /** The number of times the account was sender id in oracle query transaction */ senderId?: number; /** The number of times the account was oracle id in oracle query transaction */ oracleId?: number; } /** The oracle register transactions count */ export interface PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx { /** The number of times the account was account id in oracle register transaction */ accountId?: number; } /** The oracle response transactions count */ export interface Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx { /** The number of times the account was oracle id in oracle response transaction */ oracleId?: number; } /** The paying for transactions count */ export interface Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx { /** The number of times the account was payer id in paying for transaction */ payerId?: number; } /** The spend transactions count */ export interface Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx { /** The number of times the account was sender id in spend transaction */ senderId?: number; /** The number of times the account was recipient id in spend transaction */ recipientId?: number; } /** The channel offchain transactions count */ export interface Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx { /** The number of times the account was channel id in channel offchain transaction */ channelId?: number; } /** Response Schema for AEX141 contract */ export interface Aex141Response { /** Metadata base url */ baseUrl: string; /** NFT contract id */ contractId: `ct_${string}`; /** Transaction hash of the contract creation */ contractTxHash: `th_${string}`; /** Extensions implemented by the contract */ extensions: string[]; /** Limit for amount of tokens or templates */ limits: Record<string, unknown>; /** True if the contract is invalid */ invalid: boolean; creationTime: Date; /** Block height of the contract creation */ blockHeight: number; } /** Response Schema for templates of a AEX-141 contract */ export interface Aex141TemplatesResponse { /** NFT contract id */ contractId: `ct_${string}`; /** Template edition details */ edition?: Record<string, unknown>; /** Log index of the TemplateCreation */ logIdx: number; /** Template id of AEX-141 tokens */ templateId: number; /** Transaction hash of the TemplateCreation */ txHash: `th_${string}`; } /** Response Schema for template tokens of a AEX-141 contract */ export interface Aex141TemplateTokensResponse { /** Owner wallet address */ ownerId: `ak_${string}`; /** Mint event index */ logIdx: number; /** NFT id */ tokenId: number; /** Mint transaction hash */ txHash: `th_${string}`; } /** Response schema for AEX-141 token detail */ export interface Aex141TokenDetailResponse { /** NFT contract id */ contractId: `ct_${string}`; /** Account address */ ownerId: `ak_${string}`; /** Non-fungible token id */ tokenId: number; /** The metadata associated to this NFT */ metadata: Record<string, unknown>; } /** AEx141 Transfer */ export interface Aex141TransferEvent { blockHeight: number; /** Contract address */ contractId: `ct_${string}`; logIdx: number; microIndex: number; microTime: Date; /** Account address */ recipient: `ak_${string}`; /** Account address */ sender: `ak_${string}`; tokenId: number; /** Transaction hash */ txHash: `th_${string}`; } /** Response Schema for AEX9 contract */ export interface Aex9Response { /** Id of the contract of the AEX9 tokens */ contractId: `ct_${string}`; /** Transaction hash of the contract creation */ contractTxHash: `th_${string}`; /** Token supply right after contract's creation */ initialSupply: bigint; /** Token supply updated on event basis (Mint, Burn, Swap) */ eventSupply: bigint; /** The number of decimals for AEX9 token */ decimals: number; /** Extensions implemented by the contract */ extensions?: string[]; /** Count of accounts having balance (nil when contract is not complaint) */ holders: number; /** Name of AEX9 token */ name: string; /** Symbol of AEX9 token */ symbol: string; /** True if the contract is invalid */ invalid: boolean; } export interface Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema { data: number; } /** Response Schema for AEX9 contract balances responses */ export interface Aex9ContractBalanceResponse { /** The wallet pubkey */ accountId: `ak_${string}`; /** The balance amount */ amount: bigint; /** The block hash, indicating a state of a balance for that block */ blockHash: number; /** The contract id of given token */ contractId: number; /** The block height, indicating a state of a balance for that block height */ height: number; /** The hash of the last transaction that changed the balance */ lastTxHash: `th_${string}`; /** The index of the event log that changed the balance */ lastLogIdx: number; } export interface PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema { /** The account present on a AEX9 */ account: `ak_${string}`; /** The amount of AEX9 token */ amount: bigint; /** The contract id of given token */ contract: `ct_${string}`; } export interface Get200ApplicationJsonAllOfPropertiesItemsItem { /** The account present on a AEX9 */ account: `ak_${string}`; /** The amount of AEX9 token */ amount: bigint; /** The contract id of given token */ contract: `ct_${string}`; /** The block height, indicating a state of a balance for that block height */ height: number; } export interface Channel { /** Channel is active */ active: boolean; /** Balance currently left in the channel */ amount: bigint; /** Channel ID */ channel: `ch_${string}`; /** Minimum amount for sufficient funds */ channelReserve: bigint; /** Pubkeys of delegated accounts */ delegateIds: Record<string, unknown>; /** Channel initiator pubkey */ initiator: `ak_${string}`; /** Amount owned by initiator */ initiatorAmount: bigint; /** The last height in which the channel was updated on chain */ lastUpdatedHeight: number; /** The transaction type of the last transaction that updated the channel */ lastUpdatedTxType: string; lastUpdatedTime: Date; /** The hash of the last transaction that updated the channel */ lastUpdatedTxHash: `th_${string}`; /** Amount of heights locked after a solo closing */ lockPeriod: number; /** Non-inclusive height until which the channel is locked */ lockedUntil: number; /** The channel responder pubkey */ responder: `ak_${string}`; /** Amount owned by responder */ responderAmount: bigint; /** Round after last transaction */ round: number; /** Round of last solo transaction */ soloRound: number; /** The hash of the current channel state */ stateHash: `st_${string}`; /** The amount of times the channel's been updated by any of the channel transactions */ updatesCount: number; } /** ContractCall */ export interface ContractCall { /** Micro block hash */ blockHash: `mh_${string}`; /** Transaction hash */ callTxHash: `th_${string}`; /** Contract address */ contractId: `ct_${string}`; /** Transaction hash */ contractTxHash: `th_${string}`; function: string; height: number; /** Any object */ internalTx: Record<string, unknown>; localIdx: number; microIndex: number; } /** ContractLog */ export interface ContractLog { args: string[]; /** Micro block hash */ blockHash: `mh_${string}`; blockTime: Date; /** Transaction hash */ callTxHash: `th_${string}`; /** Contract address */ contractId: `ct_${string}`; /** Transaction hash */ contractTxHash: `th_${string}`; data: string; eventHash: string; eventName: string | null; /** Contract address */ extCallerContractId: `ct_${string}` | null; /** Transaction hash */ extCallerContractTxHash: `th_${string}` | null; height: number; logIdx: number; microIndex: number; parentContractId: number | null; } /** Contract creation info */ export interface Contract { aexnType: string | null; /** Micro block hash */ blockHash: `mh_${string}`; /** Contract address */ contract: `ct_${string}`; /** Transaction hash */ sourceTxHash: `th_${string}`; sourceTxType: string; createTx: ContractCreateTx; } export interface ContractCreateTx { /** Base58Check encoded tagged pubkey */ ownerId: string; nonce?: number; /** Base64Check encoded tagged byte array */ code: string; vmVersion: number; abiVersion: number; deposit: bigint; amount: bigint; gas: number; gasPrice: bigint; fee: bigint; ttl?: number; /** Base64Check encoded tagged byte array */ callData: string; } /** Epoch information */ export interface EpochInfo { epoch: number; first: number; last: number; length: number; seed: string; lastPinHeight: number; parentBlockHash: string; lastLeader: string; epochStartTime: number; validators: EpochInfoValidatorsItem[]; } export interface EpochInfoValidatorsItem { validator?: string; stake?: number; } /** Schedule information */ export interface Schedule { height: number; leader: string; } /** Validator information */ export interface Validator { epoch: number; validator: string; totalStakes: number; delegates: number; rewardsEarned: number; /** Dictionary of <integer> */ pinningHistory: { [propertyName: string]: number; }; } /** Delegate information */ export interface Delegate { epoch: number; delegate: string; stake: number; validator: string; } export interface KeyBlock { /** Base58Check encoded tagged hash */ hash: string; height: number; /** Base58Check encoded tagged hash */ prevHash: string; /** Base58Check encoded tagged hash */ prevKeyHash: string; /** Base58Check encoded tagged hash */ stateHash: string; /** Base58Check encoded tagged pubkey */ miner: string; /** Base58Check encoded tagged pubkey */ beneficiary: string; target: number; pow?: number[]; nonce?: number; time: Date; version: number; /** Base64Check encoded tagged byte array */ info: string; } export interface MicroBlockHeader { /** Base58Check encoded tagged hash */ hash: string; height: number; /** Base58Check encoded tagged hash */ pofHash: string; /** Base58Check encoded tagged hash */ prevHash: string; /** Base58Check encoded tagged hash */ prevKeyHash: string; /** Base58Check encoded tagged hash */ stateHash: string; /** Base58Check encoded tagged hash */ txsHash: string; /** Base58Check encoded tagged value */ signature: string; time: Date; version: number; } /** Transaction */ export interface Transaction { /** Micro block hash */ blockHash: `mh_${string}`; /** The block height */ blockHeight: number; /** Encoded transaction */ encodedTx: `tx_${string}`; /** Transaction hash */ hash: `th_${string}`; /** The micro block index */ microIndex: number; microTime: Date; /** The signatures */ signatures: string[]; /** The transaction */ tx: Tx; } /** Name */ export interface Name { active: boolean; /** AENS name hash */ hash: `nm_${string}`; activeFrom: number; approximateActivationTime: Date; approximateExpireTime: Date; expireHeight: number; pointers: NamePointer[]; /** Auction */ auction: Auction | null; auctionTimeout: number; ownership: NameOwnership; /** AENS name */ name: `${string}.chain`; nameFee: bigint; revoke: NameTx | null; claimsCount?: number; } /** Auction */ export interface Auction { auctionEnd: number; activationTime: Date; approximateExpireTime: Date; lastBid: AuctionLastBid; /** AENS name */ name: `${string}.chain`; nameFee: bigint; claimsCount: number; } export interface AuctionLastBid { /** Micro block hash */ blockHash: `mh_${string}`; blockHeight: number; /** Encoded transaction */ encodedTx: `tx_${string}`; /** Transaction hash */ hash: `th_${string}`; microIndex: number; microTime: Date; signatures: string[]; tx: AuctionLastBidTx; } export interface Components17W16A5SchemasAuctionPropertiesLastBidPropertiesTxAllof1 { /** AENS name hash */ nameId: `nm_${string}`; type: string; version: number; } export interface NameOwnership { /** Account address */ current?: `ak_${string}`; /** Account address */ original?: `ak_${string}`; } export interface NameTx { /** Micro block hash */ blockHash: `mh_${string}`; blockHeight: number; /** Transaction hash */ hash: `th_${string}`; microIndex: number; microTime: Date; signatures: string[]; tx: NameTxTx; } export interface NameRevokeTx { /** Base58Check encoded tagged value */ nameId: string; fee: bigint; ttl?: number; /** Base58Check encoded tagged pubkey */ accountId: string; nonce?: number; } export interface Components171VsjiSchemasNametxPropertiesTxAllof1 { type: string; version: number; } export interface PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema { data: NameClaim[]; } /** Name Transfer */ export interface NameTransfer { activeFrom: number; /** Micro block hash */ blockHash: `mh_${string}`; height: number; /** Transaction hash */ sourceTxHash: `th_${string}`; sourceTxType: string; tx: NameTransferTx; internalSource?: boolean; } export interface NameTransferTx { /** Base58Check encoded tagged value */ nameId: string; /** Base58Check encoded tagged pubkey */ recipientId: string; fee: bigint; ttl?: number; /** Base58Check encoded tagged pubkey */ accountId: string; nonce?: number; } /** Name Update */ export interface NameUpdate { activeFrom: number; /** Micro block hash */ blockHash: `mh_${string}`; height: number; /** Transaction hash */ sourceTxHash: `th_${string}`; sourceTxType: string; tx: NameUpdateTx; internalSource?: boolean; } export interface Oracle { /** The oracle active status */ active: boolean; /** The block height when the oracle became active */ activeFrom: number; approximateExpireTime: Date; /** The block height when the oracle expires */ expireHeight: number; registerTime: Date; /** The transaction hash in which the oracle was registered, use `register.hash` instead */ registerTxHash: `th_${string}`; /** The oracle's query and response formats */ format: OracleFormat; /** Oracle address */ oracle: `ok_${string}`; /** The query fee */ queryFee: bigint; register: OracleTx; } /** The oracle's query and response formats */ export interface OracleFormat { /** The query format */ query: string; /** The response format */ response: string; } export interface OracleTx { /** Micro block hash */ blockHash: `mh_${string}`; blockHeight: number; /** Transaction hash */ hash: `th_${string}`; microIndex: number; microTime: Date; signatures: string[]; /** Encoded transaction */ encodedTx: `tx_${string}`; tx: OracleTxTx; } export interface OracleRegisterTx { queryFormat: string; responseFormat: string; queryFee: bigint; oracleTtl: Ttl; /** Base58Check encoded tagged pubkey */ accountId: string; nonce?: number; fee: bigint; ttl?: number; abiVersion?: number; } export interface Components1Viuqa3SchemasOracletxPropertiesTxAllof1 { /** use `account_id` instead */ oracleId: `ok_${string}`; type: string; version: number; /** use the outer `hash` instead */ txHash: `th_${string}`; } export interface OracleExtend { /** The hash of the block in which it occurred */ blockHash: `mh_${string}`; /** The block height */ height: number; /** The hash of the transaction in which the extend was done */ sourceTxHash: `th_${string}`; /** The type of the transaction in which the extend was done, it can be either via a contract call or an extend transaction */ sourceTxType: string; tx: OracleExtendTx; } export interface OracleExtendTx { fee: bigint; oracleTtl: RelativeTTL; /** Base58Check encoded tagged pubkey */ oracleId: string; nonce?: number; ttl?: number; } export interface OracleQuery { /** The hash of the block in which it occurred */ blockHash: `mh_${string}`; blockTime: Date; /** The block height */ height: number; /** Oracle query ID */ queryId: `oq_${string}`; response?: OracleResponse; /** The hash of the transaction in which the query was created */ sourceTxHash: `th_${string}`; /** The type of the transaction in which the query was created, it can be either via a contract call or a query transaction */ sourceTxType: string; /** The transaction fee */ fee: bigint; /** The nonce */ nonce: number; /** The oracle ID of this query */ oracleId: `ok_${string}`; /** Base64 encoding of the query */ query: string; /** The query fee */ queryFee: bigint; /** Expiration of the query */ queryTtl: Record<string, unknown>; /** Expiration of the response */ responseTtl: Record<string, unknown>; /** The creator of the query */ senderId: `ak_${string}`; /** Transaction TTL */ ttl: number; } export interface OracleResponse { /** The hash of the block in which it occurred */ blockHash: `mh_${string}`; blockTime: Date; /** The block height */ height: number; /** Oracle query ID */ queryId: `oq_${string}`; query: OracleQuery; /** The hash of the transaction in which the response was created */ sourceTxHash: `th_${string}`; /** The type of the transaction in which the response was created, it can be either via a contract call or a respond transaction */ sourceTxType: string; /** The transaction fee */ fee: bigint; /** The nonce */ nonce: number; /** The oracle ID of this response */ oracleId: `ok_${string}`; /** Base64 encoding of the response */ response: string; /** Expiration of the response */ responseTtl: Record<string, unknown>; /** Transaction TTL */ ttl: number; } /** Stats */ export interface Stats { /** The number of miners */ minersCount?: number; /** The fees trend */ feesTrend?: number; /** The last 24hs average transaction fees */ last24HsAverageTransactionFees?: number; /** The last 24hs transactions */ last24HsTransactions?: number; /** The max transactions per second */ maxTransactionsPerSecond?: number; /** The max transactions per second block hash */ maxTransactionsPerSecondBlockHash?: `kh_${string}`; /** The transactions trend */ transactionsTrend?: number; } /** Stat */ export interface Stat { /** The statistic count */ count: number; /** The statistic start date */ startDate: string; /** The statistic end date (not taken into account) */ endDate: string; } /** DeltaStat */ export interface DeltaStat { /** The generation */ height: number; /** The number of auctions started */ auctionsStarted: number; /** The block reward */ blockReward: bigint; /** The amount burned in auctions */ burnedInAuctions: bigint; /** The number of channels closed */ channelsClosed: number; /** The number of channels opened */ channelsOpened: number; /** The number of contracts created */ contractsCreated: number; /** The dev reward */ devReward: bigint; /** The number of names activated */ namesActivated: number; /** The number of names expired */ namesExpired: number; /** The number of names revoked */ namesRevoked: number; /** The number of oracles expired */ oraclesExpired: number; /** The number of oracles registered */ oraclesRegistered: number; /** The last transaction hash for this height */ lastTxHash: `th_${string}`; /** The amount locked in auctions */ lockedInAuctions: bigint; /** The amount locked in channels */ lockedInChannels: bigint; } /** Miner */ export interface Miner { /** The miner (beneficiary) address */ miner: `ak_${string}`; /** The accumulated reward on the miner (beneficiary) address */ totalReward: bigint; } /** TotalStat */ export interface TotalStat { /** The generation */ height: number; /** The number of contracts */ contracts: number; /** The amount locked in auctions */ lockedInAuctions: bigint; /** The amount burned in auctions */ burnedInAuctions: bigint; /** The amount locked in channels */ lockedInChannels: bigint; /** The number of active auctions */ activeAuctions: number; /** The number of active names */ activeNames: number; /** The number of inactive names */ inactiveNames: number; /** The number of active oracles */ activeOracles: number; /** The number of inactive oracles */ inactiveOracles: number; /** The number of open channels */ openChannels: number; /** The sum of block rewards */ sumBlockReward: bigint; /** The sum of dev rewards */ sumDevReward: bigint; /** The total token supply */ totalTokenSupply: bigint; /** The last transaction hash for this height */ lastTxHash: `th_${string}`; } export interface Status { mdwAsyncTasks: StatusMdwAsyncTasks; /** The approximate number of generations synced per minute on middleware */ mdwGensPerMinute: number; /** The top generation up to which the middleware was synced */ mdwHeight: number; /** The last middleware migration ran */ mdwLastMigration: number; /** The middleware's git revision of the latest commit applied */ mdwRevision: string; /** true if middleware was synced up to the latest node block */ mdwSynced: boolean; /** true if middleware is syncing (i.e. it didn't stop due to an error) */ mdwSyncing: boolean; /** index of the latest synced transaction */ mdwTxIndex: number; /** The middleware's version */ mdwVersion: string; /** The node generation of the last block synced */ nodeHeight: number; /** The percentage of generations synced on the node */ nodeProgress: number; /** The node's git revision of the latest commit applied */ nodeRevision: string; /** If true, the node is still processing additional blocks to reach the latest one */ nodeSyncing: boolean; /** The node's version */ nodeVersion: string; } export interface StatusMdwAsyncTasks { longTasks: number; producerBuffer: number; totalPending: number; } /** Pending Transaction */ export interface PendingTransaction { /** The block hash, but since it's pending it's always "none" */ blockHash: string; /** The block height, but since it's pending it's always -1 */ blockHeight: number; /** Encoded transaction */ encodedTx: `tx_${string}`; /** The failures count */ failures: number; /** Transaction hash */ hash: `th_${string}`; /** The signatures */ signatures: string[]; /** The transaction */ tx: Tx; } export interface Transfer { /** Account address */ accountId: `ak_${string}`; amount: bigint; height: number; kind: TransferKind; /** Micro block hash */ refBlockHash: `mh_${string}` | null; /** Transaction hash */ refTxHash: `th_${string}` | null; refTxType: string | null; } /** AEx9 Transfer */ export interface Aex9TransferEvent { amount: bigint; blockHeight: number; /** Contract address */ contractId: `ct_${string}`; logIdx: number; microIndex: number; microTime: Date; /** Account address */ recipientId: `ak_${string}`; /** Account address */ senderId: `ak_${string}`; /** Transaction hash */ txHash: `th_${string}`; } /** Response Schema for AEX9 transfer responses */ export interface Aex9TransferResponse { /** Transfer amount of AEX9 token */ amount: bigint; /** The block height */ blockHeight: number; /** AEX9 token transfer index */ callTxi: number; /** Contract address */ contractId: `ct_${string}`; /** Log index */ logIdx: number; microTime: Date; /** Recipient of AEX9 transfer */ recipient: `ak_${string}`; /** Sender of AEX9 transfer */ sender: `ak_${string}`; } /** Contract call made inside of a contract call or contract create transaction */ export interface InternalContractCallEvent { /** The contract creation transaction hash */ contractTxHash: `th_${string}`; /** Contract address */ contractId: `ct_${string}`; /** The contract call transaction hash */ callTxHash?: `th_${string}`; /** The name of the function */ function: string; /** The transaction object */ internalTx: Record<string, unknown>; /** The height in which the internal call happened */ height: number; /** The micro block index */ microIndex: number; /** The micro block hash in which the transaction happened */ blockHash: `mh_${string}`; } /** Internal transfer */ export interface InternalTransferEvent { /** The amount of AE tokens */ amount: bigint; /** The kind of internal transfer */ kind: InternalTransferEventKind; /** The transaction hash of a transaction related to the internal transfer */ refTxHash: `th_${string}`; } /** Name claim */ export interface NameClaimEvent { /** The hash of the transaction (either a name claim or a contract call transaction) */ txHash: `th_${string}`; /** The claim transaction (internal or not) */ tx: Record<string, unknown>; } export interface SpendTx { /** Base58Check encoded tagged pubkey */ recipientId: string; amount: bigint; fee: bigint; ttl?: number; /** Base58Check encoded tagged pubkey */ senderId: string; nonce?: number; /** Base64Check encoded tagged byte array */ payload: string; } export interface ChannelCreateTx { /** Base58Check encoded tagged pubkey */ initiatorId: string; initiatorAmount: bigint; /** Base58Check encoded tagged pubkey */ responderId: string; responderAmount: bigint; channelReserve: bigint; lockPeriod: number; ttl?: number; fee: bigint; nonce?: number; /** Base58Check encoded tagged hash */ stateHash: string; delegateIds?: Delegates; } export interface ChannelDepositTx { /** Base58Check encoded tagged pubkey */ channelId: string; /** Base58Check encoded tagged pubkey */ fromId: string; amount: bigint; ttl?: number; fee: bigint; nonce: number; /** Base58Check encoded tagged hash */ stateHash: string; round: number; } export interface ChannelWithdrawTx { /** Base58Check encoded tagged pubkey */ channelId: string; /** Base58Check encoded tagged pubkey */ toId: string; amount: bigint; ttl?: number; fee: bigint; nonce: number; /** Base58Check encoded tagged hash */ stateHash: string; round: number; } export interface ChannelForceProgressTx { /** Base58Check encoded tagged pubkey */ channelId: string; /** Base58Check enc