@aptos-labs/ts-sdk 1.11.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -6
- package/dist/common/index.d.ts +108 -31
- package/dist/common/index.js +26 -26
- package/dist/common/index.js.map +1 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +13 -11
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +6 -4
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/coin.d.mts +9 -7
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +3 -1
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +6 -4
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +2 -0
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +6 -4
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +6 -4
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +9 -7
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +5 -3
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +2 -0
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.d.mts +2 -0
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +2 -0
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/chunk-25UTAIJG.mjs +2 -0
- package/dist/esm/chunk-25UTAIJG.mjs.map +1 -0
- package/dist/esm/{chunk-SQW7K56J.mjs → chunk-35EWRSDK.mjs} +2 -2
- package/dist/esm/{chunk-VKWPCOZA.mjs → chunk-36QXVFR5.mjs} +2 -2
- package/dist/esm/{chunk-3RRZ4MSV.mjs → chunk-3MFILHZT.mjs} +2 -2
- package/dist/esm/{chunk-4P6KFDXF.mjs → chunk-3PMUIXFS.mjs} +2 -2
- package/dist/esm/chunk-3PMUIXFS.mjs.map +1 -0
- package/dist/esm/{chunk-CIMZIZY3.mjs → chunk-3RQ5V3F3.mjs} +2 -2
- package/dist/esm/{chunk-VNNLHEJ4.mjs → chunk-4AVC2RCH.mjs} +2 -2
- package/dist/esm/chunk-4NHWV5AI.mjs +2 -0
- package/dist/esm/{chunk-NDV4GZ5U.mjs → chunk-527DYQ3X.mjs} +2 -2
- package/dist/esm/chunk-527DYQ3X.mjs.map +1 -0
- package/dist/esm/{chunk-XDZF5IUF.mjs → chunk-5EN52MUT.mjs} +2 -2
- package/dist/esm/chunk-5ID6W7XL.mjs +2 -0
- package/dist/esm/chunk-5ID6W7XL.mjs.map +1 -0
- package/dist/esm/{chunk-U5CKFPSM.mjs → chunk-5NWTYUKC.mjs} +2 -2
- package/dist/esm/chunk-5NWTYUKC.mjs.map +1 -0
- package/dist/esm/{chunk-XXKA2GO7.mjs → chunk-5ZQJLHJA.mjs} +2 -2
- package/dist/esm/chunk-5ZQJLHJA.mjs.map +1 -0
- package/dist/esm/chunk-6O5ZR5ME.mjs +2 -0
- package/dist/esm/chunk-6O5ZR5ME.mjs.map +1 -0
- package/dist/esm/{chunk-JLDOXN33.mjs → chunk-A7XZTJ3D.mjs} +2 -2
- package/dist/esm/{chunk-NHVLEE5G.mjs → chunk-AIPKOP3K.mjs} +2 -2
- package/dist/esm/chunk-AIPKOP3K.mjs.map +1 -0
- package/dist/esm/chunk-ARGODLTZ.mjs +2 -0
- package/dist/esm/chunk-ARGODLTZ.mjs.map +1 -0
- package/dist/esm/chunk-ASXXZH2D.mjs +2 -0
- package/dist/esm/chunk-ASXXZH2D.mjs.map +1 -0
- package/dist/esm/{chunk-2TRSGKMS.mjs → chunk-B4DWWHNL.mjs} +2 -2
- package/dist/esm/{chunk-EBCIZ4D6.mjs → chunk-B7X6PSE7.mjs} +2 -2
- package/dist/esm/{chunk-Y7G5W2QZ.mjs → chunk-BAYKVJBZ.mjs} +2 -2
- package/dist/esm/chunk-BCUSI3N6.mjs +2 -0
- package/dist/esm/chunk-BCUSI3N6.mjs.map +1 -0
- package/dist/esm/{chunk-O5L7WGNH.mjs → chunk-CAGDOGXS.mjs} +2 -2
- package/dist/esm/{chunk-TTM66JZ4.mjs → chunk-CEHCDA3G.mjs} +2 -2
- package/dist/esm/{chunk-LD7YBNH5.mjs → chunk-CP4QCRBZ.mjs} +2 -2
- package/dist/esm/chunk-CXR7MOBW.mjs +2 -0
- package/dist/esm/{chunk-LNS5RI5S.mjs.map → chunk-CXR7MOBW.mjs.map} +1 -1
- package/dist/esm/{chunk-JF4E53MH.mjs → chunk-DGLW7OBS.mjs} +2 -2
- package/dist/esm/{chunk-JF4E53MH.mjs.map → chunk-DGLW7OBS.mjs.map} +1 -1
- package/dist/esm/{chunk-T43CJS4C.mjs → chunk-DUP7XY5P.mjs} +2 -2
- package/dist/esm/{chunk-VBSAEAWA.mjs → chunk-EJBUUMWV.mjs} +2 -2
- package/dist/esm/{chunk-HYQSORWM.mjs → chunk-EV75CYGN.mjs} +2 -2
- package/dist/esm/chunk-F7EMGK4M.mjs +2 -0
- package/dist/esm/chunk-F7EMGK4M.mjs.map +1 -0
- package/dist/esm/{chunk-HSITRYZ5.mjs → chunk-FC5MU6ZN.mjs} +2 -2
- package/dist/esm/{chunk-JKXSSRNT.mjs → chunk-FNLRLSGJ.mjs} +2 -2
- package/dist/esm/{chunk-JEQSSMDK.mjs → chunk-FPD4JBPV.mjs} +2 -2
- package/dist/esm/{chunk-HEDMDM2U.mjs → chunk-FVMJDRHO.mjs} +2 -2
- package/dist/esm/chunk-FVMJDRHO.mjs.map +1 -0
- package/dist/esm/chunk-FXHXOVL4.mjs +2 -0
- package/dist/esm/chunk-FXHXOVL4.mjs.map +1 -0
- package/dist/esm/{chunk-RP4FMC6O.mjs → chunk-G56GPLTB.mjs} +2 -2
- package/dist/esm/chunk-GJDGR3KQ.mjs +2 -0
- package/dist/esm/chunk-GJDGR3KQ.mjs.map +1 -0
- package/dist/esm/{chunk-Y3R5DLBS.mjs → chunk-HJYT6LDB.mjs} +2 -2
- package/dist/esm/chunk-ICXA3DZH.mjs +1 -0
- package/dist/esm/{chunk-RWBAKP5G.mjs → chunk-IZF6DFAL.mjs} +2 -2
- package/dist/esm/{chunk-AVQSQJUO.mjs → chunk-JOLLCFQL.mjs} +2 -2
- package/dist/esm/chunk-KAGLWBIJ.mjs +2 -0
- package/dist/esm/chunk-KAGLWBIJ.mjs.map +1 -0
- package/dist/esm/{chunk-A5ACWD7S.mjs → chunk-KQB7A4OX.mjs} +2 -2
- package/dist/esm/{chunk-VK3H7DMJ.mjs → chunk-KXFMI7RM.mjs} +2 -2
- package/dist/esm/{chunk-PAY4TBCF.mjs → chunk-L54P6EGN.mjs} +2 -2
- package/dist/esm/{chunk-PAY4TBCF.mjs.map → chunk-L54P6EGN.mjs.map} +1 -1
- package/dist/esm/{chunk-O22J7RER.mjs → chunk-M4SQNMCW.mjs} +2 -2
- package/dist/esm/{chunk-JX3IRXNX.mjs → chunk-MJPUASSD.mjs} +2 -2
- package/dist/esm/{chunk-2BGOMPDV.mjs → chunk-N3U47Y6Y.mjs} +2 -2
- package/dist/esm/{chunk-3EKNELIS.mjs → chunk-NF5OUPPU.mjs} +2 -2
- package/dist/esm/{chunk-AT2HAXSH.mjs → chunk-O3YFCZJ5.mjs} +2 -2
- package/dist/esm/{chunk-4LQNMXX3.mjs → chunk-PF57EOJY.mjs} +2 -2
- package/dist/esm/{chunk-Q5GNCAA6.mjs → chunk-QJAI7DNA.mjs} +2 -2
- package/dist/esm/{chunk-GHMYWL3R.mjs → chunk-QRS4DGP3.mjs} +2 -2
- package/dist/esm/{chunk-P434YHBQ.mjs → chunk-QRVYLV76.mjs} +2 -2
- package/dist/esm/{chunk-CJLZV5JK.mjs → chunk-RIUFW2OG.mjs} +2 -2
- package/dist/esm/{chunk-QDD2MDJZ.mjs → chunk-SRDIYE3M.mjs} +2 -2
- package/dist/esm/{chunk-AE2K65NN.mjs → chunk-SUTBXHYU.mjs} +2 -2
- package/dist/esm/chunk-SUTBXHYU.mjs.map +1 -0
- package/dist/esm/{chunk-H4Q7YQD3.mjs → chunk-SWZOGZJ6.mjs} +2 -2
- package/dist/esm/chunk-SZKJ3TC5.mjs +1 -0
- package/dist/esm/chunk-SZKJ3TC5.mjs.map +1 -0
- package/dist/esm/{chunk-43QJL2AV.mjs → chunk-T4C6BVXK.mjs} +2 -2
- package/dist/esm/{chunk-WHNLDDPT.mjs → chunk-U3YYSIIT.mjs} +2 -2
- package/dist/esm/{chunk-Y3CHPF6X.mjs → chunk-UEKKYJGA.mjs} +2 -2
- package/dist/esm/chunk-UGPALAPN.mjs +2 -0
- package/dist/esm/{chunk-W5PK4QCX.mjs → chunk-UQCSBLD5.mjs} +2 -2
- package/dist/esm/{chunk-C62XI6VN.mjs → chunk-VBDMQERT.mjs} +2 -2
- package/dist/esm/{chunk-27ML4NFD.mjs → chunk-VHANL47W.mjs} +2 -2
- package/dist/esm/{chunk-OWEAY3N3.mjs → chunk-VLNBGWGX.mjs} +2 -2
- package/dist/esm/chunk-VNIABDOT.mjs +2 -0
- package/dist/esm/chunk-VNIABDOT.mjs.map +1 -0
- package/dist/esm/{chunk-BWG5NCHC.mjs → chunk-XDXI3TRT.mjs} +2 -2
- package/dist/esm/{chunk-2NC32JRF.mjs → chunk-XX5J7KKC.mjs} +2 -2
- package/dist/esm/{chunk-HYOPI6T2.mjs → chunk-YG6YYQRG.mjs} +2 -2
- package/dist/esm/{chunk-OH6HD5SF.mjs → chunk-YIGDWPGM.mjs} +2 -2
- package/dist/esm/chunk-YIGDWPGM.mjs.map +1 -0
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.d.mts +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/Account.mjs +1 -1
- package/dist/esm/core/account/Ed25519Account.mjs +1 -1
- package/dist/esm/core/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +1 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.d.mts +10 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.d.mts +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +2 -2
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.d.mts +16 -0
- package/dist/esm/core/crypto/utils.mjs +2 -0
- package/dist/esm/core/crypto/utils.mjs.map +1 -0
- package/dist/esm/core/hex.d.mts +2 -2
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +7 -3
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +1 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +8 -6
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +3 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +5 -3
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +1 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +7 -5
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +2 -2
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +7 -5
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +2 -0
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +4 -2
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +1 -0
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +41 -0
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +2 -0
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs.map +1 -0
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.d.mts +41 -0
- package/dist/esm/transactions/instances/simpleTransaction.mjs +2 -0
- package/dist/esm/transactions/instances/simpleTransaction.mjs.map +1 -0
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +2 -0
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +3 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +2 -0
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +3 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +2 -0
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +14 -2
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +3 -22
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/src/api/ans.ts +8 -7
- package/src/api/coin.ts +2 -1
- package/src/api/digitalAsset.ts +2 -1
- package/src/api/fungibleAsset.ts +2 -1
- package/src/api/transaction.ts +1 -1
- package/src/api/transactionSubmission/build.ts +3 -6
- package/src/cli/localNode.ts +1 -1
- package/src/core/account/utils/address.ts +18 -0
- package/src/core/crypto/ed25519.ts +7 -5
- package/src/core/crypto/secp256k1.ts +6 -4
- package/src/core/crypto/utils.ts +24 -0
- package/src/core/hex.ts +4 -4
- package/src/index.ts +1 -0
- package/src/internal/ans.ts +9 -5
- package/src/internal/coin.ts +2 -1
- package/src/internal/digitalAsset.ts +2 -1
- package/src/internal/fungibleAsset.ts +1 -1
- package/src/internal/transactionSubmission.ts +2 -2
- package/src/transactions/instances/index.ts +1 -0
- package/src/transactions/instances/multiAgentTransaction.ts +68 -0
- package/src/transactions/instances/simpleTransaction.ts +60 -0
- package/src/transactions/management/transactionWorker.ts +2 -1
- package/src/transactions/transactionBuilder/transactionBuilder.ts +38 -11
- package/src/transactions/types.ts +2 -23
- package/src/version.ts +1 -1
- package/dist/esm/chunk-3OOOAQJG.mjs +0 -2
- package/dist/esm/chunk-3OOOAQJG.mjs.map +0 -1
- package/dist/esm/chunk-4P6KFDXF.mjs.map +0 -1
- package/dist/esm/chunk-4UMTUJL5.mjs +0 -2
- package/dist/esm/chunk-4UMTUJL5.mjs.map +0 -1
- package/dist/esm/chunk-AE2K65NN.mjs.map +0 -1
- package/dist/esm/chunk-BZMO6Q6L.mjs +0 -2
- package/dist/esm/chunk-BZMO6Q6L.mjs.map +0 -1
- package/dist/esm/chunk-D2XKVVEN.mjs +0 -2
- package/dist/esm/chunk-D2XKVVEN.mjs.map +0 -1
- package/dist/esm/chunk-EXX55N2B.mjs +0 -2
- package/dist/esm/chunk-EXX55N2B.mjs.map +0 -1
- package/dist/esm/chunk-GQTC6QIS.mjs +0 -2
- package/dist/esm/chunk-GQTC6QIS.mjs.map +0 -1
- package/dist/esm/chunk-HEDMDM2U.mjs.map +0 -1
- package/dist/esm/chunk-HTZTTZQJ.mjs +0 -1
- package/dist/esm/chunk-IWPVPIKD.mjs +0 -2
- package/dist/esm/chunk-LG6SZTWR.mjs +0 -2
- package/dist/esm/chunk-LG6SZTWR.mjs.map +0 -1
- package/dist/esm/chunk-LNS5RI5S.mjs +0 -2
- package/dist/esm/chunk-NDV4GZ5U.mjs.map +0 -1
- package/dist/esm/chunk-NHVLEE5G.mjs.map +0 -1
- package/dist/esm/chunk-OH5ADEJO.mjs +0 -2
- package/dist/esm/chunk-OH6HD5SF.mjs.map +0 -1
- package/dist/esm/chunk-TBSPLLCB.mjs +0 -2
- package/dist/esm/chunk-TBSPLLCB.mjs.map +0 -1
- package/dist/esm/chunk-U5CKFPSM.mjs.map +0 -1
- package/dist/esm/chunk-XXKA2GO7.mjs.map +0 -1
- /package/dist/esm/{chunk-SQW7K56J.mjs.map → chunk-35EWRSDK.mjs.map} +0 -0
- /package/dist/esm/{chunk-VKWPCOZA.mjs.map → chunk-36QXVFR5.mjs.map} +0 -0
- /package/dist/esm/{chunk-3RRZ4MSV.mjs.map → chunk-3MFILHZT.mjs.map} +0 -0
- /package/dist/esm/{chunk-CIMZIZY3.mjs.map → chunk-3RQ5V3F3.mjs.map} +0 -0
- /package/dist/esm/{chunk-VNNLHEJ4.mjs.map → chunk-4AVC2RCH.mjs.map} +0 -0
- /package/dist/esm/{chunk-IWPVPIKD.mjs.map → chunk-4NHWV5AI.mjs.map} +0 -0
- /package/dist/esm/{chunk-XDZF5IUF.mjs.map → chunk-5EN52MUT.mjs.map} +0 -0
- /package/dist/esm/{chunk-JLDOXN33.mjs.map → chunk-A7XZTJ3D.mjs.map} +0 -0
- /package/dist/esm/{chunk-2TRSGKMS.mjs.map → chunk-B4DWWHNL.mjs.map} +0 -0
- /package/dist/esm/{chunk-EBCIZ4D6.mjs.map → chunk-B7X6PSE7.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y7G5W2QZ.mjs.map → chunk-BAYKVJBZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-O5L7WGNH.mjs.map → chunk-CAGDOGXS.mjs.map} +0 -0
- /package/dist/esm/{chunk-TTM66JZ4.mjs.map → chunk-CEHCDA3G.mjs.map} +0 -0
- /package/dist/esm/{chunk-LD7YBNH5.mjs.map → chunk-CP4QCRBZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-T43CJS4C.mjs.map → chunk-DUP7XY5P.mjs.map} +0 -0
- /package/dist/esm/{chunk-VBSAEAWA.mjs.map → chunk-EJBUUMWV.mjs.map} +0 -0
- /package/dist/esm/{chunk-HYQSORWM.mjs.map → chunk-EV75CYGN.mjs.map} +0 -0
- /package/dist/esm/{chunk-HSITRYZ5.mjs.map → chunk-FC5MU6ZN.mjs.map} +0 -0
- /package/dist/esm/{chunk-JKXSSRNT.mjs.map → chunk-FNLRLSGJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-JEQSSMDK.mjs.map → chunk-FPD4JBPV.mjs.map} +0 -0
- /package/dist/esm/{chunk-RP4FMC6O.mjs.map → chunk-G56GPLTB.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y3R5DLBS.mjs.map → chunk-HJYT6LDB.mjs.map} +0 -0
- /package/dist/esm/{chunk-HTZTTZQJ.mjs.map → chunk-ICXA3DZH.mjs.map} +0 -0
- /package/dist/esm/{chunk-RWBAKP5G.mjs.map → chunk-IZF6DFAL.mjs.map} +0 -0
- /package/dist/esm/{chunk-AVQSQJUO.mjs.map → chunk-JOLLCFQL.mjs.map} +0 -0
- /package/dist/esm/{chunk-A5ACWD7S.mjs.map → chunk-KQB7A4OX.mjs.map} +0 -0
- /package/dist/esm/{chunk-VK3H7DMJ.mjs.map → chunk-KXFMI7RM.mjs.map} +0 -0
- /package/dist/esm/{chunk-O22J7RER.mjs.map → chunk-M4SQNMCW.mjs.map} +0 -0
- /package/dist/esm/{chunk-JX3IRXNX.mjs.map → chunk-MJPUASSD.mjs.map} +0 -0
- /package/dist/esm/{chunk-2BGOMPDV.mjs.map → chunk-N3U47Y6Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-3EKNELIS.mjs.map → chunk-NF5OUPPU.mjs.map} +0 -0
- /package/dist/esm/{chunk-AT2HAXSH.mjs.map → chunk-O3YFCZJ5.mjs.map} +0 -0
- /package/dist/esm/{chunk-4LQNMXX3.mjs.map → chunk-PF57EOJY.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q5GNCAA6.mjs.map → chunk-QJAI7DNA.mjs.map} +0 -0
- /package/dist/esm/{chunk-GHMYWL3R.mjs.map → chunk-QRS4DGP3.mjs.map} +0 -0
- /package/dist/esm/{chunk-P434YHBQ.mjs.map → chunk-QRVYLV76.mjs.map} +0 -0
- /package/dist/esm/{chunk-CJLZV5JK.mjs.map → chunk-RIUFW2OG.mjs.map} +0 -0
- /package/dist/esm/{chunk-QDD2MDJZ.mjs.map → chunk-SRDIYE3M.mjs.map} +0 -0
- /package/dist/esm/{chunk-H4Q7YQD3.mjs.map → chunk-SWZOGZJ6.mjs.map} +0 -0
- /package/dist/esm/{chunk-43QJL2AV.mjs.map → chunk-T4C6BVXK.mjs.map} +0 -0
- /package/dist/esm/{chunk-WHNLDDPT.mjs.map → chunk-U3YYSIIT.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y3CHPF6X.mjs.map → chunk-UEKKYJGA.mjs.map} +0 -0
- /package/dist/esm/{chunk-OH5ADEJO.mjs.map → chunk-UGPALAPN.mjs.map} +0 -0
- /package/dist/esm/{chunk-W5PK4QCX.mjs.map → chunk-UQCSBLD5.mjs.map} +0 -0
- /package/dist/esm/{chunk-C62XI6VN.mjs.map → chunk-VBDMQERT.mjs.map} +0 -0
- /package/dist/esm/{chunk-27ML4NFD.mjs.map → chunk-VHANL47W.mjs.map} +0 -0
- /package/dist/esm/{chunk-OWEAY3N3.mjs.map → chunk-VLNBGWGX.mjs.map} +0 -0
- /package/dist/esm/{chunk-BWG5NCHC.mjs.map → chunk-XDXI3TRT.mjs.map} +0 -0
- /package/dist/esm/{chunk-2NC32JRF.mjs.map → chunk-XX5J7KKC.mjs.map} +0 -0
- /package/dist/esm/{chunk-HYOPI6T2.mjs.map → chunk-YG6YYQRG.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as h}from"./chunk-BAYKVJBZ.mjs";import{a as y}from"./chunk-PF57EOJY.mjs";import{b as n}from"./chunk-QRS4DGP3.mjs";import{a as _}from"./chunk-36QXVFR5.mjs";var t=class i extends _{constructor(e,s,a,r,c,d,l){super(),this.sender=e,this.sequence_number=s,this.payload=a,this.max_gas_amount=r,this.gas_unit_price=c,this.expiration_timestamp_secs=d,this.chain_id=l}serialize(e){this.sender.serialize(e),e.serializeU64(this.sequence_number),this.payload.serialize(e),e.serializeU64(this.max_gas_amount),e.serializeU64(this.gas_unit_price),e.serializeU64(this.expiration_timestamp_secs),this.chain_id.serialize(e)}static deserialize(e){let s=n.deserialize(e),a=e.deserializeU64(),r=h.deserialize(e),c=e.deserializeU64(),d=e.deserializeU64(),l=e.deserializeU64(),m=y.deserialize(e);return new i(s,a,r,c,d,l,m)}},o=class extends _{static deserialize(e){let s=e.deserializeUleb128AsU32();switch(s){case 0:return u.load(e);case 1:return p.load(e);default:throw new Error(`Unknown variant index for RawTransactionWithData: ${s}`)}}},u=class i extends o{constructor(e,s){super(),this.raw_txn=e,this.secondary_signer_addresses=s}serialize(e){e.serializeU32AsUleb128(0),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses)}static load(e){let s=t.deserialize(e),a=e.deserializeVector(n);return new i(s,a)}},p=class i extends o{constructor(e,s,a){super(),this.raw_txn=e,this.secondary_signer_addresses=s,this.fee_payer_address=a}serialize(e){e.serializeU32AsUleb128(1),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses),this.fee_payer_address.serialize(e)}static load(e){let s=t.deserialize(e),a=e.deserializeVector(n),r=n.deserialize(e);return new i(s,a,r)}};export{t as a,o as b,u as c,p as d};
|
|
2
|
+
//# sourceMappingURL=chunk-UQCSBLD5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-UQCSBLD5.mjs";import{a as i}from"./chunk-IZF6DFAL.mjs";import{a as r}from"./chunk-36QXVFR5.mjs";var n=class o extends r{constructor(t,a){super(),this.raw_txn=t,this.authenticator=a}serialize(t){this.raw_txn.serialize(t),this.authenticator.serialize(t)}static deserialize(t){let a=e.deserialize(t),s=i.deserialize(t);return new o(a,s)}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-VBDMQERT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-UEKKYJGA.mjs";import{a as _}from"./chunk-JOLLCFQL.mjs";import{b as m}from"./chunk-ARGODLTZ.mjs";import{b as y}from"./chunk-ASXXZH2D.mjs";import{a as p}from"./chunk-5EN52MUT.mjs";import{b as c}from"./chunk-QRS4DGP3.mjs";import{a as S}from"./chunk-AH44UPM4.mjs";import{d as v,f as d}from"./chunk-FNLRLSGJ.mjs";import{d as C,e as h,f as w,g as k,h as T,j as b,k as O,l as q}from"./chunk-S4SEFF4K.mjs";import{b as g,c as A}from"./chunk-DUP7XY5P.mjs";import{a as l}from"./chunk-GHYE26Q5.mjs";async function M(e){let{aptosConfig:n,accountAddress:t}=e,{data:o}=await g({aptosConfig:n,originMethod:"getInfo",path:`accounts/${c.from(t).toString()}`});return o}async function go(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getModules",path:`accounts/${c.from(t).toString()}/modules`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??1e3}})}async function Ao(e){return e.options?.ledgerVersion!==void 0?P(e):S(async()=>P(e),`module-${e.accountAddress}-${e.moduleName}`,1e3*60*5)()}async function P(e){let{aptosConfig:n,accountAddress:t,moduleName:o,options:r}=e,{data:s}=await g({aptosConfig:n,originMethod:"getModule",path:`accounts/${c.from(t).toString()}/module/${o}`,params:{ledger_version:r?.ledgerVersion}});return s}async function po(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${c.from(t).toString()}/transactions`,params:{start:o?.offset,limit:o?.limit}})}async function fo(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getResources",path:`accounts/${c.from(t).toString()}/resources`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??999}})}async function K(e){let{aptosConfig:n,accountAddress:t,resourceType:o,options:r}=e,{data:s}=await g({aptosConfig:n,originMethod:"getResource",path:`accounts/${c.from(t).toString()}/resource/${o}`,params:{ledger_version:r?.ledgerVersion}});return s.data}async function Q(e){let{aptosConfig:n,authenticationKey:t,options:o}=e,r=await K({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:o}),{address_map:{handle:s}}=r,a=c.from(t);try{let i=await v({aptosConfig:n,handle:s,data:{key:a.toString(),key_type:"address",value_type:"address"},options:o});return c.from(i)}catch(i){if(i instanceof l&&i.data.error_code==="table_item_not_found")return a;throw i}}async function lo(e){let{aptosConfig:n,accountAddress:t}=e,r={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}},a=await d({aptosConfig:n,query:{query:O,variables:{where_condition:r}},originMethod:"getAccountTokensCount"});return a.current_token_ownerships_v2_aggregate.aggregate?a.current_token_ownerships_v2_aggregate.aggregate.count:0}async function yo(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(s.token_standard={_eq:o?.tokenStandard});let a={query:T,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedTokens"})).current_token_ownerships_v2}async function mo(e){let{aptosConfig:n,accountAddress:t,collectionAddress:o,options:r}=e,s=c.from(t).toStringLong(),a=c.from(o).toStringLong(),i={owner_address:{_eq:s},current_token_data:{collection_id:{_eq:a}},amount:{_gt:0}};r?.tokenStandard&&(i.token_standard={_eq:r?.tokenStandard});let u={query:b,variables:{where_condition:i,offset:r?.offset,limit:r?.limit,order_by:r?.orderBy}};return(await d({aptosConfig:n,query:u,originMethod:"getAccountOwnedTokensFromCollectionAddress"})).current_token_ownerships_v2}async function _o(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(s.current_collection={token_standard:{_eq:o?.tokenStandard}});let a={query:w,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCollectionsWithOwnedTokens"})).current_collection_ownership_v2_view}async function Co(e){let{aptosConfig:n,accountAddress:t}=e,o=c.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:q,variables:{address:o}},originMethod:"getAccountTransactionsCount"});return s.account_transactions_aggregate.aggregate?s.account_transactions_aggregate.aggregate.count:0}async function ho(e){let{aptosConfig:n,accountAddress:t,coinType:o}=e,r=c.from(t).toStringLong(),s=await I({aptosConfig:n,accountAddress:r,options:{where:{asset_type:{_eq:o}}}});return s[0]?s[0].amount:0}async function I(e){let{aptosConfig:n,accountAddress:t,options:o}=e,r=c.from(t).toStringLong(),s={...o?.where,owner_address:{_eq:r}},a={query:h,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCoinsData"})).current_fungible_asset_balances}async function wo(e){let{aptosConfig:n,accountAddress:t}=e,o=c.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:C,variables:{address:o}},originMethod:"getAccountCoinsCount"});if(!s.current_fungible_asset_balances_aggregate.aggregate)throw Error("Failed to get the count of account coins");return s.current_fungible_asset_balances_aggregate.aggregate.count}async function ko(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()}},a={query:k,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedObjects"})).current_objects}async function To(e){let{aptosConfig:n,privateKey:t}=e,o=new _(t.publicKey());if(t instanceof m){let s=p.fromPublicKeyAndScheme({publicKey:o,scheme:2}).derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:s})}if(t instanceof y){let r=p.fromPublicKeyAndScheme({publicKey:o,scheme:2});if(await G({authKey:r,aptosConfig:n})){let u=r.derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:u,legacy:!1})}let a=p.fromPublicKeyAndScheme({publicKey:o.publicKey,scheme:0});if(await G({authKey:a,aptosConfig:n})){let u=a.derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${t}`)}async function G(e){let{aptosConfig:n,authKey:t}=e,o=await Q({aptosConfig:n,authenticationKey:t.derivedAddress()});try{return await M({aptosConfig:n,accountAddress:o}),!0}catch(r){if(r.status===404)return!1;throw new Error(`Error while looking for an account info ${o.toString()}`)}}export{M as a,go as b,Ao as c,po as d,fo as e,K as f,Q as g,lo as h,yo as i,mo as j,_o as k,Co as l,ho as m,I as n,wo as o,ko as p,To as q,G as r};
|
|
2
|
+
//# sourceMappingURL=chunk-VHANL47W.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-O3YFCZJ5.mjs";import{a as s,b as t,c as r,d as i,e as c,f as u,g as d,h as A,i as g,j as m,k as a,l as p,m as f,n as y,o as C,p as O,q as T}from"./chunk-VHANL47W.mjs";import{e as o}from"./chunk-CYNQRMO5.mjs";var l=class{constructor(e){this.config=e}async getAccountInfo(e){return s({aptosConfig:this.config,...e})}async getAccountModules(e){return t({aptosConfig:this.config,...e})}async getAccountModule(e){return r({aptosConfig:this.config,...e})}async getAccountTransactions(e){return i({aptosConfig:this.config,...e})}async getAccountResources(e){return c({aptosConfig:this.config,...e})}async getAccountResource(e){return u({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return d({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),A({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),g({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),m({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),p({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),y({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),C({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:o,...e})}async getAccountCoinAmount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),f({aptosConfig:this.config,...e})}async getAccountOwnedObjects(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),O({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return T({aptosConfig:this.config,...e})}};export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-VLNBGWGX.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as g}from"./chunk-EJBUUMWV.mjs";import{a as m}from"./chunk-DGLW7OBS.mjs";import{b as w}from"./chunk-QRS4DGP3.mjs";import{f as A}from"./chunk-FNLRLSGJ.mjs";import{t as f}from"./chunk-S4SEFF4K.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function E(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[n,t,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!E(n))throw new Error(`${n} is not valid. ${T}`);if(t&&!E(t))throw new Error(`${t} is not valid. ${T}`);return{domainName:t||n,subdomainName:t?n:void 0}}var V="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",G="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",P={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:G,custom:null,devnet:null,randomnet:null};function d(e){let n=P[e.network];if(!n)throw new Error(`The ANS contract is not deployed to ${e.network}`);return n}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function j(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function Y(e){let{aptosConfig:n,expiration:t,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(n),{domainName:N,subdomainName:l}=c(o),S=t.policy==="subdomain:independent"||t.policy==="subdomain:follow-domain";if(l&&!S)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(S&&!l)throw new Error(`Policy is set to ${t.policy} but no subdomain was provided`);if(t.policy==="domain"){let h=t.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let D=h*31536e3;return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[N,D,s,i]},options:a})}if(!l)throw new Error(`${t.policy} requires a subdomain to be provided.`);let _=await I({aptosConfig:n,name:N});if(!_)throw new Error("The domain does not exist");let x=t.policy==="subdomain:independent"?t.expirationDate:_;if(x>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[N,l,Math.round(x/1e3),t.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function I(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t);try{let i=await g({aptosConfig:n,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function K(e){let{aptosConfig:n,address:t}=e,o=d(n),r=await g({aptosConfig:n,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(t).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function W(e){let{aptosConfig:n,sender:t,name:o,options:r}=e,s=d(n);if(!o)return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function F(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function H(e){let{aptosConfig:n,sender:t,name:o,address:r,options:s}=e,i=d(n),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function J(e){let{aptosConfig:n,name:t}=e,{domainName:o,subdomainName:r=""}=c(t),a=(await A({aptosConfig:n,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r},is_active:{_eq:!0}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=y(a)),a}async function X(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountNames",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(y)}async function Z(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountDomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(y)}async function ee(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(y)}async function ne(e){let{aptosConfig:n,options:t,domain:o}=e;return(await A({aptosConfig:n,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""},is_active:{_eq:!0}}}}})).current_aptos_names.map(y)}async function C(e){let{aptosConfig:n}=e,t=d(n),[o]=await g({aptosConfig:n,payload:{function:`${t}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function te(e){let{aptosConfig:n,sender:t,name:o,years:r=1,options:s}=e,i=d(n),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function y(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,E as b,c,V as d,G as e,j as f,Y as g,I as h,K as i,W as j,F as k,H as l,J as m,X as n,Z as o,ee as p,ne as q,te as r};
|
|
2
|
+
//# sourceMappingURL=chunk-VNIABDOT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/internal/ans.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file contains the underlying implementations for exposed API surface in\n * the {@link api/name}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * name namespace and without having a dependency cycle error.\n */\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { Account, AccountAddress, AccountAddressInput } from \"../core\";\nimport { InputGenerateTransactionOptions } from \"../transactions/types\";\nimport { GetANSNameResponse, MoveAddressType, OrderByArg, PaginationArgs, WhereArg } from \"../types\";\nimport { GetNamesQuery } from \"../types/generated/operations\";\nimport { GetNames } from \"../types/generated/queries\";\nimport { CurrentAptosNamesBoolExp } from \"../types/generated/types\";\nimport { Network } from \"../utils/apiEndpoints\";\nimport { queryIndexer } from \"./general\";\nimport { view } from \"./view\";\nimport { generateTransaction } from \"./transactionSubmission\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\nexport const VALIDATION_RULES_DESCRIPTION = [\n \"A name must be between 3 and 63 characters long,\",\n \"and can only contain lowercase a-z, 0-9, and hyphens.\",\n \"A name may not start or end with a hyphen.\",\n].join(\" \");\n\n/**\n *\n * @param fragment A fragment of a name, either the domain or subdomain\n * @returns boolean indicating if the fragment is a valid fragment\n */\nexport function isValidANSSegment(fragment: string): boolean {\n if (!fragment) return false;\n if (fragment.length < 3) return false;\n if (fragment.length > 63) return false;\n // only lowercase a-z and 0-9 are allowed, along with -. a domain may not start or end with a hyphen\n if (!/^[a-z\\d][a-z\\d-]{1,61}[a-z\\d]$/.test(fragment)) return false;\n return true;\n}\n\n/**\n * Checks if an ANS name is valid or not\n *\n * @param name A string of the domain name, can include or exclude the .apt suffix\n */\nexport function isValidANSName(name: string): { domainName: string; subdomainName?: string } {\n const [first, second, ...rest] = name.replace(/\\.apt$/, \"\").split(\".\");\n\n if (rest.length > 0) {\n throw new Error(`${name} is invalid. A name can only have two parts, a domain and a subdomain separated by a \".\"`);\n }\n\n if (!isValidANSSegment(first)) {\n throw new Error(`${first} is not valid. ${VALIDATION_RULES_DESCRIPTION}`);\n }\n\n if (second && !isValidANSSegment(second)) {\n throw new Error(`${second} is not valid. ${VALIDATION_RULES_DESCRIPTION}`);\n }\n\n return {\n domainName: second || first,\n subdomainName: second ? first : undefined,\n };\n}\n\nexport const LOCAL_ANS_ACCOUNT_PK =\n process.env.ANS_TEST_ACCOUNT_PRIVATE_KEY ?? \"0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221\";\nexport const LOCAL_ANS_ACCOUNT_ADDRESS =\n process.env.ANS_TEST_ACCOUNT_ADDRESS ?? \"0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82\";\n\nconst NetworkToAnsContract: Record<Network, string | null> = {\n [Network.TESTNET]: \"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c\",\n [Network.MAINNET]: \"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c\",\n [Network.LOCAL]: LOCAL_ANS_ACCOUNT_ADDRESS,\n [Network.CUSTOM]: null,\n [Network.DEVNET]: null,\n [Network.RANDOMNET]: null,\n};\n\nfunction getRouterAddress(aptosConfig: AptosConfig): string {\n const address = NetworkToAnsContract[aptosConfig.network];\n if (!address) throw new Error(`The ANS contract is not deployed to ${aptosConfig.network}`);\n return address;\n}\n\nconst unwrapOption = <T>(option: any): T | undefined => {\n if (!!option && typeof option === \"object\" && \"vec\" in option && Array.isArray(option.vec)) {\n return option.vec[0];\n }\n\n return undefined;\n};\n\nexport async function getOwnerAddress(args: {\n aptosConfig: AptosConfig;\n name: string;\n}): Promise<AccountAddress | undefined> {\n const { aptosConfig, name } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n const { domainName, subdomainName } = isValidANSName(name);\n\n const res = await view({\n aptosConfig,\n payload: {\n function: `${routerAddress}::router::get_owner_addr`,\n functionArguments: [domainName, subdomainName],\n },\n });\n\n const owner = unwrapOption<MoveAddressType>(res[0]);\n\n return owner ? AccountAddress.from(owner) : undefined;\n}\n\nexport interface RegisterNameParameters {\n aptosConfig: AptosConfig;\n sender: Account;\n name: string;\n expiration:\n | { policy: \"domain\"; years?: 1 }\n | { policy: \"subdomain:follow-domain\" }\n | { policy: \"subdomain:independent\"; expirationDate: number };\n transferable?: boolean;\n toAddress?: AccountAddressInput;\n targetAddress?: AccountAddressInput;\n options?: InputGenerateTransactionOptions;\n}\n\nexport async function registerName(args: RegisterNameParameters): Promise<SimpleTransaction> {\n const { aptosConfig, expiration, name, sender, targetAddress, toAddress, options, transferable } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n const { domainName, subdomainName } = isValidANSName(name);\n\n const hasSubdomainPolicy =\n expiration.policy === \"subdomain:independent\" || expiration.policy === \"subdomain:follow-domain\";\n\n if (subdomainName && !hasSubdomainPolicy) {\n throw new Error(\n \"Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'\",\n );\n }\n\n if (hasSubdomainPolicy && !subdomainName) {\n throw new Error(`Policy is set to ${expiration.policy} but no subdomain was provided`);\n }\n\n if (expiration.policy === \"domain\") {\n const years = expiration.years ?? 1;\n if (years !== 1) {\n throw new Error(\"For now, names can only be registered for 1 year at a time\");\n }\n\n const secondsInYear = 31536000;\n const registrationDuration = years * secondsInYear;\n\n const transaction = await generateTransaction({\n aptosConfig,\n sender: sender.accountAddress.toString(),\n data: {\n function: `${routerAddress}::router::register_domain`,\n functionArguments: [domainName, registrationDuration, targetAddress, toAddress],\n },\n options,\n });\n\n return transaction;\n }\n\n // We are a subdomain\n if (!subdomainName) {\n throw new Error(`${expiration.policy} requires a subdomain to be provided.`);\n }\n\n const tldExpiration = await getExpiration({ aptosConfig, name: domainName });\n if (!tldExpiration) {\n throw new Error(\"The domain does not exist\");\n }\n\n const expirationDateInMillisecondsSinceEpoch =\n expiration.policy === \"subdomain:independent\" ? expiration.expirationDate : tldExpiration;\n\n if (expirationDateInMillisecondsSinceEpoch > tldExpiration) {\n throw new Error(\"The subdomain expiration time cannot be greater than the domain expiration time\");\n }\n\n const transaction = await generateTransaction({\n aptosConfig,\n sender: sender.accountAddress.toString(),\n data: {\n function: `${routerAddress}::router::register_subdomain`,\n functionArguments: [\n domainName,\n subdomainName,\n Math.round(expirationDateInMillisecondsSinceEpoch / 1000),\n expiration.policy === \"subdomain:follow-domain\" ? 1 : 0,\n !!transferable,\n targetAddress,\n toAddress,\n ],\n },\n options,\n });\n\n return transaction;\n}\n\nexport async function getExpiration(args: { aptosConfig: AptosConfig; name: string }): Promise<number | undefined> {\n const { aptosConfig, name } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n const { domainName, subdomainName } = isValidANSName(name);\n\n try {\n const res = await view({\n aptosConfig,\n payload: {\n function: `${routerAddress}::router::get_expiration`,\n functionArguments: [domainName, subdomainName],\n },\n });\n\n // Normalize expiration time from epoch seconds to epoch milliseconds\n return Number(res[0]) * 1000;\n } catch (e) {\n return undefined;\n }\n}\n\nexport async function getPrimaryName(args: {\n aptosConfig: AptosConfig;\n address: AccountAddressInput;\n}): Promise<string | undefined> {\n const { aptosConfig, address } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n\n const res = await view({\n aptosConfig,\n payload: {\n function: `${routerAddress}::router::get_primary_name`,\n functionArguments: [AccountAddress.from(address).toString()],\n },\n });\n\n const domainName = unwrapOption<MoveAddressType>(res[1]);\n const subdomainName = unwrapOption<MoveAddressType>(res[0]);\n\n if (!domainName) return undefined;\n\n return [subdomainName, domainName].filter(Boolean).join(\".\");\n}\n\nexport async function setPrimaryName(args: {\n aptosConfig: AptosConfig;\n sender: Account;\n name?: string;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, sender, name, options } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n\n if (!name) {\n const transaction = await generateTransaction({\n aptosConfig,\n sender: sender.accountAddress.toString(),\n data: {\n function: `${routerAddress}::router::clear_primary_name`,\n functionArguments: [],\n },\n options,\n });\n\n return transaction;\n }\n\n const { domainName, subdomainName } = isValidANSName(name);\n\n const transaction = await generateTransaction({\n aptosConfig,\n sender: sender.accountAddress.toString(),\n data: {\n function: `${routerAddress}::router::set_primary_name`,\n functionArguments: [domainName, subdomainName],\n },\n options,\n });\n\n return transaction;\n}\n\nexport async function getTargetAddress(args: {\n aptosConfig: AptosConfig;\n name: string;\n}): Promise<AccountAddress | undefined> {\n const { aptosConfig, name } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n const { domainName, subdomainName } = isValidANSName(name);\n\n const res = await view({\n aptosConfig,\n payload: {\n function: `${routerAddress}::router::get_target_addr`,\n functionArguments: [domainName, subdomainName],\n },\n });\n\n const target = unwrapOption<MoveAddressType>(res[0]);\n return target ? AccountAddress.from(target) : undefined;\n}\n\nexport async function setTargetAddress(args: {\n aptosConfig: AptosConfig;\n sender: Account;\n name: string;\n address: AccountAddressInput;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, sender, name, address, options } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n const { domainName, subdomainName } = isValidANSName(name);\n\n const transaction = await generateTransaction({\n aptosConfig,\n sender: sender.accountAddress.toString(),\n data: {\n function: `${routerAddress}::router::set_target_addr`,\n functionArguments: [domainName, subdomainName, address],\n },\n options,\n });\n\n return transaction;\n}\n\nexport async function getName(args: {\n aptosConfig: AptosConfig;\n name: string;\n}): Promise<GetANSNameResponse[0] | undefined> {\n const { aptosConfig, name } = args;\n const { domainName, subdomainName = \"\" } = isValidANSName(name);\n\n const where: CurrentAptosNamesBoolExp = {\n domain: { _eq: domainName },\n subdomain: { _eq: subdomainName },\n is_active: { _eq: true },\n };\n\n const data = await queryIndexer<GetNamesQuery>({\n aptosConfig,\n query: {\n query: GetNames,\n variables: {\n where_condition: where,\n limit: 1,\n },\n },\n originMethod: \"getName\",\n });\n\n // Convert the expiration_timestamp from an ISO string to milliseconds since epoch\n let res = data.current_aptos_names[0];\n if (res) {\n res = sanitizeANSName(res);\n }\n\n return res;\n}\n\ninterface QueryNamesOptions {\n options?: PaginationArgs & OrderByArg<GetANSNameResponse[0]> & WhereArg<CurrentAptosNamesBoolExp>;\n}\n\nexport interface GetAccountNamesArgs extends QueryNamesOptions {\n accountAddress: AccountAddressInput;\n}\n\nexport async function getAccountNames(\n args: { aptosConfig: AptosConfig } & GetAccountNamesArgs,\n): Promise<GetANSNameResponse> {\n const { aptosConfig, options, accountAddress } = args;\n\n const expirationDate = await getANSExpirationDate({ aptosConfig });\n\n const data = await queryIndexer<GetNamesQuery>({\n aptosConfig,\n originMethod: \"getAccountNames\",\n query: {\n query: GetNames,\n variables: {\n limit: options?.limit,\n offset: options?.offset,\n order_by: options?.orderBy,\n where_condition: {\n ...(args.options?.where ?? {}),\n owner_address: { _eq: accountAddress.toString() },\n expiration_timestamp: { _gte: expirationDate },\n },\n },\n },\n });\n\n return data.current_aptos_names.map(sanitizeANSName);\n}\n\nexport interface GetAccountDomainsArgs extends QueryNamesOptions {\n accountAddress: AccountAddressInput;\n}\n\nexport async function getAccountDomains(\n args: { aptosConfig: AptosConfig } & GetAccountDomainsArgs,\n): Promise<GetANSNameResponse> {\n const { aptosConfig, options, accountAddress } = args;\n\n const expirationDate = await getANSExpirationDate({ aptosConfig });\n\n const data = await queryIndexer<GetNamesQuery>({\n aptosConfig,\n originMethod: \"getAccountDomains\",\n query: {\n query: GetNames,\n variables: {\n limit: options?.limit,\n offset: options?.offset,\n order_by: options?.orderBy,\n where_condition: {\n ...(args.options?.where ?? {}),\n owner_address: { _eq: accountAddress.toString() },\n expiration_timestamp: { _gte: expirationDate },\n subdomain: { _eq: \"\" },\n },\n },\n },\n });\n\n return data.current_aptos_names.map(sanitizeANSName);\n}\n\nexport interface GetAccountSubdomainsArgs extends QueryNamesOptions {\n accountAddress: AccountAddressInput;\n}\n\nexport async function getAccountSubdomains(\n args: { aptosConfig: AptosConfig } & GetAccountSubdomainsArgs,\n): Promise<GetANSNameResponse> {\n const { aptosConfig, options, accountAddress } = args;\n\n const expirationDate = await getANSExpirationDate({ aptosConfig });\n\n const data = await queryIndexer<GetNamesQuery>({\n aptosConfig,\n originMethod: \"getAccountSubdomains\",\n query: {\n query: GetNames,\n variables: {\n limit: options?.limit,\n offset: options?.offset,\n order_by: options?.orderBy,\n where_condition: {\n ...(args.options?.where ?? {}),\n owner_address: { _eq: accountAddress.toString() },\n expiration_timestamp: { _gte: expirationDate },\n subdomain: { _neq: \"\" },\n },\n },\n },\n });\n\n return data.current_aptos_names.map(sanitizeANSName);\n}\n\nexport interface GetDomainSubdomainsArgs extends QueryNamesOptions {\n domain: string;\n}\n\nexport async function getDomainSubdomains(\n args: { aptosConfig: AptosConfig } & GetDomainSubdomainsArgs,\n): Promise<GetANSNameResponse> {\n const { aptosConfig, options, domain } = args;\n\n const data = await queryIndexer<GetNamesQuery>({\n aptosConfig,\n originMethod: \"getDomainSubdomains\",\n query: {\n query: GetNames,\n variables: {\n limit: options?.limit,\n offset: options?.offset,\n order_by: options?.orderBy,\n where_condition: {\n ...(args.options?.where ?? {}),\n domain: { _eq: domain },\n subdomain: { _neq: \"\" },\n is_active: { _eq: true },\n },\n },\n },\n });\n\n return data.current_aptos_names.map(sanitizeANSName);\n}\n\n/**\n * This function returns the expiration date in which a name is fully expired as\n * defined by the contract. The grace period allows for names to be past\n * expiration for a certain amount of time before they are released to the\n * public. The names will not function as normal, but the owner can renew\n * without others taking ownership of the name. At the time of writing, the\n * contract specified 30 days.\n *\n * @param args.aptosConfig an AptosConfig object\n * @returns\n */\nasync function getANSExpirationDate(args: { aptosConfig: AptosConfig }): Promise<string> {\n const { aptosConfig } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n\n const [gracePeriodInSeconds] = await view<[number]>({\n aptosConfig,\n payload: {\n function: `${routerAddress}::config::reregistration_grace_sec`,\n functionArguments: [],\n },\n });\n\n const gracePeriodInDays = gracePeriodInSeconds / 60 / 60 / 24;\n const now = () => new Date();\n return new Date(now().setDate(now().getDate() - gracePeriodInDays)).toISOString();\n}\n\nexport async function renewDomain(args: {\n aptosConfig: AptosConfig;\n sender: Account;\n name: string;\n years?: 1;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, sender, name, years = 1, options } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n const renewalDuration = years * 31536000;\n const { domainName, subdomainName } = isValidANSName(name);\n\n if (subdomainName) {\n throw new Error(\"Subdomains cannot be renewed\");\n }\n\n if (years !== 1) {\n throw new Error(\"Currently, only 1 year renewals are supported\");\n }\n\n const transaction = await generateTransaction({\n aptosConfig,\n sender: sender.accountAddress.toString(),\n data: {\n function: `${routerAddress}::router::renew_domain`,\n functionArguments: [domainName, renewalDuration],\n },\n options,\n });\n\n return transaction;\n}\n\n/**\n * The indexer returns ISO strings for expiration, however the contract works in\n * epoch milliseconds. This function converts the ISO string to epoch\n * milliseconds. In the future, if other properties need sanitization, this can\n * be extended.\n */\nfunction sanitizeANSName(name: GetANSNameResponse[0]): GetANSNameResponse[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GA,EACH,qBAAsB,IAAI,KAAKA,EAAK,oBAAoB,EAAE,QAAQ,CACpE,CACF","names":["VALIDATION_RULES_DESCRIPTION","isValidANSSegment","fragment","isValidANSName","name","first","second","rest","LOCAL_ANS_ACCOUNT_PK","LOCAL_ANS_ACCOUNT_ADDRESS","NetworkToAnsContract","getRouterAddress","aptosConfig","address","unwrapOption","option","getOwnerAddress","args","routerAddress","domainName","subdomainName","res","view","owner","AccountAddress","registerName","expiration","sender","targetAddress","toAddress","options","transferable","hasSubdomainPolicy","years","registrationDuration","generateTransaction","tldExpiration","getExpiration","expirationDateInMillisecondsSinceEpoch","getPrimaryName","setPrimaryName","getTargetAddress","target","setTargetAddress","getName","queryIndexer","GetNames","sanitizeANSName","getAccountNames","accountAddress","expirationDate","getANSExpirationDate","getAccountDomains","getAccountSubdomains","getDomainSubdomains","domain","gracePeriodInSeconds","gracePeriodInDays","now","renewDomain","renewalDuration"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h,c as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h,c as l}from"./chunk-ASXXZH2D.mjs";import{b as E}from"./chunk-4NHWV5AI.mjs";import{a as p}from"./chunk-UGPALAPN.mjs";import{a as g}from"./chunk-5EN52MUT.mjs";var o=class o extends E{constructor(r){super();let{publicKeys:e,threshold:t}=r;if(e.length>o.MAX_KEYS||e.length<o.MIN_KEYS)throw new Error(`Must have between ${o.MIN_KEYS} and ${o.MAX_KEYS} public keys, inclusive`);if(t<o.MIN_THRESHOLD||t>e.length)throw new Error(`Threshold must be between ${o.MIN_THRESHOLD} and ${e.length}, inclusive`);this.publicKeys=e,this.threshold=t}verifySignature(r){let{message:e,signature:t}=r;if(!(t instanceof y))return!1;let s=[];for(let i=0;i<4;i+=1)for(let n=0;n<8;n+=1)if((t.bitmap[i]&1<<7-n)!==0){let u=i*8+n;s.push(u)}if(s.length!==t.signatures.length)throw new Error("Bitmap and signatures length mismatch");if(s.length<this.threshold)throw new Error("Not enough signatures");for(let i=0;i<s.length;i+=1)if(!this.publicKeys[s[i]].verifySignature({message:e,signature:t.signatures[i]}))return!1;return!0}authKey(){return g.fromSchemeAndBytes({scheme:1,input:this.toUint8Array()})}toUint8Array(){let r=new Uint8Array(this.publicKeys.length*h.LENGTH+1);return this.publicKeys.forEach((e,t)=>{r.set(e.toUint8Array(),t*h.LENGTH)}),r[this.publicKeys.length*h.LENGTH]=this.threshold,r}serialize(r){r.serializeBytes(this.toUint8Array())}static deserialize(r){let e=r.deserializeBytes(),t=e[e.length-1],s=[];for(let i=0;i<e.length-1;i+=h.LENGTH){let n=i;s.push(new h(e.subarray(n,n+h.LENGTH)))}return new o({publicKeys:s,threshold:t})}};o.MAX_KEYS=32,o.MIN_KEYS=2,o.MIN_THRESHOLD=1;var d=o,a=class a extends p{constructor(r){super();let{signatures:e,bitmap:t}=r;if(e.length>a.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${a.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=e,!(t instanceof Uint8Array))this.bitmap=a.createBitmap({bits:t});else{if(t.length!==a.BITMAP_LEN)throw new Error(`"bitmap" length should be ${a.BITMAP_LEN}`);this.bitmap=t}}toUint8Array(){let r=new Uint8Array(this.signatures.length*l.LENGTH+a.BITMAP_LEN);return this.signatures.forEach((e,t)=>{r.set(e.toUint8Array(),t*l.LENGTH)}),r.set(this.bitmap,this.signatures.length*l.LENGTH),r}serialize(r){r.serializeBytes(this.toUint8Array())}static deserialize(r){let e=r.deserializeBytes(),t=e.subarray(e.length-4),s=[];for(let i=0;i<e.length-t.length;i+=l.LENGTH){let n=i;s.push(new l(e.subarray(n,n+l.LENGTH)))}return new a({signatures:s,bitmap:t})}static createBitmap(r){let{bits:e}=r,t=128,s=new Uint8Array([0,0,0,0]),i=new Set;return e.forEach((n,c)=>{if(n>=a.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${a.MAX_SIGNATURES_SUPPORTED-1}.`);if(i.has(n))throw new Error("Duplicate bits detected.");if(c>0&&n<=e[c-1])throw new Error("The bits need to be sorted in ascending order.");i.add(n);let u=Math.floor(n/8),b=s[u];b|=t>>n%8,s[u]=b}),s}};a.MAX_SIGNATURES_SUPPORTED=32,a.BITMAP_LEN=4;var y=a;export{d as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-XDXI3TRT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as b,b as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as b,b as p}from"./chunk-XDXI3TRT.mjs";import{a as h}from"./chunk-EV75CYGN.mjs";import{a as g,b as c}from"./chunk-JOLLCFQL.mjs";import{a as y,c as d}from"./chunk-ASXXZH2D.mjs";import{a as o}from"./chunk-36QXVFR5.mjs";var r=class extends o{static deserialize(i){let e=i.deserializeUleb128AsU32();switch(e){case 0:return n.load(i);case 1:return a.load(i);case 2:return u.load(i);case 3:return l.load(i);default:throw new Error(`Unknown variant index for AccountAuthenticator: ${e}`)}}isEd25519(){return this instanceof n}isMultiEd25519(){return this instanceof a}isSingleKey(){return this instanceof u}isMultiKey(){return this instanceof l}},n=class s extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(0),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=y.deserialize(i),t=d.deserialize(i);return new s(e,t)}},a=class s extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(1),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=b.deserialize(i),t=p.deserialize(i);return new s(e,t)}},u=class s extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(2),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=g.deserialize(i),t=c.deserialize(i);return new s(e,t)}},l=class s extends r{constructor(i,e,t){super(),this.public_keys=i,this.signatures=e,this.signatures_bitmap=t}serialize(i){i.serializeU32AsUleb128(3),this.public_keys.serialize(i),i.serializeVector(this.signatures),i.serializeBytes(this.signatures_bitmap)}static load(i){let e=h.deserialize(i),t=i.deserializeVector(c),A=i.deserializeBytes();return new s(e,t,A)}};export{r as a,n as b,a as c,u as d,l as e};
|
|
2
|
+
//# sourceMappingURL=chunk-XX5J7KKC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-EJBUUMWV.mjs";import{a as o,b as s,c as t,d as r,e as n,f as i,h as a,i as g}from"./chunk-FNLRLSGJ.mjs";var p=class{constructor(e){this.config=e}async getLedgerInfo(){return o({aptosConfig:this.config})}async getChainId(){return(await this.getLedgerInfo()).chain_id}async getBlockByVersion(e){return s({aptosConfig:this.config,...e})}async getBlockByHeight(e){return t({aptosConfig:this.config,...e})}async getTableItem(e){return r({aptosConfig:this.config,...e})}async view(e){return c({aptosConfig:this.config,...e})}async getChainTopUserTransactions(e){return n({aptosConfig:this.config,...e})}async queryIndexer(e){return i({aptosConfig:this.config,...e})}async getIndexerLastSuccessVersion(){return a({aptosConfig:this.config})}async getProcessorStatus(e){return g({aptosConfig:this.config,processorType:e})}};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YG6YYQRG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-DGLW7OBS.mjs";import{c}from"./chunk-MJPUASSD.mjs";import{f as g,i as A}from"./chunk-U3YYSIIT.mjs";import{f as o}from"./chunk-FNLRLSGJ.mjs";import{o as a,r,s as u}from"./chunk-S4SEFF4K.mjs";async function G(t){let{aptosConfig:s,options:e}=t,n={query:u,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetMetadata"})).fungible_asset_metadata}async function h(t){let{aptosConfig:s,options:e}=t,n={query:r,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetActivities"})).fungible_asset_activities}async function M(t){let{aptosConfig:s,options:e}=t,n={query:a,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getCurrentFungibleAssetBalances"})).current_fungible_asset_balances}var b={typeParameters:[],parameters:[c("0x1::object::Object"),new A,new g]};async function x(t){let{aptosConfig:s,sender:e,fungibleAssetMetadataAddress:n,recipient:i,amount:l,options:f}=t;return p({aptosConfig:s,sender:e.accountAddress,data:{function:"0x1::primary_fungible_store::transfer",typeArguments:["0x1::fungible_asset::Metadata"],functionArguments:[n,i,l],abi:b},options:f})}export{G as a,h as b,M as c,x as d};
|
|
2
|
+
//# sourceMappingURL=chunk-YIGDWPGM.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/internal/fungibleAsset.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file contains the underlying implementations for exposed API surface in\n * the {@link api/fungible_asset}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * fungible_asset namespace and without having a dependency cycle error.\n */\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport {\n AnyNumber,\n GetCurrentFungibleAssetBalancesResponse,\n GetFungibleAssetActivitiesResponse,\n GetFungibleAssetMetadataResponse,\n PaginationArgs,\n WhereArg,\n} from \"../types\";\nimport { queryIndexer } from \"./general\";\nimport {\n GetCurrentFungibleAssetBalances,\n GetFungibleAssetActivities,\n GetFungibleAssetMetadata,\n} from \"../types/generated/queries\";\nimport {\n GetCurrentFungibleAssetBalancesQuery,\n GetFungibleAssetActivitiesQuery,\n GetFungibleAssetMetadataQuery,\n} from \"../types/generated/operations\";\nimport {\n CurrentFungibleAssetBalancesBoolExp,\n FungibleAssetActivitiesBoolExp,\n FungibleAssetMetadataBoolExp,\n} from \"../types/generated/types\";\nimport { Account, AccountAddress } from \"../core\";\nimport {\n EntryFunctionABI,\n InputGenerateTransactionOptions,\n parseTypeTag,\n TypeTagAddress,\n TypeTagU64,\n} from \"../transactions\";\nimport { generateTransaction } from \"./transactionSubmission\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\nexport async function getFungibleAssetMetadata(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs & WhereArg<FungibleAssetMetadataBoolExp>;\n}): Promise<GetFungibleAssetMetadataResponse> {\n const { aptosConfig, options } = args;\n\n const graphqlQuery = {\n query: GetFungibleAssetMetadata,\n variables: {\n where_condition: options?.where,\n limit: options?.limit,\n offset: options?.offset,\n },\n };\n\n const data = await queryIndexer<GetFungibleAssetMetadataQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getFungibleAssetMetadata\",\n });\n\n return data.fungible_asset_metadata;\n}\n\nexport async function getFungibleAssetActivities(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs & WhereArg<FungibleAssetActivitiesBoolExp>;\n}): Promise<GetFungibleAssetActivitiesResponse> {\n const { aptosConfig, options } = args;\n\n const graphqlQuery = {\n query: GetFungibleAssetActivities,\n variables: {\n where_condition: options?.where,\n limit: options?.limit,\n offset: options?.offset,\n },\n };\n\n const data = await queryIndexer<GetFungibleAssetActivitiesQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getFungibleAssetActivities\",\n });\n\n return data.fungible_asset_activities;\n}\n\nexport async function getCurrentFungibleAssetBalances(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs & WhereArg<CurrentFungibleAssetBalancesBoolExp>;\n}): Promise<GetCurrentFungibleAssetBalancesResponse> {\n const { aptosConfig, options } = args;\n\n const graphqlQuery = {\n query: GetCurrentFungibleAssetBalances,\n variables: {\n where_condition: options?.where,\n limit: options?.limit,\n offset: options?.offset,\n },\n };\n\n const data = await queryIndexer<GetCurrentFungibleAssetBalancesQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getCurrentFungibleAssetBalances\",\n });\n\n return data.current_fungible_asset_balances;\n}\n\nconst faTransferAbi: EntryFunctionABI = {\n typeParameters: [],\n parameters: [parseTypeTag(\"0x1::object::Object\"), new TypeTagAddress(), new TypeTagU64()],\n};\n\nexport async function transferFungibleAsset(args: {\n aptosConfig: AptosConfig;\n sender: Account;\n fungibleAssetMetadataAddress: AccountAddress;\n recipient: AccountAddress;\n amount: AnyNumber;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, sender, fungibleAssetMetadataAddress, recipient, amount, options } = args;\n return generateTransaction({\n aptosConfig,\n sender: sender.accountAddress,\n data: {\n function: \"0x1::primary_fungible_store::transfer\",\n typeArguments: [\"0x1::fungible_asset::Metadata\"],\n functionArguments: [fungibleAssetMetadataAddress, recipient, amount],\n abi: faTransferAbi,\n },\n options,\n });\n}\n"],"mappings":"wNA8CA,eAAsBA,EAAyBC,EAGD,CAC5C,GAAM,CAAE,YAAAC,EAAa,QAAAC,CAAQ,EAAIF,EAE3BG,EAAe,CACnB,MAAOC,EACP,UAAW,CACT,gBAAiBF,GAAS,MAC1B,MAAOA,GAAS,MAChB,OAAQA,GAAS,MACnB,CACF,EAQA,OANa,MAAMG,EAA4C,CAC7D,YAAAJ,EACA,MAAOE,EACP,aAAc,0BAChB,CAAC,GAEW,uBACd,CAEA,eAAsBG,EAA2BN,EAGD,CAC9C,GAAM,CAAE,YAAAC,EAAa,QAAAC,CAAQ,EAAIF,EAE3BG,EAAe,CACnB,MAAOI,EACP,UAAW,CACT,gBAAiBL,GAAS,MAC1B,MAAOA,GAAS,MAChB,OAAQA,GAAS,MACnB,CACF,EAQA,OANa,MAAMG,EAA8C,CAC/D,YAAAJ,EACA,MAAOE,EACP,aAAc,4BAChB,CAAC,GAEW,yBACd,CAEA,eAAsBK,EAAgCR,EAGD,CACnD,GAAM,CAAE,YAAAC,EAAa,QAAAC,CAAQ,EAAIF,EAE3BG,EAAe,CACnB,MAAOM,EACP,UAAW,CACT,gBAAiBP,GAAS,MAC1B,MAAOA,GAAS,MAChB,OAAQA,GAAS,MACnB,CACF,EAQA,OANa,MAAMG,EAAmD,CACpE,YAAAJ,EACA,MAAOE,EACP,aAAc,iCAChB,CAAC,GAEW,+BACd,CAEA,IAAMO,EAAkC,CACtC,eAAgB,CAAC,EACjB,WAAY,CAACC,EAAa,qBAAqB,EAAG,IAAIC,EAAkB,IAAIC,CAAY,CAC1F,EAEA,eAAsBC,EAAsBd,EAOb,CAC7B,GAAM,CAAE,YAAAC,EAAa,OAAAc,EAAQ,6BAAAC,EAA8B,UAAAC,EAAW,OAAAC,EAAQ,QAAAhB,CAAQ,EAAIF,EAC1F,OAAOmB,EAAoB,CACzB,YAAAlB,EACA,OAAQc,EAAO,eACf,KAAM,CACJ,SAAU,wCACV,cAAe,CAAC,+BAA+B,EAC/C,kBAAmB,CAACC,EAA8BC,EAAWC,CAAM,EACnE,IAAKR,CACP,EACA,QAAAR,CACF,CAAC,CACH","names":["getFungibleAssetMetadata","args","aptosConfig","options","graphqlQuery","GetFungibleAssetMetadata","queryIndexer","getFungibleAssetActivities","GetFungibleAssetActivities","getCurrentFungibleAssetBalances","GetCurrentFungibleAssetBalances","faTransferAbi","parseTypeTag","TypeTagAddress","TypeTagU64","transferFungibleAsset","sender","fungibleAssetMetadataAddress","recipient","amount","generateTransaction"]}
|
package/dist/esm/cli/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a
|
|
1
|
+
import"../chunk-SZKJ3TC5.mjs";import{a}from"../chunk-L54P6EGN.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-FVA2OPG4.mjs";export{a as LocalNode};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChildProcessWithoutNullStreams } from 'child_process';
|
|
2
2
|
|
|
3
3
|
declare class LocalNode {
|
|
4
|
-
readonly MAXIMUM_WAIT_TIME_SEC =
|
|
4
|
+
readonly MAXIMUM_WAIT_TIME_SEC = 75;
|
|
5
5
|
readonly READINESS_ENDPOINT = "http://127.0.0.1:8070/";
|
|
6
6
|
process: ChildProcessWithoutNullStreams | null;
|
|
7
7
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-L54P6EGN.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-FVA2OPG4.mjs";export{a as LocalNode};
|
|
2
2
|
//# sourceMappingURL=localNode.mjs.map
|
package/dist/esm/client/core.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-SWZOGZJ6.mjs";import"../chunk-CYDWEPFL.mjs";import"../chunk-GHYE26Q5.mjs";import"../chunk-NJRNZEHX.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-CXR7MOBW.mjs";import"../chunk-C67BKZND.mjs";import"../chunk-CYNQRMO5.mjs";import"../chunk-FVA2OPG4.mjs";export{b as aptosRequest,a as request};
|
|
2
2
|
//# sourceMappingURL=core.mjs.map
|
package/dist/esm/client/get.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-DUP7XY5P.mjs";import"../chunk-SWZOGZJ6.mjs";import"../chunk-CYDWEPFL.mjs";import"../chunk-GHYE26Q5.mjs";import"../chunk-NJRNZEHX.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-CXR7MOBW.mjs";import"../chunk-C67BKZND.mjs";import"../chunk-CYNQRMO5.mjs";import"../chunk-FVA2OPG4.mjs";export{a as get,b as getAptosFullNode,c as paginateWithCursor};
|
|
2
2
|
//# sourceMappingURL=get.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-N2FKVZ4D.mjs";import{a as d,b as e,c as f}from"../chunk-
|
|
1
|
+
import"../chunk-N2FKVZ4D.mjs";import{a as d,b as e,c as f}from"../chunk-DUP7XY5P.mjs";import{a as g,b as h,c as i,d as j}from"../chunk-CAGDOGXS.mjs";import{a as b,b as c}from"../chunk-SWZOGZJ6.mjs";import"../chunk-CYDWEPFL.mjs";import{a}from"../chunk-GHYE26Q5.mjs";import"../chunk-NJRNZEHX.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-CXR7MOBW.mjs";import"../chunk-C67BKZND.mjs";import"../chunk-CYNQRMO5.mjs";import"../chunk-FVA2OPG4.mjs";export{a as AptosApiError,c as aptosRequest,d as get,e as getAptosFullNode,f as paginateWithCursor,g as post,j as postAptosFaucet,h as postAptosFullNode,i as postAptosIndexer,b as request};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/client/post.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-CAGDOGXS.mjs";import"../chunk-SWZOGZJ6.mjs";import"../chunk-CYDWEPFL.mjs";import"../chunk-GHYE26Q5.mjs";import"../chunk-NJRNZEHX.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-CXR7MOBW.mjs";import"../chunk-C67BKZND.mjs";import"../chunk-CYNQRMO5.mjs";import"../chunk-FVA2OPG4.mjs";export{a as post,d as postAptosFaucet,b as postAptosFullNode,c as postAptosIndexer};
|
|
2
2
|
//# sourceMappingURL=post.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-UEKKYJGA.mjs";import"../../chunk-QJAI7DNA.mjs";import"../../chunk-RIUFW2OG.mjs";import"../../chunk-XX5J7KKC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-XDXI3TRT.mjs";import"../../chunk-EV75CYGN.mjs";import"../../chunk-JOLLCFQL.mjs";import"../../chunk-ARGODLTZ.mjs";import"../../chunk-ASXXZH2D.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Account};
|
|
2
2
|
//# sourceMappingURL=Account.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-QJAI7DNA.mjs";import"../../chunk-XX5J7KKC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-XDXI3TRT.mjs";import"../../chunk-EV75CYGN.mjs";import"../../chunk-JOLLCFQL.mjs";import"../../chunk-ARGODLTZ.mjs";import"../../chunk-ASXXZH2D.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Ed25519Account};
|
|
2
2
|
//# sourceMappingURL=Ed25519Account.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-RIUFW2OG.mjs";import"../../chunk-XX5J7KKC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-XDXI3TRT.mjs";import"../../chunk-EV75CYGN.mjs";import"../../chunk-JOLLCFQL.mjs";import"../../chunk-ARGODLTZ.mjs";import"../../chunk-ASXXZH2D.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as SingleKeyAccount};
|
|
2
2
|
//# sourceMappingURL=SingleKeyAccount.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as Account, e as CreateAccountFromPrivateKeyArgs, C as CreateEd25519AccountFromPrivateKeyArgs, c as CreateEd25519SingleKeyAccountFromPrivateKeyArgs, d as CreateSingleKeyAccountFromPrivateKeyArgs, b as Ed25519Account, E as Ed25519SignerConstructorArgs, a as Ed25519SignerFromDerivationPathArgs, h as GenerateAccountArgs, G as GenerateEd25519AccountArgs, f as GenerateEd25519SingleKeyAccountArgs, g as GenerateSingleKeyAccountArgs, P as PrivateKeyFromDerivationPathArgs, l as SingleKeyAccount, S as SingleKeySignerConstructorArgs, j as SingleKeySignerFromDerivationPathArgs, i as SingleKeySignerGenerateArgs, V as VerifyEd25519SignatureArgs, k as VerifySingleKeySignatureArgs } from '../../Ed25519Account-DHqzsb8B.mjs';
|
|
2
|
-
export { createObjectAddress, createTokenAddress } from './utils/address.mjs';
|
|
2
|
+
export { createObjectAddress, createResourceAddress, createTokenAddress } from './utils/address.mjs';
|
|
3
3
|
import '../../transactions/authenticator/account.mjs';
|
|
4
4
|
import '../../bcs/deserializer.mjs';
|
|
5
5
|
import '../../types/index.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import{a as d,b as e}from"../../chunk-
|
|
1
|
+
import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import{a as d,b as e,c as f}from"../../chunk-KAGLWBIJ.mjs";import{a as c}from"../../chunk-UEKKYJGA.mjs";import{a}from"../../chunk-QJAI7DNA.mjs";import{a as b}from"../../chunk-RIUFW2OG.mjs";import"../../chunk-XX5J7KKC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-XDXI3TRT.mjs";import"../../chunk-EV75CYGN.mjs";import"../../chunk-JOLLCFQL.mjs";import"../../chunk-ARGODLTZ.mjs";import"../../chunk-ASXXZH2D.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{c as Account,a as Ed25519Account,b as SingleKeyAccount,d as createObjectAddress,e as createResourceAddress,f as createTokenAddress};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -19,6 +19,15 @@ import '../../../transactions/instances/transactionArgument.mjs';
|
|
|
19
19
|
* @returns The object account address
|
|
20
20
|
*/
|
|
21
21
|
declare const createObjectAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
|
|
22
|
+
/**
|
|
23
|
+
* Creates an resource address from creator address and seed
|
|
24
|
+
*
|
|
25
|
+
* @param creatorAddress The creator account address
|
|
26
|
+
* @param seed The seed in either Uint8Array | string type
|
|
27
|
+
*
|
|
28
|
+
* @returns The resource account address
|
|
29
|
+
*/
|
|
30
|
+
declare const createResourceAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
|
|
22
31
|
/**
|
|
23
32
|
* Creates a token object address from creator address, collection name and token name
|
|
24
33
|
*
|
|
@@ -30,4 +39,4 @@ declare const createObjectAddress: (creatorAddress: AccountAddress, seed: Uint8A
|
|
|
30
39
|
*/
|
|
31
40
|
declare const createTokenAddress: (creatorAddress: AccountAddress, collectionName: string, tokenName: string) => AccountAddress;
|
|
32
41
|
|
|
33
|
-
export { createObjectAddress, createTokenAddress };
|
|
42
|
+
export { createObjectAddress, createResourceAddress, createTokenAddress };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../../chunk-
|
|
1
|
+
import{a,b,c}from"../../../chunk-KAGLWBIJ.mjs";import"../../../chunk-QRS4DGP3.mjs";import"../../../chunk-36QXVFR5.mjs";import"../../../chunk-BCUSI3N6.mjs";import"../../../chunk-LG7RJQ57.mjs";import"../../../chunk-56CNRT2K.mjs";import"../../../chunk-NJRNZEHX.mjs";import"../../../chunk-4WPQQPUF.mjs";import"../../../chunk-FVA2OPG4.mjs";export{a as createObjectAddress,b as createResourceAddress,c as createTokenAddress};
|
|
2
2
|
//# sourceMappingURL=address.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createObjectAddress, createTokenAddress } from './address.mjs';
|
|
1
|
+
export { createObjectAddress, createResourceAddress, createTokenAddress } from './address.mjs';
|
|
2
2
|
import '../../accountAddress.mjs';
|
|
3
3
|
import '../../../bcs/serializer.mjs';
|
|
4
4
|
import '../../hex.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../../chunk-4QMXOWHP.mjs";import{a,b}from"../../../chunk-
|
|
1
|
+
import"../../../chunk-4QMXOWHP.mjs";import{a,b,c}from"../../../chunk-KAGLWBIJ.mjs";import"../../../chunk-QRS4DGP3.mjs";import"../../../chunk-36QXVFR5.mjs";import"../../../chunk-BCUSI3N6.mjs";import"../../../chunk-LG7RJQ57.mjs";import"../../../chunk-56CNRT2K.mjs";import"../../../chunk-NJRNZEHX.mjs";import"../../../chunk-4WPQQPUF.mjs";import"../../../chunk-FVA2OPG4.mjs";export{a as createObjectAddress,b as createResourceAddress,c as createTokenAddress};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-QRS4DGP3.mjs";import"../chunk-36QXVFR5.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NJRNZEHX.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{b as AccountAddress,a as AddressInvalidReason};
|
|
2
2
|
//# sourceMappingURL=accountAddress.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-5EN52MUT.mjs";import"../chunk-QRS4DGP3.mjs";import"../chunk-36QXVFR5.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NJRNZEHX.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{a as AuthenticationKey};
|
|
2
2
|
//# sourceMappingURL=authenticationKey.mjs.map
|
|
@@ -40,7 +40,7 @@ declare class Ed25519PublicKey extends AccountPublicKey {
|
|
|
40
40
|
constructor(hexInput: HexInput);
|
|
41
41
|
/**
|
|
42
42
|
* Verifies a signed data with a public key
|
|
43
|
-
* @param args.message a signed message
|
|
43
|
+
* @param args.message a signed message as a Hex string or Uint8Array
|
|
44
44
|
* @param args.signature the signature of the message
|
|
45
45
|
*/
|
|
46
46
|
verifySignature(args: VerifySignatureArgs): boolean;
|
|
@@ -119,7 +119,7 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
|
|
|
119
119
|
/**
|
|
120
120
|
* Sign the given message with the private key.
|
|
121
121
|
*
|
|
122
|
-
* @param message
|
|
122
|
+
* @param message a message as a string or Uint8Array
|
|
123
123
|
* @returns Signature
|
|
124
124
|
*/
|
|
125
125
|
sign(message: HexInput): Ed25519Signature;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-ASXXZH2D.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as Ed25519PrivateKey,a as Ed25519PublicKey,c as Ed25519Signature};
|
|
2
2
|
//# sourceMappingURL=ed25519.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import{a as q,b as r}from"../../chunk-
|
|
1
|
+
import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import{a as q,b as r}from"../../chunk-XDXI3TRT.mjs";import{a as x,b as y}from"../../chunk-EV75CYGN.mjs";import{a as v,b as w}from"../../chunk-JOLLCFQL.mjs";import{a as s,b as t,c as u}from"../../chunk-ARGODLTZ.mjs";import{a as n,b as o,c as p}from"../../chunk-ASXXZH2D.mjs";import{a as k,b as l}from"../../chunk-4NHWV5AI.mjs";import{a as m}from"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import{a,b,c,d,e,f,g,h,i,j}from"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as APTOS_BIP44_REGEX,a as APTOS_HARDENED_REGEX,l as AccountPublicKey,v as AnyPublicKey,w as AnySignature,h as CKDPriv,o as Ed25519PrivateKey,n as Ed25519PublicKey,p as Ed25519Signature,d as HARDENED_OFFSET,c as KeyType,q as MultiEd25519PublicKey,r as MultiEd25519Signature,x as MultiKey,y as MultiKeySignature,k as PublicKey,t as Secp256k1PrivateKey,s as Secp256k1PublicKey,u as Secp256k1Signature,m as Signature,g as deriveKey,e as isValidBIP44Path,f as isValidHardenedPath,j as mnemonicToSeed,i as splitPath};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-XDXI3TRT.mjs";import"../../chunk-ASXXZH2D.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as MultiEd25519PublicKey,b as MultiEd25519Signature};
|
|
2
2
|
//# sourceMappingURL=multiEd25519.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-EV75CYGN.mjs";import"../../chunk-JOLLCFQL.mjs";import"../../chunk-ARGODLTZ.mjs";import"../../chunk-ASXXZH2D.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as MultiKey,b as MultiKeySignature};
|
|
2
2
|
//# sourceMappingURL=multiKey.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-4NHWV5AI.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as AccountPublicKey,a as PublicKey};
|
|
2
2
|
//# sourceMappingURL=publicKey.mjs.map
|
|
@@ -84,7 +84,7 @@ declare class Secp256k1PrivateKey extends Serializable implements PrivateKey {
|
|
|
84
84
|
/**
|
|
85
85
|
* Sign the given message with the private key.
|
|
86
86
|
*
|
|
87
|
-
* @param message
|
|
87
|
+
* @param message a message as a string or Uint8Array
|
|
88
88
|
* @returns Signature
|
|
89
89
|
*/
|
|
90
90
|
sign(message: HexInput): Secp256k1Signature;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-ARGODLTZ.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as Secp256k1PrivateKey,a as Secp256k1PublicKey,c as Secp256k1Signature};
|
|
2
2
|
//# sourceMappingURL=secp256k1.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-UGPALAPN.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Signature};
|
|
2
2
|
//# sourceMappingURL=signature.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-JOLLCFQL.mjs";import"../../chunk-ARGODLTZ.mjs";import"../../chunk-ASXXZH2D.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as AnyPublicKey,b as AnySignature};
|
|
2
2
|
//# sourceMappingURL=singleKey.mjs.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HexInput } from '../../types/index.mjs';
|
|
2
|
+
import '../../utils/apiEndpoints.mjs';
|
|
3
|
+
import '../../types/indexer.mjs';
|
|
4
|
+
import '../../types/generated/operations.mjs';
|
|
5
|
+
import '../../types/generated/types.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Helper function to convert a message to sign or to verify to a valid message input
|
|
9
|
+
*
|
|
10
|
+
* @param message a message as a string or Uint8Array
|
|
11
|
+
*
|
|
12
|
+
* @returns a valid HexInput - string or Uint8Array
|
|
13
|
+
*/
|
|
14
|
+
declare const convertSigningMessage: (message: HexInput) => HexInput;
|
|
15
|
+
|
|
16
|
+
export { convertSigningMessage };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/esm/core/hex.d.mts
CHANGED
|
@@ -36,7 +36,7 @@ declare enum HexInvalidReason {
|
|
|
36
36
|
* with a leading 0x prefix, regardless of what the input format was.
|
|
37
37
|
*
|
|
38
38
|
* These are some other ways to chain the functions together:
|
|
39
|
-
* - `Hex.
|
|
39
|
+
* - `Hex.fromHexString({ hexInput: "0x1f" }).toUint8Array()`
|
|
40
40
|
* - `new Hex([1, 3]).toStringWithoutPrefix()`
|
|
41
41
|
*/
|
|
42
42
|
declare class Hex {
|
|
@@ -73,7 +73,7 @@ declare class Hex {
|
|
|
73
73
|
*
|
|
74
74
|
* @returns Hex
|
|
75
75
|
*/
|
|
76
|
-
static
|
|
76
|
+
static fromHexString(str: string): Hex;
|
|
77
77
|
/**
|
|
78
78
|
* Static method to convert an instance of HexInput to Hex
|
|
79
79
|
*
|
package/dist/esm/core/hex.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-FVA2OPG4.mjs";export{b as Hex,a as HexInvalidReason};
|
|
2
2
|
//# sourceMappingURL=hex.mjs.map
|