@aptos-labs/ts-sdk 0.0.4 → 0.0.6
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 +3 -3
- package/dist/{cjs → browser}/index.d.ts +357 -297
- package/dist/browser/index.global.js +72 -47
- package/dist/browser/index.global.js.map +1 -1
- package/dist/{esm → common}/index.d.ts +357 -297
- package/dist/common/index.js +406 -0
- package/dist/common/index.js.map +1 -0
- package/dist/esm/api/account.d.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +192 -0
- package/dist/esm/bcs/serializer.mjs +2 -0
- package/dist/esm/bcs/serializer.mjs.map +1 -0
- package/dist/esm/chunk-2W744GUN.mjs +2 -0
- package/dist/esm/chunk-2W744GUN.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-3JVGSFHP.mjs +2 -0
- package/dist/esm/chunk-3JVGSFHP.mjs.map +1 -0
- package/dist/esm/chunk-44MGBJ73.mjs +2 -0
- package/dist/esm/chunk-44MGBJ73.mjs.map +1 -0
- package/dist/esm/chunk-4ADA5BE7.mjs +2 -0
- package/dist/esm/chunk-4ADA5BE7.mjs.map +1 -0
- package/dist/esm/chunk-4RVIA63I.mjs +2 -0
- package/dist/esm/chunk-4RVIA63I.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-62SCW5NH.mjs +2 -0
- package/dist/esm/chunk-62SCW5NH.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-7MNEEVXY.mjs +2 -0
- package/dist/esm/chunk-7MNEEVXY.mjs.map +1 -0
- package/dist/esm/chunk-AAIBCWZY.mjs +2 -0
- package/dist/esm/chunk-AAIBCWZY.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-ARVSIDVB.mjs +2 -0
- package/dist/esm/chunk-ARVSIDVB.mjs.map +1 -0
- package/dist/esm/chunk-BFSEVKNA.mjs +2 -0
- package/dist/esm/chunk-BFSEVKNA.mjs.map +1 -0
- package/dist/esm/chunk-BP5ZO7NK.mjs +2 -0
- package/dist/esm/chunk-BP5ZO7NK.mjs.map +1 -0
- package/dist/esm/chunk-BPYLPPEQ.mjs +2 -0
- package/dist/esm/chunk-BPYLPPEQ.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-BV4OOU5Y.mjs +2 -0
- package/dist/esm/chunk-BV4OOU5Y.mjs.map +1 -0
- package/dist/esm/chunk-BWMNPUTK.mjs +2 -0
- package/dist/esm/chunk-BWMNPUTK.mjs.map +1 -0
- package/dist/esm/chunk-CYDWEPFL.mjs +1 -0
- package/dist/esm/chunk-CYDWEPFL.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-E7FWVXGX.mjs +1 -0
- package/dist/esm/chunk-E7FWVXGX.mjs.map +1 -0
- package/dist/esm/chunk-EFIYW4WK.mjs +2 -0
- package/dist/esm/chunk-EFIYW4WK.mjs.map +1 -0
- package/dist/esm/chunk-EGOYLZBU.mjs +2 -0
- package/dist/esm/chunk-EGOYLZBU.mjs.map +1 -0
- package/dist/esm/chunk-EQ5BEDJ7.mjs +2 -0
- package/dist/esm/chunk-EQ5BEDJ7.mjs.map +1 -0
- package/dist/esm/chunk-EWTHPMEE.mjs +2 -0
- package/dist/esm/chunk-EWTHPMEE.mjs.map +1 -0
- package/dist/esm/chunk-EYXHVA6W.mjs +2 -0
- package/dist/esm/chunk-EYXHVA6W.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-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-GEFQFRL3.mjs +2 -0
- package/dist/esm/chunk-GEFQFRL3.mjs.map +1 -0
- package/dist/esm/chunk-GTC7WHMV.mjs +2 -0
- package/dist/esm/chunk-GTC7WHMV.mjs.map +1 -0
- package/dist/esm/chunk-HA6JD5R6.mjs +2 -0
- package/dist/esm/chunk-HA6JD5R6.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-HVADSXTB.mjs +2 -0
- package/dist/esm/chunk-HVADSXTB.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-IG5CHHSI.mjs +2 -0
- package/dist/esm/chunk-IG5CHHSI.mjs.map +1 -0
- package/dist/esm/chunk-IXMB2GOK.mjs +2 -0
- package/dist/esm/chunk-IXMB2GOK.mjs.map +1 -0
- package/dist/esm/chunk-J5ZFOJN2.mjs +2 -0
- package/dist/esm/chunk-J5ZFOJN2.mjs.map +1 -0
- package/dist/esm/chunk-JDS7K2WI.mjs +2 -0
- package/dist/esm/chunk-JDS7K2WI.mjs.map +1 -0
- package/dist/esm/chunk-JZNLZMUC.mjs +2 -0
- package/dist/esm/chunk-JZNLZMUC.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-KQXRH5FK.mjs +2 -0
- package/dist/esm/chunk-KQXRH5FK.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-LV33NV4J.mjs +2 -0
- package/dist/esm/chunk-LV33NV4J.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-NGCFPQ22.mjs +2 -0
- package/dist/esm/chunk-NGCFPQ22.mjs.map +1 -0
- package/dist/esm/chunk-NTD3H2S4.mjs +2 -0
- package/dist/esm/chunk-NTD3H2S4.mjs.map +1 -0
- package/dist/esm/chunk-NYFVEKF6.mjs +2 -0
- package/dist/esm/chunk-NYFVEKF6.mjs.map +1 -0
- package/dist/esm/chunk-NZIJV4O2.mjs +2 -0
- package/dist/esm/chunk-NZIJV4O2.mjs.map +1 -0
- package/dist/esm/chunk-P32MY5YF.mjs +2 -0
- package/dist/esm/chunk-P32MY5YF.mjs.map +1 -0
- package/dist/esm/chunk-Q6N6QACD.mjs +2 -0
- package/dist/esm/chunk-Q6N6QACD.mjs.map +1 -0
- package/dist/esm/chunk-QWVR4RCV.mjs +2 -0
- package/dist/esm/chunk-QWVR4RCV.mjs.map +1 -0
- package/dist/esm/chunk-R26XML3D.mjs +2 -0
- package/dist/esm/chunk-R26XML3D.mjs.map +1 -0
- package/dist/esm/chunk-R3KWVOFG.mjs +2 -0
- package/dist/esm/chunk-R3KWVOFG.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-RYETO74W.mjs +2 -0
- package/dist/esm/chunk-RYETO74W.mjs.map +1 -0
- package/dist/esm/chunk-S36IYY6K.mjs +2 -0
- package/dist/esm/chunk-S36IYY6K.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-TIH6ARYP.mjs +2 -0
- package/dist/esm/chunk-TIH6ARYP.mjs.map +1 -0
- package/dist/esm/chunk-TQD4IGUM.mjs +2 -0
- package/dist/esm/chunk-TQD4IGUM.mjs.map +1 -0
- package/dist/esm/chunk-U25N2VWA.mjs +2 -0
- package/dist/esm/chunk-U25N2VWA.mjs.map +1 -0
- package/dist/esm/chunk-U3LO2FSJ.mjs +2 -0
- package/dist/esm/chunk-U3LO2FSJ.mjs.map +1 -0
- package/dist/esm/chunk-U6SZNNVL.mjs +2 -0
- package/dist/esm/chunk-U6SZNNVL.mjs.map +1 -0
- package/dist/esm/chunk-UAAI3NCA.mjs +2 -0
- package/dist/esm/chunk-UAAI3NCA.mjs.map +1 -0
- package/dist/esm/chunk-UNQNACJT.mjs +2 -0
- package/dist/esm/chunk-UNQNACJT.mjs.map +1 -0
- package/dist/esm/chunk-UPLWWSB4.mjs +2 -0
- package/dist/esm/chunk-UPLWWSB4.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-V45RFKH7.mjs +2 -0
- package/dist/esm/chunk-V45RFKH7.mjs.map +1 -0
- package/dist/esm/chunk-VMQWW5UT.mjs +2 -0
- package/dist/esm/chunk-VMQWW5UT.mjs.map +1 -0
- package/dist/esm/chunk-VOYW2TZW.mjs +2 -0
- package/dist/esm/chunk-VOYW2TZW.mjs.map +1 -0
- package/dist/esm/chunk-VWVEDCBM.mjs +2 -0
- package/dist/esm/chunk-VWVEDCBM.mjs.map +1 -0
- package/dist/esm/chunk-VYAVLUPJ.mjs +2 -0
- package/dist/esm/chunk-VYAVLUPJ.mjs.map +1 -0
- package/dist/esm/chunk-WKY5ENCK.mjs +2 -0
- package/dist/esm/chunk-WKY5ENCK.mjs.map +1 -0
- package/dist/esm/chunk-WX43AJTD.mjs +406 -0
- package/dist/esm/chunk-WX43AJTD.mjs.map +1 -0
- package/dist/esm/chunk-X32O46IB.mjs +2 -0
- package/dist/esm/chunk-X32O46IB.mjs.map +1 -0
- package/dist/esm/chunk-Y5DJPHJT.mjs +2 -0
- package/dist/esm/chunk-Y5DJPHJT.mjs.map +1 -0
- package/dist/esm/chunk-Y7VR7X5W.mjs +2 -0
- package/dist/esm/chunk-Y7VR7X5W.mjs.map +1 -0
- package/dist/esm/chunk-YYRDFZE6.mjs +2 -0
- package/dist/esm/chunk-YYRDFZE6.mjs.map +1 -0
- package/dist/esm/chunk-Z2UDRTHA.mjs +2 -0
- package/dist/esm/chunk-Z2UDRTHA.mjs.map +1 -0
- package/dist/esm/chunk-ZWH2ESXT.mjs +2 -0
- package/dist/esm/chunk-ZWH2ESXT.mjs.map +1 -0
- package/dist/esm/client/core.d.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +21 -0
- package/dist/esm/core/index.mjs +2 -0
- package/dist/esm/core/index.mjs.map +1 -0
- package/dist/esm/index.d.mts +60 -0
- package/dist/esm/index.mjs +1 -5706
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/internal/account.d.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +126 -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.mts +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.mts +48 -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.mts +242 -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.mts +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.mts +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.mts +9496 -0
- package/dist/esm/types/generated/types.mjs +2 -0
- package/dist/esm/types/generated/types.mjs.map +1 -0
- package/dist/esm/types/index.d.mts +886 -0
- package/dist/esm/types/index.mjs +2 -0
- package/dist/esm/types/index.mjs.map +1 -0
- package/dist/esm/types/indexer.d.mts +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.mts +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.mts +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.mts +7 -0
- package/dist/esm/utils/helpers.mjs +2 -0
- package/dist/esm/utils/helpers.mjs.map +1 -0
- package/dist/esm/utils/index.d.mts +2 -0
- package/dist/esm/utils/index.mjs +2 -0
- package/dist/esm/utils/index.mjs.map +1 -0
- package/dist/esm/utils/memoize.d.mts +20 -0
- package/dist/esm/utils/memoize.mjs +2 -0
- package/dist/esm/utils/memoize.mjs.map +1 -0
- package/dist/esm/version.d.mts +8 -0
- package/dist/esm/version.mjs +2 -0
- package/dist/esm/version.mjs.map +1 -0
- package/package.json +43 -40
- package/src/api/account.ts +2 -2
- package/src/api/coin.ts +2 -2
- package/src/api/event.ts +2 -2
- package/src/api/general.ts +4 -4
- package/src/api/transactionSubmission.ts +20 -3
- package/src/bcs/serializable/moveStructs.ts +8 -4
- package/src/client/core.ts +7 -5
- package/src/client/get.ts +6 -2
- package/src/client/post.ts +12 -4
- package/src/core/account.ts +7 -4
- package/src/index.ts +1 -1
- package/src/internal/account.ts +2 -2
- package/src/internal/ans.ts +4 -6
- package/src/internal/coin.ts +2 -2
- package/src/internal/event.ts +3 -3
- package/src/internal/general.ts +7 -6
- package/src/internal/queries/getEvents.graphql +1 -0
- package/src/internal/transactionSubmission.ts +41 -3
- package/src/transactions/transactionBuilder/helpers.ts +2 -2
- package/src/transactions/transactionBuilder/remoteAbi.ts +1 -1
- package/src/transactions/transactionBuilder/transactionBuilder.ts +15 -20
- package/src/transactions/typeTag/parser.ts +10 -2
- package/src/transactions/types.ts +5 -14
- package/src/types/generated/operations.ts +52 -51
- package/src/types/generated/queries.ts +42 -41
- package/src/types/generated/types.ts +2257 -2249
- package/src/types/index.ts +20 -12
- package/src/utils/index.ts +2 -0
- package/dist/cjs/index.js +0 -5901
- package/dist/cjs/index.js.map +0 -1
- package/dist/types/index.d.ts +0 -1310
- package/dist/types/index.js +0 -176
- package/dist/types/index.js.map +0 -1
package/src/internal/ans.ts
CHANGED
|
@@ -64,11 +64,9 @@ export function isValidANSName(name: string): { domainName: string; subdomainNam
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
export const LOCAL_ANS_ACCOUNT_PK =
|
|
67
|
-
|
|
68
|
-
"0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221";
|
|
67
|
+
process.env.ANS_TEST_ACCOUNT_PRIVATE_KEY ?? "0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221";
|
|
69
68
|
export const LOCAL_ANS_ACCOUNT_ADDRESS =
|
|
70
|
-
|
|
71
|
-
"0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82";
|
|
69
|
+
process.env.ANS_TEST_ACCOUNT_ADDRESS ?? "0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82";
|
|
72
70
|
|
|
73
71
|
const NetworkToAnsContract: Record<Network, string | null> = {
|
|
74
72
|
[Network.TESTNET]: "0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",
|
|
@@ -84,8 +82,8 @@ function getRouterAddress(aptosConfig: AptosConfig): string {
|
|
|
84
82
|
return address;
|
|
85
83
|
}
|
|
86
84
|
|
|
87
|
-
const Some = <T>(value: T): MoveValue => ({ vec: [value] } as any
|
|
88
|
-
const None = (): MoveValue => ({ vec: [] } as any
|
|
85
|
+
const Some = <T>(value: T): MoveValue => ({ vec: [value] }) as any;
|
|
86
|
+
const None = (): MoveValue => ({ vec: [] }) as any;
|
|
89
87
|
// != here is intentional, we want to check for null and undefined
|
|
90
88
|
// eslint-disable-next-line eqeqeq
|
|
91
89
|
const Option = <T>(value: T | undefined | null): MoveValue => (value != undefined ? Some(value) : None());
|
package/src/internal/coin.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { AptosConfig } from "../api/aptosConfig";
|
|
|
2
2
|
import { U64 } from "../bcs/serializable/movePrimitives";
|
|
3
3
|
import { Account, AccountAddress, AccountAddressInput } from "../core";
|
|
4
4
|
import { InputGenerateTransactionOptions, InputSingleSignerTransaction } from "../transactions/types";
|
|
5
|
-
import { AnyNumber,
|
|
5
|
+
import { AnyNumber, MoveStructId } from "../types";
|
|
6
6
|
import { APTOS_COIN } from "../utils/const";
|
|
7
7
|
import { generateTransaction } from "./transactionSubmission";
|
|
8
8
|
import { parseTypeTag } from "../transactions/typeTag/parser";
|
|
@@ -12,7 +12,7 @@ export async function transferCoinTransaction(args: {
|
|
|
12
12
|
sender: Account;
|
|
13
13
|
recipient: AccountAddressInput;
|
|
14
14
|
amount: AnyNumber;
|
|
15
|
-
coinType?:
|
|
15
|
+
coinType?: MoveStructId;
|
|
16
16
|
options?: InputGenerateTransactionOptions;
|
|
17
17
|
}): Promise<InputSingleSignerTransaction> {
|
|
18
18
|
const { aptosConfig, sender, recipient, amount, coinType, options } = args;
|
package/src/internal/event.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import { AptosConfig } from "../api/aptosConfig";
|
|
12
12
|
import { AccountAddress, AccountAddressInput } from "../core";
|
|
13
|
-
import { AnyNumber, GetEventsResponse, PaginationArgs,
|
|
13
|
+
import { AnyNumber, GetEventsResponse, PaginationArgs, MoveStructId, OrderBy } from "../types";
|
|
14
14
|
import { GetEventsQuery } from "../types/generated/operations";
|
|
15
15
|
import { GetEvents } from "../types/generated/queries";
|
|
16
16
|
import { EventsBoolExp } from "../types/generated/types";
|
|
@@ -35,7 +35,7 @@ export async function getAccountEventsByCreationNumber(args: {
|
|
|
35
35
|
export async function getAccountEventsByEventType(args: {
|
|
36
36
|
aptosConfig: AptosConfig;
|
|
37
37
|
accountAddress: AccountAddressInput;
|
|
38
|
-
eventType:
|
|
38
|
+
eventType: MoveStructId;
|
|
39
39
|
options?: {
|
|
40
40
|
pagination?: PaginationArgs;
|
|
41
41
|
orderBy?: OrderBy<GetEventsResponse[0]>;
|
|
@@ -46,7 +46,7 @@ export async function getAccountEventsByEventType(args: {
|
|
|
46
46
|
|
|
47
47
|
const whereCondition: EventsBoolExp = {
|
|
48
48
|
account_address: { _eq: address },
|
|
49
|
-
|
|
49
|
+
indexed_type: { _eq: eventType },
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
const customOptions = {
|
package/src/internal/general.ts
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
MoveValue,
|
|
22
22
|
TableItemRequest,
|
|
23
23
|
ViewRequest,
|
|
24
|
-
|
|
24
|
+
InputViewRequestData,
|
|
25
25
|
} from "../types";
|
|
26
26
|
import { GetChainTopUserTransactionsQuery, GetProcessorStatusQuery } from "../types/generated/operations";
|
|
27
27
|
import { GetChainTopUserTransactions, GetProcessorStatus } from "../types/generated/queries";
|
|
@@ -83,11 +83,11 @@ export async function getTableItem<T>(args: {
|
|
|
83
83
|
return response.data as T;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
export async function view(args: {
|
|
86
|
+
export async function view<T extends Array<MoveValue> = Array<MoveValue>>(args: {
|
|
87
87
|
aptosConfig: AptosConfig;
|
|
88
|
-
payload:
|
|
88
|
+
payload: InputViewRequestData;
|
|
89
89
|
options?: LedgerVersion;
|
|
90
|
-
}): Promise<
|
|
90
|
+
}): Promise<T> {
|
|
91
91
|
const { aptosConfig, payload, options } = args;
|
|
92
92
|
const { data } = await postAptosFullNode<ViewRequest, MoveValue[]>({
|
|
93
93
|
aptosConfig,
|
|
@@ -100,7 +100,8 @@ export async function view(args: {
|
|
|
100
100
|
arguments: payload.functionArguments ?? [],
|
|
101
101
|
},
|
|
102
102
|
});
|
|
103
|
-
|
|
103
|
+
|
|
104
|
+
return data as T;
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
export async function getChainTopUserTransactions(args: {
|
|
@@ -122,7 +123,7 @@ export async function getChainTopUserTransactions(args: {
|
|
|
122
123
|
return data.user_transactions;
|
|
123
124
|
}
|
|
124
125
|
|
|
125
|
-
export async function queryIndexer<T>(args: {
|
|
126
|
+
export async function queryIndexer<T extends {}>(args: {
|
|
126
127
|
aptosConfig: AptosConfig;
|
|
127
128
|
query: GraphqlQuery;
|
|
128
129
|
originMethod?: string;
|
|
@@ -28,6 +28,8 @@ import {
|
|
|
28
28
|
InputSingleSignerTransaction,
|
|
29
29
|
InputGenerateTransactionPayloadDataWithRemoteABI,
|
|
30
30
|
InputSubmitTransactionData,
|
|
31
|
+
InputGenerateFeePayerRawTransactionData,
|
|
32
|
+
InputGenerateMultiAgentRawTransactionData,
|
|
31
33
|
} from "../transactions/types";
|
|
32
34
|
import { getInfo } from "./account";
|
|
33
35
|
import { UserTransactionResponse, PendingTransactionResponse, MimeType, HexInput, TransactionResponse } from "../types";
|
|
@@ -75,7 +77,7 @@ import { UserTransactionResponse, PendingTransactionResponse, MimeType, HexInput
|
|
|
75
77
|
export async function generateTransaction(
|
|
76
78
|
args: { aptosConfig: AptosConfig } & InputGenerateTransactionData,
|
|
77
79
|
): Promise<AnyRawTransaction> {
|
|
78
|
-
const { aptosConfig, sender, data, options
|
|
80
|
+
const { aptosConfig, sender, data, options } = args;
|
|
79
81
|
|
|
80
82
|
// Merge in aptosConfig for remote ABI on non-script payloads
|
|
81
83
|
let generateTransactionPayloadData: InputGenerateTransactionPayloadDataWithRemoteABI;
|
|
@@ -97,17 +99,53 @@ export async function generateTransaction(
|
|
|
97
99
|
typeArguments: data.typeArguments,
|
|
98
100
|
};
|
|
99
101
|
}
|
|
102
|
+
|
|
103
|
+
if (isFeePayerTransactionInput(args)) {
|
|
104
|
+
const { secondarySignerAddresses } = args;
|
|
105
|
+
const feePayerAddress = args.hasFeePayer ? AccountAddress.ZERO : undefined;
|
|
106
|
+
const payload = await generateTransactionPayload(generateTransactionPayloadData);
|
|
107
|
+
return buildTransaction({
|
|
108
|
+
aptosConfig,
|
|
109
|
+
sender,
|
|
110
|
+
payload,
|
|
111
|
+
options,
|
|
112
|
+
secondarySignerAddresses,
|
|
113
|
+
feePayerAddress,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
if (isMultiAgentTransactionInput(args)) {
|
|
117
|
+
const { secondarySignerAddresses } = args;
|
|
118
|
+
const payload = await generateTransactionPayload(generateTransactionPayloadData);
|
|
119
|
+
return buildTransaction({
|
|
120
|
+
aptosConfig,
|
|
121
|
+
sender,
|
|
122
|
+
payload,
|
|
123
|
+
options,
|
|
124
|
+
secondarySignerAddresses,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
100
128
|
const payload = await generateTransactionPayload(generateTransactionPayloadData);
|
|
101
129
|
return buildTransaction({
|
|
102
130
|
aptosConfig,
|
|
103
131
|
sender,
|
|
104
132
|
payload,
|
|
105
133
|
options,
|
|
106
|
-
secondarySignerAddresses,
|
|
107
|
-
feePayerAddress,
|
|
108
134
|
});
|
|
109
135
|
}
|
|
110
136
|
|
|
137
|
+
function isFeePayerTransactionInput(
|
|
138
|
+
data: InputGenerateTransactionData,
|
|
139
|
+
): data is InputGenerateFeePayerRawTransactionData {
|
|
140
|
+
return "hasFeePayer" in data;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function isMultiAgentTransactionInput(
|
|
144
|
+
data: InputGenerateTransactionData,
|
|
145
|
+
): data is InputGenerateMultiAgentRawTransactionData {
|
|
146
|
+
return "secondarySignerAddresses" in data;
|
|
147
|
+
}
|
|
148
|
+
|
|
111
149
|
/**
|
|
112
150
|
* Sign a transaction that can later be submitted to chain
|
|
113
151
|
*
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "../types";
|
|
11
11
|
import { Bool, FixedBytes, MoveString, U128, U16, U256, U32, U64, U8 } from "../../bcs";
|
|
12
12
|
import { AccountAddress } from "../../core";
|
|
13
|
-
import { MoveFunction,
|
|
13
|
+
import { MoveFunction, MoveFunctionId } from "../../types";
|
|
14
14
|
|
|
15
15
|
export function isBool(arg: SimpleEntryFunctionArgumentTypes): arg is boolean {
|
|
16
16
|
return typeof arg === "boolean";
|
|
@@ -91,7 +91,7 @@ export function findFirstNonSignerArg(functionAbi: MoveFunction): number {
|
|
|
91
91
|
return index;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
export function getFunctionParts(functionArg:
|
|
94
|
+
export function getFunctionParts(functionArg: MoveFunctionId) {
|
|
95
95
|
const funcNameParts = functionArg.split("::");
|
|
96
96
|
if (funcNameParts.length !== 3) {
|
|
97
97
|
throw new Error(`Invalid function ${functionArg}`);
|
|
@@ -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
|
}
|
|
@@ -86,9 +86,7 @@ import { getFunctionParts, isScriptDataInput } from "./helpers";
|
|
|
86
86
|
* When we call our `generateTransactionPayload` function with the relevant type properties,
|
|
87
87
|
* Typescript can infer the return type based on the appropriate function overload.
|
|
88
88
|
*/
|
|
89
|
-
export async function generateTransactionPayload(
|
|
90
|
-
args: InputScriptData & { aptosConfig?: undefined },
|
|
91
|
-
): Promise<TransactionPayloadScript>;
|
|
89
|
+
export async function generateTransactionPayload(args: InputScriptData): Promise<TransactionPayloadScript>;
|
|
92
90
|
export async function generateTransactionPayload(
|
|
93
91
|
args: InputEntryFunctionDataWithRemoteABI,
|
|
94
92
|
): Promise<TransactionPayloadEntryFunction>;
|
|
@@ -136,10 +134,6 @@ export function generateTransactionPayloadWithABI(
|
|
|
136
134
|
args: InputMultiSigData,
|
|
137
135
|
functionAbi: EntryFunctionABI,
|
|
138
136
|
): TransactionPayloadMultisig;
|
|
139
|
-
export function generateTransactionPayloadWithABI(
|
|
140
|
-
args: InputGenerateTransactionPayloadData,
|
|
141
|
-
functionAbi: EntryFunctionABI,
|
|
142
|
-
): AnyTransactionPayloadInstance;
|
|
143
137
|
export function generateTransactionPayloadWithABI(
|
|
144
138
|
args: InputGenerateTransactionPayloadData,
|
|
145
139
|
functionAbi: EntryFunctionABI,
|
|
@@ -238,7 +232,7 @@ export async function generateRawTransaction(args: {
|
|
|
238
232
|
);
|
|
239
233
|
|
|
240
234
|
const { maxGasAmount, gasUnitPrice, expireTimestamp } = {
|
|
241
|
-
maxGasAmount: BigInt(DEFAULT_MAX_GAS_AMOUNT),
|
|
235
|
+
maxGasAmount: options?.maxGasAmount ? BigInt(options.maxGasAmount) : BigInt(DEFAULT_MAX_GAS_AMOUNT),
|
|
242
236
|
gasUnitPrice: BigInt(gasEstimate),
|
|
243
237
|
expireTimestamp: BigInt(Math.floor(Date.now() / 1000) + DEFAULT_TXN_EXP_SEC_FROM_NOW),
|
|
244
238
|
...options,
|
|
@@ -294,7 +288,7 @@ export async function buildTransaction(args: InputGenerateRawTransactionArgs): P
|
|
|
294
288
|
* ```
|
|
295
289
|
*/
|
|
296
290
|
export async function buildTransaction(args: InputGenerateRawTransactionArgs): Promise<AnyRawTransaction> {
|
|
297
|
-
const { aptosConfig, sender, payload, options
|
|
291
|
+
const { aptosConfig, sender, payload, options } = args;
|
|
298
292
|
// generate raw transaction
|
|
299
293
|
const rawTxn = await generateRawTransaction({
|
|
300
294
|
aptosConfig,
|
|
@@ -303,20 +297,21 @@ export async function buildTransaction(args: InputGenerateRawTransactionArgs): P
|
|
|
303
297
|
options,
|
|
304
298
|
});
|
|
305
299
|
|
|
306
|
-
if (feePayerAddress) {
|
|
307
|
-
const signers: Array<AccountAddress> =
|
|
308
|
-
|
|
309
|
-
: [];
|
|
300
|
+
if ("feePayerAddress" in args) {
|
|
301
|
+
const signers: Array<AccountAddress> =
|
|
302
|
+
args.secondarySignerAddresses?.map((signer) => AccountAddress.fromRelaxed(signer)) ?? [];
|
|
310
303
|
|
|
311
304
|
return {
|
|
312
305
|
rawTransaction: rawTxn,
|
|
313
306
|
secondarySignerAddresses: signers,
|
|
314
|
-
feePayerAddress:
|
|
307
|
+
feePayerAddress:
|
|
308
|
+
args?.feePayerAddress !== undefined ? AccountAddress.fromRelaxed(args.feePayerAddress) : undefined,
|
|
315
309
|
};
|
|
316
310
|
}
|
|
317
311
|
|
|
318
|
-
if (secondarySignerAddresses) {
|
|
319
|
-
const signers: Array<AccountAddress> =
|
|
312
|
+
if ("secondarySignerAddresses" in args) {
|
|
313
|
+
const signers: Array<AccountAddress> =
|
|
314
|
+
args.secondarySignerAddresses?.map((signer) => AccountAddress.fromRelaxed(signer)) ?? [];
|
|
320
315
|
|
|
321
316
|
return {
|
|
322
317
|
rawTransaction: rawTxn,
|
|
@@ -346,7 +341,7 @@ export function generateSignedTransactionForSimulation(args: InputSimulateTransa
|
|
|
346
341
|
|
|
347
342
|
const accountAuthenticator = getAuthenticatorForSimulation(signerPublicKey);
|
|
348
343
|
// fee payer transaction
|
|
349
|
-
if (transaction
|
|
344
|
+
if ("feePayerAddress" in transaction) {
|
|
350
345
|
const transactionToSign = new FeePayerRawTransaction(
|
|
351
346
|
deserializedTransaction,
|
|
352
347
|
transaction.secondarySignerAddresses ?? [],
|
|
@@ -375,7 +370,7 @@ export function generateSignedTransactionForSimulation(args: InputSimulateTransa
|
|
|
375
370
|
}
|
|
376
371
|
|
|
377
372
|
// multi agent transaction
|
|
378
|
-
if (transaction
|
|
373
|
+
if ("secondarySignerAddresses" in transaction) {
|
|
379
374
|
const transactionToSign = new MultiAgentRawTransaction(
|
|
380
375
|
deserializedTransaction,
|
|
381
376
|
transaction.secondarySignerAddresses,
|
|
@@ -519,14 +514,14 @@ export function generateSignedTransaction(args: InputSubmitTransactionData): Uin
|
|
|
519
514
|
* @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
|
|
520
515
|
*/
|
|
521
516
|
export function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance {
|
|
522
|
-
if (transaction
|
|
517
|
+
if ("feePayerAddress" in transaction) {
|
|
523
518
|
return new FeePayerRawTransaction(
|
|
524
519
|
transaction.rawTransaction,
|
|
525
520
|
transaction.secondarySignerAddresses ?? [],
|
|
526
521
|
transaction.feePayerAddress,
|
|
527
522
|
);
|
|
528
523
|
}
|
|
529
|
-
if (transaction
|
|
524
|
+
if ("secondarySignerAddresses" in transaction) {
|
|
530
525
|
return new MultiAgentRawTransaction(transaction.rawTransaction, transaction.secondarySignerAddresses);
|
|
531
526
|
}
|
|
532
527
|
|
|
@@ -29,6 +29,10 @@ function isValidWhitespaceCharacter(char: string) {
|
|
|
29
29
|
return !!char.match(/\s/);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
function isGeneric(str: string) {
|
|
33
|
+
return !!str.match(/^T[0-9]+$/);
|
|
34
|
+
}
|
|
35
|
+
|
|
32
36
|
function consumeWhitespace(tagStr: string, pos: number) {
|
|
33
37
|
let i = pos;
|
|
34
38
|
for (; i < tagStr.length; i += 1) {
|
|
@@ -50,6 +54,7 @@ type TypeTagState = {
|
|
|
50
54
|
|
|
51
55
|
export enum TypeTagParserErrorType {
|
|
52
56
|
InvalidTypeTag = "unknown type",
|
|
57
|
+
UnexpectedGenericType = "unexpected generic type",
|
|
53
58
|
UnexpectedTypeArgumentClose = "unexpected '>'",
|
|
54
59
|
UnexpectedWhitespaceCharacter = "unexpected whitespace character",
|
|
55
60
|
UnexpectedComma = "unexpected ','",
|
|
@@ -262,8 +267,11 @@ function parseTypeTagInner(str: string, types: Array<TypeTag>, allowGenerics: bo
|
|
|
262
267
|
}
|
|
263
268
|
return new TypeTagVector(types[0]);
|
|
264
269
|
default:
|
|
265
|
-
if (
|
|
266
|
-
|
|
270
|
+
if (isGeneric(str)) {
|
|
271
|
+
if (allowGenerics) {
|
|
272
|
+
return new TypeTagGeneric(Number(str.split("T")[1]));
|
|
273
|
+
}
|
|
274
|
+
throw new TypeTagParserError(str, TypeTagParserErrorType.UnexpectedGenericType);
|
|
267
275
|
}
|
|
268
276
|
|
|
269
277
|
// If the value doesn't contain a colon, then we'll assume it isn't trying to be a struct
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
TransactionPayloadMultisig,
|
|
16
16
|
TransactionPayloadScript,
|
|
17
17
|
} from "./instances";
|
|
18
|
-
import { AnyNumber, HexInput, MoveFunctionGenericTypeParam,
|
|
18
|
+
import { AnyNumber, HexInput, MoveFunctionGenericTypeParam, MoveFunctionId } from "../types";
|
|
19
19
|
import { TypeTag } from "./typeTag";
|
|
20
20
|
import { AccountAuthenticator } from "./authenticator/account";
|
|
21
21
|
|
|
@@ -97,7 +97,7 @@ export type AnyTransactionPayloadInstance =
|
|
|
97
97
|
export type InputGenerateTransactionPayloadData = InputEntryFunctionData | InputScriptData | InputMultiSigData;
|
|
98
98
|
|
|
99
99
|
export type InputGenerateTransactionPayloadDataWithRemoteABI =
|
|
100
|
-
|
|
|
100
|
+
| InputScriptData
|
|
101
101
|
| InputEntryFunctionDataWithRemoteABI
|
|
102
102
|
| InputMultiSigDataWithRemoteABI;
|
|
103
103
|
|
|
@@ -105,8 +105,8 @@ export type InputGenerateTransactionPayloadDataWithRemoteABI =
|
|
|
105
105
|
* The data needed to generate an Entry Function payload
|
|
106
106
|
*/
|
|
107
107
|
export type InputEntryFunctionData = {
|
|
108
|
-
function:
|
|
109
|
-
typeArguments?: Array<TypeTag>;
|
|
108
|
+
function: MoveFunctionId;
|
|
109
|
+
typeArguments?: Array<TypeTag | string>;
|
|
110
110
|
functionArguments: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
111
111
|
};
|
|
112
112
|
|
|
@@ -152,8 +152,6 @@ export interface InputGenerateSingleSignerRawTransactionArgs {
|
|
|
152
152
|
aptosConfig: AptosConfig;
|
|
153
153
|
sender: AccountAddressInput;
|
|
154
154
|
payload: AnyTransactionPayloadInstance;
|
|
155
|
-
feePayerAddress?: undefined;
|
|
156
|
-
secondarySignerAddresses?: undefined;
|
|
157
155
|
options?: InputGenerateTransactionOptions;
|
|
158
156
|
}
|
|
159
157
|
|
|
@@ -179,7 +177,6 @@ export interface InputGenerateMultiAgentRawTransactionArgs {
|
|
|
179
177
|
sender: AccountAddressInput;
|
|
180
178
|
payload: AnyTransactionPayloadInstance;
|
|
181
179
|
secondarySignerAddresses: AccountAddressInput[];
|
|
182
|
-
feePayerAddress?: undefined;
|
|
183
180
|
options?: InputGenerateTransactionOptions;
|
|
184
181
|
}
|
|
185
182
|
|
|
@@ -198,8 +195,6 @@ export type InputGenerateRawTransactionArgs =
|
|
|
198
195
|
*/
|
|
199
196
|
export interface InputSingleSignerTransaction {
|
|
200
197
|
rawTransaction: RawTransaction;
|
|
201
|
-
feePayerAddress?: undefined;
|
|
202
|
-
secondarySignerAddresses?: undefined;
|
|
203
198
|
}
|
|
204
199
|
|
|
205
200
|
/**
|
|
@@ -224,7 +219,6 @@ export interface InputFeePayerTransaction {
|
|
|
224
219
|
export interface InputMultiAgentTransaction {
|
|
225
220
|
rawTransaction: RawTransaction;
|
|
226
221
|
secondarySignerAddresses: AccountAddress[];
|
|
227
|
-
feePayerAddress?: undefined;
|
|
228
222
|
}
|
|
229
223
|
|
|
230
224
|
/**
|
|
@@ -267,8 +261,6 @@ export type InputSimulateTransactionOptions = {
|
|
|
267
261
|
*/
|
|
268
262
|
export interface InputGenerateSingleSignerRawTransactionData {
|
|
269
263
|
sender: AccountAddressInput;
|
|
270
|
-
feePayerAddress?: undefined;
|
|
271
|
-
secondarySignerAddresses?: undefined;
|
|
272
264
|
options?: InputGenerateTransactionOptions;
|
|
273
265
|
data: InputGenerateTransactionPayloadData;
|
|
274
266
|
}
|
|
@@ -278,7 +270,7 @@ export interface InputGenerateSingleSignerRawTransactionData {
|
|
|
278
270
|
*/
|
|
279
271
|
export interface InputGenerateFeePayerRawTransactionData {
|
|
280
272
|
sender: AccountAddressInput;
|
|
281
|
-
|
|
273
|
+
hasFeePayer: true;
|
|
282
274
|
secondarySignerAddresses?: AccountAddressInput[];
|
|
283
275
|
options?: InputGenerateTransactionOptions;
|
|
284
276
|
data: InputGenerateTransactionPayloadData;
|
|
@@ -290,7 +282,6 @@ export interface InputGenerateFeePayerRawTransactionData {
|
|
|
290
282
|
export interface InputGenerateMultiAgentRawTransactionData {
|
|
291
283
|
sender: AccountAddressInput;
|
|
292
284
|
secondarySignerAddresses: AccountAddressInput[];
|
|
293
|
-
feePayerAddress?: undefined;
|
|
294
285
|
options?: InputGenerateTransactionOptions;
|
|
295
286
|
data: InputGenerateTransactionPayloadData;
|
|
296
287
|
}
|