@aptos-labs/ts-sdk 0.0.3 → 0.0.5
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/README.md +1 -0
- package/dist/{cjs → browser}/index.d.ts +431 -237
- package/dist/browser/index.global.js +44 -42
- package/dist/browser/index.global.js.map +1 -1
- package/dist/common/index.d.ts +5831 -0
- package/dist/common/index.js +406 -0
- package/dist/common/index.js.map +1 -0
- package/dist/esm/api/account.d.ts +292 -0
- package/dist/esm/api/account.mjs +2 -0
- package/dist/esm/api/account.mjs.map +1 -0
- package/dist/esm/api/ans.d.ts +79 -0
- package/dist/esm/api/ans.mjs +2 -0
- package/dist/esm/api/ans.mjs.map +1 -0
- package/dist/esm/api/aptos.d.ts +72 -0
- package/dist/esm/api/aptos.mjs +2 -0
- package/dist/esm/api/aptos.mjs.map +1 -0
- package/dist/esm/api/aptosConfig.d.ts +51 -0
- package/dist/esm/api/aptosConfig.mjs +2 -0
- package/dist/esm/api/aptosConfig.mjs.map +1 -0
- package/dist/esm/api/coin.d.ts +59 -0
- package/dist/esm/api/coin.mjs +2 -0
- package/dist/esm/api/coin.mjs.map +1 -0
- package/dist/esm/api/digitalAsset.d.ts +174 -0
- package/dist/esm/api/digitalAsset.mjs +2 -0
- package/dist/esm/api/digitalAsset.mjs.map +1 -0
- package/dist/esm/api/event.d.ts +74 -0
- package/dist/esm/api/event.mjs +2 -0
- package/dist/esm/api/event.mjs.map +1 -0
- package/dist/esm/api/faucet.d.ts +37 -0
- package/dist/esm/api/faucet.mjs +2 -0
- package/dist/esm/api/faucet.mjs.map +1 -0
- package/dist/esm/api/fungibleAsset.d.ts +72 -0
- package/dist/esm/api/fungibleAsset.mjs +2 -0
- package/dist/esm/api/fungibleAsset.mjs.map +1 -0
- package/dist/esm/api/general.d.ts +150 -0
- package/dist/esm/api/general.mjs +2 -0
- package/dist/esm/api/general.mjs.map +1 -0
- package/dist/esm/api/index.d.ts +46 -0
- package/dist/esm/api/index.mjs +2 -0
- package/dist/esm/api/index.mjs.map +1 -0
- package/dist/esm/api/staking.d.ts +53 -0
- package/dist/esm/api/staking.mjs +2 -0
- package/dist/esm/api/staking.mjs.map +1 -0
- package/dist/esm/api/transaction.d.ts +101 -0
- package/dist/esm/api/transaction.mjs +2 -0
- package/dist/esm/api/transaction.mjs.map +1 -0
- package/dist/esm/api/transactionSubmission.d.ts +142 -0
- package/dist/esm/api/transactionSubmission.mjs +2 -0
- package/dist/esm/api/transactionSubmission.mjs.map +1 -0
- package/dist/esm/bcs/consts.d.ts +14 -0
- package/dist/esm/bcs/consts.mjs +2 -0
- package/dist/esm/bcs/consts.mjs.map +1 -0
- package/dist/esm/bcs/deserializer.d.ts +150 -0
- package/dist/esm/bcs/deserializer.mjs +2 -0
- package/dist/esm/bcs/deserializer.mjs.map +1 -0
- package/dist/esm/bcs/index.d.ts +14 -0
- package/dist/esm/bcs/index.mjs +2 -0
- package/dist/esm/bcs/index.mjs.map +1 -0
- package/dist/esm/bcs/serializable/entryFunctionBytes.d.ts +40 -0
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +2 -0
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs.map +1 -0
- package/dist/esm/bcs/serializable/fixedBytes.d.ts +52 -0
- package/dist/esm/bcs/serializable/fixedBytes.mjs +2 -0
- package/dist/esm/bcs/serializable/fixedBytes.mjs.map +1 -0
- package/dist/esm/bcs/serializable/movePrimitives.d.ts +69 -0
- package/dist/esm/bcs/serializable/movePrimitives.mjs +2 -0
- package/dist/esm/bcs/serializable/movePrimitives.mjs.map +1 -0
- package/dist/esm/bcs/serializable/moveStructs.d.ts +284 -0
- package/dist/esm/bcs/serializable/moveStructs.mjs +2 -0
- package/dist/esm/bcs/serializable/moveStructs.mjs.map +1 -0
- package/dist/esm/bcs/serializer.d.ts +192 -0
- package/dist/esm/bcs/serializer.mjs +2 -0
- package/dist/esm/bcs/serializer.mjs.map +1 -0
- package/dist/esm/chunk-2444YR3Y.mjs +2 -0
- package/dist/esm/chunk-2444YR3Y.mjs.map +1 -0
- package/dist/esm/chunk-27P7PELS.mjs +2 -0
- package/dist/esm/chunk-27P7PELS.mjs.map +1 -0
- package/dist/esm/chunk-2B5QXKPU.mjs +2 -0
- package/dist/esm/chunk-2B5QXKPU.mjs.map +1 -0
- package/dist/esm/chunk-2MQZUGO6.mjs +2 -0
- package/dist/esm/chunk-2MQZUGO6.mjs.map +1 -0
- package/dist/esm/chunk-3JPVQHOR.mjs +2 -0
- package/dist/esm/chunk-3JPVQHOR.mjs.map +1 -0
- package/dist/esm/chunk-3OJN4I42.mjs +2 -0
- package/dist/esm/chunk-3OJN4I42.mjs.map +1 -0
- package/dist/esm/chunk-3YOV42H5.mjs +2 -0
- package/dist/esm/chunk-3YOV42H5.mjs.map +1 -0
- package/dist/esm/chunk-4WPQQPUF.mjs +1 -0
- package/dist/esm/chunk-4WPQQPUF.mjs.map +1 -0
- package/dist/esm/chunk-6FBKUTGF.mjs +2 -0
- package/dist/esm/chunk-6FBKUTGF.mjs.map +1 -0
- package/dist/esm/chunk-7AIV5FEN.mjs +2 -0
- package/dist/esm/chunk-7AIV5FEN.mjs.map +1 -0
- package/dist/esm/chunk-7AQXAH6Q.mjs +2 -0
- package/dist/esm/chunk-7AQXAH6Q.mjs.map +1 -0
- package/dist/esm/chunk-7TL2MY2B.mjs +2 -0
- package/dist/esm/chunk-7TL2MY2B.mjs.map +1 -0
- package/dist/esm/chunk-ADR4XQPR.mjs +2 -0
- package/dist/esm/chunk-ADR4XQPR.mjs.map +1 -0
- package/dist/esm/chunk-AH44UPM4.mjs +2 -0
- package/dist/esm/chunk-AH44UPM4.mjs.map +1 -0
- package/dist/esm/chunk-AY2HWVDO.mjs +2 -0
- package/dist/esm/chunk-AY2HWVDO.mjs.map +1 -0
- package/dist/esm/chunk-BC2NOUYT.mjs +2 -0
- package/dist/esm/chunk-BC2NOUYT.mjs.map +1 -0
- package/dist/esm/chunk-BIUGRAMO.mjs +2 -0
- package/dist/esm/chunk-BIUGRAMO.mjs.map +1 -0
- package/dist/esm/chunk-BREUBEPM.mjs +2 -0
- package/dist/esm/chunk-BREUBEPM.mjs.map +1 -0
- package/dist/esm/chunk-BSCOVLWS.mjs +1 -0
- package/dist/esm/chunk-BSCOVLWS.mjs.map +1 -0
- package/dist/esm/chunk-BTK34A5U.mjs +406 -0
- package/dist/esm/chunk-BTK34A5U.mjs.map +1 -0
- package/dist/esm/chunk-CZZJAR3B.mjs +2 -0
- package/dist/esm/chunk-CZZJAR3B.mjs.map +1 -0
- package/dist/esm/chunk-DNDWTM7A.mjs +2 -0
- package/dist/esm/chunk-DNDWTM7A.mjs.map +1 -0
- package/dist/esm/chunk-DNYVUM3K.mjs +2 -0
- package/dist/esm/chunk-DNYVUM3K.mjs.map +1 -0
- package/dist/esm/chunk-DXUIJ6KA.mjs +2 -0
- package/dist/esm/chunk-DXUIJ6KA.mjs.map +1 -0
- package/dist/esm/chunk-E72CFUU4.mjs +2 -0
- package/dist/esm/chunk-E72CFUU4.mjs.map +1 -0
- package/dist/esm/chunk-E7FWVXGX.mjs +1 -0
- package/dist/esm/chunk-E7FWVXGX.mjs.map +1 -0
- package/dist/esm/chunk-EKAOAGNQ.mjs +2 -0
- package/dist/esm/chunk-EKAOAGNQ.mjs.map +1 -0
- package/dist/esm/chunk-FBPNHF54.mjs +2 -0
- package/dist/esm/chunk-FBPNHF54.mjs.map +1 -0
- package/dist/esm/chunk-FHJ7F7Z6.mjs +2 -0
- package/dist/esm/chunk-FHJ7F7Z6.mjs.map +1 -0
- package/dist/esm/chunk-FNB6CFQR.mjs +2 -0
- package/dist/esm/chunk-FNB6CFQR.mjs.map +1 -0
- package/dist/esm/chunk-FYIFBLHU.mjs +2 -0
- package/dist/esm/chunk-FYIFBLHU.mjs.map +1 -0
- package/dist/esm/chunk-FZY4PMEE.mjs +1 -0
- package/dist/esm/chunk-FZY4PMEE.mjs.map +1 -0
- package/dist/esm/chunk-GUT3G5CG.mjs +2 -0
- package/dist/esm/chunk-GUT3G5CG.mjs.map +1 -0
- package/dist/esm/chunk-HH5RSP2H.mjs +2 -0
- package/dist/esm/chunk-HH5RSP2H.mjs.map +1 -0
- package/dist/esm/chunk-HTZTTZQJ.mjs +1 -0
- package/dist/esm/chunk-HTZTTZQJ.mjs.map +1 -0
- package/dist/esm/chunk-I5OYNCZS.mjs +1 -0
- package/dist/esm/chunk-I5OYNCZS.mjs.map +1 -0
- package/dist/esm/chunk-IPJKGHQY.mjs +2 -0
- package/dist/esm/chunk-IPJKGHQY.mjs.map +1 -0
- package/dist/esm/chunk-IXMH6AXJ.mjs +2 -0
- package/dist/esm/chunk-IXMH6AXJ.mjs.map +1 -0
- package/dist/esm/chunk-IZHPCZE3.mjs +2 -0
- package/dist/esm/chunk-IZHPCZE3.mjs.map +1 -0
- package/dist/esm/chunk-J3QOSJFP.mjs +2 -0
- package/dist/esm/chunk-J3QOSJFP.mjs.map +1 -0
- package/dist/esm/chunk-J5OKXARS.mjs +2 -0
- package/dist/esm/chunk-J5OKXARS.mjs.map +1 -0
- package/dist/esm/chunk-JTGGMXB7.mjs +2 -0
- package/dist/esm/chunk-JTGGMXB7.mjs.map +1 -0
- package/dist/esm/chunk-KC64ESLO.mjs +2 -0
- package/dist/esm/chunk-KC64ESLO.mjs.map +1 -0
- package/dist/esm/chunk-KFP7MDSD.mjs +2 -0
- package/dist/esm/chunk-KFP7MDSD.mjs.map +1 -0
- package/dist/esm/chunk-KJDY66XF.mjs +2 -0
- package/dist/esm/chunk-KJDY66XF.mjs.map +1 -0
- package/dist/esm/chunk-KNLMUSIO.mjs +2 -0
- package/dist/esm/chunk-KNLMUSIO.mjs.map +1 -0
- package/dist/esm/chunk-KPESAXVI.mjs +2 -0
- package/dist/esm/chunk-KPESAXVI.mjs.map +1 -0
- package/dist/esm/chunk-KWJ6XKNF.mjs +2 -0
- package/dist/esm/chunk-KWJ6XKNF.mjs.map +1 -0
- package/dist/esm/chunk-KYWYIK5P.mjs +2 -0
- package/dist/esm/chunk-KYWYIK5P.mjs.map +1 -0
- package/dist/esm/chunk-LAXIJRYU.mjs +2 -0
- package/dist/esm/chunk-LAXIJRYU.mjs.map +1 -0
- package/dist/esm/chunk-LR65XHSF.mjs +2 -0
- package/dist/esm/chunk-LR65XHSF.mjs.map +1 -0
- package/dist/esm/chunk-LU6VS7PJ.mjs +2 -0
- package/dist/esm/chunk-LU6VS7PJ.mjs.map +1 -0
- package/dist/esm/chunk-LV33NV4J.mjs +2 -0
- package/dist/esm/chunk-LV33NV4J.mjs.map +1 -0
- package/dist/esm/chunk-MIBLZSNS.mjs +2 -0
- package/dist/esm/chunk-MIBLZSNS.mjs.map +1 -0
- package/dist/esm/chunk-N2FKVZ4D.mjs +1 -0
- package/dist/esm/chunk-N2FKVZ4D.mjs.map +1 -0
- package/dist/esm/chunk-N6XWY4UT.mjs +2 -0
- package/dist/esm/chunk-N6XWY4UT.mjs.map +1 -0
- package/dist/esm/chunk-NKTKHC3Z.mjs +2 -0
- package/dist/esm/chunk-NKTKHC3Z.mjs.map +1 -0
- package/dist/esm/chunk-O243HOP3.mjs +2 -0
- package/dist/esm/chunk-O243HOP3.mjs.map +1 -0
- package/dist/esm/chunk-PDLUCVJB.mjs +2 -0
- package/dist/esm/chunk-PDLUCVJB.mjs.map +1 -0
- package/dist/esm/chunk-PJDVHU7X.mjs +2 -0
- package/dist/esm/chunk-PJDVHU7X.mjs.map +1 -0
- package/dist/esm/chunk-R7G3CLRI.mjs +1 -0
- package/dist/esm/chunk-R7G3CLRI.mjs.map +1 -0
- package/dist/esm/chunk-RMMOF53Q.mjs +1 -0
- package/dist/esm/chunk-RMMOF53Q.mjs.map +1 -0
- package/dist/esm/chunk-SJLO3JIH.mjs +2 -0
- package/dist/esm/chunk-SJLO3JIH.mjs.map +1 -0
- package/dist/esm/chunk-TCTZCPQ6.mjs +1 -0
- package/dist/esm/chunk-TCTZCPQ6.mjs.map +1 -0
- package/dist/esm/chunk-TXUMB5ZO.mjs +2 -0
- package/dist/esm/chunk-TXUMB5ZO.mjs.map +1 -0
- package/dist/esm/chunk-TYHBYRUA.mjs +2 -0
- package/dist/esm/chunk-TYHBYRUA.mjs.map +1 -0
- package/dist/esm/chunk-UQIOMAXE.mjs +2 -0
- package/dist/esm/chunk-UQIOMAXE.mjs.map +1 -0
- package/dist/esm/chunk-UVGCVCNG.mjs +2 -0
- package/dist/esm/chunk-UVGCVCNG.mjs.map +1 -0
- package/dist/esm/chunk-UYVPNUH3.mjs +1 -0
- package/dist/esm/chunk-UYVPNUH3.mjs.map +1 -0
- package/dist/esm/chunk-V3MBJJTL.mjs +1 -0
- package/dist/esm/chunk-V3MBJJTL.mjs.map +1 -0
- package/dist/esm/chunk-V6AAQLLJ.mjs +2 -0
- package/dist/esm/chunk-V6AAQLLJ.mjs.map +1 -0
- package/dist/esm/chunk-VAGYTPSI.mjs +2 -0
- package/dist/esm/chunk-VAGYTPSI.mjs.map +1 -0
- package/dist/esm/chunk-WGXAIQ7K.mjs +2 -0
- package/dist/esm/chunk-WGXAIQ7K.mjs.map +1 -0
- package/dist/esm/chunk-WNEZCERQ.mjs +2 -0
- package/dist/esm/chunk-WNEZCERQ.mjs.map +1 -0
- package/dist/esm/chunk-WVMDCC4V.mjs +2 -0
- package/dist/esm/chunk-WVMDCC4V.mjs.map +1 -0
- package/dist/esm/chunk-XFS5O5GJ.mjs +2 -0
- package/dist/esm/chunk-XFS5O5GJ.mjs.map +1 -0
- package/dist/esm/chunk-XFSL7O6Q.mjs +2 -0
- package/dist/esm/chunk-XFSL7O6Q.mjs.map +1 -0
- package/dist/esm/chunk-XNFEUXDS.mjs +2 -0
- package/dist/esm/chunk-XNFEUXDS.mjs.map +1 -0
- package/dist/esm/chunk-YS2OX7AB.mjs +2 -0
- package/dist/esm/chunk-YS2OX7AB.mjs.map +1 -0
- package/dist/esm/chunk-Z56AKXJ7.mjs +2 -0
- package/dist/esm/chunk-Z56AKXJ7.mjs.map +1 -0
- package/dist/esm/chunk-ZT2A5ABR.mjs +2 -0
- package/dist/esm/chunk-ZT2A5ABR.mjs.map +1 -0
- package/dist/esm/chunk-ZXJ5ZBTL.mjs +2 -0
- package/dist/esm/chunk-ZXJ5ZBTL.mjs.map +1 -0
- package/dist/esm/client/core.d.ts +24 -0
- package/dist/esm/client/core.mjs +2 -0
- package/dist/esm/client/core.mjs.map +1 -0
- package/dist/esm/client/get.d.ts +55 -0
- package/dist/esm/client/get.mjs +2 -0
- package/dist/esm/client/get.mjs.map +1 -0
- package/dist/esm/client/index.d.ts +11 -0
- package/dist/esm/client/index.mjs +2 -0
- package/dist/esm/client/index.mjs.map +1 -0
- package/dist/esm/client/post.d.ts +60 -0
- package/dist/esm/client/post.mjs +2 -0
- package/dist/esm/client/post.mjs.map +1 -0
- package/dist/esm/client/types.d.ts +46 -0
- package/dist/esm/client/types.mjs +2 -0
- package/dist/esm/client/types.mjs.map +1 -0
- package/dist/esm/core/account.d.ts +184 -0
- package/dist/esm/core/account.mjs +2 -0
- package/dist/esm/core/account.mjs.map +1 -0
- package/dist/esm/core/accountAddress.d.ts +244 -0
- package/dist/esm/core/accountAddress.mjs +2 -0
- package/dist/esm/core/accountAddress.mjs.map +1 -0
- package/dist/esm/core/authenticationKey.d.ts +74 -0
- package/dist/esm/core/authenticationKey.mjs +2 -0
- package/dist/esm/core/authenticationKey.mjs.map +1 -0
- package/dist/esm/core/common.d.ts +32 -0
- package/dist/esm/core/common.mjs +2 -0
- package/dist/esm/core/common.mjs.map +1 -0
- package/dist/esm/core/crypto/anyPublicKey.d.ts +54 -0
- package/dist/esm/core/crypto/anyPublicKey.mjs +2 -0
- package/dist/esm/core/crypto/anyPublicKey.mjs.map +1 -0
- package/dist/esm/core/crypto/anySignature.d.ts +31 -0
- package/dist/esm/core/crypto/anySignature.mjs +2 -0
- package/dist/esm/core/crypto/anySignature.mjs.map +1 -0
- package/dist/esm/core/crypto/asymmetricCrypto.d.ts +74 -0
- package/dist/esm/core/crypto/asymmetricCrypto.mjs +2 -0
- package/dist/esm/core/crypto/asymmetricCrypto.mjs.map +1 -0
- package/dist/esm/core/crypto/ed25519.d.ts +173 -0
- package/dist/esm/core/crypto/ed25519.mjs +2 -0
- package/dist/esm/core/crypto/ed25519.mjs.map +1 -0
- package/dist/esm/core/crypto/hdKey.d.ts +65 -0
- package/dist/esm/core/crypto/hdKey.mjs +2 -0
- package/dist/esm/core/crypto/hdKey.mjs.map +1 -0
- package/dist/esm/core/crypto/index.d.ts +17 -0
- package/dist/esm/core/crypto/index.mjs +2 -0
- package/dist/esm/core/crypto/index.mjs.map +1 -0
- package/dist/esm/core/crypto/multiEd25519.d.ts +126 -0
- package/dist/esm/core/crypto/multiEd25519.mjs +2 -0
- package/dist/esm/core/crypto/multiEd25519.mjs.map +1 -0
- package/dist/esm/core/crypto/multiKey.d.ts +52 -0
- package/dist/esm/core/crypto/multiKey.mjs +2 -0
- package/dist/esm/core/crypto/multiKey.mjs.map +1 -0
- package/dist/esm/core/crypto/secp256k1.d.ts +161 -0
- package/dist/esm/core/crypto/secp256k1.mjs +2 -0
- package/dist/esm/core/crypto/secp256k1.mjs.map +1 -0
- package/dist/esm/core/hex.d.ts +105 -0
- package/dist/esm/core/hex.mjs +2 -0
- package/dist/esm/core/hex.mjs.map +1 -0
- package/dist/esm/core/index.d.ts +21 -0
- package/dist/esm/core/index.mjs +2 -0
- package/dist/esm/core/index.mjs.map +1 -0
- package/dist/esm/index.d.ts +60 -5637
- package/dist/esm/index.mjs +1 -5444
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/internal/account.d.ts +143 -0
- package/dist/esm/internal/account.mjs +2 -0
- package/dist/esm/internal/account.mjs.map +1 -0
- package/dist/esm/internal/ans.d.ts +83 -0
- package/dist/esm/internal/ans.mjs +2 -0
- package/dist/esm/internal/ans.mjs.map +1 -0
- package/dist/esm/internal/coin.d.ts +43 -0
- package/dist/esm/internal/coin.mjs +2 -0
- package/dist/esm/internal/coin.mjs.map +1 -0
- package/dist/esm/internal/digitalAsset.d.ts +118 -0
- package/dist/esm/internal/digitalAsset.mjs +2 -0
- package/dist/esm/internal/digitalAsset.mjs.map +1 -0
- package/dist/esm/internal/event.d.ts +45 -0
- package/dist/esm/internal/event.mjs +2 -0
- package/dist/esm/internal/event.mjs.map +1 -0
- package/dist/esm/internal/faucet.d.ts +29 -0
- package/dist/esm/internal/faucet.mjs +2 -0
- package/dist/esm/internal/faucet.mjs.map +1 -0
- package/dist/esm/internal/fungibleAsset.d.ts +38 -0
- package/dist/esm/internal/fungibleAsset.mjs +2 -0
- package/dist/esm/internal/fungibleAsset.mjs.map +1 -0
- package/dist/esm/internal/general.d.ts +60 -0
- package/dist/esm/internal/general.mjs +2 -0
- package/dist/esm/internal/general.mjs.map +1 -0
- package/dist/esm/internal/staking.d.ts +38 -0
- package/dist/esm/internal/staking.mjs +2 -0
- package/dist/esm/internal/staking.mjs.map +1 -0
- package/dist/esm/internal/transaction.d.ts +57 -0
- package/dist/esm/internal/transaction.mjs +2 -0
- package/dist/esm/internal/transaction.mjs.map +1 -0
- package/dist/esm/internal/transactionSubmission.d.ts +148 -0
- package/dist/esm/internal/transactionSubmission.mjs +2 -0
- package/dist/esm/internal/transactionSubmission.mjs.map +1 -0
- package/dist/esm/transactions/authenticator/account.d.ts +79 -0
- package/dist/esm/transactions/authenticator/account.mjs +2 -0
- package/dist/esm/transactions/authenticator/account.mjs.map +1 -0
- package/dist/esm/transactions/authenticator/index.d.ts +19 -0
- package/dist/esm/transactions/authenticator/index.mjs +2 -0
- package/dist/esm/transactions/authenticator/index.mjs.map +1 -0
- package/dist/esm/transactions/authenticator/transaction.d.ts +105 -0
- package/dist/esm/transactions/authenticator/transaction.mjs +2 -0
- package/dist/esm/transactions/authenticator/transaction.mjs.map +1 -0
- package/dist/esm/transactions/index.d.ts +39 -0
- package/dist/esm/transactions/index.mjs +2 -0
- package/dist/esm/transactions/index.mjs.map +1 -0
- package/dist/esm/transactions/instances/chainId.d.ts +21 -0
- package/dist/esm/transactions/instances/chainId.mjs +2 -0
- package/dist/esm/transactions/instances/chainId.mjs.map +1 -0
- package/dist/esm/transactions/instances/identifier.d.ts +23 -0
- package/dist/esm/transactions/instances/identifier.mjs +2 -0
- package/dist/esm/transactions/instances/identifier.mjs.map +1 -0
- package/dist/esm/transactions/instances/index.d.ts +29 -0
- package/dist/esm/transactions/instances/index.mjs +2 -0
- package/dist/esm/transactions/instances/index.mjs.map +1 -0
- package/dist/esm/transactions/instances/moduleId.d.ts +37 -0
- package/dist/esm/transactions/instances/moduleId.mjs +2 -0
- package/dist/esm/transactions/instances/moduleId.mjs.map +1 -0
- package/dist/esm/transactions/instances/rawTransaction.d.ts +98 -0
- package/dist/esm/transactions/instances/rawTransaction.mjs +2 -0
- package/dist/esm/transactions/instances/rawTransaction.mjs.map +1 -0
- package/dist/esm/transactions/instances/rotationProofChallenge.d.ts +37 -0
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +2 -0
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs.map +1 -0
- package/dist/esm/transactions/instances/signedTransaction.d.ts +46 -0
- package/dist/esm/transactions/instances/signedTransaction.mjs +2 -0
- package/dist/esm/transactions/instances/signedTransaction.mjs.map +1 -0
- package/dist/esm/transactions/instances/transactionArgument.d.ts +40 -0
- package/dist/esm/transactions/instances/transactionArgument.mjs +2 -0
- package/dist/esm/transactions/instances/transactionArgument.mjs.map +1 -0
- package/dist/esm/transactions/instances/transactionPayload.d.ts +211 -0
- package/dist/esm/transactions/instances/transactionPayload.mjs +2 -0
- package/dist/esm/transactions/instances/transactionPayload.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/helpers.d.ts +63 -0
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/helpers.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/index.d.ts +35 -0
- package/dist/esm/transactions/transactionBuilder/index.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/index.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.ts +54 -0
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.ts +128 -0
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs.map +1 -0
- package/dist/esm/transactions/typeTag/index.d.ts +127 -0
- package/dist/esm/transactions/typeTag/index.mjs +2 -0
- package/dist/esm/transactions/typeTag/index.mjs.map +1 -0
- package/dist/esm/transactions/typeTag/parser.d.ts +47 -0
- package/dist/esm/transactions/typeTag/parser.mjs +2 -0
- package/dist/esm/transactions/typeTag/parser.mjs.map +1 -0
- package/dist/esm/transactions/types.d.ts +253 -0
- package/dist/esm/transactions/types.mjs +2 -0
- package/dist/esm/transactions/types.mjs.map +1 -0
- package/dist/esm/types/generated/operations.d.ts +604 -0
- package/dist/esm/types/generated/operations.mjs +1 -0
- package/dist/esm/types/generated/operations.mjs.map +1 -0
- package/dist/esm/types/generated/queries.d.ts +55 -0
- package/dist/esm/types/generated/queries.mjs +2 -0
- package/dist/esm/types/generated/queries.mjs.map +1 -0
- package/dist/esm/types/generated/types.d.ts +9458 -0
- package/dist/esm/types/generated/types.mjs +2 -0
- package/dist/esm/types/generated/types.mjs.map +1 -0
- package/dist/{types → esm/types}/index.d.ts +19 -451
- package/dist/esm/types/index.mjs +2 -0
- package/dist/esm/types/index.mjs.map +1 -0
- package/dist/esm/types/indexer.d.ts +62 -0
- package/dist/esm/types/indexer.mjs +2 -0
- package/dist/esm/types/indexer.mjs.map +1 -0
- package/dist/esm/utils/apiEndpoints.d.ts +14 -0
- package/dist/esm/utils/apiEndpoints.mjs +2 -0
- package/dist/esm/utils/apiEndpoints.mjs.map +1 -0
- package/dist/esm/utils/const.d.ts +42 -0
- package/dist/esm/utils/const.mjs +2 -0
- package/dist/esm/utils/const.mjs.map +1 -0
- package/dist/esm/utils/helpers.d.ts +7 -0
- package/dist/esm/utils/helpers.mjs +2 -0
- package/dist/esm/utils/helpers.mjs.map +1 -0
- package/dist/esm/utils/memoize.d.ts +20 -0
- package/dist/esm/utils/memoize.mjs +2 -0
- package/dist/esm/utils/memoize.mjs.map +1 -0
- package/dist/esm/version.d.ts +8 -0
- package/dist/esm/version.mjs +2 -0
- package/dist/esm/version.mjs.map +1 -0
- package/package.json +17 -13
- package/src/api/account.ts +17 -18
- package/src/api/ans.ts +58 -0
- package/src/api/aptos.ts +7 -1
- package/src/api/coin.ts +3 -3
- package/src/api/digitalAsset.ts +9 -8
- package/src/api/event.ts +4 -3
- package/src/api/faucet.ts +3 -2
- package/src/api/general.ts +2 -2
- package/src/api/staking.ts +5 -4
- package/src/api/transactionSubmission.ts +41 -20
- package/src/bcs/deserializer.ts +4 -4
- package/src/bcs/serializable/moveStructs.ts +13 -13
- package/src/bcs/serializer.ts +4 -4
- package/src/client/core.ts +18 -8
- package/src/core/account.ts +90 -33
- package/src/core/accountAddress.ts +34 -30
- package/src/core/authenticationKey.ts +11 -9
- package/src/core/crypto/ed25519.ts +48 -1
- package/src/core/crypto/hdKey.ts +105 -0
- package/src/core/crypto/index.ts +1 -0
- package/src/core/crypto/secp256k1.ts +36 -0
- package/src/index.ts +0 -1
- package/src/internal/account.ts +80 -58
- package/src/internal/ans.ts +175 -0
- package/src/internal/coin.ts +5 -5
- package/src/internal/digitalAsset.ts +16 -17
- package/src/internal/event.ts +8 -8
- package/src/internal/faucet.ts +4 -4
- package/src/internal/general.ts +3 -3
- package/src/internal/queries/getEvents.graphql +1 -0
- package/src/internal/staking.ts +8 -8
- package/src/internal/transactionSubmission.ts +78 -19
- package/src/transactions/instances/index.ts +1 -0
- package/src/transactions/instances/moduleId.ts +1 -1
- package/src/transactions/instances/rotationProofChallenge.ts +58 -0
- package/src/transactions/transactionBuilder/helpers.ts +5 -1
- package/src/transactions/transactionBuilder/remoteAbi.ts +4 -4
- package/src/transactions/transactionBuilder/transactionBuilder.ts +31 -49
- package/src/transactions/typeTag/index.ts +10 -10
- package/src/transactions/typeTag/parser.ts +1 -1
- package/src/transactions/types.ts +31 -20
- package/src/types/generated/operations.ts +19 -18
- package/src/types/generated/queries.ts +20 -19
- package/src/types/generated/types.ts +6 -0
- package/src/types/index.ts +15 -18
- package/src/utils/apiEndpoints.ts +8 -0
- package/src/version.ts +1 -1
- package/dist/cjs/index.js +0 -5631
- package/dist/cjs/index.js.map +0 -1
- package/dist/types/index.js +0 -176
- package/dist/types/index.js.map +0 -1
- package/src/utils/hdKey.ts +0 -113
|
@@ -37,7 +37,7 @@ export class ModuleId extends Serializable {
|
|
|
37
37
|
if (parts.length !== 2) {
|
|
38
38
|
throw new Error("Invalid module id.");
|
|
39
39
|
}
|
|
40
|
-
return new ModuleId(AccountAddress.
|
|
40
|
+
return new ModuleId(AccountAddress.fromStringRelaxed(parts[0]), new Identifier(parts[1]));
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
serialize(serializer: Serializer): void {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Copyright © Aptos Foundation
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { Serializer, Serializable } from "../../bcs/serializer";
|
|
5
|
+
import { AccountAddress } from "../../core/accountAddress";
|
|
6
|
+
import { AnyNumber } from "../../types";
|
|
7
|
+
import { PublicKey } from "../../core/crypto/asymmetricCrypto";
|
|
8
|
+
import { MoveString, MoveVector, U64, U8 } from "../../bcs";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Representation of the challenge which is needed to sign by owner of the account
|
|
12
|
+
* to rotate the authentication key.
|
|
13
|
+
*/
|
|
14
|
+
export class RotationProofChallenge extends Serializable {
|
|
15
|
+
// Resource account address
|
|
16
|
+
public readonly accountAddress: AccountAddress = AccountAddress.ONE;
|
|
17
|
+
|
|
18
|
+
// Module name, i.e: 0x1::account
|
|
19
|
+
public readonly moduleName: MoveString = new MoveString("account");
|
|
20
|
+
|
|
21
|
+
// The rotation proof challenge struct name that live under the module
|
|
22
|
+
public readonly structName: MoveString = new MoveString("RotationProofChallenge");
|
|
23
|
+
|
|
24
|
+
// Signer's address
|
|
25
|
+
public readonly originator: AccountAddress;
|
|
26
|
+
|
|
27
|
+
// Signer's current authentication key
|
|
28
|
+
public readonly currentAuthKey: AccountAddress;
|
|
29
|
+
|
|
30
|
+
// New public key to rotate to
|
|
31
|
+
public readonly newPublicKey: MoveVector<U8>;
|
|
32
|
+
|
|
33
|
+
// Sequence number of the account
|
|
34
|
+
public readonly sequenceNumber: U64;
|
|
35
|
+
|
|
36
|
+
constructor(args: {
|
|
37
|
+
sequenceNumber: AnyNumber;
|
|
38
|
+
originator: AccountAddress;
|
|
39
|
+
currentAuthKey: AccountAddress;
|
|
40
|
+
newPublicKey: PublicKey;
|
|
41
|
+
}) {
|
|
42
|
+
super();
|
|
43
|
+
this.sequenceNumber = new U64(args.sequenceNumber);
|
|
44
|
+
this.originator = args.originator;
|
|
45
|
+
this.currentAuthKey = args.currentAuthKey;
|
|
46
|
+
this.newPublicKey = MoveVector.U8(args.newPublicKey.toUint8Array());
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
serialize(serializer: Serializer): void {
|
|
50
|
+
serializer.serialize(this.accountAddress);
|
|
51
|
+
serializer.serialize(this.moduleName);
|
|
52
|
+
serializer.serialize(this.structName);
|
|
53
|
+
serializer.serialize(this.sequenceNumber);
|
|
54
|
+
serializer.serialize(this.originator);
|
|
55
|
+
serializer.serialize(this.currentAuthKey);
|
|
56
|
+
serializer.serialize(this.newPublicKey);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -84,7 +84,11 @@ export function throwTypeMismatch(expectedType: string, position: number) {
|
|
|
84
84
|
* @param functionAbi
|
|
85
85
|
*/
|
|
86
86
|
export function findFirstNonSignerArg(functionAbi: MoveFunction): number {
|
|
87
|
-
|
|
87
|
+
const index = functionAbi.params.findIndex((param) => param !== "signer" && param !== "&signer");
|
|
88
|
+
if (index < 0) {
|
|
89
|
+
return functionAbi.params.length;
|
|
90
|
+
}
|
|
91
|
+
return index;
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
export function getFunctionParts(functionArg: MoveStructType) {
|
|
@@ -74,7 +74,7 @@ export async function fetchEntryFunctionAbi(
|
|
|
74
74
|
|
|
75
75
|
// Remove the signer arguments
|
|
76
76
|
const first = findFirstNonSignerArg(functionAbi);
|
|
77
|
-
const params = [];
|
|
77
|
+
const params: TypeTag[] = [];
|
|
78
78
|
for (let i = first; i < functionAbi.params.length; i += 1) {
|
|
79
79
|
params.push(parseTypeTag(functionAbi.params[i], { allowGenerics: true }));
|
|
80
80
|
}
|
|
@@ -150,7 +150,7 @@ function parseArg(
|
|
|
150
150
|
// TODO: support uint8array?
|
|
151
151
|
if (param.isAddress()) {
|
|
152
152
|
if (isString(arg)) {
|
|
153
|
-
return AccountAddress.
|
|
153
|
+
return AccountAddress.fromStringRelaxed(arg);
|
|
154
154
|
}
|
|
155
155
|
throwTypeMismatch("string", position);
|
|
156
156
|
}
|
|
@@ -227,7 +227,7 @@ function parseArg(
|
|
|
227
227
|
if (param.isObject()) {
|
|
228
228
|
// The inner type of Object doesn't matter, since it's just syntactic sugar
|
|
229
229
|
if (isString(arg)) {
|
|
230
|
-
return AccountAddress.
|
|
230
|
+
return AccountAddress.fromStringRelaxed(arg);
|
|
231
231
|
}
|
|
232
232
|
throwTypeMismatch("string", position);
|
|
233
233
|
}
|
|
@@ -239,7 +239,7 @@ function parseArg(
|
|
|
239
239
|
return new MoveOption<U8>(null);
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
return new MoveOption(parseArg(arg, param.value.
|
|
242
|
+
return new MoveOption(parseArg(arg, param.value.typeArgs[0], position, genericTypeParams));
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
throw new Error(`Unsupported struct input type for argument ${position}, type '${param.toString()}'`);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { sha3_256 as sha3Hash } from "@noble/hashes/sha3";
|
|
10
10
|
import { AptosConfig } from "../../api/aptosConfig";
|
|
11
11
|
import { Deserializer } from "../../bcs/deserializer";
|
|
12
|
-
import { AccountAddress, Hex, PublicKey } from "../../core";
|
|
12
|
+
import { AccountAddress, AccountAddressInput, Hex, PublicKey } from "../../core";
|
|
13
13
|
import { Account } from "../../core/account";
|
|
14
14
|
import { AnyPublicKey } from "../../core/crypto/anyPublicKey";
|
|
15
15
|
import { AnySignature } from "../../core/crypto/anySignature";
|
|
@@ -52,31 +52,32 @@ import {
|
|
|
52
52
|
} from "../instances";
|
|
53
53
|
import { SignedTransaction } from "../instances/signedTransaction";
|
|
54
54
|
import {
|
|
55
|
-
|
|
55
|
+
AnyRawTransaction,
|
|
56
56
|
AnyTransactionPayloadInstance,
|
|
57
57
|
AnyRawTransactionInstance,
|
|
58
|
+
EntryFunctionArgumentTypes,
|
|
59
|
+
EntryFunctionABI,
|
|
58
60
|
InputGenerateFeePayerRawTransactionArgs,
|
|
59
61
|
InputGenerateMultiAgentRawTransactionArgs,
|
|
60
62
|
InputGenerateRawTransactionArgs,
|
|
61
63
|
InputGenerateSingleSignerRawTransactionArgs,
|
|
62
64
|
InputSingleSignerTransaction,
|
|
63
|
-
|
|
65
|
+
InputGenerateTransactionOptions,
|
|
64
66
|
InputFeePayerTransaction,
|
|
65
67
|
InputMultiAgentTransaction,
|
|
66
68
|
InputScriptData,
|
|
67
69
|
InputSimulateTransactionData,
|
|
68
|
-
EntryFunctionArgumentTypes,
|
|
69
|
-
EntryFunctionABI,
|
|
70
70
|
InputGenerateTransactionPayloadData,
|
|
71
71
|
InputEntryFunctionData,
|
|
72
72
|
InputMultiSigData,
|
|
73
73
|
InputMultiSigDataWithRemoteABI,
|
|
74
74
|
InputEntryFunctionDataWithRemoteABI,
|
|
75
75
|
InputGenerateTransactionPayloadDataWithRemoteABI,
|
|
76
|
+
InputSubmitTransactionData,
|
|
76
77
|
} from "../types";
|
|
77
78
|
import { convertArgument, fetchEntryFunctionAbi, standardizeTypeTags } from "./remoteAbi";
|
|
78
79
|
import { memoizeAsync } from "../../utils/memoize";
|
|
79
|
-
import {
|
|
80
|
+
import { SigningScheme } from "../../types";
|
|
80
81
|
import { getFunctionParts, isScriptDataInput } from "./helpers";
|
|
81
82
|
|
|
82
83
|
/**
|
|
@@ -135,10 +136,6 @@ export function generateTransactionPayloadWithABI(
|
|
|
135
136
|
args: InputMultiSigData,
|
|
136
137
|
functionAbi: EntryFunctionABI,
|
|
137
138
|
): TransactionPayloadMultisig;
|
|
138
|
-
export function generateTransactionPayloadWithABI(
|
|
139
|
-
args: InputGenerateTransactionPayloadData,
|
|
140
|
-
functionAbi: EntryFunctionABI,
|
|
141
|
-
): AnyTransactionPayloadInstance;
|
|
142
139
|
export function generateTransactionPayloadWithABI(
|
|
143
140
|
args: InputGenerateTransactionPayloadData,
|
|
144
141
|
functionAbi: EntryFunctionABI,
|
|
@@ -184,7 +181,7 @@ export function generateTransactionPayloadWithABI(
|
|
|
184
181
|
if ("multisigAddress" in args) {
|
|
185
182
|
let multisigAddress: AccountAddress;
|
|
186
183
|
if (typeof args.multisigAddress === "string") {
|
|
187
|
-
multisigAddress = AccountAddress.
|
|
184
|
+
multisigAddress = AccountAddress.from(args.multisigAddress);
|
|
188
185
|
} else {
|
|
189
186
|
multisigAddress = args.multisigAddress;
|
|
190
187
|
}
|
|
@@ -214,7 +211,7 @@ function generateTransactionPayloadScript(args: InputScriptData) {
|
|
|
214
211
|
*/
|
|
215
212
|
export async function generateRawTransaction(args: {
|
|
216
213
|
aptosConfig: AptosConfig;
|
|
217
|
-
sender:
|
|
214
|
+
sender: AccountAddressInput;
|
|
218
215
|
payload: AnyTransactionPayloadInstance;
|
|
219
216
|
options?: InputGenerateTransactionOptions;
|
|
220
217
|
}): Promise<RawTransaction> {
|
|
@@ -244,7 +241,7 @@ export async function generateRawTransaction(args: {
|
|
|
244
241
|
};
|
|
245
242
|
|
|
246
243
|
return new RawTransaction(
|
|
247
|
-
AccountAddress.
|
|
244
|
+
AccountAddress.fromRelaxed(sender),
|
|
248
245
|
BigInt(sequenceNumber),
|
|
249
246
|
payload,
|
|
250
247
|
BigInt(maxGasAmount),
|
|
@@ -283,10 +280,10 @@ export async function buildTransaction(args: InputGenerateRawTransactionArgs): P
|
|
|
283
280
|
* @param args.secondarySignerAddresses optional. For when want to create a multi signers transaction
|
|
284
281
|
* @param args.feePayerAddress optional. For when want to create a fee payer (aka sponsored) transaction
|
|
285
282
|
*
|
|
286
|
-
* @return An
|
|
283
|
+
* @return An instance of a RawTransaction, plus optional secondary/fee payer addresses
|
|
287
284
|
* ```
|
|
288
285
|
* {
|
|
289
|
-
* rawTransaction:
|
|
286
|
+
* rawTransaction: RawTransaction,
|
|
290
287
|
* secondarySignerAddresses? : Array<AccountAddress>,
|
|
291
288
|
* feePayerAddress?: AccountAddress
|
|
292
289
|
* }
|
|
@@ -304,28 +301,26 @@ export async function buildTransaction(args: InputGenerateRawTransactionArgs): P
|
|
|
304
301
|
|
|
305
302
|
if (feePayerAddress) {
|
|
306
303
|
const signers: Array<AccountAddress> = secondarySignerAddresses
|
|
307
|
-
? secondarySignerAddresses.map((signer) => AccountAddress.
|
|
304
|
+
? secondarySignerAddresses.map((signer) => AccountAddress.fromRelaxed(signer))
|
|
308
305
|
: [];
|
|
309
306
|
|
|
310
307
|
return {
|
|
311
|
-
rawTransaction: rawTxn
|
|
308
|
+
rawTransaction: rawTxn,
|
|
312
309
|
secondarySignerAddresses: signers,
|
|
313
|
-
feePayerAddress: AccountAddress.
|
|
310
|
+
feePayerAddress: AccountAddress.fromRelaxed(feePayerAddress),
|
|
314
311
|
};
|
|
315
312
|
}
|
|
316
313
|
|
|
317
314
|
if (secondarySignerAddresses) {
|
|
318
|
-
const signers: Array<AccountAddress> = secondarySignerAddresses.map((signer) =>
|
|
319
|
-
AccountAddress.fromHexInput(signer),
|
|
320
|
-
);
|
|
315
|
+
const signers: Array<AccountAddress> = secondarySignerAddresses.map((signer) => AccountAddress.fromRelaxed(signer));
|
|
321
316
|
|
|
322
317
|
return {
|
|
323
|
-
rawTransaction: rawTxn
|
|
318
|
+
rawTransaction: rawTxn,
|
|
324
319
|
secondarySignerAddresses: signers,
|
|
325
320
|
};
|
|
326
321
|
}
|
|
327
322
|
// return the raw transaction
|
|
328
|
-
return { rawTransaction: rawTxn
|
|
323
|
+
return { rawTransaction: rawTxn };
|
|
329
324
|
}
|
|
330
325
|
|
|
331
326
|
/**
|
|
@@ -342,7 +337,7 @@ export async function buildTransaction(args: InputGenerateRawTransactionArgs): P
|
|
|
342
337
|
export function generateSignedTransactionForSimulation(args: InputSimulateTransactionData): Uint8Array {
|
|
343
338
|
const { signerPublicKey, transaction, secondarySignersPublicKeys, feePayerPublicKey } = args;
|
|
344
339
|
|
|
345
|
-
const deserializer = new Deserializer(transaction.rawTransaction);
|
|
340
|
+
const deserializer = new Deserializer(transaction.rawTransaction.bcsToBytes());
|
|
346
341
|
const deserializedTransaction = RawTransaction.deserialize(deserializer);
|
|
347
342
|
|
|
348
343
|
const accountAuthenticator = getAuthenticatorForSimulation(signerPublicKey);
|
|
@@ -474,23 +469,17 @@ export function sign(args: { signer: Account; transaction: AnyRawTransaction }):
|
|
|
474
469
|
*
|
|
475
470
|
* @returns A SignedTransaction
|
|
476
471
|
*/
|
|
477
|
-
export function generateSignedTransaction(args: {
|
|
478
|
-
transaction
|
|
479
|
-
senderAuthenticator: AccountAuthenticator;
|
|
480
|
-
secondarySignerAuthenticators?: {
|
|
481
|
-
feePayerAuthenticator?: AccountAuthenticator;
|
|
482
|
-
additionalSignersAuthenticators?: Array<AccountAuthenticator>;
|
|
483
|
-
};
|
|
484
|
-
}): Uint8Array {
|
|
485
|
-
const { transaction, senderAuthenticator, secondarySignerAuthenticators } = args;
|
|
472
|
+
export function generateSignedTransaction(args: InputSubmitTransactionData): Uint8Array {
|
|
473
|
+
const { transaction, senderAuthenticator, feePayerAuthenticator, additionalSignersAuthenticators } = args;
|
|
486
474
|
|
|
487
475
|
const transactionToSubmit = deriveTransactionType(transaction);
|
|
488
476
|
|
|
489
|
-
if (
|
|
477
|
+
if (feePayerAuthenticator || additionalSignersAuthenticators) {
|
|
490
478
|
return generateMultiSignersSignedTransaction(
|
|
491
479
|
transactionToSubmit as MultiAgentRawTransaction | FeePayerRawTransaction,
|
|
492
480
|
senderAuthenticator,
|
|
493
|
-
|
|
481
|
+
feePayerAuthenticator,
|
|
482
|
+
additionalSignersAuthenticators,
|
|
494
483
|
);
|
|
495
484
|
}
|
|
496
485
|
|
|
@@ -526,21 +515,18 @@ export function generateSignedTransaction(args: {
|
|
|
526
515
|
* @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
|
|
527
516
|
*/
|
|
528
517
|
export function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance {
|
|
529
|
-
const deserializer = new Deserializer(transaction.rawTransaction);
|
|
530
|
-
const deserializedTransaction = RawTransaction.deserialize(deserializer);
|
|
531
|
-
|
|
532
518
|
if (transaction.feePayerAddress) {
|
|
533
519
|
return new FeePayerRawTransaction(
|
|
534
|
-
|
|
520
|
+
transaction.rawTransaction,
|
|
535
521
|
transaction.secondarySignerAddresses ?? [],
|
|
536
522
|
transaction.feePayerAddress,
|
|
537
523
|
);
|
|
538
524
|
}
|
|
539
525
|
if (transaction.secondarySignerAddresses) {
|
|
540
|
-
return new MultiAgentRawTransaction(
|
|
526
|
+
return new MultiAgentRawTransaction(transaction.rawTransaction, transaction.secondarySignerAddresses);
|
|
541
527
|
}
|
|
542
528
|
|
|
543
|
-
return
|
|
529
|
+
return transaction.rawTransaction as RawTransaction;
|
|
544
530
|
}
|
|
545
531
|
|
|
546
532
|
/**
|
|
@@ -555,16 +541,13 @@ export function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTra
|
|
|
555
541
|
export function generateMultiSignersSignedTransaction(
|
|
556
542
|
transaction: MultiAgentRawTransaction | FeePayerRawTransaction,
|
|
557
543
|
senderAuthenticator: AccountAuthenticator,
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
additionalSignersAuthenticators?: Array<AccountAuthenticator>;
|
|
561
|
-
},
|
|
544
|
+
feePayerAuthenticator?: AccountAuthenticator,
|
|
545
|
+
additionalSignersAuthenticators?: Array<AccountAuthenticator>,
|
|
562
546
|
) {
|
|
563
547
|
if (transaction instanceof FeePayerRawTransaction) {
|
|
564
|
-
if (!
|
|
548
|
+
if (!feePayerAuthenticator) {
|
|
565
549
|
throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");
|
|
566
550
|
}
|
|
567
|
-
const { feePayerAuthenticator, additionalSignersAuthenticators } = secondarySignerAuthenticators;
|
|
568
551
|
const txAuthenticatorFeePayer = new TransactionAuthenticatorFeePayer(
|
|
569
552
|
senderAuthenticator,
|
|
570
553
|
transaction.secondary_signer_addresses,
|
|
@@ -577,12 +560,11 @@ export function generateMultiSignersSignedTransaction(
|
|
|
577
560
|
return new SignedTransaction(transaction.raw_txn, txAuthenticatorFeePayer).bcsToBytes();
|
|
578
561
|
}
|
|
579
562
|
if (transaction instanceof MultiAgentRawTransaction) {
|
|
580
|
-
if (!
|
|
563
|
+
if (!additionalSignersAuthenticators) {
|
|
581
564
|
throw new Error(
|
|
582
565
|
"Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction",
|
|
583
566
|
);
|
|
584
567
|
}
|
|
585
|
-
const { additionalSignersAuthenticators } = secondarySignerAuthenticators;
|
|
586
568
|
const multiAgentAuthenticator = new TransactionAuthenticatorMultiAgent(
|
|
587
569
|
senderAuthenticator,
|
|
588
570
|
transaction.secondary_signer_addresses,
|
|
@@ -291,11 +291,11 @@ export class TypeTagStruct extends TypeTag {
|
|
|
291
291
|
toString(): `0x${string}::${string}::${string}` {
|
|
292
292
|
// Collect type args and add it if there are any
|
|
293
293
|
let typePredicate = "";
|
|
294
|
-
if (this.value.
|
|
295
|
-
typePredicate = `<${this.value.
|
|
294
|
+
if (this.value.typeArgs.length > 0) {
|
|
295
|
+
typePredicate = `<${this.value.typeArgs.map((typeArg) => typeArg.toString()).join(", ")}>`;
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
return `${this.value.address.toString()}::${this.value.
|
|
298
|
+
return `${this.value.address.toString()}::${this.value.moduleName.identifier}::${
|
|
299
299
|
this.value.name.identifier
|
|
300
300
|
}${typePredicate}`;
|
|
301
301
|
}
|
|
@@ -316,7 +316,7 @@ export class TypeTagStruct extends TypeTag {
|
|
|
316
316
|
|
|
317
317
|
isTypeTag(address: AccountAddress, moduleName: string, structName: string): boolean {
|
|
318
318
|
return (
|
|
319
|
-
this.value.
|
|
319
|
+
this.value.moduleName.identifier === moduleName &&
|
|
320
320
|
this.value.name.identifier === structName &&
|
|
321
321
|
this.value.address.equals(address)
|
|
322
322
|
);
|
|
@@ -338,25 +338,25 @@ export class TypeTagStruct extends TypeTag {
|
|
|
338
338
|
export class StructTag extends Serializable {
|
|
339
339
|
public readonly address: AccountAddress;
|
|
340
340
|
|
|
341
|
-
public readonly
|
|
341
|
+
public readonly moduleName: Identifier;
|
|
342
342
|
|
|
343
343
|
public readonly name: Identifier;
|
|
344
344
|
|
|
345
|
-
public readonly
|
|
345
|
+
public readonly typeArgs: Array<TypeTag>;
|
|
346
346
|
|
|
347
347
|
constructor(address: AccountAddress, module_name: Identifier, name: Identifier, type_args: Array<TypeTag>) {
|
|
348
348
|
super();
|
|
349
349
|
this.address = address;
|
|
350
|
-
this.
|
|
350
|
+
this.moduleName = module_name;
|
|
351
351
|
this.name = name;
|
|
352
|
-
this.
|
|
352
|
+
this.typeArgs = type_args;
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
serialize(serializer: Serializer): void {
|
|
356
356
|
serializer.serialize(this.address);
|
|
357
|
-
serializer.serialize(this.
|
|
357
|
+
serializer.serialize(this.moduleName);
|
|
358
358
|
serializer.serialize(this.name);
|
|
359
|
-
serializer.serializeVector(this.
|
|
359
|
+
serializer.serializeVector(this.typeArgs);
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
static deserialize(deserializer: Deserializer): StructTag {
|
|
@@ -288,7 +288,7 @@ function parseTypeTagInner(str: string, types: Array<TypeTag>, allowGenerics: bo
|
|
|
288
288
|
|
|
289
289
|
return new TypeTagStruct(
|
|
290
290
|
new StructTag(
|
|
291
|
-
AccountAddress.
|
|
291
|
+
AccountAddress.fromStringRelaxed(structParts[0]),
|
|
292
292
|
new Identifier(structParts[1]),
|
|
293
293
|
new Identifier(structParts[2]),
|
|
294
294
|
types,
|
|
@@ -5,7 +5,7 @@ import { AptosConfig } from "../api/aptosConfig";
|
|
|
5
5
|
import { MoveOption, MoveString, MoveVector } from "../bcs/serializable/moveStructs";
|
|
6
6
|
import { Bool, U128, U16, U256, U32, U64, U8 } from "../bcs/serializable/movePrimitives";
|
|
7
7
|
import { FixedBytes } from "../bcs/serializable/fixedBytes";
|
|
8
|
-
import { AccountAddress } from "../core";
|
|
8
|
+
import { AccountAddress, AccountAddressInput } from "../core";
|
|
9
9
|
import { PublicKey } from "../core/crypto/asymmetricCrypto";
|
|
10
10
|
import {
|
|
11
11
|
MultiAgentRawTransaction,
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from "./instances";
|
|
18
18
|
import { AnyNumber, HexInput, MoveFunctionGenericTypeParam, MoveStructType } from "../types";
|
|
19
19
|
import { TypeTag } from "./typeTag";
|
|
20
|
+
import { AccountAuthenticator } from "./authenticator/account";
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* Entry function arguments to be used when building a raw transaction using remote ABI
|
|
@@ -105,7 +106,7 @@ export type InputGenerateTransactionPayloadDataWithRemoteABI =
|
|
|
105
106
|
*/
|
|
106
107
|
export type InputEntryFunctionData = {
|
|
107
108
|
function: MoveStructType;
|
|
108
|
-
typeArguments?: Array<TypeTag>;
|
|
109
|
+
typeArguments?: Array<TypeTag | string>;
|
|
109
110
|
functionArguments: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
110
111
|
};
|
|
111
112
|
|
|
@@ -121,7 +122,7 @@ export type InputMultiSigData = {
|
|
|
121
122
|
* The data needed to generate a Multi Sig payload
|
|
122
123
|
*/
|
|
123
124
|
export type InputMultiSigDataWithRemoteABI = {
|
|
124
|
-
multisigAddress:
|
|
125
|
+
multisigAddress: AccountAddressInput;
|
|
125
126
|
} & InputEntryFunctionDataWithRemoteABI;
|
|
126
127
|
|
|
127
128
|
/**
|
|
@@ -149,7 +150,7 @@ export type EntryFunctionABI = {
|
|
|
149
150
|
*/
|
|
150
151
|
export interface InputGenerateSingleSignerRawTransactionArgs {
|
|
151
152
|
aptosConfig: AptosConfig;
|
|
152
|
-
sender:
|
|
153
|
+
sender: AccountAddressInput;
|
|
153
154
|
payload: AnyTransactionPayloadInstance;
|
|
154
155
|
feePayerAddress?: undefined;
|
|
155
156
|
secondarySignerAddresses?: undefined;
|
|
@@ -162,10 +163,10 @@ export interface InputGenerateSingleSignerRawTransactionArgs {
|
|
|
162
163
|
*/
|
|
163
164
|
export interface InputGenerateFeePayerRawTransactionArgs {
|
|
164
165
|
aptosConfig: AptosConfig;
|
|
165
|
-
sender:
|
|
166
|
+
sender: AccountAddressInput;
|
|
166
167
|
payload: AnyTransactionPayloadInstance;
|
|
167
|
-
feePayerAddress:
|
|
168
|
-
secondarySignerAddresses?:
|
|
168
|
+
feePayerAddress: AccountAddressInput;
|
|
169
|
+
secondarySignerAddresses?: AccountAddressInput[];
|
|
169
170
|
options?: InputGenerateTransactionOptions;
|
|
170
171
|
}
|
|
171
172
|
|
|
@@ -175,9 +176,9 @@ export interface InputGenerateFeePayerRawTransactionArgs {
|
|
|
175
176
|
*/
|
|
176
177
|
export interface InputGenerateMultiAgentRawTransactionArgs {
|
|
177
178
|
aptosConfig: AptosConfig;
|
|
178
|
-
sender:
|
|
179
|
+
sender: AccountAddressInput;
|
|
179
180
|
payload: AnyTransactionPayloadInstance;
|
|
180
|
-
secondarySignerAddresses:
|
|
181
|
+
secondarySignerAddresses: AccountAddressInput[];
|
|
181
182
|
feePayerAddress?: undefined;
|
|
182
183
|
options?: InputGenerateTransactionOptions;
|
|
183
184
|
}
|
|
@@ -196,7 +197,7 @@ export type InputGenerateRawTransactionArgs =
|
|
|
196
197
|
* @param rawTransaction a bcs serialized raw transaction
|
|
197
198
|
*/
|
|
198
199
|
export interface InputSingleSignerTransaction {
|
|
199
|
-
rawTransaction:
|
|
200
|
+
rawTransaction: RawTransaction;
|
|
200
201
|
feePayerAddress?: undefined;
|
|
201
202
|
secondarySignerAddresses?: undefined;
|
|
202
203
|
}
|
|
@@ -209,7 +210,7 @@ export interface InputSingleSignerTransaction {
|
|
|
209
210
|
* @param feePayerAddress fee payer address for a fee payer transaction (aka Sponsored Transaction)
|
|
210
211
|
*/
|
|
211
212
|
export interface InputFeePayerTransaction {
|
|
212
|
-
rawTransaction:
|
|
213
|
+
rawTransaction: RawTransaction;
|
|
213
214
|
feePayerAddress: AccountAddress;
|
|
214
215
|
secondarySignerAddresses?: AccountAddress[];
|
|
215
216
|
}
|
|
@@ -221,7 +222,7 @@ export interface InputFeePayerTransaction {
|
|
|
221
222
|
* @param secondarySignerAddresses secondary signer addresses for multi-agent transaction
|
|
222
223
|
*/
|
|
223
224
|
export interface InputMultiAgentTransaction {
|
|
224
|
-
rawTransaction:
|
|
225
|
+
rawTransaction: RawTransaction;
|
|
225
226
|
secondarySignerAddresses: AccountAddress[];
|
|
226
227
|
feePayerAddress?: undefined;
|
|
227
228
|
}
|
|
@@ -265,8 +266,8 @@ export type InputSimulateTransactionOptions = {
|
|
|
265
266
|
* Interface that holds the user data input when generating a single signer transaction
|
|
266
267
|
*/
|
|
267
268
|
export interface InputGenerateSingleSignerRawTransactionData {
|
|
268
|
-
sender:
|
|
269
|
-
|
|
269
|
+
sender: AccountAddressInput;
|
|
270
|
+
hasFeePayer?: undefined;
|
|
270
271
|
secondarySignerAddresses?: undefined;
|
|
271
272
|
options?: InputGenerateTransactionOptions;
|
|
272
273
|
data: InputGenerateTransactionPayloadData;
|
|
@@ -276,9 +277,9 @@ export interface InputGenerateSingleSignerRawTransactionData {
|
|
|
276
277
|
* Interface that holds the user data input when generating a fee payer transaction
|
|
277
278
|
*/
|
|
278
279
|
export interface InputGenerateFeePayerRawTransactionData {
|
|
279
|
-
sender:
|
|
280
|
-
|
|
281
|
-
secondarySignerAddresses?:
|
|
280
|
+
sender: AccountAddressInput;
|
|
281
|
+
hasFeePayer: true;
|
|
282
|
+
secondarySignerAddresses?: AccountAddressInput[];
|
|
282
283
|
options?: InputGenerateTransactionOptions;
|
|
283
284
|
data: InputGenerateTransactionPayloadData;
|
|
284
285
|
}
|
|
@@ -287,9 +288,9 @@ export interface InputGenerateFeePayerRawTransactionData {
|
|
|
287
288
|
* Interface that holds the user data input when generating a multi-agent transaction
|
|
288
289
|
*/
|
|
289
290
|
export interface InputGenerateMultiAgentRawTransactionData {
|
|
290
|
-
sender:
|
|
291
|
-
secondarySignerAddresses:
|
|
292
|
-
|
|
291
|
+
sender: AccountAddressInput;
|
|
292
|
+
secondarySignerAddresses: AccountAddressInput[];
|
|
293
|
+
hasFeePayer?: undefined;
|
|
293
294
|
options?: InputGenerateTransactionOptions;
|
|
294
295
|
data: InputGenerateTransactionPayloadData;
|
|
295
296
|
}
|
|
@@ -301,3 +302,13 @@ export type InputGenerateTransactionData =
|
|
|
301
302
|
| InputGenerateMultiAgentRawTransactionData
|
|
302
303
|
| InputGenerateFeePayerRawTransactionData
|
|
303
304
|
| InputGenerateSingleSignerRawTransactionData;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Interface that holds the user data input when submitting a transaction
|
|
308
|
+
*/
|
|
309
|
+
export interface InputSubmitTransactionData {
|
|
310
|
+
transaction: AnyRawTransaction;
|
|
311
|
+
senderAuthenticator: AccountAuthenticator;
|
|
312
|
+
feePayerAuthenticator?: AccountAuthenticator;
|
|
313
|
+
additionalSignersAuthenticators?: Array<AccountAuthenticator>;
|
|
314
|
+
}
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import * as Types from "./types";
|
|
2
2
|
|
|
3
|
+
export type TokenActivitiesFieldsFragment = {
|
|
4
|
+
after_value?: string | null;
|
|
5
|
+
before_value?: string | null;
|
|
6
|
+
entry_function_id_str?: string | null;
|
|
7
|
+
event_account_address: string;
|
|
8
|
+
event_index: any;
|
|
9
|
+
from_address?: string | null;
|
|
10
|
+
is_fungible_v2?: boolean | null;
|
|
11
|
+
property_version_v1: any;
|
|
12
|
+
to_address?: string | null;
|
|
13
|
+
token_amount: any;
|
|
14
|
+
token_data_id: string;
|
|
15
|
+
token_standard: string;
|
|
16
|
+
transaction_timestamp: any;
|
|
17
|
+
transaction_version: any;
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
3
21
|
export type CurrentTokenOwnershipFieldsFragment = {
|
|
4
22
|
token_standard: string;
|
|
5
23
|
token_properties_mutated_v1?: any | null;
|
|
@@ -46,24 +64,6 @@ export type CurrentTokenOwnershipFieldsFragment = {
|
|
|
46
64
|
} | null;
|
|
47
65
|
};
|
|
48
66
|
|
|
49
|
-
export type TokenActivitiesFieldsFragment = {
|
|
50
|
-
after_value?: string | null;
|
|
51
|
-
before_value?: string | null;
|
|
52
|
-
entry_function_id_str?: string | null;
|
|
53
|
-
event_account_address: string;
|
|
54
|
-
event_index: any;
|
|
55
|
-
from_address?: string | null;
|
|
56
|
-
is_fungible_v2?: boolean | null;
|
|
57
|
-
property_version_v1: any;
|
|
58
|
-
to_address?: string | null;
|
|
59
|
-
token_amount: any;
|
|
60
|
-
token_data_id: string;
|
|
61
|
-
token_standard: string;
|
|
62
|
-
transaction_timestamp: any;
|
|
63
|
-
transaction_version: any;
|
|
64
|
-
type: string;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
67
|
export type GetAccountCoinsCountQueryVariables = Types.Exact<{
|
|
68
68
|
address?: Types.InputMaybe<Types.Scalars["String"]>;
|
|
69
69
|
}>;
|
|
@@ -431,6 +431,7 @@ export type GetEventsQuery = {
|
|
|
431
431
|
transaction_block_height: any;
|
|
432
432
|
transaction_version: any;
|
|
433
433
|
type: string;
|
|
434
|
+
indexed_type: string;
|
|
434
435
|
}>;
|
|
435
436
|
};
|
|
436
437
|
|
|
@@ -2,6 +2,25 @@ import * as Types from "./operations";
|
|
|
2
2
|
|
|
3
3
|
import { GraphQLClient } from "graphql-request";
|
|
4
4
|
import * as Dom from "graphql-request/dist/types.dom";
|
|
5
|
+
export const TokenActivitiesFieldsFragmentDoc = `
|
|
6
|
+
fragment TokenActivitiesFields on token_activities_v2 {
|
|
7
|
+
after_value
|
|
8
|
+
before_value
|
|
9
|
+
entry_function_id_str
|
|
10
|
+
event_account_address
|
|
11
|
+
event_index
|
|
12
|
+
from_address
|
|
13
|
+
is_fungible_v2
|
|
14
|
+
property_version_v1
|
|
15
|
+
to_address
|
|
16
|
+
token_amount
|
|
17
|
+
token_data_id
|
|
18
|
+
token_standard
|
|
19
|
+
transaction_timestamp
|
|
20
|
+
transaction_version
|
|
21
|
+
type
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
5
24
|
export const CurrentTokenOwnershipFieldsFragmentDoc = `
|
|
6
25
|
fragment CurrentTokenOwnershipFields on current_token_ownerships_v2 {
|
|
7
26
|
token_standard
|
|
@@ -49,25 +68,6 @@ export const CurrentTokenOwnershipFieldsFragmentDoc = `
|
|
|
49
68
|
}
|
|
50
69
|
}
|
|
51
70
|
`;
|
|
52
|
-
export const TokenActivitiesFieldsFragmentDoc = `
|
|
53
|
-
fragment TokenActivitiesFields on token_activities_v2 {
|
|
54
|
-
after_value
|
|
55
|
-
before_value
|
|
56
|
-
entry_function_id_str
|
|
57
|
-
event_account_address
|
|
58
|
-
event_index
|
|
59
|
-
from_address
|
|
60
|
-
is_fungible_v2
|
|
61
|
-
property_version_v1
|
|
62
|
-
to_address
|
|
63
|
-
token_amount
|
|
64
|
-
token_data_id
|
|
65
|
-
token_standard
|
|
66
|
-
transaction_timestamp
|
|
67
|
-
transaction_version
|
|
68
|
-
type
|
|
69
|
-
}
|
|
70
|
-
`;
|
|
71
71
|
export const GetAccountCoinsCount = `
|
|
72
72
|
query getAccountCoinsCount($address: String) {
|
|
73
73
|
current_fungible_asset_balances_aggregate(
|
|
@@ -300,6 +300,7 @@ export const GetEvents = `
|
|
|
300
300
|
transaction_block_height
|
|
301
301
|
transaction_version
|
|
302
302
|
type
|
|
303
|
+
indexed_type
|
|
303
304
|
}
|
|
304
305
|
}
|
|
305
306
|
`;
|