@aptos-labs/ts-sdk 1.6.0 → 1.7.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/browser/index.d.ts +19 -4
- package/dist/browser/index.global.js +30 -30
- package/dist/browser/index.global.js.map +1 -1
- package/dist/common/index.d.ts +19 -4
- package/dist/common/index.js +26 -26
- package/dist/common/index.js.map +1 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/{chunk-MHWDJSMB.mjs → chunk-3NOQE6U3.mjs} +2 -2
- package/dist/esm/{chunk-WKSKGVBV.mjs → chunk-4SAUEZTN.mjs} +2 -2
- package/dist/esm/chunk-4SAUEZTN.mjs.map +1 -0
- package/dist/esm/{chunk-FG6RKPA7.mjs → chunk-5L6SRCJP.mjs} +2 -2
- package/dist/esm/{chunk-CR2ZNHVS.mjs → chunk-5WXR2O3T.mjs} +2 -2
- package/dist/esm/chunk-6UNBJAV6.mjs +2 -0
- package/dist/esm/chunk-6UNBJAV6.mjs.map +1 -0
- package/dist/esm/chunk-6Y3VBRMN.mjs +2 -0
- package/dist/esm/chunk-6Y3VBRMN.mjs.map +1 -0
- package/dist/esm/{chunk-4HULEADT.mjs → chunk-7JTOGYO7.mjs} +2 -2
- package/dist/esm/{chunk-T7U4YWE7.mjs → chunk-A2QH4A6D.mjs} +2 -2
- package/dist/esm/{chunk-Z67MKEK7.mjs → chunk-AA3GRJNL.mjs} +2 -2
- package/dist/esm/{chunk-I7MXWMCV.mjs → chunk-C7ZX475J.mjs} +2 -2
- package/dist/esm/{chunk-F7H662U6.mjs → chunk-CX5ULWJQ.mjs} +2 -2
- package/dist/esm/{chunk-W4PVDONT.mjs → chunk-D2GNCG27.mjs} +2 -2
- package/dist/esm/{chunk-QN3TJQIU.mjs → chunk-DRF6AMEZ.mjs} +2 -2
- package/dist/esm/{chunk-4HSVC56Q.mjs → chunk-ESX5X52V.mjs} +2 -2
- package/dist/esm/{chunk-T5JEOKV6.mjs → chunk-GVHOHNHT.mjs} +2 -2
- package/dist/esm/chunk-INV6U3KS.mjs +2 -0
- package/dist/esm/chunk-INV6U3KS.mjs.map +1 -0
- package/dist/esm/{chunk-YJAE5RPX.mjs → chunk-J6RCCKOA.mjs} +2 -2
- package/dist/esm/{chunk-7XJZHT63.mjs → chunk-JLL7BCD4.mjs} +2 -2
- package/dist/esm/{chunk-3KTTMSMK.mjs → chunk-MKERJNYN.mjs} +2 -2
- package/dist/esm/{chunk-S4QKXXBT.mjs → chunk-OVSV4Y32.mjs} +2 -2
- package/dist/esm/{chunk-TJJSQSO3.mjs → chunk-OWZLBIDD.mjs} +2 -2
- package/dist/esm/chunk-PJNPLRPR.mjs +2 -0
- package/dist/esm/chunk-PJNPLRPR.mjs.map +1 -0
- package/dist/esm/{chunk-XFMRYLII.mjs → chunk-Q7JKS6WV.mjs} +2 -2
- package/dist/esm/{chunk-2RZSI3B6.mjs → chunk-RIL4SHXC.mjs} +2 -2
- package/dist/esm/{chunk-4OI7MPFH.mjs → chunk-RNO5ZG3C.mjs} +2 -2
- package/dist/esm/chunk-SZYATFM7.mjs +2 -0
- package/dist/esm/chunk-SZYATFM7.mjs.map +1 -0
- package/dist/esm/chunk-TVURQPLA.mjs +2 -0
- package/dist/esm/chunk-TVURQPLA.mjs.map +1 -0
- package/dist/esm/{chunk-PD5I66D6.mjs → chunk-UJAX75ON.mjs} +2 -2
- package/dist/esm/{chunk-3DM36HLF.mjs → chunk-WC2WSKYZ.mjs} +2 -2
- package/dist/esm/{chunk-U53N6WW2.mjs → chunk-WK36MJRI.mjs} +2 -2
- package/dist/esm/{chunk-QW5W2DWF.mjs → chunk-WQI2RH2S.mjs} +2 -2
- package/dist/esm/{chunk-X47DR2C3.mjs → chunk-XOBXX273.mjs} +2 -2
- package/dist/esm/{chunk-TEKLKVZK.mjs → chunk-XQIWF5HY.mjs} +2 -2
- package/dist/esm/{chunk-SFAHLWOK.mjs → chunk-YGMT4GQ5.mjs} +2 -2
- package/dist/esm/{chunk-SIV47YF6.mjs → chunk-Z6XNTGNK.mjs} +2 -2
- package/dist/esm/{chunk-SIV47YF6.mjs.map → chunk-Z6XNTGNK.mjs.map} +1 -1
- package/dist/esm/{chunk-LOEBNFNC.mjs → chunk-ZFPA45OK.mjs} +2 -2
- package/dist/esm/{chunk-SUIDAC5B.mjs → chunk-ZIZ7PVK2.mjs} +2 -2
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/anyPublicKey.mjs +1 -1
- package/dist/esm/core/crypto/anySignature.mjs +1 -1
- package/dist/esm/core/crypto/asymmetricCrypto.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +4 -4
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +7 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +3 -3
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.d.mts +1 -0
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +9 -1
- package/package.json +16 -16
- package/src/api/digitalAsset.ts +4 -4
- package/src/internal/coin.ts +9 -4
- package/src/internal/digitalAsset.ts +197 -60
- package/src/internal/fungibleAsset.ts +15 -3
- package/src/internal/transactionSubmission.ts +40 -14
- package/src/transactions/management/transactionWorker.ts +9 -5
- package/src/transactions/transactionBuilder/transactionBuilder.ts +9 -19
- package/src/transactions/typeTag/index.ts +4 -0
- package/src/transactions/typeTag/parser.ts +1 -1
- package/src/transactions/types.ts +11 -0
- package/src/version.ts +1 -1
- package/dist/esm/chunk-223IHRAD.mjs +0 -2
- package/dist/esm/chunk-223IHRAD.mjs.map +0 -1
- package/dist/esm/chunk-5FERAW7D.mjs +0 -2
- package/dist/esm/chunk-5FERAW7D.mjs.map +0 -1
- package/dist/esm/chunk-6GL6X2IR.mjs +0 -2
- package/dist/esm/chunk-6GL6X2IR.mjs.map +0 -1
- package/dist/esm/chunk-CBLQTKVM.mjs +0 -2
- package/dist/esm/chunk-CBLQTKVM.mjs.map +0 -1
- package/dist/esm/chunk-HI6QP2FB.mjs +0 -2
- package/dist/esm/chunk-HI6QP2FB.mjs.map +0 -1
- package/dist/esm/chunk-KXLDXZWI.mjs +0 -2
- package/dist/esm/chunk-KXLDXZWI.mjs.map +0 -1
- package/dist/esm/chunk-WKSKGVBV.mjs.map +0 -1
- /package/dist/esm/{chunk-MHWDJSMB.mjs.map → chunk-3NOQE6U3.mjs.map} +0 -0
- /package/dist/esm/{chunk-FG6RKPA7.mjs.map → chunk-5L6SRCJP.mjs.map} +0 -0
- /package/dist/esm/{chunk-CR2ZNHVS.mjs.map → chunk-5WXR2O3T.mjs.map} +0 -0
- /package/dist/esm/{chunk-4HULEADT.mjs.map → chunk-7JTOGYO7.mjs.map} +0 -0
- /package/dist/esm/{chunk-T7U4YWE7.mjs.map → chunk-A2QH4A6D.mjs.map} +0 -0
- /package/dist/esm/{chunk-Z67MKEK7.mjs.map → chunk-AA3GRJNL.mjs.map} +0 -0
- /package/dist/esm/{chunk-I7MXWMCV.mjs.map → chunk-C7ZX475J.mjs.map} +0 -0
- /package/dist/esm/{chunk-F7H662U6.mjs.map → chunk-CX5ULWJQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-W4PVDONT.mjs.map → chunk-D2GNCG27.mjs.map} +0 -0
- /package/dist/esm/{chunk-QN3TJQIU.mjs.map → chunk-DRF6AMEZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-4HSVC56Q.mjs.map → chunk-ESX5X52V.mjs.map} +0 -0
- /package/dist/esm/{chunk-T5JEOKV6.mjs.map → chunk-GVHOHNHT.mjs.map} +0 -0
- /package/dist/esm/{chunk-YJAE5RPX.mjs.map → chunk-J6RCCKOA.mjs.map} +0 -0
- /package/dist/esm/{chunk-7XJZHT63.mjs.map → chunk-JLL7BCD4.mjs.map} +0 -0
- /package/dist/esm/{chunk-3KTTMSMK.mjs.map → chunk-MKERJNYN.mjs.map} +0 -0
- /package/dist/esm/{chunk-S4QKXXBT.mjs.map → chunk-OVSV4Y32.mjs.map} +0 -0
- /package/dist/esm/{chunk-TJJSQSO3.mjs.map → chunk-OWZLBIDD.mjs.map} +0 -0
- /package/dist/esm/{chunk-XFMRYLII.mjs.map → chunk-Q7JKS6WV.mjs.map} +0 -0
- /package/dist/esm/{chunk-2RZSI3B6.mjs.map → chunk-RIL4SHXC.mjs.map} +0 -0
- /package/dist/esm/{chunk-4OI7MPFH.mjs.map → chunk-RNO5ZG3C.mjs.map} +0 -0
- /package/dist/esm/{chunk-PD5I66D6.mjs.map → chunk-UJAX75ON.mjs.map} +0 -0
- /package/dist/esm/{chunk-3DM36HLF.mjs.map → chunk-WC2WSKYZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-U53N6WW2.mjs.map → chunk-WK36MJRI.mjs.map} +0 -0
- /package/dist/esm/{chunk-QW5W2DWF.mjs.map → chunk-WQI2RH2S.mjs.map} +0 -0
- /package/dist/esm/{chunk-X47DR2C3.mjs.map → chunk-XOBXX273.mjs.map} +0 -0
- /package/dist/esm/{chunk-TEKLKVZK.mjs.map → chunk-XQIWF5HY.mjs.map} +0 -0
- /package/dist/esm/{chunk-SFAHLWOK.mjs.map → chunk-YGMT4GQ5.mjs.map} +0 -0
- /package/dist/esm/{chunk-LOEBNFNC.mjs.map → chunk-ZFPA45OK.mjs.map} +0 -0
- /package/dist/esm/{chunk-SUIDAC5B.mjs.map → chunk-ZIZ7PVK2.mjs.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/internal/fungibleAsset.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file contains the underlying implementations for exposed API surface in\n * the {@link api/fungible_asset}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * fungible_asset namespace and without having a dependency cycle error.\n */\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport {\n AnyNumber,\n GetCurrentFungibleAssetBalancesResponse,\n GetFungibleAssetActivitiesResponse,\n GetFungibleAssetMetadataResponse,\n PaginationArgs,\n WhereArg,\n} from \"../types\";\nimport { queryIndexer } from \"./general\";\nimport {\n GetCurrentFungibleAssetBalances,\n GetFungibleAssetActivities,\n GetFungibleAssetMetadata,\n} from \"../types/generated/queries\";\nimport {\n GetCurrentFungibleAssetBalancesQuery,\n GetFungibleAssetActivitiesQuery,\n GetFungibleAssetMetadataQuery,\n} from \"../types/generated/operations\";\nimport {\n CurrentFungibleAssetBalancesBoolExp,\n FungibleAssetActivitiesBoolExp,\n FungibleAssetMetadataBoolExp,\n} from \"../types/generated/types\";\nimport { Account, AccountAddress } from \"../core\";\nimport {\n EntryFunctionABI,\n InputGenerateTransactionOptions,\n parseTypeTag,\n SimpleTransaction,\n TypeTagAddress,\n TypeTagU64,\n} from \"../transactions\";\nimport { generateTransaction } from \"./transactionSubmission\";\n\nexport async function getFungibleAssetMetadata(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs & WhereArg<FungibleAssetMetadataBoolExp>;\n}): Promise<GetFungibleAssetMetadataResponse> {\n const { aptosConfig, options } = args;\n\n const graphqlQuery = {\n query: GetFungibleAssetMetadata,\n variables: {\n where_condition: options?.where,\n limit: options?.limit,\n offset: options?.offset,\n },\n };\n\n const data = await queryIndexer<GetFungibleAssetMetadataQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getFungibleAssetMetadata\",\n });\n\n return data.fungible_asset_metadata;\n}\n\nexport async function getFungibleAssetActivities(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs & WhereArg<FungibleAssetActivitiesBoolExp>;\n}): Promise<GetFungibleAssetActivitiesResponse> {\n const { aptosConfig, options } = args;\n\n const graphqlQuery = {\n query: GetFungibleAssetActivities,\n variables: {\n where_condition: options?.where,\n limit: options?.limit,\n offset: options?.offset,\n },\n };\n\n const data = await queryIndexer<GetFungibleAssetActivitiesQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getFungibleAssetActivities\",\n });\n\n return data.fungible_asset_activities;\n}\n\nexport async function getCurrentFungibleAssetBalances(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs & WhereArg<CurrentFungibleAssetBalancesBoolExp>;\n}): Promise<GetCurrentFungibleAssetBalancesResponse> {\n const { aptosConfig, options } = args;\n\n const graphqlQuery = {\n query: GetCurrentFungibleAssetBalances,\n variables: {\n where_condition: options?.where,\n limit: options?.limit,\n offset: options?.offset,\n },\n };\n\n const data = await queryIndexer<GetCurrentFungibleAssetBalancesQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getCurrentFungibleAssetBalances\",\n });\n\n return data.current_fungible_asset_balances;\n}\n\nconst faTransferAbi: EntryFunctionABI = {\n typeParameters: [],\n parameters: [parseTypeTag(\"0x1::object::Object\"), new TypeTagAddress(), new TypeTagU64()],\n};\n\nexport async function transferFungibleAsset(args: {\n aptosConfig: AptosConfig;\n sender: Account;\n fungibleAssetMetadataAddress: AccountAddress;\n recipient: AccountAddress;\n amount: AnyNumber;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, sender, fungibleAssetMetadataAddress, recipient, amount, options } = args;\n return generateTransaction({\n aptosConfig,\n sender: sender.accountAddress,\n data: {\n function: \"0x1::primary_fungible_store::transfer\",\n typeArguments: [\"0x1::fungible_asset::Metadata\"],\n functionArguments: [fungibleAssetMetadataAddress, recipient, amount],\n abi: faTransferAbi,\n },\n options,\n });\n}\n"],"mappings":"wNA8CA,eAAsBA,EAAyBC,EAGD,CAC5C,GAAM,CAAE,YAAAC,EAAa,QAAAC,CAAQ,EAAIF,EAE3BG,EAAe,CACnB,MAAOC,EACP,UAAW,CACT,gBAAiBF,GAAS,MAC1B,MAAOA,GAAS,MAChB,OAAQA,GAAS,MACnB,CACF,EAQA,OANa,MAAMG,EAA4C,CAC7D,YAAAJ,EACA,MAAOE,EACP,aAAc,0BAChB,CAAC,GAEW,uBACd,CAEA,eAAsBG,EAA2BN,EAGD,CAC9C,GAAM,CAAE,YAAAC,EAAa,QAAAC,CAAQ,EAAIF,EAE3BG,EAAe,CACnB,MAAOI,EACP,UAAW,CACT,gBAAiBL,GAAS,MAC1B,MAAOA,GAAS,MAChB,OAAQA,GAAS,MACnB,CACF,EAQA,OANa,MAAMG,EAA8C,CAC/D,YAAAJ,EACA,MAAOE,EACP,aAAc,4BAChB,CAAC,GAEW,yBACd,CAEA,eAAsBK,EAAgCR,EAGD,CACnD,GAAM,CAAE,YAAAC,EAAa,QAAAC,CAAQ,EAAIF,EAE3BG,EAAe,CACnB,MAAOM,EACP,UAAW,CACT,gBAAiBP,GAAS,MAC1B,MAAOA,GAAS,MAChB,OAAQA,GAAS,MACnB,CACF,EAQA,OANa,MAAMG,EAAmD,CACpE,YAAAJ,EACA,MAAOE,EACP,aAAc,iCAChB,CAAC,GAEW,+BACd,CAEA,IAAMO,EAAkC,CACtC,eAAgB,CAAC,EACjB,WAAY,CAACC,EAAa,qBAAqB,EAAG,IAAIC,EAAkB,IAAIC,CAAY,CAC1F,EAEA,eAAsBC,EAAsBd,EAOb,CAC7B,GAAM,CAAE,YAAAC,EAAa,OAAAc,EAAQ,6BAAAC,EAA8B,UAAAC,EAAW,OAAAC,EAAQ,QAAAhB,CAAQ,EAAIF,EAC1F,OAAOmB,EAAoB,CACzB,YAAAlB,EACA,OAAQc,EAAO,eACf,KAAM,CACJ,SAAU,wCACV,cAAe,CAAC,+BAA+B,EAC/C,kBAAmB,CAACC,EAA8BC,EAAWC,CAAM,EACnE,IAAKR,CACP,EACA,QAAAR,CACF,CAAC,CACH","names":["getFungibleAssetMetadata","args","aptosConfig","options","graphqlQuery","GetFungibleAssetMetadata","queryIndexer","getFungibleAssetActivities","GetFungibleAssetActivities","getCurrentFungibleAssetBalances","GetCurrentFungibleAssetBalances","faTransferAbi","parseTypeTag","TypeTagAddress","TypeTagU64","transferFungibleAsset","sender","fungibleAssetMetadataAddress","recipient","amount","generateTransaction"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{f as e}from"./chunk-A2QH4A6D.mjs";import{b as c}from"./chunk-F7CR75CJ.mjs";import{d as r}from"./chunk-YE3DZD6T.mjs";import{e as s}from"./chunk-HHJBCGAQ.mjs";async function x(a){let{aptosConfig:t,accountAddress:i,amount:p,options:n}=a,u=n?.timeoutSecs||s,{data:d}=await r({aptosConfig:t,path:"fund",body:{address:c.from(i).toString(),amount:p},originMethod:"fundAccount"}),m=d.txn_hashes[0],o=await e({aptosConfig:t,transactionHash:m,options:{timeoutSecs:u,checkSuccess:n?.checkSuccess}});if(o.type==="user_transaction")return o;throw new Error(`Unexpected transaction received for fund account: ${o.type}`)}export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UJAX75ON.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as m}from"./chunk-OWZLBIDD.mjs";import{a as h}from"./chunk-QKTV6AZ7.mjs";import{b as t}from"./chunk-F7CR75CJ.mjs";import{a as u}from"./chunk-N4RBQZ2B.mjs";var o=class i extends u{constructor(e,s,a,n,d,l,_){super();this.sender=e,this.sequence_number=s,this.payload=a,this.max_gas_amount=n,this.gas_unit_price=d,this.expiration_timestamp_secs=l,this.chain_id=_}serialize(e){this.sender.serialize(e),e.serializeU64(this.sequence_number),this.payload.serialize(e),e.serializeU64(this.max_gas_amount),e.serializeU64(this.gas_unit_price),e.serializeU64(this.expiration_timestamp_secs),this.chain_id.serialize(e)}static deserialize(e){let s=t.deserialize(e),a=e.deserializeU64(),n=m.deserialize(e),d=e.deserializeU64(),l=e.deserializeU64(),_=e.deserializeU64(),b=h.deserialize(e);return new i(s,a,n,d,l,_,b)}},c=class extends u{static deserialize(r){let e=r.deserializeUleb128AsU32();switch(e){case 0:return p.load(r);case 1:return y.load(r);default:throw new Error(`Unknown variant index for RawTransactionWithData: ${e}`)}}},p=class i extends c{constructor(e,s){super();this.raw_txn=e,this.secondary_signer_addresses=s}serialize(e){e.serializeU32AsUleb128(0),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses)}static load(e){let s=o.deserialize(e),a=e.deserializeVector(t);return new i(s,a)}},y=class i extends c{constructor(e,s,a){super();this.raw_txn=e,this.secondary_signer_addresses=s,this.fee_payer_address=a}serialize(e){e.serializeU32AsUleb128(1),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses),this.fee_payer_address.serialize(e)}static load(e){let s=o.deserialize(e),a=e.deserializeVector(t),n=t.deserialize(e);return new i(s,a,n)}};export{o as a,c as b,p as c,y as d};
|
|
2
|
+
//# sourceMappingURL=chunk-WC2WSKYZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as y}from"./chunk-JLL7BCD4.mjs";import{a as d}from"./chunk-J6RCCKOA.mjs";import{a as A}from"./chunk-CX5ULWJQ.mjs";import{a as T}from"./chunk-GVHOHNHT.mjs";import{d as g,e as o,h as m,i as p,j as f}from"./chunk-6UNBJAV6.mjs";import{a as i,b as s,c as r,d as e,e as c,f as u}from"./chunk-A2QH4A6D.mjs";var h=class{constructor(n){this.config=n,this.build=new y(this.config),this.simulate=new A(this.config),this.submit=new T(this.config),this.batch=new d(this.config)}async getTransactions(n){return i({aptosConfig:this.config,...n})}async getTransactionByVersion(n){return r({aptosConfig:this.config,...n})}async getTransactionByHash(n){return e({aptosConfig:this.config,...n})}async isPendingTransaction(n){return c({aptosConfig:this.config,...n})}async waitForTransaction(n){return u({aptosConfig:this.config,...n})}async getGasPriceEstimation(){return s({aptosConfig:this.config})}getSigningMessage(n){return g(n)}async publishPackageTransaction(n){return p({aptosConfig:this.config,...n})}async rotateAuthKey(n){return f({aptosConfig:this.config,...n})}sign(n){return o({...n})}signAsFeePayer(n){let{signer:t,transaction:a}=n;if(!a.feePayerAddress)throw new Error(`Transaction ${a} is not a Fee Payer transaction`);return a.feePayerAddress=t.accountAddress,o({signer:t,transaction:a})}async batchTransactionsForSingleAccount(n){try{let{sender:t,data:a,options:P}=n;this.batch.forSingleAccount({sender:t,data:a,options:P})}catch(t){throw new Error(`failed to submit transactions with error: ${t}`)}}async signAndSubmitTransaction(n){let{signer:t,transaction:a}=n;return m({aptosConfig:this.config,signer:t,transaction:a})}};export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WK36MJRI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-7JTOGYO7.mjs";import{a as s,b as t,c as r,d as i,e as c,f as u,g as d,h as A,i as g,j as m,k as a,l as p,m as f,n as y,o as C,p as O,q as T}from"./chunk-YGMT4GQ5.mjs";import{f as o}from"./chunk-HHJBCGAQ.mjs";var l=class{constructor(e){this.config=e}async getAccountInfo(e){return s({aptosConfig:this.config,...e})}async getAccountModules(e){return t({aptosConfig:this.config,...e})}async getAccountModule(e){return r({aptosConfig:this.config,...e})}async getAccountTransactions(e){return i({aptosConfig:this.config,...e})}async getAccountResources(e){return c({aptosConfig:this.config,...e})}async getAccountResource(e){return u({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return d({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),A({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),g({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),m({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),p({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),y({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),C({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:o,...e})}async getAccountCoinAmount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),f({aptosConfig:this.config,...e})}async getAccountOwnedObjects(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),O({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return T({aptosConfig:this.config,...e})}};export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WQI2RH2S.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s}from"./chunk-F7CR75CJ.mjs";import{g as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s}from"./chunk-F7CR75CJ.mjs";import{g as n}from"./chunk-DRF6AMEZ.mjs";import{p as g,u as d}from"./chunk-BQSE5HHW.mjs";async function m(e){let{aptosConfig:t,poolAddress:o}=e,r=s.from(o).toStringLong(),i=await n({aptosConfig:t,query:{query:d,variables:{where_condition:{pool_address:{_eq:r}}}}});return i.num_active_delegator_per_pool[0]?i.num_active_delegator_per_pool[0].num_active_delegator:0}async function f(e){let{aptosConfig:t,options:o}=e,r={query:d,variables:{order_by:o?.orderBy}};return(await n({aptosConfig:t,query:r})).num_active_delegator_per_pool}async function A(e){let{aptosConfig:t,delegatorAddress:o,poolAddress:r}=e,a={query:g,variables:{delegatorAddress:s.from(o).toStringLong(),poolAddress:s.from(r).toStringLong()}};return(await n({aptosConfig:t,query:a})).delegated_staking_activities}export{m as a,f as b,A as c};
|
|
2
|
+
//# sourceMappingURL=chunk-XOBXX273.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-NWRKJFHV.mjs";import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-NWRKJFHV.mjs";import{a as e}from"./chunk-WC2WSKYZ.mjs";import{a as r}from"./chunk-N4RBQZ2B.mjs";var n=class o extends r{constructor(t,a){super();this.raw_txn=t,this.authenticator=a}serialize(t){this.raw_txn.serialize(t),this.authenticator.serialize(t)}static deserialize(t){let a=e.deserialize(t),s=i.deserialize(t);return new o(a,s)}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XQIWF5HY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-AH44UPM4.mjs";import{a as f}from"./chunk-FP5DPRYL.mjs";import{a as p}from"./chunk-SBMJNU2O.mjs";import{a as _}from"./chunk-FBFMQZTM.mjs";import{b as y}from"./chunk-ZFIMVSCR.mjs";import{b as m}from"./chunk-I7WRJY7K.mjs";import{b as c}from"./chunk-F7CR75CJ.mjs";import{d as b,g as d}from"./chunk-DRF6AMEZ.mjs";import{d as C,e as h,f as w,g as k,h as T,j as O,k as q,l as v}from"./chunk-BQSE5HHW.mjs";import{b as g,c as A}from"./chunk-IKCBGNRD.mjs";import{a as l}from"./chunk-6FBKUTGF.mjs";async function M(e){let{aptosConfig:n,accountAddress:t}=e,{data:o}=await g({aptosConfig:n,originMethod:"getInfo",path:`accounts/${c.from(t).toString()}`});return o}async function io(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getModules",path:`accounts/${c.from(t).toString()}/modules`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??1e3}})}async function uo(e){return e.options?.ledgerVersion!==void 0?P(e):S(async()=>P(e),`module-${e.accountAddress}-${e.moduleName}`,1e3*60*5)()}async function P(e){let{aptosConfig:n,accountAddress:t,moduleName:o,options:r}=e,{data:s}=await g({aptosConfig:n,originMethod:"getModule",path:`accounts/${c.from(t).toString()}/module/${o}`,params:{ledger_version:r?.ledgerVersion}});return s}async function go(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${c.from(t).toString()}/transactions`,params:{start:o?.offset,limit:o?.limit}})}async function Ao(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getResources",path:`accounts/${c.from(t).toString()}/resources`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??999}})}async function K(e){let{aptosConfig:n,accountAddress:t,resourceType:o,options:r}=e,{data:s}=await g({aptosConfig:n,originMethod:"getResource",path:`accounts/${c.from(t).toString()}/resource/${o}`,params:{ledger_version:r?.ledgerVersion}});return s.data}async function Q(e){let{aptosConfig:n,authenticationKey:t,options:o}=e,r=await K({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:o}),{address_map:{handle:s}}=r,a=c.from(t);try{let i=await b({aptosConfig:n,handle:s,data:{key:a.toString(),key_type:"address",value_type:"address"},options:o});return c.from(i)}catch(i){if(i instanceof l&&i.data.error_code==="table_item_not_found")return a;throw i}}async function po(e){let{aptosConfig:n,accountAddress:t}=e,r={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}},a=await d({aptosConfig:n,query:{query:q,variables:{where_condition:r}},originMethod:"getAccountTokensCount"});return a.current_token_ownerships_v2_aggregate.aggregate?a.current_token_ownerships_v2_aggregate.aggregate.count:0}async function fo(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(s.token_standard={_eq:o?.tokenStandard});let a={query:T,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedTokens"})).current_token_ownerships_v2}async function lo(e){let{aptosConfig:n,accountAddress:t,collectionAddress:o,options:r}=e,s=c.from(t).toStringLong(),a=c.from(o).toStringLong(),i={owner_address:{_eq:s},current_token_data:{collection_id:{_eq:a}},amount:{_gt:0}};r?.tokenStandard&&(i.token_standard={_eq:r?.tokenStandard});let u={query:O,variables:{where_condition:i,offset:r?.offset,limit:r?.limit,order_by:r?.orderBy}};return(await d({aptosConfig:n,query:u,originMethod:"getAccountOwnedTokensFromCollectionAddress"})).current_token_ownerships_v2}async function yo(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(s.current_collection={token_standard:{_eq:o?.tokenStandard}});let a={query:w,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCollectionsWithOwnedTokens"})).current_collection_ownership_v2_view}async function mo(e){let{aptosConfig:n,accountAddress:t}=e,o=c.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:v,variables:{address:o}},originMethod:"getAccountTransactionsCount"});return s.account_transactions_aggregate.aggregate?s.account_transactions_aggregate.aggregate.count:0}async function _o(e){let{aptosConfig:n,accountAddress:t,coinType:o}=e,r=c.from(t).toStringLong(),s=await I({aptosConfig:n,accountAddress:r,options:{where:{asset_type:{_eq:o}}}});return s[0]?s[0].amount:0}async function I(e){let{aptosConfig:n,accountAddress:t,options:o}=e,r=c.from(t).toStringLong(),s={...o?.where,owner_address:{_eq:r}},a={query:h,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCoinsData"})).current_fungible_asset_balances}async function Co(e){let{aptosConfig:n,accountAddress:t}=e,o=c.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:C,variables:{address:o}},originMethod:"getAccountCoinsCount"});if(!s.current_fungible_asset_balances_aggregate.aggregate)throw Error("Failed to get the count of account coins");return s.current_fungible_asset_balances_aggregate.aggregate.count}async function ho(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()}},a={query:k,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedObjects"})).current_objects}async function wo(e){let{aptosConfig:n,privateKey:t}=e,o=new _(t.publicKey());if(t instanceof m){let s=p.fromPublicKeyAndScheme({publicKey:o,scheme:2}).derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:s})}if(t instanceof y){let r=p.fromPublicKeyAndScheme({publicKey:o,scheme:2});if(await G({authKey:r,aptosConfig:n})){let u=r.derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:u,legacy:!1})}let a=p.fromPublicKeyAndScheme({publicKey:o,scheme:0});if(await G({authKey:a,aptosConfig:n})){let u=a.derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${t}`)}async function G(e){let{aptosConfig:n,authKey:t}=e,o=await Q({aptosConfig:n,authenticationKey:t.derivedAddress()});try{return await M({aptosConfig:n,accountAddress:o}),!0}catch(r){if(r.status===404)return!1;throw new Error(`Error while looking for an account info ${o.toString()}`)}}export{M as a,io as b,uo as c,go as d,Ao as e,K as f,Q as g,po as h,fo as i,lo as j,yo as k,mo as l,_o as m,I as n,Co as o,ho as p,wo as q,G as r};
|
|
2
|
+
//# sourceMappingURL=chunk-YGMT4GQ5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-D2GNCG27.mjs";import{a as o,b as c}from"./chunk-U6Z4FNB7.mjs";import{a as h,h as d}from"./chunk-6UNBJAV6.mjs";import{f as u}from"./chunk-A2QH4A6D.mjs";import g from"eventemitter3";var p="fulfilled",T=(n=>(n.TransactionSent="transactionSent",n.TransactionSendFailed="transactionSendFailed",n.TransactionExecuted="transactionExecuted",n.TransactionExecutionFailed="transactionExecutionFailed",n.ExecutionFinish="executionFinish",n))(T||{}),m=class extends g{constructor(t,e,a=30,n=100,i=10){super();this.taskQueue=new o;this.transactionsQueue=new o;this.outstandingTransactions=new o;this.sentTransactions=[];this.executedTransactions=[];this.aptosConfig=t,this.account=e,this.started=!1,this.accountSequnceNumber=new l(t,e,a,n,i)}async submitNextTransaction(){try{for(;;){let t=await this.accountSequnceNumber.nextSequenceNumber();if(t===null)return;let e=await this.generateNextTransaction(this.account,t);if(!e)return;let a=d({aptosConfig:this.aptosConfig,transaction:e,signer:this.account});await this.outstandingTransactions.enqueue([a,t])}}catch(t){if(t instanceof c)return;throw new Error(`Submit transaction failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async processTransactions(){try{for(;;){let t=[],e=[],[a,n]=await this.outstandingTransactions.dequeue();for(t.push(a),e.push(n);!this.outstandingTransactions.isEmpty();)[a,n]=await this.outstandingTransactions.dequeue(),t.push(a),e.push(n);let i=await Promise.allSettled(t);for(let s=0;s<i.length&&s<e.length;s+=1){let r=i[s];n=e[s],r.status===p?(this.sentTransactions.push([r.value.hash,n,null]),this.emit("transactionSent",{message:`transaction hash ${r.value.hash} has been committed to chain`,transactionHash:r.value.hash}),await this.checkTransaction(r,n)):(this.sentTransactions.push([r.status,n,r.reason]),this.emit("transactionSendFailed",{message:`failed to commit transaction ${this.sentTransactions.length} with error ${r.reason}`,error:r.reason}))}this.emit("executionFinish",{message:`execute ${i.length} transactions finished`})}}catch(t){if(t instanceof c)return;throw new Error(`Process execution failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async checkTransaction(t,e){try{let a=[];a.push(u({aptosConfig:this.aptosConfig,transactionHash:t.value.hash}));let n=await Promise.allSettled(a);for(let i=0;i<n.length;i+=1){let s=n[i];s.status===p?(this.executedTransactions.push([s.value.hash,e,null]),this.emit("transactionExecuted",{message:`transaction hash ${s.value.hash} has been executed on chain`,transactionHash:t.value.hash})):(this.executedTransactions.push([s.status,e,s.reason]),this.emit("transactionExecutionFailed",{message:`failed to execute transaction ${this.executedTransactions.length} with error ${s.reason}`,error:s.reason}))}}catch(a){throw new Error(`Check transaction failed for ${this.account.accountAddress.toString()} with error ${a}`)}}async push(t,e){this.transactionsQueue.enqueue([t,e])}async generateNextTransaction(t,e){if(this.transactionsQueue.isEmpty())return;let[a,n]=await this.transactionsQueue.dequeue();return h({aptosConfig:this.aptosConfig,sender:t.accountAddress,data:a,options:{...n,accountSequenceNumber:e}})}async run(){try{for(;!this.taskQueue.isCancelled();)await(await this.taskQueue.dequeue())()}catch(t){throw new Error(`Unable to start transaction batching: ${t}`)}}start(){if(this.started)throw new Error("worker has already started");this.started=!0,this.taskQueue.enqueue(()=>this.submitNextTransaction()),this.taskQueue.enqueue(()=>this.processTransactions()),this.run()}stop(){if(this.taskQueue.isCancelled())throw new Error("worker has already stopped");this.started=!1,this.taskQueue.cancel()}};export{p as a,T as b,m as c};
|
|
2
|
+
//# sourceMappingURL=chunk-Z6XNTGNK.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/transactions/management/transactionWorker.ts"],"sourcesContent":["/* eslint-disable no-await-in-loop */\n\nimport EventEmitter from \"eventemitter3\";\nimport { AptosConfig } from \"../../api/aptosConfig\";\nimport { Account } from \"../../core\";\nimport { waitForTransaction } from \"../../internal/transaction\";\nimport { generateTransaction, signAndSubmitTransaction } from \"../../internal/transactionSubmission\";\nimport { PendingTransactionResponse, TransactionResponse } from \"../../types\";\nimport { InputGenerateTransactionOptions, InputGenerateTransactionPayloadData, SimpleTransaction } from \"../types\";\nimport { AccountSequenceNumber } from \"./accountSequenceNumber\";\nimport { AsyncQueue, AsyncQueueCancelledError } from \"./asyncQueue\";\n\nexport const promiseFulfilledStatus = \"fulfilled\";\n\n// Event types the worker fires during execution and\n// the dapp can listen to\nexport enum TransactionWorkerEventsEnum {\n // fired after a transaction gets sent to the chain\n TransactionSent = \"transactionSent\",\n // fired if there is an error sending the transaction to the chain\n TransactionSendFailed = \"transactionSendFailed\",\n // fired when a single transaction has executed successfully\n TransactionExecuted = \"transactionExecuted\",\n // fired if a single transaction fails in execution\n TransactionExecutionFailed = \"transactionExecutionFailed\",\n // fired when the worker has finished its job / when the queue has been emptied\n ExecutionFinish = \"executionFinish\",\n}\n\n// Typed interface of the worker events\nexport interface TransactionWorkerEvents {\n transactionSent: (data: SuccessEventData) => void;\n transactionSendFailed: (data: FailureEventData) => void;\n transactionExecuted: (data: SuccessEventData) => void;\n transactionExecutionFailed: (data: FailureEventData) => void;\n executionFinish: (data: ExecutionFinishEventData) => void;\n}\n\n// Type for when the worker has finished its job\nexport type ExecutionFinishEventData = {\n message: string;\n};\n\n// Type for a success event\nexport type SuccessEventData = {\n message: string;\n transactionHash: string;\n};\n\n// Type for a failure event\nexport type FailureEventData = {\n message: string;\n error: string;\n};\n\n/**\n * TransactionWorker provides a simple framework for receiving payloads to be processed.\n *\n * Once one `start()` the process and pushes a new transaction, the worker acquires\n * the current account's next sequence number (by using the AccountSequenceNumber class),\n * generates a signed transaction and pushes an async submission process into the `outstandingTransactions` queue.\n * At the same time, the worker processes transactions by reading the `outstandingTransactions` queue\n * and submits the next transaction to chain, it\n * 1) waits for resolution of the submission process or get pre-execution validation error\n * and 2) waits for the resolution of the execution process or get an execution error.\n * The worker fires events for any submission and/or execution success and/or failure.\n */\nexport class TransactionWorker extends EventEmitter<TransactionWorkerEvents> {\n readonly aptosConfig: AptosConfig;\n\n readonly account: Account;\n\n // current account sequence number\n readonly accountSequnceNumber: AccountSequenceNumber;\n\n readonly taskQueue: AsyncQueue<() => Promise<void>> = new AsyncQueue<() => Promise<void>>();\n\n // process has started\n started: boolean;\n\n /**\n * transactions payloads waiting to be generated and signed\n *\n * TODO support entry function payload from ABI builder\n */\n transactionsQueue = new AsyncQueue<\n [InputGenerateTransactionPayloadData, InputGenerateTransactionOptions | undefined]\n >();\n\n /**\n * signed transactions waiting to be submitted\n */\n outstandingTransactions = new AsyncQueue<[Promise<PendingTransactionResponse>, bigint]>();\n\n /**\n * transactions that have been submitted to chain\n */\n sentTransactions: Array<[string, bigint, any]> = [];\n\n /**\n * transactions that have been committed to chain\n */\n executedTransactions: Array<[string, bigint, any]> = [];\n\n /**\n * Provides a simple framework for receiving payloads to be processed.\n *\n * @param aptosConfig - a config object\n * @param sender - a sender as Account\n * @param maxWaitTime - the max wait time to wait before resyncing the sequence number\n * to the current on-chain state, default to 30\n * @param maximumInFlight - submit up to `maximumInFlight` transactions per account.\n * Mempool limits the number of transactions per account to 100, hence why we default to 100.\n * @param sleepTime - If `maximumInFlight` are in flight, wait `sleepTime` seconds before re-evaluating, default to 10\n */\n constructor(\n aptosConfig: AptosConfig,\n account: Account,\n maxWaitTime: number = 30,\n maximumInFlight: number = 100,\n sleepTime: number = 10,\n ) {\n super();\n this.aptosConfig = aptosConfig;\n this.account = account;\n this.started = false;\n this.accountSequnceNumber = new AccountSequenceNumber(\n aptosConfig,\n account,\n maxWaitTime,\n maximumInFlight,\n sleepTime,\n );\n }\n\n /**\n * Gets the current account sequence number,\n * generates the transaction with the account sequence number,\n * adds the transaction to the outstanding transaction queue\n * to be processed later.\n */\n async submitNextTransaction() {\n try {\n /* eslint-disable no-constant-condition */\n while (true) {\n const sequenceNumber = await this.accountSequnceNumber.nextSequenceNumber();\n if (sequenceNumber === null) return;\n const transaction = await this.generateNextTransaction(this.account, sequenceNumber);\n if (!transaction) return;\n const pendingTransaction = signAndSubmitTransaction({\n aptosConfig: this.aptosConfig,\n transaction,\n signer: this.account,\n });\n await this.outstandingTransactions.enqueue([pendingTransaction, sequenceNumber]);\n }\n } catch (error: any) {\n if (error instanceof AsyncQueueCancelledError) {\n return;\n }\n throw new Error(`Submit transaction failed for ${this.account.accountAddress.toString()} with error ${error}`);\n }\n }\n\n /**\n * Reads the outstanding transaction queue and submits the transaction to chain.\n *\n * If the transaction has fulfilled, it pushes the transaction to the processed\n * transactions queue and fires a transactionsFulfilled event.\n *\n * If the transaction has failed, it pushes the transaction to the processed\n * transactions queue with the failure reason and fires a transactionsFailed event.\n */\n async processTransactions() {\n try {\n /* eslint-disable no-constant-condition */\n while (true) {\n const awaitingTransactions = [];\n const sequenceNumbers = [];\n let [pendingTransaction, sequenceNumber] = await this.outstandingTransactions.dequeue();\n\n awaitingTransactions.push(pendingTransaction);\n sequenceNumbers.push(sequenceNumber);\n\n while (!this.outstandingTransactions.isEmpty()) {\n [pendingTransaction, sequenceNumber] = await this.outstandingTransactions.dequeue();\n\n awaitingTransactions.push(pendingTransaction);\n sequenceNumbers.push(sequenceNumber);\n }\n // send awaiting transactions to chain\n const sentTransactions = await Promise.allSettled(awaitingTransactions);\n for (let i = 0; i < sentTransactions.length && i < sequenceNumbers.length; i += 1) {\n // check sent transaction status\n const sentTransaction = sentTransactions[i];\n sequenceNumber = sequenceNumbers[i];\n if (sentTransaction.status === promiseFulfilledStatus) {\n // transaction sent to chain\n this.sentTransactions.push([sentTransaction.value.hash, sequenceNumber, null]);\n // check sent transaction execution\n this.emit(TransactionWorkerEventsEnum.TransactionSent, {\n message: `transaction hash ${sentTransaction.value.hash} has been committed to chain`,\n transactionHash: sentTransaction.value.hash,\n });\n await this.checkTransaction(sentTransaction, sequenceNumber);\n } else {\n // send transaction failed\n this.sentTransactions.push([sentTransaction.status, sequenceNumber, sentTransaction.reason]);\n this.emit(TransactionWorkerEventsEnum.TransactionSendFailed, {\n message: `failed to commit transaction ${this.sentTransactions.length} with error ${sentTransaction.reason}`,\n error: sentTransaction.reason,\n });\n }\n }\n this.emit(TransactionWorkerEventsEnum.ExecutionFinish, {\n message: `execute ${sentTransactions.length} transactions finished`,\n });\n }\n } catch (error: any) {\n if (error instanceof AsyncQueueCancelledError) {\n return;\n }\n throw new Error(`Process execution failed for ${this.account.accountAddress.toString()} with error ${error}`);\n }\n }\n\n /**\n * Once transaction has been sent to chain, we check for its execution status.\n * @param sentTransaction transactions that were sent to chain and are now waiting to be executed\n * @param sequenceNumber the account's sequence number that was sent with the transaction\n */\n async checkTransaction(sentTransaction: PromiseFulfilledResult<PendingTransactionResponse>, sequenceNumber: bigint) {\n try {\n const waitFor: Array<Promise<TransactionResponse>> = [];\n waitFor.push(waitForTransaction({ aptosConfig: this.aptosConfig, transactionHash: sentTransaction.value.hash }));\n const sentTransactions = await Promise.allSettled(waitFor);\n\n for (let i = 0; i < sentTransactions.length; i += 1) {\n const executedTransaction = sentTransactions[i];\n if (executedTransaction.status === promiseFulfilledStatus) {\n // transaction executed to chain\n this.executedTransactions.push([executedTransaction.value.hash, sequenceNumber, null]);\n this.emit(TransactionWorkerEventsEnum.TransactionExecuted, {\n message: `transaction hash ${executedTransaction.value.hash} has been executed on chain`,\n transactionHash: sentTransaction.value.hash,\n });\n } else {\n // transaction execution failed\n this.executedTransactions.push([executedTransaction.status, sequenceNumber, executedTransaction.reason]);\n this.emit(TransactionWorkerEventsEnum.TransactionExecutionFailed, {\n message: `failed to execute transaction ${this.executedTransactions.length} with error ${executedTransaction.reason}`,\n error: executedTransaction.reason,\n });\n }\n }\n } catch (error: any) {\n throw new Error(`Check transaction failed for ${this.account.accountAddress.toString()} with error ${error}`);\n }\n }\n\n /**\n * Push transaction to the transactions queue\n * @param payload Transaction payload\n */\n async push(\n transactionData: InputGenerateTransactionPayloadData,\n options?: InputGenerateTransactionOptions,\n ): Promise<void> {\n await this.transactionsQueue.enqueue([transactionData, options]);\n }\n\n /**\n * Generates a signed transaction that can be submitted to chain\n * @param account an Aptos account\n * @param sequenceNumber a sequence number the transaction will be generated with\n * @returns\n */\n async generateNextTransaction(account: Account, sequenceNumber: bigint): Promise<SimpleTransaction | undefined> {\n if (this.transactionsQueue.isEmpty()) return undefined;\n const [transactionData, options] = await this.transactionsQueue.dequeue();\n const transaction = await generateTransaction({\n aptosConfig: this.aptosConfig,\n sender: account.accountAddress,\n data: transactionData,\n options: { ...options, accountSequenceNumber: sequenceNumber },\n });\n\n return transaction;\n }\n\n /**\n * Starts transaction submission and transaction processing.\n */\n async run() {\n try {\n while (!this.taskQueue.isCancelled()) {\n const task = await this.taskQueue.dequeue();\n await task();\n }\n } catch (error: any) {\n throw new Error(`Unable to start transaction batching: ${error}`);\n }\n }\n\n /**\n * Starts the transaction management process.\n */\n start() {\n if (this.started) {\n throw new Error(\"worker has already started\");\n }\n this.started = true;\n this.taskQueue.enqueue(() => this.submitNextTransaction());\n this.taskQueue.enqueue(() => this.processTransactions());\n this.run();\n }\n\n /**\n * Stops the the transaction management process.\n */\n stop() {\n if (this.taskQueue.isCancelled()) {\n throw new Error(\"worker has already stopped\");\n }\n this.started = false;\n this.taskQueue.cancel();\n }\n}\n"],"mappings":"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","names":["EventEmitter","promiseFulfilledStatus","TransactionWorkerEventsEnum","TransactionWorker","EventEmitter","aptosConfig","account","maxWaitTime","maximumInFlight","sleepTime","AsyncQueue","AccountSequenceNumber","sequenceNumber","transaction","pendingTransaction","signAndSubmitTransaction","error","AsyncQueueCancelledError","awaitingTransactions","sequenceNumbers","sentTransactions","i","sentTransaction","waitFor","waitForTransaction","executedTransaction","transactionData","options","generateTransaction"]}
|
|
1
|
+
{"version":3,"sources":["../../src/transactions/management/transactionWorker.ts"],"sourcesContent":["/* eslint-disable no-await-in-loop */\n\nimport EventEmitter from \"eventemitter3\";\nimport { AptosConfig } from \"../../api/aptosConfig\";\nimport { Account } from \"../../core\";\nimport { waitForTransaction } from \"../../internal/transaction\";\nimport { generateTransaction, signAndSubmitTransaction } from \"../../internal/transactionSubmission\";\nimport { PendingTransactionResponse, TransactionResponse } from \"../../types\";\nimport { InputGenerateTransactionOptions, InputGenerateTransactionPayloadData, SimpleTransaction } from \"../types\";\nimport { AccountSequenceNumber } from \"./accountSequenceNumber\";\nimport { AsyncQueue, AsyncQueueCancelledError } from \"./asyncQueue\";\n\nexport const promiseFulfilledStatus = \"fulfilled\";\n\n// Event types the worker fires during execution and\n// the dapp can listen to\nexport enum TransactionWorkerEventsEnum {\n // fired after a transaction gets sent to the chain\n TransactionSent = \"transactionSent\",\n // fired if there is an error sending the transaction to the chain\n TransactionSendFailed = \"transactionSendFailed\",\n // fired when a single transaction has executed successfully\n TransactionExecuted = \"transactionExecuted\",\n // fired if a single transaction fails in execution\n TransactionExecutionFailed = \"transactionExecutionFailed\",\n // fired when the worker has finished its job / when the queue has been emptied\n ExecutionFinish = \"executionFinish\",\n}\n\n// Typed interface of the worker events\nexport interface TransactionWorkerEvents {\n transactionSent: (data: SuccessEventData) => void;\n transactionSendFailed: (data: FailureEventData) => void;\n transactionExecuted: (data: SuccessEventData) => void;\n transactionExecutionFailed: (data: FailureEventData) => void;\n executionFinish: (data: ExecutionFinishEventData) => void;\n}\n\n// Type for when the worker has finished its job\nexport type ExecutionFinishEventData = {\n message: string;\n};\n\n// Type for a success event\nexport type SuccessEventData = {\n message: string;\n transactionHash: string;\n};\n\n// Type for a failure event\nexport type FailureEventData = {\n message: string;\n error: string;\n};\n\n/**\n * TransactionWorker provides a simple framework for receiving payloads to be processed.\n *\n * Once one `start()` the process and pushes a new transaction, the worker acquires\n * the current account's next sequence number (by using the AccountSequenceNumber class),\n * generates a signed transaction and pushes an async submission process into the `outstandingTransactions` queue.\n * At the same time, the worker processes transactions by reading the `outstandingTransactions` queue\n * and submits the next transaction to chain, it\n * 1) waits for resolution of the submission process or get pre-execution validation error\n * and 2) waits for the resolution of the execution process or get an execution error.\n * The worker fires events for any submission and/or execution success and/or failure.\n */\nexport class TransactionWorker extends EventEmitter<TransactionWorkerEvents> {\n readonly aptosConfig: AptosConfig;\n\n readonly account: Account;\n\n // current account sequence number\n readonly accountSequnceNumber: AccountSequenceNumber;\n\n readonly taskQueue: AsyncQueue<() => Promise<void>> = new AsyncQueue<() => Promise<void>>();\n\n // process has started\n started: boolean;\n\n /**\n * transactions payloads waiting to be generated and signed\n *\n * TODO support entry function payload from ABI builder\n */\n transactionsQueue = new AsyncQueue<\n [InputGenerateTransactionPayloadData, InputGenerateTransactionOptions | undefined]\n >();\n\n /**\n * signed transactions waiting to be submitted\n */\n outstandingTransactions = new AsyncQueue<[Promise<PendingTransactionResponse>, bigint]>();\n\n /**\n * transactions that have been submitted to chain\n */\n sentTransactions: Array<[string, bigint, any]> = [];\n\n /**\n * transactions that have been committed to chain\n */\n executedTransactions: Array<[string, bigint, any]> = [];\n\n /**\n * Provides a simple framework for receiving payloads to be processed.\n *\n * @param aptosConfig - a config object\n * @param sender - a sender as Account\n * @param maxWaitTime - the max wait time to wait before resyncing the sequence number\n * to the current on-chain state, default to 30\n * @param maximumInFlight - submit up to `maximumInFlight` transactions per account.\n * Mempool limits the number of transactions per account to 100, hence why we default to 100.\n * @param sleepTime - If `maximumInFlight` are in flight, wait `sleepTime` seconds before re-evaluating, default to 10\n */\n constructor(\n aptosConfig: AptosConfig,\n account: Account,\n maxWaitTime: number = 30,\n maximumInFlight: number = 100,\n sleepTime: number = 10,\n ) {\n super();\n this.aptosConfig = aptosConfig;\n this.account = account;\n this.started = false;\n this.accountSequnceNumber = new AccountSequenceNumber(\n aptosConfig,\n account,\n maxWaitTime,\n maximumInFlight,\n sleepTime,\n );\n }\n\n /**\n * Gets the current account sequence number,\n * generates the transaction with the account sequence number,\n * adds the transaction to the outstanding transaction queue\n * to be processed later.\n */\n async submitNextTransaction() {\n try {\n /* eslint-disable no-constant-condition */\n while (true) {\n const sequenceNumber = await this.accountSequnceNumber.nextSequenceNumber();\n if (sequenceNumber === null) return;\n const transaction = await this.generateNextTransaction(this.account, sequenceNumber);\n if (!transaction) return;\n const pendingTransaction = signAndSubmitTransaction({\n aptosConfig: this.aptosConfig,\n transaction,\n signer: this.account,\n });\n await this.outstandingTransactions.enqueue([pendingTransaction, sequenceNumber]);\n }\n } catch (error: any) {\n if (error instanceof AsyncQueueCancelledError) {\n return;\n }\n throw new Error(`Submit transaction failed for ${this.account.accountAddress.toString()} with error ${error}`);\n }\n }\n\n /**\n * Reads the outstanding transaction queue and submits the transaction to chain.\n *\n * If the transaction has fulfilled, it pushes the transaction to the processed\n * transactions queue and fires a transactionsFulfilled event.\n *\n * If the transaction has failed, it pushes the transaction to the processed\n * transactions queue with the failure reason and fires a transactionsFailed event.\n */\n async processTransactions() {\n try {\n /* eslint-disable no-constant-condition */\n while (true) {\n const awaitingTransactions = [];\n const sequenceNumbers = [];\n let [pendingTransaction, sequenceNumber] = await this.outstandingTransactions.dequeue();\n\n awaitingTransactions.push(pendingTransaction);\n sequenceNumbers.push(sequenceNumber);\n\n while (!this.outstandingTransactions.isEmpty()) {\n [pendingTransaction, sequenceNumber] = await this.outstandingTransactions.dequeue();\n\n awaitingTransactions.push(pendingTransaction);\n sequenceNumbers.push(sequenceNumber);\n }\n // send awaiting transactions to chain\n const sentTransactions = await Promise.allSettled(awaitingTransactions);\n for (let i = 0; i < sentTransactions.length && i < sequenceNumbers.length; i += 1) {\n // check sent transaction status\n const sentTransaction = sentTransactions[i];\n sequenceNumber = sequenceNumbers[i];\n if (sentTransaction.status === promiseFulfilledStatus) {\n // transaction sent to chain\n this.sentTransactions.push([sentTransaction.value.hash, sequenceNumber, null]);\n // check sent transaction execution\n this.emit(TransactionWorkerEventsEnum.TransactionSent, {\n message: `transaction hash ${sentTransaction.value.hash} has been committed to chain`,\n transactionHash: sentTransaction.value.hash,\n });\n await this.checkTransaction(sentTransaction, sequenceNumber);\n } else {\n // send transaction failed\n this.sentTransactions.push([sentTransaction.status, sequenceNumber, sentTransaction.reason]);\n this.emit(TransactionWorkerEventsEnum.TransactionSendFailed, {\n message: `failed to commit transaction ${this.sentTransactions.length} with error ${sentTransaction.reason}`,\n error: sentTransaction.reason,\n });\n }\n }\n this.emit(TransactionWorkerEventsEnum.ExecutionFinish, {\n message: `execute ${sentTransactions.length} transactions finished`,\n });\n }\n } catch (error: any) {\n if (error instanceof AsyncQueueCancelledError) {\n return;\n }\n throw new Error(`Process execution failed for ${this.account.accountAddress.toString()} with error ${error}`);\n }\n }\n\n /**\n * Once transaction has been sent to chain, we check for its execution status.\n * @param sentTransaction transactions that were sent to chain and are now waiting to be executed\n * @param sequenceNumber the account's sequence number that was sent with the transaction\n */\n async checkTransaction(sentTransaction: PromiseFulfilledResult<PendingTransactionResponse>, sequenceNumber: bigint) {\n try {\n const waitFor: Array<Promise<TransactionResponse>> = [];\n waitFor.push(waitForTransaction({ aptosConfig: this.aptosConfig, transactionHash: sentTransaction.value.hash }));\n const sentTransactions = await Promise.allSettled(waitFor);\n\n for (let i = 0; i < sentTransactions.length; i += 1) {\n const executedTransaction = sentTransactions[i];\n if (executedTransaction.status === promiseFulfilledStatus) {\n // transaction executed to chain\n this.executedTransactions.push([executedTransaction.value.hash, sequenceNumber, null]);\n this.emit(TransactionWorkerEventsEnum.TransactionExecuted, {\n message: `transaction hash ${executedTransaction.value.hash} has been executed on chain`,\n transactionHash: sentTransaction.value.hash,\n });\n } else {\n // transaction execution failed\n this.executedTransactions.push([executedTransaction.status, sequenceNumber, executedTransaction.reason]);\n this.emit(TransactionWorkerEventsEnum.TransactionExecutionFailed, {\n message: `failed to execute transaction ${this.executedTransactions.length} with error ${executedTransaction.reason}`,\n error: executedTransaction.reason,\n });\n }\n }\n } catch (error: any) {\n throw new Error(`Check transaction failed for ${this.account.accountAddress.toString()} with error ${error}`);\n }\n }\n\n /**\n * Push transaction to the transactions queue\n *\n * @param transactionData Transaction payload\n * @param transactionData.abi For all entry function payloads, the ABI to skip remote ABI lookups\n * @param options.maxGasAmount Maximum gas amount for the transaction\n * @param options.gasUnitPrice Gas unit price for the transaction\n * @param options.expireTimestamp expiration timestamp on the transaction\n * @param options.accountSequenceNumber the sequence number for the transaction\n */\n async push(\n transactionData: InputGenerateTransactionPayloadData,\n options?: InputGenerateTransactionOptions,\n ): Promise<void> {\n this.transactionsQueue.enqueue([transactionData, options]);\n }\n\n /**\n * Generates a signed transaction that can be submitted to chain\n * @param account an Aptos account\n * @param sequenceNumber a sequence number the transaction will be generated with\n * @returns\n */\n async generateNextTransaction(account: Account, sequenceNumber: bigint): Promise<SimpleTransaction | undefined> {\n if (this.transactionsQueue.isEmpty()) return undefined;\n const [transactionData, options] = await this.transactionsQueue.dequeue();\n return generateTransaction({\n aptosConfig: this.aptosConfig,\n sender: account.accountAddress,\n data: transactionData,\n options: { ...options, accountSequenceNumber: sequenceNumber },\n });\n }\n\n /**\n * Starts transaction submission and transaction processing.\n */\n async run() {\n try {\n while (!this.taskQueue.isCancelled()) {\n const task = await this.taskQueue.dequeue();\n await task();\n }\n } catch (error: any) {\n throw new Error(`Unable to start transaction batching: ${error}`);\n }\n }\n\n /**\n * Starts the transaction management process.\n */\n start() {\n if (this.started) {\n throw new Error(\"worker has already started\");\n }\n this.started = true;\n this.taskQueue.enqueue(() => this.submitNextTransaction());\n this.taskQueue.enqueue(() => this.processTransactions());\n this.run();\n }\n\n /**\n * Stops the the transaction management process.\n */\n stop() {\n if (this.taskQueue.isCancelled()) {\n throw new Error(\"worker has already stopped\");\n }\n this.started = false;\n this.taskQueue.cancel();\n }\n}\n"],"mappings":"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","names":["EventEmitter","promiseFulfilledStatus","TransactionWorkerEventsEnum","TransactionWorker","EventEmitter","aptosConfig","account","maxWaitTime","maximumInFlight","sleepTime","AsyncQueue","AccountSequenceNumber","sequenceNumber","transaction","pendingTransaction","signAndSubmitTransaction","error","AsyncQueueCancelledError","awaitingTransactions","sequenceNumbers","sentTransactions","i","sentTransaction","waitFor","waitForTransaction","executedTransaction","transactionData","options","generateTransaction"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as s,c as t,d as r,e as n,f as i,g as a,i as g,j as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o,b as s,c as t,d as r,e as n,f as i,g as a,i as g,j as c}from"./chunk-DRF6AMEZ.mjs";var u=class{constructor(e){this.config=e}async getLedgerInfo(){return o({aptosConfig:this.config})}async getChainId(){return(await this.getLedgerInfo()).chain_id}async getBlockByVersion(e){return s({aptosConfig:this.config,...e})}async getBlockByHeight(e){return t({aptosConfig:this.config,...e})}async getTableItem(e){return r({aptosConfig:this.config,...e})}async view(e){return n({aptosConfig:this.config,...e})}async getChainTopUserTransactions(e){return i({aptosConfig:this.config,...e})}async queryIndexer(e){return a({aptosConfig:this.config,...e})}async getIndexerLastSuccessVersion(){return g({aptosConfig:this.config})}async getProcessorStatus(e){return c({aptosConfig:this.config,processorType:e})}};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZFPA45OK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as r,c as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o,b as r,c as t}from"./chunk-AA3GRJNL.mjs";import{a as n}from"./chunk-7JTOGYO7.mjs";var s=class{constructor(e){this.config=e}async getAccountEventsByCreationNumber(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),o({aptosConfig:this.config,...e})}async getAccountEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),r({aptosConfig:this.config,...e})}async getEvents(e){return await n({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"events_processor"}),t({aptosConfig:this.config,...e})}};export{s as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZIZ7PVK2.mjs.map
|
package/dist/esm/client/core.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-T5IFXLOP.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-T5IFXLOP.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-3UYBNX3P.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{b as aptosRequest,a as request};
|
|
2
2
|
//# sourceMappingURL=core.mjs.map
|
package/dist/esm/client/get.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-IKCBGNRD.mjs";import"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-IKCBGNRD.mjs";import"../chunk-HHJBCGAQ.mjs";import"../chunk-77SKA4HT.mjs";import"../chunk-T5IFXLOP.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-3UYBNX3P.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{a as get,b as getAptosFullNode,c as paginateWithCursor};
|
|
2
2
|
//# sourceMappingURL=get.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-N2FKVZ4D.mjs";import{a as
|
|
1
|
+
import"../chunk-N2FKVZ4D.mjs";import{a as d,b as e,c as f}from"../chunk-IKCBGNRD.mjs";import{a as g,b as h,c as i,d as j}from"../chunk-YE3DZD6T.mjs";import"../chunk-HHJBCGAQ.mjs";import"../chunk-77SKA4HT.mjs";import{a as b,b as c}from"../chunk-T5IFXLOP.mjs";import{a}from"../chunk-6FBKUTGF.mjs";import"../chunk-3UYBNX3P.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{a as AptosApiError,c as aptosRequest,d as get,e as getAptosFullNode,f as paginateWithCursor,g as post,j as postAptosFaucet,h as postAptosFullNode,i as postAptosIndexer,b as request};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/client/post.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-YE3DZD6T.mjs";import"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-YE3DZD6T.mjs";import"../chunk-HHJBCGAQ.mjs";import"../chunk-77SKA4HT.mjs";import"../chunk-T5IFXLOP.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-3UYBNX3P.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{a as post,d as postAptosFaucet,b as postAptosFullNode,c as postAptosIndexer};
|
|
2
2
|
//# sourceMappingURL=post.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-FP5DPRYL.mjs";import"../chunk-SBMJNU2O.mjs";import"../chunk-7IGH7N52.mjs";import"../chunk-UCHGKGCF.mjs";import"../chunk-FBFMQZTM.mjs";import"../chunk-ZFIMVSCR.mjs";import"../chunk-I7WRJY7K.mjs";import"../chunk-V6JFR2CB.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-F7CR75CJ.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-FP5DPRYL.mjs";import"../chunk-SBMJNU2O.mjs";import"../chunk-7IGH7N52.mjs";import"../chunk-UCHGKGCF.mjs";import"../chunk-FBFMQZTM.mjs";import"../chunk-ZFIMVSCR.mjs";import"../chunk-I7WRJY7K.mjs";import"../chunk-V6JFR2CB.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-F7CR75CJ.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-F7MOQC7Z.mjs";import"../chunk-PPTG6BDV.mjs";import"../chunk-B2ZKW23W.mjs";import"../chunk-VRSUCKJA.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-N4RBQZ2B.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as Account};
|
|
2
2
|
//# sourceMappingURL=account.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-F7CR75CJ.mjs";import"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-F7CR75CJ.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-N4RBQZ2B.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{b as AccountAddress,a as AddressInvalidReason};
|
|
2
2
|
//# sourceMappingURL=accountAddress.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-SBMJNU2O.mjs";import"../chunk-7IGH7N52.mjs";import"../chunk-UCHGKGCF.mjs";import"../chunk-FBFMQZTM.mjs";import"../chunk-ZFIMVSCR.mjs";import"../chunk-I7WRJY7K.mjs";import"../chunk-V6JFR2CB.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-F7CR75CJ.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-SBMJNU2O.mjs";import"../chunk-7IGH7N52.mjs";import"../chunk-UCHGKGCF.mjs";import"../chunk-FBFMQZTM.mjs";import"../chunk-ZFIMVSCR.mjs";import"../chunk-I7WRJY7K.mjs";import"../chunk-V6JFR2CB.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-F7CR75CJ.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-F7MOQC7Z.mjs";import"../chunk-PPTG6BDV.mjs";import"../chunk-B2ZKW23W.mjs";import"../chunk-VRSUCKJA.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-N4RBQZ2B.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as AuthenticationKey};
|
|
2
2
|
//# sourceMappingURL=authenticationKey.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-FBFMQZTM.mjs";import"../../chunk-ZFIMVSCR.mjs";import"../../chunk-I7WRJY7K.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-FBFMQZTM.mjs";import"../../chunk-ZFIMVSCR.mjs";import"../../chunk-I7WRJY7K.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as AnyPublicKey};
|
|
2
2
|
//# sourceMappingURL=anyPublicKey.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-2QV6HI3M.mjs";import"../../chunk-ZFIMVSCR.mjs";import"../../chunk-I7WRJY7K.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-2QV6HI3M.mjs";import"../../chunk-ZFIMVSCR.mjs";import"../../chunk-I7WRJY7K.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as AnySignature};
|
|
2
2
|
//# sourceMappingURL=anySignature.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-V6JFR2CB.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-V6JFR2CB.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as PrivateKey,a as PublicKey,c as Signature};
|
|
2
2
|
//# sourceMappingURL=asymmetricCrypto.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-ZFIMVSCR.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-ZFIMVSCR.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as Ed25519PrivateKey,a as Ed25519PublicKey,c as Ed25519Signature};
|
|
2
2
|
//# sourceMappingURL=ed25519.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-UIVJXLRM.mjs";import{a as x}from"../../chunk-2QV6HI3M.mjs";import{a as q,b as r}from"../../chunk-7IGH7N52.mjs";import{a as w}from"../../chunk-UCHGKGCF.mjs";import{a as v}from"../../chunk-FBFMQZTM.mjs";import{a as n,b as o,c as p}from"../../chunk-ZFIMVSCR.mjs";import{a as s,b as t,c as u}from"../../chunk-I7WRJY7K.mjs";import{a,b,c}from"../../chunk-V6JFR2CB.mjs";import{a as d,b as e,c as f,d as g,e as h,f as i,g as j,h as k,i as l,j as m}from"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-
|
|
1
|
+
import"../../chunk-UIVJXLRM.mjs";import{a as x}from"../../chunk-2QV6HI3M.mjs";import{a as q,b as r}from"../../chunk-7IGH7N52.mjs";import{a as w}from"../../chunk-UCHGKGCF.mjs";import{a as v}from"../../chunk-FBFMQZTM.mjs";import{a as n,b as o,c as p}from"../../chunk-ZFIMVSCR.mjs";import{a as s,b as t,c as u}from"../../chunk-I7WRJY7K.mjs";import{a,b,c}from"../../chunk-V6JFR2CB.mjs";import{a as d,b as e,c as f,d as g,e as h,f as i,g as j,h as k,i as l,j as m}from"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{e as APTOS_BIP44_REGEX,d as APTOS_HARDENED_REGEX,v as AnyPublicKey,x as AnySignature,k as CKDPriv,o as Ed25519PrivateKey,n as Ed25519PublicKey,p as Ed25519Signature,g as HARDENED_OFFSET,f as KeyType,q as MultiEd25519PublicKey,r as MultiEd25519Signature,w as MultiKey,b as PrivateKey,a as PublicKey,t as Secp256k1PrivateKey,s as Secp256k1PublicKey,u as Secp256k1Signature,c as Signature,j as deriveKey,h as isValidBIP44Path,i as isValidHardenedPath,m as mnemonicToSeed,l as splitPath};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-7IGH7N52.mjs";import"../../chunk-ZFIMVSCR.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-7IGH7N52.mjs";import"../../chunk-ZFIMVSCR.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as MultiEd25519PublicKey,b as MultiEd25519Signature};
|
|
2
2
|
//# sourceMappingURL=multiEd25519.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-UCHGKGCF.mjs";import"../../chunk-FBFMQZTM.mjs";import"../../chunk-ZFIMVSCR.mjs";import"../../chunk-I7WRJY7K.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-UCHGKGCF.mjs";import"../../chunk-FBFMQZTM.mjs";import"../../chunk-ZFIMVSCR.mjs";import"../../chunk-I7WRJY7K.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as MultiKey};
|
|
2
2
|
//# sourceMappingURL=multiKey.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-I7WRJY7K.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-I7WRJY7K.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as Secp256k1PrivateKey,a as Secp256k1PublicKey,c as Secp256k1Signature};
|
|
2
2
|
//# sourceMappingURL=secp256k1.mjs.map
|
package/dist/esm/core/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-E7FWVXGX.mjs";import"../chunk-UIVJXLRM.mjs";import{a as E}from"../chunk-2QV6HI3M.mjs";import{a as D}from"../chunk-FP5DPRYL.mjs";import{a as C}from"../chunk-SBMJNU2O.mjs";import{a as v,b as w}from"../chunk-7IGH7N52.mjs";import{a as B}from"../chunk-UCHGKGCF.mjs";import{a as A}from"../chunk-FBFMQZTM.mjs";import{a as s,b as t,c as u}from"../chunk-ZFIMVSCR.mjs";import{a as x,b as y,c as z}from"../chunk-I7WRJY7K.mjs";import{a as f,b as g,c as h}from"../chunk-V6JFR2CB.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o,h as p,i as q,j as r}from"../chunk-LR65XHSF.mjs";import{a as d,b as e}from"../chunk-F7CR75CJ.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-PPTG6BDV.mjs";import"../chunk-B2ZKW23W.mjs";import"../chunk-
|
|
1
|
+
import"../chunk-E7FWVXGX.mjs";import"../chunk-UIVJXLRM.mjs";import{a as E}from"../chunk-2QV6HI3M.mjs";import{a as D}from"../chunk-FP5DPRYL.mjs";import{a as C}from"../chunk-SBMJNU2O.mjs";import{a as v,b as w}from"../chunk-7IGH7N52.mjs";import{a as B}from"../chunk-UCHGKGCF.mjs";import{a as A}from"../chunk-FBFMQZTM.mjs";import{a as s,b as t,c as u}from"../chunk-ZFIMVSCR.mjs";import{a as x,b as y,c as z}from"../chunk-I7WRJY7K.mjs";import{a as f,b as g,c as h}from"../chunk-V6JFR2CB.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o,h as p,i as q,j as r}from"../chunk-LR65XHSF.mjs";import{a as d,b as e}from"../chunk-F7CR75CJ.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-F7MOQC7Z.mjs";import"../chunk-PPTG6BDV.mjs";import"../chunk-B2ZKW23W.mjs";import"../chunk-VRSUCKJA.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-N4RBQZ2B.mjs";import{a as b,b as c}from"../chunk-NL72WE3E.mjs";import{a}from"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{j as APTOS_BIP44_REGEX,i as APTOS_HARDENED_REGEX,D as Account,e as AccountAddress,d as AddressInvalidReason,A as AnyPublicKey,E as AnySignature,C as AuthenticationKey,p as CKDPriv,t as Ed25519PrivateKey,s as Ed25519PublicKey,u as Ed25519Signature,l as HARDENED_OFFSET,c as Hex,b as HexInvalidReason,k as KeyType,v as MultiEd25519PublicKey,w as MultiEd25519Signature,B as MultiKey,a as ParsingError,g as PrivateKey,f as PublicKey,y as Secp256k1PrivateKey,x as Secp256k1PublicKey,z as Secp256k1Signature,h as Signature,o as deriveKey,m as isValidBIP44Path,n as isValidHardenedPath,r as mnemonicToSeed,q as splitPath};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -38,7 +38,7 @@ export { buildTransaction, deriveTransactionType, generateMultiSignersSignedTran
|
|
|
38
38
|
export { checkOrConvertArgument, convertArgument, fetchEntryFunctionAbi, standardizeTypeTags } from './transactions/transactionBuilder/remoteAbi.mjs';
|
|
39
39
|
export { StructTag, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVector, aptosCoinStructTag, objectStructTag, optionStructTag, stringStructTag } from './transactions/typeTag/index.mjs';
|
|
40
40
|
export { TypeTagParserError, TypeTagParserErrorType, parseTypeTag } from './transactions/typeTag/parser.mjs';
|
|
41
|
-
export { AnyRawTransaction, AnyRawTransactionInstance, AnyTransactionPayloadInstance, EntryFunctionABI, EntryFunctionArgumentTypes, InputEntryFunctionData, InputEntryFunctionDataWithRemoteABI, InputGenerateMultiAgentRawTransactionArgs, InputGenerateMultiAgentRawTransactionData, InputGenerateRawTransactionArgs, InputGenerateSingleSignerRawTransactionArgs, InputGenerateSingleSignerRawTransactionData, InputGenerateTransactionData, InputGenerateTransactionOptions, InputGenerateTransactionPayloadData, InputGenerateTransactionPayloadDataWithRemoteABI, InputMultiSigData, InputMultiSigDataWithRemoteABI, InputScriptData, InputSimulateTransactionData, InputSimulateTransactionOptions, InputSubmitTransactionData, MultiAgentTransaction, ScriptFunctionArgumentTypes, SimpleEntryFunctionArgumentTypes, SimpleTransaction } from './transactions/types.mjs';
|
|
41
|
+
export { AnyRawTransaction, AnyRawTransactionInstance, AnyTransactionPayloadInstance, EntryFunctionABI, EntryFunctionArgumentTypes, InputEntryFunctionData, InputEntryFunctionDataWithABI, InputEntryFunctionDataWithRemoteABI, InputGenerateMultiAgentRawTransactionArgs, InputGenerateMultiAgentRawTransactionData, InputGenerateRawTransactionArgs, InputGenerateSingleSignerRawTransactionArgs, InputGenerateSingleSignerRawTransactionData, InputGenerateTransactionData, InputGenerateTransactionOptions, InputGenerateTransactionPayloadData, InputGenerateTransactionPayloadDataWithABI, InputGenerateTransactionPayloadDataWithRemoteABI, InputMultiSigData, InputMultiSigDataWithABI, InputMultiSigDataWithRemoteABI, InputScriptData, InputSimulateTransactionData, InputSimulateTransactionOptions, InputSubmitTransactionData, MultiAgentTransaction, ScriptFunctionArgumentTypes, SimpleEntryFunctionArgumentTypes, SimpleTransaction } from './transactions/types.mjs';
|
|
42
42
|
export { AccountSequenceNumber } from './transactions/management/accountSequenceNumber.mjs';
|
|
43
43
|
export { ExecutionFinishEventData, FailureEventData, SuccessEventData, TransactionWorker, TransactionWorkerEvents, TransactionWorkerEventsEnum, promiseFulfilledStatus } from './transactions/management/transactionWorker.mjs';
|
|
44
44
|
export { AccountAuthenticatorVariant, AccountData, AccountSignature, AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, AptosRequest, AptosSettings, AuthenticationKeyScheme, Block, BlockMetadataTransactionResponse, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, DecodedTableData, DeletedTableData, DeriveScheme, DirectWriteSet, EntryFunctionPayloadResponse, Event, EventGuid, GasEstimation, GenerateAccount, GenerateAccountWithEd25519, GenerateAccountWithSingleSignerSecp256k1Key, GenesisPayload, GenesisTransactionResponse, HexInput, InputViewRequestData, LedgerInfo, LedgerVersionArg, MimeType, MoveAbility, MoveAddressType, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveFunctionVisibility, MoveModule, MoveModuleBytecode, MoveModuleId, MoveObjectType, MoveOptionType, MoveResource, MoveScriptBytecode, MoveStruct, MoveStructField, MoveStructId, MoveStructType, MoveType, MoveUint128Type, MoveUint16Type, MoveUint256Type, MoveUint32Type, MoveUint64Type, MoveUint8Type, MoveValue, MultisigPayloadResponse, OrderByArg, PaginationArgs, PendingTransactionResponse, RoleType, ScriptPayloadResponse, ScriptTransactionArgumentVariants, ScriptWriteSet, SigningScheme, SigningSchemeInput, StateCheckpointTransactionResponse, TableItemRequest, TokenStandardArg, TransactionAuthenticatorVariant, TransactionEd25519Signature, TransactionFeePayerSignature, TransactionMultiAgentSignature, TransactionMultiEd25519Signature, TransactionPayloadResponse, TransactionPayloadVariants, TransactionResponse, TransactionResponseType, TransactionSecp256k1Signature, TransactionSignature, TransactionVariants, TypeTagVariants, Uint128, Uint16, Uint256, Uint32, Uint64, Uint8, UserTransactionResponse, ViewRequest, WaitForTransactionOptions, WhereArg, WriteSet, WriteSetChange, WriteSetChangeDeleteModule, WriteSetChangeDeleteResource, WriteSetChangeDeleteTableItem, WriteSetChangeWriteModule, WriteSetChangeWriteResource, WriteSetChangeWriteTableItem, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse } from './types/index.mjs';
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-CYDWEPFL.mjs";import"./chunk-RMMOF53Q.mjs";import{a as Ee}from"./chunk-
|
|
1
|
+
import"./chunk-CYDWEPFL.mjs";import"./chunk-RMMOF53Q.mjs";import{a as Ee}from"./chunk-5L6SRCJP.mjs";import"./chunk-RIL4SHXC.mjs";import"./chunk-XOBXX273.mjs";import"./chunk-WK36MJRI.mjs";import"./chunk-JLL7BCD4.mjs";import"./chunk-J6RCCKOA.mjs";import"./chunk-IHYTP2EW.mjs";import{a as Be,b as Ce,c as De}from"./chunk-Z6XNTGNK.mjs";import{a as Ae}from"./chunk-D2GNCG27.mjs";import"./chunk-U6Z4FNB7.mjs";import"./chunk-CX5ULWJQ.mjs";import"./chunk-GVHOHNHT.mjs";import"./chunk-6EMN3BOV.mjs";import{a as Vo}from"./chunk-CCUD52OF.mjs";import"./chunk-ESX5X52V.mjs";import"./chunk-6Y3VBRMN.mjs";import"./chunk-4SAUEZTN.mjs";import"./chunk-INV6U3KS.mjs";import"./chunk-ZIZ7PVK2.mjs";import"./chunk-AA3GRJNL.mjs";import"./chunk-Q7JKS6WV.mjs";import"./chunk-UJAX75ON.mjs";import"./chunk-C7ZX475J.mjs";import"./chunk-TVURQPLA.mjs";import"./chunk-ZFPA45OK.mjs";import"./chunk-WQI2RH2S.mjs";import"./chunk-7JTOGYO7.mjs";import"./chunk-5WXR2O3T.mjs";import"./chunk-3NOQE6U3.mjs";import"./chunk-6UNBJAV6.mjs";import"./chunk-I5OYNCZS.mjs";import"./chunk-R7G3CLRI.mjs";import{a as je,b as ke,c as le,d as ne,e as qe,f as se,g as ue,h as ve,i as we,j as ye,k as ze}from"./chunk-SZYATFM7.mjs";import{a as de,b as ge,c as he,d as ie}from"./chunk-MKERJNYN.mjs";import{a as Qr,b as Rr,c as Sr}from"./chunk-OVSV4Y32.mjs";import{a as Tr,b as Ur,c as Vr,d as Wr,e as Xr,f as Yr,g as Zr,h as _r,i as $r,j as oe,k as re,l as ee,m as fe,n as me,o as pe,p as te,q as xe,r as ae,s as be,t as ce}from"./chunk-RNO5ZG3C.mjs";import"./chunk-BSCOVLWS.mjs";import"./chunk-HTZTTZQJ.mjs";import{a as Wo}from"./chunk-O57QZZF2.mjs";import{a as Pr}from"./chunk-XQIWF5HY.mjs";import"./chunk-UYVPNUH3.mjs";import{a as or,b as rr,c as er,d as fr,e as mr,f as pr}from"./chunk-NWRKJFHV.mjs";import{a as Xo,b as Yo,c as Zo,d as _o,e as $o}from"./chunk-ERWQOVBF.mjs";import{a as Lr,b as Mr,c as Nr,d as Or}from"./chunk-WC2WSKYZ.mjs";import{a as Cr,b as Dr,c as Er,d as Fr,e as Gr,f as Hr,g as Ir,h as Jr,i as Kr}from"./chunk-OWZLBIDD.mjs";import{a as br,b as cr,c as dr,d as gr,e as hr,f as ir,g as jr,h as kr,i as lr,j as nr,k as qr,l as sr,m as ur,n as vr,o as wr,p as yr,q as zr,r as Ar,s as Br}from"./chunk-PJNPLRPR.mjs";import{a as tr}from"./chunk-QKTV6AZ7.mjs";import{a as ar}from"./chunk-7D5LHQNS.mjs";import{a as xr}from"./chunk-IHCIKE42.mjs";import"./chunk-V3MBJJTL.mjs";import"./chunk-YGMT4GQ5.mjs";import"./chunk-E7FWVXGX.mjs";import"./chunk-UIVJXLRM.mjs";import{a as Uo}from"./chunk-2QV6HI3M.mjs";import"./chunk-A2QH4A6D.mjs";import"./chunk-AH44UPM4.mjs";import{a as To}from"./chunk-FP5DPRYL.mjs";import{a as So}from"./chunk-SBMJNU2O.mjs";import{a as Lo,b as Mo}from"./chunk-7IGH7N52.mjs";import{a as Ro}from"./chunk-UCHGKGCF.mjs";import{a as Qo}from"./chunk-FBFMQZTM.mjs";import{a as Io,b as Jo,c as Ko}from"./chunk-ZFIMVSCR.mjs";import{a as No,b as Oo,c as Po}from"./chunk-I7WRJY7K.mjs";import{a as uo,b as vo,c as wo}from"./chunk-V6JFR2CB.mjs";import{a as yo,b as zo,c as Ao,d as Bo,e as Co,f as Do,g as Eo,h as Fo,i as Go,j as Ho}from"./chunk-LR65XHSF.mjs";import{a as po,b as to}from"./chunk-F7CR75CJ.mjs";import"./chunk-DRF6AMEZ.mjs";import"./chunk-BQSE5HHW.mjs";import"./chunk-N2FKVZ4D.mjs";import{a as S,b as T,c as U}from"./chunk-IKCBGNRD.mjs";import{a as V,b as W,c as X,d as Y}from"./chunk-YE3DZD6T.mjs";import{a as J,b as K,c as L,d as M,e as N,f as O,g as P,h as Q,i as R}from"./chunk-HHJBCGAQ.mjs";import{a as D,b as E,c as F,d as G,e as H,f as I}from"./chunk-77SKA4HT.mjs";import{a as B,b as C}from"./chunk-T5IFXLOP.mjs";import{a as o}from"./chunk-6FBKUTGF.mjs";import"./chunk-3UYBNX3P.mjs";import"./chunk-3JPVQHOR.mjs";import"./chunk-FZY4PMEE.mjs";import{a as no,b as qo,c as so}from"./chunk-F7MOQC7Z.mjs";import{a as bo}from"./chunk-PPTG6BDV.mjs";import{a as ao}from"./chunk-B2ZKW23W.mjs";import{a as co,b as go,c as ho,d as io,e as jo,f as ko,g as lo}from"./chunk-VRSUCKJA.mjs";import{a as r,b as e,c as f,d as m,e as p,f as t,g as x,h as a,i as b,j as c,k as d,l as g,m as h,n as i,o as j,p as k,q as l,r as n,s as q,t as s,u,v,w,x as y,y as z,z as A}from"./chunk-ALFESCPU.mjs";import"./chunk-4WPQQPUF.mjs";import{a as xo}from"./chunk-6IFMQ5AS.mjs";import{a as oo,b as ro,c as eo,d as fo,e as mo}from"./chunk-N4RBQZ2B.mjs";import{a as _,b as $}from"./chunk-NL72WE3E.mjs";import{a as Z}from"./chunk-FBPNHF54.mjs";import"./chunk-56CNRT2K.mjs";import"./chunk-FVA2OPG4.mjs";export{zo as APTOS_BIP44_REGEX,O as APTOS_COIN,yo as APTOS_HARDENED_REGEX,To as Account,to as AccountAddress,Xo as AccountAuthenticator,Yo as AccountAuthenticatorEd25519,Zo as AccountAuthenticatorMultiEd25519,$o as AccountAuthenticatorMultiKey,_o as AccountAuthenticatorSingleKey,x as AccountAuthenticatorVariant,Ae as AccountSequenceNumber,po as AddressInvalidReason,Qo as AnyPublicKey,a as AnyPublicKeyVariant,Uo as AnySignature,b as AnySignatureVariant,Ee as Aptos,o as AptosApiError,J as AptosApiType,Vo as AptosConfig,So as AuthenticationKey,co as Bool,Fo as CKDPriv,tr as ChainId,L as DEFAULT_MAX_GAS_AMOUNT,K as DEFAULT_NETWORK,M as DEFAULT_TXN_EXP_SEC_FROM_NOW,N as DEFAULT_TXN_TIMEOUT_SEC,A as DeriveScheme,xo as Deserializer,Jo as Ed25519PrivateKey,Io as Ed25519PublicKey,Ko as Ed25519Signature,Hr as EntryFunction,bo as EntryFunctionBytes,Or as FeePayerRawTransaction,ao as FixedBytes,Bo as HARDENED_OFFSET,$ as Hex,_ as HexInvalidReason,xr as Identifier,Ao as KeyType,r as MimeType,ar as ModuleId,v as MoveAbility,u as MoveFunctionVisibility,so as MoveOption,qo as MoveString,no as MoveVector,Nr as MultiAgentRawTransaction,Lo as MultiEd25519PublicKey,Mo as MultiEd25519Signature,Ro as MultiKey,Jr as MultiSig,Kr as MultiSigTransactionPayload,G as Network,H as NetworkToChainId,F as NetworkToFaucetAPI,D as NetworkToIndexerAPI,I as NetworkToNetworkName,E as NetworkToNodeAPI,Z as ParsingError,vo as PrivateKey,R as ProcessorType,uo as PublicKey,P as RAW_TRANSACTION_SALT,Q as RAW_TRANSACTION_WITH_DATA_SALT,Lr as RawTransaction,Mr as RawTransactionWithData,w as RoleType,Wo as RotationProofChallenge,Ir as Script,f as ScriptTransactionArgumentVariants,Oo as Secp256k1PrivateKey,No as Secp256k1PublicKey,Po as Secp256k1Signature,oo as Serializable,ro as Serializer,wo as Signature,Pr as SignedTransaction,y as SigningScheme,z as SigningSchemeInput,wr as StructTag,or as TransactionAuthenticator,rr as TransactionAuthenticatorEd25519,mr as TransactionAuthenticatorFeePayer,fr as TransactionAuthenticatorMultiAgent,er as TransactionAuthenticatorMultiEd25519,pr as TransactionAuthenticatorSingleSender,t as TransactionAuthenticatorVariant,Dr as TransactionPayload,Fr as TransactionPayloadEntryFunction,Gr as TransactionPayloadMultiSig,Er as TransactionPayloadScript,m as TransactionPayloadVariants,c as TransactionResponseType,p as TransactionVariants,De as TransactionWorker,Ce as TransactionWorkerEventsEnum,br as TypeTag,lr as TypeTagAddress,cr as TypeTagBool,sr as TypeTagGeneric,Rr as TypeTagParserError,Qr as TypeTagParserErrorType,qr as TypeTagReference,nr as TypeTagSigner,vr as TypeTagStruct,jr as TypeTagU128,gr as TypeTagU16,kr as TypeTagU256,hr as TypeTagU32,ir as TypeTagU64,dr as TypeTagU8,e as TypeTagVariants,ur as TypeTagVector,ko as U128,ho as U16,lo as U256,io as U32,jo as U64,go as U8,yr as aptosCoinStructTag,C as aptosRequest,ne as buildTransaction,ie as checkOrConvertArgument,he as convertArgument,Eo as deriveKey,we as deriveTransactionType,Cr as deserializeFromScriptArgument,eo as ensureBoolean,ge as fetchEntryFunctionAbi,be as findFirstNonSignerArg,ye as generateMultiSignersSignedTransaction,le as generateRawTransaction,ve as generateSignedTransaction,qe as generateSignedTransactionForSimulation,ze as generateSigningMessage,je as generateTransactionPayload,ke as generateTransactionPayloadWithABI,S as get,T as getAptosFullNode,se as getAuthenticatorForSimulation,ce as getFunctionParts,_r as isBcsAddress,Zr as isBcsBool,oe as isBcsFixedBytes,$r as isBcsString,pe as isBcsU128,ee as isBcsU16,te as isBcsU256,fe as isBcsU32,me as isBcsU64,re as isBcsU8,i as isBlockMetadataTransactionResponse,Tr as isBool,k as isEd25519Signature,Yr as isEncodedEntryFunctionArgument,q as isFeePayerSignature,h as isGenesisTransactionResponse,Wr as isLargeNumber,n as isMultiAgentSignature,s as isMultiEd25519Signature,Xr as isNull,Vr as isNumber,d as isPendingTransactionResponse,xe as isScriptDataInput,l as isSecp256k1Signature,j as isStateCheckpointTransactionResponse,Ur as isString,g as isUserTransactionResponse,Co as isValidBIP44Path,Do as isValidHardenedPath,Ho as mnemonicToSeed,Br as objectStructTag,Ar as optionStructTag,fo as outOfRangeErrorMessage,U as paginateWithCursor,Sr as parseTypeTag,V as post,Y as postAptosFaucet,W as postAptosFullNode,X as postAptosIndexer,Be as promiseFulfilledStatus,B as request,ue as sign,Go as splitPath,de as standardizeTypeTags,zr as stringStructTag,ae as throwTypeMismatch,mo as validateNumberInRange};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r}from"../chunk-YGMT4GQ5.mjs";import"../chunk-E7FWVXGX.mjs";import"../chunk-UIVJXLRM.mjs";import"../chunk-2QV6HI3M.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-FP5DPRYL.mjs";import"../chunk-SBMJNU2O.mjs";import"../chunk-7IGH7N52.mjs";import"../chunk-UCHGKGCF.mjs";import"../chunk-FBFMQZTM.mjs";import"../chunk-ZFIMVSCR.mjs";import"../chunk-I7WRJY7K.mjs";import"../chunk-V6JFR2CB.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-F7CR75CJ.mjs";import"../chunk-DRF6AMEZ.mjs";import"../chunk-BQSE5HHW.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-IKCBGNRD.mjs";import"../chunk-YE3DZD6T.mjs";import"../chunk-HHJBCGAQ.mjs";import"../chunk-77SKA4HT.mjs";import"../chunk-T5IFXLOP.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-3UYBNX3P.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-F7MOQC7Z.mjs";import"../chunk-PPTG6BDV.mjs";import"../chunk-B2ZKW23W.mjs";import"../chunk-VRSUCKJA.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-N4RBQZ2B.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{q as deriveAccountFromPrivateKey,m as getAccountCoinAmount,o as getAccountCoinsCount,n as getAccountCoinsData,k as getAccountCollectionsWithOwnedTokens,p as getAccountOwnedObjects,i as getAccountOwnedTokens,j as getAccountOwnedTokensFromCollectionAddress,h as getAccountTokensCount,l as getAccountTransactionsCount,a as getInfo,c as getModule,b as getModules,f as getResource,e as getResources,d as getTransactions,r as isAccountExist,g as lookupOriginalAccountAddress};
|
|
2
2
|
//# sourceMappingURL=account.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r}from"../chunk-3NOQE6U3.mjs";import"../chunk-6UNBJAV6.mjs";import"../chunk-I5OYNCZS.mjs";import"../chunk-R7G3CLRI.mjs";import"../chunk-SZYATFM7.mjs";import"../chunk-MKERJNYN.mjs";import"../chunk-OVSV4Y32.mjs";import"../chunk-RNO5ZG3C.mjs";import"../chunk-BSCOVLWS.mjs";import"../chunk-HTZTTZQJ.mjs";import"../chunk-O57QZZF2.mjs";import"../chunk-XQIWF5HY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-NWRKJFHV.mjs";import"../chunk-ERWQOVBF.mjs";import"../chunk-WC2WSKYZ.mjs";import"../chunk-OWZLBIDD.mjs";import"../chunk-PJNPLRPR.mjs";import"../chunk-QKTV6AZ7.mjs";import"../chunk-7D5LHQNS.mjs";import"../chunk-IHCIKE42.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-YGMT4GQ5.mjs";import"../chunk-E7FWVXGX.mjs";import"../chunk-UIVJXLRM.mjs";import"../chunk-2QV6HI3M.mjs";import"../chunk-A2QH4A6D.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-FP5DPRYL.mjs";import"../chunk-SBMJNU2O.mjs";import"../chunk-7IGH7N52.mjs";import"../chunk-UCHGKGCF.mjs";import"../chunk-FBFMQZTM.mjs";import"../chunk-ZFIMVSCR.mjs";import"../chunk-I7WRJY7K.mjs";import"../chunk-V6JFR2CB.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-F7CR75CJ.mjs";import"../chunk-DRF6AMEZ.mjs";import"../chunk-BQSE5HHW.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-IKCBGNRD.mjs";import"../chunk-YE3DZD6T.mjs";import"../chunk-HHJBCGAQ.mjs";import"../chunk-77SKA4HT.mjs";import"../chunk-T5IFXLOP.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-3UYBNX3P.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-F7MOQC7Z.mjs";import"../chunk-PPTG6BDV.mjs";import"../chunk-B2ZKW23W.mjs";import"../chunk-VRSUCKJA.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-N4RBQZ2B.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{e as LOCAL_ANS_ACCOUNT_ADDRESS,d as LOCAL_ANS_ACCOUNT_PK,a as VALIDATION_RULES_DESCRIPTION,o as getAccountDomains,n as getAccountNames,p as getAccountSubdomains,q as getDomainSubdomains,h as getExpiration,m as getName,f as getOwnerAddress,i as getPrimaryName,k as getTargetAddress,c as isValidANSName,b as isValidANSSegment,g as registerName,r as renewDomain,j as setPrimaryName,l as setTargetAddress};
|
|
2
2
|
//# sourceMappingURL=ans.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-6Y3VBRMN.mjs";import"../chunk-6UNBJAV6.mjs";import"../chunk-I5OYNCZS.mjs";import"../chunk-R7G3CLRI.mjs";import"../chunk-SZYATFM7.mjs";import"../chunk-MKERJNYN.mjs";import"../chunk-OVSV4Y32.mjs";import"../chunk-RNO5ZG3C.mjs";import"../chunk-BSCOVLWS.mjs";import"../chunk-HTZTTZQJ.mjs";import"../chunk-O57QZZF2.mjs";import"../chunk-XQIWF5HY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-NWRKJFHV.mjs";import"../chunk-ERWQOVBF.mjs";import"../chunk-WC2WSKYZ.mjs";import"../chunk-OWZLBIDD.mjs";import"../chunk-PJNPLRPR.mjs";import"../chunk-QKTV6AZ7.mjs";import"../chunk-7D5LHQNS.mjs";import"../chunk-IHCIKE42.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-YGMT4GQ5.mjs";import"../chunk-E7FWVXGX.mjs";import"../chunk-UIVJXLRM.mjs";import"../chunk-2QV6HI3M.mjs";import"../chunk-A2QH4A6D.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-FP5DPRYL.mjs";import"../chunk-SBMJNU2O.mjs";import"../chunk-7IGH7N52.mjs";import"../chunk-UCHGKGCF.mjs";import"../chunk-FBFMQZTM.mjs";import"../chunk-ZFIMVSCR.mjs";import"../chunk-I7WRJY7K.mjs";import"../chunk-V6JFR2CB.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-F7CR75CJ.mjs";import"../chunk-DRF6AMEZ.mjs";import"../chunk-BQSE5HHW.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-IKCBGNRD.mjs";import"../chunk-YE3DZD6T.mjs";import"../chunk-HHJBCGAQ.mjs";import"../chunk-77SKA4HT.mjs";import"../chunk-T5IFXLOP.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-3UYBNX3P.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-F7MOQC7Z.mjs";import"../chunk-PPTG6BDV.mjs";import"../chunk-B2ZKW23W.mjs";import"../chunk-VRSUCKJA.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-N4RBQZ2B.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as transferCoinTransaction};
|
|
2
2
|
//# sourceMappingURL=coin.mjs.map
|
|
@@ -121,7 +121,7 @@ declare function transferDigitalAssetTransaction(args: {
|
|
|
121
121
|
aptosConfig: AptosConfig;
|
|
122
122
|
sender: Account;
|
|
123
123
|
digitalAssetAddress: AccountAddressInput;
|
|
124
|
-
recipient:
|
|
124
|
+
recipient: AccountAddressInput;
|
|
125
125
|
digitalAssetType?: MoveStructId;
|
|
126
126
|
options?: InputGenerateTransactionOptions;
|
|
127
127
|
}): Promise<SimpleTransaction>;
|
|
@@ -145,14 +145,14 @@ declare function burnDigitalAssetTransaction(args: {
|
|
|
145
145
|
digitalAssetType?: MoveStructId;
|
|
146
146
|
options?: InputGenerateTransactionOptions;
|
|
147
147
|
}): Promise<SimpleTransaction>;
|
|
148
|
-
declare function
|
|
148
|
+
declare function freezeDigitalAssetTransferTransaction(args: {
|
|
149
149
|
aptosConfig: AptosConfig;
|
|
150
150
|
creator: Account;
|
|
151
151
|
digitalAssetAddress: AccountAddressInput;
|
|
152
152
|
digitalAssetType?: MoveStructId;
|
|
153
153
|
options?: InputGenerateTransactionOptions;
|
|
154
154
|
}): Promise<SimpleTransaction>;
|
|
155
|
-
declare function
|
|
155
|
+
declare function unfreezeDigitalAssetTransferTransaction(args: {
|
|
156
156
|
aptosConfig: AptosConfig;
|
|
157
157
|
creator: Account;
|
|
158
158
|
digitalAssetAddress: AccountAddressInput;
|
|
@@ -232,4 +232,4 @@ declare function updateDigitalAssetTypedPropertyTransaction(args: {
|
|
|
232
232
|
options?: InputGenerateTransactionOptions;
|
|
233
233
|
}): Promise<SimpleTransaction>;
|
|
234
234
|
|
|
235
|
-
export { type CreateCollectionOptions, type PropertyType, type PropertyValue, addDigitalAssetPropertyTransaction, addDigitalAssetTypedPropertyTransaction, burnDigitalAssetTransaction, createCollectionTransaction,
|
|
235
|
+
export { type CreateCollectionOptions, type PropertyType, type PropertyValue, addDigitalAssetPropertyTransaction, addDigitalAssetTypedPropertyTransaction, burnDigitalAssetTransaction, createCollectionTransaction, freezeDigitalAssetTransferTransaction, getCollectionData, getCollectionId, getCurrentDigitalAssetOwnership, getDigitalAssetActivity, getDigitalAssetData, getOwnedDigitalAssets, mintDigitalAssetTransaction, mintSoulBoundTransaction, removeDigitalAssetPropertyTransaction, setDigitalAssetDescriptionTransaction, setDigitalAssetNameTransaction, setDigitalAssetURITransaction, transferDigitalAssetTransaction, unfreezeDigitalAssetTransferTransaction, updateDigitalAssetPropertyTransaction, updateDigitalAssetTypedPropertyTransaction };
|