@aeternity/aepp-sdk 13.1.0 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aepp-sdk.browser-script.js +1 -1
- package/dist/aepp-sdk.browser-script.js.map +1 -1
- package/dist/aepp-sdk.browser.js +1 -1
- package/dist/aepp-sdk.browser.js.map +1 -1
- package/dist/aepp-sdk.js +2162 -1566
- package/dist/aepp-sdk.js.map +1 -1
- package/es/AeSdkAepp.mjs.map +1 -1
- package/es/AeSdkBase.d.ts +10 -0
- package/es/AeSdkBase.mjs +27 -0
- package/es/AeSdkBase.mjs.map +1 -1
- package/es/AeSdkMethods.mjs.map +1 -1
- package/es/AeSdkWallet.d.ts +1 -1
- package/es/AeSdkWallet.mjs +53 -20
- package/es/AeSdkWallet.mjs.map +1 -1
- package/es/Middleware.mjs.map +1 -1
- package/es/MiddlewareSubscriber.mjs +3 -3
- package/es/MiddlewareSubscriber.mjs.map +1 -1
- package/es/Node.mjs.map +1 -1
- package/es/account/Base.d.ts +44 -2
- package/es/account/Base.mjs +95 -1
- package/es/account/Base.mjs.map +1 -1
- package/es/account/Generalized.d.ts +3 -0
- package/es/account/Generalized.mjs +15 -0
- package/es/account/Generalized.mjs.map +1 -1
- package/es/account/Ledger.d.ts +3 -0
- package/es/account/Ledger.mjs +15 -0
- package/es/account/Ledger.mjs.map +1 -1
- package/es/account/LedgerFactory.mjs.map +1 -1
- package/es/account/Memory.d.ts +10 -0
- package/es/account/Memory.mjs +34 -0
- package/es/account/Memory.mjs.map +1 -1
- package/es/account/Rpc.d.ts +4 -0
- package/es/account/Rpc.mjs +29 -0
- package/es/account/Rpc.mjs.map +1 -1
- package/es/aens.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection/Browser.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection-proxy.mjs.map +1 -1
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs.map +1 -1
- package/es/aepp-wallet-communication/rpc/types.d.ts +9 -0
- package/es/aepp-wallet-communication/rpc/types.mjs.map +1 -1
- package/es/aepp-wallet-communication/schema.d.ts +1 -0
- package/es/aepp-wallet-communication/schema.mjs +20 -19
- package/es/aepp-wallet-communication/schema.mjs.map +1 -1
- package/es/aepp-wallet-communication/wallet-detector.mjs.map +1 -1
- package/es/apis/compiler/compiler.mjs.map +1 -1
- package/es/apis/middleware/middleware.mjs.map +1 -1
- package/es/apis/middleware/models/index.mjs +340 -124
- package/es/apis/middleware/models/index.mjs.map +1 -1
- package/es/apis/node/node.mjs.map +1 -1
- package/es/chain.mjs +1 -1
- package/es/chain.mjs.map +1 -1
- package/es/channel/Base.mjs.map +1 -1
- package/es/channel/Contract.mjs.map +1 -1
- package/es/channel/Spend.mjs.map +1 -1
- package/es/channel/handlers.mjs +2 -2
- package/es/channel/handlers.mjs.map +1 -1
- package/es/channel/internal.mjs +6 -6
- package/es/channel/internal.mjs.map +1 -1
- package/es/contract/Contract.mjs +1 -1
- package/es/contract/Contract.mjs.map +1 -1
- package/es/contract/compiler/Cli.mjs.map +1 -1
- package/es/contract/compiler/Http.mjs.map +1 -1
- package/es/contract/delegation-signature.d.ts +2 -1
- package/es/contract/delegation-signature.mjs +39 -8
- package/es/contract/delegation-signature.mjs.map +1 -1
- package/es/contract/ga.mjs.map +1 -1
- package/es/oracle.mjs.map +1 -1
- package/es/spend.d.ts +2 -1
- package/es/spend.mjs +4 -2
- package/es/spend.mjs.map +1 -1
- package/es/tx/builder/constants.mjs +26 -23
- package/es/tx/builder/constants.mjs.map +1 -1
- package/es/tx/builder/field-types/abi-version.mjs.map +1 -1
- package/es/tx/builder/field-types/coin-amount.mjs.map +1 -1
- package/es/tx/builder/field-types/ct-version.mjs.map +1 -1
- package/es/tx/builder/field-types/deposit.mjs.map +1 -1
- package/es/tx/builder/field-types/entry.mjs.map +1 -1
- package/es/tx/builder/field-types/fee.mjs.map +1 -1
- package/es/tx/builder/field-types/field.mjs.map +1 -1
- package/es/tx/builder/field-types/gas-limit.mjs.map +1 -1
- package/es/tx/builder/field-types/gas-price.mjs.map +1 -1
- package/es/tx/builder/field-types/index.d.ts +28 -150
- package/es/tx/builder/field-types/index.mjs +28 -56
- package/es/tx/builder/field-types/index.mjs.map +1 -1
- package/es/tx/builder/field-types/map.mjs.map +1 -1
- package/es/tx/builder/field-types/mptree.mjs +3 -3
- package/es/tx/builder/field-types/mptree.mjs.map +1 -1
- package/es/tx/builder/field-types/name-fee.mjs.map +1 -1
- package/es/tx/builder/field-types/pointers.mjs.map +1 -1
- package/es/tx/builder/field-types/string.mjs.map +1 -1
- package/es/tx/builder/field-types/ttl.mjs.map +1 -1
- package/es/tx/builder/field-types/u-int.mjs +1 -1
- package/es/tx/builder/field-types/u-int.mjs.map +1 -1
- package/es/tx/builder/helpers.mjs.map +1 -1
- package/es/tx/builder/index.mjs.map +1 -1
- package/es/tx/builder/schema.mjs +11 -10
- package/es/tx/builder/schema.mjs.map +1 -1
- package/es/tx/execution-cost.mjs.map +1 -1
- package/es/tx/transaction-signer.mjs.map +1 -1
- package/es/tx/validator.mjs.map +1 -1
- package/es/utils/amount-formatter.mjs +7 -7
- package/es/utils/amount-formatter.mjs.map +1 -1
- package/es/utils/autorest.mjs.map +1 -1
- package/es/utils/bignumber.mjs.map +1 -1
- package/es/utils/bytes.mjs.map +1 -1
- package/es/utils/crypto.mjs.map +1 -1
- package/es/utils/encoder-types.mjs +3 -3
- package/es/utils/encoder-types.mjs.map +1 -1
- package/es/utils/encoder.mjs.map +1 -1
- package/es/utils/errors.mjs.map +1 -1
- package/es/utils/hd-wallet.mjs.map +1 -1
- package/es/utils/keystore.mjs.map +1 -1
- package/es/utils/other.mjs.map +1 -1
- package/es/utils/semver-satisfies.mjs.map +1 -1
- package/es/utils/string.mjs.map +1 -1
- package/es/utils/typed-data.mjs +0 -1
- package/es/utils/typed-data.mjs.map +1 -1
- package/package.json +35 -35
- package/src/AeSdkBase.ts +36 -0
- package/src/AeSdkWallet.ts +36 -12
- package/src/account/Base.ts +84 -3
- package/src/account/Generalized.ts +15 -0
- package/src/account/Ledger.ts +15 -0
- package/src/account/Memory.ts +53 -1
- package/src/account/Rpc.ts +35 -0
- package/src/aepp-wallet-communication/rpc/types.ts +10 -0
- package/src/aepp-wallet-communication/schema.ts +1 -0
- package/src/chain.ts +1 -1
- package/src/contract/Contract.ts +1 -1
- package/src/contract/delegation-signature.ts +37 -11
- package/src/spend.ts +2 -2
- package/src/tx/builder/field-types/index.ts +28 -58
- package/src/tx/builder/field-types/u-int.ts +1 -1
- package/types-legacy/ts4.2/AeSdkBase.d.ts +10 -0
- package/types-legacy/ts4.2/AeSdkWallet.d.ts +1 -1
- package/types-legacy/ts4.2/account/Base.d.ts +44 -2
- package/types-legacy/ts4.2/account/Generalized.d.ts +3 -0
- package/types-legacy/ts4.2/account/Ledger.d.ts +3 -0
- package/types-legacy/ts4.2/account/Memory.d.ts +10 -0
- package/types-legacy/ts4.2/account/Rpc.d.ts +4 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/rpc/types.d.ts +9 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/schema.d.ts +1 -0
- package/types-legacy/ts4.2/contract/delegation-signature.d.ts +2 -1
- package/types-legacy/ts4.2/spend.d.ts +2 -1
- package/types-legacy/ts4.2/tx/builder/field-types/index.d.ts +28 -153
- package/types-legacy/ts4.5/AeSdkBase.d.ts +10 -0
- package/types-legacy/ts4.5/AeSdkWallet.d.ts +1 -1
- package/types-legacy/ts4.5/account/Base.d.ts +44 -2
- package/types-legacy/ts4.5/account/Generalized.d.ts +3 -0
- package/types-legacy/ts4.5/account/Ledger.d.ts +3 -0
- package/types-legacy/ts4.5/account/Memory.d.ts +10 -0
- package/types-legacy/ts4.5/account/Rpc.d.ts +4 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/rpc/types.d.ts +9 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/schema.d.ts +1 -0
- package/types-legacy/ts4.5/contract/delegation-signature.d.ts +2 -1
- package/types-legacy/ts4.5/spend.d.ts +2 -1
- package/types-legacy/ts4.5/tx/builder/field-types/index.d.ts +28 -153
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.mjs","names":["coreClient","Parameters","Mappers","Node","ServiceClient","constructor","$host","options","_ref","_options$endpoint","undefined","Error","defaults","requestContentType","packageDetails","userAgentPrefix","userAgentOptions","optionsWithDefaults","endpoint","baseUri","getTopHeader","sendOperationRequest","getTopHeaderOperationSpec","getCurrentKeyBlock","getCurrentKeyBlockOperationSpec","getCurrentKeyBlockHash","getCurrentKeyBlockHashOperationSpec","getCurrentKeyBlockHeight","getCurrentKeyBlockHeightOperationSpec","getPendingKeyBlock","getPendingKeyBlockOperationSpec","getKeyBlockByHash","hash","getKeyBlockByHashOperationSpec","getKeyBlockByHeight","height","getKeyBlockByHeightOperationSpec","getMicroBlockHeaderByHash","getMicroBlockHeaderByHashOperationSpec","getMicroBlockTransactionsByHash","getMicroBlockTransactionsByHashOperationSpec","getMicroBlockTransactionByHashAndIndex","index","getMicroBlockTransactionByHashAndIndexOperationSpec","getMicroBlockTransactionsCountByHash","getMicroBlockTransactionsCountByHashOperationSpec","getCurrentGeneration","getCurrentGenerationOperationSpec","getGenerationByHash","getGenerationByHashOperationSpec","getGenerationByHeight","getGenerationByHeightOperationSpec","getAccountByPubkey","pubkey","getAccountByPubkeyOperationSpec","getAccountByPubkeyAndHeight","getAccountByPubkeyAndHeightOperationSpec","getAccountByPubkeyAndHash","getAccountByPubkeyAndHashOperationSpec","getPendingAccountTransactionsByPubkey","getPendingAccountTransactionsByPubkeyOperationSpec","getAccountNextNonce","getAccountNextNonceOperationSpec","protectedDryRunTxs","body","protectedDryRunTxsOperationSpec","getTransactionByHash","getTransactionByHashOperationSpec","getTransactionInfoByHash","getTransactionInfoByHashOperationSpec","postTransaction","postTransactionOperationSpec","getContract","getContractOperationSpec","getContractCode","getContractCodeOperationSpec","getContractPoI","getContractPoIOperationSpec","getOracleByPubkey","getOracleByPubkeyOperationSpec","getOracleQueriesByPubkey","getOracleQueriesByPubkeyOperationSpec","getOracleQueryByPubkeyAndQueryId","queryId","getOracleQueryByPubkeyAndQueryIdOperationSpec","getNameEntryByName","name","getNameEntryByNameOperationSpec","getChannelByPubkey","getChannelByPubkeyOperationSpec","getPeerPubkey","getPeerPubkeyOperationSpec","getStatus","getStatusOperationSpec","getChainEnds","getChainEndsOperationSpec","serializer","createSerializer","path","httpMethod","responses","bodyMapper","Header","ErrorModel","isError","queryParameters","intAsString","urlParameters","headerParameters","accept","KeyBlock","HashResponse","HeightResponse","MicroBlockHeader","SignedTxs","SignedTx","CountResponse","Generation","Account","NextNonceResponse","strategy","DryRunResults","requestBody","contentType","mediaType","TxInfoObject","PostTxResponse","body1","ContractObject","ByteCode","PoI","RegisteredOracle","OracleQueries","from","limit","type","OracleQuery","NameEntry","Channel","PeerPubKey","Status","element"],"sources":["../../../src/apis/node/node.ts"],"sourcesContent":["import * as coreClient from \"@azure/core-client\";\nimport * as Parameters from \"./models/parameters\";\nimport * as Mappers from \"./models/mappers\";\nimport {\n NodeOptionalParams,\n GetTopHeaderOptionalParams,\n GetTopHeaderResponse,\n GetCurrentKeyBlockOptionalParams,\n GetCurrentKeyBlockResponse,\n GetCurrentKeyBlockHashOptionalParams,\n GetCurrentKeyBlockHashResponse,\n GetCurrentKeyBlockHeightOptionalParams,\n GetCurrentKeyBlockHeightResponse,\n GetPendingKeyBlockOptionalParams,\n GetPendingKeyBlockResponse,\n GetKeyBlockByHashOptionalParams,\n GetKeyBlockByHashResponse,\n GetKeyBlockByHeightOptionalParams,\n GetKeyBlockByHeightResponse,\n GetMicroBlockHeaderByHashOptionalParams,\n GetMicroBlockHeaderByHashResponse,\n GetMicroBlockTransactionsByHashOptionalParams,\n GetMicroBlockTransactionsByHashResponse,\n GetMicroBlockTransactionByHashAndIndexOptionalParams,\n GetMicroBlockTransactionByHashAndIndexResponse,\n GetMicroBlockTransactionsCountByHashOptionalParams,\n GetMicroBlockTransactionsCountByHashResponse,\n GetCurrentGenerationOptionalParams,\n GetCurrentGenerationResponse,\n GetGenerationByHashOptionalParams,\n GetGenerationByHashResponse,\n GetGenerationByHeightOptionalParams,\n GetGenerationByHeightResponse,\n GetAccountByPubkeyOptionalParams,\n GetAccountByPubkeyResponse,\n GetAccountByPubkeyAndHeightOptionalParams,\n GetAccountByPubkeyAndHeightResponse,\n GetAccountByPubkeyAndHashOptionalParams,\n GetAccountByPubkeyAndHashResponse,\n GetPendingAccountTransactionsByPubkeyOptionalParams,\n GetPendingAccountTransactionsByPubkeyResponse,\n GetAccountNextNonceOptionalParams,\n GetAccountNextNonceResponse,\n DryRunInput,\n ProtectedDryRunTxsOptionalParams,\n ProtectedDryRunTxsResponse,\n GetTransactionByHashOptionalParams,\n GetTransactionByHashResponse,\n GetTransactionInfoByHashOptionalParams,\n GetTransactionInfoByHashResponse,\n EncodedTx,\n PostTransactionOptionalParams,\n PostTransactionResponse,\n GetContractOptionalParams,\n GetContractResponse,\n GetContractCodeOptionalParams,\n GetContractCodeResponse,\n GetContractPoIOptionalParams,\n GetContractPoIResponse,\n GetOracleByPubkeyOptionalParams,\n GetOracleByPubkeyResponse,\n GetOracleQueriesByPubkeyOptionalParams,\n GetOracleQueriesByPubkeyResponse,\n GetOracleQueryByPubkeyAndQueryIdOptionalParams,\n GetOracleQueryByPubkeyAndQueryIdResponse,\n GetNameEntryByNameOptionalParams,\n GetNameEntryByNameResponse,\n GetChannelByPubkeyOptionalParams,\n GetChannelByPubkeyResponse,\n GetPeerPubkeyOptionalParams,\n GetPeerPubkeyResponse,\n GetStatusOptionalParams,\n GetStatusResponse,\n GetChainEndsOptionalParams,\n GetChainEndsResponse\n} from \"./models\";\n\nexport class Node extends coreClient.ServiceClient {\n $host: string;\n intAsString?: boolean;\n\n /**\n * Initializes a new instance of the Node class.\n * @param $host server parameter\n * @param options The parameter options\n */\n constructor($host: string, options?: NodeOptionalParams) {\n if ($host === undefined) {\n throw new Error(\"'$host' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: NodeOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-node/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"{$host}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.$host = $host;\n }\n\n /**\n * Get the top header (either key or micro block)\n * @param options The options parameters.\n */\n getTopHeader(\n options?: GetTopHeaderOptionalParams\n ): Promise<GetTopHeaderResponse> {\n return this.sendOperationRequest({ options }, getTopHeaderOperationSpec);\n }\n\n /**\n * Get the current key block\n * @param options The options parameters.\n */\n getCurrentKeyBlock(\n options?: GetCurrentKeyBlockOptionalParams\n ): Promise<GetCurrentKeyBlockResponse> {\n return this.sendOperationRequest(\n { options },\n getCurrentKeyBlockOperationSpec\n );\n }\n\n /**\n * Get the hash of the current key block\n * @param options The options parameters.\n */\n getCurrentKeyBlockHash(\n options?: GetCurrentKeyBlockHashOptionalParams\n ): Promise<GetCurrentKeyBlockHashResponse> {\n return this.sendOperationRequest(\n { options },\n getCurrentKeyBlockHashOperationSpec\n );\n }\n\n /**\n * Get the height of the current key block\n * @param options The options parameters.\n */\n getCurrentKeyBlockHeight(\n options?: GetCurrentKeyBlockHeightOptionalParams\n ): Promise<GetCurrentKeyBlockHeightResponse> {\n return this.sendOperationRequest(\n { options },\n getCurrentKeyBlockHeightOperationSpec\n );\n }\n\n /**\n * Get the pending key block\n * @param options The options parameters.\n */\n getPendingKeyBlock(\n options?: GetPendingKeyBlockOptionalParams\n ): Promise<GetPendingKeyBlockResponse> {\n return this.sendOperationRequest(\n { options },\n getPendingKeyBlockOperationSpec\n );\n }\n\n /**\n * Get a key block by hash\n * @param hash The hash of the block - either a keyblock or a microblock\n * @param options The options parameters.\n */\n getKeyBlockByHash(\n hash: string,\n options?: GetKeyBlockByHashOptionalParams\n ): Promise<GetKeyBlockByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getKeyBlockByHashOperationSpec\n );\n }\n\n /**\n * Get a key block by height\n * @param height The height\n * @param options The options parameters.\n */\n getKeyBlockByHeight(\n height: number,\n options?: GetKeyBlockByHeightOptionalParams\n ): Promise<GetKeyBlockByHeightResponse> {\n return this.sendOperationRequest(\n { height, options },\n getKeyBlockByHeightOperationSpec\n );\n }\n\n /**\n * Get a micro block header by hash\n * @param hash The hash of the block - either a keyblock or a microblock\n * @param options The options parameters.\n */\n getMicroBlockHeaderByHash(\n hash: string,\n options?: GetMicroBlockHeaderByHashOptionalParams\n ): Promise<GetMicroBlockHeaderByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getMicroBlockHeaderByHashOperationSpec\n );\n }\n\n /**\n * Get micro block transactions by hash\n * @param hash The hash of the micro block\n * @param options The options parameters.\n */\n getMicroBlockTransactionsByHash(\n hash: string,\n options?: GetMicroBlockTransactionsByHashOptionalParams\n ): Promise<GetMicroBlockTransactionsByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getMicroBlockTransactionsByHashOperationSpec\n );\n }\n\n /**\n * Get a micro block transaction by hash and index\n * @param hash The hash of the micro block\n * @param index The index of the transaction in a block\n * @param options The options parameters.\n */\n getMicroBlockTransactionByHashAndIndex(\n hash: string,\n index: number,\n options?: GetMicroBlockTransactionByHashAndIndexOptionalParams\n ): Promise<GetMicroBlockTransactionByHashAndIndexResponse> {\n return this.sendOperationRequest(\n { hash, index, options },\n getMicroBlockTransactionByHashAndIndexOperationSpec\n );\n }\n\n /**\n * Get micro block transaction count by hash\n * @param hash The hash of the micro block\n * @param options The options parameters.\n */\n getMicroBlockTransactionsCountByHash(\n hash: string,\n options?: GetMicroBlockTransactionsCountByHashOptionalParams\n ): Promise<GetMicroBlockTransactionsCountByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getMicroBlockTransactionsCountByHashOperationSpec\n );\n }\n\n /**\n * Get the current generation\n * @param options The options parameters.\n */\n getCurrentGeneration(\n options?: GetCurrentGenerationOptionalParams\n ): Promise<GetCurrentGenerationResponse> {\n return this.sendOperationRequest(\n { options },\n getCurrentGenerationOperationSpec\n );\n }\n\n /**\n * Get a generation by hash\n * @param hash The hash of the key block\n * @param options The options parameters.\n */\n getGenerationByHash(\n hash: string,\n options?: GetGenerationByHashOptionalParams\n ): Promise<GetGenerationByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getGenerationByHashOperationSpec\n );\n }\n\n /**\n * Get a generation by height\n * @param height The height\n * @param options The options parameters.\n */\n getGenerationByHeight(\n height: number,\n options?: GetGenerationByHeightOptionalParams\n ): Promise<GetGenerationByHeightResponse> {\n return this.sendOperationRequest(\n { height, options },\n getGenerationByHeightOperationSpec\n );\n }\n\n /**\n * Get an account by public key\n * @param pubkey The public key of the account\n * @param options The options parameters.\n */\n getAccountByPubkey(\n pubkey: string,\n options?: GetAccountByPubkeyOptionalParams\n ): Promise<GetAccountByPubkeyResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getAccountByPubkeyOperationSpec\n );\n }\n\n /**\n * Get an account by public key after the opening key block of the generation at height\n * @param pubkey The public key of the account\n * @param height The height\n * @param options The options parameters.\n */\n getAccountByPubkeyAndHeight(\n pubkey: string,\n height: number,\n options?: GetAccountByPubkeyAndHeightOptionalParams\n ): Promise<GetAccountByPubkeyAndHeightResponse> {\n return this.sendOperationRequest(\n { pubkey, height, options },\n getAccountByPubkeyAndHeightOperationSpec\n );\n }\n\n /**\n * Get an account by public key after the block indicated by hash. Can be either a micro block or a\n * keyblock hash\n * @param pubkey The public key of the account\n * @param hash The hash of the block - either a keyblock or a microblock\n * @param options The options parameters.\n */\n getAccountByPubkeyAndHash(\n pubkey: string,\n hash: string,\n options?: GetAccountByPubkeyAndHashOptionalParams\n ): Promise<GetAccountByPubkeyAndHashResponse> {\n return this.sendOperationRequest(\n { pubkey, hash, options },\n getAccountByPubkeyAndHashOperationSpec\n );\n }\n\n /**\n * Get pending account transactions by public key\n * @param pubkey The public key of the account\n * @param options The options parameters.\n */\n getPendingAccountTransactionsByPubkey(\n pubkey: string,\n options?: GetPendingAccountTransactionsByPubkeyOptionalParams\n ): Promise<GetPendingAccountTransactionsByPubkeyResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getPendingAccountTransactionsByPubkeyOperationSpec\n );\n }\n\n /**\n * Get an account's next nonce; This is computed according to whatever is the current account nonce and\n * what transactions are currently present in the transaction pool\n * @param pubkey The public key of the account\n * @param options The options parameters.\n */\n getAccountNextNonce(\n pubkey: string,\n options?: GetAccountNextNonceOptionalParams\n ): Promise<GetAccountNextNonceResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getAccountNextNonceOperationSpec\n );\n }\n\n /**\n * Dry-run transactions on top of a given block. Supports all TXs except GAMetaTx, PayingForTx and\n * OffchainTx. The maximum gas limit of all calls is capped. The maximum gas limit per request is a\n * global node setting. Since DryRunCallReq object do not have a mandatory gas field, if not set a\n * default value of 1000000 is being used instead.\n * @param body transactions\n * @param options The options parameters.\n */\n protectedDryRunTxs(\n body: DryRunInput,\n options?: ProtectedDryRunTxsOptionalParams\n ): Promise<ProtectedDryRunTxsResponse> {\n return this.sendOperationRequest(\n { body, options },\n protectedDryRunTxsOperationSpec\n );\n }\n\n /**\n * Get a transaction by hash\n * @param hash The hash of the transaction\n * @param options The options parameters.\n */\n getTransactionByHash(\n hash: string,\n options?: GetTransactionByHashOptionalParams\n ): Promise<GetTransactionByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getTransactionByHashOperationSpec\n );\n }\n\n /**\n * @param hash The hash of the transaction\n * @param options The options parameters.\n */\n getTransactionInfoByHash(\n hash: string,\n options?: GetTransactionInfoByHashOptionalParams\n ): Promise<GetTransactionInfoByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getTransactionInfoByHashOperationSpec\n );\n }\n\n /**\n * Post a new transaction\n * @param body The new transaction\n * @param options The options parameters.\n */\n postTransaction(\n body: EncodedTx,\n options?: PostTransactionOptionalParams\n ): Promise<PostTransactionResponse> {\n return this.sendOperationRequest(\n { body, options },\n postTransactionOperationSpec\n );\n }\n\n /**\n * Get a contract by pubkey\n * @param pubkey Contract pubkey to get proof for\n * @param options The options parameters.\n */\n getContract(\n pubkey: string,\n options?: GetContractOptionalParams\n ): Promise<GetContractResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getContractOperationSpec\n );\n }\n\n /**\n * Get contract code by pubkey\n * @param pubkey Contract pubkey to get proof for\n * @param options The options parameters.\n */\n getContractCode(\n pubkey: string,\n options?: GetContractCodeOptionalParams\n ): Promise<GetContractCodeResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getContractCodeOperationSpec\n );\n }\n\n /**\n * Get a proof of inclusion for a contract\n * @param pubkey Contract pubkey to get proof for\n * @param options The options parameters.\n */\n getContractPoI(\n pubkey: string,\n options?: GetContractPoIOptionalParams\n ): Promise<GetContractPoIResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getContractPoIOperationSpec\n );\n }\n\n /**\n * Get an oracle by public key\n * @param pubkey The public key of the oracle\n * @param options The options parameters.\n */\n getOracleByPubkey(\n pubkey: string,\n options?: GetOracleByPubkeyOptionalParams\n ): Promise<GetOracleByPubkeyResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getOracleByPubkeyOperationSpec\n );\n }\n\n /**\n * Get oracle queries by public key\n * @param pubkey The public key of the oracle\n * @param options The options parameters.\n */\n getOracleQueriesByPubkey(\n pubkey: string,\n options?: GetOracleQueriesByPubkeyOptionalParams\n ): Promise<GetOracleQueriesByPubkeyResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getOracleQueriesByPubkeyOperationSpec\n );\n }\n\n /**\n * Get an oracle query by public key and query ID\n * @param pubkey The public key of the oracle\n * @param queryId The ID of the query\n * @param options The options parameters.\n */\n getOracleQueryByPubkeyAndQueryId(\n pubkey: string,\n queryId: string,\n options?: GetOracleQueryByPubkeyAndQueryIdOptionalParams\n ): Promise<GetOracleQueryByPubkeyAndQueryIdResponse> {\n return this.sendOperationRequest(\n { pubkey, queryId, options },\n getOracleQueryByPubkeyAndQueryIdOperationSpec\n );\n }\n\n /**\n * Get name entry from naming system\n * @param name The name key of the name entry\n * @param options The options parameters.\n */\n getNameEntryByName(\n name: string,\n options?: GetNameEntryByNameOptionalParams\n ): Promise<GetNameEntryByNameResponse> {\n return this.sendOperationRequest(\n { name, options },\n getNameEntryByNameOperationSpec\n );\n }\n\n /**\n * Get channel by public key\n * @param pubkey The pubkey of the channel\n * @param options The options parameters.\n */\n getChannelByPubkey(\n pubkey: string,\n options?: GetChannelByPubkeyOptionalParams\n ): Promise<GetChannelByPubkeyResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getChannelByPubkeyOperationSpec\n );\n }\n\n /**\n * Get peer public key\n * @param options The options parameters.\n */\n getPeerPubkey(\n options?: GetPeerPubkeyOptionalParams\n ): Promise<GetPeerPubkeyResponse> {\n return this.sendOperationRequest({ options }, getPeerPubkeyOperationSpec);\n }\n\n /**\n * Get the status of a node\n * @param options The options parameters.\n */\n getStatus(options?: GetStatusOptionalParams): Promise<GetStatusResponse> {\n return this.sendOperationRequest({ options }, getStatusOperationSpec);\n }\n\n /**\n * Get oldest keyblock hashes counting from genesis including orphans\n * @param options The options parameters.\n */\n getChainEnds(\n options?: GetChainEndsOptionalParams\n ): Promise<GetChainEndsResponse> {\n return this.sendOperationRequest({ options }, getChainEndsOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getTopHeaderOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/headers/top\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Header\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getCurrentKeyBlockOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/key-blocks/current\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KeyBlock\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getCurrentKeyBlockHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/key-blocks/current/hash\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.HashResponse\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getCurrentKeyBlockHeightOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/key-blocks/current/height\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.HeightResponse\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getPendingKeyBlockOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/key-blocks/pending\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KeyBlock\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getKeyBlockByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/key-blocks/hash/{hash}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KeyBlock\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getKeyBlockByHeightOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/key-blocks/height/{height}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KeyBlock\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.height],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getMicroBlockHeaderByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/micro-blocks/hash/{hash}/header\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MicroBlockHeader\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getMicroBlockTransactionsByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/micro-blocks/hash/{hash}/transactions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SignedTxs\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getMicroBlockTransactionByHashAndIndexOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/micro-blocks/hash/{hash}/transactions/index/{index}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SignedTx\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash, Parameters.index],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getMicroBlockTransactionsCountByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/micro-blocks/hash/{hash}/transactions/count\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CountResponse\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getCurrentGenerationOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/generations/current\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Generation\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getGenerationByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/generations/hash/{hash}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Generation\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getGenerationByHeightOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/generations/height/{height}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Generation\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.height],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getAccountByPubkeyOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/accounts/{pubkey}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Account\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getAccountByPubkeyAndHeightOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/accounts/{pubkey}/height/{height}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Account\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.height, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getAccountByPubkeyAndHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/accounts/{pubkey}/hash/{hash}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Account\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getPendingAccountTransactionsByPubkeyOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/accounts/{pubkey}/transactions/pending\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SignedTxs\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getAccountNextNonceOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/accounts/{pubkey}/next-nonce\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.NextNonceResponse\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString, Parameters.strategy],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst protectedDryRunTxsOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/dry-run\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DryRunResults\n },\n 403: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n requestBody: Parameters.body,\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getTransactionByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/transactions/{hash}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SignedTx\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getTransactionInfoByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/transactions/{hash}/info\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TxInfoObject\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst postTransactionOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/transactions\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.PostTxResponse\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n requestBody: Parameters.body1,\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getContractOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/contracts/{pubkey}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ContractObject\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getContractCodeOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/contracts/{pubkey}/code\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ByteCode\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getContractPoIOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/contracts/{pubkey}/poi\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PoI\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOracleByPubkeyOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/oracles/{pubkey}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RegisteredOracle\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOracleQueriesByPubkeyOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/oracles/{pubkey}/queries\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OracleQueries\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [\n Parameters.intAsString,\n Parameters.from,\n Parameters.limit,\n Parameters.type\n ],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOracleQueryByPubkeyAndQueryIdOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/oracles/{pubkey}/queries/{query-id}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OracleQuery\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey, Parameters.queryId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getNameEntryByNameOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/names/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.NameEntry\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getChannelByPubkeyOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/channels/{pubkey}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Channel\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getPeerPubkeyOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/peers/pubkey\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PeerPubKey\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getStatusOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/status\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Status\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getChainEndsOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/status/chain-ends\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Sequence\", element: { type: { name: \"String\" } } }\n }\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\n"],"mappings":"AAAA,OAAO,KAAKA,UAAU,MAAM,oBAAoB;AAAC,OAC1C,KAAKC,UAAU;AAAA,OACf,KAAKC,OAAO;AA2EnB,OAAO,MAAMC,IAAI,SAASH,UAAU,CAACI,aAAa,CAAC;EAIjD;AACF;AACA;AACA;AACA;EACEC,WAAWA,CAACC,KAAa,EAAEC,OAA4B,EAAE;IAAA,IAAAC,IAAA,EA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F,CAAC;EACDlC,eAAe,EAAE,CAACxG,UAAU,CAACyG,WAAW,CAAC;EACzCC,aAAa,EAAE,CAAC1G,UAAU,CAACK,KAAK,CAAC;EACjCsG,gBAAgB,EAAE,CAAC3G,UAAU,CAAC4G,MAAM,CAAC;EACrCb;AACF,CAAC;AACD,MAAMH,sBAAgD,GAAG;EACvDK,IAAI,EAAE,YAAY;EAClBC,UAAU,EAAE,KAAK;EACjBC,SAAS,EAAE;IACT,GAAG,EAAE;MACHC,UAAU,EAAEnG,OAAO,CAAC0I;IACtB;EACF,CAAC;EACDnC,eAAe,EAAE,CAACxG,UAAU,CAACyG,WAAW,CAAC;EACzCC,aAAa,EAAE,CAAC1G,UAAU,CAACK,KAAK,CAAC;EACjCsG,gBAAgB,EAAE,CAAC3G,UAAU,CAAC4G,MAAM,CAAC;EACrCb;AACF,CAAC;AACD,MAAMD,yBAAmD,GAAG;EAC1DG,IAAI,EAAE,uBAAuB;EAC7BC,UAAU,EAAE,KAAK;EACjBC,SAAS,EAAE;IACT,GAAG,EAAE;MACHC,UAAU,EAAE;QACVkC,IAAI,EAAE;UAAEjD,IAAI,EAAE,UAAU;UAAEuD,OAAO,EAAE;YAAEN,IAAI,EAAE;cAAEjD,IAAI,EAAE;YAAS;UAAE;QAAE;MAClE;IACF;EACF,CAAC;EACDmB,eAAe,EAAE,CAACxG,UAAU,CAACyG,WAAW,CAAC;EACzCC,aAAa,EAAE,CAAC1G,UAAU,CAACK,KAAK,CAAC;EACjCsG,gBAAgB,EAAE,CAAC3G,UAAU,CAAC4G,MAAM,CAAC;EACrCb;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"node.mjs","names":["coreClient","Parameters","Mappers","Node","ServiceClient","constructor","$host","options","_ref","_options$endpoint","undefined","Error","defaults","requestContentType","packageDetails","userAgentPrefix","userAgentOptions","optionsWithDefaults","endpoint","baseUri","getTopHeader","sendOperationRequest","getTopHeaderOperationSpec","getCurrentKeyBlock","getCurrentKeyBlockOperationSpec","getCurrentKeyBlockHash","getCurrentKeyBlockHashOperationSpec","getCurrentKeyBlockHeight","getCurrentKeyBlockHeightOperationSpec","getPendingKeyBlock","getPendingKeyBlockOperationSpec","getKeyBlockByHash","hash","getKeyBlockByHashOperationSpec","getKeyBlockByHeight","height","getKeyBlockByHeightOperationSpec","getMicroBlockHeaderByHash","getMicroBlockHeaderByHashOperationSpec","getMicroBlockTransactionsByHash","getMicroBlockTransactionsByHashOperationSpec","getMicroBlockTransactionByHashAndIndex","index","getMicroBlockTransactionByHashAndIndexOperationSpec","getMicroBlockTransactionsCountByHash","getMicroBlockTransactionsCountByHashOperationSpec","getCurrentGeneration","getCurrentGenerationOperationSpec","getGenerationByHash","getGenerationByHashOperationSpec","getGenerationByHeight","getGenerationByHeightOperationSpec","getAccountByPubkey","pubkey","getAccountByPubkeyOperationSpec","getAccountByPubkeyAndHeight","getAccountByPubkeyAndHeightOperationSpec","getAccountByPubkeyAndHash","getAccountByPubkeyAndHashOperationSpec","getPendingAccountTransactionsByPubkey","getPendingAccountTransactionsByPubkeyOperationSpec","getAccountNextNonce","getAccountNextNonceOperationSpec","protectedDryRunTxs","body","protectedDryRunTxsOperationSpec","getTransactionByHash","getTransactionByHashOperationSpec","getTransactionInfoByHash","getTransactionInfoByHashOperationSpec","postTransaction","postTransactionOperationSpec","getContract","getContractOperationSpec","getContractCode","getContractCodeOperationSpec","getContractPoI","getContractPoIOperationSpec","getOracleByPubkey","getOracleByPubkeyOperationSpec","getOracleQueriesByPubkey","getOracleQueriesByPubkeyOperationSpec","getOracleQueryByPubkeyAndQueryId","queryId","getOracleQueryByPubkeyAndQueryIdOperationSpec","getNameEntryByName","name","getNameEntryByNameOperationSpec","getChannelByPubkey","getChannelByPubkeyOperationSpec","getPeerPubkey","getPeerPubkeyOperationSpec","getStatus","getStatusOperationSpec","getChainEnds","getChainEndsOperationSpec","serializer","createSerializer","path","httpMethod","responses","bodyMapper","Header","ErrorModel","isError","queryParameters","intAsString","urlParameters","headerParameters","accept","KeyBlock","HashResponse","HeightResponse","MicroBlockHeader","SignedTxs","SignedTx","CountResponse","Generation","Account","NextNonceResponse","strategy","DryRunResults","requestBody","contentType","mediaType","TxInfoObject","PostTxResponse","body1","ContractObject","ByteCode","PoI","RegisteredOracle","OracleQueries","from","limit","type","OracleQuery","NameEntry","Channel","PeerPubKey","Status","element"],"sources":["../../../src/apis/node/node.ts"],"sourcesContent":["import * as coreClient from \"@azure/core-client\";\nimport * as Parameters from \"./models/parameters\";\nimport * as Mappers from \"./models/mappers\";\nimport {\n NodeOptionalParams,\n GetTopHeaderOptionalParams,\n GetTopHeaderResponse,\n GetCurrentKeyBlockOptionalParams,\n GetCurrentKeyBlockResponse,\n GetCurrentKeyBlockHashOptionalParams,\n GetCurrentKeyBlockHashResponse,\n GetCurrentKeyBlockHeightOptionalParams,\n GetCurrentKeyBlockHeightResponse,\n GetPendingKeyBlockOptionalParams,\n GetPendingKeyBlockResponse,\n GetKeyBlockByHashOptionalParams,\n GetKeyBlockByHashResponse,\n GetKeyBlockByHeightOptionalParams,\n GetKeyBlockByHeightResponse,\n GetMicroBlockHeaderByHashOptionalParams,\n GetMicroBlockHeaderByHashResponse,\n GetMicroBlockTransactionsByHashOptionalParams,\n GetMicroBlockTransactionsByHashResponse,\n GetMicroBlockTransactionByHashAndIndexOptionalParams,\n GetMicroBlockTransactionByHashAndIndexResponse,\n GetMicroBlockTransactionsCountByHashOptionalParams,\n GetMicroBlockTransactionsCountByHashResponse,\n GetCurrentGenerationOptionalParams,\n GetCurrentGenerationResponse,\n GetGenerationByHashOptionalParams,\n GetGenerationByHashResponse,\n GetGenerationByHeightOptionalParams,\n GetGenerationByHeightResponse,\n GetAccountByPubkeyOptionalParams,\n GetAccountByPubkeyResponse,\n GetAccountByPubkeyAndHeightOptionalParams,\n GetAccountByPubkeyAndHeightResponse,\n GetAccountByPubkeyAndHashOptionalParams,\n GetAccountByPubkeyAndHashResponse,\n GetPendingAccountTransactionsByPubkeyOptionalParams,\n GetPendingAccountTransactionsByPubkeyResponse,\n GetAccountNextNonceOptionalParams,\n GetAccountNextNonceResponse,\n DryRunInput,\n ProtectedDryRunTxsOptionalParams,\n ProtectedDryRunTxsResponse,\n GetTransactionByHashOptionalParams,\n GetTransactionByHashResponse,\n GetTransactionInfoByHashOptionalParams,\n GetTransactionInfoByHashResponse,\n EncodedTx,\n PostTransactionOptionalParams,\n PostTransactionResponse,\n GetContractOptionalParams,\n GetContractResponse,\n GetContractCodeOptionalParams,\n GetContractCodeResponse,\n GetContractPoIOptionalParams,\n GetContractPoIResponse,\n GetOracleByPubkeyOptionalParams,\n GetOracleByPubkeyResponse,\n GetOracleQueriesByPubkeyOptionalParams,\n GetOracleQueriesByPubkeyResponse,\n GetOracleQueryByPubkeyAndQueryIdOptionalParams,\n GetOracleQueryByPubkeyAndQueryIdResponse,\n GetNameEntryByNameOptionalParams,\n GetNameEntryByNameResponse,\n GetChannelByPubkeyOptionalParams,\n GetChannelByPubkeyResponse,\n GetPeerPubkeyOptionalParams,\n GetPeerPubkeyResponse,\n GetStatusOptionalParams,\n GetStatusResponse,\n GetChainEndsOptionalParams,\n GetChainEndsResponse\n} from \"./models\";\n\nexport class Node extends coreClient.ServiceClient {\n $host: string;\n intAsString?: boolean;\n\n /**\n * Initializes a new instance of the Node class.\n * @param $host server parameter\n * @param options The parameter options\n */\n constructor($host: string, options?: NodeOptionalParams) {\n if ($host === undefined) {\n throw new Error(\"'$host' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: NodeOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-node/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"{$host}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.$host = $host;\n }\n\n /**\n * Get the top header (either key or micro block)\n * @param options The options parameters.\n */\n getTopHeader(\n options?: GetTopHeaderOptionalParams\n ): Promise<GetTopHeaderResponse> {\n return this.sendOperationRequest({ options }, getTopHeaderOperationSpec);\n }\n\n /**\n * Get the current key block\n * @param options The options parameters.\n */\n getCurrentKeyBlock(\n options?: GetCurrentKeyBlockOptionalParams\n ): Promise<GetCurrentKeyBlockResponse> {\n return this.sendOperationRequest(\n { options },\n getCurrentKeyBlockOperationSpec\n );\n }\n\n /**\n * Get the hash of the current key block\n * @param options The options parameters.\n */\n getCurrentKeyBlockHash(\n options?: GetCurrentKeyBlockHashOptionalParams\n ): Promise<GetCurrentKeyBlockHashResponse> {\n return this.sendOperationRequest(\n { options },\n getCurrentKeyBlockHashOperationSpec\n );\n }\n\n /**\n * Get the height of the current key block\n * @param options The options parameters.\n */\n getCurrentKeyBlockHeight(\n options?: GetCurrentKeyBlockHeightOptionalParams\n ): Promise<GetCurrentKeyBlockHeightResponse> {\n return this.sendOperationRequest(\n { options },\n getCurrentKeyBlockHeightOperationSpec\n );\n }\n\n /**\n * Get the pending key block\n * @param options The options parameters.\n */\n getPendingKeyBlock(\n options?: GetPendingKeyBlockOptionalParams\n ): Promise<GetPendingKeyBlockResponse> {\n return this.sendOperationRequest(\n { options },\n getPendingKeyBlockOperationSpec\n );\n }\n\n /**\n * Get a key block by hash\n * @param hash The hash of the block - either a keyblock or a microblock\n * @param options The options parameters.\n */\n getKeyBlockByHash(\n hash: string,\n options?: GetKeyBlockByHashOptionalParams\n ): Promise<GetKeyBlockByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getKeyBlockByHashOperationSpec\n );\n }\n\n /**\n * Get a key block by height\n * @param height The height\n * @param options The options parameters.\n */\n getKeyBlockByHeight(\n height: number,\n options?: GetKeyBlockByHeightOptionalParams\n ): Promise<GetKeyBlockByHeightResponse> {\n return this.sendOperationRequest(\n { height, options },\n getKeyBlockByHeightOperationSpec\n );\n }\n\n /**\n * Get a micro block header by hash\n * @param hash The hash of the block - either a keyblock or a microblock\n * @param options The options parameters.\n */\n getMicroBlockHeaderByHash(\n hash: string,\n options?: GetMicroBlockHeaderByHashOptionalParams\n ): Promise<GetMicroBlockHeaderByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getMicroBlockHeaderByHashOperationSpec\n );\n }\n\n /**\n * Get micro block transactions by hash\n * @param hash The hash of the micro block\n * @param options The options parameters.\n */\n getMicroBlockTransactionsByHash(\n hash: string,\n options?: GetMicroBlockTransactionsByHashOptionalParams\n ): Promise<GetMicroBlockTransactionsByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getMicroBlockTransactionsByHashOperationSpec\n );\n }\n\n /**\n * Get a micro block transaction by hash and index\n * @param hash The hash of the micro block\n * @param index The index of the transaction in a block\n * @param options The options parameters.\n */\n getMicroBlockTransactionByHashAndIndex(\n hash: string,\n index: number,\n options?: GetMicroBlockTransactionByHashAndIndexOptionalParams\n ): Promise<GetMicroBlockTransactionByHashAndIndexResponse> {\n return this.sendOperationRequest(\n { hash, index, options },\n getMicroBlockTransactionByHashAndIndexOperationSpec\n );\n }\n\n /**\n * Get micro block transaction count by hash\n * @param hash The hash of the micro block\n * @param options The options parameters.\n */\n getMicroBlockTransactionsCountByHash(\n hash: string,\n options?: GetMicroBlockTransactionsCountByHashOptionalParams\n ): Promise<GetMicroBlockTransactionsCountByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getMicroBlockTransactionsCountByHashOperationSpec\n );\n }\n\n /**\n * Get the current generation\n * @param options The options parameters.\n */\n getCurrentGeneration(\n options?: GetCurrentGenerationOptionalParams\n ): Promise<GetCurrentGenerationResponse> {\n return this.sendOperationRequest(\n { options },\n getCurrentGenerationOperationSpec\n );\n }\n\n /**\n * Get a generation by hash\n * @param hash The hash of the key block\n * @param options The options parameters.\n */\n getGenerationByHash(\n hash: string,\n options?: GetGenerationByHashOptionalParams\n ): Promise<GetGenerationByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getGenerationByHashOperationSpec\n );\n }\n\n /**\n * Get a generation by height\n * @param height The height\n * @param options The options parameters.\n */\n getGenerationByHeight(\n height: number,\n options?: GetGenerationByHeightOptionalParams\n ): Promise<GetGenerationByHeightResponse> {\n return this.sendOperationRequest(\n { height, options },\n getGenerationByHeightOperationSpec\n );\n }\n\n /**\n * Get an account by public key\n * @param pubkey The public key of the account\n * @param options The options parameters.\n */\n getAccountByPubkey(\n pubkey: string,\n options?: GetAccountByPubkeyOptionalParams\n ): Promise<GetAccountByPubkeyResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getAccountByPubkeyOperationSpec\n );\n }\n\n /**\n * Get an account by public key after the opening key block of the generation at height\n * @param pubkey The public key of the account\n * @param height The height\n * @param options The options parameters.\n */\n getAccountByPubkeyAndHeight(\n pubkey: string,\n height: number,\n options?: GetAccountByPubkeyAndHeightOptionalParams\n ): Promise<GetAccountByPubkeyAndHeightResponse> {\n return this.sendOperationRequest(\n { pubkey, height, options },\n getAccountByPubkeyAndHeightOperationSpec\n );\n }\n\n /**\n * Get an account by public key after the block indicated by hash. Can be either a micro block or a\n * keyblock hash\n * @param pubkey The public key of the account\n * @param hash The hash of the block - either a keyblock or a microblock\n * @param options The options parameters.\n */\n getAccountByPubkeyAndHash(\n pubkey: string,\n hash: string,\n options?: GetAccountByPubkeyAndHashOptionalParams\n ): Promise<GetAccountByPubkeyAndHashResponse> {\n return this.sendOperationRequest(\n { pubkey, hash, options },\n getAccountByPubkeyAndHashOperationSpec\n );\n }\n\n /**\n * Get pending account transactions by public key\n * @param pubkey The public key of the account\n * @param options The options parameters.\n */\n getPendingAccountTransactionsByPubkey(\n pubkey: string,\n options?: GetPendingAccountTransactionsByPubkeyOptionalParams\n ): Promise<GetPendingAccountTransactionsByPubkeyResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getPendingAccountTransactionsByPubkeyOperationSpec\n );\n }\n\n /**\n * Get an account's next nonce; This is computed according to whatever is the current account nonce and\n * what transactions are currently present in the transaction pool\n * @param pubkey The public key of the account\n * @param options The options parameters.\n */\n getAccountNextNonce(\n pubkey: string,\n options?: GetAccountNextNonceOptionalParams\n ): Promise<GetAccountNextNonceResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getAccountNextNonceOperationSpec\n );\n }\n\n /**\n * Dry-run transactions on top of a given block. Supports all TXs except GAMetaTx, PayingForTx and\n * OffchainTx. The maximum gas limit of all calls is capped. The maximum gas limit per request is a\n * global node setting. Since DryRunCallReq object do not have a mandatory gas field, if not set a\n * default value of 1000000 is being used instead.\n * @param body transactions\n * @param options The options parameters.\n */\n protectedDryRunTxs(\n body: DryRunInput,\n options?: ProtectedDryRunTxsOptionalParams\n ): Promise<ProtectedDryRunTxsResponse> {\n return this.sendOperationRequest(\n { body, options },\n protectedDryRunTxsOperationSpec\n );\n }\n\n /**\n * Get a transaction by hash\n * @param hash The hash of the transaction\n * @param options The options parameters.\n */\n getTransactionByHash(\n hash: string,\n options?: GetTransactionByHashOptionalParams\n ): Promise<GetTransactionByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getTransactionByHashOperationSpec\n );\n }\n\n /**\n * @param hash The hash of the transaction\n * @param options The options parameters.\n */\n getTransactionInfoByHash(\n hash: string,\n options?: GetTransactionInfoByHashOptionalParams\n ): Promise<GetTransactionInfoByHashResponse> {\n return this.sendOperationRequest(\n { hash, options },\n getTransactionInfoByHashOperationSpec\n );\n }\n\n /**\n * Post a new transaction\n * @param body The new transaction\n * @param options The options parameters.\n */\n postTransaction(\n body: EncodedTx,\n options?: PostTransactionOptionalParams\n ): Promise<PostTransactionResponse> {\n return this.sendOperationRequest(\n { body, options },\n postTransactionOperationSpec\n );\n }\n\n /**\n * Get a contract by pubkey\n * @param pubkey Contract pubkey to get proof for\n * @param options The options parameters.\n */\n getContract(\n pubkey: string,\n options?: GetContractOptionalParams\n ): Promise<GetContractResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getContractOperationSpec\n );\n }\n\n /**\n * Get contract code by pubkey\n * @param pubkey Contract pubkey to get proof for\n * @param options The options parameters.\n */\n getContractCode(\n pubkey: string,\n options?: GetContractCodeOptionalParams\n ): Promise<GetContractCodeResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getContractCodeOperationSpec\n );\n }\n\n /**\n * Get a proof of inclusion for a contract\n * @param pubkey Contract pubkey to get proof for\n * @param options The options parameters.\n */\n getContractPoI(\n pubkey: string,\n options?: GetContractPoIOptionalParams\n ): Promise<GetContractPoIResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getContractPoIOperationSpec\n );\n }\n\n /**\n * Get an oracle by public key\n * @param pubkey The public key of the oracle\n * @param options The options parameters.\n */\n getOracleByPubkey(\n pubkey: string,\n options?: GetOracleByPubkeyOptionalParams\n ): Promise<GetOracleByPubkeyResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getOracleByPubkeyOperationSpec\n );\n }\n\n /**\n * Get oracle queries by public key\n * @param pubkey The public key of the oracle\n * @param options The options parameters.\n */\n getOracleQueriesByPubkey(\n pubkey: string,\n options?: GetOracleQueriesByPubkeyOptionalParams\n ): Promise<GetOracleQueriesByPubkeyResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getOracleQueriesByPubkeyOperationSpec\n );\n }\n\n /**\n * Get an oracle query by public key and query ID\n * @param pubkey The public key of the oracle\n * @param queryId The ID of the query\n * @param options The options parameters.\n */\n getOracleQueryByPubkeyAndQueryId(\n pubkey: string,\n queryId: string,\n options?: GetOracleQueryByPubkeyAndQueryIdOptionalParams\n ): Promise<GetOracleQueryByPubkeyAndQueryIdResponse> {\n return this.sendOperationRequest(\n { pubkey, queryId, options },\n getOracleQueryByPubkeyAndQueryIdOperationSpec\n );\n }\n\n /**\n * Get name entry from naming system\n * @param name The name key of the name entry\n * @param options The options parameters.\n */\n getNameEntryByName(\n name: string,\n options?: GetNameEntryByNameOptionalParams\n ): Promise<GetNameEntryByNameResponse> {\n return this.sendOperationRequest(\n { name, options },\n getNameEntryByNameOperationSpec\n );\n }\n\n /**\n * Get channel by public key\n * @param pubkey The pubkey of the channel\n * @param options The options parameters.\n */\n getChannelByPubkey(\n pubkey: string,\n options?: GetChannelByPubkeyOptionalParams\n ): Promise<GetChannelByPubkeyResponse> {\n return this.sendOperationRequest(\n { pubkey, options },\n getChannelByPubkeyOperationSpec\n );\n }\n\n /**\n * Get peer public key\n * @param options The options parameters.\n */\n getPeerPubkey(\n options?: GetPeerPubkeyOptionalParams\n ): Promise<GetPeerPubkeyResponse> {\n return this.sendOperationRequest({ options }, getPeerPubkeyOperationSpec);\n }\n\n /**\n * Get the status of a node\n * @param options The options parameters.\n */\n getStatus(options?: GetStatusOptionalParams): Promise<GetStatusResponse> {\n return this.sendOperationRequest({ options }, getStatusOperationSpec);\n }\n\n /**\n * Get oldest keyblock hashes counting from genesis including orphans\n * @param options The options parameters.\n */\n getChainEnds(\n options?: GetChainEndsOptionalParams\n ): Promise<GetChainEndsResponse> {\n return this.sendOperationRequest({ options }, getChainEndsOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getTopHeaderOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/headers/top\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Header\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getCurrentKeyBlockOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/key-blocks/current\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KeyBlock\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getCurrentKeyBlockHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/key-blocks/current/hash\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.HashResponse\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getCurrentKeyBlockHeightOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/key-blocks/current/height\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.HeightResponse\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getPendingKeyBlockOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/key-blocks/pending\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KeyBlock\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getKeyBlockByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/key-blocks/hash/{hash}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KeyBlock\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getKeyBlockByHeightOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/key-blocks/height/{height}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KeyBlock\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.height],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getMicroBlockHeaderByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/micro-blocks/hash/{hash}/header\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MicroBlockHeader\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getMicroBlockTransactionsByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/micro-blocks/hash/{hash}/transactions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SignedTxs\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getMicroBlockTransactionByHashAndIndexOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/micro-blocks/hash/{hash}/transactions/index/{index}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SignedTx\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash, Parameters.index],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getMicroBlockTransactionsCountByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/micro-blocks/hash/{hash}/transactions/count\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CountResponse\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getCurrentGenerationOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/generations/current\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Generation\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getGenerationByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/generations/hash/{hash}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Generation\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getGenerationByHeightOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/generations/height/{height}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Generation\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.height],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getAccountByPubkeyOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/accounts/{pubkey}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Account\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getAccountByPubkeyAndHeightOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/accounts/{pubkey}/height/{height}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Account\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.height, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getAccountByPubkeyAndHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/accounts/{pubkey}/hash/{hash}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Account\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getPendingAccountTransactionsByPubkeyOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/accounts/{pubkey}/transactions/pending\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SignedTxs\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getAccountNextNonceOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/accounts/{pubkey}/next-nonce\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.NextNonceResponse\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString, Parameters.strategy],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst protectedDryRunTxsOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/dry-run\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DryRunResults\n },\n 403: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n requestBody: Parameters.body,\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getTransactionByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/transactions/{hash}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SignedTx\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getTransactionInfoByHashOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/transactions/{hash}/info\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TxInfoObject\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.hash],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst postTransactionOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/transactions\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.PostTxResponse\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n requestBody: Parameters.body1,\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getContractOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/contracts/{pubkey}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ContractObject\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getContractCodeOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/contracts/{pubkey}/code\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ByteCode\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getContractPoIOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/contracts/{pubkey}/poi\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PoI\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOracleByPubkeyOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/oracles/{pubkey}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RegisteredOracle\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOracleQueriesByPubkeyOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/oracles/{pubkey}/queries\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OracleQueries\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [\n Parameters.intAsString,\n Parameters.from,\n Parameters.limit,\n Parameters.type\n ],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOracleQueryByPubkeyAndQueryIdOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/oracles/{pubkey}/queries/{query-id}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OracleQuery\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey, Parameters.queryId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getNameEntryByNameOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/names/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.NameEntry\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getChannelByPubkeyOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/channels/{pubkey}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Channel\n },\n 400: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n },\n 404: {\n bodyMapper: Mappers.ErrorModel,\n isError: true\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host, Parameters.pubkey],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getPeerPubkeyOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/peers/pubkey\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PeerPubKey\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getStatusOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/status\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Status\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getChainEndsOperationSpec: coreClient.OperationSpec = {\n path: \"/v3/status/chain-ends\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Sequence\", element: { type: { name: \"String\" } } }\n }\n }\n },\n queryParameters: [Parameters.intAsString],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\n"],"mappings":"AAAA,OAAO,KAAKA,UAAU,MAAM,oBAAoB;AAAC,OAC1C,KAAKC,UAAU;AAAA,OACf,KAAKC,OAAO;AA2EnB,OAAO,MAAMC,IAAI,SAASH,UAAU,CAACI,aAAa,CAAC;EAIjD;AACF;AACA;AACA;AACA;EACEC,WAAWA,CAACC,KAAa,EAAEC,OAA4B,EAAE;IAAA,IAAAC,IAAA,EAAAC,iBAAA;IACvD,IAAIH,KAAK,KAAKI,SAAS,EAAE;MACvB,MAAM,IAAIC,KAAK,CAAC,wBAAwB,CAAC;IAC3C;;IAEA;IACA,IAAI,CAACJ,OAAO,EAAE;MACZA,OAAO,GAAG,CAAC,CAAC;IACd;IACA,MAAMK,QAA4B,GAAG;MACnCC,kBAAkB,EAAE;IACtB,CAAC;IAED,MAAMC,cAAc,GAAI,4BAA2B;IACnD,MAAMC,eAAe,GACnBR,OAAO,CAACS,gBAAgB,IAAIT,OAAO,CAACS,gBAAgB,CAACD,eAAe,GAC/D,GAAER,OAAO,CAACS,gBAAgB,CAACD,eAAgB,IAAGD,cAAe,EAAC,GAC9D,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CAAC;EACrCb;AACF,CAAC;AACD,MAAMD,yBAAmD,GAAG;EAC1DG,IAAI,EAAE,uBAAuB;EAC7BC,UAAU,EAAE,KAAK;EACjBC,SAAS,EAAE;IACT,GAAG,EAAE;MACHC,UAAU,EAAE;QACVkC,IAAI,EAAE;UAAEjD,IAAI,EAAE,UAAU;UAAEuD,OAAO,EAAE;YAAEN,IAAI,EAAE;cAAEjD,IAAI,EAAE;YAAS;UAAE;QAAE;MAClE;IACF;EACF,CAAC;EACDmB,eAAe,EAAE,CAACxG,UAAU,CAACyG,WAAW,CAAC;EACzCC,aAAa,EAAE,CAAC1G,UAAU,CAACK,KAAK,CAAC;EACjCsG,gBAAgB,EAAE,CAAC3G,UAAU,CAAC4G,MAAM,CAAC;EACrCb;AACF,CAAC"}
|
package/es/chain.mjs
CHANGED
|
@@ -211,7 +211,7 @@ export async function sendTransaction(txUnsigned, _ref6) {
|
|
|
211
211
|
rawTx: tx
|
|
212
212
|
};
|
|
213
213
|
// wait for transaction confirmation
|
|
214
|
-
if (confirm != null &&
|
|
214
|
+
if (confirm != null && +confirm > 0) {
|
|
215
215
|
const c = typeof confirm === 'boolean' ? undefined : confirm;
|
|
216
216
|
return {
|
|
217
217
|
...txData,
|
package/es/chain.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.mjs","names":["AE_AMOUNT_FORMATS","formatAmount","verifyTransaction","ensureError","isAccountNotFoundError","pause","isNameValid","produceNameId","DRY_RUN_ACCOUNT","AensPointerContextError","DryRunError","InvalidAensNameError","TransactionError","TxTimedOutError","TxNotInChainError","InternalError","decode","encode","Encoding","buildTxHash","_getPollInterval","type","_ref","_expectedMineRate","_microBlockCycle","_maxPollInterval","base","block","microblock","Math","min","InvalidTxError","constructor","message","validation","transaction","name","getHeight","_ref2","onNode","getCurrentKeyBlockHeight","height","poll","th","_ref3","_interval","blocks","interval","options","max","tx","getTransactionByHash","blockHeight","awaitHeight","_ref4","_interval2","currentHeight","waitForTxConfirm","txHash","_ref5","confirm","newBlockHeight","sendTransaction","txUnsigned","_ref6","onAccount","verify","waitMined","innerTx","signTransaction","networkId","getNetworkId","hash","rawTx","length","map","v","join","__queue","address","error","postTransaction","requestOptions","customHeaders","pollResult","txData","c","undefined","confirmationHeight","Object","assign","verifyTx","getAccount","_ref7","getAccountByPubkeyAndHeight","getAccountByPubkeyAndHash","getAccountByPubkey","getBalance","_ref8","format","AETTOS","addr","startsWith","AccountAddress","balance","catch","targetDenomination","getCurrentGeneration","_ref9","getGeneration","hashOrHeight","_ref10","getGenerationByHeight","getGenerationByHash","getMicroBlockTransactions","_ref11","getMicroBlockTransactionsByHash","transactions","getKeyBlock","_ref12","getKeyBlockByHeight","getKeyBlockByHash","getMicroBlockHeader","_ref13","getMicroBlockHeaderByHash","txDryRunRequests","Map","txDryRunHandler","key","rs","get","delete","dryRunRes","top","protectedDryRunTxs","txEvents","txs","req","accounts","Array","from","Set","accountAddress","pubKey","amount","forEach","_ref14","reject","results","_ref15","idx","result","reason","resultPayload","resolve","txDryRun","_ref16","_txDryRunRequests$get","combine","requests","set","Promise","_requests$timeout","push","timeout","setTimeout","getContractByteCode","contractId","_ref17","getContractCode","getContract","_ref18","getName","_ref19","getNameEntryByName","resolveName","nameOrId","_ref20","resolveByNode","pointer","pointers","find","p","id"],"sources":["../src/chain.ts"],"sourcesContent":["import { AE_AMOUNT_FORMATS, formatAmount } from './utils/amount-formatter';\nimport verifyTransaction, { ValidatorResult } from './tx/validator';\nimport { ensureError, isAccountNotFoundError, pause } from './utils/other';\nimport { isNameValid, produceNameId } from './tx/builder/helpers';\nimport { DRY_RUN_ACCOUNT } from './tx/builder/schema';\nimport { AensName } from './tx/builder/constants';\nimport {\n AensPointerContextError, DryRunError, InvalidAensNameError, TransactionError,\n TxTimedOutError, TxNotInChainError, InternalError,\n} from './utils/errors';\nimport Node, { TransformNodeType } from './Node';\nimport {\n Account as AccountNode, ByteCode, ContractObject, DryRunResult, DryRunResults,\n Generation, KeyBlock, MicroBlockHeader, NameEntry, SignedTx,\n} from './apis/node';\nimport {\n decode, encode, Encoded, Encoding,\n} from './utils/encoder';\nimport AccountBase from './account/Base';\nimport { buildTxHash } from './tx/builder';\n\n/**\n * @category chain\n */\nexport function _getPollInterval(\n type: 'block' | 'microblock', // TODO: rename to 'key-block' | 'micro-block'\n { _expectedMineRate = 180000, _microBlockCycle = 3000, _maxPollInterval = 5000 }:\n { _expectedMineRate?: number; _microBlockCycle?: number; _maxPollInterval?: number },\n): number {\n const base = {\n block: _expectedMineRate,\n microblock: _microBlockCycle,\n }[type];\n return Math.min(base / 3, _maxPollInterval);\n}\n\n/**\n * @category exception\n */\nexport class InvalidTxError extends TransactionError {\n validation: ValidatorResult[];\n\n transaction: Encoded.Transaction;\n\n constructor(\n message: string,\n validation: ValidatorResult[],\n transaction: Encoded.Transaction,\n ) {\n super(message);\n this.name = 'InvalidTxError';\n this.validation = validation;\n this.transaction = transaction;\n }\n}\n\n/**\n * Obtain current height of the chain\n * @category chain\n * @returns Current chain height\n */\nexport async function getHeight({ onNode }: { onNode: Node }): Promise<number> {\n return (await onNode.getCurrentKeyBlockHeight()).height;\n}\n\n/**\n * Wait for a transaction to be mined\n * @category chain\n * @param th - The hash of transaction to poll\n * @param options - Options\n * @param options.interval - Interval (in ms) at which to poll the chain\n * @param options.blocks - Number of blocks mined after which to fail\n * @param options.onNode - Node to use\n * @returns The transaction as it was mined\n */\nexport async function poll(\n th: Encoded.TxHash,\n {\n blocks = 5, interval, onNode, ...options\n }:\n { blocks?: number; interval?: number; onNode: Node } & Parameters<typeof _getPollInterval>[1],\n): Promise<TransformNodeType<SignedTx>> {\n interval ??= _getPollInterval('microblock', options);\n const max = await getHeight({ onNode }) + blocks;\n do {\n const tx = await onNode.getTransactionByHash(th);\n if (tx.blockHeight !== -1) return tx;\n await pause(interval);\n } while (await getHeight({ onNode }) < max);\n throw new TxTimedOutError(blocks, th);\n}\n\n/**\n * Wait for the chain to reach a specific height\n * @category chain\n * @param height - Height to wait for\n * @param options - Options\n * @param options.interval - Interval (in ms) at which to poll the chain\n * @param options.onNode - Node to use\n * @returns Current chain height\n */\nexport async function awaitHeight(\n height: number,\n { interval, onNode, ...options }:\n { interval?: number; onNode: Node } & Parameters<typeof _getPollInterval>[1],\n): Promise<number> {\n interval ??= _getPollInterval('block', options);\n let currentHeight;\n do {\n if (currentHeight != null) await pause(interval);\n currentHeight = (await onNode.getCurrentKeyBlockHeight()).height;\n } while (currentHeight < height);\n return currentHeight;\n}\n\n/**\n * Wait for transaction confirmation\n * @category chain\n * @param txHash - Transaction hash\n * @param options - Options\n * @param options.confirm - Number of micro blocks to wait for transaction confirmation\n * @param options.onNode - Node to use\n * @returns Current Height\n */\nexport async function waitForTxConfirm(\n txHash: Encoded.TxHash,\n { confirm = 3, onNode, ...options }:\n { confirm?: number; onNode: Node } & Parameters<typeof awaitHeight>[1],\n): Promise<number> {\n const { blockHeight } = await onNode.getTransactionByHash(txHash);\n const height = await awaitHeight(blockHeight + confirm, { onNode, ...options });\n const { blockHeight: newBlockHeight } = await onNode.getTransactionByHash(txHash);\n switch (newBlockHeight) {\n case -1:\n throw new TxNotInChainError(txHash);\n case blockHeight:\n return height;\n default:\n return waitForTxConfirm(txHash, { onNode, confirm, ...options });\n }\n}\n\n/**\n * Signs and submits transaction for mining\n * @category chain\n * @param txUnsigned - Transaction to sign and submit\n * @param options - Options\n * @param options.onNode - Node to use\n * @param options.onAccount - Account to use\n * @param options.verify - Verify transaction before broadcast, throw error if not\n * @param options.waitMined - Ensure that transaction get into block\n * @param options.confirm - Number of micro blocks that should be mined after tx get included\n * @returns Transaction details\n */\nexport async function sendTransaction(\n txUnsigned: Encoded.Transaction,\n {\n onNode, onAccount, verify = true, waitMined = true, confirm, innerTx, ...options\n }:\n SendTransactionOptions,\n): Promise<SendTransactionReturnType> {\n const tx = await onAccount.signTransaction(txUnsigned, {\n ...options,\n onNode,\n innerTx,\n networkId: await onNode.getNetworkId(),\n });\n\n if (innerTx === true) return { hash: buildTxHash(tx), rawTx: tx };\n\n if (verify) {\n const validation = await verifyTransaction(tx, onNode);\n if (validation.length > 0) {\n const message = `Transaction verification errors: ${\n validation.map((v: { message: string }) => v.message).join(', ')}`;\n throw new InvalidTxError(message, validation, tx);\n }\n }\n\n try {\n let __queue;\n try {\n __queue = onAccount != null ? `tx-${onAccount.address}` : null;\n } catch (error) {\n __queue = null;\n }\n const { txHash } = await onNode.postTransaction(\n { tx },\n __queue != null ? { requestOptions: { customHeaders: { __queue } } } : {},\n );\n\n if (waitMined) {\n const pollResult = await poll(txHash, { onNode, ...options });\n const txData = {\n ...pollResult,\n hash: pollResult.hash as Encoded.TxHash,\n rawTx: tx,\n };\n // wait for transaction confirmation\n if (confirm != null && (confirm === true || confirm > 0)) {\n const c = typeof confirm === 'boolean' ? undefined : confirm;\n return {\n ...txData,\n confirmationHeight: await waitForTxConfirm(txHash, { onNode, confirm: c, ...options }),\n };\n }\n return txData;\n }\n return { hash: txHash, rawTx: tx };\n } catch (error) {\n ensureError(error);\n throw Object.assign(error, {\n rawTx: tx,\n verifyTx: async () => verifyTransaction(tx, onNode),\n });\n }\n}\n\ntype SendTransactionOptionsType = {\n onNode: Node;\n onAccount: AccountBase;\n verify?: boolean;\n waitMined?: boolean;\n confirm?: boolean | number;\n} & Parameters<typeof poll>[1] & Omit<Parameters<typeof waitForTxConfirm>[1], 'confirm'>\n& Parameters<AccountBase['signTransaction']>[1];\nexport interface SendTransactionOptions extends SendTransactionOptionsType {}\ninterface SendTransactionReturnType extends Partial<TransformNodeType<SignedTx>> {\n hash: Encoded.TxHash;\n rawTx: Encoded.Transaction;\n confirmationHeight?: number;\n}\n\n/**\n * Get account by account public key\n * @category chain\n * @param address - Account address (public key)\n * @param options - Options\n * @param options.height - Get account on specific block by block height\n * @param options.hash - Get account on specific block by micro block hash or key block hash\n * @param options.onNode - Node to use\n */\nexport async function getAccount(\n address: Encoded.AccountAddress | Encoded.ContractAddress,\n { height, hash, onNode }:\n { height?: number; hash?: Encoded.KeyBlockHash | Encoded.MicroBlockHash; onNode: Node },\n): Promise<TransformNodeType<AccountNode>> {\n if (height != null) return onNode.getAccountByPubkeyAndHeight(address, height);\n if (hash != null) return onNode.getAccountByPubkeyAndHash(address, hash);\n return onNode.getAccountByPubkey(address);\n}\n\n/**\n * Request the balance of specified account\n * @category chain\n * @param address - The public account address to obtain the balance for\n * @param options - Options\n * @param options.format\n * @param options.height - The chain height at which to obtain the balance for\n * (default: top of chain)\n * @param options.hash - The block hash on which to obtain the balance for (default: top of chain)\n */\nexport async function getBalance(\n address: Encoded.AccountAddress | Encoded.ContractAddress | Encoded.OracleAddress,\n { format = AE_AMOUNT_FORMATS.AETTOS, ...options }:\n { format?: AE_AMOUNT_FORMATS } & Parameters<typeof getAccount>[1],\n): Promise<string> {\n const addr = address.startsWith('ok_')\n ? encode(decode(address), Encoding.AccountAddress)\n : address as Encoded.AccountAddress | Encoded.ContractAddress;\n\n const { balance } = await getAccount(addr, options).catch((error) => {\n if (!isAccountNotFoundError(error)) throw error;\n return { balance: 0n };\n });\n\n return formatAmount(balance, { targetDenomination: format });\n}\n\n/**\n * Obtain current generation\n * @category chain\n * @param options - Options\n * @param options.onNode - Node to use\n * @returns Current Generation\n */\nexport async function getCurrentGeneration(\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<Generation>> {\n return onNode.getCurrentGeneration();\n}\n\n/**\n * Get generation by hash or height\n * @category chain\n * @param hashOrHeight - Generation hash or height\n * @param options - Options\n * @param options.onNode - Node to use\n * @returns Generation\n */\nexport async function getGeneration(\n hashOrHeight: Encoded.KeyBlockHash | number,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<Generation>> {\n if (typeof hashOrHeight === 'number') return onNode.getGenerationByHeight(hashOrHeight);\n return onNode.getGenerationByHash(hashOrHeight);\n}\n\n/**\n * Get micro block transactions\n * @category chain\n * @param hash - Micro block hash\n * @param options - Options\n * @param options.onNode - Node to use\n * @returns Transactions\n */\nexport async function getMicroBlockTransactions(\n hash: Encoded.MicroBlockHash,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<SignedTx[]>> {\n return (await onNode.getMicroBlockTransactionsByHash(hash)).transactions;\n}\n\n/**\n * Get key block\n * @category chain\n * @param hashOrHeight - Key block hash or height\n * @param options - Options\n * @param options.onNode - Node to use\n * @returns Key Block\n */\nexport async function getKeyBlock(\n hashOrHeight: Encoded.KeyBlockHash | number,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<KeyBlock>> {\n if (typeof hashOrHeight === 'number') return onNode.getKeyBlockByHeight(hashOrHeight);\n return onNode.getKeyBlockByHash(hashOrHeight);\n}\n\n/**\n * Get micro block header\n * @category chain\n * @param hash - Micro block hash\n * @param options - Options\n * @param options.onNode - Node to use\n * @returns Micro block header\n */\nexport async function getMicroBlockHeader(\n hash: Encoded.MicroBlockHash,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<MicroBlockHeader>> {\n return onNode.getMicroBlockHeaderByHash(hash);\n}\n\ninterface TxDryRunArguments {\n tx: Encoded.Transaction;\n accountAddress: Encoded.AccountAddress;\n top?: number | Encoded.KeyBlockHash | Encoded.MicroBlockHash;\n txEvents?: any;\n resolve: Function;\n reject: Function;\n}\nconst txDryRunRequests: Map<string, TxDryRunArguments[] & { timeout?: NodeJS.Timeout }> = new Map();\n\nasync function txDryRunHandler(key: string, onNode: Node): Promise<void> {\n const rs = txDryRunRequests.get(key);\n txDryRunRequests.delete(key);\n if (rs == null) throw new InternalError('Can\\'t get dry-run request');\n\n let dryRunRes;\n try {\n const top = typeof rs[0].top === 'number'\n ? (await getKeyBlock(rs[0].top, { onNode })).hash : rs[0].top;\n dryRunRes = await onNode.protectedDryRunTxs({\n top,\n txEvents: rs[0].txEvents,\n txs: rs.map((req) => ({ tx: req.tx })),\n accounts: Array.from(new Set(rs.map((req) => req.accountAddress)))\n .map((pubKey) => ({ pubKey, amount: DRY_RUN_ACCOUNT.amount })),\n });\n } catch (error) {\n rs.forEach(({ reject }) => reject(error));\n return;\n }\n\n const { results, txEvents } = dryRunRes;\n results.forEach(({ result, reason, ...resultPayload }, idx) => {\n const {\n resolve, reject, tx, accountAddress,\n } = rs[idx];\n if (result === 'ok') resolve({ ...resultPayload, txEvents });\n else reject(Object.assign(new DryRunError(reason as string), { tx, accountAddress }));\n });\n}\n\n/**\n * Transaction dry-run\n * @category chain\n * @param tx - transaction to execute\n * @param accountAddress - address that will be used to execute transaction\n * @param options - Options\n * @param options.top - hash of block on which to make dry-run\n * @param options.txEvents - collect and return on-chain tx events that would result from the call\n * @param options.combine - Enables combining of similar requests to a single dry-run call\n * @param options.onNode - Node to use\n */\nexport async function txDryRun(\n tx: Encoded.Transaction,\n accountAddress: Encoded.AccountAddress,\n {\n top, txEvents, combine, onNode,\n }:\n { top?: TxDryRunArguments['top']; txEvents?: boolean; combine?: boolean; onNode: Node },\n): Promise<{\n txEvents?: TransformNodeType<DryRunResults['txEvents']>;\n } & TransformNodeType<DryRunResult>> {\n const key = combine === true ? [top, txEvents].join() : 'immediate';\n const requests = txDryRunRequests.get(key) ?? [];\n txDryRunRequests.set(key, requests);\n return new Promise((resolve, reject) => {\n requests.push({\n tx, accountAddress, top, txEvents, resolve, reject,\n });\n if (combine !== true) {\n void txDryRunHandler(key, onNode);\n return;\n }\n requests.timeout ??= setTimeout(() => { void txDryRunHandler(key, onNode); });\n });\n}\n\n/**\n * Get contract byte code\n * @category contract\n * @param contractId - Contract address\n * @param options - Options\n * @param options.onNode - Node to use\n */\nexport async function getContractByteCode(\n contractId: Encoded.ContractAddress,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<ByteCode>> {\n return onNode.getContractCode(contractId);\n}\n\n/**\n * Get contract entry\n * @category contract\n * @param contractId - Contract address\n * @param options - Options\n * @param options.onNode - Node to use\n */\nexport async function getContract(\n contractId: Encoded.ContractAddress,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<ContractObject>> {\n return onNode.getContract(contractId);\n}\n\n/**\n * Get name entry\n * @category AENS\n * @param name - AENS name\n * @param options - Options\n * @param options.onNode - Node to use\n */\nexport async function getName(\n name: AensName,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<NameEntry>> {\n return onNode.getNameEntryByName(name);\n}\n\n/**\n * Resolve AENS name and return name hash\n * @category AENS\n * @param nameOrId - AENS name or address\n * @param key - in AENS pointers record\n * @param options - Options\n * @param options.verify - To ensure that name exist and have a corresponding pointer\n * // TODO: avoid that to don't trust to current api gateway\n * @param options.resolveByNode - Enables pointer resolving using node\n * @param options.onNode - Node to use\n * @returns Address or AENS name hash\n */\nexport async function resolveName <\n Type extends Encoding.AccountAddress | Encoding.ContractAddress,\n>(\n nameOrId: AensName | Encoded.Generic<Type>,\n key: string,\n { verify = true, resolveByNode = false, onNode }:\n { verify?: boolean; resolveByNode?: boolean; onNode: Node },\n): Promise<Encoded.Generic<Type | Encoding.Name>> {\n if (isNameValid(nameOrId)) {\n if (verify || resolveByNode) {\n const name = await onNode.getNameEntryByName(nameOrId);\n const pointer = name.pointers.find((p) => p.key === key);\n if (pointer == null) throw new AensPointerContextError(nameOrId, key);\n if (resolveByNode) return pointer.id as Encoded.Generic<Type>;\n }\n return produceNameId(nameOrId);\n }\n try {\n decode(nameOrId);\n return nameOrId;\n } catch (error) {\n throw new InvalidAensNameError(`Invalid name or address: ${nameOrId}`);\n }\n}\n"],"mappings":"SAASA,iBAAiB,EAAEC,YAAY;AAAA,OACjCC,iBAAiB;AAAA,SACfC,WAAW,EAAEC,sBAAsB,EAAEC,KAAK;AAAA,SAC1CC,WAAW,EAAEC,aAAa;AAAA,SAC1BC,eAAe;AAAA,SAGtBC,uBAAuB,EAAEC,WAAW,EAAEC,oBAAoB,EAAEC,gBAAgB,EAC5EC,eAAe,EAAEC,iBAAiB,EAAEC,aAAa;AAAA,SAQjDC,MAAM,EAAEC,MAAM,EAAWC,QAAQ;AAAA,SAG1BC,WAAW;AAEpB;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAC9BC,IA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C;IAAEtI;EAAyB,CAAC,GAAAsI,MAAA;EAE5B,OAAOtI,MAAM,CAACuI,kBAAkB,CAAC1I,IAAI,CAAC;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAe2I,WAAWA,CAG/BC,QAA0C,EAC1ChD,GAAW,EAAAiD,MAAA,EAGqC;EAAA,IAFhD;IAAE/G,MAAM,GAAG,IAAI;IAAEgH,aAAa,GAAG,KAAK;IAAE3I;EACkB,CAAC,GAAA0I,MAAA;EAE3D,IAAI3K,WAAW,CAAC0K,QAAQ,CAAC,EAAE;IACzB,IAAI9G,MAAM,IAAIgH,aAAa,EAAE;MAC3B,MAAM9I,IAAI,GAAG,MAAMG,MAAM,CAACuI,kBAAkB,CAACE,QAAQ,CAAC;MACtD,MAAMG,OAAO,GAAG/I,IAAI,CAACgJ,QAAQ,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACtD,GAAG,KAAKA,GAAG,CAAC;MACxD,IAAImD,OAAO,IAAI,IAAI,EAAE,MAAM,IAAI1K,uBAAuB,CAACuK,QAAQ,EAAEhD,GAAG,CAAC;MACrE,IAAIkD,aAAa,EAAE,OAAOC,OAAO,CAACI,EAAE;IACtC;IACA,OAAOhL,aAAa,CAACyK,QAAQ,CAAC;EAChC;EACA,IAAI;IACFhK,MAAM,CAACgK,QAAQ,CAAC;IAChB,OAAOA,QAAQ;EACjB,CAAC,CAAC,OAAOhG,KAAK,EAAE;IACd,MAAM,IAAIrE,oBAAoB,CAAE,4BAA2BqK,QAAS,EAAC,CAAC;EACxE;AACF"}
|
|
1
|
+
{"version":3,"file":"chain.mjs","names":["AE_AMOUNT_FORMATS","formatAmount","verifyTransaction","ensureError","isAccountNotFoundError","pause","isNameValid","produceNameId","DRY_RUN_ACCOUNT","AensPointerContextError","DryRunError","InvalidAensNameError","TransactionError","TxTimedOutError","TxNotInChainError","InternalError","decode","encode","Encoding","buildTxHash","_getPollInterval","type","_ref","_expectedMineRate","_microBlockCycle","_maxPollInterval","base","block","microblock","Math","min","InvalidTxError","constructor","message","validation","transaction","name","getHeight","_ref2","onNode","getCurrentKeyBlockHeight","height","poll","th","_ref3","_interval","blocks","interval","options","max","tx","getTransactionByHash","blockHeight","awaitHeight","_ref4","_interval2","currentHeight","waitForTxConfirm","txHash","_ref5","confirm","newBlockHeight","sendTransaction","txUnsigned","_ref6","onAccount","verify","waitMined","innerTx","signTransaction","networkId","getNetworkId","hash","rawTx","length","map","v","join","__queue","address","error","postTransaction","requestOptions","customHeaders","pollResult","txData","c","undefined","confirmationHeight","Object","assign","verifyTx","getAccount","_ref7","getAccountByPubkeyAndHeight","getAccountByPubkeyAndHash","getAccountByPubkey","getBalance","_ref8","format","AETTOS","addr","startsWith","AccountAddress","balance","catch","targetDenomination","getCurrentGeneration","_ref9","getGeneration","hashOrHeight","_ref10","getGenerationByHeight","getGenerationByHash","getMicroBlockTransactions","_ref11","getMicroBlockTransactionsByHash","transactions","getKeyBlock","_ref12","getKeyBlockByHeight","getKeyBlockByHash","getMicroBlockHeader","_ref13","getMicroBlockHeaderByHash","txDryRunRequests","Map","txDryRunHandler","key","rs","get","delete","dryRunRes","top","protectedDryRunTxs","txEvents","txs","req","accounts","Array","from","Set","accountAddress","pubKey","amount","forEach","_ref14","reject","results","_ref15","idx","result","reason","resultPayload","resolve","txDryRun","_ref16","_txDryRunRequests$get","combine","requests","set","Promise","_requests$timeout","push","timeout","setTimeout","getContractByteCode","contractId","_ref17","getContractCode","getContract","_ref18","getName","_ref19","getNameEntryByName","resolveName","nameOrId","_ref20","resolveByNode","pointer","pointers","find","p","id"],"sources":["../src/chain.ts"],"sourcesContent":["import { AE_AMOUNT_FORMATS, formatAmount } from './utils/amount-formatter';\nimport verifyTransaction, { ValidatorResult } from './tx/validator';\nimport { ensureError, isAccountNotFoundError, pause } from './utils/other';\nimport { isNameValid, produceNameId } from './tx/builder/helpers';\nimport { DRY_RUN_ACCOUNT } from './tx/builder/schema';\nimport { AensName } from './tx/builder/constants';\nimport {\n AensPointerContextError, DryRunError, InvalidAensNameError, TransactionError,\n TxTimedOutError, TxNotInChainError, InternalError,\n} from './utils/errors';\nimport Node, { TransformNodeType } from './Node';\nimport {\n Account as AccountNode, ByteCode, ContractObject, DryRunResult, DryRunResults,\n Generation, KeyBlock, MicroBlockHeader, NameEntry, SignedTx,\n} from './apis/node';\nimport {\n decode, encode, Encoded, Encoding,\n} from './utils/encoder';\nimport AccountBase from './account/Base';\nimport { buildTxHash } from './tx/builder';\n\n/**\n * @category chain\n */\nexport function _getPollInterval(\n type: 'block' | 'microblock', // TODO: rename to 'key-block' | 'micro-block'\n { _expectedMineRate = 180000, _microBlockCycle = 3000, _maxPollInterval = 5000 }:\n { _expectedMineRate?: number; _microBlockCycle?: number; _maxPollInterval?: number },\n): number {\n const base = {\n block: _expectedMineRate,\n microblock: _microBlockCycle,\n }[type];\n return Math.min(base / 3, _maxPollInterval);\n}\n\n/**\n * @category exception\n */\nexport class InvalidTxError extends TransactionError {\n validation: ValidatorResult[];\n\n transaction: Encoded.Transaction;\n\n constructor(\n message: string,\n validation: ValidatorResult[],\n transaction: Encoded.Transaction,\n ) {\n super(message);\n this.name = 'InvalidTxError';\n this.validation = validation;\n this.transaction = transaction;\n }\n}\n\n/**\n * Obtain current height of the chain\n * @category chain\n * @returns Current chain height\n */\nexport async function getHeight({ onNode }: { onNode: Node }): Promise<number> {\n return (await onNode.getCurrentKeyBlockHeight()).height;\n}\n\n/**\n * Wait for a transaction to be mined\n * @category chain\n * @param th - The hash of transaction to poll\n * @param options - Options\n * @param options.interval - Interval (in ms) at which to poll the chain\n * @param options.blocks - Number of blocks mined after which to fail\n * @param options.onNode - Node to use\n * @returns The transaction as it was mined\n */\nexport async function poll(\n th: Encoded.TxHash,\n {\n blocks = 5, interval, onNode, ...options\n }:\n { blocks?: number; interval?: number; onNode: Node } & Parameters<typeof _getPollInterval>[1],\n): Promise<TransformNodeType<SignedTx>> {\n interval ??= _getPollInterval('microblock', options);\n const max = await getHeight({ onNode }) + blocks;\n do {\n const tx = await onNode.getTransactionByHash(th);\n if (tx.blockHeight !== -1) return tx;\n await pause(interval);\n } while (await getHeight({ onNode }) < max);\n throw new TxTimedOutError(blocks, th);\n}\n\n/**\n * Wait for the chain to reach a specific height\n * @category chain\n * @param height - Height to wait for\n * @param options - Options\n * @param options.interval - Interval (in ms) at which to poll the chain\n * @param options.onNode - Node to use\n * @returns Current chain height\n */\nexport async function awaitHeight(\n height: number,\n { interval, onNode, ...options }:\n { interval?: number; onNode: Node } & Parameters<typeof _getPollInterval>[1],\n): Promise<number> {\n interval ??= _getPollInterval('block', options);\n let currentHeight;\n do {\n if (currentHeight != null) await pause(interval);\n currentHeight = (await onNode.getCurrentKeyBlockHeight()).height;\n } while (currentHeight < height);\n return currentHeight;\n}\n\n/**\n * Wait for transaction confirmation\n * @category chain\n * @param txHash - Transaction hash\n * @param options - Options\n * @param options.confirm - Number of micro blocks to wait for transaction confirmation\n * @param options.onNode - Node to use\n * @returns Current Height\n */\nexport async function waitForTxConfirm(\n txHash: Encoded.TxHash,\n { confirm = 3, onNode, ...options }:\n { confirm?: number; onNode: Node } & Parameters<typeof awaitHeight>[1],\n): Promise<number> {\n const { blockHeight } = await onNode.getTransactionByHash(txHash);\n const height = await awaitHeight(blockHeight + confirm, { onNode, ...options });\n const { blockHeight: newBlockHeight } = await onNode.getTransactionByHash(txHash);\n switch (newBlockHeight) {\n case -1:\n throw new TxNotInChainError(txHash);\n case blockHeight:\n return height;\n default:\n return waitForTxConfirm(txHash, { onNode, confirm, ...options });\n }\n}\n\n/**\n * Signs and submits transaction for mining\n * @category chain\n * @param txUnsigned - Transaction to sign and submit\n * @param options - Options\n * @param options.onNode - Node to use\n * @param options.onAccount - Account to use\n * @param options.verify - Verify transaction before broadcast, throw error if not\n * @param options.waitMined - Ensure that transaction get into block\n * @param options.confirm - Number of micro blocks that should be mined after tx get included\n * @returns Transaction details\n */\nexport async function sendTransaction(\n txUnsigned: Encoded.Transaction,\n {\n onNode, onAccount, verify = true, waitMined = true, confirm, innerTx, ...options\n }:\n SendTransactionOptions,\n): Promise<SendTransactionReturnType> {\n const tx = await onAccount.signTransaction(txUnsigned, {\n ...options,\n onNode,\n innerTx,\n networkId: await onNode.getNetworkId(),\n });\n\n if (innerTx === true) return { hash: buildTxHash(tx), rawTx: tx };\n\n if (verify) {\n const validation = await verifyTransaction(tx, onNode);\n if (validation.length > 0) {\n const message = `Transaction verification errors: ${\n validation.map((v: { message: string }) => v.message).join(', ')}`;\n throw new InvalidTxError(message, validation, tx);\n }\n }\n\n try {\n let __queue;\n try {\n __queue = onAccount != null ? `tx-${onAccount.address}` : null;\n } catch (error) {\n __queue = null;\n }\n const { txHash } = await onNode.postTransaction(\n { tx },\n __queue != null ? { requestOptions: { customHeaders: { __queue } } } : {},\n );\n\n if (waitMined) {\n const pollResult = await poll(txHash, { onNode, ...options });\n const txData = {\n ...pollResult,\n hash: pollResult.hash as Encoded.TxHash,\n rawTx: tx,\n };\n // wait for transaction confirmation\n if (confirm != null && +confirm > 0) {\n const c = typeof confirm === 'boolean' ? undefined : confirm;\n return {\n ...txData,\n confirmationHeight: await waitForTxConfirm(txHash, { onNode, confirm: c, ...options }),\n };\n }\n return txData;\n }\n return { hash: txHash, rawTx: tx };\n } catch (error) {\n ensureError(error);\n throw Object.assign(error, {\n rawTx: tx,\n verifyTx: async () => verifyTransaction(tx, onNode),\n });\n }\n}\n\ntype SendTransactionOptionsType = {\n onNode: Node;\n onAccount: AccountBase;\n verify?: boolean;\n waitMined?: boolean;\n confirm?: boolean | number;\n} & Parameters<typeof poll>[1] & Omit<Parameters<typeof waitForTxConfirm>[1], 'confirm'>\n& Parameters<AccountBase['signTransaction']>[1];\nexport interface SendTransactionOptions extends SendTransactionOptionsType {}\ninterface SendTransactionReturnType extends Partial<TransformNodeType<SignedTx>> {\n hash: Encoded.TxHash;\n rawTx: Encoded.Transaction;\n confirmationHeight?: number;\n}\n\n/**\n * Get account by account public key\n * @category chain\n * @param address - Account address (public key)\n * @param options - Options\n * @param options.height - Get account on specific block by block height\n * @param options.hash - Get account on specific block by micro block hash or key block hash\n * @param options.onNode - Node to use\n */\nexport async function getAccount(\n address: Encoded.AccountAddress | Encoded.ContractAddress,\n { height, hash, onNode }:\n { height?: number; hash?: Encoded.KeyBlockHash | Encoded.MicroBlockHash; onNode: Node },\n): Promise<TransformNodeType<AccountNode>> {\n if (height != null) return onNode.getAccountByPubkeyAndHeight(address, height);\n if (hash != null) return onNode.getAccountByPubkeyAndHash(address, hash);\n return onNode.getAccountByPubkey(address);\n}\n\n/**\n * Request the balance of specified account\n * @category chain\n * @param address - The public account address to obtain the balance for\n * @param options - Options\n * @param options.format\n * @param options.height - The chain height at which to obtain the balance for\n * (default: top of chain)\n * @param options.hash - The block hash on which to obtain the balance for (default: top of chain)\n */\nexport async function getBalance(\n address: Encoded.AccountAddress | Encoded.ContractAddress | Encoded.OracleAddress,\n { format = AE_AMOUNT_FORMATS.AETTOS, ...options }:\n { format?: AE_AMOUNT_FORMATS } & Parameters<typeof getAccount>[1],\n): Promise<string> {\n const addr = address.startsWith('ok_')\n ? encode(decode(address), Encoding.AccountAddress)\n : address as Encoded.AccountAddress | Encoded.ContractAddress;\n\n const { balance } = await getAccount(addr, options).catch((error) => {\n if (!isAccountNotFoundError(error)) throw error;\n return { balance: 0n };\n });\n\n return formatAmount(balance, { targetDenomination: format });\n}\n\n/**\n * Obtain current generation\n * @category chain\n * @param options - Options\n * @param options.onNode - Node to use\n * @returns Current Generation\n */\nexport async function getCurrentGeneration(\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<Generation>> {\n return onNode.getCurrentGeneration();\n}\n\n/**\n * Get generation by hash or height\n * @category chain\n * @param hashOrHeight - Generation hash or height\n * @param options - Options\n * @param options.onNode - Node to use\n * @returns Generation\n */\nexport async function getGeneration(\n hashOrHeight: Encoded.KeyBlockHash | number,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<Generation>> {\n if (typeof hashOrHeight === 'number') return onNode.getGenerationByHeight(hashOrHeight);\n return onNode.getGenerationByHash(hashOrHeight);\n}\n\n/**\n * Get micro block transactions\n * @category chain\n * @param hash - Micro block hash\n * @param options - Options\n * @param options.onNode - Node to use\n * @returns Transactions\n */\nexport async function getMicroBlockTransactions(\n hash: Encoded.MicroBlockHash,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<SignedTx[]>> {\n return (await onNode.getMicroBlockTransactionsByHash(hash)).transactions;\n}\n\n/**\n * Get key block\n * @category chain\n * @param hashOrHeight - Key block hash or height\n * @param options - Options\n * @param options.onNode - Node to use\n * @returns Key Block\n */\nexport async function getKeyBlock(\n hashOrHeight: Encoded.KeyBlockHash | number,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<KeyBlock>> {\n if (typeof hashOrHeight === 'number') return onNode.getKeyBlockByHeight(hashOrHeight);\n return onNode.getKeyBlockByHash(hashOrHeight);\n}\n\n/**\n * Get micro block header\n * @category chain\n * @param hash - Micro block hash\n * @param options - Options\n * @param options.onNode - Node to use\n * @returns Micro block header\n */\nexport async function getMicroBlockHeader(\n hash: Encoded.MicroBlockHash,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<MicroBlockHeader>> {\n return onNode.getMicroBlockHeaderByHash(hash);\n}\n\ninterface TxDryRunArguments {\n tx: Encoded.Transaction;\n accountAddress: Encoded.AccountAddress;\n top?: number | Encoded.KeyBlockHash | Encoded.MicroBlockHash;\n txEvents?: any;\n resolve: Function;\n reject: Function;\n}\nconst txDryRunRequests: Map<string, TxDryRunArguments[] & { timeout?: NodeJS.Timeout }> = new Map();\n\nasync function txDryRunHandler(key: string, onNode: Node): Promise<void> {\n const rs = txDryRunRequests.get(key);\n txDryRunRequests.delete(key);\n if (rs == null) throw new InternalError('Can\\'t get dry-run request');\n\n let dryRunRes;\n try {\n const top = typeof rs[0].top === 'number'\n ? (await getKeyBlock(rs[0].top, { onNode })).hash : rs[0].top;\n dryRunRes = await onNode.protectedDryRunTxs({\n top,\n txEvents: rs[0].txEvents,\n txs: rs.map((req) => ({ tx: req.tx })),\n accounts: Array.from(new Set(rs.map((req) => req.accountAddress)))\n .map((pubKey) => ({ pubKey, amount: DRY_RUN_ACCOUNT.amount })),\n });\n } catch (error) {\n rs.forEach(({ reject }) => reject(error));\n return;\n }\n\n const { results, txEvents } = dryRunRes;\n results.forEach(({ result, reason, ...resultPayload }, idx) => {\n const {\n resolve, reject, tx, accountAddress,\n } = rs[idx];\n if (result === 'ok') resolve({ ...resultPayload, txEvents });\n else reject(Object.assign(new DryRunError(reason as string), { tx, accountAddress }));\n });\n}\n\n/**\n * Transaction dry-run\n * @category chain\n * @param tx - transaction to execute\n * @param accountAddress - address that will be used to execute transaction\n * @param options - Options\n * @param options.top - hash of block on which to make dry-run\n * @param options.txEvents - collect and return on-chain tx events that would result from the call\n * @param options.combine - Enables combining of similar requests to a single dry-run call\n * @param options.onNode - Node to use\n */\nexport async function txDryRun(\n tx: Encoded.Transaction,\n accountAddress: Encoded.AccountAddress,\n {\n top, txEvents, combine, onNode,\n }:\n { top?: TxDryRunArguments['top']; txEvents?: boolean; combine?: boolean; onNode: Node },\n): Promise<{\n txEvents?: TransformNodeType<DryRunResults['txEvents']>;\n } & TransformNodeType<DryRunResult>> {\n const key = combine === true ? [top, txEvents].join() : 'immediate';\n const requests = txDryRunRequests.get(key) ?? [];\n txDryRunRequests.set(key, requests);\n return new Promise((resolve, reject) => {\n requests.push({\n tx, accountAddress, top, txEvents, resolve, reject,\n });\n if (combine !== true) {\n void txDryRunHandler(key, onNode);\n return;\n }\n requests.timeout ??= setTimeout(() => { void txDryRunHandler(key, onNode); });\n });\n}\n\n/**\n * Get contract byte code\n * @category contract\n * @param contractId - Contract address\n * @param options - Options\n * @param options.onNode - Node to use\n */\nexport async function getContractByteCode(\n contractId: Encoded.ContractAddress,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<ByteCode>> {\n return onNode.getContractCode(contractId);\n}\n\n/**\n * Get contract entry\n * @category contract\n * @param contractId - Contract address\n * @param options - Options\n * @param options.onNode - Node to use\n */\nexport async function getContract(\n contractId: Encoded.ContractAddress,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<ContractObject>> {\n return onNode.getContract(contractId);\n}\n\n/**\n * Get name entry\n * @category AENS\n * @param name - AENS name\n * @param options - Options\n * @param options.onNode - Node to use\n */\nexport async function getName(\n name: AensName,\n { onNode }: { onNode: Node },\n): Promise<TransformNodeType<NameEntry>> {\n return onNode.getNameEntryByName(name);\n}\n\n/**\n * Resolve AENS name and return name hash\n * @category AENS\n * @param nameOrId - AENS name or address\n * @param key - in AENS pointers record\n * @param options - Options\n * @param options.verify - To ensure that name exist and have a corresponding pointer\n * // TODO: avoid that to don't trust to current api gateway\n * @param options.resolveByNode - Enables pointer resolving using node\n * @param options.onNode - Node to use\n * @returns Address or AENS name hash\n */\nexport async function resolveName <\n Type extends Encoding.AccountAddress | Encoding.ContractAddress,\n>(\n nameOrId: AensName | Encoded.Generic<Type>,\n key: string,\n { verify = true, resolveByNode = false, onNode }:\n { verify?: boolean; resolveByNode?: boolean; onNode: Node },\n): Promise<Encoded.Generic<Type | Encoding.Name>> {\n if (isNameValid(nameOrId)) {\n if (verify || resolveByNode) {\n const name = await onNode.getNameEntryByName(nameOrId);\n const pointer = name.pointers.find((p) => p.key === key);\n if (pointer == null) throw new AensPointerContextError(nameOrId, key);\n if (resolveByNode) return pointer.id as Encoded.Generic<Type>;\n }\n return produceNameId(nameOrId);\n }\n try {\n decode(nameOrId);\n return nameOrId;\n } catch (error) {\n throw new InvalidAensNameError(`Invalid name or address: ${nameOrId}`);\n }\n}\n"],"mappings":"SAASA,iBAAiB,EAAEC,YAAY;AAAA,OACjCC,iBAAiB;AAAA,SACfC,WAAW,EAAEC,sBAAsB,EAAEC,KAAK;AAAA,SAC1CC,WAAW,EAAEC,aAAa;AAAA,SAC1BC,eAAe;AAAA,SAGtBC,uBAAuB,EAAEC,WAAW,EAAE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ANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Base.mjs","names":["EventEmitter","snakeToPascal","buildTx","unpackTx","Tag","handlers","initialize","enqueueAction","notify","call","disconnect","channelDisconnect","ChannelError","snakeToPascalObjKeys","obj","Object","entries","reduce","result","_ref","key","val","Channel","constructor","_defineProperty","Map","options","_initialize","channel","existingFsmId","awaitingReconnection","awaitingConnection","channelOpen","on","eventName","callback","_eventEmitter","off","removeListener","status","_status","state","res","calls","CallsMtree","halfSignedTx","SignedTx","signedTx","trees","StateTrees","round","_state","params","encodedTx","tag","ChannelCreateTx","ChannelOffChainTx","ChannelWithdrawTx","ChannelDepositTx","id","_channelId","fsmId","_fsmId","action","handler","leave","awaitingLeave","shutdown","sign","awaitingShutdownTx","reconnect","txParams","reconnectTx","ChannelClientReconnectTx"],"sources":["../../src/channel/Base.ts"],"sourcesContent":["import EventEmitter from 'events';\nimport { w3cwebsocket as W3CWebSocket } from 'websocket';\nimport { snakeToPascal } from '../utils/string';\nimport { buildTx, unpackTx } from '../tx/builder';\nimport { Tag } from '../tx/builder/constants';\nimport * as handlers from './handlers';\nimport {\n initialize,\n enqueueAction,\n notify,\n call,\n disconnect as channelDisconnect,\n SignTx,\n ChannelOptions,\n ChannelState,\n ChannelHandler,\n ChannelAction,\n ChannelStatus,\n ChannelFsm,\n ChannelMessage,\n ChannelEvents,\n} from './internal';\nimport { ChannelError } from '../utils/errors';\nimport { Encoded } from '../utils/encoder';\nimport { TxUnpacked } from '../tx/builder/schema.generated';\n\nfunction snakeToPascalObjKeys<Type>(obj: object): Type {\n return Object.entries(obj).reduce((result, [key, val]) => ({\n ...result,\n [snakeToPascal(key)]: val,\n }), {}) as Type;\n}\n\n/**\n * Channel\n * @example\n * ```js\n * await Channel.initialize({\n * url: 'ws://localhost:3001',\n * role: 'initiator'\n * initiatorId: 'ak_Y1NRjHuoc3CGMYMvCmdHSBpJsMDR6Ra2t5zjhRcbtMeXXLpLH',\n * responderId: 'ak_V6an1xhec1xVaAhLuak7QoEbi6t7w5hEtYWp9bMKaJ19i6A9E',\n * initiatorAmount: 1e18,\n * responderAmount: 1e18,\n * pushAmount: 0,\n * channelReserve: 0,\n * ttl: 1000,\n * host: 'localhost',\n * port: 3002,\n * lockPeriod: 10,\n * async sign (tag, tx) => await account.signTransaction(tx)\n * })\n * ```\n */\nexport default class Channel {\n _eventEmitter = new EventEmitter();\n\n _pingTimeoutId!: NodeJS.Timeout;\n\n _nextRpcMessageId = 0;\n\n _rpcCallbacks = new Map<number, (message: object) => void>();\n\n _fsmId?: Encoded.Bytearray;\n\n _messageQueue: ChannelMessage[] = [];\n\n _isMessageQueueLocked = false;\n\n _actionQueue: ChannelAction[] = [];\n\n _isActionQueueLocked = false;\n\n _status: ChannelStatus = 'disconnected';\n\n _fsm!: ChannelFsm;\n\n _websocket!: W3CWebSocket;\n\n _state: Encoded.Transaction | '' = '';\n\n _options!: ChannelOptions;\n\n _channelId?: Encoded.Channel;\n\n /**\n * @param options - Channel params\n * @param options.url - Channel url (for example: \"ws://localhost:3001\")\n * @param options.role - Participant role (\"initiator\" or \"responder\")\n * @param options.initiatorId - Initiator's public key\n * @param options.responderId - Responder's public key\n * @param options.pushAmount - Initial deposit in favour of the responder by the initiator\n * @param options.initiatorAmount - Amount of coins the initiator has committed to\n * the channel\n * @param options.responderAmount - Amount of coins the responder has committed to\n * the channel\n * @param options.channelReserve - The minimum amount both peers need to maintain\n * @param options.ttl - Minimum block height to include the channel_create_tx\n * @param options.host - Host of the responder's node\n * @param options.port - The port of the responders node\n * @param options.lockPeriod - Amount of blocks for disputing a solo close\n * @param options.minimumDepthStrategy - How to calculate minimum depth (default: txfee)\n * @param options.minimumDepth - The minimum amount of blocks to be mined\n * @param options.fee - The fee to be used for the channel open transaction\n * @param options.gasPrice - Used for the fee computation of the channel open transaction\n * @param options.existingChannelId - Existing channel id (required if reestablishing a\n * channel)\n * @param options.offchainTx - Offchain transaction (required if reestablishing\n * a channel)\n * @param options.timeoutIdle - The time waiting for a new event to be initiated\n * (default: 600000)\n * @param options.timeoutFundingCreate - The time waiting for the initiator to produce\n * the create channel transaction after the noise session had been established (default: 120000)\n * @param options.timeoutFundingSign - The time frame the other client has to sign an\n * off-chain update after our client had initiated and signed it. This applies only for double\n * signed on-chain intended updates: channel create transaction, deposit, withdrawal and etc.\n * (default: 120000)\n * @param options.timeoutFundingLock - The time frame the other client has to confirm an\n * on-chain transaction reaching maturity (passing minimum depth) after the local node has\n * detected this. This applies only for double signed on-chain intended updates: channel create\n * transaction, deposit, withdrawal and etc. (default: 360000)\n * @param options.timeoutSign - The time frame the client has to return a signed\n * off-chain update or to decline it. This applies for all off-chain updates (default: 500000)\n * @param options.timeoutAccept - The time frame the other client has to react to an\n * event. This applies for all off-chain updates that are not meant to land on-chain, as well as\n * some special cases: opening a noise connection, mutual closing acknowledgement and\n * reestablishing an existing channel (default: 120000)\n * @param options.timeoutInitialized - the time frame the responder has to accept an\n * incoming noise session. Applicable only for initiator (default: timeout_accept's value)\n * @param options.timeoutAwaitingOpen - The time frame the initiator has to start an\n * outgoing noise session to the responder's node. Applicable only for responder (default:\n * timeout_idle's value)\n * @param options.debug=false - Log websocket communication\n * @param options.sign - Function which verifies and signs transactions\n */\n static async initialize(options: ChannelOptions): Promise<Channel> {\n return Channel._initialize(new Channel(), options);\n }\n\n static async _initialize<T extends Channel>(channel: T, options: ChannelOptions): Promise<T> {\n await initialize(\n channel,\n options.existingFsmId != null ? handlers.awaitingReconnection : handlers.awaitingConnection,\n handlers.channelOpen,\n options,\n );\n return channel;\n }\n\n /**\n * Register event listener function\n *\n * Possible events:\n *\n * - \"error\"\n * - \"stateChanged\"\n * - \"statusChanged\"\n * - \"message\"\n * - \"peerDisconnected\"\n * - \"onChainTx\"\n * - \"ownWithdrawLocked\"\n * - \"withdrawLocked\"\n * - \"ownDepositLocked\"\n * - \"depositLocked\"\n * - \"channelReestablished\"\n * - \"newContract\"\n *\n *\n * @param eventName - Event name\n * @param callback - Callback function\n */\n on<E extends keyof ChannelEvents>(eventName: E, callback: ChannelEvents[E]): void {\n this._eventEmitter.on(eventName, callback);\n }\n\n /**\n * Remove event listener function\n * @param eventName - Event name\n * @param callback - Callback function\n */\n off<E extends keyof ChannelEvents>(eventName: E, callback: ChannelEvents[E]): void {\n this._eventEmitter.removeListener(eventName, callback);\n }\n\n /**\n * Close the connection\n */\n disconnect(): void {\n return channelDisconnect(this);\n }\n\n /**\n * Get current status\n */\n status(): ChannelStatus {\n return this._status;\n }\n\n /**\n * Get current state\n */\n async state(): Promise<{\n calls: TxUnpacked & { tag: Tag.CallsMtree };\n halfSignedTx?: TxUnpacked & { tag: Tag.SignedTx };\n signedTx?: TxUnpacked & { tag: Tag.SignedTx };\n trees: TxUnpacked & { tag: Tag.StateTrees };\n }> {\n const res = snakeToPascalObjKeys<{\n calls: Encoded.CallStateTree;\n halfSignedTx: Encoded.Transaction | '';\n signedTx: Encoded.Transaction | '';\n trees: Encoded.StateTrees;\n }>(await call(this, 'channels.get.offchain_state', {}));\n return {\n calls: unpackTx(res.calls, Tag.CallsMtree),\n ...res.halfSignedTx !== '' && { halfSignedTx: unpackTx(res.halfSignedTx, Tag.SignedTx) },\n ...res.signedTx !== '' && { signedTx: unpackTx(res.signedTx, Tag.SignedTx) },\n trees: unpackTx(res.trees, Tag.StateTrees),\n };\n }\n\n /**\n * Get current round\n *\n * If round cannot be determined (for example when channel has not been opened)\n * it will return `null`.\n */\n round(): number | null {\n if (this._state === '') {\n return null;\n }\n const params = unpackTx(this._state, Tag.SignedTx).encodedTx;\n switch (params.tag) {\n case Tag.ChannelCreateTx:\n return 1;\n case Tag.ChannelOffChainTx:\n case Tag.ChannelWithdrawTx:\n case Tag.ChannelDepositTx:\n return params.round;\n default:\n return null;\n }\n }\n\n /**\n * Get channel id\n *\n */\n id(): Encoded.Channel {\n if (this._channelId == null) throw new ChannelError('Channel is not initialized');\n return this._channelId;\n }\n\n /**\n * Get channel's fsm id\n *\n */\n fsmId(): Encoded.Bytearray {\n if (this._fsmId == null) throw new ChannelError('Channel is not initialized');\n return this._fsmId;\n }\n\n protected async enqueueAction(\n action: () => { handler: ChannelHandler; state?: Partial<ChannelState> },\n ): Promise<any> {\n return enqueueAction(\n this,\n (channel, state) => state?.handler === handlers.channelOpen,\n action,\n );\n }\n\n /**\n * Leave channel\n *\n * It is possible to leave a channel and then later reestablish the channel\n * off-chain state and continue operation. When a leave method is called,\n * the channel fsm passes it on to the peer fsm, reports the current mutually\n * signed state and then terminates.\n *\n * The channel can be reestablished by instantiating another Channel instance\n * with two extra params: existingChannelId and offchainTx (returned from leave\n * method as channelId and signedTx respectively).\n *\n * @example\n * ```js\n * channel.leave().then(({ channelId, signedTx }) => {\n * console.log(channelId)\n * console.log(signedTx)\n * })\n * ```\n */\n async leave(): Promise<{ channelId: Encoded.Bytearray; signedTx: Encoded.Transaction }> {\n return this.enqueueAction(() => {\n notify(this, 'channels.leave');\n return { handler: handlers.awaitingLeave };\n });\n }\n\n /**\n * Trigger mutual close\n *\n * At any moment after the channel is opened, a closing procedure can be triggered.\n * This can be done by either of the parties. The process is similar to the off-chain updates.\n *\n * @param sign - Function which verifies and signs mutual close transaction\n * @example\n * ```js\n * channel.shutdown(\n * async (tx) => await account.signTransaction(tx)\n * ).then(tx => console.log('on_chain_tx', tx))\n * ```\n */\n async shutdown(sign: SignTx): Promise<Encoded.Transaction> {\n return this.enqueueAction(() => {\n notify(this, 'channels.shutdown');\n return {\n handler: handlers.awaitingShutdownTx,\n state: { sign },\n };\n });\n }\n\n static async reconnect(options: ChannelOptions, txParams: any): Promise<Channel> {\n const { sign } = options;\n\n return Channel.initialize({\n ...options,\n reconnectTx: await sign(\n 'reconnect',\n buildTx({ ...txParams, tag: Tag.ChannelClientReconnectTx }),\n ),\n });\n }\n}\n"],"mappings":";AAAA,OAAOA,YAAY,MAAM,QAAQ;AAAC,SAEzBC,aAAa;AAAA,SACbC,OAAO,EAAEC,QAAQ;AAAA,SACjBC,GAAG;AAAA,OACL,KAAK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AK,CAAEuB,OAAO,MAAK3D,QAAQ,CAAC2B,WAAW,EAC3D+B,MAAM,CACP;EACH;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAME,KAAKA,CAAA,EAA6E;IACtF,OAAO,IAAI,CAAC1D,aAAa,CAAC,MAAM;MAC9BC,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC;MAC9B,OAAO;QAAEwD,OAAO,EAAE3D,QAAQ,CAAC6D;MAAc,CAAC;IAC5C,CAAC,CAAC;EACJ;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,QAAQA,CAACC,IAAY,EAAgC;IACzD,OAAO,IAAI,CAAC7D,aAAa,CAAC,MAAM;MAC9BC,MAAM,CAAC,IAAI,EAAE,mBAAmB,CAAC;MACjC,OAAO;QACLwD,OAAO,EAAE3D,QAAQ,CAACgE,kBAAkB;QACpC5B,KAAK,EAAE;UAAE2B;QAAK;MAChB,CAAC;IACH,CAAC,CAAC;EACJ;EAEA,aAAaE,SAASA,CAAC5C,OAAuB,EAAE6C,QAAa,EAAoB;IAC/E,MAAM;MAAEH;IAAK,CAAC,GAAG1C,OAAO;IAExB,OAAOJ,OAAO,CAAChB,UAAU,CAAC;MACxB,GAAGoB,OAAO;MACV8C,WAAW,EAAE,MAAMJ,IAAI,CACrB,WAAW,EACXlE,OAAO,CAAC;QAAE,GAAGqE,QAAQ;QAAEjB,GAAG,EAAElD,GAAG,CAACqE;MAAyB,CAAC,CAAC;IAE/D,CAAC,CAAC;EACJ;AACF"}
|
|
1
|
+
{"version":3,"file":"Base.mjs","names":["EventEmitter","snakeToPascal","buildTx","unpackTx","Tag","handlers","initialize","enqueueAction","notify","call","disconnect","channelDisconnect","ChannelError","snakeToPascalObjKeys","obj","Object","entries","reduce","result","_ref","key","val","Channel","constructor","_defineProperty","Map","options","_initialize","channel","existingFsmId","awaitingReconnection","awaitingConnection","channelOpen","on","eventName","callback","_eventEmitter","off","removeListener","status","_status","state","res","calls","CallsMtree","halfSignedTx","SignedTx","signedTx","trees","StateTrees","round","_state","params","encodedTx","tag","ChannelCreateTx","ChannelOffChainTx","ChannelWithdrawTx","ChannelDepositTx","id","_channelId","fsmId","_fsmId","action","handler","leave","awaitingLeave","shutdown","sign","awaitingShutdownTx","reconnect","txParams","reconnectTx","ChannelClientReconnectTx"],"sources":["../../src/channel/Base.ts"],"sourcesContent":["import EventEmitter from 'events';\nimport { w3cwebsocket as W3CWebSocket } from 'websocket';\nimport { snakeToPascal } from '../utils/string';\nimport { buildTx, unpackTx } from '../tx/builder';\nimport { Tag } from '../tx/builder/constants';\nimport * as handlers from './handlers';\nimport {\n initialize,\n enqueueAction,\n notify,\n call,\n disconnect as channelDisconnect,\n SignTx,\n ChannelOptions,\n ChannelState,\n ChannelHandler,\n ChannelAction,\n ChannelStatus,\n ChannelFsm,\n ChannelMessage,\n ChannelEvents,\n} from './internal';\nimport { ChannelError } from '../utils/errors';\nimport { Encoded } from '../utils/encoder';\nimport { TxUnpacked } from '../tx/builder/schema.generated';\n\nfunction snakeToPascalObjKeys<Type>(obj: object): Type {\n return Object.entries(obj).reduce((result, [key, val]) => ({\n ...result,\n [snakeToPascal(key)]: val,\n }), {}) as Type;\n}\n\n/**\n * Channel\n * @example\n * ```js\n * await Channel.initialize({\n * url: 'ws://localhost:3001',\n * role: 'initiator'\n * initiatorId: 'ak_Y1NRjHuoc3CGMYMvCmdHSBpJsMDR6Ra2t5zjhRcbtMeXXLpLH',\n * responderId: 'ak_V6an1xhec1xVaAhLuak7QoEbi6t7w5hEtYWp9bMKaJ19i6A9E',\n * initiatorAmount: 1e18,\n * responderAmount: 1e18,\n * pushAmount: 0,\n * channelReserve: 0,\n * ttl: 1000,\n * host: 'localhost',\n * port: 3002,\n * lockPeriod: 10,\n * async sign (tag, tx) => await account.signTransaction(tx)\n * })\n * ```\n */\nexport default class Channel {\n _eventEmitter = new EventEmitter();\n\n _pingTimeoutId!: NodeJS.Timeout;\n\n _nextRpcMessageId = 0;\n\n _rpcCallbacks = new Map<number, (message: object) => void>();\n\n _fsmId?: Encoded.Bytearray;\n\n _messageQueue: ChannelMessage[] = [];\n\n _isMessageQueueLocked = false;\n\n _actionQueue: ChannelAction[] = [];\n\n _isActionQueueLocked = false;\n\n _status: ChannelStatus = 'disconnected';\n\n _fsm!: ChannelFsm;\n\n _websocket!: W3CWebSocket;\n\n _state: Encoded.Transaction | '' = '';\n\n _options!: ChannelOptions;\n\n _channelId?: Encoded.Channel;\n\n /**\n * @param options - Channel params\n * @param options.url - Channel url (for example: \"ws://localhost:3001\")\n * @param options.role - Participant role (\"initiator\" or \"responder\")\n * @param options.initiatorId - Initiator's public key\n * @param options.responderId - Responder's public key\n * @param options.pushAmount - Initial deposit in favour of the responder by the initiator\n * @param options.initiatorAmount - Amount of coins the initiator has committed to\n * the channel\n * @param options.responderAmount - Amount of coins the responder has committed to\n * the channel\n * @param options.channelReserve - The minimum amount both peers need to maintain\n * @param options.ttl - Minimum block height to include the channel_create_tx\n * @param options.host - Host of the responder's node\n * @param options.port - The port of the responders node\n * @param options.lockPeriod - Amount of blocks for disputing a solo close\n * @param options.minimumDepthStrategy - How to calculate minimum depth (default: txfee)\n * @param options.minimumDepth - The minimum amount of blocks to be mined\n * @param options.fee - The fee to be used for the channel open transaction\n * @param options.gasPrice - Used for the fee computation of the channel open transaction\n * @param options.existingChannelId - Existing channel id (required if reestablishing a\n * channel)\n * @param options.offchainTx - Offchain transaction (required if reestablishing\n * a channel)\n * @param options.timeoutIdle - The time waiting for a new event to be initiated\n * (default: 600000)\n * @param options.timeoutFundingCreate - The time waiting for the initiator to produce\n * the create channel transaction after the noise session had been established (default: 120000)\n * @param options.timeoutFundingSign - The time frame the other client has to sign an\n * off-chain update after our client had initiated and signed it. This applies only for double\n * signed on-chain intended updates: channel create transaction, deposit, withdrawal and etc.\n * (default: 120000)\n * @param options.timeoutFundingLock - The time frame the other client has to confirm an\n * on-chain transaction reaching maturity (passing minimum depth) after the local node has\n * detected this. This applies only for double signed on-chain intended updates: channel create\n * transaction, deposit, withdrawal and etc. (default: 360000)\n * @param options.timeoutSign - The time frame the client has to return a signed\n * off-chain update or to decline it. This applies for all off-chain updates (default: 500000)\n * @param options.timeoutAccept - The time frame the other client has to react to an\n * event. This applies for all off-chain updates that are not meant to land on-chain, as well as\n * some special cases: opening a noise connection, mutual closing acknowledgement and\n * reestablishing an existing channel (default: 120000)\n * @param options.timeoutInitialized - the time frame the responder has to accept an\n * incoming noise session. Applicable only for initiator (default: timeout_accept's value)\n * @param options.timeoutAwaitingOpen - The time frame the initiator has to start an\n * outgoing noise session to the responder's node. Applicable only for responder (default:\n * timeout_idle's value)\n * @param options.debug=false - Log websocket communication\n * @param options.sign - Function which verifies and signs transactions\n */\n static async initialize(options: ChannelOptions): Promise<Channel> {\n return Channel._initialize(new Channel(), options);\n }\n\n static async _initialize<T extends Channel>(channel: T, options: ChannelOptions): Promise<T> {\n await initialize(\n channel,\n options.existingFsmId != null ? handlers.awaitingReconnection : handlers.awaitingConnection,\n handlers.channelOpen,\n options,\n );\n return channel;\n }\n\n /**\n * Register event listener function\n *\n * Possible events:\n *\n * - \"error\"\n * - \"stateChanged\"\n * - \"statusChanged\"\n * - \"message\"\n * - \"peerDisconnected\"\n * - \"onChainTx\"\n * - \"ownWithdrawLocked\"\n * - \"withdrawLocked\"\n * - \"ownDepositLocked\"\n * - \"depositLocked\"\n * - \"channelReestablished\"\n * - \"newContract\"\n *\n *\n * @param eventName - Event name\n * @param callback - Callback function\n */\n on<E extends keyof ChannelEvents>(eventName: E, callback: ChannelEvents[E]): void {\n this._eventEmitter.on(eventName, callback);\n }\n\n /**\n * Remove event listener function\n * @param eventName - Event name\n * @param callback - Callback function\n */\n off<E extends keyof ChannelEvents>(eventName: E, callback: ChannelEvents[E]): void {\n this._eventEmitter.removeListener(eventName, callback);\n }\n\n /**\n * Close the connection\n */\n disconnect(): void {\n return channelDisconnect(this);\n }\n\n /**\n * Get current status\n */\n status(): ChannelStatus {\n return this._status;\n }\n\n /**\n * Get current state\n */\n async state(): Promise<{\n calls: TxUnpacked & { tag: Tag.CallsMtree };\n halfSignedTx?: TxUnpacked & { tag: Tag.SignedTx };\n signedTx?: TxUnpacked & { tag: Tag.SignedTx };\n trees: TxUnpacked & { tag: Tag.StateTrees };\n }> {\n const res = snakeToPascalObjKeys<{\n calls: Encoded.CallStateTree;\n halfSignedTx: Encoded.Transaction | '';\n signedTx: Encoded.Transaction | '';\n trees: Encoded.StateTrees;\n }>(await call(this, 'channels.get.offchain_state', {}));\n return {\n calls: unpackTx(res.calls, Tag.CallsMtree),\n ...res.halfSignedTx !== '' && { halfSignedTx: unpackTx(res.halfSignedTx, Tag.SignedTx) },\n ...res.signedTx !== '' && { signedTx: unpackTx(res.signedTx, Tag.SignedTx) },\n trees: unpackTx(res.trees, Tag.StateTrees),\n };\n }\n\n /**\n * Get current round\n *\n * If round cannot be determined (for example when channel has not been opened)\n * it will return `null`.\n */\n round(): number | null {\n if (this._state === '') {\n return null;\n }\n const params = unpackTx(this._state, Tag.SignedTx).encodedTx;\n switch (params.tag) {\n case Tag.ChannelCreateTx:\n return 1;\n case Tag.ChannelOffChainTx:\n case Tag.ChannelWithdrawTx:\n case Tag.ChannelDepositTx:\n return params.round;\n default:\n return null;\n }\n }\n\n /**\n * Get channel id\n *\n */\n id(): Encoded.Channel {\n if (this._channelId == null) throw new ChannelError('Channel is not initialized');\n return this._channelId;\n }\n\n /**\n * Get channel's fsm id\n *\n */\n fsmId(): Encoded.Bytearray {\n if (this._fsmId == null) throw new ChannelError('Channel is not initialized');\n return this._fsmId;\n }\n\n protected async enqueueAction(\n action: () => { handler: ChannelHandler; state?: Partial<ChannelState> },\n ): Promise<any> {\n return enqueueAction(\n this,\n (channel, state) => state?.handler === handlers.channelOpen,\n action,\n );\n }\n\n /**\n * Leave channel\n *\n * It is possible to leave a channel and then later reestablish the channel\n * off-chain state and continue operation. When a leave method is called,\n * the channel fsm passes it on to the peer fsm, reports the current mutually\n * signed state and then terminates.\n *\n * The channel can be reestablished by instantiating another Channel instance\n * with two extra params: existingChannelId and offchainTx (returned from leave\n * method as channelId and signedTx respectively).\n *\n * @example\n * ```js\n * channel.leave().then(({ channelId, signedTx }) => {\n * console.log(channelId)\n * console.log(signedTx)\n * })\n * ```\n */\n async leave(): Promise<{ channelId: Encoded.Bytearray; signedTx: Encoded.Transaction }> {\n return this.enqueueAction(() => {\n notify(this, 'channels.leave');\n return { handler: handlers.awaitingLeave };\n });\n }\n\n /**\n * Trigger mutual close\n *\n * At any moment after the channel is opened, a closing procedure can be triggered.\n * This can be done by either of the parties. The process is similar to the off-chain updates.\n *\n * @param sign - Function which verifies and signs mutual close transaction\n * @example\n * ```js\n * channel.shutdown(\n * async (tx) => await account.signTransaction(tx)\n * ).then(tx => console.log('on_chain_tx', tx))\n * ```\n */\n async shutdown(sign: SignTx): Promise<Encoded.Transaction> {\n return this.enqueueAction(() => {\n notify(this, 'channels.shutdown');\n return {\n handler: handlers.awaitingShutdownTx,\n state: { sign },\n };\n });\n }\n\n static async reconnect(options: ChannelOptions, txParams: any): Promise<Channel> {\n const { sign } = options;\n\n return Channel.initialize({\n ...options,\n reconnectTx: await sign(\n 'reconnect',\n buildTx({ ...txParams, tag: Tag.ChannelClientReconnectTx }),\n ),\n });\n }\n}\n"],"mappings":";AAAA,OAAOA,YAAY,MAAM,QAAQ;AAAC,SAEzBC,aAAa;AAAA,SACbC,OAAO,EAAEC,QAAQ;AAAA,SACjBC,GAAG;AAAA,OACL,KAAKC,QAAQ;AAAA,SAElBC,UAAU,EACVC,aAAa,EACbC,MAAM,EACNC,IAAI,EACJC,UAAU,IAAIC,iBAAiB;AAAA,SAWxBC,YAAY;AAIrB,SAASC,oBAAoBA,CAAOC,GAAW,EAAQ;EACrD,OAAOC,MAAM,CAACC,OAAO,CAACF,GAAG,CAAC,CAAC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