@aptos-labs/ts-sdk 1.13.3-zeta.0 → 1.13.3-zeta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/index.d.ts +24 -4
- package/dist/common/index.js +11 -11
- 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.d.mts +1 -0
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +23 -4
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +2 -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/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.d.mts +3 -1
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/staking.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/{chunk-TJPWYYNO.mjs → chunk-2Q6K4CLJ.mjs} +2 -2
- package/dist/esm/{chunk-HFLWASAB.mjs → chunk-33WBJV5U.mjs} +2 -2
- package/dist/esm/{chunk-DKLA4F3P.mjs → chunk-37CYBCWS.mjs} +2 -2
- package/dist/esm/{chunk-R6PFLI3Z.mjs → chunk-3QHRPREO.mjs} +2 -2
- package/dist/esm/{chunk-J2IIPYZG.mjs → chunk-3YNRBMPS.mjs} +2 -2
- package/dist/esm/{chunk-EQKI6NJR.mjs → chunk-4XB3D2ZD.mjs} +2 -2
- package/dist/esm/{chunk-X56CTMYB.mjs → chunk-5QBTBH64.mjs} +2 -2
- package/dist/esm/{chunk-U72H6EST.mjs → chunk-6CQH7JPF.mjs} +2 -2
- package/dist/esm/{chunk-QHIQLTBS.mjs → chunk-6J3CB3DN.mjs} +2 -2
- package/dist/esm/{chunk-HURQZGUZ.mjs → chunk-6M6XXPQQ.mjs} +2 -2
- package/dist/esm/{chunk-CQJ4WN7M.mjs → chunk-7JNPSNL6.mjs} +2 -2
- package/dist/esm/{chunk-LDMEIVL6.mjs → chunk-A7L2Z5DW.mjs} +2 -2
- package/dist/esm/{chunk-7XHVF3ZX.mjs → chunk-CHQ6IKE3.mjs} +2 -2
- package/dist/esm/{chunk-3LQPAGL6.mjs → chunk-DIBNAYZ2.mjs} +2 -2
- package/dist/esm/chunk-DMKFITUM.mjs +2 -0
- package/dist/esm/chunk-DMKFITUM.mjs.map +1 -0
- package/dist/esm/{chunk-2SD6JLIU.mjs → chunk-DOCYCNXV.mjs} +2 -2
- package/dist/esm/{chunk-KCVBUZ6L.mjs → chunk-DX62SMGM.mjs} +2 -2
- package/dist/esm/chunk-EFRNRARV.mjs +2 -0
- package/dist/esm/chunk-EFRNRARV.mjs.map +1 -0
- package/dist/esm/{chunk-WO2KROQ6.mjs → chunk-EKOIHFAW.mjs} +2 -2
- package/dist/esm/{chunk-6NZNCDDW.mjs → chunk-GI52SX32.mjs} +2 -2
- package/dist/esm/{chunk-CN37OHFT.mjs → chunk-GKCO5PQJ.mjs} +2 -2
- package/dist/esm/{chunk-TBG3MIIE.mjs → chunk-HJULFJXF.mjs} +2 -2
- package/dist/esm/{chunk-AKGASNN4.mjs → chunk-IM32PZOD.mjs} +2 -2
- package/dist/esm/chunk-IOVRZ2CA.mjs +2 -0
- package/dist/esm/chunk-IOVRZ2CA.mjs.map +1 -0
- package/dist/esm/{chunk-LX7N4NUS.mjs → chunk-ITEV72BZ.mjs} +2 -2
- package/dist/esm/{chunk-274CXZ6R.mjs → chunk-KFJMLLOA.mjs} +2 -2
- package/dist/esm/{chunk-F6QCHPVS.mjs → chunk-KGJITNRZ.mjs} +2 -2
- package/dist/esm/{chunk-XEXWFQNP.mjs → chunk-KOCKKI4F.mjs} +2 -2
- package/dist/esm/{chunk-H6BRBIMG.mjs → chunk-LV7OW245.mjs} +2 -2
- package/dist/esm/{chunk-SNQJV7MF.mjs → chunk-MJGZJL3W.mjs} +2 -2
- package/dist/esm/{chunk-QMIEBNTP.mjs → chunk-NPNAKSCR.mjs} +2 -2
- package/dist/esm/{chunk-JOYJUVSE.mjs → chunk-NWLZDI2I.mjs} +2 -2
- package/dist/esm/{chunk-3PGVEOWR.mjs → chunk-ODTNF2YP.mjs} +2 -2
- package/dist/esm/{chunk-N4B6S6FK.mjs → chunk-OKG6X5TX.mjs} +2 -2
- package/dist/esm/{chunk-JEUAQVXW.mjs → chunk-OYTLWUQT.mjs} +2 -2
- package/dist/esm/chunk-P5VCS2F5.mjs +2 -0
- package/dist/esm/chunk-P5VCS2F5.mjs.map +1 -0
- package/dist/esm/{chunk-7FNHL6LU.mjs → chunk-PTIZKRON.mjs} +2 -2
- package/dist/esm/{chunk-SRLCFTZR.mjs → chunk-R4UIPTBH.mjs} +2 -2
- package/dist/esm/{chunk-7MPJPZ73.mjs → chunk-R7BAM2G6.mjs} +2 -2
- package/dist/esm/{chunk-T3W5USZC.mjs → chunk-RDNPWCZ4.mjs} +2 -2
- package/dist/esm/{chunk-NMVZP3Q2.mjs → chunk-SA7MZPM3.mjs} +2 -2
- package/dist/esm/{chunk-Q7TGZJT4.mjs → chunk-T7JIGO3O.mjs} +2 -2
- package/dist/esm/{chunk-3CIA6J5L.mjs → chunk-TFJCMFKE.mjs} +2 -2
- package/dist/esm/{chunk-QXVGXZJX.mjs → chunk-TV64AINP.mjs} +2 -2
- package/dist/esm/{chunk-H3LMPXEM.mjs → chunk-UKJUHLZW.mjs} +2 -2
- package/dist/esm/{chunk-RPXN7HGR.mjs → chunk-VTX77UM3.mjs} +2 -2
- package/dist/esm/{chunk-E4Z5IEZP.mjs → chunk-WPVBC4JS.mjs} +2 -2
- package/dist/esm/{chunk-6NMHAFIO.mjs → chunk-WTVN3XGK.mjs} +2 -2
- package/dist/esm/chunk-X7GVXVT4.mjs +2 -0
- package/dist/esm/{chunk-YGHLXEB4.mjs.map → chunk-X7GVXVT4.mjs.map} +1 -1
- package/dist/esm/{chunk-TE7AJKSU.mjs → chunk-XHPLLMR5.mjs} +2 -2
- package/dist/esm/{chunk-APEBWN6Q.mjs → chunk-YGB7MEH3.mjs} +2 -2
- package/dist/esm/{chunk-HQWIGPYQ.mjs → chunk-YH6UKGIX.mjs} +2 -2
- package/dist/esm/{chunk-KNHI66FK.mjs → chunk-YI7FZPIK.mjs} +2 -2
- package/dist/esm/{chunk-E36GTDEB.mjs → chunk-ZGTJMNZG.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/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/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.d.mts +2 -2
- 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.d.mts +3 -1
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/staking.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/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/src/account/EphemeralKeyPair.ts +8 -0
- package/src/account/KeylessAccount.ts +70 -11
- package/src/api/keyless.ts +2 -1
- package/src/internal/keyless.ts +7 -4
- package/src/version.ts +1 -1
- package/dist/esm/chunk-2M7KHFEG.mjs +0 -2
- package/dist/esm/chunk-2M7KHFEG.mjs.map +0 -1
- package/dist/esm/chunk-NNA5VEB2.mjs +0 -2
- package/dist/esm/chunk-NNA5VEB2.mjs.map +0 -1
- package/dist/esm/chunk-PLPCOELE.mjs +0 -2
- package/dist/esm/chunk-PLPCOELE.mjs.map +0 -1
- package/dist/esm/chunk-W76IQV5K.mjs +0 -2
- package/dist/esm/chunk-W76IQV5K.mjs.map +0 -1
- package/dist/esm/chunk-YGHLXEB4.mjs +0 -2
- /package/dist/esm/{chunk-TJPWYYNO.mjs.map → chunk-2Q6K4CLJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-HFLWASAB.mjs.map → chunk-33WBJV5U.mjs.map} +0 -0
- /package/dist/esm/{chunk-DKLA4F3P.mjs.map → chunk-37CYBCWS.mjs.map} +0 -0
- /package/dist/esm/{chunk-R6PFLI3Z.mjs.map → chunk-3QHRPREO.mjs.map} +0 -0
- /package/dist/esm/{chunk-J2IIPYZG.mjs.map → chunk-3YNRBMPS.mjs.map} +0 -0
- /package/dist/esm/{chunk-EQKI6NJR.mjs.map → chunk-4XB3D2ZD.mjs.map} +0 -0
- /package/dist/esm/{chunk-X56CTMYB.mjs.map → chunk-5QBTBH64.mjs.map} +0 -0
- /package/dist/esm/{chunk-U72H6EST.mjs.map → chunk-6CQH7JPF.mjs.map} +0 -0
- /package/dist/esm/{chunk-QHIQLTBS.mjs.map → chunk-6J3CB3DN.mjs.map} +0 -0
- /package/dist/esm/{chunk-HURQZGUZ.mjs.map → chunk-6M6XXPQQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-CQJ4WN7M.mjs.map → chunk-7JNPSNL6.mjs.map} +0 -0
- /package/dist/esm/{chunk-LDMEIVL6.mjs.map → chunk-A7L2Z5DW.mjs.map} +0 -0
- /package/dist/esm/{chunk-7XHVF3ZX.mjs.map → chunk-CHQ6IKE3.mjs.map} +0 -0
- /package/dist/esm/{chunk-3LQPAGL6.mjs.map → chunk-DIBNAYZ2.mjs.map} +0 -0
- /package/dist/esm/{chunk-2SD6JLIU.mjs.map → chunk-DOCYCNXV.mjs.map} +0 -0
- /package/dist/esm/{chunk-KCVBUZ6L.mjs.map → chunk-DX62SMGM.mjs.map} +0 -0
- /package/dist/esm/{chunk-WO2KROQ6.mjs.map → chunk-EKOIHFAW.mjs.map} +0 -0
- /package/dist/esm/{chunk-6NZNCDDW.mjs.map → chunk-GI52SX32.mjs.map} +0 -0
- /package/dist/esm/{chunk-CN37OHFT.mjs.map → chunk-GKCO5PQJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-TBG3MIIE.mjs.map → chunk-HJULFJXF.mjs.map} +0 -0
- /package/dist/esm/{chunk-AKGASNN4.mjs.map → chunk-IM32PZOD.mjs.map} +0 -0
- /package/dist/esm/{chunk-LX7N4NUS.mjs.map → chunk-ITEV72BZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-274CXZ6R.mjs.map → chunk-KFJMLLOA.mjs.map} +0 -0
- /package/dist/esm/{chunk-F6QCHPVS.mjs.map → chunk-KGJITNRZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-XEXWFQNP.mjs.map → chunk-KOCKKI4F.mjs.map} +0 -0
- /package/dist/esm/{chunk-H6BRBIMG.mjs.map → chunk-LV7OW245.mjs.map} +0 -0
- /package/dist/esm/{chunk-SNQJV7MF.mjs.map → chunk-MJGZJL3W.mjs.map} +0 -0
- /package/dist/esm/{chunk-QMIEBNTP.mjs.map → chunk-NPNAKSCR.mjs.map} +0 -0
- /package/dist/esm/{chunk-JOYJUVSE.mjs.map → chunk-NWLZDI2I.mjs.map} +0 -0
- /package/dist/esm/{chunk-3PGVEOWR.mjs.map → chunk-ODTNF2YP.mjs.map} +0 -0
- /package/dist/esm/{chunk-N4B6S6FK.mjs.map → chunk-OKG6X5TX.mjs.map} +0 -0
- /package/dist/esm/{chunk-JEUAQVXW.mjs.map → chunk-OYTLWUQT.mjs.map} +0 -0
- /package/dist/esm/{chunk-7FNHL6LU.mjs.map → chunk-PTIZKRON.mjs.map} +0 -0
- /package/dist/esm/{chunk-SRLCFTZR.mjs.map → chunk-R4UIPTBH.mjs.map} +0 -0
- /package/dist/esm/{chunk-7MPJPZ73.mjs.map → chunk-R7BAM2G6.mjs.map} +0 -0
- /package/dist/esm/{chunk-T3W5USZC.mjs.map → chunk-RDNPWCZ4.mjs.map} +0 -0
- /package/dist/esm/{chunk-NMVZP3Q2.mjs.map → chunk-SA7MZPM3.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q7TGZJT4.mjs.map → chunk-T7JIGO3O.mjs.map} +0 -0
- /package/dist/esm/{chunk-3CIA6J5L.mjs.map → chunk-TFJCMFKE.mjs.map} +0 -0
- /package/dist/esm/{chunk-QXVGXZJX.mjs.map → chunk-TV64AINP.mjs.map} +0 -0
- /package/dist/esm/{chunk-H3LMPXEM.mjs.map → chunk-UKJUHLZW.mjs.map} +0 -0
- /package/dist/esm/{chunk-RPXN7HGR.mjs.map → chunk-VTX77UM3.mjs.map} +0 -0
- /package/dist/esm/{chunk-E4Z5IEZP.mjs.map → chunk-WPVBC4JS.mjs.map} +0 -0
- /package/dist/esm/{chunk-6NMHAFIO.mjs.map → chunk-WTVN3XGK.mjs.map} +0 -0
- /package/dist/esm/{chunk-TE7AJKSU.mjs.map → chunk-XHPLLMR5.mjs.map} +0 -0
- /package/dist/esm/{chunk-APEBWN6Q.mjs.map → chunk-YGB7MEH3.mjs.map} +0 -0
- /package/dist/esm/{chunk-HQWIGPYQ.mjs.map → chunk-YH6UKGIX.mjs.map} +0 -0
- /package/dist/esm/{chunk-KNHI66FK.mjs.map → chunk-YI7FZPIK.mjs.map} +0 -0
- /package/dist/esm/{chunk-E36GTDEB.mjs.map → chunk-ZGTJMNZG.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-EFRNRARV.mjs";import{a as y}from"./chunk-6CQH7JPF.mjs";import{a as u}from"./chunk-R4UIPTBH.mjs";import{a as A}from"./chunk-6GQAHQGW.mjs";import{a as r}from"./chunk-NPNAKSCR.mjs";import{a}from"./chunk-GKCO5PQJ.mjs";import{a as c}from"./chunk-UKJUHLZW.mjs";import{a as f}from"./chunk-DIBNAYZ2.mjs";import{a as g}from"./chunk-DX62SMGM.mjs";import{a as l}from"./chunk-ODTNF2YP.mjs";import{a as s}from"./chunk-TFJCMFKE.mjs";import{a as p}from"./chunk-4XB3D2ZD.mjs";var t=class{constructor(e){this.config=new A(e),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 f(this.config),this.fungibleAsset=new g(this.config),this.general=new l(this.config),this.staking=new y(this.config),this.transaction=new u(this.config),this.keyless=new h(this.config)}};function n(m,e,d){Object.getOwnPropertyNames(e.prototype).forEach(i=>{let o=Object.getOwnPropertyDescriptor(e.prototype,i);o&&(o.value=function(...w){return this[d][i](...w)},Object.defineProperty(m.prototype,i,o))})}n(t,s,"account");n(t,p,"ans");n(t,r,"coin");n(t,a,"digitalAsset");n(t,c,"event");n(t,f,"faucet");n(t,g,"fungibleAsset");n(t,l,"general");n(t,y,"staking");n(t,u,"transaction");n(t,h,"keyless");export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NWLZDI2I.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-MJGZJL3W.mjs";import{a as o,b as s,c as t,d as r,e as n,f as i,h as a,i as g}from"./chunk-YGB7MEH3.mjs";var p=class{constructor(e){this.config=e}async getLedgerInfo(){return o({aptosConfig:this.config})}async getChainId(){return(await this.getLedgerInfo()).chain_id}async getBlockByVersion(e){return s({aptosConfig:this.config,...e})}async getBlockByHeight(e){return t({aptosConfig:this.config,...e})}async getTableItem(e){return r({aptosConfig:this.config,...e})}async view(e){return c({aptosConfig:this.config,...e})}async getChainTopUserTransactions(e){return n({aptosConfig:this.config,...e})}async queryIndexer(e){return i({aptosConfig:this.config,...e})}async getIndexerLastSuccessVersion(){return a({aptosConfig:this.config})}async getProcessorStatus(e){return g({aptosConfig:this.config,processorType:e})}};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ODTNF2YP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-DOCYCNXV.mjs";import{a as o,b as c}from"./chunk-U6Z4FNB7.mjs";import{a as h,h as d}from"./chunk-VTX77UM3.mjs";import{g as u}from"./chunk-GI52SX32.mjs";import g from"eventemitter3";var m="fulfilled",f=(n=>(n.TransactionSent="transactionSent",n.TransactionSendFailed="transactionSendFailed",n.TransactionExecuted="transactionExecuted",n.TransactionExecutionFailed="transactionExecutionFailed",n.ExecutionFinish="executionFinish",n))(f||{}),p=class extends g{constructor(t,e,a=30,n=100,i=10){super();this.taskQueue=new o;this.transactionsQueue=new o;this.outstandingTransactions=new o;this.sentTransactions=[];this.executedTransactions=[];this.aptosConfig=t,this.account=e,this.started=!1,this.accountSequnceNumber=new l(t,e,a,n,i)}async submitNextTransaction(){try{for(;;){let t=await this.accountSequnceNumber.nextSequenceNumber();if(t===null)return;let e=await this.generateNextTransaction(this.account,t);if(!e)return;let a=d({aptosConfig:this.aptosConfig,transaction:e,signer:this.account});await this.outstandingTransactions.enqueue([a,t])}}catch(t){if(t instanceof c)return;throw new Error(`Submit transaction failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async processTransactions(){try{for(;;){let t=[],e=[],[a,n]=await this.outstandingTransactions.dequeue();for(t.push(a),e.push(n);!this.outstandingTransactions.isEmpty();)[a,n]=await this.outstandingTransactions.dequeue(),t.push(a),e.push(n);let i=await Promise.allSettled(t);for(let s=0;s<i.length&&s<e.length;s+=1){let r=i[s];n=e[s],r.status===m?(this.sentTransactions.push([r.value.hash,n,null]),this.emit("transactionSent",{message:`transaction hash ${r.value.hash} has been committed to chain`,transactionHash:r.value.hash}),await this.checkTransaction(r,n)):(this.sentTransactions.push([r.status,n,r.reason]),this.emit("transactionSendFailed",{message:`failed to commit transaction ${this.sentTransactions.length} with error ${r.reason}`,error:r.reason}))}this.emit("executionFinish",{message:`execute ${i.length} transactions finished`})}}catch(t){if(t instanceof c)return;throw new Error(`Process execution failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async checkTransaction(t,e){try{let a=[];a.push(u({aptosConfig:this.aptosConfig,transactionHash:t.value.hash,options:{timeoutSecs:3}}));let n=await Promise.allSettled(a);for(let i=0;i<n.length;i+=1){let s=n[i];s.status===m?(this.executedTransactions.push([s.value.hash,e,null]),this.emit("transactionExecuted",{message:`transaction hash ${s.value.hash} has been executed on chain`,transactionHash:t.value.hash})):(this.executedTransactions.push([s.status,e,s.reason]),this.emit("transactionExecutionFailed",{message:`failed to execute transaction ${this.executedTransactions.length} with error ${s.reason}`,error:s.reason}))}}catch(a){throw new Error(`Check transaction failed for ${this.account.accountAddress.toString()} with error ${a}`)}}async push(t,e){this.transactionsQueue.enqueue([t,e])}async generateNextTransaction(t,e){if(this.transactionsQueue.isEmpty())return;let[a,n]=await this.transactionsQueue.dequeue();return h({aptosConfig:this.aptosConfig,sender:t.accountAddress,data:a,options:{...n,accountSequenceNumber:e}})}async run(){try{for(;!this.taskQueue.isCancelled();)await(await this.taskQueue.dequeue())()}catch(t){throw new Error(`Unable to start transaction batching: ${t}`)}}start(){if(this.started)throw new Error("worker has already started");this.started=!0,this.taskQueue.enqueue(()=>this.submitNextTransaction()),this.taskQueue.enqueue(()=>this.processTransactions()),this.run()}stop(){if(this.taskQueue.isCancelled())throw new Error("worker has already stopped");this.started=!1,this.taskQueue.cancel()}};export{m as a,f as b,p as c};
|
|
2
|
+
//# sourceMappingURL=chunk-OKG6X5TX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-VTX77UM3.mjs";import{f as M}from"./chunk-3YNRBMPS.mjs";import{c as V}from"./chunk-PFFAQZHT.mjs";import{f as b}from"./chunk-YGB7MEH3.mjs";import{n as x,w as E,x as G,y as q}from"./chunk-S4SEFF4K.mjs";import{b as w,f as v,i as h,l as A,m as f,n as s,q as p,s as g}from"./chunk-3VGX3TXH.mjs";import{b as u}from"./chunk-T23OVRNF.mjs";import{a as I,b as c}from"./chunk-EB7AI4B4.mjs";import{a as T,e as S}from"./chunk-6RBUXB5I.mjs";import{d as O}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>"},m="0x4::token::Token";async function It(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:u.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:q,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function _t(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:u.from(n).toStringLong()},amount:{_gt:0}};return(await b({aptosConfig:o,query:{query:G,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function Pt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:u.from(n).toStringLong()},amount:{_gt:0}},i={query:G,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await b({aptosConfig:o,query:i,originMethod:"getOwnedDigitalAssets"})).current_token_ownerships_v2}async function kt(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:u.from(n).toStringLong()}},i={query:E,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await b({aptosConfig:o,query:i,originMethod:"getDigitalAssetActivity"})).token_activities_v2}var Q={typeParameters:[],parameters:[new s(p()),new v,new s(p()),new s(p()),new w,new w,new w,new w,new w,new w,new w,new w,new w,new v,new v]};async function Dt(t){let{aptosConfig:o,options:n,creator:e}=t;return d({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::create_collection",functionArguments:[new c(t.description),new S(t.maxSupply??O),new c(t.name),new c(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 S(t.royaltyNumerator??0),new S(t.royaltyDenominator??1)],abi:Q},options:n})}async function U(t){let{aptosConfig:o,creatorAddress:n,collectionName:e,options:r}=t,i=u.from(n),a={collection_name:{_eq:e},creator_address:{_eq:i.toStringLong()}};return r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard??"v2"}),(await b({aptosConfig:o,query:{query:x,variables:{where_condition:a}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function St(t){let{aptosConfig:o,collectionId:n}=t,r={collection_id:{_eq:u.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:x,variables:{where_condition:r}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function vt(t){return(await U(t)).collection_id}var F={typeParameters:[],parameters:[new s(p()),new s(p()),new s(p()),new s(p()),new f(new s(p())),new f(new s(p())),new f(f.u8())]};async function ht(t){let{aptosConfig:o,options:n,creator:e,collection:r,description:i,name:a,uri:l,propertyKeys:y,propertyTypes:P,propertyValues:_}=t,k=P?.map(D=>C[D]);return d({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::mint",functionArguments:[new c(r),new c(i),new c(a),new c(l),I.MoveString(y??[]),I.MoveString(k??[]),R(_??[],k??[])],abi:F},options:n})}var N={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new h]};async function xt(t){let{aptosConfig:o,sender:n,digitalAssetAddress:e,recipient:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x1::object::transfer",typeArguments:[i??m],functionArguments:[u.from(e),u.from(r)],abi:N},options:a})}var Y={typeParameters:[],parameters:[new s(p()),new s(p()),new s(p()),new s(p()),new f(new s(p())),new f(new s(p())),new f(f.u8()),new h]};async function Gt(t){let{aptosConfig:o,account:n,collection:e,description:r,name:i,uri:a,recipient:l,propertyKeys:y,propertyTypes:P,propertyValues:_,options:k}=t;if(y?.length!==_?.length)throw new Error("Property keys and property values counts do not match");if(P?.length!==_?.length)throw new Error("Property types and property values counts do not match");let D=P?.map(K=>C[K]);return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::mint_soul_bound",functionArguments:[e,r,i,a,I.MoveString(y??[]),I.MoveString(D??[]),R(_??[],D??[]),l],abi:Y},options:k})}var z={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function Bt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::burn",typeArguments:[r??m],functionArguments:[u.from(e)],abi:z},options:i})}var L={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function Ot(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::freeze_transfer",typeArguments:[r??m],functionArguments:[e],abi:L},options:i})}var j={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function Et(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::unfreeze_transfer",typeArguments:[r??m],functionArguments:[e],abi:j},options:i})}var X={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function qt(t){let{aptosConfig:o,creator:n,description:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_description",typeArguments:[i??m],functionArguments:[u.from(r),new c(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Vt(t){let{aptosConfig:o,creator:n,name:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_name",typeArguments:[i??m],functionArguments:[u.from(r),new c(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Mt(t){let{aptosConfig:o,creator:n,uri:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_uri",typeArguments:[i??m],functionArguments:[u.from(r),new c(e)],abi:J},options:a})}var W={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p()),new s(p()),f.u8()]};async function Rt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_property",typeArguments:[l??m],functionArguments:[u.from(a),new c(e),new c(C[r]),I.U8(B(i,C[r]))],abi:W},options:y})}var Z={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Kt(t){let{aptosConfig:o,creator:n,propertyKey:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::remove_property",typeArguments:[i??m],functionArguments:[u.from(r),new c(e)],abi:Z},options:a})}var $={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p()),new s(p()),f.u8()]};async function Qt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_property",typeArguments:[l??m],functionArguments:[u.from(a),new c(e),new c(C[r]),B(i,C[r])],abi:$},options:y})}var tt={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new s(g(new A(0))),new s(p()),new A(1)]};async function Ut(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_typed_property",typeArguments:[l??m,C[r]],functionArguments:[u.from(a),new c(e),i],abi:tt},options:y})}var et={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new s(g(new A(0))),new s(p()),new A(1)]};async function Ft(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_typed_property",typeArguments:[l??m,C[r]],functionArguments:[u.from(a),new c(e),i],abi:et},options:y})}function R(t,o){let n=new Array;return o.forEach((e,r)=>{n.push(B(t[r],e))}),n}function B(t,o){let n=V(o);return M(t,n,0,[]).bcsToBytes()}export{It as a,_t as b,Pt as c,kt as d,Dt as e,U as f,St as g,vt as h,ht as i,xt as j,Gt as k,Bt as l,Ot as m,Et as n,qt as o,Vt as p,Mt as q,Rt as r,Kt as s,Qt as t,Ut as u,Ft as v};
|
|
2
|
+
//# sourceMappingURL=chunk-OYTLWUQT.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as j}from"./chunk-DMKFITUM.mjs";import{a as g,b as I}from"./chunk-2YDIOWRJ.mjs";import{d as T}from"./chunk-WPVBC4JS.mjs";import{a as E,b as x}from"./chunk-6M6XXPQQ.mjs";import{i as F,j as b,k as y,m as f,n as A,o as m}from"./chunk-WTVN3XGK.mjs";import{k as K}from"./chunk-S5HG2QUD.mjs";import{b as w}from"./chunk-T23OVRNF.mjs";import{a as S}from"./chunk-6IFMQ5AS.mjs";import{b as l}from"./chunk-TVRJ3M7B.mjs";import{b as u}from"./chunk-AOCNYMMX.mjs";import{jwtDecode as O}from"jwt-decode";import{decode as B}from"base-64";import D from"eventemitter3";function G(v){let e=v.replace(/-/g,"+").replace(/_/g,"/"),r=e+"==".substring(0,(3-e.length%3)%3);return B(r)}var s=class s{constructor(e){let{address:r,ephemeralKeyPair:t,iss:i,uidKey:a,uidVal:o,aud:c,pepper:n,proofOrFetcher:p,proofFetchCallback:h,jwt:d}=e;this.ephemeralKeyPair=t;let k=b(e);if(this.publicKey=new F(i,k),this.accountAddress=r?w.from(r):this.publicKey.authKey().derivedAddress(),this.uidKey=a,this.uidVal=o,this.aud=c,this.jwt=d,this.emitter=new D,this.proofOrPromise=p,p instanceof f)this.proof=p;else{if(h===void 0)throw new Error("Must provide callback");this.emitter.on("proofFetchFinish",async z=>{await h(z),this.emitter.removeAllListeners()}),this.init(p)}this.signingScheme=2;let P=u.fromHexInput(n).toUint8Array();if(P.length!==s.PEPPER_LENGTH)throw new Error(`Pepper length in bytes should be ${s.PEPPER_LENGTH}`);this.pepper=P}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)}static deserialize(e){let r=e.deserializeStr(),t=e.deserializeStr(),i=e.deserializeFixedBytes(31),a=j.deserialize(e),o=f.deserialize(e);return s.fromJWTAndProof({proof:o,pepper:i,uidKey:t,jwt:r,ephemeralKeyPair:a})}isExpired(){return this.ephemeralKeyPair.isExpired()}bcsToBytes(){let e=new l;return this.serialize(e),e.toUint8Array()}bcsToHex(){let e=this.bcsToBytes();return u.fromHexInput(e)}signWithAuthenticator(e){let r=g(e),t=new x(this.sign(r.bcsToBytes())),i=new E(this.publicKey);return new T(i,t)}async waitForProofFetch(){this.proofOrPromise instanceof Promise&&await this.proofOrPromise}sign(e){let{expiryDateSecs:r}=this.ephemeralKeyPair,t=Math.floor(new Date().getTime()/1e3);if(r<t)throw new Error("Ephemeral key pair is expired.");if(this.proof===void 0)throw new Error("Proof not found");let i=this.jwt.split(".")[0],a=this.ephemeralKeyPair.getPublicKey(),o=new l;o.serializeFixedBytes(u.fromHexInput(e).toUint8Array()),o.serializeOption(this.proof.proof);let c=I(o.toUint8Array(),"APTOS::TransactionAndProof"),n=this.ephemeralKeyPair.sign(c);return new m({jwtHeader:G(i),openIdSignatureOrZkProof:new y(this.proof),expiryDateSecs:r,ephemeralPublicKey:a,ephemeralSignature:n})}signTransaction(e){let r=g(e);return this.sign(r.bcsToBytes())}signWithOpenIdSignature(e){let[r,t,i]=this.jwt.split("."),a=new A({jwtSignature:i,jwtPayloadJson:t,uidKey:this.uidKey,epkBlinder:this.ephemeralKeyPair.blinder,pepper:this.pepper}),{expiryDateSecs:o}=this.ephemeralKeyPair,c=this.ephemeralKeyPair.getPublicKey(),n=this.ephemeralKeyPair.sign(e);return new m({jwtHeader:r,openIdSignatureOrZkProof:new y(a),expiryDateSecs:o,ephemeralPublicKey:c,ephemeralSignature:n})}verifySignature(e){return!0}static fromBytes(e){return s.deserialize(new S(e))}static fromJWTAndProof(e){let{proof:r,jwt:t,ephemeralKeyPair:i,pepper:a,proofFetchCallback:o}=e,c=e.uidKey??"sub",n=O(t),p=n.iss;if(typeof n.aud!="string")throw new Error("aud was not found or an array of values");let h=n.aud,d=n[c];return new s({proofOrFetcher:r,ephemeralKeyPair:i,iss:p,uidKey:c,uidVal:d,aud:h,pepper:a,jwt:t,proofFetchCallback:o})}static fromDerivationPath(e,r){return K(e,s.SLIP_0010_SEED,r)}};s.PEPPER_LENGTH=31,s.SLIP_0010_SEED="32 bytes";var H=s;export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-P5VCS2F5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/account/KeylessAccount.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { JwtPayload, jwtDecode } from \"jwt-decode\";\nimport { decode } from \"base-64\";\nimport EventEmitter from \"eventemitter3\";\nimport { HexInput, SigningScheme } from \"../types\";\nimport { AccountAddress } from \"../core/accountAddress\";\nimport {\n AnyPublicKey,\n AnySignature,\n KeylessPublicKey,\n KeylessSignature,\n OpenIdSignature,\n OpenIdSignatureOrZkProof,\n Signature,\n SignedGroth16Signature,\n computeAddressSeed,\n fromDerivationPath as fromDerivationPathInner,\n} from \"../core/crypto\";\n\nimport { Account } from \"./Account\";\nimport { EphemeralKeyPair } from \"./EphemeralKeyPair\";\nimport { Hex } from \"../core/hex\";\nimport { AccountAuthenticatorSingleKey } from \"../transactions/authenticator/account\";\nimport { Deserializer, Serializer } from \"../bcs\";\nimport { deriveTransactionType, generateSigningMessage } from \"../transactions/transactionBuilder/signingMessage\";\nimport { AnyRawTransaction } from \"../transactions/types\";\n\nfunction base64UrlDecode(base64Url: string): string {\n // Replace base64url-specific characters\n const base64 = base64Url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n\n // Pad the string with '=' characters if needed\n const paddedBase64 = base64 + \"==\".substring(0, (3 - (base64.length % 3)) % 3);\n\n // Decode the base64 string using the base-64 library\n const decodedString = decode(paddedBase64);\n\n return decodedString;\n}\n\nexport type ProofFetchSuccess = {\n status: \"Success\";\n};\n\nexport type ProofFetchFailure = {\n status: \"Failed\";\n error: string;\n};\n\nexport type ProofFetchStatus = ProofFetchSuccess | ProofFetchFailure\n\nexport type ProofFetchCallback = (status: ProofFetchStatus) => Promise<void>;\n\nexport interface ProofFetchEvents {\n proofFetchFinish: (status: ProofFetchStatus) => void;\n}\n\nexport class KeylessAccount implements Account {\n static readonly PEPPER_LENGTH: number = 31;\n\n static readonly SLIP_0010_SEED: string = \"32 bytes\";\n\n publicKey: KeylessPublicKey;\n\n ephemeralKeyPair: EphemeralKeyPair;\n\n uidKey: string;\n\n uidVal: string;\n\n aud: string;\n\n pepper: Uint8Array;\n\n accountAddress: AccountAddress;\n\n proof: SignedGroth16Signature | undefined;\n\n proofOrPromise: SignedGroth16Signature | Promise<SignedGroth16Signature>;\n\n signingScheme: SigningScheme;\n\n jwt: string;\n\n emitter: EventEmitter<ProofFetchEvents>;\n\n constructor(args: {\n address?: AccountAddress;\n ephemeralKeyPair: EphemeralKeyPair;\n iss: string;\n uidKey: string;\n uidVal: string;\n aud: string;\n pepper: HexInput;\n proofOrFetcher: SignedGroth16Signature | Promise<SignedGroth16Signature>;\n proofFetchCallback?: ProofFetchCallback\n jwt: string;\n }) {\n const { address, ephemeralKeyPair, iss, uidKey, uidVal, aud, pepper, proofOrFetcher, proofFetchCallback, jwt } = args;\n this.ephemeralKeyPair = ephemeralKeyPair;\n const addressSeed = computeAddressSeed(args);\n this.publicKey = new KeylessPublicKey(iss, addressSeed);\n this.accountAddress = address ? AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();\n this.uidKey = uidKey;\n this.uidVal = uidVal;\n this.aud = aud;\n this.jwt = jwt;\n this.emitter = new EventEmitter<ProofFetchEvents>();\n this.proofOrPromise = proofOrFetcher;\n if (proofOrFetcher instanceof SignedGroth16Signature) {\n this.proof = proofOrFetcher;\n } else {\n if (proofFetchCallback === undefined) {\n throw new Error(\"Must provide callback\")\n }\n this.emitter.on(\"proofFetchFinish\", async (status) => {\n await proofFetchCallback(status);\n this.emitter.removeAllListeners();\n });\n this.init(proofOrFetcher);\n }\n \n\n this.signingScheme = SigningScheme.SingleKey;\n const pepperBytes = Hex.fromHexInput(pepper).toUint8Array();\n if (pepperBytes.length !== KeylessAccount.PEPPER_LENGTH) {\n throw new Error(`Pepper length in bytes should be ${KeylessAccount.PEPPER_LENGTH}`);\n }\n this.pepper = pepperBytes;\n }\n\n async init(promise: Promise<SignedGroth16Signature>) {\n try {\n this.proof = await promise;\n this.emitter.emit(\"proofFetchFinish\", {status: \"Success\"});\n } catch (error) {\n if (error instanceof Error) {\n this.emitter.emit(\"proofFetchFinish\", {status: \"Failed\", error: error.toString()});\n } else {\n this.emitter.emit(\"proofFetchFinish\", {status: \"Failed\", error: \"Unknown\"});\n }\n }\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeStr(this.jwt);\n serializer.serializeStr(this.uidKey);\n serializer.serializeFixedBytes(this.pepper);\n this.ephemeralKeyPair.serialize(serializer);\n if (this.proof === undefined) {\n throw new Error(\"Connot serialize - proof undefined\")\n }\n this.proof.serialize(serializer);\n }\n\n static deserialize(deserializer: Deserializer): KeylessAccount {\n const jwt = deserializer.deserializeStr();\n const uidKey = deserializer.deserializeStr();\n const pepper = deserializer.deserializeFixedBytes(31);\n const ephemeralKeyPair = EphemeralKeyPair.deserialize(deserializer);\n const proof = SignedGroth16Signature.deserialize(deserializer);\n return KeylessAccount.fromJWTAndProof({\n proof,\n pepper,\n uidKey,\n jwt,\n ephemeralKeyPair,\n });\n }\n\n isExpired(): boolean {\n return this.ephemeralKeyPair.isExpired();\n }\n\n bcsToBytes(): Uint8Array {\n const serializer = new Serializer();\n this.serialize(serializer);\n return serializer.toUint8Array();\n }\n\n bcsToHex(): Hex {\n const bcsBytes = this.bcsToBytes();\n return Hex.fromHexInput(bcsBytes);\n }\n\n signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey {\n const raw = deriveTransactionType(transaction);\n const signature = new AnySignature(this.sign(raw.bcsToBytes()));\n const publicKey = new AnyPublicKey(this.publicKey);\n return new AccountAuthenticatorSingleKey(publicKey, signature);\n }\n\n async waitForProofFetch() {\n if (this.proofOrPromise instanceof Promise) {\n await this.proofOrPromise;\n }\n }\n\n sign(data: HexInput): Signature {\n const { expiryDateSecs } = this.ephemeralKeyPair;\n const currentTimeInSeconds = Math.floor(new Date().getTime() / 1000);\n if (expiryDateSecs < currentTimeInSeconds) {\n throw new Error(\"Ephemeral key pair is expired.\");\n }\n if (this.proof === undefined) {\n throw new Error(\"Proof not found\");\n }\n const jwtHeader = this.jwt.split(\".\")[0];\n const ephemeralPublicKey = this.ephemeralKeyPair.getPublicKey();\n\n const serializer = new Serializer();\n serializer.serializeFixedBytes(Hex.fromHexInput(data).toUint8Array());\n serializer.serializeOption(this.proof.proof);\n const signMess = generateSigningMessage(serializer.toUint8Array(), \"APTOS::TransactionAndProof\");\n\n const ephemeralSignature = this.ephemeralKeyPair.sign(signMess);\n\n return new KeylessSignature({\n jwtHeader: base64UrlDecode(jwtHeader),\n openIdSignatureOrZkProof: new OpenIdSignatureOrZkProof(this.proof),\n expiryDateSecs,\n ephemeralPublicKey,\n ephemeralSignature,\n });\n }\n\n signTransaction(transaction: AnyRawTransaction): Signature {\n const raw = deriveTransactionType(transaction);\n return this.sign(raw.bcsToBytes());\n }\n\n signWithOpenIdSignature(data: HexInput): Signature {\n const [jwtHeader, jwtPayload, jwtSignature] = this.jwt.split(\".\");\n const openIdSig = new OpenIdSignature({\n jwtSignature,\n jwtPayloadJson: jwtPayload,\n uidKey: this.uidKey,\n epkBlinder: this.ephemeralKeyPair.blinder,\n pepper: this.pepper,\n });\n\n const { expiryDateSecs } = this.ephemeralKeyPair;\n const ephemeralPublicKey = this.ephemeralKeyPair.getPublicKey();\n const ephemeralSignature = this.ephemeralKeyPair.sign(data);\n return new KeylessSignature({\n jwtHeader,\n openIdSignatureOrZkProof: new OpenIdSignatureOrZkProof(openIdSig),\n expiryDateSecs,\n ephemeralPublicKey,\n ephemeralSignature,\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this\n verifySignature(args: { message: HexInput; signature: Signature }): boolean {\n return true;\n }\n\n static fromBytes(bytes: Uint8Array): KeylessAccount {\n return KeylessAccount.deserialize(new Deserializer(bytes));\n }\n\n static fromJWTAndProof(args: {\n proof: SignedGroth16Signature | Promise<SignedGroth16Signature>;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n pepper: HexInput;\n uidKey?: string;\n proofFetchCallback?: ProofFetchCallback;\n }): KeylessAccount {\n const { proof, jwt, ephemeralKeyPair, pepper, proofFetchCallback } = args;\n const uidKey = args.uidKey ?? \"sub\";\n\n const jwtPayload = jwtDecode<JwtPayload & { [key: string]: string }>(jwt);\n const iss = jwtPayload.iss!;\n if (typeof jwtPayload.aud !== \"string\") {\n throw new Error(\"aud was not found or an array of values\");\n }\n const aud = jwtPayload.aud!;\n const uidVal = jwtPayload[uidKey];\n return new KeylessAccount({\n proofOrFetcher: proof,\n ephemeralKeyPair,\n iss,\n uidKey,\n uidVal,\n aud,\n pepper,\n jwt,\n proofFetchCallback,\n });\n }\n\n static fromDerivationPath(path: string, seed: Uint8Array): Uint8Array {\n return fromDerivationPathInner(path, KeylessAccount.SLIP_0010_SEED, seed);\n }\n}\n"],"mappings":"2cAGA,OAAqB,aAAAA,MAAiB,aACtC,OAAS,UAAAC,MAAc,UACvB,OAAOC,MAAkB,gBAwBzB,SAASC,EAAgBC,EAA2B,CAElD,IAAMC,EAASD,EAAU,QAAQ,KAAM,GAAG,EAAE,QAAQ,KAAM,GAAG,EAGvDE,EAAeD,EAAS,KAAK,UAAU,GAAI,EAAKA,EAAO,OAAS,GAAM,CAAC,EAK7E,OAFsBE,EAAOD,CAAY,CAG3C,CAmBO,IAAME,EAAN,MAAMA,CAAkC,CA6B7C,YAAYC,EAWT,CACD,GAAM,CAAE,QAAAC,EAAS,iBAAAC,EAAkB,IAAAC,EAAK,OAAAC,EAAQ,OAAAC,EAAQ,IAAAC,EAAK,OAAAC,EAAQ,eAAAC,EAAgB,mBAAAC,EAAoB,IAAAC,CAAI,EAAIV,EACjH,KAAK,iBAAmBE,EACxB,IAAMS,EAAcC,EAAmBZ,CAAI,EAS3C,GARA,KAAK,UAAY,IAAIa,EAAiBV,EAAKQ,CAAW,EACtD,KAAK,eAAiBV,EAAUa,EAAe,KAAKb,CAAO,EAAI,KAAK,UAAU,QAAQ,EAAE,eAAe,EACvG,KAAK,OAASG,EACd,KAAK,OAASC,EACd,KAAK,IAAMC,EACX,KAAK,IAAMI,EACX,KAAK,QAAU,IAAIK,EACnB,KAAK,eAAiBP,EAClBA,aAA0BQ,EAC5B,KAAK,MAAQR,MACR,CACL,GAAIC,IAAuB,OACzB,MAAM,IAAI,MAAM,uBAAuB,EAEzC,KAAK,QAAQ,GAAG,mBAAoB,MAAOQ,GAAW,CACpD,MAAMR,EAAmBQ,CAAM,EAC/B,KAAK,QAAQ,mBAAmB,CAClC,CAAC,EACD,KAAK,KAAKT,CAAc,CAC1B,CAGA,KAAK,cAAgB,EACrB,IAAMU,EAAcC,EAAI,aAAaZ,CAAM,EAAE,aAAa,EAC1D,GAAIW,EAAY,SAAWnB,EAAe,cACxC,MAAM,IAAI,MAAM,oCAAoCA,EAAe,aAAa,EAAE,EAEpF,KAAK,OAASmB,CAChB,CAEA,MAAM,KAAKE,EAA0C,CACnD,GAAI,CACF,KAAK,MAAQ,MAAMA,EACnB,KAAK,QAAQ,KAAK,mBAAoB,CAAC,OAAQ,SAAS,CAAC,CAC3D,OAASC,EAAO,CACVA,aAAiB,MACnB,KAAK,QAAQ,KAAK,mBAAoB,CAAC,OAAQ,SAAU,MAAOA,EAAM,SAAS,CAAC,CAAC,EAEjF,KAAK,QAAQ,KAAK,mBAAoB,CAAC,OAAQ,SAAU,MAAO,SAAS,CAAC,CAE9E,CACF,CAEA,UAAUC,EAA8B,CAKtC,GAJAA,EAAW,aAAa,KAAK,GAAG,EAChCA,EAAW,aAAa,KAAK,MAAM,EACnCA,EAAW,oBAAoB,KAAK,MAAM,EAC1C,KAAK,iBAAiB,UAAUA,CAAU,EACtC,KAAK,QAAU,OACjB,MAAM,IAAI,MAAM,oCAAoC,EAEtD,KAAK,MAAM,UAAUA,CAAU,CACjC,CAEA,OAAO,YAAYC,EAA4C,CAC7D,IAAMb,EAAMa,EAAa,eAAe,EAClCnB,EAASmB,EAAa,eAAe,EACrChB,EAASgB,EAAa,sBAAsB,EAAE,EAC9CrB,EAAmBsB,EAAiB,YAAYD,CAAY,EAC5DE,EAAQT,EAAuB,YAAYO,CAAY,EAC7D,OAAOxB,EAAe,gBAAgB,CACpC,MAAA0B,EACA,OAAAlB,EACA,OAAAH,EACA,IAAAM,EACA,iBAAAR,CACF,CAAC,CACH,CAEA,WAAqB,CACnB,OAAO,KAAK,iBAAiB,UAAU,CACzC,CAEA,YAAyB,CACvB,IAAMoB,EAAa,IAAII,EACvB,YAAK,UAAUJ,CAAU,EAClBA,EAAW,aAAa,CACjC,CAEA,UAAgB,CACd,IAAMK,EAAW,KAAK,WAAW,EACjC,OAAOR,EAAI,aAAaQ,CAAQ,CAClC,CAEA,sBAAsBC,EAA+D,CACnF,IAAMC,EAAMC,EAAsBF,CAAW,EACvCG,EAAY,IAAIC,EAAa,KAAK,KAAKH,EAAI,WAAW,CAAC,CAAC,EACxDI,EAAY,IAAIC,EAAa,KAAK,SAAS,EACjD,OAAO,IAAIC,EAA8BF,EAAWF,CAAS,CAC/D,CAEA,MAAM,mBAAoB,CACpB,KAAK,0BAA0B,SACjC,MAAM,KAAK,cAEf,CAEA,KAAKK,EAA2B,CAC9B,GAAM,CAAE,eAAAC,CAAe,EAAI,KAAK,iBAC1BC,EAAuB,KAAK,MAAM,IAAI,KAAK,EAAE,QAAQ,EAAI,GAAI,EACnE,GAAID,EAAiBC,EACnB,MAAM,IAAI,MAAM,gCAAgC,EAElD,GAAI,KAAK,QAAU,OACjB,MAAM,IAAI,MAAM,iBAAiB,EAEnC,IAAMC,EAAY,KAAK,IAAI,MAAM,GAAG,EAAE,CAAC,EACjCC,EAAqB,KAAK,iBAAiB,aAAa,EAExDlB,EAAa,IAAII,EACvBJ,EAAW,oBAAoBH,EAAI,aAAaiB,CAAI,EAAE,aAAa,CAAC,EACpEd,EAAW,gBAAgB,KAAK,MAAM,KAAK,EAC3C,IAAMmB,EAAWC,EAAuBpB,EAAW,aAAa,EAAG,4BAA4B,EAEzFqB,EAAqB,KAAK,iBAAiB,KAAKF,CAAQ,EAE9D,OAAO,IAAIG,EAAiB,CAC1B,UAAWlD,EAAgB6C,CAAS,EACpC,yBAA0B,IAAIM,EAAyB,KAAK,KAAK,EACjE,eAAAR,EACA,mBAAAG,EACA,mBAAAG,CACF,CAAC,CACH,CAEA,gBAAgBf,EAA2C,CACzD,IAAMC,EAAMC,EAAsBF,CAAW,EAC7C,OAAO,KAAK,KAAKC,EAAI,WAAW,CAAC,CACnC,CAEA,wBAAwBO,EAA2B,CACjD,GAAM,CAACG,EAAWO,EAAYC,CAAY,EAAI,KAAK,IAAI,MAAM,GAAG,EAC1DC,EAAY,IAAIC,EAAgB,CACpC,aAAAF,EACA,eAAgBD,EAChB,OAAQ,KAAK,OACb,WAAY,KAAK,iBAAiB,QAClC,OAAQ,KAAK,MACf,CAAC,EAEK,CAAE,eAAAT,CAAe,EAAI,KAAK,iBAC1BG,EAAqB,KAAK,iBAAiB,aAAa,EACxDG,EAAqB,KAAK,iBAAiB,KAAKP,CAAI,EAC1D,OAAO,IAAIQ,EAAiB,CAC1B,UAAAL,EACA,yBAA0B,IAAIM,EAAyBG,CAAS,EAChE,eAAAX,EACA,mBAAAG,EACA,mBAAAG,CACF,CAAC,CACH,CAGA,gBAAgB3C,EAA4D,CAC1E,MAAO,EACT,CAEA,OAAO,UAAUkD,EAAmC,CAClD,OAAOnD,EAAe,YAAY,IAAIoD,EAAaD,CAAK,CAAC,CAC3D,CAEA,OAAO,gBAAgBlD,EAOJ,CACjB,GAAM,CAAE,MAAAyB,EAAO,IAAAf,EAAK,iBAAAR,EAAkB,OAAAK,EAAQ,mBAAAE,CAAmB,EAAIT,EAC/DI,EAASJ,EAAK,QAAU,MAExB8C,EAAaM,EAAkD1C,CAAG,EAClEP,EAAM2C,EAAW,IACvB,GAAI,OAAOA,EAAW,KAAQ,SAC5B,MAAM,IAAI,MAAM,yCAAyC,EAE3D,IAAMxC,EAAMwC,EAAW,IACjBzC,EAASyC,EAAW1C,CAAM,EAChC,OAAO,IAAIL,EAAe,CACxB,eAAgB0B,EAChB,iBAAAvB,EACA,IAAAC,EACA,OAAAC,EACA,OAAAC,EACA,IAAAC,EACA,OAAAC,EACA,IAAAG,EACA,mBAAAD,CACF,CAAC,CACH,CAEA,OAAO,mBAAmB4C,EAAcC,EAA8B,CACpE,OAAOC,EAAwBF,EAAMtD,EAAe,eAAgBuD,CAAI,CAC1E,CACF,EA/OavD,EACK,cAAwB,GAD7BA,EAGK,eAAyB,WAHpC,IAAMyD,EAANzD","names":["jwtDecode","decode","EventEmitter","base64UrlDecode","base64Url","base64","paddedBase64","decode","_KeylessAccount","args","address","ephemeralKeyPair","iss","uidKey","uidVal","aud","pepper","proofOrFetcher","proofFetchCallback","jwt","addressSeed","computeAddressSeed","KeylessPublicKey","AccountAddress","EventEmitter","SignedGroth16Signature","status","pepperBytes","Hex","promise","error","serializer","deserializer","EphemeralKeyPair","proof","Serializer","bcsBytes","transaction","raw","deriveTransactionType","signature","AnySignature","publicKey","AnyPublicKey","AccountAuthenticatorSingleKey","data","expiryDateSecs","currentTimeInSeconds","jwtHeader","ephemeralPublicKey","signMess","generateSigningMessage","ephemeralSignature","KeylessSignature","OpenIdSignatureOrZkProof","jwtPayload","jwtSignature","openIdSig","OpenIdSignature","bytes","Deserializer","jwtDecode","path","seed","fromDerivationPath","KeylessAccount"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-COW5IGYC.mjs";import{a as v}from"./chunk-STYDBDYL.mjs";import{a as u}from"./chunk-TJDC5PWD.mjs";import{f as h,l as f}from"./chunk-S5HG2QUD.mjs";import{a as g}from"./chunk-TVRJ3M7B.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 U}from"@scure/bip32";var n=class n extends d{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==n.LENGTH)throw new Error(`PublicKey length should be ${n.LENGTH}`);this.key=r}verifySignature(e){let{message:r,signature:i}=e;if(!(i instanceof y))return!1;let l=u(r),c=s.fromHexInput(l).toUint8Array(),x=A(c),S=i.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 r=e.deserializeBytes();return new n(r)}static isPublicKey(e){return e instanceof n}};n.LENGTH=65;var m=n,t=class t extends g{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==t.LENGTH)throw new Error(`PrivateKey length should be ${t.LENGTH}`);this.key=r}static generate(){let e=o.utils.randomPrivateKey();return new t(e)}static fromDerivationPath(e,r){if(!h(e))throw new Error(`Invalid derivation path ${e}`);return t.fromDerivationPathInner(e,f(r))}static fromDerivationPathInner(e,r){let{privateKey:i}=U.fromMasterSeed(r).derive(e);if(i===null)throw new Error("Invalid key");return new t(i)}sign(e){let r=u(e),i=s.fromHexInput(r),l=A(i.toUint8Array()),c=o.sign(l,this.key.toUint8Array(),{lowS:!0});return new y(c.toCompactRawBytes())}publicKey(){let e=o.getPublicKey(this.key.toUint8Array(),!1);return new m(e)}toUint8Array(){return this.key.toUint8Array()}toString(){return this.key.toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new t(r)}static isPrivateKey(e){return e instanceof t}};t.LENGTH=32;var H=t,a=class a extends v{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==a.LENGTH)throw new Error(`Signature length should be ${a.LENGTH}, received ${r.toUint8Array().length}`);this.data=r}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new a(r)}};a.LENGTH=64;var y=a;export{m as a,H as b,y as c};
|
|
2
|
+
//# sourceMappingURL=chunk-PTIZKRON.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as A}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as A}from"./chunk-KFJMLLOA.mjs";import{a as T}from"./chunk-LV7OW245.mjs";import{a as y}from"./chunk-RDNPWCZ4.mjs";import{a as d}from"./chunk-IM32PZOD.mjs";import{d as g,e as a,h as m,i as p,j as f}from"./chunk-VTX77UM3.mjs";import{a as i,b as s,c as r,d as e,e as c,g as u}from"./chunk-GI52SX32.mjs";var h=class{constructor(n){this.config=n,this.build=new y(this.config),this.simulate=new A(this.config),this.submit=new T(this.config),this.batch=new d(this.config)}async getTransactions(n){return i({aptosConfig:this.config,...n})}async getTransactionByVersion(n){return r({aptosConfig:this.config,...n})}async getTransactionByHash(n){return e({aptosConfig:this.config,...n})}async isPendingTransaction(n){return c({aptosConfig:this.config,...n})}async waitForTransaction(n){return u({aptosConfig:this.config,...n})}async getGasPriceEstimation(){return s({aptosConfig:this.config})}getSigningMessage(n){return g(n)}async publishPackageTransaction(n){return p({aptosConfig:this.config,...n})}async rotateAuthKey(n){return f({aptosConfig:this.config,...n})}sign(n){return a({...n})}signAsFeePayer(n){let{signer:t,transaction:o}=n;if(!o.feePayerAddress)throw new Error(`Transaction ${o} is not a Fee Payer transaction`);return o.feePayerAddress=t.accountAddress,a({signer:t,transaction:o})}async batchTransactionsForSingleAccount(n){try{let{sender:t,data:o,options:P}=n;this.batch.forSingleAccount({sender:t,data:o,options:P})}catch(t){throw new Error(`failed to submit transactions with error: ${t}`)}}async signAndSubmitTransaction(n){let{signer:t,transaction:o}=n;return m({aptosConfig:this.config,signer:t,transaction:o})}};export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-R4UIPTBH.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t,c as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t,c as n}from"./chunk-7JNPSNL6.mjs";import{a as u}from"./chunk-COW5IGYC.mjs";import{a as l}from"./chunk-STYDBDYL.mjs";import{a as s}from"./chunk-6IFMQ5AS.mjs";import{b as o}from"./chunk-AOCNYMMX.mjs";var c=class i extends u{constructor(e){super();let r=e.constructor.name;switch(r){case t.name:this.publicKey=e,this.variant=0;break;default:throw new Error(`Unsupported key for EphemeralPublicKey - ${r}`)}}toUint8Array(){return this.bcsToBytes()}toString(){return this.bcsToHex().toString()}verifySignature(e){let{message:r,signature:a}=e;return this.publicKey.verifySignature({message:r,signature:a})}serialize(e){if(this.publicKey instanceof t)e.serializeU32AsUleb128(0),this.publicKey.serialize(e);else throw new Error("Unknown public key type")}static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return new i(t.deserialize(e));default:throw new Error(`Unknown variant index for EphemeralPublicKey: ${r}`)}}static isPublicKey(e){return e instanceof i}isEd25519(){return this.publicKey instanceof t}},p=class i extends l{constructor(e){super();let r=e.constructor.name;switch(r){case n.name:this.signature=e;break;default:throw new Error(`Unsupported signature for EphemeralSignature - ${r}`)}}toUint8Array(){return this.signature.toUint8Array()}toString(){return this.signature.toString()}static fromHex(e){let r=o.fromHexInput(e),a=new s(r.toUint8Array());return i.deserialize(a)}serialize(e){if(this.signature instanceof n)e.serializeU32AsUleb128(0),this.signature.serialize(e);else throw new Error("Unknown signature type")}static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return new i(n.deserialize(e));default:throw new Error(`Unknown variant index for EphemeralSignature: ${r}`)}}};export{c as a,p as b};
|
|
2
|
+
//# sourceMappingURL=chunk-R7BAM2G6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-VTX77UM3.mjs";var o=class{constructor(n){this.config=n}async simple(n){return t({aptosConfig:this.config,...n})}async multiAgent(n){return t({aptosConfig:this.config,...n})}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RDNPWCZ4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as p}from"./chunk-EKOIHFAW.mjs";async function r(e){let{aptosConfig:t,overrides:s,params:n,contentType:o,acceptType:i,path:a,originMethod:R,type:d}=e,u=t.getRequestUrl(d);return p({url:u,method:"GET",originMethod:R,path:a,contentType:o,acceptType:i,params:n,overrides:{...t.clientConfig,...s}},t,e.type)}async function m(e){let{aptosConfig:t}=e;return r({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function y(e){return r({...e,type:"Pepper"})}async function A(e){let t=[],s,n=e.params;do{let o=await r({type:"Fullnode",aptosConfig:e.aptosConfig,originMethod:e.originMethod,path:e.path,params:n,overrides:e.overrides});s=o.headers["x-aptos-cursor"],delete o.headers,t.push(...o.data),n.start=s}while(s!=null);return t}export{r as a,m as b,y as c,A as d};
|
|
2
|
+
//# sourceMappingURL=chunk-SA7MZPM3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{f as n}from"./chunk-YGB7MEH3.mjs";import{p as g,u as d}from"./chunk-S4SEFF4K.mjs";import{b as s}from"./chunk-T23OVRNF.mjs";async function m(e){let{aptosConfig:t,poolAddress:o}=e,r=s.from(o).toStringLong(),i=await n({aptosConfig:t,query:{query:d,variables:{where_condition:{pool_address:{_eq:r}}}}});return i.num_active_delegator_per_pool[0]?i.num_active_delegator_per_pool[0].num_active_delegator:0}async function f(e){let{aptosConfig:t,options:o}=e,r={query:d,variables:{order_by:o?.orderBy}};return(await n({aptosConfig:t,query:r})).num_active_delegator_per_pool}async function A(e){let{aptosConfig:t,delegatorAddress:o,poolAddress:r}=e,a={query:g,variables:{delegatorAddress:s.from(o).toStringLong(),poolAddress:s.from(r).toStringLong()}};return(await n({aptosConfig:t,query:a})).delegated_staking_activities}export{m as a,f as b,A as c};
|
|
2
|
+
//# sourceMappingURL=chunk-T7JIGO3O.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s,b as t,c as r,d as i,e as c,f as u,g as d,h as A,i as g,j as m,k as a,l as p,m as f,n as y,o as C,p as O,q as T}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-33WBJV5U.mjs";import{a as s,b as t,c as r,d as i,e as c,f as u,g as d,h as A,i as g,j as m,k as a,l as p,m as f,n as y,o as C,p as O,q as T}from"./chunk-TV64AINP.mjs";import{e as o}from"./chunk-YE5B2S5L.mjs";var l=class{constructor(e){this.config=e}async getAccountInfo(e){return s({aptosConfig:this.config,...e})}async getAccountModules(e){return t({aptosConfig:this.config,...e})}async getAccountModule(e){return r({aptosConfig:this.config,...e})}async getAccountTransactions(e){return i({aptosConfig:this.config,...e})}async getAccountResources(e){return c({aptosConfig:this.config,...e})}async getAccountResource(e){return u({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return d({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),A({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),g({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),m({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),p({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),y({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),C({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:o,...e})}async getAccountCoinAmount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),f({aptosConfig:this.config,...e})}async getAccountOwnedObjects(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),O({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return T({aptosConfig:this.config,...e})}};export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-TFJCMFKE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as P}from"./chunk-AH44UPM4.mjs";import{d as v,f as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as P}from"./chunk-AH44UPM4.mjs";import{d as v,f as d}from"./chunk-YGB7MEH3.mjs";import{d as C,e as w,f as h,g as k,h as T,j as b,k as O,l as q}from"./chunk-S4SEFF4K.mjs";import{b as p,d as f}from"./chunk-SA7MZPM3.mjs";import{a as _}from"./chunk-6FBKUTGF.mjs";import{a as A}from"./chunk-37CYBCWS.mjs";import{a as m}from"./chunk-6M6XXPQQ.mjs";import{b as y}from"./chunk-PTIZKRON.mjs";import{b as l}from"./chunk-7JNPSNL6.mjs";import{a as g}from"./chunk-7STYQ5ZE.mjs";import{b as c}from"./chunk-T23OVRNF.mjs";async function S(t){let{aptosConfig:n,accountAddress:e}=t,{data:o}=await p({aptosConfig:n,originMethod:"getInfo",path:`accounts/${c.from(e).toString()}`});return o}async function z(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return f({aptosConfig:n,originMethod:"getModules",path:`accounts/${c.from(e).toString()}/modules`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??1e3}})}async function H(t){return t.options?.ledgerVersion!==void 0?G(t):P(async()=>G(t),`module-${t.accountAddress}-${t.moduleName}`,1e3*60*5)()}async function G(t){let{aptosConfig:n,accountAddress:e,moduleName:o,options:s}=t,{data:r}=await p({aptosConfig:n,originMethod:"getModule",path:`accounts/${c.from(e).toString()}/module/${o}`,params:{ledger_version:s?.ledgerVersion}});return r}async function J(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return f({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${c.from(e).toString()}/transactions`,params:{start:o?.offset,limit:o?.limit}})}async function U(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return f({aptosConfig:n,originMethod:"getResources",path:`accounts/${c.from(e).toString()}/resources`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??999}})}async function K(t){let{aptosConfig:n,accountAddress:e,resourceType:o,options:s}=t,{data:r}=await p({aptosConfig:n,originMethod:"getResource",path:`accounts/${c.from(e).toString()}/resource/${o}`,params:{ledger_version:s?.ledgerVersion}});return r.data}async function Q(t){let{aptosConfig:n,authenticationKey:e,options:o}=t,s=await K({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:o}),{address_map:{handle:r}}=s,a=c.from(e);try{let i=await v({aptosConfig:n,handle:r,data:{key:a.toString(),key_type:"address",value_type:"address"},options:o});return c.from(i)}catch(i){if(i instanceof _&&i.data.error_code==="table_item_not_found")return a;throw i}}async function X(t){let{aptosConfig:n,accountAddress:e}=t,s={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}},a=await d({aptosConfig:n,query:{query:O,variables:{where_condition:s}},originMethod:"getAccountTokensCount"});return a.current_token_ownerships_v2_aggregate.aggregate?a.current_token_ownerships_v2_aggregate.aggregate.count:0}async function Y(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(r.token_standard={_eq:o?.tokenStandard});let a={query:T,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedTokens"})).current_token_ownerships_v2}async function Z(t){let{aptosConfig:n,accountAddress:e,collectionAddress:o,options:s}=t,r=c.from(e).toStringLong(),a=c.from(o).toStringLong(),i={owner_address:{_eq:r},current_token_data:{collection_id:{_eq:a}},amount:{_gt:0}};s?.tokenStandard&&(i.token_standard={_eq:s?.tokenStandard});let u={query:b,variables:{where_condition:i,offset:s?.offset,limit:s?.limit,order_by:s?.orderBy}};return(await d({aptosConfig:n,query:u,originMethod:"getAccountOwnedTokensFromCollectionAddress"})).current_token_ownerships_v2}async function oo(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(r.current_collection={token_standard:{_eq:o?.tokenStandard}});let a={query:h,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCollectionsWithOwnedTokens"})).current_collection_ownership_v2_view}async function to(t){let{aptosConfig:n,accountAddress:e}=t,o=c.from(e).toStringLong(),r=await d({aptosConfig:n,query:{query:q,variables:{address:o}},originMethod:"getAccountTransactionsCount"});return r.account_transactions_aggregate.aggregate?r.account_transactions_aggregate.aggregate.count:0}async function eo(t){let{aptosConfig:n,accountAddress:e,coinType:o}=t,s=c.from(e).toStringLong(),r=await I({aptosConfig:n,accountAddress:s,options:{where:{asset_type:{_eq:o}}}});return r[0]?r[0].amount:0}async function I(t){let{aptosConfig:n,accountAddress:e,options:o}=t,s=c.from(e).toStringLong(),r={...o?.where,owner_address:{_eq:s}},a={query:w,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCoinsData"})).current_fungible_asset_balances}async function no(t){let{aptosConfig:n,accountAddress:e}=t,o=c.from(e).toStringLong(),r=await d({aptosConfig:n,query:{query:C,variables:{address:o}},originMethod:"getAccountCoinsCount"});if(!r.current_fungible_asset_balances_aggregate.aggregate)throw Error("Failed to get the count of account coins");return r.current_fungible_asset_balances_aggregate.aggregate.count}async function ro(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()}},a={query:k,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedObjects"})).current_objects}async function so(t){let{aptosConfig:n,privateKey:e}=t,o=new m(e.publicKey());if(e instanceof y){let r=g.fromPublicKey({publicKey:o}).derivedAddress();return A.fromPrivateKey({privateKey:e,address:r})}if(e instanceof l){let s=g.fromPublicKey({publicKey:o});if(await M({authKey:s,aptosConfig:n})){let u=s.derivedAddress();return A.fromPrivateKey({privateKey:e,address:u,legacy:!1})}let a=g.fromPublicKey({publicKey:o.publicKey});if(await M({authKey:a,aptosConfig:n})){let u=a.derivedAddress();return A.fromPrivateKey({privateKey:e,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${e}`)}async function M(t){let{aptosConfig:n,authKey:e}=t,o=await Q({aptosConfig:n,authenticationKey:e.derivedAddress()});try{return await S({aptosConfig:n,accountAddress:o}),!0}catch(s){if(s.status===404)return!1;throw new Error(`Error while looking for an account info ${o.toString()}`)}}export{S as a,z as b,H as c,J as d,U as e,K as f,Q as g,X as h,Y as i,Z as j,oo as k,to as l,eo as m,I as n,no as o,ro as p,so as q,M as r};
|
|
2
|
+
//# sourceMappingURL=chunk-TV64AINP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as r,c as t,d as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o,b as r,c as t,d as s}from"./chunk-YI7FZPIK.mjs";import{a as n}from"./chunk-33WBJV5U.mjs";var i=class{constructor(e){this.config=e}async getModuleEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),o({aptosConfig:this.config,...e})}async getAccountEventsByCreationNumber(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),r({aptosConfig:this.config,...e})}async getAccountEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),t({aptosConfig:this.config,...e})}async getEvents(e){return await n({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"events_processor"}),s({aptosConfig:this.config,...e})}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UKJUHLZW.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-6J3CB3DN.mjs";import{a as C}from"./chunk-TV64AINP.mjs";import{b as f}from"./chunk-CHQ6IKE3.mjs";import{a as w}from"./chunk-YH6UKGIX.mjs";import{a as I}from"./chunk-P5VCS2F5.mjs";import{a as P}from"./chunk-37CYBCWS.mjs";import{d as l}from"./chunk-2YDIOWRJ.mjs";import{a as T}from"./chunk-NC5HHEEM.mjs";import{c as A,m as s}from"./chunk-3VGX3TXH.mjs";import{b as p}from"./chunk-T23OVRNF.mjs";import{a as r}from"./chunk-EB7AI4B4.mjs";import{b as y}from"./chunk-6RBUXB5I.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.signWithAuthenticator(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 f({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 f({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 A,s.u8(),new A,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-VTX77UM3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as z,b as A}from"./chunk-KGJITNRZ.mjs";import{a as g,b as h}from"./chunk-6M6XXPQQ.mjs";import{a as b,b as p}from"./chunk-XHPLLMR5.mjs";import{a as d,c as y}from"./chunk-7JNPSNL6.mjs";import{a as o}from"./chunk-TVRJ3M7B.mjs";var u=class extends o{static deserialize(t){let i=t.deserializeUleb128AsU32();switch(i){case 0:return l.load(t);case 1:return n.load(t);case 2:return a.load(t);case 3:return c.load(t);default:throw new Error(`Unknown variant index for AccountAuthenticator: ${i}`)}}isEd25519(){return this instanceof l}isMultiEd25519(){return this instanceof n}isSingleKey(){return this instanceof a}isMultiKey(){return this instanceof c}},l=class s extends u{constructor(i,e){super();this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(0),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=d.deserialize(i),r=y.deserialize(i);return new s(e,r)}},n=class s extends u{constructor(i,e){super();this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(1),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=b.deserialize(i),r=p.deserialize(i);return new s(e,r)}},a=class s extends u{constructor(i,e){super();this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(2),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=g.deserialize(i),r=h.deserialize(i);return new s(e,r)}},c=class s extends u{constructor(i,e){super();this.public_keys=i,this.signatures=e}serialize(i){i.serializeU32AsUleb128(3),this.public_keys.serialize(i),this.signatures.serialize(i)}static load(i){let e=z.deserialize(i),r=A.deserialize(i);return new s(e,r)}};export{u as a,l as b,n as c,a as d,c as e};
|
|
2
|
+
//# sourceMappingURL=chunk-WPVBC4JS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g,c as w,d as K,e as B}from"./chunk-FLYEALDB.mjs";import{a as z,b as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g,c as w,d as K,e as B}from"./chunk-FLYEALDB.mjs";import{a as z,b as S}from"./chunk-R7BAM2G6.mjs";import{b as E}from"./chunk-COW5IGYC.mjs";import{a as p}from"./chunk-STYDBDYL.mjs";import{a as b}from"./chunk-7STYQ5ZE.mjs";import{a as f,b as y}from"./chunk-TVRJ3M7B.mjs";import{b as c}from"./chunk-AOCNYMMX.mjs";var P=1e7,H=120,v=30,O=330,R=120,N=350,C=300,$=93,o=class o extends E{constructor(e,t){super();let r=c.fromHexInput(t).toUint8Array();if(r.length!==o.ADDRESS_SEED_LENGTH)throw new Error(`Address seed length in bytes should be ${o.ADDRESS_SEED_LENGTH}`);this.iss=e,this.addressSeed=r}authKey(){let e=new y;return e.serializeU32AsUleb128(3),e.serializeFixedBytes(this.bcsToBytes()),b.fromSchemeAndBytes({scheme:2,input:e.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}toString(){return c.fromHexInput(this.toUint8Array()).toString()}verifySignature(e){return!0}serialize(e){e.serializeStr(this.iss),e.serializeBytes(this.addressSeed)}static deserialize(e){let t=e.deserializeStr(),r=e.deserializeBytes();return new o(t,r)}static load(e){let t=e.deserializeStr(),r=e.deserializeBytes();return new o(t,r)}static isPublicKey(e){return e instanceof o}static create(e){return I(e),new o(e.iss,I(e))}};o.ADDRESS_SEED_LENGTH=32;var m=o;function I(n){let{uidKey:d,uidVal:e,aud:t,pepper:r}=n,i=[w(c.fromHexInput(r).toUint8Array()),g(t,H),g(e,O),g(d,v)];return K(B(i),m.ADDRESS_SEED_LENGTH)}var h=class n extends p{constructor(e){super();this.signature=e}toUint8Array(){return this.signature.toUint8Array()}toString(){return this.signature.toString()}serialize(e){if(this.signature instanceof U)e.serializeU32AsUleb128(1),this.signature.serialize(e);else if(this.signature instanceof x)e.serializeU32AsUleb128(0),this.signature.serialize(e);else throw new Error("Not a valid OIDB signature")}static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return new n(x.load(e));case 1:return new n(U.load(e));default:throw new Error(`Unknown variant index for EphemeralCertificate: ${t}`)}}},A=class n extends f{constructor(e){super();let{a:t,b:r,c:i}=e;this.a=c.fromHexInput(t).toUint8Array(),this.b=c.fromHexInput(r).toUint8Array(),this.c=c.fromHexInput(i).toUint8Array()}toUint8Array(){let e=new y;return this.serialize(e),e.toUint8Array()}serialize(e){e.serializeU32AsUleb128(0),e.serializeFixedBytes(this.a),e.serializeFixedBytes(this.b),e.serializeFixedBytes(this.c)}static deserialize(e){e.deserializeUleb128AsU32();let t=e.deserializeFixedBytes(32),r=e.deserializeFixedBytes(64),i=e.deserializeFixedBytes(32);return new n({a:t,b:r,c:i})}},x=class n extends p{constructor(e){super();let{proof:t,expHorizonSecs:r=BigInt(P),trainingWheelsSignature:i,extraField:s,overrideAudVal:a}=e;this.proof=t,this.expHorizonSecs=r,this.trainingWheelsSignature=i,this.extraField=s,this.overrideAudVal=a}toUint8Array(){let e=new y;return this.serialize(e),e.toUint8Array()}toString(){return this.toString()}serialize(e){this.proof.serialize(e),e.serializeU64(this.expHorizonSecs),e.serializeOptionStr(this.extraField),e.serializeOptionStr(this.overrideAudVal),e.serializeOption(this.trainingWheelsSignature)}static deserialize(e){let t=A.deserialize(e),r=e.deserializeU64(),s=e.deserializeUleb128AsU32()?e.deserializeStr():void 0,l=e.deserializeUleb128AsU32()?e.deserializeStr():void 0,[u]=e.deserializeVector(S);return new n({proof:t,expHorizonSecs:r,trainingWheelsSignature:u,extraField:s,overrideAudVal:l})}static load(e){let t=A.deserialize(e),r=e.deserializeU64(),s=e.deserializeUleb128AsU32()?e.deserializeStr():void 0,l=e.deserializeUleb128AsU32()?e.deserializeStr():void 0,[u]=e.deserializeVector(S);return new n({proof:t,expHorizonSecs:r,trainingWheelsSignature:u,extraField:s,overrideAudVal:l})}},U=class n extends p{constructor(e){super();let{jwtSignature:t,uidKey:r,jwtPayloadJson:i,epkBlinder:s,pepper:a,overrideAudValue:l}=e;this.jwtSignature=t,this.jwtPayloadJson=i,this.uidKey=r??"sub",this.epkBlinder=s,this.pepper=a,this.overrideAudValue=l}toUint8Array(){return this.epkBlinder}toString(){return this.toString()}serialize(e){e.serializeStr(this.jwtSignature),e.serializeStr(this.jwtPayloadJson),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.epkBlinder),e.serializeFixedBytes(this.pepper),e.serializeOptionStr(this.overrideAudValue)}static deserialize(e){let t=e.deserializeStr(),r=e.deserializeStr(),i=e.deserializeStr(),s=e.deserializeFixedBytes(31),a=e.deserializeFixedBytes(31),u=e.deserializeUleb128AsU32()?e.deserializeStr():void 0;return new n({jwtSignature:t,jwtPayloadJson:r,uidKey:i,epkBlinder:s,pepper:a,overrideAudValue:u})}static load(e){let t=e.deserializeStr(),r=e.deserializeStr(),i=e.deserializeStr(),s=e.deserializeFixedBytes(31),a=e.deserializeFixedBytes(31),u=e.deserializeUleb128AsU32()?e.deserializeStr():void 0;return new n({jwtSignature:t,jwtPayloadJson:r,uidKey:i,epkBlinder:s,pepper:a,overrideAudValue:u})}static isSignature(e){return e instanceof n}},D=class n extends p{constructor(e){super();let{jwtHeader:t,openIdSignatureOrZkProof:r,expiryDateSecs:i,ephemeralPublicKey:s,ephemeralSignature:a}=e;this.jwtHeader=t,this.openIdSignatureOrZkProof=r,this.expiryDateSecs=i,this.ephemeralPublicKey=s,this.ephemeralSignature=a}toUint8Array(){return this.ephemeralSignature.toUint8Array()}toString(){return this.toString()}serialize(e){this.openIdSignatureOrZkProof.serialize(e),e.serializeStr(this.jwtHeader),e.serializeU64(this.expiryDateSecs),this.ephemeralPublicKey.serialize(e),this.ephemeralSignature.serialize(e)}static deserialize(e){let t=h.deserialize(e),r=e.deserializeStr(),i=e.deserializeU64(),s=z.deserialize(e),a=S.deserialize(e);return new n({jwtHeader:r,expiryDateSecs:i,openIdSignatureOrZkProof:t,ephemeralPublicKey:s,ephemeralSignature:a})}static load(e){let t=e.deserializeStr(),r=e.deserializeU64(),i=h.deserialize(e),s=z.deserialize(e),a=S.deserialize(e);return new n({jwtHeader:t,expiryDateSecs:r,openIdSignatureOrZkProof:i,ephemeralPublicKey:s,ephemeralSignature:a})}static isSignature(e){return e instanceof n}};export{P as a,H as b,v as c,O as d,R as e,N as f,C as g,$ as h,m as i,I as j,h as k,A as l,x as m,U as n,D as o};
|
|
2
|
+
//# sourceMappingURL=chunk-WTVN3XGK.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.13.3-zeta.
|
|
1
|
+
{"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.13.3-zeta.1\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h,c as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h,c as l}from"./chunk-7JNPSNL6.mjs";import{b as E}from"./chunk-COW5IGYC.mjs";import{a as p}from"./chunk-STYDBDYL.mjs";import{a as g}from"./chunk-7STYQ5ZE.mjs";var o=class o extends E{constructor(r){super();let{publicKeys:e,threshold:t}=r;if(e.length>o.MAX_KEYS||e.length<o.MIN_KEYS)throw new Error(`Must have between ${o.MIN_KEYS} and ${o.MAX_KEYS} public keys, inclusive`);if(t<o.MIN_THRESHOLD||t>e.length)throw new Error(`Threshold must be between ${o.MIN_THRESHOLD} and ${e.length}, inclusive`);this.publicKeys=e,this.threshold=t}verifySignature(r){let{message:e,signature:t}=r;if(!(t instanceof y))return!1;let s=[];for(let i=0;i<4;i+=1)for(let n=0;n<8;n+=1)if((t.bitmap[i]&1<<7-n)!==0){let u=i*8+n;s.push(u)}if(s.length!==t.signatures.length)throw new Error("Bitmap and signatures length mismatch");if(s.length<this.threshold)throw new Error("Not enough signatures");for(let i=0;i<s.length;i+=1)if(!this.publicKeys[s[i]].verifySignature({message:e,signature:t.signatures[i]}))return!1;return!0}authKey(){return g.fromSchemeAndBytes({scheme:1,input:this.toUint8Array()})}toUint8Array(){let r=new Uint8Array(this.publicKeys.length*h.LENGTH+1);return this.publicKeys.forEach((e,t)=>{r.set(e.toUint8Array(),t*h.LENGTH)}),r[this.publicKeys.length*h.LENGTH]=this.threshold,r}serialize(r){r.serializeBytes(this.toUint8Array())}static deserialize(r){let e=r.deserializeBytes(),t=e[e.length-1],s=[];for(let i=0;i<e.length-1;i+=h.LENGTH){let n=i;s.push(new h(e.subarray(n,n+h.LENGTH)))}return new o({publicKeys:s,threshold:t})}};o.MAX_KEYS=32,o.MIN_KEYS=2,o.MIN_THRESHOLD=1;var d=o,a=class a extends p{constructor(r){super();let{signatures:e,bitmap:t}=r;if(e.length>a.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${a.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=e,!(t instanceof Uint8Array))this.bitmap=a.createBitmap({bits:t});else{if(t.length!==a.BITMAP_LEN)throw new Error(`"bitmap" length should be ${a.BITMAP_LEN}`);this.bitmap=t}}toUint8Array(){let r=new Uint8Array(this.signatures.length*l.LENGTH+a.BITMAP_LEN);return this.signatures.forEach((e,t)=>{r.set(e.toUint8Array(),t*l.LENGTH)}),r.set(this.bitmap,this.signatures.length*l.LENGTH),r}serialize(r){r.serializeBytes(this.toUint8Array())}static deserialize(r){let e=r.deserializeBytes(),t=e.subarray(e.length-4),s=[];for(let i=0;i<e.length-t.length;i+=l.LENGTH){let n=i;s.push(new l(e.subarray(n,n+l.LENGTH)))}return new a({signatures:s,bitmap:t})}static createBitmap(r){let{bits:e}=r,t=128,s=new Uint8Array([0,0,0,0]),i=new Set;return e.forEach((n,c)=>{if(n>=a.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${a.MAX_SIGNATURES_SUPPORTED-1}.`);if(i.has(n))throw new Error("Duplicate bits detected.");if(c>0&&n<=e[c-1])throw new Error("The bits need to be sorted in ascending order.");i.add(n);let u=Math.floor(n/8),b=s[u];b|=t>>n%8,s[u]=b}),s}};a.MAX_SIGNATURES_SUPPORTED=32,a.BITMAP_LEN=4;var y=a;export{d as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-XHPLLMR5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{m as g,v as a}from"./chunk-S4SEFF4K.mjs";import{b as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{m as g,v as a}from"./chunk-S4SEFF4K.mjs";import{b as n}from"./chunk-SA7MZPM3.mjs";import{b as p,c}from"./chunk-CHQ6IKE3.mjs";async function h(o){let{aptosConfig:t}=o,{data:e}=await n({aptosConfig:t,originMethod:"getLedgerInfo",path:""});return e}async function l(o){let{aptosConfig:t,ledgerVersion:e,options:s}=o,{data:r}=await n({aptosConfig:t,originMethod:"getBlockByVersion",path:`blocks/by_version/${e}`,params:{with_transactions:s?.withTransactions}});return r}async function C(o){let{aptosConfig:t,blockHeight:e,options:s}=o,{data:r}=await n({aptosConfig:t,originMethod:"getBlockByHeight",path:`blocks/by_height/${e}`,params:{with_transactions:s?.withTransactions}});return r}async function m(o){let{aptosConfig:t,handle:e,data:s,options:r}=o;return(await p({aptosConfig:t,originMethod:"getTableItem",path:`tables/${e}/item`,params:{ledger_version:r?.ledgerVersion},body:s})).data}async function T(o){let{aptosConfig:t,limit:e}=o;return(await i({aptosConfig:t,query:{query:g,variables:{limit:e}},originMethod:"getChainTopUserTransactions"})).user_transactions}async function i(o){let{aptosConfig:t,query:e,originMethod:s}=o,{data:r}=await c({aptosConfig:t,originMethod:s??"queryIndexer",path:"",body:e,overrides:{WITH_CREDENTIALS:!1}});return r}async function f(o){let{aptosConfig:t}=o;return(await i({aptosConfig:t,query:{query:a},originMethod:"getProcessorStatuses"})).processor_status}async function q(o){let t=await f({aptosConfig:o.aptosConfig});return BigInt(t[0].last_success_version)}async function b(o){let{aptosConfig:t,processorType:e}=o;return(await i({aptosConfig:t,query:{query:a,variables:{where_condition:{processor:{_eq:e}}}},originMethod:"getProcessorStatus"})).processor_status[0]}export{h as a,l as b,C as c,m as d,T as e,i as f,f as g,q as h,b as i};
|
|
2
|
+
//# sourceMappingURL=chunk-YGB7MEH3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-P5VCS2F5.mjs";import{e as u}from"./chunk-WPVBC4JS.mjs";import{a as o,b as r}from"./chunk-KGJITNRZ.mjs";var g=class c{constructor(t){let{multiKey:i,signers:s}=t;this.publicKey=i,this.signers=s,this.signingScheme=3,this.accountAddress=this.publicKey.authKey().derivedAddress();let e=[];for(let n of s)e.push(this.publicKey.getIndex(n.publicKey));this.signaturesBitmap=this.publicKey.createBitmap({bits:e})}static fromPublicKeysAndSigners(t){let{publicKeys:i,signaturesRequired:s,signers:e}=t,n=new o({publicKeys:i,signaturesRequired:s});return new c({multiKey:n,signers:e})}static isMultiKeySigner(t){return t instanceof c}signWithAuthenticator(t){return new u(this.publicKey,this.signTransaction(t))}async waitForProofFetch(){let t=this.signers.filter(i=>i instanceof a);await Promise.all(t.filter(i=>i.proof instanceof Promise).map(i=>i.proof))}sign(t){let i=[];for(let s of this.signers)i.push(s.sign(t));return new r({signatures:i,bitmap:this.signaturesBitmap})}signTransaction(t){let i=[];for(let s of this.signers)i.push(s.signTransaction(t));return new r({signatures:i,bitmap:this.signaturesBitmap})}verifySignature(t){return!0}};export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YH6UKGIX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{f as a}from"./chunk-YGB7MEH3.mjs";import{q as d}from"./chunk-S4SEFF4K.mjs";import{b as p}from"./chunk-T23OVRNF.mjs";var g=300,y=o=>{if(o&&o.length>g)throw new Error(`Event type length exceeds the maximum length of ${g}`)};async function f(o){let{aptosConfig:n,eventType:e,options:t}=o,r={where:{account_address:{_eq:"0x0000000000000000000000000000000000000000000000000000000000000000"},creation_number:{_eq:"0"},sequence_number:{_eq:"0"},indexed_type:{_eq:e}},pagination:t,orderBy:t?.orderBy};return c({aptosConfig:n,options:r})}async function h(o){let{accountAddress:n,aptosConfig:e,creationNumber:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},creation_number:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function _(o){let{accountAddress:n,aptosConfig:e,eventType:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},indexed_type:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function c(o){let{aptosConfig:n,options:e}=o;y(e?.where?.indexed_type?._eq);let t={query:d,variables:{where_condition:e?.where,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await a({aptosConfig:n,query:t,originMethod:"getEvents"})).events}export{f as a,h as b,_ as c,c as d};
|
|
2
|
+
//# sourceMappingURL=chunk-YI7FZPIK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-WPVBC4JS.mjs";import{a as g,b as _}from"./chunk-XHPLLMR5.mjs";import{a as p,c as b}from"./chunk-7JNPSNL6.mjs";import{b as o}from"./chunk-T23OVRNF.mjs";import{a as h}from"./chunk-TVRJ3M7B.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-ZGTJMNZG.mjs.map
|
package/dist/esm/client/core.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-EKOIHFAW.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-ROXFCLDT.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-5VSMDXZ6.mjs";import"../chunk-X7GVXVT4.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-C3L4ETUF.mjs";import"../chunk-3FVRXELT.mjs";import"../chunk-EB7AI4B4.mjs";import"../chunk-6RBUXB5I.mjs";import"../chunk-OKRUEVF3.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.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-
|
|
1
|
+
import{a,b,c,d}from"../chunk-SA7MZPM3.mjs";import"../chunk-EKOIHFAW.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-ROXFCLDT.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-5VSMDXZ6.mjs";import"../chunk-X7GVXVT4.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-C3L4ETUF.mjs";import"../chunk-3FVRXELT.mjs";import"../chunk-EB7AI4B4.mjs";import"../chunk-6RBUXB5I.mjs";import"../chunk-OKRUEVF3.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.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-
|
|
1
|
+
import"../chunk-N2FKVZ4D.mjs";import{a as d,b as e,c as f,d as g}from"../chunk-SA7MZPM3.mjs";import{a as h,b as i,c as j,d as k,e as l,f as m}from"../chunk-CHQ6IKE3.mjs";import{a as b,b as c}from"../chunk-EKOIHFAW.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-ROXFCLDT.mjs";import{a}from"../chunk-6FBKUTGF.mjs";import"../chunk-5VSMDXZ6.mjs";import"../chunk-X7GVXVT4.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-C3L4ETUF.mjs";import"../chunk-3FVRXELT.mjs";import"../chunk-EB7AI4B4.mjs";import"../chunk-6RBUXB5I.mjs";import"../chunk-OKRUEVF3.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.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-
|
|
1
|
+
import{a,b,c,d,e,f}from"../chunk-CHQ6IKE3.mjs";import"../chunk-EKOIHFAW.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-ROXFCLDT.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-5VSMDXZ6.mjs";import"../chunk-X7GVXVT4.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-C3L4ETUF.mjs";import"../chunk-3FVRXELT.mjs";import"../chunk-EB7AI4B4.mjs";import"../chunk-6RBUXB5I.mjs";import"../chunk-OKRUEVF3.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.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
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-7JNPSNL6.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as Ed25519PrivateKey,a as Ed25519PublicKey,c as Ed25519Signature};
|
|
2
2
|
//# sourceMappingURL=ed25519.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-R7BAM2G6.mjs";import"../../chunk-7JNPSNL6.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as EphemeralPublicKey,b as EphemeralSignature};
|
|
2
2
|
//# sourceMappingURL=ephemeral.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-AQ4I7VVB.mjs";import{a as
|
|
1
|
+
import"../../chunk-AQ4I7VVB.mjs";import{a as Q,b as R}from"../../chunk-KGJITNRZ.mjs";import"../../chunk-KUX6GQ2E.mjs";import{a as O,b as P}from"../../chunk-6M6XXPQQ.mjs";import{a as u,b as v,c as w}from"../../chunk-PTIZKRON.mjs";import{a as z,b as A,c as B,d as C,e as D,f as E,g as F,h as G,i as H,j as I,k as J,l as K,m as L,n as M,o as N}from"../../chunk-WTVN3XGK.mjs";import"../../chunk-FLYEALDB.mjs";import{a as x,b as y}from"../../chunk-R7BAM2G6.mjs";import{a as s,b as t}from"../../chunk-XHPLLMR5.mjs";import{a as p,b as q,c as r}from"../../chunk-7JNPSNL6.mjs";import{a as m,b as n}from"../../chunk-COW5IGYC.mjs";import{a as o}from"../../chunk-STYDBDYL.mjs";import"../../chunk-TJDC5PWD.mjs";import{a,b,c,d,e,f,g,h,i,j,k,l}from"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{c as APTOS_BIP44_DEFAULT_DERIVATION_PATH,b as APTOS_BIP44_REGEX,a as APTOS_HARDENED_REGEX,n as AccountPublicKey,O as AnyPublicKey,P as AnySignature,i as CKDPriv,z as EPK_HORIZON_SECS,q as Ed25519PrivateKey,p as Ed25519PublicKey,r as Ed25519Signature,x as EphemeralPublicKey,y as EphemeralSignature,K as Groth16Zkp,e as HARDENED_OFFSET,d as KeyType,H as KeylessPublicKey,N as KeylessSignature,A as MAX_AUD_VAL_BYTES,G as MAX_COMMITED_EPK_BYTES,E as MAX_EXTRA_FIELD_BYTES,D as MAX_ISS_VAL_BYTES,F as MAX_JWT_HEADER_B64_BYTES,B as MAX_UID_KEY_BYTES,C as MAX_UID_VAL_BYTES,s as MultiEd25519PublicKey,t as MultiEd25519Signature,Q as MultiKey,R as MultiSignature,M as OpenIdSignature,J as OpenIdSignatureOrZkProof,m as PublicKey,v as Secp256k1PrivateKey,u as Secp256k1PublicKey,w as Secp256k1Signature,o as Signature,L as SignedGroth16Signature,I as computeAddressSeed,h as deriveKey,k as fromDerivationPath,f as isValidBIP44Path,g as isValidHardenedPath,l as mnemonicToSeed,j as splitPath};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../../chunk-WTVN3XGK.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-R7BAM2G6.mjs";import"../../chunk-7JNPSNL6.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as EPK_HORIZON_SECS,l as Groth16Zkp,i as KeylessPublicKey,o as KeylessSignature,b as MAX_AUD_VAL_BYTES,h as MAX_COMMITED_EPK_BYTES,f as MAX_EXTRA_FIELD_BYTES,e as MAX_ISS_VAL_BYTES,g as MAX_JWT_HEADER_B64_BYTES,c as MAX_UID_KEY_BYTES,d as MAX_UID_VAL_BYTES,n as OpenIdSignature,k as OpenIdSignatureOrZkProof,m as SignedGroth16Signature,j as computeAddressSeed};
|
|
2
2
|
//# sourceMappingURL=keyless.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-XHPLLMR5.mjs";import"../../chunk-7JNPSNL6.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as MultiEd25519PublicKey,b as MultiEd25519Signature};
|
|
2
2
|
//# sourceMappingURL=multiEd25519.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-KGJITNRZ.mjs";import"../../chunk-6M6XXPQQ.mjs";import"../../chunk-PTIZKRON.mjs";import"../../chunk-WTVN3XGK.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-R7BAM2G6.mjs";import"../../chunk-7JNPSNL6.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as MultiKey,b as MultiSignature};
|
|
2
2
|
//# sourceMappingURL=multiKey.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-COW5IGYC.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-COW5IGYC.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as AccountPublicKey,a as PublicKey};
|
|
2
2
|
//# sourceMappingURL=publicKey.mjs.map
|