@aptos-labs/ts-sdk 1.29.0 → 1.29.1
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/common/index.d.ts +5 -0
- package/dist/common/index.js +3 -3
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/AbstractKeylessAccount.d.mts +1 -0
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +5 -1
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/api/account.d.mts +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.d.mts +2 -2
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +2 -2
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.d.mts +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +1 -1
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +2 -2
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +1 -1
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.d.mts +2 -2
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.d.mts +2 -2
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.d.mts +1 -1
- package/dist/esm/api/table.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/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/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-MNVUSJEK.mjs → chunk-25NSCK4Q.mjs} +2 -2
- package/dist/esm/{chunk-HVMFZF6P.mjs → chunk-25TIHDS6.mjs} +2 -2
- package/dist/esm/{chunk-7VKFXX5Q.mjs → chunk-2TQIU7CG.mjs} +2 -2
- package/dist/esm/{chunk-F63E4CR7.mjs → chunk-3MCYLML2.mjs} +2 -2
- package/dist/esm/{chunk-53RB2PRH.mjs → chunk-3YKAGVHZ.mjs} +2 -2
- package/dist/esm/{chunk-RXE6NNOL.mjs → chunk-46D5QX3G.mjs} +2 -2
- package/dist/esm/chunk-555I4YHP.mjs +2 -0
- package/dist/esm/{chunk-UAEODDZS.mjs.map → chunk-555I4YHP.mjs.map} +1 -1
- package/dist/esm/{chunk-QBSU3L5Q.mjs → chunk-5655UVIK.mjs} +2 -2
- package/dist/esm/{chunk-YPHH6CAO.mjs → chunk-6QGVRNV6.mjs} +2 -2
- package/dist/esm/chunk-6RZZIOGH.mjs +2 -0
- package/dist/esm/chunk-6RZZIOGH.mjs.map +1 -0
- package/dist/esm/{chunk-CRA2MFJC.mjs → chunk-7V6DEA7G.mjs} +2 -2
- package/dist/esm/{chunk-HKBBA653.mjs → chunk-7ZLBJUVZ.mjs} +2 -2
- package/dist/esm/{chunk-S2KDCIZN.mjs → chunk-AFOPNDOJ.mjs} +2 -2
- package/dist/esm/{chunk-ADE6MVXC.mjs → chunk-B2CXRZL5.mjs} +2 -2
- package/dist/esm/{chunk-4HR32TSY.mjs → chunk-B6M7QBUO.mjs} +2 -2
- package/dist/esm/{chunk-45IUUCAV.mjs → chunk-BD6BJETG.mjs} +2 -2
- package/dist/esm/{chunk-MLDQ2TY2.mjs → chunk-BF4ZE37Q.mjs} +2 -2
- package/dist/esm/{chunk-STUXKQVZ.mjs → chunk-BKEJMQQ6.mjs} +2 -2
- package/dist/esm/{chunk-JH6VLTMS.mjs → chunk-BRFHAO2Y.mjs} +2 -2
- package/dist/esm/{chunk-LNEZEYYE.mjs → chunk-CCMHWJ3Q.mjs} +2 -2
- package/dist/esm/{chunk-KUOB4DDE.mjs → chunk-CPPBQDHB.mjs} +2 -2
- package/dist/esm/{chunk-5PCNWXRN.mjs → chunk-CVDR5SJR.mjs} +2 -2
- package/dist/esm/{chunk-GWSDIX6C.mjs → chunk-DAJOX4PL.mjs} +2 -2
- package/dist/esm/{chunk-WJRZWAIS.mjs → chunk-DAXKRXRK.mjs} +2 -2
- package/dist/esm/{chunk-4TB3AWQE.mjs → chunk-DF4WKSTK.mjs} +2 -2
- package/dist/esm/{chunk-YUNDX5I7.mjs → chunk-E37YRKWK.mjs} +2 -2
- package/dist/esm/{chunk-OKAQO57B.mjs → chunk-ECWOLU5T.mjs} +2 -2
- package/dist/esm/{chunk-YU3IYJRL.mjs → chunk-EV2USF7B.mjs} +2 -2
- package/dist/esm/{chunk-SDWE6WMM.mjs → chunk-EWZ2M5BW.mjs} +2 -2
- package/dist/esm/{chunk-QPB6EJVM.mjs → chunk-FRGXKOU5.mjs} +2 -2
- package/dist/esm/{chunk-ZROQH5YL.mjs → chunk-G7MWTE2J.mjs} +2 -2
- package/dist/esm/{chunk-2BTTX2KO.mjs → chunk-GFGX3QDP.mjs} +2 -2
- package/dist/esm/{chunk-HHGJXVAE.mjs → chunk-GGR3P2TG.mjs} +2 -2
- package/dist/esm/{chunk-A63SMUOU.mjs → chunk-HPZ2S4FE.mjs} +2 -2
- package/dist/esm/{chunk-P3TAY5PP.mjs → chunk-HSPBA2TZ.mjs} +2 -2
- package/dist/esm/{chunk-76OH2Z4Q.mjs → chunk-IMGLHDIA.mjs} +2 -2
- package/dist/esm/{chunk-367OG3DB.mjs → chunk-IYQISVDX.mjs} +2 -2
- package/dist/esm/chunk-K2O24YLZ.mjs +2 -0
- package/dist/esm/chunk-K2O24YLZ.mjs.map +1 -0
- package/dist/esm/{chunk-G5MGSV7Y.mjs → chunk-KA6FZNWP.mjs} +2 -2
- package/dist/esm/{chunk-O2BPA6TS.mjs → chunk-KXBIA4KR.mjs} +2 -2
- package/dist/esm/{chunk-3W2DHZXK.mjs → chunk-KYSDF3CA.mjs} +2 -2
- package/dist/esm/{chunk-IR4SLC2M.mjs → chunk-L5NY7TMI.mjs} +2 -2
- package/dist/esm/{chunk-BSAHPS6E.mjs → chunk-LDFTE4MM.mjs} +2 -2
- package/dist/esm/{chunk-G5XLMQ5E.mjs → chunk-LG3DAAPD.mjs} +2 -2
- package/dist/esm/{chunk-GDO6Q2FI.mjs → chunk-LGD5KU56.mjs} +2 -2
- package/dist/esm/{chunk-BOYYQAB4.mjs → chunk-LXLISEQ4.mjs} +2 -2
- package/dist/esm/{chunk-MQGW234H.mjs → chunk-M2QV232A.mjs} +2 -2
- package/dist/esm/chunk-MEWFJJJN.mjs +2 -0
- package/dist/esm/chunk-MEWFJJJN.mjs.map +1 -0
- package/dist/esm/{chunk-FZ5EYP3D.mjs → chunk-MO4IZXLK.mjs} +2 -2
- package/dist/esm/{chunk-H6YNXJNF.mjs → chunk-MS4MRLGA.mjs} +2 -2
- package/dist/esm/{chunk-A42BPAD4.mjs → chunk-N5JNKD5F.mjs} +2 -2
- package/dist/esm/{chunk-2F7Z7RMW.mjs → chunk-NH2S6SB2.mjs} +2 -2
- package/dist/esm/{chunk-TQWGQLM6.mjs → chunk-NNRAQP36.mjs} +2 -2
- package/dist/esm/{chunk-6UZ3VI5Y.mjs → chunk-OY2IX7HW.mjs} +2 -2
- package/dist/esm/{chunk-NWOMSL6K.mjs → chunk-PKXEB7XP.mjs} +2 -2
- package/dist/esm/{chunk-BA4RBST6.mjs → chunk-PNXUYOYI.mjs} +2 -2
- package/dist/esm/chunk-PUZ25PTD.mjs +2 -0
- package/dist/esm/chunk-PUZ25PTD.mjs.map +1 -0
- package/dist/esm/{chunk-Y2GWUE7C.mjs → chunk-QCUFTD7K.mjs} +2 -2
- package/dist/esm/{chunk-SUJLWCRN.mjs → chunk-QDIKOQRK.mjs} +2 -2
- package/dist/esm/{chunk-YDZBU2DJ.mjs → chunk-QIW56MUH.mjs} +2 -2
- package/dist/esm/{chunk-GDUAFXIQ.mjs → chunk-QLN2URFX.mjs} +2 -2
- package/dist/esm/{chunk-OHRL766V.mjs → chunk-QPP6BX53.mjs} +2 -2
- package/dist/esm/{chunk-SWNFKKRE.mjs → chunk-RNTXQYJQ.mjs} +2 -2
- package/dist/esm/{chunk-X34JJPW5.mjs → chunk-SAPUZZEU.mjs} +2 -2
- package/dist/esm/{chunk-Q3TAEOH5.mjs → chunk-SR24OGHJ.mjs} +2 -2
- package/dist/esm/{chunk-D3Q4BC3I.mjs → chunk-STGYDB5E.mjs} +2 -2
- package/dist/esm/{chunk-APN6AV5Q.mjs → chunk-SWHLSREF.mjs} +2 -2
- package/dist/esm/{chunk-L2QXU6F4.mjs → chunk-TL7DR54X.mjs} +2 -2
- package/dist/esm/{chunk-KUZ2YTJH.mjs → chunk-TMW2HIXC.mjs} +2 -2
- package/dist/esm/{chunk-R76DHMGR.mjs → chunk-TS3PYRAT.mjs} +2 -2
- package/dist/esm/{chunk-F3M2UQA4.mjs → chunk-TVFIUUVY.mjs} +2 -2
- package/dist/esm/{chunk-GMBSQDPO.mjs → chunk-U67PFBTL.mjs} +2 -2
- package/dist/esm/{chunk-WRRQ7L5K.mjs → chunk-WP7WF54Q.mjs} +2 -2
- package/dist/esm/{chunk-BWNTSJOC.mjs → chunk-WS4RPKL6.mjs} +2 -2
- package/dist/esm/{chunk-P2EIZ7WL.mjs → chunk-WWZ3METZ.mjs} +2 -2
- package/dist/esm/{chunk-S2W4D6NZ.mjs → chunk-X4KEZTUQ.mjs} +2 -2
- package/dist/esm/{chunk-F76N4MQO.mjs → chunk-XH7YKEYR.mjs} +2 -2
- package/dist/esm/{chunk-ELYS7CWV.mjs → chunk-XK3JFCP3.mjs} +2 -2
- package/dist/esm/{chunk-MAMPMCO7.mjs → chunk-XONG5JZ4.mjs} +2 -2
- package/dist/esm/{chunk-J64ARI4E.mjs → chunk-XXHW3ZT3.mjs} +2 -2
- package/dist/esm/{chunk-OMV7445F.mjs → chunk-Y7F2V3R6.mjs} +2 -2
- package/dist/esm/chunk-YHAPZP5A.mjs +2 -0
- package/dist/esm/chunk-YHAPZP5A.mjs.map +1 -0
- package/dist/esm/{chunk-P5V7OZNN.mjs → chunk-YJCZU6PR.mjs} +2 -2
- package/dist/esm/{chunk-5VD4MHB3.mjs → chunk-ZGO2SK6F.mjs} +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- 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/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.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/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/index.mjs +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.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/keyless.mjs +1 -1
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.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.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.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/multiAgentTransaction.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/simpleTransaction.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.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/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +2 -2
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +21 -21
- package/src/account/AbstractKeylessAccount.ts +3 -2
- package/src/account/FederatedKeylessAccount.ts +3 -2
- package/src/account/KeylessAccount.ts +9 -2
- package/src/client/core.ts +1 -1
- package/src/transactions/transactionBuilder/transactionBuilder.ts +13 -2
- package/src/version.ts +1 -1
- package/dist/esm/chunk-CB6H4VMZ.mjs +0 -2
- package/dist/esm/chunk-CB6H4VMZ.mjs.map +0 -1
- package/dist/esm/chunk-E4O26ZJB.mjs +0 -2
- package/dist/esm/chunk-E4O26ZJB.mjs.map +0 -1
- package/dist/esm/chunk-MDJ66AA3.mjs +0 -2
- package/dist/esm/chunk-MDJ66AA3.mjs.map +0 -1
- package/dist/esm/chunk-UAEODDZS.mjs +0 -2
- package/dist/esm/chunk-XMW65WCQ.mjs +0 -2
- package/dist/esm/chunk-XMW65WCQ.mjs.map +0 -1
- package/dist/esm/chunk-Y3BATGHX.mjs +0 -2
- package/dist/esm/chunk-Y3BATGHX.mjs.map +0 -1
- /package/dist/esm/{chunk-MNVUSJEK.mjs.map → chunk-25NSCK4Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-HVMFZF6P.mjs.map → chunk-25TIHDS6.mjs.map} +0 -0
- /package/dist/esm/{chunk-7VKFXX5Q.mjs.map → chunk-2TQIU7CG.mjs.map} +0 -0
- /package/dist/esm/{chunk-F63E4CR7.mjs.map → chunk-3MCYLML2.mjs.map} +0 -0
- /package/dist/esm/{chunk-53RB2PRH.mjs.map → chunk-3YKAGVHZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-RXE6NNOL.mjs.map → chunk-46D5QX3G.mjs.map} +0 -0
- /package/dist/esm/{chunk-QBSU3L5Q.mjs.map → chunk-5655UVIK.mjs.map} +0 -0
- /package/dist/esm/{chunk-YPHH6CAO.mjs.map → chunk-6QGVRNV6.mjs.map} +0 -0
- /package/dist/esm/{chunk-CRA2MFJC.mjs.map → chunk-7V6DEA7G.mjs.map} +0 -0
- /package/dist/esm/{chunk-HKBBA653.mjs.map → chunk-7ZLBJUVZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-S2KDCIZN.mjs.map → chunk-AFOPNDOJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-ADE6MVXC.mjs.map → chunk-B2CXRZL5.mjs.map} +0 -0
- /package/dist/esm/{chunk-4HR32TSY.mjs.map → chunk-B6M7QBUO.mjs.map} +0 -0
- /package/dist/esm/{chunk-45IUUCAV.mjs.map → chunk-BD6BJETG.mjs.map} +0 -0
- /package/dist/esm/{chunk-MLDQ2TY2.mjs.map → chunk-BF4ZE37Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-STUXKQVZ.mjs.map → chunk-BKEJMQQ6.mjs.map} +0 -0
- /package/dist/esm/{chunk-JH6VLTMS.mjs.map → chunk-BRFHAO2Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-LNEZEYYE.mjs.map → chunk-CCMHWJ3Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-KUOB4DDE.mjs.map → chunk-CPPBQDHB.mjs.map} +0 -0
- /package/dist/esm/{chunk-5PCNWXRN.mjs.map → chunk-CVDR5SJR.mjs.map} +0 -0
- /package/dist/esm/{chunk-GWSDIX6C.mjs.map → chunk-DAJOX4PL.mjs.map} +0 -0
- /package/dist/esm/{chunk-WJRZWAIS.mjs.map → chunk-DAXKRXRK.mjs.map} +0 -0
- /package/dist/esm/{chunk-4TB3AWQE.mjs.map → chunk-DF4WKSTK.mjs.map} +0 -0
- /package/dist/esm/{chunk-YUNDX5I7.mjs.map → chunk-E37YRKWK.mjs.map} +0 -0
- /package/dist/esm/{chunk-OKAQO57B.mjs.map → chunk-ECWOLU5T.mjs.map} +0 -0
- /package/dist/esm/{chunk-YU3IYJRL.mjs.map → chunk-EV2USF7B.mjs.map} +0 -0
- /package/dist/esm/{chunk-SDWE6WMM.mjs.map → chunk-EWZ2M5BW.mjs.map} +0 -0
- /package/dist/esm/{chunk-QPB6EJVM.mjs.map → chunk-FRGXKOU5.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZROQH5YL.mjs.map → chunk-G7MWTE2J.mjs.map} +0 -0
- /package/dist/esm/{chunk-2BTTX2KO.mjs.map → chunk-GFGX3QDP.mjs.map} +0 -0
- /package/dist/esm/{chunk-HHGJXVAE.mjs.map → chunk-GGR3P2TG.mjs.map} +0 -0
- /package/dist/esm/{chunk-A63SMUOU.mjs.map → chunk-HPZ2S4FE.mjs.map} +0 -0
- /package/dist/esm/{chunk-P3TAY5PP.mjs.map → chunk-HSPBA2TZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-76OH2Z4Q.mjs.map → chunk-IMGLHDIA.mjs.map} +0 -0
- /package/dist/esm/{chunk-367OG3DB.mjs.map → chunk-IYQISVDX.mjs.map} +0 -0
- /package/dist/esm/{chunk-G5MGSV7Y.mjs.map → chunk-KA6FZNWP.mjs.map} +0 -0
- /package/dist/esm/{chunk-O2BPA6TS.mjs.map → chunk-KXBIA4KR.mjs.map} +0 -0
- /package/dist/esm/{chunk-3W2DHZXK.mjs.map → chunk-KYSDF3CA.mjs.map} +0 -0
- /package/dist/esm/{chunk-IR4SLC2M.mjs.map → chunk-L5NY7TMI.mjs.map} +0 -0
- /package/dist/esm/{chunk-BSAHPS6E.mjs.map → chunk-LDFTE4MM.mjs.map} +0 -0
- /package/dist/esm/{chunk-G5XLMQ5E.mjs.map → chunk-LG3DAAPD.mjs.map} +0 -0
- /package/dist/esm/{chunk-GDO6Q2FI.mjs.map → chunk-LGD5KU56.mjs.map} +0 -0
- /package/dist/esm/{chunk-BOYYQAB4.mjs.map → chunk-LXLISEQ4.mjs.map} +0 -0
- /package/dist/esm/{chunk-MQGW234H.mjs.map → chunk-M2QV232A.mjs.map} +0 -0
- /package/dist/esm/{chunk-FZ5EYP3D.mjs.map → chunk-MO4IZXLK.mjs.map} +0 -0
- /package/dist/esm/{chunk-H6YNXJNF.mjs.map → chunk-MS4MRLGA.mjs.map} +0 -0
- /package/dist/esm/{chunk-A42BPAD4.mjs.map → chunk-N5JNKD5F.mjs.map} +0 -0
- /package/dist/esm/{chunk-2F7Z7RMW.mjs.map → chunk-NH2S6SB2.mjs.map} +0 -0
- /package/dist/esm/{chunk-TQWGQLM6.mjs.map → chunk-NNRAQP36.mjs.map} +0 -0
- /package/dist/esm/{chunk-6UZ3VI5Y.mjs.map → chunk-OY2IX7HW.mjs.map} +0 -0
- /package/dist/esm/{chunk-NWOMSL6K.mjs.map → chunk-PKXEB7XP.mjs.map} +0 -0
- /package/dist/esm/{chunk-BA4RBST6.mjs.map → chunk-PNXUYOYI.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y2GWUE7C.mjs.map → chunk-QCUFTD7K.mjs.map} +0 -0
- /package/dist/esm/{chunk-SUJLWCRN.mjs.map → chunk-QDIKOQRK.mjs.map} +0 -0
- /package/dist/esm/{chunk-YDZBU2DJ.mjs.map → chunk-QIW56MUH.mjs.map} +0 -0
- /package/dist/esm/{chunk-GDUAFXIQ.mjs.map → chunk-QLN2URFX.mjs.map} +0 -0
- /package/dist/esm/{chunk-OHRL766V.mjs.map → chunk-QPP6BX53.mjs.map} +0 -0
- /package/dist/esm/{chunk-SWNFKKRE.mjs.map → chunk-RNTXQYJQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-X34JJPW5.mjs.map → chunk-SAPUZZEU.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q3TAEOH5.mjs.map → chunk-SR24OGHJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-D3Q4BC3I.mjs.map → chunk-STGYDB5E.mjs.map} +0 -0
- /package/dist/esm/{chunk-APN6AV5Q.mjs.map → chunk-SWHLSREF.mjs.map} +0 -0
- /package/dist/esm/{chunk-L2QXU6F4.mjs.map → chunk-TL7DR54X.mjs.map} +0 -0
- /package/dist/esm/{chunk-KUZ2YTJH.mjs.map → chunk-TMW2HIXC.mjs.map} +0 -0
- /package/dist/esm/{chunk-R76DHMGR.mjs.map → chunk-TS3PYRAT.mjs.map} +0 -0
- /package/dist/esm/{chunk-F3M2UQA4.mjs.map → chunk-TVFIUUVY.mjs.map} +0 -0
- /package/dist/esm/{chunk-GMBSQDPO.mjs.map → chunk-U67PFBTL.mjs.map} +0 -0
- /package/dist/esm/{chunk-WRRQ7L5K.mjs.map → chunk-WP7WF54Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-BWNTSJOC.mjs.map → chunk-WS4RPKL6.mjs.map} +0 -0
- /package/dist/esm/{chunk-P2EIZ7WL.mjs.map → chunk-WWZ3METZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-S2W4D6NZ.mjs.map → chunk-X4KEZTUQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-F76N4MQO.mjs.map → chunk-XH7YKEYR.mjs.map} +0 -0
- /package/dist/esm/{chunk-ELYS7CWV.mjs.map → chunk-XK3JFCP3.mjs.map} +0 -0
- /package/dist/esm/{chunk-MAMPMCO7.mjs.map → chunk-XONG5JZ4.mjs.map} +0 -0
- /package/dist/esm/{chunk-J64ARI4E.mjs.map → chunk-XXHW3ZT3.mjs.map} +0 -0
- /package/dist/esm/{chunk-OMV7445F.mjs.map → chunk-Y7F2V3R6.mjs.map} +0 -0
- /package/dist/esm/{chunk-P5V7OZNN.mjs.map → chunk-YJCZU6PR.mjs.map} +0 -0
- /package/dist/esm/{chunk-5VD4MHB3.mjs.map → chunk-ZGO2SK6F.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as p}from"./chunk-KXBIA4KR.mjs";import{d as s}from"./chunk-TMW2HIXC.mjs";import{a as u,b as y}from"./chunk-U67PFBTL.mjs";import{b as a}from"./chunk-LGD5KU56.mjs";import{c as i}from"./chunk-DAJOX4PL.mjs";import{b as g}from"./chunk-QPP6BX53.mjs";var h=class c{constructor(e){this.signingScheme=2;let{privateKey:r,address:t}=e;this.privateKey=r,this.publicKey=new u(r.publicKey()),this.accountAddress=t?g.from(t):this.publicKey.authKey().derivedAddress()}static generate(e={}){let{scheme:r=0}=e,t;switch(r){case 0:t=i.generate();break;case 2:t=a.generate();break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new c({privateKey:t})}static fromDerivationPath(e){let{scheme:r=0,path:t,mnemonic:o}=e,n;switch(r){case 0:n=i.fromDerivationPath(t,o);break;case 2:n=a.fromDerivationPath(t,o);break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new c({privateKey:n})}verifySignature(e){return this.publicKey.verifySignature(e)}signWithAuthenticator(e){return new s(this.publicKey,this.sign(e))}signTransactionWithAuthenticator(e){return new s(this.publicKey,this.signTransaction(e))}sign(e){return new y(this.privateKey.sign(e))}signTransaction(e){return this.sign(p(e))}};export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-B6M7QBUO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as h,d as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as h,d as l}from"./chunk-DAJOX4PL.mjs";import{b as E}from"./chunk-IMGLHDIA.mjs";import{a as p}from"./chunk-BF4ZE37Q.mjs";import{a as g}from"./chunk-KA6FZNWP.mjs";var o=class o extends E{constructor(r){super();let{publicKeys:e,threshold:t}=r;if(e.length>o.MAX_KEYS||e.length<o.MIN_KEYS)throw new Error(`Must have between ${o.MIN_KEYS} and ${o.MAX_KEYS} public keys, inclusive`);if(t<o.MIN_THRESHOLD||t>e.length)throw new Error(`Threshold must be between ${o.MIN_THRESHOLD} and ${e.length}, inclusive`);this.publicKeys=e,this.threshold=t}verifySignature(r){let{message:e,signature:t}=r;if(!(t instanceof y))return!1;let s=[];for(let i=0;i<4;i+=1)for(let n=0;n<8;n+=1)if((t.bitmap[i]&1<<7-n)!==0){let u=i*8+n;s.push(u)}if(s.length!==t.signatures.length)throw new Error("Bitmap and signatures length mismatch");if(s.length<this.threshold)throw new Error("Not enough signatures");for(let i=0;i<s.length;i+=1)if(!this.publicKeys[s[i]].verifySignature({message:e,signature:t.signatures[i]}))return!1;return!0}authKey(){return g.fromSchemeAndBytes({scheme:1,input:this.toUint8Array()})}toUint8Array(){let r=new Uint8Array(this.publicKeys.length*h.LENGTH+1);return this.publicKeys.forEach((e,t)=>{r.set(e.toUint8Array(),t*h.LENGTH)}),r[this.publicKeys.length*h.LENGTH]=this.threshold,r}serialize(r){r.serializeBytes(this.toUint8Array())}static deserialize(r){let e=r.deserializeBytes(),t=e[e.length-1],s=[];for(let i=0;i<e.length-1;i+=h.LENGTH){let n=i;s.push(new h(e.subarray(n,n+h.LENGTH)))}return new o({publicKeys:s,threshold:t})}};o.MAX_KEYS=32,o.MIN_KEYS=2,o.MIN_THRESHOLD=1;var d=o,a=class a extends p{constructor(r){super();let{signatures:e,bitmap:t}=r;if(e.length>a.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${a.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=e,!(t instanceof Uint8Array))this.bitmap=a.createBitmap({bits:t});else{if(t.length!==a.BITMAP_LEN)throw new Error(`"bitmap" length should be ${a.BITMAP_LEN}`);this.bitmap=t}}toUint8Array(){let r=new Uint8Array(this.signatures.length*l.LENGTH+a.BITMAP_LEN);return this.signatures.forEach((e,t)=>{r.set(e.toUint8Array(),t*l.LENGTH)}),r.set(this.bitmap,this.signatures.length*l.LENGTH),r}serialize(r){r.serializeBytes(this.toUint8Array())}static deserialize(r){let e=r.deserializeBytes(),t=e.subarray(e.length-4),s=[];for(let i=0;i<e.length-t.length;i+=l.LENGTH){let n=i;s.push(new l(e.subarray(n,n+l.LENGTH)))}return new a({signatures:s,bitmap:t})}static createBitmap(r){let{bits:e}=r,t=128,s=new Uint8Array([0,0,0,0]),i=new Set;return e.forEach((n,c)=>{if(n>=a.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${a.MAX_SIGNATURES_SUPPORTED-1}.`);if(i.has(n))throw new Error("Duplicate bits detected.");if(c>0&&n<=e[c-1])throw new Error("The bits need to be sorted in ascending order.");i.add(n);let u=Math.floor(n/8),b=s[u];b|=t>>n%8,s[u]=b}),s}};a.MAX_SIGNATURES_SUPPORTED=32,a.BITMAP_LEN=4;var y=a;export{d as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-BD6BJETG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-HPZ2S4FE.mjs";import{b as t}from"./chunk-BCUSI3N6.mjs";var o=class extends r{toString(){let i=this.toUint8Array();return t.fromHexInput(i).toString()}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BF4ZE37Q.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as P}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as P}from"./chunk-STGYDB5E.mjs";import{c as d}from"./chunk-GFGX3QDP.mjs";import{d as h,e as w,f as k,g as T,i as b,j as q,k as v,u as O}from"./chunk-VHNX2NUR.mjs";import{a as f}from"./chunk-FRGXKOU5.mjs";import{a as C}from"./chunk-U67PFBTL.mjs";import{b as y}from"./chunk-LGD5KU56.mjs";import{c as l}from"./chunk-DAJOX4PL.mjs";import{a as g}from"./chunk-KA6FZNWP.mjs";import{b as a}from"./chunk-QPP6BX53.mjs";import{a as _}from"./chunk-AH44UPM4.mjs";import{b as A,d as p}from"./chunk-EV2USF7B.mjs";import{a as m}from"./chunk-TDGQGILY.mjs";async function S(e){let{aptosConfig:n,accountAddress:t}=e,{data:o}=await A({aptosConfig:n,originMethod:"getInfo",path:`accounts/${a.from(t).toString()}`});return o}async function z(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return p({aptosConfig:n,originMethod:"getModules",path:`accounts/${a.from(t).toString()}/modules`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??1e3}})}async function H(e){return e.options?.ledgerVersion!==void 0?G(e):_(async()=>G(e),`module-${e.accountAddress}-${e.moduleName}`,1e3*60*5)()}async function G(e){let{aptosConfig:n,accountAddress:t,moduleName:o,options:s}=e,{data:r}=await A({aptosConfig:n,originMethod:"getModule",path:`accounts/${a.from(t).toString()}/module/${o}`,params:{ledger_version:s?.ledgerVersion}});return r}async function J(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return p({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${a.from(t).toString()}/transactions`,params:{start:o?.offset,limit:o?.limit}})}async function U(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return p({aptosConfig:n,originMethod:"getResources",path:`accounts/${a.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:s}=e,{data:r}=await A({aptosConfig:n,originMethod:"getResource",path:`accounts/${a.from(t).toString()}/resource/${o}`,params:{ledger_version:s?.ledgerVersion}});return r.data}async function Q(e){let{aptosConfig:n,authenticationKey:t,options:o}=e,s=await K({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:o}),{address_map:{handle:r}}=s,c=a.from(t);try{let i=await P({aptosConfig:n,handle:r,data:{key:c.toString(),key_type:"address",value_type:"address"},options:o});return a.from(i)}catch(i){if(i instanceof m&&i.data.error_code==="table_item_not_found")return c;throw i}}async function X(e){let{aptosConfig:n,accountAddress:t}=e,s={owner_address:{_eq:a.from(t).toStringLong()},amount:{_gt:0}},c=await d({aptosConfig:n,query:{query:q,variables:{where_condition:s}},originMethod:"getAccountTokensCount"});return c.current_token_ownerships_v2_aggregate.aggregate?c.current_token_ownerships_v2_aggregate.aggregate.count:0}async function Y(e){let{aptosConfig:n,accountAddress:t,options:o}=e,r={owner_address:{_eq:a.from(t).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(r.token_standard={_eq:o?.tokenStandard});let c={query:T,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountOwnedTokens"})).current_token_ownerships_v2}async function Z(e){let{aptosConfig:n,accountAddress:t,collectionAddress:o,options:s}=e,r=a.from(t).toStringLong(),c=a.from(o).toStringLong(),i={owner_address:{_eq:r},current_token_data:{collection_id:{_eq:c}},amount:{_gt:0}};s?.tokenStandard&&(i.token_standard={_eq:s?.tokenStandard});let u={query:b,variables:{where_condition:i,offset:s?.offset,limit:s?.limit,order_by:s?.orderBy}};return(await d({aptosConfig:n,query:u,originMethod:"getAccountOwnedTokensFromCollectionAddress"})).current_token_ownerships_v2}async function oo(e){let{aptosConfig:n,accountAddress:t,options:o}=e,r={owner_address:{_eq:a.from(t).toStringLong()}};o?.tokenStandard&&(r.current_collection={token_standard:{_eq:o?.tokenStandard}});let c={query:k,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountCollectionsWithOwnedTokens"})).current_collection_ownership_v2_view}async function eo(e){let{aptosConfig:n,accountAddress:t}=e,o=a.from(t).toStringLong(),r=await d({aptosConfig:n,query:{query:v,variables:{address:o}},originMethod:"getAccountTransactionsCount"});return r.account_transactions_aggregate.aggregate?r.account_transactions_aggregate.aggregate.count:0}async function to(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s=a.from(t).toStringLong(),r={...o?.where,owner_address:{_eq:s}},c={query:w,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountCoinsData"})).current_fungible_asset_balances}async function no(e){let{aptosConfig:n,accountAddress:t}=e,o=a.from(t).toStringLong(),r=await d({aptosConfig:n,query:{query:h,variables:{address:o}},originMethod:"getAccountCoinsCount"});if(!r.current_fungible_asset_balances_aggregate.aggregate)throw Error("Failed to get the count of account coins");return r.current_fungible_asset_balances_aggregate.aggregate.count}async function ro(e){let{aptosConfig:n,accountAddress:t,options:o}=e,r={owner_address:{_eq:a.from(t).toStringLong()}},c={query:O,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountOwnedObjects"})).current_objects}async function so(e){let{aptosConfig:n,privateKey:t}=e,o=new C(t.publicKey());if(t instanceof y){let r=g.fromPublicKey({publicKey:o}).derivedAddress();return f.fromPrivateKey({privateKey:t,address:r})}if(t instanceof l){let s=g.fromPublicKey({publicKey:o});if(await M({authKey:s,aptosConfig:n})){let u=s.derivedAddress();return f.fromPrivateKey({privateKey:t,address:u,legacy:!1})}let c=g.fromPublicKey({publicKey:o.publicKey});if(await M({authKey:c,aptosConfig:n})){let u=c.derivedAddress();return f.fromPrivateKey({privateKey:t,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${t}`)}async function M(e){let{aptosConfig:n,authKey:t}=e,o=await Q({aptosConfig:n,authenticationKey:t.derivedAddress()});try{return await S({aptosConfig:n,accountAddress:o}),!0}catch(s){if(s.status===404)return!1;throw new Error(`Error while looking for an account info ${o.toString()}`)}}export{S as a,z as b,H as c,J as d,U as e,K as f,Q as g,X as h,Y as i,Z as j,oo as k,eo as l,to as m,no as n,ro as o,so as p,M as q};
|
|
2
|
+
//# sourceMappingURL=chunk-BKEJMQQ6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s}from"./chunk-6EMN3BOV.mjs";import{g as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s}from"./chunk-6EMN3BOV.mjs";import{g as r}from"./chunk-WWZ3METZ.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var i=class{constructor(n){this.config=n}async simple(n){return r({aptosConfig:this.config,...n})}async multiAgent(n){return r({aptosConfig:this.config,...n})}};o([s],i.prototype,"simple",1),o([s],i.prototype,"multiAgent",1);export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BRFHAO2Y.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c,b as o,c as d,d as m,e as z,f as U,g as y}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c,b as o,c as d,d as m,e as z,f as U,g as y}from"./chunk-6QGVRNV6.mjs";import{a as b}from"./chunk-KEYAPEAX.mjs";import{a as s}from"./chunk-HPZ2S4FE.mjs";import{b as u}from"./chunk-BCUSI3N6.mjs";var t=class n extends s{constructor(e){super(),this.values=e}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){if(this.values[0]!==void 0&&!(this.values[0]instanceof o)){new p(this.bcsToBytes()).serializeForScriptFunction(e);return}e.serializeU32AsUleb128(4),e.serialize(this)}static U8(e){let r;if(Array.isArray(e)&&e.length===0)r=[];else if(Array.isArray(e)&&typeof e[0]=="number")r=e;else if(typeof e=="string"){let i=u.fromHexInput(e);r=Array.from(i.toUint8Array())}else if(e instanceof Uint8Array)r=Array.from(e);else throw new Error("Invalid input type, must be an number[], Uint8Array, or hex string");return new n(r.map(i=>new o(i)))}static U16(e){return new n(e.map(r=>new d(r)))}static U32(e){return new n(e.map(r=>new m(r)))}static U64(e){return new n(e.map(r=>new z(r)))}static U128(e){return new n(e.map(r=>new U(r)))}static U256(e){return new n(e.map(r=>new y(r)))}static Bool(e){return new n(e.map(r=>new c(r)))}static MoveString(e){return new n(e.map(r=>new a(r)))}serialize(e){e.serializeVector(this.values)}static deserialize(e,r){let i=e.deserializeUleb128AsU32(),l=new Array;for(let w=0;w<i;w+=1)l.push(r.deserialize(e));return new n(l)}},p=class n extends s{constructor(e){super(),this.value=u.fromHexInput(e).toUint8Array()}serialize(e){e.serializeBytes(this.value)}serializeForEntryFunction(e){this.serialize(e)}serializeForScriptFunction(e){e.serializeU32AsUleb128(9),this.serialize(e)}static deserialize(e){return new n(e.deserializeBytes())}toMoveVector(e){let r=new b(this.bcsToBytes());r.deserializeUleb128AsU32();let i=r.deserializeVector(e);return new t(i)}},a=class n extends s{constructor(e){super(),this.value=e}serialize(e){e.serializeStr(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){let i=new TextEncoder().encode(this.value);t.U8(i).serializeForScriptFunction(e)}static deserialize(e){return new n(e.deserializeStr())}},A=class n extends s{constructor(e){super(),typeof e<"u"&&e!==null?this.vec=new t([e]):this.vec=new t([]),[this.value]=this.vec.values}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}unwrap(){if(this.isSome())return this.vec.values[0];throw new Error("Called unwrap on a MoveOption with no value")}isSome(){return this.vec.values.length===1}serialize(e){this.vec.serialize(e)}static U8(e){return new n(e!=null?new o(e):void 0)}static U16(e){return new n(e!=null?new d(e):void 0)}static U32(e){return new n(e!=null?new m(e):void 0)}static U64(e){return new n(e!=null?new z(e):void 0)}static U128(e){return new n(e!=null?new U(e):void 0)}static U256(e){return new n(e!=null?new y(e):void 0)}static Bool(e){return new n(e!=null?new c(e):void 0)}static MoveString(e){return new n(e!=null?new a(e):void 0)}static deserialize(e,r){let i=t.deserialize(e,r);return new n(i.values[0])}};export{t as a,p as b,a as c,A as d};
|
|
2
|
+
//# sourceMappingURL=chunk-CCMHWJ3Q.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i,b as o,c as a,d as c,e as p,f as d,g,h as u,i as A,j as y,k as m,l,m as T,n as f,o as C,p as I,q as O,r as P,s as D,t as V,u as S,v as h,w as R,x as G}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i,b as o,c as a,d as c,e as p,f as d,g,h as u,i as A,j as y,k as m,l,m as T,n as f,o as C,p as I,q as O,r as P,s as D,t as V,u as S,v as h,w as R,x as G}from"./chunk-IYQISVDX.mjs";import{a as e}from"./chunk-EWZ2M5BW.mjs";import{b as s}from"./chunk-QPP6BX53.mjs";var L=class{constructor(t){this.config=t}async getCollectionData(t){await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"});let{creatorAddress:N,collectionName:_,options:n}=t,w=s.from(N),r={collection_name:{_eq:_},creator_address:{_eq:w.toStringLong()}};return n?.tokenStandard&&(r.token_standard={_eq:n?.tokenStandard??"v2"}),d({aptosConfig:this.config,options:{where:r}})}async getCollectionDataByCreatorAddressAndCollectionName(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),g({aptosConfig:this.config,...t})}async getCollectionDataByCreatorAddress(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),u({aptosConfig:this.config,...t})}async getCollectionDataByCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),A({aptosConfig:this.config,...t})}async getCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),y({aptosConfig:this.config,...t})}async getDigitalAssetData(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),i({aptosConfig:this.config,...t})}async getCurrentDigitalAssetOwnership(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),o({aptosConfig:this.config,...t})}async getOwnedDigitalAssets(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...t})}async getDigitalAssetActivity(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),c({aptosConfig:this.config,...t})}async createCollectionTransaction(t){return p({aptosConfig:this.config,...t})}async mintDigitalAssetTransaction(t){return m({aptosConfig:this.config,...t})}async transferDigitalAssetTransaction(t){return l({aptosConfig:this.config,...t})}async mintSoulBoundTransaction(t){return T({aptosConfig:this.config,...t})}async burnDigitalAssetTransaction(t){return f({aptosConfig:this.config,...t})}async freezeDigitalAssetTransaferTransaction(t){return C({aptosConfig:this.config,...t})}async unfreezeDigitalAssetTransaferTransaction(t){return I({aptosConfig:this.config,...t})}async setDigitalAssetDescriptionTransaction(t){return O({aptosConfig:this.config,...t})}async setDigitalAssetNameTransaction(t){return P({aptosConfig:this.config,...t})}async setDigitalAssetURITransaction(t){return D({aptosConfig:this.config,...t})}async addDigitalAssetPropertyTransaction(t){return V({aptosConfig:this.config,...t})}async removeDigitalAssetPropertyTransaction(t){return S({aptosConfig:this.config,...t})}async updateDigitalAssetPropertyTransaction(t){return h({aptosConfig:this.config,...t})}async addDigitalAssetTypedPropertyTransaction(t){return R({aptosConfig:this.config,...t})}async updateDigitalAssetTypedPropertyTransaction(t){return G({aptosConfig:this.config,...t})}};export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CPPBQDHB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-5655UVIK.mjs";import{a as e}from"./chunk-N5JNKD5F.mjs";import{a as r}from"./chunk-HPZ2S4FE.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=i.deserialize(t),s=e.deserialize(t);return new o(a,s)}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CVDR5SJR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as S}from"./chunk-IMGLHDIA.mjs";import{a as b}from"./chunk-BF4ZE37Q.mjs";import{a as g}from"./chunk-Q4XR6QOZ.mjs";import{d as K,f as A,g as v,h as E,i as H,j as P}from"./chunk-LR65XHSF.mjs";import{a as p}from"./chunk-KA6FZNWP.mjs";import{a as f}from"./chunk-HPZ2S4FE.mjs";import{b as s}from"./chunk-BCUSI3N6.mjs";import{ed25519 as y}from"@noble/curves/ed25519";var d=[237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16];function w(z){let e=z.toUint8Array().slice(32);for(let t=d.length-1;t>=0;t-=1){if(e[t]<d[t])return!0;if(e[t]>d[t])return!1}return!1}var i=class i extends S{constructor(e){super();let t=s.fromHexInput(e);if(t.toUint8Array().length!==i.LENGTH)throw new Error(`PublicKey length should be ${i.LENGTH}`);this.key=t}verifySignature(e){let{message:t,signature:n}=e;if(!w(n))return!1;let o=g(t),c=s.fromHexInput(o).toUint8Array(),u=n.toUint8Array(),l=this.key.toUint8Array();return y.verify(u,c,l)}authKey(){return p.fromSchemeAndBytes({scheme:0,input:this.toUint8Array()})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new i(t)}static isPublicKey(e){return e instanceof i}static isInstance(e){return"key"in e&&e.key?.data?.length===i.LENGTH}};i.LENGTH=32;var m=i,r=class r extends f{constructor(e){super();let t=s.fromHexInput(e);if(t.toUint8Array().length!==r.LENGTH)throw new Error(`PrivateKey length should be ${r.LENGTH}`);this.signingKey=t}static generate(){let e=y.utils.randomPrivateKey();return new r(e)}static fromDerivationPath(e,t){if(!A(e))throw new Error(`Invalid derivation path ${e}`);return r.fromDerivationPathInner(e,P(t))}static fromDerivationPathInner(e,t,n=K){let{key:o,chainCode:c}=v(r.SLIP_0010_SEED,t),u=H(e).map(x=>parseInt(x,10)),{key:l}=u.reduce((x,I)=>E(x,I+n),{key:o,chainCode:c});return new r(l)}publicKey(){let e=y.getPublicKey(this.signingKey.toUint8Array());return new m(e)}sign(e){let t=g(e),n=s.fromHexInput(t).toUint8Array(),o=y.sign(n,this.signingKey.toUint8Array());return new h(o)}toUint8Array(){return this.signingKey.toUint8Array()}toString(){return this.signingKey.toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new r(t)}static isPrivateKey(e){return e instanceof r}};r.LENGTH=32,r.SLIP_0010_SEED="ed25519 seed";var U=r,a=class a extends b{constructor(e){super();let t=s.fromHexInput(e);if(t.toUint8Array().length!==a.LENGTH)throw new Error(`Signature length should be ${a.LENGTH}`);this.data=t}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new a(t)}};a.LENGTH=64;var h=a;export{w as a,m as b,U as c,h as d};
|
|
2
|
+
//# sourceMappingURL=chunk-DAJOX4PL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-EWZ2M5BW.mjs";import{a as o,b as r,c as s}from"./chunk-STGYDB5E.mjs";var a=class{constructor(e){this.config=e}async getTableItem(e){return o({aptosConfig:this.config,...e})}async getTableItemsData(e){return await t({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),r({aptosConfig:this.config,...e})}async getTableItemsMetadata(e){return await t({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),s({aptosConfig:this.config,...e})}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-DAXKRXRK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-EWZ2M5BW.mjs";import{a as d}from"./chunk-G7MWTE2J.mjs";import{a as y,b as C,c as l,d as T,e as O,f as P,g as h,h as S,i as L,j as R,k as V,l as I,m as b,n as w,o as v,p as M}from"./chunk-BKEJMQQ6.mjs";import{a as f}from"./chunk-WP7WF54Q.mjs";import{b as r}from"./chunk-QPP6BX53.mjs";import{a as p}from"./chunk-AH44UPM4.mjs";import{g,h as m}from"./chunk-UAL27G6B.mjs";import{e as u,f as A}from"./chunk-EXP5STXZ.mjs";var N=class{constructor(e){this.config=e}async getAccountInfo(e){return y({aptosConfig:this.config,...e})}async getAccountModules(e){return C({aptosConfig:this.config,...e})}async getAccountModule(e){return l({aptosConfig:this.config,...e})}async getAccountTransactions(e){return T({aptosConfig:this.config,...e})}async getAccountResources(e){return O({aptosConfig:this.config,...e})}async getAccountResource(e){return P({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return h({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),S({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),L({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),R({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),V({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),I({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),b({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),w({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:u,faMetadataAddress:A,...e})}async getAccountCoinAmount(e){let{accountAddress:a,coinType:s,faMetadataAddress:t}=e,c=s;s===void 0&&t!==void 0&&(c=await p(async()=>{try{let n=(await d({aptosConfig:this.config,payload:{function:"0x1::coin::paired_coin",functionArguments:[t]}})).at(0);if(n.vec.length>0&&m(n.vec[0]))return g(n.vec[0])}catch{}},`coin-mapping-${t.toString()}`,1e3*60*5)());let i;if(s!==void 0&&t!==void 0)i=r.from(t).toStringLong();else if(s!==void 0&&t===void 0)s===u?i=r.A.toStringLong():i=f(r.A,s).toStringLong();else if(s===void 0&&t!==void 0){let n=r.from(t);i=n.toStringLong(),n===r.A&&(c=u)}else throw new Error("Either coinType, faMetadataAddress, or both must be provided");if(c!==void 0){let[n]=await d({aptosConfig:this.config,payload:{function:"0x1::coin::balance",typeArguments:[c],functionArguments:[a]}});return parseInt(n,10)}let[k]=await d({aptosConfig:this.config,payload:{function:"0x1::primary_fungible_store::balance",typeArguments:["0x1::object::ObjectCore"],functionArguments:[a,i]}});return parseInt(k,10)}async getAccountOwnedObjects(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),v({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return M({aptosConfig:this.config,...e})}};export{N as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DF4WKSTK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-HPZ2S4FE.mjs";var r=class t extends e{constructor(i){super(),this.identifier=i}serialize(i){i.serializeStr(this.identifier)}static deserialize(i){let s=i.deserializeStr();return new t(s)}};export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-E37YRKWK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as n}from"./chunk-GFGX3QDP.mjs";import{o as g,t as d}from"./chunk-VHNX2NUR.mjs";import{b as s}from"./chunk-QPP6BX53.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-ECWOLU5T.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as p}from"./chunk-PUZ25PTD.mjs";async function r(e){let{aptosConfig:t,overrides:s,params:n,contentType:o,acceptType:i,path:a,originMethod:R,type:d}=e,u=t.getRequestUrl(d);return p({url:u,method:"GET",originMethod:R,path:a,contentType:o,acceptType:i,params:n,overrides:{...t.clientConfig,...s}},t,e.type)}async function m(e){let{aptosConfig:t}=e;return r({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function y(e){return r({...e,type:"Pepper"})}async function A(e){let t=[],s,n=e.params;do{let o=await r({type:"Fullnode",aptosConfig:e.aptosConfig,originMethod:e.originMethod,path:e.path,params:n,overrides:e.overrides});s=o.headers["x-aptos-cursor"],delete o.headers,t.push(...o.data),n.start=s}while(s!=null);return t}export{r as a,m as b,y as c,A as d};
|
|
2
|
+
//# sourceMappingURL=chunk-EV2USF7B.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{h as e}from"./chunk-MO4IZXLK.mjs";async function i(o){o.minimumLedgerVersion!==void 0&&await e({aptosConfig:o.config,minimumLedgerVersion:o.minimumLedgerVersion,processorType:o.processorType})}export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EWZ2M5BW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-B6M7QBUO.mjs";import{a as n}from"./chunk-KYSDF3CA.mjs";import{c as i}from"./chunk-DAJOX4PL.mjs";var o=class{static generate(e={}){let{scheme:t=0,legacy:r=!0}=e;return t===0&&r?n.generate():c.generate({scheme:t})}static fromPrivateKey(e){let{privateKey:t,address:r,legacy:a=!0}=e;return t instanceof i&&a?new n({privateKey:t,address:r}):new c({privateKey:t,address:r})}static fromPrivateKeyAndAddress(e){return this.fromPrivateKey(e)}static fromDerivationPath(e){let{scheme:t=0,mnemonic:r,path:a,legacy:s=!0}=e;return t===0&&s?n.fromDerivationPath({mnemonic:r,path:a}):c.fromDerivationPath({scheme:t,mnemonic:r,path:a})}static authKey(e){let{publicKey:t}=e;return t.authKey()}verifySignature(e){return this.publicKey.verifySignature(e)}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FRGXKOU5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as p}from"./chunk-MEWFJJJN.mjs";import{b as a}from"./chunk-7V6DEA7G.mjs";import{b as s}from"./chunk-HPZ2S4FE.mjs";async function F(n){let{aptosConfig:e,payload:o,options:t}=n,i=await p({...o,aptosConfig:e}),r=new s;i.serialize(r);let u=r.toUint8Array(),{data:d}=await a({aptosConfig:e,path:"view",originMethod:"view",contentType:"application/x.aptos.view_function+bcs",params:{ledger_version:t?.ledgerVersion},body:u});return d}async function M(n){let{aptosConfig:e,payload:o,options:t}=n,{data:i}=await a({aptosConfig:e,originMethod:"viewJson",path:"view",params:{ledger_version:t?.ledgerVersion},body:{function:o.function,type_arguments:o.typeArguments??[],arguments:o.functionArguments??[]}});return i}export{F as a,M as b};
|
|
2
|
+
//# sourceMappingURL=chunk-G7MWTE2J.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as c,v as n}from"./chunk-VHNX2NUR.mjs";import{b as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{l as c,v as n}from"./chunk-VHNX2NUR.mjs";import{b as i}from"./chunk-EV2USF7B.mjs";import{c as p}from"./chunk-7V6DEA7G.mjs";async function d(o){let{aptosConfig:s}=o,{data:e}=await i({aptosConfig:s,originMethod:"getLedgerInfo",path:""});return e}async function C(o){let{aptosConfig:s,limit:e}=o;return(await a({aptosConfig:s,query:{query:c,variables:{limit:e}},originMethod:"getChainTopUserTransactions"})).user_transactions}async function a(o){let{aptosConfig:s,query:e,originMethod:t}=o,{data:r}=await p({aptosConfig:s,originMethod:t??"queryIndexer",path:"",body:e,overrides:{WITH_CREDENTIALS:!1}});return r}async function u(o){let{aptosConfig:s}=o;return(await a({aptosConfig:s,query:{query:n},originMethod:"getProcessorStatuses"})).processor_status}async function h(o){let s=await u({aptosConfig:o.aptosConfig});return BigInt(s[0].last_success_version)}async function T(o){let{aptosConfig:s,processorType:e}=o;return(await a({aptosConfig:s,query:{query:n,variables:{where_condition:{processor:{_eq:e}}}},originMethod:"getProcessorStatus"})).processor_status[0]}export{d as a,C as b,a as c,u as d,h as e,T as f};
|
|
2
|
+
//# sourceMappingURL=chunk-GFGX3QDP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o,b as h}from"./chunk-U67PFBTL.mjs";import{b as m}from"./chunk-IMGLHDIA.mjs";import{a as g}from"./chunk-BF4ZE37Q.mjs";import{a as b}from"./chunk-KA6FZNWP.mjs";function d(l){let e=l;return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}var f=class l extends m{constructor(e){super();let{publicKeys:r,signaturesRequired:t}=e;if(t<1)throw new Error("The number of required signatures needs to be greater than 0");if(r.length<t)throw new Error(`Provided ${r.length} public keys is smaller than the ${t} required signatures`);this.publicKeys=r.map(i=>i instanceof o?i:new o(i)),this.signaturesRequired=t}verifySignature(e){throw new Error("not implemented")}authKey(){return b.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let r=e.deserializeVector(o),t=e.deserializeU8();return new l({publicKeys:r,signaturesRequired:t})}createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach((n,u)=>{if(u+1>this.publicKeys.length)throw new Error(`Signature index ${u+1} is out of public keys range, ${this.publicKeys.length}.`);if(a.has(n))throw new Error(`Duplicate bit ${n} detected.`);a.add(n);let c=Math.floor(n/8),y=i[c];y|=t>>n%8,i[c]=y}),i}getIndex(e){let r=e instanceof o?e:new o(e),t=this.publicKeys.findIndex(i=>i.toString()===r.toString());if(t!==-1)return t;throw new Error("Public key not found in MultiKey")}},s=class s extends g{constructor(e){super();let{signatures:r,bitmap:t}=e;if(r.length>s.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${s.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=r.map(a=>a instanceof h?a:new h(a)),!(t instanceof Uint8Array))this.bitmap=s.createBitmap({bits:t});else{if(t.length!==s.BITMAP_LEN)throw new Error(`"bitmap" length should be ${s.BITMAP_LEN}`);this.bitmap=t}let i=this.bitmap.reduce((a,n)=>a+d(n),0);if(i!==this.signatures.length)throw new Error(`Expecting ${i} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach(n=>{if(n>=s.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${s.MAX_SIGNATURES_SUPPORTED-1}.`);if(a.has(n))throw new Error("Duplicate bits detected.");a.add(n);let u=Math.floor(n/8),c=i[u];c|=t>>n%8,i[u]=c}),i}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let r=e.deserializeVector(h),t=e.deserializeBytes();return new s({signatures:r,bitmap:t})}};s.BITMAP_LEN=4,s.MAX_SIGNATURES_SUPPORTED=s.BITMAP_LEN*8;var p=s;export{f as a,p as b};
|
|
2
|
+
//# sourceMappingURL=chunk-GGR3P2TG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as U,b,c as f,d as l,e as h,f as y}from"./chunk-56CNRT2K.mjs";import{b as c}from"./chunk-BCUSI3N6.mjs";import{a as s}from"./chunk-FVA2OPG4.mjs";var B=class{bcsToBytes(){let e=new n;return this.serialize(e),e.toUint8Array()}bcsToHex(){let e=this.bcsToBytes();return c.fromHexInput(e)}},n=class{constructor(e=64){if(e<=0)throw new Error("Length needs to be greater than 0");this.buffer=new ArrayBuffer(e),this.offset=0}ensureBufferWillHandleSize(e){for(;this.buffer.byteLength<this.offset+e;){let t=new ArrayBuffer(this.buffer.byteLength*2);new Uint8Array(t).set(new Uint8Array(this.buffer)),this.buffer=t}}appendToBuffer(e){this.ensureBufferWillHandleSize(e.length),new Uint8Array(this.buffer,this.offset).set(e),this.offset+=e.length}serializeWithFunction(e,t,i){this.ensureBufferWillHandleSize(t);let a=new DataView(this.buffer,this.offset);e.apply(a,[0,i,!0]),this.offset+=t}serializeStr(e){let t=new TextEncoder;this.serializeBytes(t.encode(e))}serializeBytes(e){this.serializeU32AsUleb128(e.length),this.appendToBuffer(e)}serializeFixedBytes(e){this.appendToBuffer(e)}serializeBool(e){A(e);let t=e?1:0;this.appendToBuffer(new Uint8Array([t]))}serializeU8(e){this.appendToBuffer(new Uint8Array([e]))}serializeU16(e){this.serializeWithFunction(DataView.prototype.setUint16,2,e)}serializeU32(e){this.serializeWithFunction(DataView.prototype.setUint32,4,e)}serializeU64(e){let t=BigInt(e)&BigInt(f),i=BigInt(e)>>BigInt(32);this.serializeU32(Number(t)),this.serializeU32(Number(i))}serializeU128(e){let t=BigInt(e)&l,i=BigInt(e)>>BigInt(64);this.serializeU64(t),this.serializeU64(i)}serializeU256(e){let t=BigInt(e)&h,i=BigInt(e)>>BigInt(128);this.serializeU128(t),this.serializeU128(i)}serializeU32AsUleb128(e){let t=e,i=[];for(;t>>>7;)i.push(t&127|128),t>>>=7;i.push(t),this.appendToBuffer(new Uint8Array(i))}toUint8Array(){return new Uint8Array(this.buffer).slice(0,this.offset)}serialize(e){e.serialize(this)}serializeVector(e){this.serializeU32AsUleb128(e.length),e.forEach(t=>{t.serialize(this)})}serializeOption(e){let t=e!==void 0;this.serializeBool(t),t&&e.serialize(this)}serializeOptionStr(e){e===void 0?this.serializeU32AsUleb128(0):(this.serializeU32AsUleb128(1),this.serializeStr(e))}};s([o(0,U)],n.prototype,"serializeU8",1),s([o(0,b)],n.prototype,"serializeU16",1),s([o(0,f)],n.prototype,"serializeU32",1),s([o(BigInt(0),l)],n.prototype,"serializeU64",1),s([o(BigInt(0),h)],n.prototype,"serializeU128",1),s([o(BigInt(0),y)],n.prototype,"serializeU256",1),s([o(0,f)],n.prototype,"serializeU32AsUleb128",1);function A(r){if(typeof r!="boolean")throw new Error(`${r} is not a boolean value`)}var z=(r,e,t)=>`${r} is out of range: [${e}, ${t}]`;function g(r,e,t){let i=BigInt(r);if(i>BigInt(t)||i<BigInt(e))throw new Error(z(r,e,t))}function o(r,e){return(t,i,a)=>{let p=a.value;return a.value=function(u){return g(u,r,e),p.apply(this,[u])},a}}export{B as a,n as b,A as c,z as d,g as e};
|
|
2
|
+
//# sourceMappingURL=chunk-HPZ2S4FE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as r,c as t,d as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o,b as r,c as t,d as s}from"./chunk-AFOPNDOJ.mjs";import{a as n}from"./chunk-EWZ2M5BW.mjs";var i=class{constructor(e){this.config=e}async getModuleEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),o({aptosConfig:this.config,...e})}async getAccountEventsByCreationNumber(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),r({aptosConfig:this.config,...e})}async getAccountEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),t({aptosConfig:this.config,...e})}async getEvents(e){return await n({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"events_processor"}),s({aptosConfig:this.config,...e})}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HSPBA2TZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-HPZ2S4FE.mjs";import{b as r}from"./chunk-BCUSI3N6.mjs";var t=class extends e{toString(){let n=this.toUint8Array();return r.fromHexInput(n).toString()}},a=class extends t{};export{t as a,a as b};
|
|
2
|
+
//# sourceMappingURL=chunk-IMGLHDIA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-P2EIZ7WL.mjs";import{f as M}from"./chunk-TQWGQLM6.mjs";import{c as R}from"./chunk-NWOMSL6K.mjs";import{c as k}from"./chunk-2BTTX2KO.mjs";import{A as V,m as O,y as q,z as G}from"./chunk-VHNX2NUR.mjs";import{b as w,f as h,i as x,l as A,m as f,n as i,q as p,s as y}from"./chunk-SUJLWCRN.mjs";import{b as c}from"./chunk-OHRL766V.mjs";import{a as _,c as d}from"./chunk-LNEZEYYE.mjs";import{a as T,e as D}from"./chunk-YPHH6CAO.mjs";import{d as E}from"./chunk-56CNRT2K.mjs";var C={BOOLEAN:"bool",U8:"u8",U16:"u16",U32:"u32",U64:"u64",U128:"u128",U256:"u256",ADDRESS:"address",STRING:"0x1::string::String",ARRAY:"vector<u8>"},l="0x4::token::Token";async function It(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()}};return(await k({aptosConfig:o,query:{query:V,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function Pt(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()},amount:{_gt:0}};return(await k({aptosConfig:o,query:{query:G,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function bt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:c.from(n).toStringLong()},amount:{_gt:0}},s={query:G,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await k({aptosConfig:o,query:s,originMethod:"getOwnedDigitalAssets"})).current_token_ownerships_v2}async function St(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:c.from(n).toStringLong()}},s={query:q,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await k({aptosConfig:o,query:s,originMethod:"getDigitalAssetActivity"})).token_activities_v2}var F={typeParameters:[],parameters:[new i(p()),new h,new i(p()),new i(p()),new w,new w,new w,new w,new w,new w,new w,new w,new w,new h,new h]};async function Dt(t){let{aptosConfig:o,options:n,creator:e}=t;return u({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::create_collection",functionArguments:[new d(t.description),new D(t.maxSupply??E),new d(t.name),new d(t.uri),new T(t.mutableDescription??!0),new T(t.mutableRoyalty??!0),new T(t.mutableURI??!0),new T(t.mutableTokenDescription??!0),new T(t.mutableTokenName??!0),new T(t.mutableTokenProperties??!0),new T(t.mutableTokenURI??!0),new T(t.tokensBurnableByCreator??!0),new T(t.tokensFreezableByCreator??!0),new D(t.royaltyNumerator??0),new D(t.royaltyDenominator??1)],abi:F},options:n})}async function v(t){let{aptosConfig:o,options:n}=t,e=n?.where;n?.tokenStandard&&(e.token_standard={_eq:n?.tokenStandard??"v2"});let r={query:O,variables:{where_condition:e,offset:n?.offset,limit:n?.limit}};return(await k({aptosConfig:o,query:r,originMethod:"getCollectionData"})).current_collections_v2[0]}async function ht(t){let{aptosConfig:o,creatorAddress:n,collectionName:e,options:r}=t,s=c.from(n),a={collection_name:{_eq:e},creator_address:{_eq:s.toStringLong()}};return r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...r,where:a}})}async function vt(t){let{aptosConfig:o,creatorAddress:n,options:e}=t,s={creator_address:{_eq:c.from(n).toStringLong()}};return e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...e,where:s}})}async function xt(t){let{aptosConfig:o,collectionId:n,options:e}=t,s={collection_id:{_eq:c.from(n).toStringLong()}};return e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...e,where:s}})}async function Gt(t){let{creatorAddress:o,collectionName:n,options:e,aptosConfig:r}=t,s=c.from(o),a={collection_name:{_eq:n},creator_address:{_eq:s.toStringLong()}};return e?.tokenStandard&&(a.token_standard={_eq:e?.tokenStandard??"v2"}),(await v({aptosConfig:r,options:{where:a}})).collection_id}var N={typeParameters:[],parameters:[new i(p()),new i(p()),new i(p()),new i(p()),new f(new i(p())),new f(new i(p())),new f(f.u8())]};async function Bt(t){let{aptosConfig:o,options:n,creator:e,collection:r,description:s,name:a,uri:m,propertyKeys:g,propertyTypes:P,propertyValues:I}=t,b=P?.map(S=>C[S]);return u({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::mint",functionArguments:[new d(r),new d(s),new d(a),new d(m),_.MoveString(g??[]),_.MoveString(b??[]),K(I??[],b??[])],abi:N},options:n})}var Q={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new x]};async function Et(t){let{aptosConfig:o,sender:n,digitalAssetAddress:e,recipient:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x1::object::transfer",typeArguments:[s??l],functionArguments:[c.from(e),c.from(r)],abi:Q},options:a})}var Y={typeParameters:[],parameters:[new i(p()),new i(p()),new i(p()),new i(p()),new f(new i(p())),new f(new i(p())),new f(f.u8()),new x]};async function Ot(t){let{aptosConfig:o,account:n,collection:e,description:r,name:s,uri:a,recipient:m,propertyKeys:g,propertyTypes:P,propertyValues:I,options:b}=t;if(g?.length!==I?.length)throw new Error("Property keys and property values counts do not match");if(P?.length!==I?.length)throw new Error("Property types and property values counts do not match");let S=P?.map(U=>C[U]);return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::mint_soul_bound",functionArguments:[e,r,s,a,_.MoveString(g??[]),_.MoveString(S??[]),K(I??[],S??[]),m],abi:Y},options:b})}var L={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function qt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::burn",typeArguments:[r??l],functionArguments:[c.from(e)],abi:L},options:s})}var z={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function Vt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::freeze_transfer",typeArguments:[r??l],functionArguments:[e],abi:z},options:s})}var j={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function Rt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::unfreeze_transfer",typeArguments:[r??l],functionArguments:[e],abi:j},options:s})}var W={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Mt(t){let{aptosConfig:o,creator:n,description:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_description",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:W},options:a})}var X={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Kt(t){let{aptosConfig:o,creator:n,name:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_name",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Ut(t){let{aptosConfig:o,creator:n,uri:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_uri",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p()),new i(p()),f.u8()]};async function Ft(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_property",typeArguments:[m??l],functionArguments:[c.from(a),new d(e),new d(C[r]),_.U8(B(s,C[r]))],abi:J},options:g})}var Z={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Nt(t){let{aptosConfig:o,creator:n,propertyKey:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::remove_property",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:Z},options:a})}var $={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p()),new i(p()),f.u8()]};async function Qt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_property",typeArguments:[m??l],functionArguments:[c.from(a),new d(e),new d(C[r]),B(s,C[r])],abi:$},options:g})}var tt={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new i(y(new A(0))),new i(p()),new A(1)]};async function Yt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_typed_property",typeArguments:[m??l,C[r]],functionArguments:[c.from(a),new d(e),s],abi:tt},options:g})}var et={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new i(y(new A(0))),new i(p()),new A(1)]};async function Lt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_typed_property",typeArguments:[m??l,C[r]],functionArguments:[c.from(a),new d(e),s],abi:et},options:g})}function K(t,o){let n=new Array;return o.forEach((e,r)=>{n.push(B(t[r],e))}),n}function B(t,o){let n=R(o);return M(t,n,0,[]).bcsToBytes()}export{It as a,Pt as b,bt as c,St as d,Dt as e,v as f,ht as g,vt as h,xt as i,Gt as j,Bt as k,Et as l,Ot as m,qt as n,Vt as o,Rt as p,Mt as q,Kt as r,Ut as s,Ft as t,Nt as u,Qt as v,Yt as w,Lt as x};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-WWZ3METZ.mjs";import{f as M}from"./chunk-NNRAQP36.mjs";import{c as R}from"./chunk-PKXEB7XP.mjs";import{c as k}from"./chunk-GFGX3QDP.mjs";import{A as V,m as O,y as q,z as G}from"./chunk-VHNX2NUR.mjs";import{b as w,f as h,i as x,l as A,m as f,n as i,q as p,s as y}from"./chunk-QDIKOQRK.mjs";import{b as c}from"./chunk-QPP6BX53.mjs";import{a as _,c as d}from"./chunk-CCMHWJ3Q.mjs";import{a as T,e as D}from"./chunk-6QGVRNV6.mjs";import{d as E}from"./chunk-56CNRT2K.mjs";var C={BOOLEAN:"bool",U8:"u8",U16:"u16",U32:"u32",U64:"u64",U128:"u128",U256:"u256",ADDRESS:"address",STRING:"0x1::string::String",ARRAY:"vector<u8>"},l="0x4::token::Token";async function It(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()}};return(await k({aptosConfig:o,query:{query:V,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function Pt(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()},amount:{_gt:0}};return(await k({aptosConfig:o,query:{query:G,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function bt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:c.from(n).toStringLong()},amount:{_gt:0}},s={query:G,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await k({aptosConfig:o,query:s,originMethod:"getOwnedDigitalAssets"})).current_token_ownerships_v2}async function St(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:c.from(n).toStringLong()}},s={query:q,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await k({aptosConfig:o,query:s,originMethod:"getDigitalAssetActivity"})).token_activities_v2}var F={typeParameters:[],parameters:[new i(p()),new h,new i(p()),new i(p()),new w,new w,new w,new w,new w,new w,new w,new w,new w,new h,new h]};async function Dt(t){let{aptosConfig:o,options:n,creator:e}=t;return u({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::create_collection",functionArguments:[new d(t.description),new D(t.maxSupply??E),new d(t.name),new d(t.uri),new T(t.mutableDescription??!0),new T(t.mutableRoyalty??!0),new T(t.mutableURI??!0),new T(t.mutableTokenDescription??!0),new T(t.mutableTokenName??!0),new T(t.mutableTokenProperties??!0),new T(t.mutableTokenURI??!0),new T(t.tokensBurnableByCreator??!0),new T(t.tokensFreezableByCreator??!0),new D(t.royaltyNumerator??0),new D(t.royaltyDenominator??1)],abi:F},options:n})}async function v(t){let{aptosConfig:o,options:n}=t,e=n?.where;n?.tokenStandard&&(e.token_standard={_eq:n?.tokenStandard??"v2"});let r={query:O,variables:{where_condition:e,offset:n?.offset,limit:n?.limit}};return(await k({aptosConfig:o,query:r,originMethod:"getCollectionData"})).current_collections_v2[0]}async function ht(t){let{aptosConfig:o,creatorAddress:n,collectionName:e,options:r}=t,s=c.from(n),a={collection_name:{_eq:e},creator_address:{_eq:s.toStringLong()}};return r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...r,where:a}})}async function vt(t){let{aptosConfig:o,creatorAddress:n,options:e}=t,s={creator_address:{_eq:c.from(n).toStringLong()}};return e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...e,where:s}})}async function xt(t){let{aptosConfig:o,collectionId:n,options:e}=t,s={collection_id:{_eq:c.from(n).toStringLong()}};return e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...e,where:s}})}async function Gt(t){let{creatorAddress:o,collectionName:n,options:e,aptosConfig:r}=t,s=c.from(o),a={collection_name:{_eq:n},creator_address:{_eq:s.toStringLong()}};return e?.tokenStandard&&(a.token_standard={_eq:e?.tokenStandard??"v2"}),(await v({aptosConfig:r,options:{where:a}})).collection_id}var N={typeParameters:[],parameters:[new i(p()),new i(p()),new i(p()),new i(p()),new f(new i(p())),new f(new i(p())),new f(f.u8())]};async function Bt(t){let{aptosConfig:o,options:n,creator:e,collection:r,description:s,name:a,uri:m,propertyKeys:g,propertyTypes:P,propertyValues:I}=t,b=P?.map(S=>C[S]);return u({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::mint",functionArguments:[new d(r),new d(s),new d(a),new d(m),_.MoveString(g??[]),_.MoveString(b??[]),K(I??[],b??[])],abi:N},options:n})}var Q={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new x]};async function Et(t){let{aptosConfig:o,sender:n,digitalAssetAddress:e,recipient:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x1::object::transfer",typeArguments:[s??l],functionArguments:[c.from(e),c.from(r)],abi:Q},options:a})}var Y={typeParameters:[],parameters:[new i(p()),new i(p()),new i(p()),new i(p()),new f(new i(p())),new f(new i(p())),new f(f.u8()),new x]};async function Ot(t){let{aptosConfig:o,account:n,collection:e,description:r,name:s,uri:a,recipient:m,propertyKeys:g,propertyTypes:P,propertyValues:I,options:b}=t;if(g?.length!==I?.length)throw new Error("Property keys and property values counts do not match");if(P?.length!==I?.length)throw new Error("Property types and property values counts do not match");let S=P?.map(U=>C[U]);return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::mint_soul_bound",functionArguments:[e,r,s,a,_.MoveString(g??[]),_.MoveString(S??[]),K(I??[],S??[]),m],abi:Y},options:b})}var L={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function qt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::burn",typeArguments:[r??l],functionArguments:[c.from(e)],abi:L},options:s})}var z={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function Vt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::freeze_transfer",typeArguments:[r??l],functionArguments:[e],abi:z},options:s})}var j={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function Rt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::unfreeze_transfer",typeArguments:[r??l],functionArguments:[e],abi:j},options:s})}var W={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Mt(t){let{aptosConfig:o,creator:n,description:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_description",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:W},options:a})}var X={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Kt(t){let{aptosConfig:o,creator:n,name:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_name",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Ut(t){let{aptosConfig:o,creator:n,uri:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_uri",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p()),new i(p()),f.u8()]};async function Ft(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_property",typeArguments:[m??l],functionArguments:[c.from(a),new d(e),new d(C[r]),_.U8(B(s,C[r]))],abi:J},options:g})}var Z={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Nt(t){let{aptosConfig:o,creator:n,propertyKey:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::remove_property",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:Z},options:a})}var $={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p()),new i(p()),f.u8()]};async function Qt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_property",typeArguments:[m??l],functionArguments:[c.from(a),new d(e),new d(C[r]),B(s,C[r])],abi:$},options:g})}var tt={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new i(y(new A(0))),new i(p()),new A(1)]};async function Yt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_typed_property",typeArguments:[m??l,C[r]],functionArguments:[c.from(a),new d(e),s],abi:tt},options:g})}var et={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new i(y(new A(0))),new i(p()),new A(1)]};async function Lt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_typed_property",typeArguments:[m??l,C[r]],functionArguments:[c.from(a),new d(e),s],abi:et},options:g})}function K(t,o){let n=new Array;return o.forEach((e,r)=>{n.push(B(t[r],e))}),n}function B(t,o){let n=R(o);return M(t,n,0,[]).bcsToBytes()}export{It as a,Pt as b,bt as c,St as d,Dt as e,v as f,ht as g,vt as h,xt as i,Gt as j,Bt as k,Et as l,Ot as m,qt as n,Vt as o,Rt as p,Mt as q,Kt as r,Ut as s,Ft as t,Nt as u,Qt as v,Yt as w,Lt as x};
|
|
2
|
+
//# sourceMappingURL=chunk-IYQISVDX.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as K,b as w}from"./chunk-KXBIA4KR.mjs";import{d as h}from"./chunk-TMW2HIXC.mjs";import{a,b as c}from"./chunk-U67PFBTL.mjs";import{j as m,k as g,n as P}from"./chunk-LG3DAAPD.mjs";import{b as d}from"./chunk-QPP6BX53.mjs";import{a as n}from"./chunk-HPZ2S4FE.mjs";import{b as f}from"./chunk-BCUSI3N6.mjs";import{d as y}from"./chunk-UAL27G6B.mjs";import v from"eventemitter3";var o=class o extends n{constructor(e){super();let{address:r,ephemeralKeyPair:t,publicKey:i,uidKey:F,uidVal:b,aud:E,pepper:A,proof:s,proofFetchCallback:l,jwt:x}=e;if(this.ephemeralKeyPair=t,this.publicKey=i,this.accountAddress=r?d.from(r):this.publicKey.authKey().derivedAddress(),this.uidKey=F,this.uidVal=b,this.aud=E,this.jwt=x,this.emitter=new v,this.proofOrPromise=s,s instanceof P)this.proof=s;else{if(l===void 0)throw new Error("Must provide callback for async proof fetch");this.emitter.on("proofFetchFinish",async T=>{await l(T),this.emitter.removeAllListeners()}),this.init(s)}this.signingScheme=2;let u=f.fromHexInput(A).toUint8Array();if(u.length!==o.PEPPER_LENGTH)throw new Error(`Pepper length in bytes should be ${o.PEPPER_LENGTH}`);this.pepper=u}async init(e){try{this.proof=await e,this.emitter.emit("proofFetchFinish",{status:"Success"})}catch(r){r instanceof Error?this.emitter.emit("proofFetchFinish",{status:"Failed",error:r.toString()}):this.emitter.emit("proofFetchFinish",{status:"Failed",error:"Unknown"})}}serialize(e){if(e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof===void 0)throw new Error("Cannot serialize - proof undefined");this.proof.serialize(e)}isExpired(){return this.ephemeralKeyPair.isExpired()}signWithAuthenticator(e){let r=new c(this.sign(e)),t=new a(this.publicKey);return new h(t,r)}signTransactionWithAuthenticator(e){let r=new c(this.signTransaction(e)),t=new a(this.publicKey);return new h(t,r)}async waitForProofFetch(){this.proofOrPromise instanceof Promise&&await this.proofOrPromise}sign(e){let{expiryDateSecs:r}=this.ephemeralKeyPair;if(this.isExpired())throw new Error("EphemeralKeyPair is expired");if(this.proof===void 0)throw new Error("Proof not found - make sure to call `await account.waitForProofFetch()` before signing.");let t=this.ephemeralKeyPair.getPublicKey(),i=this.ephemeralKeyPair.sign(e);return new m({jwtHeader:y(this.jwt.split(".")[0]),ephemeralCertificate:new g(this.proof,0),expiryDateSecs:r,ephemeralPublicKey:t,ephemeralSignature:i})}signTransaction(e){if(this.proof===void 0)throw new Error("Proof not found - make sure to call `await account.waitForProofFetch()` before signing.");let r=K(e),i=new p(r,this.proof.proof).hash();return this.sign(i)}verifySignature(e){let{message:r,signature:t}=e;return!(this.isExpired()||!this.ephemeralKeyPair.getPublicKey().verifySignature({message:r,signature:t.ephemeralSignature}))}};o.PEPPER_LENGTH=31;var S=o,p=class extends n{constructor(r,t){super();this.domainSeparator="APTOS::TransactionAndProof";this.transaction=r,this.proof=t}serialize(r){r.serializeFixedBytes(this.transaction.bcsToBytes()),r.serializeOption(this.proof)}hash(){return w(this.bcsToBytes(),this.domainSeparator)}};export{S as a,p as b};
|
|
2
|
+
//# sourceMappingURL=chunk-K2O24YLZ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/account/AbstractKeylessAccount.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport EventEmitter from \"eventemitter3\";\nimport { EphemeralCertificateVariant, HexInput, SigningScheme } from \"../types\";\nimport { AccountAddress } from \"../core/accountAddress\";\nimport {\n AnyPublicKey,\n AnySignature,\n KeylessPublicKey,\n KeylessSignature,\n EphemeralCertificate,\n ZeroKnowledgeSig,\n ZkProof,\n} from \"../core/crypto\";\n\nimport { Account } from \"./Account\";\nimport { EphemeralKeyPair } from \"./EphemeralKeyPair\";\nimport { Hex } from \"../core/hex\";\nimport { AccountAuthenticatorSingleKey } from \"../transactions/authenticator/account\";\nimport { Serializable, Serializer } from \"../bcs\";\nimport { deriveTransactionType, generateSigningMessage } from \"../transactions/transactionBuilder/signingMessage\";\nimport { AnyRawTransaction, AnyRawTransactionInstance } from \"../transactions/types\";\nimport { base64UrlDecode } from \"../utils/helpers\";\nimport { FederatedKeylessPublicKey } from \"../core/crypto/federatedKeyless\";\n\n/**\n * Account implementation for the Keyless authentication scheme. This abstract class is used for standard Keyless Accounts\n * and Federated Keyless Accounts.\n */\nexport abstract class AbstractKeylessAccount extends Serializable implements Account {\n static readonly PEPPER_LENGTH: number = 31;\n\n /**\n * The KeylessPublicKey associated with the account\n */\n readonly publicKey: KeylessPublicKey | FederatedKeylessPublicKey;\n\n /**\n * The EphemeralKeyPair used to generate sign.\n */\n readonly ephemeralKeyPair: EphemeralKeyPair;\n\n /**\n * The claim on the JWT to identify a user. This is typically 'sub' or 'email'.\n */\n readonly uidKey: string;\n\n /**\n * The value of the uidKey claim on the JWT. This intended to be a stable user identifier.\n */\n readonly uidVal: string;\n\n /**\n * The value of the 'aud' claim on the JWT, also known as client ID. This is the identifier for the dApp's\n * OIDC registration with the identity provider.\n */\n readonly aud: string;\n\n /**\n * A value contains 31 bytes of entropy that preserves privacy of the account. Typically fetched from a pepper provider.\n */\n readonly pepper: Uint8Array;\n\n /**\n * Account address associated with the account\n */\n readonly accountAddress: AccountAddress;\n\n /**\n * The zero knowledge signature (if ready) which contains the proof used to validate the EphemeralKeyPair.\n */\n proof: ZeroKnowledgeSig | undefined;\n\n /**\n * The proof of the EphemeralKeyPair or a promise that provides the proof. This is used to allow for awaiting on\n * fetching the proof.\n */\n readonly proofOrPromise: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;\n\n /**\n * Signing scheme used to sign transactions\n */\n readonly signingScheme: SigningScheme;\n\n /**\n * The JWT token used to derive the account\n */\n readonly jwt: string;\n\n /**\n * An event emitter used to assist in handling asynchronous proof fetching.\n */\n private readonly emitter: EventEmitter<ProofFetchEvents>;\n\n // Use the static constructor 'create' instead.\n protected constructor(args: {\n address?: AccountAddress;\n publicKey: KeylessPublicKey | FederatedKeylessPublicKey;\n ephemeralKeyPair: EphemeralKeyPair;\n iss: string;\n uidKey: string;\n uidVal: string;\n aud: string;\n pepper: HexInput;\n proof: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;\n proofFetchCallback?: ProofFetchCallback;\n jwt: string;\n }) {\n super();\n const { address, ephemeralKeyPair, publicKey, uidKey, uidVal, aud, pepper, proof, proofFetchCallback, jwt } = args;\n this.ephemeralKeyPair = ephemeralKeyPair;\n this.publicKey = publicKey;\n this.accountAddress = address ? AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();\n this.uidKey = uidKey;\n this.uidVal = uidVal;\n this.aud = aud;\n this.jwt = jwt;\n this.emitter = new EventEmitter<ProofFetchEvents>();\n this.proofOrPromise = proof;\n if (proof instanceof ZeroKnowledgeSig) {\n this.proof = proof;\n } else {\n if (proofFetchCallback === undefined) {\n throw new Error(\"Must provide callback for async proof fetch\");\n }\n this.emitter.on(\"proofFetchFinish\", async (status) => {\n await proofFetchCallback(status);\n this.emitter.removeAllListeners();\n });\n this.init(proof);\n }\n this.signingScheme = SigningScheme.SingleKey;\n const pepperBytes = Hex.fromHexInput(pepper).toUint8Array();\n if (pepperBytes.length !== AbstractKeylessAccount.PEPPER_LENGTH) {\n throw new Error(`Pepper length in bytes should be ${AbstractKeylessAccount.PEPPER_LENGTH}`);\n }\n this.pepper = pepperBytes;\n }\n\n /**\n * This initializes the asyncronous proof fetch\n * @return\n */\n async init(promise: Promise<ZeroKnowledgeSig>) {\n try {\n this.proof = await promise;\n this.emitter.emit(\"proofFetchFinish\", { status: \"Success\" });\n } catch (error) {\n if (error instanceof Error) {\n this.emitter.emit(\"proofFetchFinish\", { status: \"Failed\", error: error.toString() });\n } else {\n this.emitter.emit(\"proofFetchFinish\", { status: \"Failed\", error: \"Unknown\" });\n }\n }\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeStr(this.jwt);\n serializer.serializeStr(this.uidKey);\n serializer.serializeFixedBytes(this.pepper);\n this.ephemeralKeyPair.serialize(serializer);\n if (this.proof === undefined) {\n throw new Error(\"Cannot serialize - proof undefined\");\n }\n this.proof.serialize(serializer);\n }\n\n /**\n * Checks if the proof is expired. If so the account must be rederived with a new EphemeralKeyPair\n * and JWT token.\n * @return boolean\n */\n isExpired(): boolean {\n return this.ephemeralKeyPair.isExpired();\n }\n\n /**\n * Sign a message using Keyless.\n * @param message the message to sign, as binary input\n * @return the AccountAuthenticator containing the signature, together with the account's public key\n */\n signWithAuthenticator(message: HexInput): AccountAuthenticatorSingleKey {\n const signature = new AnySignature(this.sign(message));\n const publicKey = new AnyPublicKey(this.publicKey);\n return new AccountAuthenticatorSingleKey(publicKey, signature);\n }\n\n /**\n * Sign a transaction using Keyless.\n * @param transaction the raw transaction\n * @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key\n */\n signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey {\n const signature = new AnySignature(this.signTransaction(transaction));\n const publicKey = new AnyPublicKey(this.publicKey);\n return new AccountAuthenticatorSingleKey(publicKey, signature);\n }\n\n /**\n * Waits for asyncronous proof fetching to finish.\n * @return\n */\n async waitForProofFetch() {\n if (this.proofOrPromise instanceof Promise) {\n await this.proofOrPromise;\n }\n }\n\n /**\n * Sign the given message using Keyless.\n * @param message in HexInput format\n * @returns Signature\n */\n sign(message: HexInput): KeylessSignature {\n const { expiryDateSecs } = this.ephemeralKeyPair;\n if (this.isExpired()) {\n throw new Error(\"EphemeralKeyPair is expired\");\n }\n if (this.proof === undefined) {\n throw new Error(\"Proof not found - make sure to call `await account.waitForProofFetch()` before signing.\");\n }\n const ephemeralPublicKey = this.ephemeralKeyPair.getPublicKey();\n const ephemeralSignature = this.ephemeralKeyPair.sign(message);\n\n return new KeylessSignature({\n jwtHeader: base64UrlDecode(this.jwt.split(\".\")[0]),\n ephemeralCertificate: new EphemeralCertificate(this.proof, EphemeralCertificateVariant.ZkProof),\n expiryDateSecs,\n ephemeralPublicKey,\n ephemeralSignature,\n });\n }\n\n /**\n * Sign the given transaction with Keyless.\n * Signs the transaction and proof to guard against proof malleability.\n * @param transaction the transaction to be signed\n * @returns KeylessSignature\n */\n signTransaction(transaction: AnyRawTransaction): KeylessSignature {\n if (this.proof === undefined) {\n throw new Error(\"Proof not found - make sure to call `await account.waitForProofFetch()` before signing.\");\n }\n const raw = deriveTransactionType(transaction);\n const txnAndProof = new TransactionAndProof(raw, this.proof.proof);\n const signMess = txnAndProof.hash();\n return this.sign(signMess);\n }\n\n /**\n * Note - This function is currently incomplete and should only be used to verify ownership of the KeylessAccount\n *\n * Verifies a signature given the message.\n *\n * TODO: Groth16 proof verification\n *\n * @param args.message the message that was signed.\n * @param args.signature the KeylessSignature to verify\n * @returns boolean\n */\n verifySignature(args: { message: HexInput; signature: KeylessSignature }): boolean {\n const { message, signature } = args;\n if (this.isExpired()) {\n return false;\n }\n if (!this.ephemeralKeyPair.getPublicKey().verifySignature({ message, signature: signature.ephemeralSignature })) {\n return false;\n }\n return true;\n }\n}\n\n/**\n * A container class to hold a transaction and a proof. It implements CryptoHashable which is used to create\n * the signing message for Keyless transactions. We sign over the proof to ensure non-malleability.\n */\nexport class TransactionAndProof extends Serializable {\n /**\n * The transaction to sign.\n */\n transaction: AnyRawTransactionInstance;\n\n /**\n * The zero knowledge proof used in signing the transaction.\n */\n proof?: ZkProof;\n\n /**\n * The domain separator prefix used when hashing.\n */\n readonly domainSeparator = \"APTOS::TransactionAndProof\";\n\n constructor(transaction: AnyRawTransactionInstance, proof?: ZkProof) {\n super();\n this.transaction = transaction;\n this.proof = proof;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeFixedBytes(this.transaction.bcsToBytes());\n serializer.serializeOption(this.proof);\n }\n\n /**\n * Hashes the bcs serialized from of the class. This is the typescript corollary to the BCSCryptoHash macro in aptos-core.\n *\n * @returns Uint8Array\n */\n hash(): Uint8Array {\n return generateSigningMessage(this.bcsToBytes(), this.domainSeparator);\n }\n}\n\nexport type ProofFetchSuccess = {\n status: \"Success\";\n};\n\nexport type ProofFetchFailure = {\n status: \"Failed\";\n error: string;\n};\n\nexport type ProofFetchStatus = ProofFetchSuccess | ProofFetchFailure;\n\nexport type ProofFetchCallback = (status: ProofFetchStatus) => Promise<void>;\n\nexport interface ProofFetchEvents {\n proofFetchFinish: (status: ProofFetchStatus) => void;\n}\n"],"mappings":"+VAGA,OAAOA,MAAkB,gBA2BlB,IAAeC,EAAf,MAAeA,UAA+BC,CAAgC,CAkEzE,YAAYC,EAYnB,CACD,MAAM,EACN,GAAM,CAAE,QAAAC,EAAS,iBAAAC,EAAkB,UAAAC,EAAW,OAAAC,EAAQ,OAAAC,EAAQ,IAAAC,EAAK,OAAAC,EAAQ,MAAAC,EAAO,mBAAAC,EAAoB,IAAAC,CAAI,EAAIV,EAU9G,GATA,KAAK,iBAAmBE,EACxB,KAAK,UAAYC,EACjB,KAAK,eAAiBF,EAAUU,EAAe,KAAKV,CAAO,EAAI,KAAK,UAAU,QAAQ,EAAE,eAAe,EACvG,KAAK,OAASG,EACd,KAAK,OAASC,EACd,KAAK,IAAMC,EACX,KAAK,IAAMI,EACX,KAAK,QAAU,IAAIE,EACnB,KAAK,eAAiBJ,EAClBA,aAAiBK,EACnB,KAAK,MAAQL,MACR,CACL,GAAIC,IAAuB,OACzB,MAAM,IAAI,MAAM,6CAA6C,EAE/D,KAAK,QAAQ,GAAG,mBAAoB,MAAOK,GAAW,CACpD,MAAML,EAAmBK,CAAM,EAC/B,KAAK,QAAQ,mBAAmB,CAClC,CAAC,EACD,KAAK,KAAKN,CAAK,CACjB,CACA,KAAK,cAAgB,EACrB,IAAMO,EAAcC,EAAI,aAAaT,CAAM,EAAE,aAAa,EAC1D,GAAIQ,EAAY,SAAWjB,EAAuB,cAChD,MAAM,IAAI,MAAM,oCAAoCA,EAAuB,aAAa,EAAE,EAE5F,KAAK,OAASiB,CAChB,CAMA,MAAM,KAAKE,EAAoC,CAC7C,GAAI,CACF,KAAK,MAAQ,MAAMA,EACnB,KAAK,QAAQ,KAAK,mBAAoB,CAAE,OAAQ,SAAU,CAAC,CAC7D,OAASC,EAAO,CACVA,aAAiB,MACnB,KAAK,QAAQ,KAAK,mBAAoB,CAAE,OAAQ,SAAU,MAAOA,EAAM,SAAS,CAAE,CAAC,EAEnF,KAAK,QAAQ,KAAK,mBAAoB,CAAE,OAAQ,SAAU,MAAO,SAAU,CAAC,CAEhF,CACF,CAEA,UAAUC,EAA8B,CAKtC,GAJAA,EAAW,aAAa,KAAK,GAAG,EAChCA,EAAW,aAAa,KAAK,MAAM,EACnCA,EAAW,oBAAoB,KAAK,MAAM,EAC1C,KAAK,iBAAiB,UAAUA,CAAU,EACtC,KAAK,QAAU,OACjB,MAAM,IAAI,MAAM,oCAAoC,EAEtD,KAAK,MAAM,UAAUA,CAAU,CACjC,CAOA,WAAqB,CACnB,OAAO,KAAK,iBAAiB,UAAU,CACzC,CAOA,sBAAsBC,EAAkD,CACtE,IAAMC,EAAY,IAAIC,EAAa,KAAK,KAAKF,CAAO,CAAC,EAC/CjB,EAAY,IAAIoB,EAAa,KAAK,SAAS,EACjD,OAAO,IAAIC,EAA8BrB,EAAWkB,CAAS,CAC/D,CAOA,iCAAiCI,EAA+D,CAC9F,IAAMJ,EAAY,IAAIC,EAAa,KAAK,gBAAgBG,CAAW,CAAC,EAC9DtB,EAAY,IAAIoB,EAAa,KAAK,SAAS,EACjD,OAAO,IAAIC,EAA8BrB,EAAWkB,CAAS,CAC/D,CAMA,MAAM,mBAAoB,CACpB,KAAK,0BAA0B,SACjC,MAAM,KAAK,cAEf,CAOA,KAAKD,EAAqC,CACxC,GAAM,CAAE,eAAAM,CAAe,EAAI,KAAK,iBAChC,GAAI,KAAK,UAAU,EACjB,MAAM,IAAI,MAAM,6BAA6B,EAE/C,GAAI,KAAK,QAAU,OACjB,MAAM,IAAI,MAAM,yFAAyF,EAE3G,IAAMC,EAAqB,KAAK,iBAAiB,aAAa,EACxDC,EAAqB,KAAK,iBAAiB,KAAKR,CAAO,EAE7D,OAAO,IAAIS,EAAiB,CAC1B,UAAWC,EAAgB,KAAK,IAAI,MAAM,GAAG,EAAE,CAAC,CAAC,EACjD,qBAAsB,IAAIC,EAAqB,KAAK,OAA0C,EAC9F,eAAAL,EACA,mBAAAC,EACA,mBAAAC,CACF,CAAC,CACH,CAQA,gBAAgBH,EAAkD,CAChE,GAAI,KAAK,QAAU,OACjB,MAAM,IAAI,MAAM,yFAAyF,EAE3G,IAAMO,EAAMC,EAAsBR,CAAW,EAEvCS,EADc,IAAIC,EAAoBH,EAAK,KAAK,MAAM,KAAK,EACpC,KAAK,EAClC,OAAO,KAAK,KAAKE,CAAQ,CAC3B,CAaA,gBAAgBlC,EAAmE,CACjF,GAAM,CAAE,QAAAoB,EAAS,UAAAC,CAAU,EAAIrB,EAI/B,MAHI,OAAK,UAAU,GAGf,CAAC,KAAK,iBAAiB,aAAa,EAAE,gBAAgB,CAAE,QAAAoB,EAAS,UAAWC,EAAU,kBAAmB,CAAC,EAIhH,CACF,EAjPsBvB,EACJ,cAAwB,GADnC,IAAesC,EAAftC,EAuPMqC,EAAN,cAAkCpC,CAAa,CAgBpD,YAAY0B,EAAwCjB,EAAiB,CACnE,MAAM,EAHR,KAAS,gBAAkB,6BAIzB,KAAK,YAAciB,EACnB,KAAK,MAAQjB,CACf,CAEA,UAAUW,EAA8B,CACtCA,EAAW,oBAAoB,KAAK,YAAY,WAAW,CAAC,EAC5DA,EAAW,gBAAgB,KAAK,KAAK,CACvC,CAOA,MAAmB,CACjB,OAAOkB,EAAuB,KAAK,WAAW,EAAG,KAAK,eAAe,CACvE,CACF","names":["EventEmitter","_AbstractKeylessAccount","Serializable","args","address","ephemeralKeyPair","publicKey","uidKey","uidVal","aud","pepper","proof","proofFetchCallback","jwt","AccountAddress","EventEmitter","ZeroKnowledgeSig","status","pepperBytes","Hex","promise","error","serializer","message","signature","AnySignature","AnyPublicKey","AccountAuthenticatorSingleKey","transaction","expiryDateSecs","ephemeralPublicKey","ephemeralSignature","KeylessSignature","base64UrlDecode","EphemeralCertificate","raw","deriveTransactionType","signMess","TransactionAndProof","AbstractKeylessAccount","generateSigningMessage"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s}from"./chunk-QPP6BX53.mjs";import{a as o}from"./chunk-HPZ2S4FE.mjs";import{b as n}from"./chunk-BCUSI3N6.mjs";import{sha3_256 as d}from"@noble/hashes/sha3";var r=class r extends o{constructor(t){super();let{data:e}=t,i=n.fromHexInput(e);if(i.toUint8Array().length!==r.LENGTH)throw new Error(`Authentication Key length should be ${r.LENGTH}`);this.data=i}serialize(t){t.serializeFixedBytes(this.data.toUint8Array())}static deserialize(t){let e=t.deserializeFixedBytes(r.LENGTH);return new r({data:e})}toString(){return this.data.toString()}toUint8Array(){return this.data.toUint8Array()}static fromSchemeAndBytes(t){let{scheme:e,input:i}=t,u=n.fromHexInput(i).toUint8Array(),h=new Uint8Array([...u,e]),a=d.create();a.update(h);let y=a.digest();return new r({data:y})}static fromPublicKeyAndScheme(t){let{publicKey:e}=t;return e.authKey()}static fromPublicKey(t){let{publicKey:e}=t;return e.authKey()}derivedAddress(){return new s(this.data.toUint8Array())}};r.LENGTH=32;var c=r;export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KA6FZNWP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as T,d as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as T,d as c}from"./chunk-5655UVIK.mjs";import{g as A,h as a}from"./chunk-EXP5STXZ.mjs";import{sha3_256 as y}from"@noble/hashes/sha3";function d(e){return e.feePayerAddress?new c(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress):e.secondarySignerAddresses?new T(e.rawTransaction,e.secondarySignerAddresses):e.rawTransaction}function n(e,r){let i=y.create();if(!r.startsWith("APTOS::"))throw new Error(`Domain separator needs to start with 'APTOS::'. Provided - ${r}`);i.update(r);let s=i.digest(),o=e,t=new Uint8Array(s.length+o.length);return t.set(s),t.set(o,s.length),t}function u(e){return n(e.bcsToBytes(),`APTOS::${e.constructor.name}`)}function S(e){let r=d(e);return e.feePayerAddress?n(r.bcsToBytes(),a):e.secondarySignerAddresses?n(r.bcsToBytes(),a):n(r.bcsToBytes(),A)}export{d as a,n as b,u as c,S as d};
|
|
2
|
+
//# sourceMappingURL=chunk-KXBIA4KR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as o}from"./chunk-KXBIA4KR.mjs";import{b as i}from"./chunk-TMW2HIXC.mjs";import{c as n}from"./chunk-DAJOX4PL.mjs";import{b as s}from"./chunk-QPP6BX53.mjs";var c=class a{constructor(t){this.signingScheme=0;let{privateKey:e,address:r}=t;this.privateKey=e,this.publicKey=e.publicKey(),this.accountAddress=r?s.from(r):this.publicKey.authKey().derivedAddress()}static generate(){let t=n.generate();return new a({privateKey:t})}static fromDerivationPath(t){let{path:e,mnemonic:r}=t,u=n.fromDerivationPath(e,r);return new a({privateKey:u})}verifySignature(t){return this.publicKey.verifySignature(t)}signWithAuthenticator(t){return new i(this.publicKey,this.privateKey.sign(t))}signTransactionWithAuthenticator(t){return new i(this.publicKey,this.signTransaction(t))}sign(t){return this.privateKey.sign(t)}signTransaction(t){return this.sign(o(t))}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KYSDF3CA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-WS4RPKL6.mjs";import{a as o,b as c}from"./chunk-U6Z4FNB7.mjs";import{a as h,i as d}from"./chunk-WWZ3METZ.mjs";import{g as u}from"./chunk-MO4IZXLK.mjs";import g from"eventemitter3";var m="fulfilled",f=(n=>(n.TransactionSent="transactionSent",n.TransactionSendFailed="transactionSendFailed",n.TransactionExecuted="transactionExecuted",n.TransactionExecutionFailed="transactionExecutionFailed",n.ExecutionFinish="executionFinish",n))(f||{}),p=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===m?(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===m?(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{m as a,f as b,p as c};
|
|
2
|
+
//# sourceMappingURL=chunk-L5NY7TMI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t,b as n,c as o,d as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t,b as n,c as o,d as r}from"./chunk-OY2IX7HW.mjs";import{a as s}from"./chunk-EWZ2M5BW.mjs";import{b as i}from"./chunk-QPP6BX53.mjs";var a=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await t({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetMetadataByCreatorAddress(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),await t({aptosConfig:this.config,options:{where:{creator_address:{_eq:i.from(e.creatorAddress).toStringLong()}}}})}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),o({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return r({aptosConfig:this.config,...e})}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-LDFTE4MM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m,c as P,d as V,e as v}from"./chunk-SRPI2FFA.mjs";import{a as B}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m,c as P,d as V,e as v}from"./chunk-SRPI2FFA.mjs";import{a as B}from"./chunk-M2QV232A.mjs";import{a as w,b as y}from"./chunk-3MCYLML2.mjs";import{b as C,d as I}from"./chunk-DAJOX4PL.mjs";import{b as U}from"./chunk-IMGLHDIA.mjs";import{a as d}from"./chunk-BF4ZE37Q.mjs";import{a as H}from"./chunk-KA6FZNWP.mjs";import{b as x}from"./chunk-QPP6BX53.mjs";import{a as T}from"./chunk-AH44UPM4.mjs";import{b}from"./chunk-EV2USF7B.mjs";import{a as G}from"./chunk-KEYAPEAX.mjs";import{a as p,b as E}from"./chunk-HPZ2S4FE.mjs";import{b as u}from"./chunk-BCUSI3N6.mjs";import{jwtDecode as M}from"jwt-decode";var ye=1e7,R=120,k=30,F=330,me=120,he=350,ge=300,fe=93,o=class o extends U{constructor(e,t){super();let i=u.fromHexInput(t).toUint8Array();if(i.length!==o.ID_COMMITMENT_LENGTH)throw new Error(`Id Commitment length in bytes should be ${o.ID_COMMITMENT_LENGTH}`);this.iss=e,this.idCommitment=i}authKey(){let e=new E;return e.serializeU32AsUleb128(3),e.serializeFixedBytes(this.bcsToBytes()),H.fromSchemeAndBytes({scheme:2,input:e.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}toString(){return u.fromHexInput(this.toUint8Array()).toString()}verifySignature(e){throw new Error("Not yet implemented")}serialize(e){e.serializeStr(this.iss),e.serializeBytes(this.idCommitment)}static deserialize(e){let t=e.deserializeStr(),i=e.deserializeBytes();return new o(t,i)}static load(e){let t=e.deserializeStr(),i=e.deserializeBytes();return new o(t,i)}static isPublicKey(e){return e instanceof o}static create(e){return _(e),new o(e.iss,_(e))}static fromJwtAndPepper(e){let{jwt:t,pepper:i,uidKey:a="sub"}=e,n=M(t);if(typeof n.iss!="string")throw new Error("iss was not found");if(typeof n.aud!="string")throw new Error("aud was not found or an array of values");let s=n[a];return o.create({iss:n.iss,uidKey:a,uidVal:s,aud:n.aud,pepper:i})}static isInstance(e){return"iss"in e&&typeof e.iss=="string"&&"idCommitment"in e&&e.idCommitment instanceof Uint8Array}};o.ID_COMMITMENT_LENGTH=32;var A=o;function _(r){let{uidKey:e,uidVal:t,aud:i,pepper:a}=r,n=[P(u.fromHexInput(a).toUint8Array()),m(i,R),m(t,F),m(e,k)];return V(v(n),A.ID_COMMITMENT_LENGTH)}var D=class r extends d{constructor(e){super();let{jwtHeader:t,ephemeralCertificate:i,expiryDateSecs:a,ephemeralPublicKey:n,ephemeralSignature:s}=e;this.jwtHeader=t,this.ephemeralCertificate=i,this.expiryDateSecs=a,this.ephemeralPublicKey=n,this.ephemeralSignature=s}toUint8Array(){return this.bcsToBytes()}serialize(e){this.ephemeralCertificate.serialize(e),e.serializeStr(this.jwtHeader),e.serializeU64(this.expiryDateSecs),this.ephemeralPublicKey.serialize(e),this.ephemeralSignature.serialize(e)}static deserialize(e){let t=h.deserialize(e),i=e.deserializeStr(),a=e.deserializeU64(),n=w.deserialize(e),s=y.deserialize(e);return new r({jwtHeader:i,expiryDateSecs:Number(a),ephemeralCertificate:t,ephemeralPublicKey:n,ephemeralSignature:s})}static getSimulationSignature(){return new r({jwtHeader:"{}",ephemeralCertificate:new h(new S({proof:new f(new g({a:new Uint8Array(32),b:new Uint8Array(64),c:new Uint8Array(32)}),0),expHorizonSecs:0}),0),expiryDateSecs:0,ephemeralPublicKey:new w(new C(new Uint8Array(32))),ephemeralSignature:new y(new I(new Uint8Array(64)))})}static isSignature(e){return e instanceof r}},h=class r extends d{constructor(e,t){super(),this.signature=e,this.variant=t}toUint8Array(){return this.signature.toUint8Array()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return new r(S.deserialize(e),t);default:throw new Error(`Unknown variant index for EphemeralCertificate: ${t}`)}}},c=class r extends p{constructor(e){if(super(),this.data=u.fromHexInput(e).toUint8Array(),this.data.length!==32)throw new Error("Input needs to be 32 bytes")}serialize(e){e.serializeFixedBytes(this.data)}static deserialize(e){let t=e.deserializeFixedBytes(32);return new r(t)}},l=class r extends p{constructor(e){if(super(),this.data=u.fromHexInput(e).toUint8Array(),this.data.length!==64)throw new Error("Input needs to be 64 bytes")}serialize(e){e.serializeFixedBytes(this.data)}static deserialize(e){let t=e.deserializeFixedBytes(64);return new r(t)}},g=class r extends B{constructor(e){super();let{a:t,b:i,c:a}=e;this.a=new c(t),this.b=new l(i),this.c=new c(a)}serialize(e){this.a.serialize(e),this.b.serialize(e),this.c.serialize(e)}static deserialize(e){let t=c.deserialize(e).bcsToBytes(),i=l.deserialize(e).bcsToBytes(),a=c.deserialize(e).bcsToBytes();return new r({a:t,b:i,c:a})}},f=class r extends p{constructor(e,t){super(),this.proof=e,this.variant=t}serialize(e){e.serializeU32AsUleb128(this.variant),this.proof.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return new r(g.deserialize(e),t);default:throw new Error(`Unknown variant index for ZkProof: ${t}`)}}},S=class r extends d{constructor(e){super();let{proof:t,expHorizonSecs:i,trainingWheelsSignature:a,extraField:n,overrideAudVal:s}=e;this.proof=t,this.expHorizonSecs=i,this.trainingWheelsSignature=a,this.extraField=n,this.overrideAudVal=s}toUint8Array(){return this.bcsToBytes()}static fromBytes(e){return r.deserialize(new G(e))}serialize(e){this.proof.serialize(e),e.serializeU64(this.expHorizonSecs),e.serializeOptionStr(this.extraField),e.serializeOptionStr(this.overrideAudVal),e.serializeOption(this.trainingWheelsSignature)}static deserialize(e){let t=f.deserialize(e),i=Number(e.deserializeU64()),a=e.deserializeOptionStr(),n=e.deserializeOptionStr(),s=e.deserializeOption(y);return new r({proof:t,expHorizonSecs:i,trainingWheelsSignature:s,extraField:a,overrideAudVal:n})}},z=class r{constructor(e,t){this.verficationKey=e,this.maxExpHorizonSecs=t}static create(e,t){return new r(new K({alphaG1:e.alpha_g1,betaG2:e.beta_g2,deltaG2:e.delta_g2,gammaAbcG1:e.gamma_abc_g1,gammaG2:e.gamma_g2}),t)}},K=class r{constructor(e){let{alphaG1:t,betaG2:i,deltaG2:a,gammaAbcG1:n,gammaG2:s}=e;this.alphaG1=new c(t),this.betaG2=new l(i),this.deltaG2=new l(a),this.gammaAbcG1=[new c(n[0]),new c(n[1])],this.gammaG2=new l(s)}static fromGroth16VerificationKeyResponse(e){return new r({alphaG1:e.alpha_g1,betaG2:e.beta_g2,deltaG2:e.delta_g2,gammaAbcG1:e.gamma_abc_g1,gammaG2:e.gamma_g2})}};async function Se(r){let{aptosConfig:e}=r;return T(async()=>{let t=await L(r),i=await N(r);return z.create(i,Number(t.max_exp_horizon_secs))},`keyless-configuration-${e.network}`,1e3*60*5)()}async function L(r){let{aptosConfig:e,options:t}=r,i="0x1::keyless_account::Configuration",{data:a}=await b({aptosConfig:e,originMethod:"getKeylessConfigurationResource",path:`accounts/${x.from("0x1").toString()}/resource/${i}`,params:{ledger_version:t?.ledgerVersion}});return a.data}async function N(r){let{aptosConfig:e,options:t}=r,i="0x1::keyless_account::Groth16VerificationKey",{data:a}=await b({aptosConfig:e,originMethod:"getGroth16VerificationKeyResource",path:`accounts/${x.from("0x1").toString()}/resource/${i}`,params:{ledger_version:t?.ledgerVersion}});return a.data}export{ye as a,R as b,k as c,F as d,me as e,he as f,ge as g,fe as h,A as i,D as j,h as k,g as l,f as m,S as n,z as o,Se as p};
|
|
2
|
+
//# sourceMappingURL=chunk-LG3DAAPD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-IMGLHDIA.mjs";import{a as f}from"./chunk-BF4ZE37Q.mjs";import{a as c}from"./chunk-Q4XR6QOZ.mjs";import{e as g,j as h}from"./chunk-LR65XHSF.mjs";import{a as p}from"./chunk-HPZ2S4FE.mjs";import{b as s}from"./chunk-BCUSI3N6.mjs";import{sha3_256 as H}from"@noble/hashes/sha3";import{secp256k1 as o}from"@noble/curves/secp256k1";import{HDKey as S}from"@scure/bip32";var i=class i extends d{constructor(e){super();let t=s.fromHexInput(e);if(t.toUint8Array().length!==i.LENGTH)throw new Error(`PublicKey length should be ${i.LENGTH}`);this.key=t}verifySignature(e){let{message:t,signature:n}=e,y=c(t),l=s.fromHexInput(y).toUint8Array(),A=H(l),x=n.toUint8Array();return o.verify(x,A,this.key.toUint8Array(),{lowS:!0})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new i(t)}static isPublicKey(e){return e instanceof i}static isInstance(e){return"key"in e&&e.key?.data?.length===i.LENGTH}};i.LENGTH=65;var u=i,r=class r extends p{constructor(e){super();let t=s.fromHexInput(e);if(t.toUint8Array().length!==r.LENGTH)throw new Error(`PrivateKey length should be ${r.LENGTH}`);this.key=t}static generate(){let e=o.utils.randomPrivateKey();return new r(e)}static fromDerivationPath(e,t){if(!g(e))throw new Error(`Invalid derivation path ${e}`);return r.fromDerivationPathInner(e,h(t))}static fromDerivationPathInner(e,t){let{privateKey:n}=S.fromMasterSeed(t).derive(e);if(n===null)throw new Error("Invalid key");return new r(n)}sign(e){let t=c(e),n=s.fromHexInput(t),y=H(n.toUint8Array()),l=o.sign(y,this.key.toUint8Array(),{lowS:!0});return new m(l.toCompactRawBytes())}publicKey(){let e=o.getPublicKey(this.key.toUint8Array(),!1);return new u(e)}toUint8Array(){return this.key.toUint8Array()}toString(){return this.key.toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new r(t)}static isPrivateKey(e){return e instanceof r}};r.LENGTH=32;var v=r,a=class a extends f{constructor(e){super();let t=s.fromHexInput(e);if(t.toUint8Array().length!==a.LENGTH)throw new Error(`Signature length should be ${a.LENGTH}, received ${t.toUint8Array().length}`);this.data=t}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new a(t)}};a.LENGTH=64;var m=a;export{u as a,v as b,m as c};
|
|
2
|
+
//# sourceMappingURL=chunk-LGD5KU56.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-HPZ2S4FE.mjs";var r=class a extends i{constructor(e){super(),this.chainId=e}serialize(e){e.serializeU8(this.chainId)}static deserialize(e){let s=e.deserializeU8();return new a(s)}};export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LXLISEQ4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-HPZ2S4FE.mjs";import{b as t}from"./chunk-BCUSI3N6.mjs";var e=class extends r{toString(){let s=this.bcsToBytes();return t.fromHexInput(s).toString()}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-M2QV232A.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as l,c as an,d as rn,e as R}from"./chunk-NNRAQP36.mjs";import{r as en,u as y}from"./chunk-3YKAGVHZ.mjs";import{a as nn}from"./chunk-BKEJMQQ6.mjs";import{b as tn}from"./chunk-MO4IZXLK.mjs";import{a as Y}from"./chunk-GFGX3QDP.mjs";import{a as Q}from"./chunk-XONG5JZ4.mjs";import{a as A}from"./chunk-CVDR5SJR.mjs";import{a as J}from"./chunk-TL7DR54X.mjs";import{a as L,c as Z,d as j}from"./chunk-5655UVIK.mjs";import{c as O,d as V,e as q,f as E,g as H,h as X,i as z}from"./chunk-2TQIU7CG.mjs";import{a as v}from"./chunk-LXLISEQ4.mjs";import{b as x,d as B,e as F,f as D}from"./chunk-N5JNKD5F.mjs";import{a as k,b as f,d as p}from"./chunk-TMW2HIXC.mjs";import{a as S,b}from"./chunk-U67PFBTL.mjs";import{a as N}from"./chunk-LGD5KU56.mjs";import{a as K}from"./chunk-PNXUYOYI.mjs";import{i as I,j as _}from"./chunk-LG3DAAPD.mjs";import{b as M,d as $}from"./chunk-DAJOX4PL.mjs";import{b as u}from"./chunk-QPP6BX53.mjs";import{a as C}from"./chunk-AH44UPM4.mjs";import{a as U}from"./chunk-BSUYPXRD.mjs";import{b as w}from"./chunk-BCUSI3N6.mjs";import{g as P}from"./chunk-SCHZ67F3.mjs";import{b as W,c as G}from"./chunk-EXP5STXZ.mjs";import{sha3_256 as mn}from"@noble/hashes/sha3";async function vn(n){if(en(n))return gn(n);let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await sn({key:"entry-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:an});return An({...n,abi:a})}function An(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=l(n.typeArguments);if(r.length!==t.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${t.typeParameters.length}, received ${r.length}`);let o=n.functionArguments.map((s,d)=>R(n.function,t,s,d,r));if(o.length!==t.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${t.parameters.length} but got ${o.length}`);let c=E.build(`${e}::${i}`,a,r,o);if("multisigAddress"in n){let s=u.from(n.multisigAddress);return new q(new X(s,new z(c)))}return new V(c)}async function On(n){let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await sn({key:"view-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:rn});return yn({abi:a,...n})}function yn(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=l(n.typeArguments);if(r.length!==t.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${t.typeParameters.length}, received ${r.length}`);let o=n?.functionArguments?.map((c,s)=>R(n.function,t,c,s,r))??[];if(o.length!==t.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${t.parameters.length} but got ${o.length}`);return E.build(`${e}::${i}`,a,r,o)}function gn(n){return new O(new H(w.fromHexInput(n.bytecode).toUint8Array(),l(n.typeArguments),n.functionArguments))}async function fn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=async()=>P[t.network]?{chainId:P[t.network]}:{chainId:(await Y({aptosConfig:t})).chain_id},c=async()=>a?.gasUnitPrice?{gasEstimate:a.gasUnitPrice}:{gasEstimate:(await tn({aptosConfig:t})).gas_estimate},s=async()=>{let g=async()=>a?.accountSequenceNumber!==void 0?a.accountSequenceNumber:(await nn({aptosConfig:t,accountAddress:e})).sequence_number;if(r&&u.from(r).equals(u.ZERO))try{return await g()}catch{return 0}else return g()},[{chainId:d},{gasEstimate:m},h]=await Promise.all([o(),c(),s()]),{maxGasAmount:cn,gasUnitPrice:un,expireTimestamp:dn}={maxGasAmount:a?.maxGasAmount?BigInt(a.maxGasAmount):BigInt(2e5),gasUnitPrice:a?.gasUnitPrice??BigInt(m),expireTimestamp:a?.expireTimestamp??BigInt(Math.floor(Date.now()/1e3)+20)};return new L(u.from(e),BigInt(h),i,BigInt(cn),BigInt(un),BigInt(dn),new v(d))}async function Vn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=await fn({aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r});if("secondarySignerAddresses"in n){let c=n.secondarySignerAddresses?.map(s=>u.from(s))??[];return new Q(o,c,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}return new J(o,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}function qn(n){let{signerPublicKey:t,transaction:e,secondarySignersPublicKeys:i,feePayerPublicKey:a}=n,r=T(t);if(e.feePayerAddress){let c=new j(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress),s=[];if(i&&(s=i.map(h=>T(h))),!a)throw new Error("Must provide a feePayerPublicKey argument to generate a signed fee payer transaction for simulation");let d=T(a),m=new F(r,e.secondarySignerAddresses??[],s,{address:e.feePayerAddress,authenticator:d});return new A(c.raw_txn,m).bcsToBytes()}if(e.secondarySignerAddresses){let c=new Z(e.rawTransaction,e.secondarySignerAddresses),s=[];if(!i)throw new Error("Must provide a secondarySignersPublicKeys argument to generate a signed multi agent transaction for simulation");s=i.map(m=>T(m));let d=new B(r,e.secondarySignerAddresses,s);return new A(c.raw_txn,d).bcsToBytes()}let o;if(r instanceof f)o=new x(r.public_key,r.signature);else if(r instanceof p)o=new D(r);else throw new Error("Invalid public key");return new A(e.rawTransaction,o).bcsToBytes()}function T(n){let e=I.isInstance(n)||K.isInstance(n)||N.isInstance(n)?new S(n):n,i=new $(new Uint8Array(64));if(M.isInstance(e))return new f(e,i);if(S.isInstance(e))return I.isInstance(e.publicKey)?new p(e,new b(_.getSimulationSignature())):new p(e,new b(i));throw new Error("Unsupported public key")}function pn(n){let{transaction:t,feePayerAuthenticator:e,additionalSignersAuthenticators:i}=n,a=U(k,n.senderAuthenticator),r;if(t.feePayerAddress){if(!e)throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");r=new F(a,t.secondarySignerAddresses??[],i??[],{address:t.feePayerAddress,authenticator:e})}else if(t.secondarySignerAddresses){if(!i)throw new Error("Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction");r=new B(a,t.secondarySignerAddresses,i)}else a instanceof f?r=new x(a.public_key,a.signature):r=new D(a);return new A(t.rawTransaction,r).bcsToBytes()}function on(n){let t=mn.create();for(let e of n)t.update(e);return t.digest()}var ln=on(["APTOS::Transaction"]);function Hn(n){let t=pn(n);return new w(on([ln,new Uint8Array([0]),t])).toString()}async function sn({key:n,moduleAddress:t,moduleName:e,functionName:i,aptosConfig:a,abi:r,fetch:o}){return r!==void 0?r:C(async()=>o(t,e,i,a),`${n}-${a.network}-${t}-${e}-${i}`,1e3*60*5)()}export{vn as a,An as b,On as c,yn as d,fn as e,Vn as f,qn as g,T as h,pn as i,on as j,Hn as k};
|
|
2
|
+
//# sourceMappingURL=chunk-MEWFJJJN.mjs.map
|