@aptos-labs/ts-sdk 1.28.0-zeta.2 → 1.28.0-zeta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/index.js +3 -3
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccountCommon.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/{chunk-IBAA7T35.mjs → chunk-34RQZPSM.mjs} +2 -2
- package/dist/esm/{chunk-6BXB4PLA.mjs → chunk-4I6IUAHQ.mjs} +2 -2
- package/dist/esm/{chunk-QCUNTB7G.mjs → chunk-4WAH2Y5E.mjs} +2 -2
- package/dist/esm/{chunk-2XLMOIBB.mjs → chunk-5HWJ3SN4.mjs} +2 -2
- package/dist/esm/{chunk-I7CSJMDX.mjs → chunk-5RNKD3GW.mjs} +2 -2
- package/dist/esm/{chunk-LOLHWM3E.mjs → chunk-6B65YWGD.mjs} +2 -2
- package/dist/esm/chunk-74EWOTWQ.mjs +2 -0
- package/dist/esm/chunk-74EWOTWQ.mjs.map +1 -0
- package/dist/esm/{chunk-56KUTRUI.mjs → chunk-7BPKOPP7.mjs} +2 -2
- package/dist/esm/{chunk-G76BSSWS.mjs → chunk-7T5CUI2H.mjs} +2 -2
- package/dist/esm/{chunk-CSK46KWT.mjs → chunk-7V6TRMEJ.mjs} +2 -2
- package/dist/esm/{chunk-VTEOS4PS.mjs → chunk-AE5KXM2X.mjs} +2 -2
- package/dist/esm/{chunk-QEPPCEFH.mjs → chunk-AERLYJPT.mjs} +2 -2
- package/dist/esm/{chunk-R5QDWL5W.mjs → chunk-ASQIKTEF.mjs} +2 -2
- package/dist/esm/{chunk-ADPKXACB.mjs → chunk-BC5BEOKM.mjs} +2 -2
- package/dist/esm/{chunk-4JMLZZFL.mjs → chunk-BJJBW6WH.mjs} +2 -2
- package/dist/esm/{chunk-US5DBLWO.mjs → chunk-BQPQLOIW.mjs} +2 -2
- package/dist/esm/{chunk-5VQK4F5X.mjs → chunk-C5JQQTMI.mjs} +2 -2
- package/dist/esm/{chunk-5VQK4F5X.mjs.map → chunk-C5JQQTMI.mjs.map} +1 -1
- package/dist/esm/{chunk-FR6MEI36.mjs → chunk-CFTY4P5C.mjs} +2 -2
- package/dist/esm/{chunk-E2I4A5FG.mjs → chunk-DJVPIZ2I.mjs} +2 -2
- package/dist/esm/{chunk-YKWRPFAN.mjs → chunk-DYMN66K5.mjs} +2 -2
- package/dist/esm/{chunk-SINSCI7V.mjs → chunk-E2WOZVJX.mjs} +2 -2
- package/dist/esm/{chunk-XFG6LGA6.mjs → chunk-FDD6WNN6.mjs} +2 -2
- package/dist/esm/{chunk-ZOEZVSPX.mjs → chunk-FDTLBR6D.mjs} +2 -2
- package/dist/esm/{chunk-QRI5UKKN.mjs → chunk-GKRIMGKW.mjs} +2 -2
- package/dist/esm/{chunk-ILZVHKJZ.mjs → chunk-HK3FJVVM.mjs} +2 -2
- package/dist/esm/{chunk-4SEHAXB2.mjs → chunk-HUDDA4FG.mjs} +2 -2
- package/dist/esm/{chunk-SRZWWYZP.mjs → chunk-I3ZR4HXK.mjs} +2 -2
- package/dist/esm/{chunk-GVAZZ3UZ.mjs → chunk-K7ZPRL7C.mjs} +2 -2
- package/dist/esm/{chunk-4UB6MXQH.mjs → chunk-LICJI4D2.mjs} +2 -2
- package/dist/esm/{chunk-NK2VQHI7.mjs → chunk-MVTR6HU6.mjs} +2 -2
- package/dist/esm/{chunk-MNT6KBEF.mjs → chunk-MYRN7MDF.mjs} +2 -2
- package/dist/esm/{chunk-MJPZBN4E.mjs → chunk-ND23H3AK.mjs} +2 -2
- package/dist/esm/{chunk-3PJXUJEB.mjs → chunk-NGIPNL7N.mjs} +2 -2
- package/dist/esm/{chunk-TZWHQEAZ.mjs → chunk-NOVJ2ROD.mjs} +2 -2
- package/dist/esm/{chunk-VGBIPXYG.mjs → chunk-O3SVNTWW.mjs} +2 -2
- package/dist/esm/{chunk-VXG7T3TR.mjs → chunk-OOVNFKA6.mjs} +2 -2
- package/dist/esm/{chunk-D2JMUPS3.mjs → chunk-PBMXWRZG.mjs} +2 -2
- package/dist/esm/{chunk-CRTGCAMB.mjs → chunk-PEYLPXU6.mjs} +2 -2
- package/dist/esm/{chunk-D7W3LMWB.mjs → chunk-Q5BCQFS2.mjs} +2 -2
- package/dist/esm/{chunk-76QOH2OW.mjs → chunk-QTTDBQAJ.mjs} +2 -2
- package/dist/esm/{chunk-57VN4QFR.mjs → chunk-SVO6PVAX.mjs} +2 -2
- package/dist/esm/{chunk-64HK4IEO.mjs → chunk-TC3CMU7D.mjs} +2 -2
- package/dist/esm/{chunk-ILVZ3RHG.mjs → chunk-TV62D5OU.mjs} +2 -2
- package/dist/esm/{chunk-YRDU2QH5.mjs → chunk-UYYQZDVB.mjs} +2 -2
- package/dist/esm/{chunk-UZUVHKIB.mjs → chunk-V6ZSRYXI.mjs} +2 -2
- package/dist/esm/{chunk-SH6IO5EV.mjs → chunk-VVWBJKEA.mjs} +2 -2
- package/dist/esm/{chunk-LTNQQKPC.mjs → chunk-W2KQ2TSH.mjs} +2 -2
- package/dist/esm/{chunk-TLITK5YF.mjs → chunk-WM2GFECU.mjs} +2 -2
- package/dist/esm/{chunk-7DDP75LL.mjs → chunk-YACGA3YS.mjs} +2 -2
- package/dist/esm/{chunk-L2EW7RS5.mjs → chunk-YBZI6U43.mjs} +2 -2
- package/dist/esm/{chunk-FIYHMSA6.mjs → chunk-YSVXROOO.mjs} +2 -2
- package/dist/esm/{chunk-UF25MR3N.mjs → chunk-Z25D7JG2.mjs} +2 -2
- package/dist/esm/{chunk-MCZIV5GR.mjs → chunk-ZAHUEAGT.mjs} +2 -2
- package/dist/esm/{chunk-5F3DMDZI.mjs → chunk-ZASN3QQQ.mjs} +2 -2
- package/dist/esm/{chunk-4GOLPPK3.mjs → chunk-ZSHSL3US.mjs} +2 -2
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/package.json +1 -1
- package/src/internal/keyless.ts +4 -3
- package/src/utils/apiEndpoints.ts +1 -1
- package/dist/esm/chunk-RAKS5RSI.mjs +0 -2
- package/dist/esm/chunk-RAKS5RSI.mjs.map +0 -1
- /package/dist/esm/{chunk-IBAA7T35.mjs.map → chunk-34RQZPSM.mjs.map} +0 -0
- /package/dist/esm/{chunk-6BXB4PLA.mjs.map → chunk-4I6IUAHQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-QCUNTB7G.mjs.map → chunk-4WAH2Y5E.mjs.map} +0 -0
- /package/dist/esm/{chunk-2XLMOIBB.mjs.map → chunk-5HWJ3SN4.mjs.map} +0 -0
- /package/dist/esm/{chunk-I7CSJMDX.mjs.map → chunk-5RNKD3GW.mjs.map} +0 -0
- /package/dist/esm/{chunk-LOLHWM3E.mjs.map → chunk-6B65YWGD.mjs.map} +0 -0
- /package/dist/esm/{chunk-56KUTRUI.mjs.map → chunk-7BPKOPP7.mjs.map} +0 -0
- /package/dist/esm/{chunk-G76BSSWS.mjs.map → chunk-7T5CUI2H.mjs.map} +0 -0
- /package/dist/esm/{chunk-CSK46KWT.mjs.map → chunk-7V6TRMEJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-VTEOS4PS.mjs.map → chunk-AE5KXM2X.mjs.map} +0 -0
- /package/dist/esm/{chunk-QEPPCEFH.mjs.map → chunk-AERLYJPT.mjs.map} +0 -0
- /package/dist/esm/{chunk-R5QDWL5W.mjs.map → chunk-ASQIKTEF.mjs.map} +0 -0
- /package/dist/esm/{chunk-ADPKXACB.mjs.map → chunk-BC5BEOKM.mjs.map} +0 -0
- /package/dist/esm/{chunk-4JMLZZFL.mjs.map → chunk-BJJBW6WH.mjs.map} +0 -0
- /package/dist/esm/{chunk-US5DBLWO.mjs.map → chunk-BQPQLOIW.mjs.map} +0 -0
- /package/dist/esm/{chunk-FR6MEI36.mjs.map → chunk-CFTY4P5C.mjs.map} +0 -0
- /package/dist/esm/{chunk-E2I4A5FG.mjs.map → chunk-DJVPIZ2I.mjs.map} +0 -0
- /package/dist/esm/{chunk-YKWRPFAN.mjs.map → chunk-DYMN66K5.mjs.map} +0 -0
- /package/dist/esm/{chunk-SINSCI7V.mjs.map → chunk-E2WOZVJX.mjs.map} +0 -0
- /package/dist/esm/{chunk-XFG6LGA6.mjs.map → chunk-FDD6WNN6.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZOEZVSPX.mjs.map → chunk-FDTLBR6D.mjs.map} +0 -0
- /package/dist/esm/{chunk-QRI5UKKN.mjs.map → chunk-GKRIMGKW.mjs.map} +0 -0
- /package/dist/esm/{chunk-ILZVHKJZ.mjs.map → chunk-HK3FJVVM.mjs.map} +0 -0
- /package/dist/esm/{chunk-4SEHAXB2.mjs.map → chunk-HUDDA4FG.mjs.map} +0 -0
- /package/dist/esm/{chunk-SRZWWYZP.mjs.map → chunk-I3ZR4HXK.mjs.map} +0 -0
- /package/dist/esm/{chunk-GVAZZ3UZ.mjs.map → chunk-K7ZPRL7C.mjs.map} +0 -0
- /package/dist/esm/{chunk-4UB6MXQH.mjs.map → chunk-LICJI4D2.mjs.map} +0 -0
- /package/dist/esm/{chunk-NK2VQHI7.mjs.map → chunk-MVTR6HU6.mjs.map} +0 -0
- /package/dist/esm/{chunk-MNT6KBEF.mjs.map → chunk-MYRN7MDF.mjs.map} +0 -0
- /package/dist/esm/{chunk-MJPZBN4E.mjs.map → chunk-ND23H3AK.mjs.map} +0 -0
- /package/dist/esm/{chunk-3PJXUJEB.mjs.map → chunk-NGIPNL7N.mjs.map} +0 -0
- /package/dist/esm/{chunk-TZWHQEAZ.mjs.map → chunk-NOVJ2ROD.mjs.map} +0 -0
- /package/dist/esm/{chunk-VGBIPXYG.mjs.map → chunk-O3SVNTWW.mjs.map} +0 -0
- /package/dist/esm/{chunk-VXG7T3TR.mjs.map → chunk-OOVNFKA6.mjs.map} +0 -0
- /package/dist/esm/{chunk-D2JMUPS3.mjs.map → chunk-PBMXWRZG.mjs.map} +0 -0
- /package/dist/esm/{chunk-CRTGCAMB.mjs.map → chunk-PEYLPXU6.mjs.map} +0 -0
- /package/dist/esm/{chunk-D7W3LMWB.mjs.map → chunk-Q5BCQFS2.mjs.map} +0 -0
- /package/dist/esm/{chunk-76QOH2OW.mjs.map → chunk-QTTDBQAJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-57VN4QFR.mjs.map → chunk-SVO6PVAX.mjs.map} +0 -0
- /package/dist/esm/{chunk-64HK4IEO.mjs.map → chunk-TC3CMU7D.mjs.map} +0 -0
- /package/dist/esm/{chunk-ILVZ3RHG.mjs.map → chunk-TV62D5OU.mjs.map} +0 -0
- /package/dist/esm/{chunk-YRDU2QH5.mjs.map → chunk-UYYQZDVB.mjs.map} +0 -0
- /package/dist/esm/{chunk-UZUVHKIB.mjs.map → chunk-V6ZSRYXI.mjs.map} +0 -0
- /package/dist/esm/{chunk-SH6IO5EV.mjs.map → chunk-VVWBJKEA.mjs.map} +0 -0
- /package/dist/esm/{chunk-LTNQQKPC.mjs.map → chunk-W2KQ2TSH.mjs.map} +0 -0
- /package/dist/esm/{chunk-TLITK5YF.mjs.map → chunk-WM2GFECU.mjs.map} +0 -0
- /package/dist/esm/{chunk-7DDP75LL.mjs.map → chunk-YACGA3YS.mjs.map} +0 -0
- /package/dist/esm/{chunk-L2EW7RS5.mjs.map → chunk-YBZI6U43.mjs.map} +0 -0
- /package/dist/esm/{chunk-FIYHMSA6.mjs.map → chunk-YSVXROOO.mjs.map} +0 -0
- /package/dist/esm/{chunk-UF25MR3N.mjs.map → chunk-Z25D7JG2.mjs.map} +0 -0
- /package/dist/esm/{chunk-MCZIV5GR.mjs.map → chunk-ZAHUEAGT.mjs.map} +0 -0
- /package/dist/esm/{chunk-5F3DMDZI.mjs.map → chunk-ZASN3QQQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-4GOLPPK3.mjs.map → chunk-ZSHSL3US.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i,b as o,c as a,d as c,e as p,f as d,g,h as u,i as A,j as y,k as m,l,m as T,n as f,o as C,p as I,q as O,r as P,s as D,t as V,u as S,v as h,w as R,x as G}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i,b as o,c as a,d as c,e as p,f as d,g,h as u,i as A,j as y,k as m,l,m as T,n as f,o as C,p as I,q as O,r as P,s as D,t as V,u as S,v as h,w as R,x as G}from"./chunk-I3ZR4HXK.mjs";import{a as e}from"./chunk-RLGIYYI7.mjs";import{b as s}from"./chunk-EDVGFSB5.mjs";var L=class{constructor(t){this.config=t}async getCollectionData(t){await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"});let{creatorAddress:N,collectionName:_,options:n}=t,w=s.from(N),r={collection_name:{_eq:_},creator_address:{_eq:w.toStringLong()}};return n?.tokenStandard&&(r.token_standard={_eq:n?.tokenStandard??"v2"}),d({aptosConfig:this.config,options:{where:r}})}async getCollectionDataByCreatorAddressAndCollectionName(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),g({aptosConfig:this.config,...t})}async getCollectionDataByCreatorAddress(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),u({aptosConfig:this.config,...t})}async getCollectionDataByCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),A({aptosConfig:this.config,...t})}async getCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),y({aptosConfig:this.config,...t})}async getDigitalAssetData(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),i({aptosConfig:this.config,...t})}async getCurrentDigitalAssetOwnership(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),o({aptosConfig:this.config,...t})}async getOwnedDigitalAssets(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...t})}async getDigitalAssetActivity(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),c({aptosConfig:this.config,...t})}async createCollectionTransaction(t){return p({aptosConfig:this.config,...t})}async mintDigitalAssetTransaction(t){return m({aptosConfig:this.config,...t})}async transferDigitalAssetTransaction(t){return l({aptosConfig:this.config,...t})}async mintSoulBoundTransaction(t){return T({aptosConfig:this.config,...t})}async burnDigitalAssetTransaction(t){return f({aptosConfig:this.config,...t})}async freezeDigitalAssetTransaferTransaction(t){return C({aptosConfig:this.config,...t})}async unfreezeDigitalAssetTransaferTransaction(t){return I({aptosConfig:this.config,...t})}async setDigitalAssetDescriptionTransaction(t){return O({aptosConfig:this.config,...t})}async setDigitalAssetNameTransaction(t){return P({aptosConfig:this.config,...t})}async setDigitalAssetURITransaction(t){return D({aptosConfig:this.config,...t})}async addDigitalAssetPropertyTransaction(t){return V({aptosConfig:this.config,...t})}async removeDigitalAssetPropertyTransaction(t){return S({aptosConfig:this.config,...t})}async updateDigitalAssetPropertyTransaction(t){return h({aptosConfig:this.config,...t})}async addDigitalAssetTypedPropertyTransaction(t){return R({aptosConfig:this.config,...t})}async updateDigitalAssetTypedPropertyTransaction(t){return G({aptosConfig:this.config,...t})}};export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HUDDA4FG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-4UB6MXQH.mjs";import{f as M}from"./chunk-2XLMOIBB.mjs";import{c as R}from"./chunk-AZ642ORV.mjs";import{b as w,f as h,i as x,l as A,m as f,n as i,q as p,s as y}from"./chunk-5FPWLBZT.mjs";import{c as k}from"./chunk-J45FMNYT.mjs";import{A as V,m as O,y as q,z as G}from"./chunk-VHNX2NUR.mjs";import{a as _,c as d}from"./chunk-YELQZVBK.mjs";import{a as T,e as D}from"./chunk-E7VSBBQM.mjs";import{b as c}from"./chunk-EDVGFSB5.mjs";import{d as E}from"./chunk-56CNRT2K.mjs";var C={BOOLEAN:"bool",U8:"u8",U16:"u16",U32:"u32",U64:"u64",U128:"u128",U256:"u256",ADDRESS:"address",STRING:"0x1::string::String",ARRAY:"vector<u8>"},l="0x4::token::Token";async function It(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()}};return(await k({aptosConfig:o,query:{query:V,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function Pt(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()},amount:{_gt:0}};return(await k({aptosConfig:o,query:{query:G,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function bt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:c.from(n).toStringLong()},amount:{_gt:0}},s={query:G,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await k({aptosConfig:o,query:s,originMethod:"getOwnedDigitalAssets"})).current_token_ownerships_v2}async function St(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:c.from(n).toStringLong()}},s={query:q,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await k({aptosConfig:o,query:s,originMethod:"getDigitalAssetActivity"})).token_activities_v2}var F={typeParameters:[],parameters:[new i(p()),new h,new i(p()),new i(p()),new w,new w,new w,new w,new w,new w,new w,new w,new w,new h,new h]};async function Dt(t){let{aptosConfig:o,options:n,creator:e}=t;return u({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::create_collection",functionArguments:[new d(t.description),new D(t.maxSupply??E),new d(t.name),new d(t.uri),new T(t.mutableDescription??!0),new T(t.mutableRoyalty??!0),new T(t.mutableURI??!0),new T(t.mutableTokenDescription??!0),new T(t.mutableTokenName??!0),new T(t.mutableTokenProperties??!0),new T(t.mutableTokenURI??!0),new T(t.tokensBurnableByCreator??!0),new T(t.tokensFreezableByCreator??!0),new D(t.royaltyNumerator??0),new D(t.royaltyDenominator??1)],abi:F},options:n})}async function v(t){let{aptosConfig:o,options:n}=t,e=n?.where;n?.tokenStandard&&(e.token_standard={_eq:n?.tokenStandard??"v2"});let r={query:O,variables:{where_condition:e,offset:n?.offset,limit:n?.limit}};return(await k({aptosConfig:o,query:r,originMethod:"getCollectionData"})).current_collections_v2[0]}async function ht(t){let{aptosConfig:o,creatorAddress:n,collectionName:e,options:r}=t,s=c.from(n),a={collection_name:{_eq:e},creator_address:{_eq:s.toStringLong()}};return r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...r,where:a}})}async function vt(t){let{aptosConfig:o,creatorAddress:n,options:e}=t,s={creator_address:{_eq:c.from(n).toStringLong()}};return e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...e,where:s}})}async function xt(t){let{aptosConfig:o,collectionId:n,options:e}=t,s={collection_id:{_eq:c.from(n).toStringLong()}};return e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...e,where:s}})}async function Gt(t){let{creatorAddress:o,collectionName:n,options:e,aptosConfig:r}=t,s=c.from(o),a={collection_name:{_eq:n},creator_address:{_eq:s.toStringLong()}};return e?.tokenStandard&&(a.token_standard={_eq:e?.tokenStandard??"v2"}),(await v({aptosConfig:r,options:{where:a}})).collection_id}var N={typeParameters:[],parameters:[new i(p()),new i(p()),new i(p()),new i(p()),new f(new i(p())),new f(new i(p())),new f(f.u8())]};async function Bt(t){let{aptosConfig:o,options:n,creator:e,collection:r,description:s,name:a,uri:m,propertyKeys:g,propertyTypes:P,propertyValues:I}=t,b=P?.map(S=>C[S]);return u({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::mint",functionArguments:[new d(r),new d(s),new d(a),new d(m),_.MoveString(g??[]),_.MoveString(b??[]),K(I??[],b??[])],abi:N},options:n})}var Q={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new x]};async function Et(t){let{aptosConfig:o,sender:n,digitalAssetAddress:e,recipient:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x1::object::transfer",typeArguments:[s??l],functionArguments:[c.from(e),c.from(r)],abi:Q},options:a})}var Y={typeParameters:[],parameters:[new i(p()),new i(p()),new i(p()),new i(p()),new f(new i(p())),new f(new i(p())),new f(f.u8()),new x]};async function Ot(t){let{aptosConfig:o,account:n,collection:e,description:r,name:s,uri:a,recipient:m,propertyKeys:g,propertyTypes:P,propertyValues:I,options:b}=t;if(g?.length!==I?.length)throw new Error("Property keys and property values counts do not match");if(P?.length!==I?.length)throw new Error("Property types and property values counts do not match");let S=P?.map(U=>C[U]);return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::mint_soul_bound",functionArguments:[e,r,s,a,_.MoveString(g??[]),_.MoveString(S??[]),K(I??[],S??[]),m],abi:Y},options:b})}var L={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function qt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::burn",typeArguments:[r??l],functionArguments:[c.from(e)],abi:L},options:s})}var z={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function Vt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::freeze_transfer",typeArguments:[r??l],functionArguments:[e],abi:z},options:s})}var j={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function Rt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::unfreeze_transfer",typeArguments:[r??l],functionArguments:[e],abi:j},options:s})}var W={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Mt(t){let{aptosConfig:o,creator:n,description:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_description",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:W},options:a})}var X={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Kt(t){let{aptosConfig:o,creator:n,name:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_name",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Ut(t){let{aptosConfig:o,creator:n,uri:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_uri",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p()),new i(p()),f.u8()]};async function Ft(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_property",typeArguments:[m??l],functionArguments:[c.from(a),new d(e),new d(C[r]),_.U8(B(s,C[r]))],abi:J},options:g})}var Z={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Nt(t){let{aptosConfig:o,creator:n,propertyKey:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::remove_property",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:Z},options:a})}var $={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p()),new i(p()),f.u8()]};async function Qt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_property",typeArguments:[m??l],functionArguments:[c.from(a),new d(e),new d(C[r]),B(s,C[r])],abi:$},options:g})}var tt={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new i(y(new A(0))),new i(p()),new A(1)]};async function Yt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_typed_property",typeArguments:[m??l,C[r]],functionArguments:[c.from(a),new d(e),s],abi:tt},options:g})}var et={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new i(y(new A(0))),new i(p()),new A(1)]};async function Lt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_typed_property",typeArguments:[m??l,C[r]],functionArguments:[c.from(a),new d(e),s],abi:et},options:g})}function K(t,o){let n=new Array;return o.forEach((e,r)=>{n.push(B(t[r],e))}),n}function B(t,o){let n=R(o);return M(t,n,0,[]).bcsToBytes()}export{It as a,Pt as b,bt as c,St as d,Dt as e,v as f,ht as g,vt as h,xt as i,Gt as j,Bt as k,Et as l,Ot as m,qt as n,Vt as o,Rt as p,Mt as q,Kt as r,Ut as s,Ft as t,Nt as u,Qt as v,Yt as w,Lt as x};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-LICJI4D2.mjs";import{f as M}from"./chunk-5HWJ3SN4.mjs";import{c as R}from"./chunk-AZ642ORV.mjs";import{c as k}from"./chunk-J45FMNYT.mjs";import{A as V,m as O,y as q,z as G}from"./chunk-VHNX2NUR.mjs";import{b as w,f as h,i as x,l as A,m as f,n as i,q as p,s as y}from"./chunk-5FPWLBZT.mjs";import{b as c}from"./chunk-EDVGFSB5.mjs";import{a as _,c as d}from"./chunk-YELQZVBK.mjs";import{a as T,e as D}from"./chunk-E7VSBBQM.mjs";import{d as E}from"./chunk-56CNRT2K.mjs";var C={BOOLEAN:"bool",U8:"u8",U16:"u16",U32:"u32",U64:"u64",U128:"u128",U256:"u256",ADDRESS:"address",STRING:"0x1::string::String",ARRAY:"vector<u8>"},l="0x4::token::Token";async function It(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()}};return(await k({aptosConfig:o,query:{query:V,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function Pt(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()},amount:{_gt:0}};return(await k({aptosConfig:o,query:{query:G,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function bt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:c.from(n).toStringLong()},amount:{_gt:0}},s={query:G,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await k({aptosConfig:o,query:s,originMethod:"getOwnedDigitalAssets"})).current_token_ownerships_v2}async function St(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:c.from(n).toStringLong()}},s={query:q,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await k({aptosConfig:o,query:s,originMethod:"getDigitalAssetActivity"})).token_activities_v2}var F={typeParameters:[],parameters:[new i(p()),new h,new i(p()),new i(p()),new w,new w,new w,new w,new w,new w,new w,new w,new w,new h,new h]};async function Dt(t){let{aptosConfig:o,options:n,creator:e}=t;return u({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::create_collection",functionArguments:[new d(t.description),new D(t.maxSupply??E),new d(t.name),new d(t.uri),new T(t.mutableDescription??!0),new T(t.mutableRoyalty??!0),new T(t.mutableURI??!0),new T(t.mutableTokenDescription??!0),new T(t.mutableTokenName??!0),new T(t.mutableTokenProperties??!0),new T(t.mutableTokenURI??!0),new T(t.tokensBurnableByCreator??!0),new T(t.tokensFreezableByCreator??!0),new D(t.royaltyNumerator??0),new D(t.royaltyDenominator??1)],abi:F},options:n})}async function v(t){let{aptosConfig:o,options:n}=t,e=n?.where;n?.tokenStandard&&(e.token_standard={_eq:n?.tokenStandard??"v2"});let r={query:O,variables:{where_condition:e,offset:n?.offset,limit:n?.limit}};return(await k({aptosConfig:o,query:r,originMethod:"getCollectionData"})).current_collections_v2[0]}async function ht(t){let{aptosConfig:o,creatorAddress:n,collectionName:e,options:r}=t,s=c.from(n),a={collection_name:{_eq:e},creator_address:{_eq:s.toStringLong()}};return r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...r,where:a}})}async function vt(t){let{aptosConfig:o,creatorAddress:n,options:e}=t,s={creator_address:{_eq:c.from(n).toStringLong()}};return e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...e,where:s}})}async function xt(t){let{aptosConfig:o,collectionId:n,options:e}=t,s={collection_id:{_eq:c.from(n).toStringLong()}};return e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...e,where:s}})}async function Gt(t){let{creatorAddress:o,collectionName:n,options:e,aptosConfig:r}=t,s=c.from(o),a={collection_name:{_eq:n},creator_address:{_eq:s.toStringLong()}};return e?.tokenStandard&&(a.token_standard={_eq:e?.tokenStandard??"v2"}),(await v({aptosConfig:r,options:{where:a}})).collection_id}var N={typeParameters:[],parameters:[new i(p()),new i(p()),new i(p()),new i(p()),new f(new i(p())),new f(new i(p())),new f(f.u8())]};async function Bt(t){let{aptosConfig:o,options:n,creator:e,collection:r,description:s,name:a,uri:m,propertyKeys:g,propertyTypes:P,propertyValues:I}=t,b=P?.map(S=>C[S]);return u({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::mint",functionArguments:[new d(r),new d(s),new d(a),new d(m),_.MoveString(g??[]),_.MoveString(b??[]),K(I??[],b??[])],abi:N},options:n})}var Q={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new x]};async function Et(t){let{aptosConfig:o,sender:n,digitalAssetAddress:e,recipient:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x1::object::transfer",typeArguments:[s??l],functionArguments:[c.from(e),c.from(r)],abi:Q},options:a})}var Y={typeParameters:[],parameters:[new i(p()),new i(p()),new i(p()),new i(p()),new f(new i(p())),new f(new i(p())),new f(f.u8()),new x]};async function Ot(t){let{aptosConfig:o,account:n,collection:e,description:r,name:s,uri:a,recipient:m,propertyKeys:g,propertyTypes:P,propertyValues:I,options:b}=t;if(g?.length!==I?.length)throw new Error("Property keys and property values counts do not match");if(P?.length!==I?.length)throw new Error("Property types and property values counts do not match");let S=P?.map(U=>C[U]);return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::mint_soul_bound",functionArguments:[e,r,s,a,_.MoveString(g??[]),_.MoveString(S??[]),K(I??[],S??[]),m],abi:Y},options:b})}var L={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function qt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::burn",typeArguments:[r??l],functionArguments:[c.from(e)],abi:L},options:s})}var z={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function Vt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::freeze_transfer",typeArguments:[r??l],functionArguments:[e],abi:z},options:s})}var j={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function Rt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::unfreeze_transfer",typeArguments:[r??l],functionArguments:[e],abi:j},options:s})}var W={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Mt(t){let{aptosConfig:o,creator:n,description:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_description",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:W},options:a})}var X={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Kt(t){let{aptosConfig:o,creator:n,name:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_name",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Ut(t){let{aptosConfig:o,creator:n,uri:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_uri",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p()),new i(p()),f.u8()]};async function Ft(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_property",typeArguments:[m??l],functionArguments:[c.from(a),new d(e),new d(C[r]),_.U8(B(s,C[r]))],abi:J},options:g})}var Z={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Nt(t){let{aptosConfig:o,creator:n,propertyKey:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::remove_property",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:Z},options:a})}var $={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p()),new i(p()),f.u8()]};async function Qt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_property",typeArguments:[m??l],functionArguments:[c.from(a),new d(e),new d(C[r]),B(s,C[r])],abi:$},options:g})}var tt={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new i(y(new A(0))),new i(p()),new A(1)]};async function Yt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_typed_property",typeArguments:[m??l,C[r]],functionArguments:[c.from(a),new d(e),s],abi:tt},options:g})}var et={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new i(y(new A(0))),new i(p()),new A(1)]};async function Lt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_typed_property",typeArguments:[m??l,C[r]],functionArguments:[c.from(a),new d(e),s],abi:et},options:g})}function K(t,o){let n=new Array;return o.forEach((e,r)=>{n.push(B(t[r],e))}),n}function B(t,o){let n=R(o);return M(t,n,0,[]).bcsToBytes()}export{It as a,Pt as b,bt as c,St as d,Dt as e,v as f,ht as g,vt as h,xt as i,Gt as j,Bt as k,Et as l,Ot as m,qt as n,Vt as o,Rt as p,Mt as q,Kt as r,Ut as s,Ft as t,Nt as u,Qt as v,Yt as w,Lt as x};
|
|
2
|
+
//# sourceMappingURL=chunk-I3ZR4HXK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as K}from"./chunk-GX2II7H4.mjs";import{c as d}from"./chunk-J45FMNYT.mjs";import{d as b,e as v,f as q,g as O,i as P,j as S,k as M,u as G}from"./chunk-VHNX2NUR.mjs";import{a as f}from"./chunk-5RNKD3GW.mjs";import{a as k}from"./chunk-SHOPSMRK.mjs";import{a as T}from"./chunk-ASQIKTEF.mjs";import{b as C}from"./chunk-QTTDBQAJ.mjs";import{c as _}from"./chunk-7T5CUI2H.mjs";import{a as g}from"./chunk-3CE63FFN.mjs";import{b as i}from"./chunk-EDVGFSB5.mjs";import{a as w}from"./chunk-AH44UPM4.mjs";import{b as A,d as p}from"./chunk-H3TJNBHX.mjs";import{a as h}from"./chunk-3TSO6PDV.mjs";import{e as y}from"./chunk-EXP5STXZ.mjs";async function R(o){let{aptosConfig:n,accountAddress:t}=o,{data:e}=await A({aptosConfig:n,originMethod:"getInfo",path:`accounts/${i.from(t).toString()}`});return e}async function Y(o){let{aptosConfig:n,accountAddress:t,options:e}=o;return p({aptosConfig:n,originMethod:"getModules",path:`accounts/${i.from(t).toString()}/modules`,params:{ledger_version:e?.ledgerVersion,start:e?.offset,limit:e?.limit??1e3}})}async function Z(o){return o.options?.ledgerVersion!==void 0?Q(o):w(async()=>Q(o),`module-${o.accountAddress}-${o.moduleName}`,1e3*60*5)()}async function Q(o){let{aptosConfig:n,accountAddress:t,moduleName:e,options:r}=o,{data:s}=await A({aptosConfig:n,originMethod:"getModule",path:`accounts/${i.from(t).toString()}/module/${e}`,params:{ledger_version:r?.ledgerVersion}});return s}async function ee(o){let{aptosConfig:n,accountAddress:t,options:e}=o;return p({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${i.from(t).toString()}/transactions`,params:{start:e?.offset,limit:e?.limit}})}async function oe(o){let{aptosConfig:n,accountAddress:t,options:e}=o;return p({aptosConfig:n,originMethod:"getResources",path:`accounts/${i.from(t).toString()}/resources`,params:{ledger_version:e?.ledgerVersion,start:e?.offset,limit:e?.limit??999}})}async function x(o){let{aptosConfig:n,accountAddress:t,resourceType:e,options:r}=o,{data:s}=await A({aptosConfig:n,originMethod:"getResource",path:`accounts/${i.from(t).toString()}/resource/${e}`,params:{ledger_version:r?.ledgerVersion}});return s.data}async function L(o){let{aptosConfig:n,authenticationKey:t,options:e}=o,r=await x({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:e}),{address_map:{handle:s}}=r,c=i.from(t);try{let a=await K({aptosConfig:n,handle:s,data:{key:c.toString(),key_type:"address",value_type:"address"},options:e});return i.from(a)}catch(a){if(a instanceof h&&a.data.error_code==="table_item_not_found")return c;throw a}}async function te(o){let{aptosConfig:n,accountAddress:t}=o,r={owner_address:{_eq:i.from(t).toStringLong()},amount:{_gt:0}},c=await d({aptosConfig:n,query:{query:S,variables:{where_condition:r}},originMethod:"getAccountTokensCount"});return c.current_token_ownerships_v2_aggregate.aggregate?c.current_token_ownerships_v2_aggregate.aggregate.count:0}async function ne(o){let{aptosConfig:n,accountAddress:t,options:e}=o,s={owner_address:{_eq:i.from(t).toStringLong()},amount:{_gt:0}};e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard});let c={query:O,variables:{where_condition:s,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountOwnedTokens"})).current_token_ownerships_v2}async function re(o){let{aptosConfig:n,accountAddress:t,collectionAddress:e,options:r}=o,s=i.from(t).toStringLong(),c=i.from(e).toStringLong(),a={owner_address:{_eq:s},current_token_data:{collection_id:{_eq:c}},amount:{_gt:0}};r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard});let u={query:P,variables:{where_condition:a,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 se(o){let{aptosConfig:n,accountAddress:t,options:e}=o,s={owner_address:{_eq:i.from(t).toStringLong()}};e?.tokenStandard&&(s.current_collection={token_standard:{_eq:e?.tokenStandard}});let c={query:q,variables:{where_condition:s,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountCollectionsWithOwnedTokens"})).current_collection_ownership_v2_view}async function ce(o){let{aptosConfig:n,accountAddress:t}=o,e=i.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:M,variables:{address:e}},originMethod:"getAccountTransactionsCount"});return s.account_transactions_aggregate.aggregate?s.account_transactions_aggregate.aggregate.count:0}async function ie(o){let{aptosConfig:n,accountAddress:t,coinType:e,faMetadataAddress:r}=o,s=e,c;if(e!==void 0&&r!==void 0)c=i.from(r).toStringLong();else if(e!==void 0&&r===void 0)e===y?c=i.A.toStringLong():c=k(i.A,e).toStringLong();else if(e===void 0&&r!==void 0){let m=i.from(r);c=m.toStringLong(),m===i.A&&(s=y)}else throw new Error("Either coinType, fungibleAssetAddress, or both must be provided");let a=i.from(t).toStringLong(),u={asset_type:{_eq:c}};s!==void 0&&(u={asset_type:{_in:[s,c]}});let l=await B({aptosConfig:n,accountAddress:a,options:{where:u}});return l[0]?l[0].amount:0}async function B(o){let{aptosConfig:n,accountAddress:t,options:e}=o,r=i.from(t).toStringLong(),s={...e?.where,owner_address:{_eq:r}},c={query:v,variables:{where_condition:s,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountCoinsData"})).current_fungible_asset_balances}async function ae(o){let{aptosConfig:n,accountAddress:t}=o,e=i.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:b,variables:{address:e}},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 de(o){let{aptosConfig:n,accountAddress:t,options:e}=o,s={owner_address:{_eq:i.from(t).toStringLong()}},c={query:G,variables:{where_condition:s,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountOwnedObjects"})).current_objects}async function ue(o){let{aptosConfig:n,privateKey:t}=o,e=new T(t.publicKey());if(t instanceof C){let s=g.fromPublicKey({publicKey:e}).derivedAddress();return f.fromPrivateKey({privateKey:t,address:s})}if(t instanceof _){let r=g.fromPublicKey({publicKey:e});if(await I({authKey:r,aptosConfig:n})){let u=r.derivedAddress();return f.fromPrivateKey({privateKey:t,address:u,legacy:!1})}let c=g.fromPublicKey({publicKey:e.publicKey});if(await I({authKey:c,aptosConfig:n})){let u=c.derivedAddress();return f.fromPrivateKey({privateKey:t,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${t}`)}async function I(o){let{aptosConfig:n,authKey:t}=o,e=await L({aptosConfig:n,authenticationKey:t.derivedAddress()});try{return await R({aptosConfig:n,accountAddress:e}),!0}catch(r){if(r.status===404)return!1;throw new Error(`Error while looking for an account info ${e.toString()}`)}}export{R as a,Y as b,Z as c,ee as d,oe as e,x as f,L as g,te as h,ne as i,re as j,se as k,ce as l,ie as m,B as n,ae as o,de as p,ue as q,I as r};
|
|
2
|
+
//# sourceMappingURL=chunk-K7ZPRL7C.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g,f as d,g as b,i as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g,f as d,g as b,i as S}from"./chunk-MVTR6HU6.mjs";import{a as C}from"./chunk-K7ZPRL7C.mjs";import{a as w}from"./chunk-W2KQ2TSH.mjs";import{a as P}from"./chunk-5RNKD3GW.mjs";import{a as I}from"./chunk-UYYQZDVB.mjs";import{d as l}from"./chunk-E2WOZVJX.mjs";import{c as f,m as s}from"./chunk-5FPWLBZT.mjs";import{a as T}from"./chunk-YACGA3YS.mjs";import{b as p}from"./chunk-EDVGFSB5.mjs";import{b as A}from"./chunk-FTBXTZM2.mjs";import{a as r}from"./chunk-YELQZVBK.mjs";import{b as y}from"./chunk-E7VSBBQM.mjs";async function h(t){let a=await D(t);return G(t,a)}async function D(t){let{aptosConfig:a,data:n}=t,e,o;return"bytecode"in n?o=await g(n):"multisigAddress"in n?(e={aptosConfig:a,multisigAddress:n.multisigAddress,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},o=await g(e)):(e={aptosConfig:a,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},o=await g(e)),o}async function G(t,a){let{aptosConfig:n,sender:e,options:o}=t,i;if(K(t)&&(i=p.ZERO.toString()),U(t)){let{secondarySignerAddresses:c}=t;return d({aptosConfig:n,sender:e,payload:a,options:o,secondarySignerAddresses:c,feePayerAddress:i})}return d({aptosConfig:n,sender:e,payload:a,options:o,feePayerAddress:i})}function K(t){return t.withFeePayer===!0}function U(t){return"secondarySignerAddresses"in t}function Y(t){let{transaction:a}=t;return l(a)}function _(t){let{signer:a,transaction:n}=t;return a.signTransactionWithAuthenticator(n)}async function $(t){let{aptosConfig:a,transaction:n,signerPublicKey:e,secondarySignersPublicKeys:o,feePayerPublicKey:i,options:c}=t,u=b({transaction:n,signerPublicKey:e,secondarySignersPublicKeys:o,feePayerPublicKey:i,options:c}),{data:m}=await A({aptosConfig:a,body:u,path:"transactions/simulate",params:{estimate_gas_unit_price:t.options?.estimateGasUnitPrice??!1,estimate_max_gas_amount:t.options?.estimateMaxGasAmount??!1,estimate_prioritized_gas_unit_price:t.options?.estimatePrioritizedGasUnitPrice??!1},originMethod:"simulateTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return m}async function B(t){let{aptosConfig:a}=t,n=S({...t}),{data:e}=await A({aptosConfig:a,body:n,path:"transactions",originMethod:"submitTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return e}async function M(t){let{aptosConfig:a,signer:n,transaction:e}=t;(n instanceof I||n instanceof w)&&await n.waitForProofFetch();let o=_({signer:n,transaction:e});return B({aptosConfig:a,transaction:e,senderAuthenticator:o})}var N={typeParameters:[],parameters:[s.u8(),new s(s.u8())]};async function nn(t){let{aptosConfig:a,account:n,metadataBytes:e,moduleBytecode:o,options:i}=t,c=o.map(u=>r.U8(u));return h({aptosConfig:a,sender:p.from(n),data:{function:"0x1::code::publish_package_txn",functionArguments:[r.U8(e),new r(c)],abi:N},options:i})}var F={typeParameters:[],parameters:[new f,s.u8(),new f,s.u8(),s.u8(),s.u8()]};async function tn(t){let{aptosConfig:a,fromAccount:n,toNewPrivateKey:e}=t,o=await C({aptosConfig:a,accountAddress:n.accountAddress}),i=P.fromPrivateKey({privateKey:e,legacy:!0}),u=new T({sequenceNumber:BigInt(o.sequence_number),originator:n.accountAddress,currentAuthKey:p.from(o.authentication_key),newPublicKey:i.publicKey}).bcsToBytes(),m=n.sign(u),R=i.sign(u),x=await h({aptosConfig:a,sender:n.accountAddress,data:{function:"0x1::account::rotate_authentication_key",functionArguments:[new y(n.signingScheme),r.U8(n.publicKey.toUint8Array()),new y(i.signingScheme),r.U8(i.publicKey.toUint8Array()),r.U8(m.toUint8Array()),r.U8(R.toUint8Array())],abi:F}});return M({aptosConfig:a,signer:n,transaction:x})}export{h as a,D as b,G as c,Y as d,_ as e,$ as f,B as g,M as h,nn as i,tn as j};
|
|
2
|
+
//# sourceMappingURL=chunk-LICJI4D2.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l,c as an,d as rn,e as R}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l,c as an,d as rn,e as R}from"./chunk-5HWJ3SN4.mjs";import{r as en,u as y}from"./chunk-BQPQLOIW.mjs";import{a as nn}from"./chunk-K7ZPRL7C.mjs";import{b as tn}from"./chunk-G6HZPSZ3.mjs";import{a as Y}from"./chunk-J45FMNYT.mjs";import{a as A}from"./chunk-OOVNFKA6.mjs";import{a as J}from"./chunk-GKRIMGKW.mjs";import{a as Q}from"./chunk-7BPKOPP7.mjs";import{a as L,c as Z,d as j}from"./chunk-ND23H3AK.mjs";import{c as O,d as V,e as q,f as x,g as H,h as X,i as z}from"./chunk-SVO6PVAX.mjs";import{a as v}from"./chunk-UW5TIZFE.mjs";import{b as E,d as B,e as F,f as D}from"./chunk-ZASN3QQQ.mjs";import{a as k,b as p,d as g}from"./chunk-BC5BEOKM.mjs";import{a as S,b}from"./chunk-ASQIKTEF.mjs";import{a as N}from"./chunk-QTTDBQAJ.mjs";import{a as K}from"./chunk-ZAHUEAGT.mjs";import{i as P,j as _}from"./chunk-DYMN66K5.mjs";import{b as $,d as M}from"./chunk-7T5CUI2H.mjs";import{b as u}from"./chunk-EDVGFSB5.mjs";import{a as C}from"./chunk-AH44UPM4.mjs";import{a as U}from"./chunk-BSUYPXRD.mjs";import{b as w}from"./chunk-AOCNYMMX.mjs";import{g as I}from"./chunk-C5JQQTMI.mjs";import{b as W,c as G}from"./chunk-EXP5STXZ.mjs";import{sha3_256 as mn}from"@noble/hashes/sha3";async function vn(n){if(en(n))return fn(n);let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await sn({key:"entry-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:an});return An({...n,abi:a})}function An(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=l(n.typeArguments);if(r.length!==t.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${t.typeParameters.length}, received ${r.length}`);let o=n.functionArguments.map((s,d)=>R(n.function,t,s,d,r));if(o.length!==t.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${t.parameters.length} but got ${o.length}`);let c=x.build(`${e}::${i}`,a,r,o);if("multisigAddress"in n){let s=u.from(n.multisigAddress);return new q(new X(s,new z(c)))}return new V(c)}async function On(n){let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await sn({key:"view-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:rn});return yn({abi:a,...n})}function yn(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=l(n.typeArguments);if(r.length!==t.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${t.typeParameters.length}, received ${r.length}`);let o=n?.functionArguments?.map((c,s)=>R(n.function,t,c,s,r))??[];if(o.length!==t.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${t.parameters.length} but got ${o.length}`);return x.build(`${e}::${i}`,a,r,o)}function fn(n){return new O(new H(w.fromHexInput(n.bytecode).toUint8Array(),l(n.typeArguments),n.functionArguments))}async function pn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=async()=>I[t.network]?{chainId:I[t.network]}:{chainId:(await Y({aptosConfig:t})).chain_id},c=async()=>a?.gasUnitPrice?{gasEstimate:a.gasUnitPrice}:{gasEstimate:(await tn({aptosConfig:t})).gas_estimate},s=async()=>{let f=async()=>a?.accountSequenceNumber!==void 0?a.accountSequenceNumber:(await nn({aptosConfig:t,accountAddress:e})).sequence_number;if(r&&u.from(r).equals(u.ZERO))try{return await f()}catch{return 0}else return f()},[{chainId:d},{gasEstimate:m},h]=await Promise.all([o(),c(),s()]),{maxGasAmount:cn,gasUnitPrice:un,expireTimestamp:dn}={maxGasAmount:a?.maxGasAmount?BigInt(a.maxGasAmount):BigInt(2e5),gasUnitPrice:a?.gasUnitPrice??BigInt(m),expireTimestamp:a?.expireTimestamp??BigInt(Math.floor(Date.now()/1e3)+20)};return new L(u.from(e),BigInt(h),i,BigInt(cn),BigInt(un),BigInt(dn),new v(d))}async function Vn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=await pn({aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r});if("secondarySignerAddresses"in n){let c=n.secondarySignerAddresses?.map(s=>u.from(s))??[];return new Q(o,c,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}return new J(o,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}function qn(n){let{signerPublicKey:t,transaction:e,secondarySignersPublicKeys:i,feePayerPublicKey:a}=n,r=T(t);if(e.feePayerAddress){let c=new j(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress),s=[];i&&(s=i.map(h=>T(h)));let d=T(a),m=new F(r,e.secondarySignerAddresses??[],s,{address:e.feePayerAddress,authenticator:d});return new A(c.raw_txn,m).bcsToBytes()}if(e.secondarySignerAddresses){let c=new Z(e.rawTransaction,e.secondarySignerAddresses),s=[];s=i.map(m=>T(m));let d=new B(r,e.secondarySignerAddresses,s);return new A(c.raw_txn,d).bcsToBytes()}let o;if(r instanceof p)o=new E(r.public_key,r.signature);else if(r instanceof g)o=new D(r);else throw new Error("Invalid public key");return new A(e.rawTransaction,o).bcsToBytes()}function T(n){let e=P.isInstance(n)||K.isInstance(n)||N.isInstance(n)?new S(n):n,i=new M(new Uint8Array(64));if($.isInstance(e))return new p(e,i);if(S.isInstance(e))return P.isInstance(e.publicKey)?new g(e,new b(_.getSimulationSignature())):new g(e,new b(i));throw new Error("Unsupported public key")}function gn(n){let{transaction:t,feePayerAuthenticator:e,additionalSignersAuthenticators:i}=n,a=U(k,n.senderAuthenticator),r;if(t.feePayerAddress){if(!e)throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");r=new F(a,t.secondarySignerAddresses??[],i??[],{address:t.feePayerAddress,authenticator:e})}else if(t.secondarySignerAddresses){if(!i)throw new Error("Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction");r=new B(a,t.secondarySignerAddresses,i)}else a instanceof p?r=new E(a.public_key,a.signature):r=new D(a);return new A(t.rawTransaction,r).bcsToBytes()}function on(n){let t=mn.create();for(let e of n)t.update(e);return t.digest()}var ln=on(["APTOS::Transaction"]);function Hn(n){let t=gn(n);return new w(on([ln,new Uint8Array([0]),t])).toString()}async function sn({key:n,moduleAddress:t,moduleName:e,functionName:i,aptosConfig:a,abi:r,fetch:o}){return r!==void 0?r:C(async()=>o(t,e,i,a),`${n}-${a.network}-${t}-${e}-${i}`,1e3*60*5)()}export{vn as a,An as b,On as c,yn as d,pn as e,Vn as f,qn as g,T as h,gn as i,on as j,Hn as k};
|
|
2
|
+
//# sourceMappingURL=chunk-MVTR6HU6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-VVWBJKEA.mjs";import{h as r}from"./chunk-G6HZPSZ3.mjs";var i=class{constructor(o){this.config=o}async fundAccount(o){let n=await t({aptosConfig:this.config,...o});return(o.options?.waitForIndexer===void 0||o.options?.waitForIndexer)&&await r({aptosConfig:this.config,minimumLedgerVersion:BigInt(n.version),processorType:"fungible_asset_processor"}),n}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MYRN7MDF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as m}from"./chunk-SVO6PVAX.mjs";import{a as h}from"./chunk-UW5TIZFE.mjs";import{b as t}from"./chunk-EDVGFSB5.mjs";import{a as u}from"./chunk-ZZIMFLVT.mjs";var o=class i extends u{constructor(e,s,a,n,d,l,_){super();this.sender=e,this.sequence_number=s,this.payload=a,this.max_gas_amount=n,this.gas_unit_price=d,this.expiration_timestamp_secs=l,this.chain_id=_}serialize(e){this.sender.serialize(e),e.serializeU64(this.sequence_number),this.payload.serialize(e),e.serializeU64(this.max_gas_amount),e.serializeU64(this.gas_unit_price),e.serializeU64(this.expiration_timestamp_secs),this.chain_id.serialize(e)}static deserialize(e){let s=t.deserialize(e),a=e.deserializeU64(),n=m.deserialize(e),d=e.deserializeU64(),l=e.deserializeU64(),_=e.deserializeU64(),b=h.deserialize(e);return new i(s,a,n,d,l,_,b)}},c=class extends u{static deserialize(r){let e=r.deserializeUleb128AsU32();switch(e){case 0:return p.load(r);case 1:return y.load(r);default:throw new Error(`Unknown variant index for RawTransactionWithData: ${e}`)}}},p=class i extends c{constructor(e,s){super();this.raw_txn=e,this.secondary_signer_addresses=s}serialize(e){e.serializeU32AsUleb128(0),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses)}static load(e){let s=o.deserialize(e),a=e.deserializeVector(t);return new i(s,a)}},y=class i extends c{constructor(e,s,a){super();this.raw_txn=e,this.secondary_signer_addresses=s,this.fee_payer_address=a}serialize(e){e.serializeU32AsUleb128(1),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses),this.fee_payer_address.serialize(e)}static load(e){let s=o.deserialize(e),a=e.deserializeVector(t),n=t.deserialize(e);return new i(s,a,n)}};export{o as a,c as b,p as c,y as d};
|
|
2
|
+
//# sourceMappingURL=chunk-ND23H3AK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as o}from"./chunk-E2WOZVJX.mjs";import{b as i}from"./chunk-BC5BEOKM.mjs";import{c as n}from"./chunk-7T5CUI2H.mjs";import{b as s}from"./chunk-EDVGFSB5.mjs";var c=class a{constructor(t){this.signingScheme=0;let{privateKey:e,address:r}=t;this.privateKey=e,this.publicKey=e.publicKey(),this.accountAddress=r?s.from(r):this.publicKey.authKey().derivedAddress()}static generate(){let t=n.generate();return new a({privateKey:t})}static fromDerivationPath(t){let{path:e,mnemonic:r}=t,u=n.fromDerivationPath(e,r);return new a({privateKey:u})}verifySignature(t){return this.publicKey.verifySignature(t)}signWithAuthenticator(t){return new i(this.publicKey,this.privateKey.sign(t))}signTransactionWithAuthenticator(t){return new i(this.publicKey,this.signTransaction(t))}sign(t){return this.privateKey.sign(t)}signTransaction(t){return this.sign(o(t))}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NGIPNL7N.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as p}from"./chunk-E2WOZVJX.mjs";import{d as s}from"./chunk-BC5BEOKM.mjs";import{a as u,b as y}from"./chunk-ASQIKTEF.mjs";import{b as a}from"./chunk-QTTDBQAJ.mjs";import{c as i}from"./chunk-7T5CUI2H.mjs";import{b as g}from"./chunk-EDVGFSB5.mjs";var h=class c{constructor(e){this.signingScheme=2;let{privateKey:r,address:t}=e;this.privateKey=r,this.publicKey=new u(r.publicKey()),this.accountAddress=t?g.from(t):this.publicKey.authKey().derivedAddress()}static generate(e={}){let{scheme:r=0}=e,t;switch(r){case 0:t=i.generate();break;case 2:t=a.generate();break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new c({privateKey:t})}static fromDerivationPath(e){let{scheme:r=0,path:t,mnemonic:o}=e,n;switch(r){case 0:n=i.fromDerivationPath(t,o);break;case 2:n=a.fromDerivationPath(t,o);break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new c({privateKey:n})}verifySignature(e){return this.publicKey.verifySignature(e)}signWithAuthenticator(e){return new s(this.publicKey,this.sign(e))}signTransactionWithAuthenticator(e){return new s(this.publicKey,this.signTransaction(e))}sign(e){return new y(this.privateKey.sign(e))}signTransaction(e){return this.sign(p(e))}};export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NOVJ2ROD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-RLGIYYI7.mjs";import{a as I}from"./chunk-6B65YWGD.mjs";import{a as A,b as a,c as g,d as m,e as p,f,g as y,h as C,i as T,j as O,k as l,l as P,m as R,n as V,o as L,p as h,q as S}from"./chunk-K7ZPRL7C.mjs";import{g as u,h as d}from"./chunk-UAL27G6B.mjs";import{e as i,f as c}from"./chunk-EXP5STXZ.mjs";var w=class{constructor(e){this.config=e}async getAccountInfo(e){return A({aptosConfig:this.config,...e})}async getAccountModules(e){return a({aptosConfig:this.config,...e})}async getAccountModule(e){return g({aptosConfig:this.config,...e})}async getAccountTransactions(e){return m({aptosConfig:this.config,...e})}async getAccountResources(e){return p({aptosConfig:this.config,...e})}async getAccountResource(e){return f({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return y({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),C({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),T({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),O({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),l({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"}),V({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),L({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:i,faMetadataAddress:c,...e})}async getAccountCoinAmount(e){let{coinType:t,faMetadataAddress:s}=e;await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"});let r=t;if(t===void 0&&s!==void 0)try{let o=(await I({aptosConfig:this.config,payload:{function:"0x1::coin::paired_coin",functionArguments:[s]}})).at(0);o.vec.length>0&&d(o.vec[0])&&(r=u(o.vec[0]))}catch{}return R({aptosConfig:this.config,...e,coinType:r})}async getAccountOwnedObjects(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),h({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return S({aptosConfig:this.config,...e})}};export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-O3SVNTWW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-ND23H3AK.mjs";import{a as e}from"./chunk-ZASN3QQQ.mjs";import{a as r}from"./chunk-ZZIMFLVT.mjs";var n=class o extends r{constructor(t,a){super();this.raw_txn=t,this.authenticator=a}serialize(t){this.raw_txn.serialize(t),this.authenticator.serialize(t)}static deserialize(t){let a=i.deserialize(t),s=e.deserialize(t);return new o(a,s)}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OOVNFKA6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-YBZI6U43.mjs";import{a as u}from"./chunk-UYYQZDVB.mjs";import{n as l}from"./chunk-DYMN66K5.mjs";import{a as d}from"./chunk-KEYAPEAX.mjs";import{jwtDecode as K}from"jwt-decode";var f=class t extends u{constructor(e){super(e)}serialize(e){if(e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof===void 0)throw new Error("Connot serialize - proof undefined");this.proof.serialize(e)}static deserialize(e){let i=e.deserializeStr(),s=e.deserializeStr(),r=e.deserializeFixedBytes(31),a=c.deserialize(e),n=l.deserialize(e);return t.create({proof:n,pepper:r,uidKey:s,jwt:i,ephemeralKeyPair:a})}static fromBytes(e){return t.deserialize(new d(e))}static create(e){let{address:i,proof:s,jwt:r,ephemeralKeyPair:a,pepper:n,uidKey:p="sub",proofFetchCallback:m}=e,o=K(r),y=o.iss;if(typeof o.aud!="string")throw new Error("aud was not found or an array of values");let h=o.aud,w=o[p];return new t({address:i,proof:s,ephemeralKeyPair:a,iss:y,uidKey:p,uidVal:w,aud:h,pepper:n,jwt:r,proofFetchCallback:m})}};export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PBMXWRZG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-YBZI6U43.mjs";import{a as m}from"./chunk-UYYQZDVB.mjs";import{a as y}from"./chunk-ZAHUEAGT.mjs";import{n as u}from"./chunk-DYMN66K5.mjs";import{b as c}from"./chunk-EDVGFSB5.mjs";import{a as p}from"./chunk-KEYAPEAX.mjs";import{jwtDecode as P}from"jwt-decode";var K=class o extends m{constructor(e){super(e);this.publicKey=y.create(e)}serialize(e){if(this.proof===void 0)throw new Error("Connot serialize - proof undefined");e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.publicKey.jwkAddress.serialize(e),this.ephemeralKeyPair.serialize(e),this.proof.serialize(e)}static deserialize(e){let s=e.deserializeStr(),i=e.deserializeStr(),r=e.deserializeFixedBytes(31),a=c.deserialize(e),d=f.deserialize(e),n=u.deserialize(e);return o.create({proof:n,pepper:r,jwkAddress:a,uidKey:i,jwt:s,ephemeralKeyPair:d})}static fromBytes(e){return o.deserialize(new p(e))}static create(e){let{address:s,proof:i,jwt:r,ephemeralKeyPair:a,pepper:d,jwkAddress:n,uidKey:l="sub",proofFetchCallback:w}=e,t=P(r),h=t.iss;if(typeof t.aud!="string")throw new Error("aud was not found or an array of values");let A=t.aud,g=t[l];return new o({address:s,proof:i,ephemeralKeyPair:a,iss:h,uidKey:l,uidVal:g,aud:A,pepper:d,jwkAddress:c.from(n),jwt:r,proofFetchCallback:w})}};export{K as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PEYLPXU6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-4WAH2Y5E.mjs";var t=class{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-Q5BCQFS2.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-TJDC5PWD.mjs";import{a as f}from"./chunk-FOLCONSQ.mjs";import{a as v}from"./chunk-QP2A5ISX.mjs";import{e as h,j as d}from"./chunk-LR65XHSF.mjs";import{a as g}from"./chunk-ZZIMFLVT.mjs";import{b as s}from"./chunk-AOCNYMMX.mjs";import{sha3_256 as A}from"@noble/hashes/sha3";import{secp256k1 as o}from"@noble/curves/secp256k1";import{HDKey as K}from"@scure/bip32";var i=class i extends f{constructor(e){super();let t=s.fromHexInput(e);if(t.toUint8Array().length!==i.LENGTH)throw new Error(`PublicKey length should be ${i.LENGTH}`);this.key=t}verifySignature(e){let{message:t,signature:n}=e,y=c(t),l=s.fromHexInput(y).toUint8Array(),x=A(l),S=n.toUint8Array();return o.verify(S,x,this.key.toUint8Array(),{lowS:!0})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new i(t)}static isPublicKey(e){return e instanceof i}static isInstance(e){return"key"in e&&e.key?.data?.length===i.LENGTH}};i.LENGTH=65;var u=i,r=class r extends g{constructor(e){super();let t=s.fromHexInput(e);if(t.toUint8Array().length!==r.LENGTH)throw new Error(`PrivateKey length should be ${r.LENGTH}`);this.key=t}static generate(){let e=o.utils.randomPrivateKey();return new r(e)}static fromDerivationPath(e,t){if(!h(e))throw new Error(`Invalid derivation path ${e}`);return r.fromDerivationPathInner(e,d(t))}static fromDerivationPathInner(e,t){let{privateKey:n}=K.fromMasterSeed(t).derive(e);if(n===null)throw new Error("Invalid key");return new r(n)}sign(e){let t=c(e),n=s.fromHexInput(t),y=A(n.toUint8Array()),l=o.sign(y,this.key.toUint8Array(),{lowS:!0});return new m(l.toCompactRawBytes())}publicKey(){let e=o.getPublicKey(this.key.toUint8Array(),!1);return new u(e)}toUint8Array(){return this.key.toUint8Array()}toString(){return this.key.toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new r(t)}static isPrivateKey(e){return e instanceof r}};r.LENGTH=32;var H=r,a=class a extends v{constructor(e){super();let t=s.fromHexInput(e);if(t.toUint8Array().length!==a.LENGTH)throw new Error(`Signature length should be ${a.LENGTH}, received ${t.toUint8Array().length}`);this.data=t}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new a(t)}};a.LENGTH=64;var m=a;export{u as a,H as b,m as c};
|
|
2
|
+
//# sourceMappingURL=chunk-QTTDBQAJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-5FPWLBZT.mjs";import{a as g}from"./chunk-SP4PT77Z.mjs";import{a as p}from"./chunk-5HI4R3A2.mjs";import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-5FPWLBZT.mjs";import{a as g}from"./chunk-SP4PT77Z.mjs";import{a as p}from"./chunk-5HI4R3A2.mjs";import{b as y}from"./chunk-EDVGFSB5.mjs";import{a as v,b as M}from"./chunk-YELQZVBK.mjs";import{a as S}from"./chunk-CDIKSNSU.mjs";import{a as F,b as d,c as T,d as x,e as E,f as _,g as w}from"./chunk-E7VSBBQM.mjs";import{a as u}from"./chunk-ZZIMFLVT.mjs";function I(r){let e=r.deserializeUleb128AsU32();switch(e){case 0:return d.deserialize(r);case 1:return E.deserialize(r);case 2:return _.deserialize(r);case 3:return y.deserialize(r);case 4:return v.deserialize(r,d);case 5:return F.deserialize(r);case 6:return T.deserialize(r);case 7:return x.deserialize(r);case 8:return w.deserialize(r);case 9:return M.deserialize(r);default:throw new Error(`Unknown variant index for ScriptTransactionArgument: ${e}`)}}var a=class extends u{static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return A.load(e);case 2:return z.load(e);case 3:return h.load(e);default:throw new Error(`Unknown variant index for TransactionPayload: ${t}`)}}},A=class r extends a{constructor(t){super();this.script=t}serialize(t){t.serializeU32AsUleb128(0),this.script.serialize(t)}static load(t){let i=U.deserialize(t);return new r(i)}},z=class r extends a{constructor(t){super();this.entryFunction=t}serialize(t){t.serializeU32AsUleb128(2),this.entryFunction.serialize(t)}static load(t){let i=l.deserialize(t);return new r(i)}},h=class r extends a{constructor(t){super();this.multiSig=t}serialize(t){t.serializeU32AsUleb128(3),this.multiSig.serialize(t)}static load(t){let i=f.deserialize(t);return new r(i)}},l=class r{constructor(e,t,i,n){this.module_name=e,this.function_name=t,this.type_args=i,this.args=n}static build(e,t,i,n){return new r(g.fromStr(e),new p(t),i,n)}serialize(e){this.module_name.serialize(e),this.function_name.serialize(e),e.serializeVector(this.type_args),e.serializeU32AsUleb128(this.args.length),this.args.forEach(t=>{t.serializeForEntryFunction(e)})}static deserialize(e){let t=g.deserialize(e),i=p.deserialize(e),n=e.deserializeVector(m),o=e.deserializeUleb128AsU32(),s=new Array;for(let c=0;c<o;c+=1){let B=e.deserializeUleb128AsU32(),D=S.deserialize(e,B);s.push(D)}return new r(t,i,n,s)}},U=class r{constructor(e,t,i){this.bytecode=e,this.type_args=t,this.args=i}serialize(e){e.serializeBytes(this.bytecode),e.serializeVector(this.type_args),e.serializeU32AsUleb128(this.args.length),this.args.forEach(t=>{t.serializeForScriptFunction(e)})}static deserialize(e){let t=e.deserializeBytes(),i=e.deserializeVector(m),n=e.deserializeUleb128AsU32(),o=new Array;for(let s=0;s<n;s+=1){let c=I(e);o.push(c)}return new r(t,i,o)}},f=class r{constructor(e,t){this.multisig_address=e,this.transaction_payload=t}serialize(e){this.multisig_address.serialize(e),this.transaction_payload===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.transaction_payload.serialize(e))}static deserialize(e){let t=y.deserialize(e),i=e.deserializeBool(),n;return i&&(n=b.deserialize(e)),new r(t,n)}},b=class r extends u{constructor(t){super();this.transaction_payload=t}serialize(t){t.serializeU32AsUleb128(0),this.transaction_payload.serialize(t)}static deserialize(t){return t.deserializeUleb128AsU32(),new r(l.deserialize(t))}};export{I as a,a as b,A as c,z as d,h as e,l as f,U as g,f as h,b as i};
|
|
2
|
+
//# sourceMappingURL=chunk-SVO6PVAX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c,b as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c,b as g}from"./chunk-6B65YWGD.mjs";import{k as i,l as a}from"./chunk-G6HZPSZ3.mjs";import{a as e,b as n,c as s,e as r,f as t}from"./chunk-J45FMNYT.mjs";var p=class{constructor(o){this.config=o}async getLedgerInfo(){return e({aptosConfig:this.config})}async getChainId(){return(await this.getLedgerInfo()).chain_id}async getBlockByVersion(o){return i({aptosConfig:this.config,...o})}async getBlockByHeight(o){return a({aptosConfig:this.config,...o})}async view(o){return c({aptosConfig:this.config,...o})}async viewJson(o){return g({aptosConfig:this.config,...o})}async getChainTopUserTransactions(o){return n({aptosConfig:this.config,...o})}async queryIndexer(o){return s({aptosConfig:this.config,...o})}async getIndexerLastSuccessVersion(){return r({aptosConfig:this.config})}async getProcessorStatus(o){return t({aptosConfig:this.config,processorType:o})}};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-TC3CMU7D.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r,b as t,c as o,d as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r,b as t,c as o,d as s}from"./chunk-74EWOTWQ.mjs";var i=class{constructor(e){this.config=e}async getPepper(e){return r({aptosConfig:this.config,...e})}async getProof(e){return t({aptosConfig:this.config,...e})}async deriveKeylessAccount(e){return o({aptosConfig:this.config,...e})}async updateFederatedKeylessJwkSetTransaction(e){return s({aptosConfig:this.config,...e})}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-TV62D5OU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w,b as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w,b as S}from"./chunk-E2WOZVJX.mjs";import{d as h}from"./chunk-BC5BEOKM.mjs";import{a,b as c}from"./chunk-ASQIKTEF.mjs";import{i as m,j as g,k as P,n as K}from"./chunk-DYMN66K5.mjs";import{b as d}from"./chunk-EDVGFSB5.mjs";import{d as y}from"./chunk-UAL27G6B.mjs";import{a as n}from"./chunk-ZZIMFLVT.mjs";import{b as f}from"./chunk-AOCNYMMX.mjs";import H from"eventemitter3";var o=class o extends n{constructor(e){super();let{address:r,ephemeralKeyPair:t,uidKey:i,uidVal:A,aud:b,pepper:x,proof:s,proofFetchCallback:l,jwt:T}=e;if(this.ephemeralKeyPair=t,this.publicKey=m.create(e),this.accountAddress=r?d.from(r):this.publicKey.authKey().derivedAddress(),this.uidKey=i,this.uidVal=A,this.aud=b,this.jwt=T,this.emitter=new H,this.proofOrPromise=s,s instanceof K)this.proof=s;else{if(l===void 0)throw new Error("Must provide callback for async proof fetch");this.emitter.on("proofFetchFinish",async v=>{await l(v),this.emitter.removeAllListeners()}),this.init(s)}this.signingScheme=2;let u=f.fromHexInput(x).toUint8Array();if(u.length!==o.PEPPER_LENGTH)throw new Error(`Pepper length in bytes should be ${o.PEPPER_LENGTH}`);this.pepper=u}async init(e){try{this.proof=await e,this.emitter.emit("proofFetchFinish",{status:"Success"})}catch(r){r instanceof Error?this.emitter.emit("proofFetchFinish",{status:"Failed",error:r.toString()}):this.emitter.emit("proofFetchFinish",{status:"Failed",error:"Unknown"})}}serialize(e){if(e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof===void 0)throw new Error("Connot serialize - proof undefined");this.proof.serialize(e)}isExpired(){return this.ephemeralKeyPair.isExpired()}signWithAuthenticator(e){let r=new c(this.sign(e)),t=new a(this.publicKey);return new h(t,r)}signTransactionWithAuthenticator(e){let r=new c(this.signTransaction(e)),t=new a(this.publicKey);return new h(t,r)}async waitForProofFetch(){this.proofOrPromise instanceof Promise&&await this.proofOrPromise}sign(e){let{expiryDateSecs:r}=this.ephemeralKeyPair;if(this.isExpired())throw new Error("EphemeralKeyPair is expired");if(this.proof===void 0)throw new Error("Proof not defined");let t=this.ephemeralKeyPair.getPublicKey(),i=this.ephemeralKeyPair.sign(e);return new g({jwtHeader:y(this.jwt.split(".")[0]),ephemeralCertificate:new P(this.proof,0),expiryDateSecs:r,ephemeralPublicKey:t,ephemeralSignature:i})}signTransaction(e){if(this.proof===void 0)throw new Error("Proof not found");let r=w(e),i=new p(r,this.proof.proof).hash();return this.sign(i)}verifySignature(e){let{message:r,signature:t}=e;return!(this.isExpired()||!this.ephemeralKeyPair.getPublicKey().verifySignature({message:r,signature:t.ephemeralSignature}))}};o.PEPPER_LENGTH=31;var F=o,p=class extends n{constructor(e,r){super();this.domainSeparator="APTOS::TransactionAndProof";this.transaction=e,this.proof=r}serialize(e){e.serializeFixedBytes(this.transaction.bcsToBytes()),e.serializeOption(this.proof)}hash(){return S(this.bcsToBytes(),this.domainSeparator)}};export{F as a,p as b};
|
|
2
|
+
//# sourceMappingURL=chunk-UYYQZDVB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-LICJI4D2.mjs";import{c as p}from"./chunk-AZ642ORV.mjs";import{c as o}from"./chunk-J45FMNYT.mjs";import{n as u,q as g,r as A}from"./chunk-VHNX2NUR.mjs";import{f as a,i as r}from"./chunk-5FPWLBZT.mjs";async function G(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:"getFungibleAssetMetadata"})).fungible_asset_metadata}async function h(t){let{aptosConfig:s,options:e}=t,n={query:g,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:u,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:[{constraints:[]}],parameters:[p("0x1::object::Object"),new r,new a]};async function x(t){let{aptosConfig:s,sender:e,fungibleAssetMetadataAddress:n,recipient:i,amount:l,options:f}=t;return c({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-V6ZSRYXI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as e}from"./chunk-G6HZPSZ3.mjs";import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{g as e}from"./chunk-G6HZPSZ3.mjs";import{b as s}from"./chunk-EDVGFSB5.mjs";import{d as c}from"./chunk-FTBXTZM2.mjs";import{d as r}from"./chunk-EXP5STXZ.mjs";async function x(a){let{aptosConfig:t,accountAddress:i,amount:p,options:n}=a,u=n?.timeoutSecs||20,{data:d}=await c({aptosConfig:t,path:"fund",body:{address:s.from(i).toString(),amount:p},originMethod:"fundAccount"}),m=d.txn_hashes[0],o=await e({aptosConfig:t,transactionHash:m,options:{timeoutSecs:u,checkSuccess:n?.checkSuccess}});if(o.type==="user_transaction")return o;throw new Error(`Unexpected transaction received for fund account: ${o.type}`)}export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-VVWBJKEA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-PBMXWRZG.mjs";import{e as a}from"./chunk-BC5BEOKM.mjs";import{a as l,b as o}from"./chunk-FDTLBR6D.mjs";import{b as y}from"./chunk-EDVGFSB5.mjs";var m=class g{constructor(i){let{multiKey:t,signers:e,address:c}=i;this.publicKey=t,this.signingScheme=3,this.accountAddress=c?y.from(c):this.publicKey.authKey().derivedAddress();let s=[];for(let n of e)s.push(this.publicKey.getIndex(n.publicKey));let r=e.map((n,u)=>[n,s[u]]);r.sort((n,u)=>n[1]-u[1]),this.signers=r.map(n=>n[0]),this.signerIndicies=r.map(n=>n[1]),this.signaturesBitmap=this.publicKey.createBitmap({bits:s})}static fromPublicKeysAndSigners(i){let{publicKeys:t,signaturesRequired:e,signers:c}=i,s=new l({publicKeys:t,signaturesRequired:e});return new g({multiKey:s,signers:c})}static isMultiKeySigner(i){return i instanceof g}signWithAuthenticator(i){return new a(this.publicKey,this.sign(i))}signTransactionWithAuthenticator(i){return new a(this.publicKey,this.signTransaction(i))}async waitForProofFetch(){let t=this.signers.filter(e=>e instanceof p).map(async e=>e.waitForProofFetch());await Promise.all(t)}sign(i){let t=[];for(let e of this.signers)t.push(e.sign(i));return new o({signatures:t,bitmap:this.signaturesBitmap})}signTransaction(i){let t=[];for(let e of this.signers)t.push(e.signTransaction(i));return new o({signatures:t,bitmap:this.signaturesBitmap})}verifySignature(i){let{message:t,signature:e}=i;if(!this.signerIndicies.every((s,r)=>r===0||s>=this.signerIndicies[r-1]))return!1;for(let s=0;s<e.signatures.length;s+=1){let r=e.signatures[s];if(!this.publicKey.publicKeys[this.signerIndicies[s]].verifySignature({message:t,signature:r}))return!1}return!0}};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-W2KQ2TSH.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-QUTP2ACU.mjs";import{a as y}from"./chunk-OVI2RY5L.mjs";import{a as m}from"./chunk-DJVPIZ2I.mjs";import{a}from"./chunk-HUDDA4FG.mjs";import{a as c}from"./chunk-S7KCJQOA.mjs";import{a as l}from"./chunk-MYRN7MDF.mjs";import{a as f}from"./chunk-CFTY4P5C.mjs";import{a as g}from"./chunk-TC3CMU7D.mjs";import{a as u}from"./chunk-TV62D5OU.mjs";import{a as A}from"./chunk-J3PN353M.mjs";import{a as s}from"./chunk-O3SVNTWW.mjs";import{a as p}from"./chunk-HK3FJVVM.mjs";import{a as d}from"./chunk-AE5KXM2X.mjs";import{a as r}from"./chunk-Q5BCQFS2.mjs";var t=class{constructor(n){this.config=new d(n),this.account=new s(this.config),this.ans=new p(this.config),this.coin=new r(this.config),this.digitalAsset=new a(this.config),this.event=new c(this.config),this.faucet=new l(this.config),this.fungibleAsset=new f(this.config),this.general=new g(this.config),this.staking=new h(this.config),this.transaction=new m(this.config),this.table=new y(this.config),this.keyless=new u(this.config),this.object=new A(this.config)}};function e(b,n,w){Object.getOwnPropertyNames(n.prototype).forEach(i=>{let o=Object.getOwnPropertyDescriptor(n.prototype,i);o&&(o.value=function(...j){return this[w][i](...j)},Object.defineProperty(b.prototype,i,o))})}e(t,s,"account");e(t,p,"ans");e(t,r,"coin");e(t,a,"digitalAsset");e(t,c,"event");e(t,l,"faucet");e(t,f,"fungibleAsset");e(t,g,"general");e(t,h,"staking");e(t,m,"transaction");e(t,y,"table");e(t,u,"keyless");e(t,A,"object");export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WM2GFECU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as o}from"./chunk-EDVGFSB5.mjs";import{a as u,c as r}from"./chunk-YELQZVBK.mjs";import{e as t}from"./chunk-E7VSBBQM.mjs";import{a as i}from"./chunk-ZZIMFLVT.mjs";var c=class extends i{constructor(e){super();this.accountAddress=o.ONE;this.moduleName=new r("account");this.structName=new r("RotationProofChallenge");this.sequenceNumber=new t(e.sequenceNumber),this.originator=e.originator,this.currentAuthKey=e.currentAuthKey,this.newPublicKey=u.U8(e.newPublicKey.toUint8Array())}serialize(e){e.serialize(this.accountAddress),e.serialize(this.moduleName),e.serialize(this.structName),e.serialize(this.sequenceNumber),e.serialize(this.originator),e.serialize(this.currentAuthKey),e.serialize(this.newPublicKey)}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YACGA3YS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as h,c as d,e as m}from"./chunk-IVVWQKCF.mjs";import{a as c,b as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as h,c as d,e as m}from"./chunk-IVVWQKCF.mjs";import{a as c,b as u}from"./chunk-4I6IUAHQ.mjs";import{c as s}from"./chunk-7T5CUI2H.mjs";import{b,c as K}from"./chunk-UAL27G6B.mjs";import{a as l}from"./chunk-KEYAPEAX.mjs";import{a as y}from"./chunk-ZZIMFLVT.mjs";import{b as p}from"./chunk-AOCNYMMX.mjs";import{randomBytes as E}from"@noble/hashes/utils";var S=1209600,i=class i extends y{constructor(e){super();let{privateKey:r,expiryDateSecs:a,blinder:n}=e;this.privateKey=r,this.publicKey=new c(r.publicKey()),this.expiryDateSecs=a||K(b()+S),this.blinder=n!==void 0?p.fromHexInput(n).toUint8Array():v();let t=h(this.publicKey.bcsToBytes(),93);t.push(BigInt(this.expiryDateSecs)),t.push(d(this.blinder));let x=m(t);this.nonce=x.toString()}getPublicKey(){return this.publicKey}isExpired(){return Math.floor(Date.now()/1e3)>this.expiryDateSecs}serialize(e){e.serializeU32AsUleb128(this.publicKey.variant),e.serializeBytes(this.privateKey.toUint8Array()),e.serializeU64(this.expiryDateSecs),e.serializeFixedBytes(this.blinder)}static deserialize(e){let r=e.deserializeUleb128AsU32(),a;switch(r){case 0:a=s.deserialize(e);break;default:throw new Error(`Unknown variant index for EphemeralPublicKey: ${r}`)}let n=e.deserializeU64(),t=e.deserializeFixedBytes(31);return new i({privateKey:a,expiryDateSecs:Number(n),blinder:t})}static fromBytes(e){return i.deserialize(new l(e))}static generate(e){let r;switch(e?.scheme){case 0:default:r=s.generate()}return new i({privateKey:r,expiryDateSecs:e?.expiryDateSecs})}sign(e){if(this.isExpired())throw new Error("EphemeralKeyPair has expired");return new u(this.privateKey.sign(e))}};i.BLINDER_LENGTH=31;var o=i;function v(){return E(o.BLINDER_LENGTH)}export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YBZI6U43.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-K7ZPRL7C.mjs";import{a as e,b as n}from"./chunk-UAL27G6B.mjs";var r=class{constructor(t,i,o,a,c){this.lastUncommintedNumber=null;this.currentNumber=null;this.lock=!1;this.aptosConfig=t,this.account=i,this.maxWaitTime=o,this.maximumInFlight=a,this.sleepTime=c}async nextSequenceNumber(){for(;this.lock;)await e(this.sleepTime);this.lock=!0;let t=BigInt(0);try{if((this.lastUncommintedNumber===null||this.currentNumber===null)&&await this.initialize(),this.currentNumber-this.lastUncommintedNumber>=this.maximumInFlight){await this.update();let i=n();for(;this.currentNumber-this.lastUncommintedNumber>=this.maximumInFlight;)await e(this.sleepTime),n()-i>this.maxWaitTime?(console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`),await this.initialize()):await this.update()}t=this.currentNumber,this.currentNumber+=BigInt(1)}catch(i){console.error("error in getting next sequence number for this account",i)}finally{this.lock=!1}return t}async initialize(){let{sequence_number:t}=await s({aptosConfig:this.aptosConfig,accountAddress:this.account.accountAddress});this.currentNumber=BigInt(t),this.lastUncommintedNumber=BigInt(t)}async update(){let{sequence_number:t}=await s({aptosConfig:this.aptosConfig,accountAddress:this.account.accountAddress});return this.lastUncommintedNumber=BigInt(t),this.lastUncommintedNumber}async synchronize(){if(this.lastUncommintedNumber!==this.currentNumber){for(;this.lock;)await e(this.sleepTime);this.lock=!0;try{await this.update();let t=n();for(;this.lastUncommintedNumber!==this.currentNumber;)n()-t>this.maxWaitTime?(console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`),await this.initialize()):(await e(this.sleepTime),await this.update())}catch(t){console.error("error in synchronizing this account sequence number with the one on chain",t)}finally{this.lock=!1}}}};export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YSVXROOO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as a}from"./chunk-34RQZPSM.mjs";import e from"eventemitter3";var i=class extends e{constructor(t){super();this.config=t}start(t){let{sender:n}=t;this.account=n,this.transactionWorker=new a(this.config,n),this.transactionWorker.start(),this.registerToEvents()}push(t){let{data:n,options:o}=t;for(let r of n)this.transactionWorker.push(r,o)}registerToEvents(){this.transactionWorker.on("transactionSent",async t=>{this.emit("transactionSent",t)}),this.transactionWorker.on("transactionSendFailed",async t=>{this.emit("transactionSendFailed",t)}),this.transactionWorker.on("transactionExecuted",async t=>{this.emit("transactionExecuted",t)}),this.transactionWorker.on("transactionExecutionFailed",async t=>{this.emit("transactionExecutionFailed",t)}),this.transactionWorker.on("executionFinish",async t=>{this.emit("executionFinish",t)})}forSingleAccount(t){try{let{sender:n,data:o,options:r}=t;this.start({sender:n}),this.push({data:o,options:r})}catch(n){throw new Error(`failed to submit transactions with error: ${n}`)}}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-Z25D7JG2.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{i as s}from"./chunk-DYMN66K5.mjs";import{b as u}from"./chunk-FOLCONSQ.mjs";import{a as c}from"./chunk-3CE63FFN.mjs";import{b as t}from"./chunk-EDVGFSB5.mjs";import{b as d}from"./chunk-ZZIMFLVT.mjs";import{b as n}from"./chunk-AOCNYMMX.mjs";var o=class r extends u{constructor(e,i){super();this.jwkAddress=t.from(e),this.keylessPublicKey=i}authKey(){let e=new d;return e.serializeU32AsUleb128(4),e.serializeFixedBytes(this.bcsToBytes()),c.fromSchemeAndBytes({scheme:2,input:e.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}toString(){return n.fromHexInput(this.toUint8Array()).toString()}verifySignature(e){throw new Error("Not yet implemented")}serialize(e){this.jwkAddress.serialize(e),this.keylessPublicKey.serialize(e)}static deserialize(e){let i=t.deserialize(e),l=s.deserialize(e);return new r(i,l)}static isPublicKey(e){return e instanceof r}static create(e){return new r(e.jwkAddress,s.create(e))}static fromJwtAndPepper(e){return new r(e.jwkAddress,s.fromJwtAndPepper(e))}static isInstance(e){return"jwkAddress"in e&&e.jwkAddress instanceof t&&"keylessPublicKey"in e&&e.keylessPublicKey instanceof s}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZAHUEAGT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-BC5BEOKM.mjs";import{a as g,b as _}from"./chunk-FDD6WNN6.mjs";import{b as p,d as b}from"./chunk-7T5CUI2H.mjs";import{b as o}from"./chunk-EDVGFSB5.mjs";import{a as h}from"./chunk-ZZIMFLVT.mjs";var c=class extends h{static deserialize(t){let e=t.deserializeUleb128AsU32();switch(e){case 0:return d.load(t);case 1:return u.load(t);case 2:return l.load(t);case 3:return A.load(t);case 4:return y.load(t);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${e}`)}}},d=class i extends c{constructor(e,r){super();this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=p.deserialize(e),s=b.deserialize(e);return new i(r,s)}},u=class i extends c{constructor(e,r){super();this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=g.deserialize(e),s=_.deserialize(e);return new i(r,s)}},l=class i extends c{constructor(e,r,s){super();this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=s}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let r=n.deserialize(e),s=e.deserializeVector(o),a=e.deserializeVector(n);return new i(r,s,a)}},A=class i extends c{constructor(e,r,s,a){super();this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=s,this.fee_payer=a}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let r=n.deserialize(e),s=e.deserializeVector(o),a=e.deserializeVector(n),z=o.deserialize(e),S=n.deserialize(e),E={address:z,authenticator:S};return new i(r,s,a,E)}},y=class i extends c{constructor(e){super();this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let r=n.deserialize(e);return new i(r)}};export{c as a,d as b,u as c,l as d,A as e,y as f};
|
|
2
|
+
//# sourceMappingURL=chunk-ZASN3QQQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-6B65YWGD.mjs";import{a as m}from"./chunk-LICJI4D2.mjs";import{c as A}from"./chunk-J45FMNYT.mjs";import{s as f}from"./chunk-VHNX2NUR.mjs";import{b as w}from"./chunk-EDVGFSB5.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 D(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[t,n,...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(!D(t))throw new Error(`${t} is not valid. ${T}`);if(n&&!D(n))throw new Error(`${n} is not valid. ${T}`);return{domainName:n||t,subdomainName:n?t:void 0}}var I=(n=>(n[n.Independent=0]="Independent",n[n.FollowsDomain=1]="FollowsDomain",n))(I||{});function E(e){if(!e)return!1;let t=new Date(e.domain_expiration_timestamp).getTime()<Date.now(),n=new Date(e.expiration_timestamp).getTime()<Date.now();return e.subdomain&&t?!1:e.subdomain&&e.subdomain_expiration_policy===1?!0:!n}var j="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",O="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",v={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:O,custom:null,devnet:null};function d(e){let t=v[e.network];if(!t)throw new Error(`The ANS contract is not deployed to ${e.network}`);return t}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function F(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,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:t,expiration:n,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(t),{domainName:y,subdomainName:N}=c(o),x=n.policy==="subdomain:independent"||n.policy==="subdomain:follow-domain";if(N&&!x)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(x&&!N)throw new Error(`Policy is set to ${n.policy} but no subdomain was provided`);if(n.policy==="domain"){let h=n.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let G=h*31536e3;return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[y,G,s,i]},options:a})}if(!N)throw new Error(`${n.policy} requires a subdomain to be provided.`);let _=await P({aptosConfig:t,name:y});if(!_)throw new Error("The domain does not exist");let S=n.policy==="subdomain:independent"?n.expirationDate:_;if(S>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[y,N,Math.round(S/1e3),n.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function P(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n);try{let i=await g({aptosConfig:t,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function K(e){let{aptosConfig:t,address:n}=e,o=d(t),r=await g({aptosConfig:t,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(n).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function W(e){let{aptosConfig:t,sender:n,name:o,options:r}=e,s=d(t);if(!o)return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function H(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function J(e){let{aptosConfig:t,sender:n,name:o,address:r,options:s}=e,i=d(t),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function X(e){let{aptosConfig:t,name:n}=e,{domainName:o,subdomainName:r=""}=c(n),a=(await A({aptosConfig:t,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=l(a)),E(a)?a:void 0}async function Z(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountNames",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(l)}async function ee(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountDomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(l)}async function ne(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(l)}async function te(e){let{aptosConfig:t,options:n,domain:o}=e;return(await A({aptosConfig:t,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""}}}}})).current_aptos_names.map(l).filter(E)}async function C(e){let{aptosConfig:t}=e,n=d(t),[o]=await g({aptosConfig:t,payload:{function:`${n}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function oe(e){let{aptosConfig:t,sender:n,name:o,years:r=1,options:s}=e,i=d(t),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:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function l(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,D as b,c,I as d,E as e,j as f,O as g,F as h,Y as i,P as j,K as k,W as l,H as m,J as n,X as o,Z as p,ee as q,ne as r,te as s,oe as t};
|
|
2
|
+
//# sourceMappingURL=chunk-ZSHSL3US.mjs.map
|
package/dist/esm/client/core.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-AT2A7OZD.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-AT2A7OZD.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BSUYPXRD.mjs";import"../chunk-UAL27G6B.mjs";import"../chunk-3TSO6PDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-YELQZVBK.mjs";import"../chunk-CDIKSNSU.mjs";import"../chunk-TVWAYKEP.mjs";import"../chunk-E7VSBBQM.mjs";import"../chunk-23J256KA.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-KEYAPEAX.mjs";import"../chunk-ZZIMFLVT.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-C5JQQTMI.mjs";import"../chunk-EXP5STXZ.mjs";import"../chunk-ZXVQ2OBJ.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,d}from"../chunk-H3TJNBHX.mjs";import"../chunk-AT2A7OZD.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-H3TJNBHX.mjs";import"../chunk-AT2A7OZD.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BSUYPXRD.mjs";import"../chunk-UAL27G6B.mjs";import"../chunk-3TSO6PDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-YELQZVBK.mjs";import"../chunk-CDIKSNSU.mjs";import"../chunk-TVWAYKEP.mjs";import"../chunk-E7VSBBQM.mjs";import"../chunk-23J256KA.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-KEYAPEAX.mjs";import"../chunk-ZZIMFLVT.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-C5JQQTMI.mjs";import"../chunk-EXP5STXZ.mjs";import"../chunk-ZXVQ2OBJ.mjs";import"../chunk-FVA2OPG4.mjs";export{a as get,b as getAptosFullNode,c as getAptosPepperService,d 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,d as g}from"../chunk-H3TJNBHX.mjs";import{a as h,b as i,c as j,d as k,e as l,f as m}from"../chunk-FTBXTZM2.mjs";import{a as b,b as c}from"../chunk-AT2A7OZD.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-
|
|
1
|
+
import"../chunk-N2FKVZ4D.mjs";import{a as d,b as e,c as f,d as g}from"../chunk-H3TJNBHX.mjs";import{a as h,b as i,c as j,d as k,e as l,f as m}from"../chunk-FTBXTZM2.mjs";import{a as b,b as c}from"../chunk-AT2A7OZD.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BSUYPXRD.mjs";import"../chunk-UAL27G6B.mjs";import{a}from"../chunk-3TSO6PDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-YELQZVBK.mjs";import"../chunk-CDIKSNSU.mjs";import"../chunk-TVWAYKEP.mjs";import"../chunk-E7VSBBQM.mjs";import"../chunk-23J256KA.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-KEYAPEAX.mjs";import"../chunk-ZZIMFLVT.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-C5JQQTMI.mjs";import"../chunk-EXP5STXZ.mjs";import"../chunk-ZXVQ2OBJ.mjs";import"../chunk-FVA2OPG4.mjs";export{a as AptosApiError,c as aptosRequest,d as get,e as getAptosFullNode,f as getAptosPepperService,g as paginateWithCursor,h as post,k as postAptosFaucet,i as postAptosFullNode,j as postAptosIndexer,l as postAptosPepperService,m as postAptosProvingService,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,e,f}from"../chunk-FTBXTZM2.mjs";import"../chunk-AT2A7OZD.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f}from"../chunk-FTBXTZM2.mjs";import"../chunk-AT2A7OZD.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BSUYPXRD.mjs";import"../chunk-UAL27G6B.mjs";import"../chunk-3TSO6PDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-YELQZVBK.mjs";import"../chunk-CDIKSNSU.mjs";import"../chunk-TVWAYKEP.mjs";import"../chunk-E7VSBBQM.mjs";import"../chunk-23J256KA.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-KEYAPEAX.mjs";import"../chunk-ZZIMFLVT.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-C5JQQTMI.mjs";import"../chunk-EXP5STXZ.mjs";import"../chunk-ZXVQ2OBJ.mjs";import"../chunk-FVA2OPG4.mjs";export{a as post,d as postAptosFaucet,b as postAptosFullNode,c as postAptosIndexer,e as postAptosPepperService,f as postAptosProvingService};
|
|
2
2
|
//# sourceMappingURL=post.mjs.map
|