@crossmint/wallets-sdk 1.9.0 → 1.11.0
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/api/__tests__/constants.d.cts +1 -1
- package/dist/api/__tests__/constants.d.ts +1 -1
- package/dist/api/__tests__/test-utils.cjs +1 -1
- package/dist/api/__tests__/test-utils.d.cts +1 -1
- package/dist/api/__tests__/test-utils.d.ts +1 -1
- package/dist/api/__tests__/test-utils.js +1 -1
- package/dist/api/client.cjs +1 -1
- package/dist/api/client.d.cts +1 -1
- package/dist/api/client.d.ts +1 -1
- package/dist/api/client.js +1 -1
- package/dist/api/gen/index.cjs +1 -1
- package/dist/api/gen/index.d.cts +2 -2
- package/dist/api/gen/index.d.ts +2 -2
- package/dist/api/gen/index.js +1 -1
- package/dist/api/gen/sdk.gen.cjs +1 -1
- package/dist/api/gen/sdk.gen.d.cts +51 -2
- package/dist/api/gen/sdk.gen.d.ts +51 -2
- package/dist/api/gen/sdk.gen.js +1 -1
- package/dist/api/gen/types.gen.d.cts +23431 -3289
- package/dist/api/gen/types.gen.d.ts +23431 -3289
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.d.cts +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/types.d.cts +1 -1
- package/dist/api/types.d.ts +1 -1
- package/dist/chains/adapters/evm.cjs +1 -1
- package/dist/chains/adapters/evm.d.cts +1 -1
- package/dist/chains/adapters/evm.d.ts +1 -1
- package/dist/chains/adapters/evm.js +1 -1
- package/dist/chains/adapters/solana.cjs +1 -1
- package/dist/chains/adapters/solana.d.cts +1 -1
- package/dist/chains/adapters/solana.d.ts +1 -1
- package/dist/chains/adapters/solana.js +1 -1
- package/dist/chains/adapters/stellar.cjs +1 -1
- package/dist/chains/adapters/stellar.d.cts +1 -1
- package/dist/chains/adapters/stellar.d.ts +1 -1
- package/dist/chains/adapters/stellar.js +1 -1
- package/dist/chains/chain-adapter.cjs +1 -1
- package/dist/chains/chain-adapter.d.cts +1 -1
- package/dist/chains/chain-adapter.d.ts +1 -1
- package/dist/chains/chain-adapter.js +1 -1
- package/dist/chains/chains.cjs +1 -1
- package/dist/chains/chains.js +1 -1
- package/dist/{chunk-E2GL7NJM.js → chunk-3A424HCV.js} +1 -1
- package/dist/{chunk-222WHEBO.js → chunk-3CEGPUJH.js} +1 -1
- package/dist/{chunk-OHR5JRFH.cjs → chunk-3N7PKPCH.cjs} +1 -1
- package/dist/{chunk-SRN6KQRK.js → chunk-3QKB6K3J.js} +1 -1
- package/dist/chunk-3TZJ6D4G.js +1 -0
- package/dist/{chunk-NVIW3CJW.js → chunk-5HMRFOCH.js} +1 -1
- package/dist/{chunk-CGQR7B2H.cjs → chunk-65BIFI5E.cjs} +1 -1
- package/dist/{chunk-HJIKAOPC.cjs → chunk-677M3EWV.cjs} +1 -1
- package/dist/{chunk-AERFTEJI.cjs → chunk-6GZQZEGQ.cjs} +1 -1
- package/dist/{chunk-2SUPM5NU.js → chunk-6IV3GB5W.js} +1 -1
- package/dist/{chunk-J64QG3LS.js → chunk-6U5MZQQP.js} +1 -1
- package/dist/chunk-6ZAGINES.cjs +1 -0
- package/dist/{chunk-7HVCPMZA.js → chunk-7BW7B47N.js} +1 -1
- package/dist/chunk-7FEY62ID.js +1 -0
- package/dist/{chunk-ILCNZB3A.cjs → chunk-7O3W4JAP.cjs} +1 -1
- package/dist/{chunk-4T45LK43.cjs → chunk-7SGXWFCJ.cjs} +1 -1
- package/dist/{chunk-EUNVW5NM.cjs → chunk-7SOKSLRQ.cjs} +1 -1
- package/dist/{chunk-VMXMHGSE.js → chunk-ARQVCU6M.js} +1 -1
- package/dist/chunk-AUDTBFZ4.cjs +1 -0
- package/dist/chunk-B4GYB3XY.js +1 -0
- package/dist/{chunk-Z5GCNZZH.cjs → chunk-B5U3A75U.cjs} +1 -1
- package/dist/{chunk-J4L3FCIC.js → chunk-C2LCF6GA.js} +1 -1
- package/dist/{chunk-7AE4UN5A.cjs → chunk-EAU5Z5O5.cjs} +1 -1
- package/dist/{chunk-BGQZNCXO.cjs → chunk-EBQT52SL.cjs} +1 -1
- package/dist/{chunk-5KGXMZFJ.js → chunk-EFBUJ2BS.js} +1 -1
- package/dist/{chunk-SSC676RL.js → chunk-EGX2IXWU.js} +1 -1
- package/dist/chunk-F3CW7X6C.js +1 -0
- package/dist/{chunk-2UL2H43T.js → chunk-F3NUWFQW.js} +1 -1
- package/dist/{chunk-D36TJPDF.cjs → chunk-FQZXBS7L.cjs} +1 -1
- package/dist/{chunk-RJZ6ZFLX.cjs → chunk-GUFTPTSI.cjs} +1 -1
- package/dist/{chunk-LOZ4BC3H.cjs → chunk-HE4BTHTY.cjs} +1 -1
- package/dist/{chunk-5M4L42QQ.js → chunk-HIHX5FRO.js} +1 -1
- package/dist/chunk-IDRQPLGQ.cjs +1 -0
- package/dist/{chunk-O5SASZOH.cjs → chunk-JEJYT3WD.cjs} +1 -1
- package/dist/chunk-JNKTRQPS.cjs +1 -0
- package/dist/chunk-KSN4TWLX.js +1 -0
- package/dist/{chunk-464D53RC.js → chunk-KVGWACFA.js} +1 -1
- package/dist/{chunk-YLMVZCBF.js → chunk-KZ7LB6ZV.js} +1 -1
- package/dist/{chunk-Z7GMI25O.cjs → chunk-MHKIVDKZ.cjs} +1 -1
- package/dist/{chunk-AOVIJZ3W.cjs → chunk-MIPKK2GZ.cjs} +2 -2
- package/dist/chunk-MJZZHBC2.cjs +1 -0
- package/dist/{chunk-DVTKFD3K.js → chunk-N7SKSCSW.js} +1 -1
- package/dist/chunk-NUBGDLR2.js +1 -0
- package/dist/chunk-NUIG3XY3.cjs +1 -0
- package/dist/{chunk-VWYK4DKI.js → chunk-OE6CWWFM.js} +1 -1
- package/dist/chunk-OV256XVK.cjs +1 -0
- package/dist/{chunk-PZC2L2XZ.cjs → chunk-P4EW7S5I.cjs} +1 -1
- package/dist/{chunk-IHJXAM3H.cjs → chunk-P7KLEZYV.cjs} +1 -1
- package/dist/{chunk-532BF2RA.cjs → chunk-PEY3R7XG.cjs} +1 -1
- package/dist/{chunk-5UR3TR3H.cjs → chunk-PMQQEVKL.cjs} +1 -1
- package/dist/chunk-Q3LD5CYJ.cjs +1 -0
- package/dist/chunk-QV4LLMZM.js +1 -0
- package/dist/{chunk-HBGLYYE4.js → chunk-RFWY44CJ.js} +1 -1
- package/dist/chunk-SGP5B33N.js +1 -0
- package/dist/{chunk-KZ62YXDQ.cjs → chunk-SNBCG5HR.cjs} +1 -1
- package/dist/{chunk-EZ6E5QGL.js → chunk-STRSYJNY.js} +1 -1
- package/dist/{chunk-HXN3ZART.js → chunk-TJBIBZMF.js} +1 -1
- package/dist/{chunk-DZAG4SRY.js → chunk-TY33CSCI.js} +1 -1
- package/dist/{chunk-23X5QOE6.cjs → chunk-UF5HZQUO.cjs} +1 -1
- package/dist/{chunk-EOXMCIRY.cjs → chunk-UP5EGWNN.cjs} +1 -1
- package/dist/{chunk-HRRPQMFM.cjs → chunk-UPSASDJP.cjs} +1 -1
- package/dist/{chunk-WLTYJRB5.js → chunk-URQQBUUX.js} +1 -1
- package/dist/{chunk-PJKTUGX2.js → chunk-VCOKK7C2.js} +1 -1
- package/dist/{chunk-J42KB6M4.cjs → chunk-VCX2M3JY.cjs} +1 -1
- package/dist/{chunk-NBM25TBK.js → chunk-VFJ7NZBI.js} +1 -1
- package/dist/{chunk-CTJQUZUF.js → chunk-VPJBVKHY.js} +1 -1
- package/dist/{chunk-MLUAGHMI.js → chunk-VTTD4HPY.js} +1 -1
- package/dist/chunk-W6APCBJW.cjs +1 -0
- package/dist/{chunk-EXOY4ZCV.cjs → chunk-W6L7J3KL.cjs} +1 -1
- package/dist/{chunk-BDQ6PRDN.js → chunk-WO4ZWJT6.js} +1 -1
- package/dist/{chunk-E7Z24LRS.cjs → chunk-WTJC5QBH.cjs} +1 -1
- package/dist/{chunk-5OGNXLOH.js → chunk-XEWCMK3Z.js} +1 -1
- package/dist/chunk-XZ4NKVEB.cjs +1 -0
- package/dist/{chunk-IASKJ4WS.js → chunk-ZUBX7T2L.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/logger/index.cjs +1 -1
- package/dist/logger/index.js +1 -1
- package/dist/logger/init.cjs +1 -1
- package/dist/logger/init.js +1 -1
- package/dist/sdk.cjs +1 -1
- package/dist/sdk.d.cts +1 -1
- package/dist/sdk.d.ts +1 -1
- package/dist/sdk.js +1 -1
- package/dist/signers/descriptors/api-key.cjs +1 -1
- package/dist/signers/descriptors/api-key.d.cts +1 -1
- package/dist/signers/descriptors/api-key.d.ts +1 -1
- package/dist/signers/descriptors/api-key.js +1 -1
- package/dist/signers/descriptors/device.cjs +1 -1
- package/dist/signers/descriptors/device.d.cts +1 -1
- package/dist/signers/descriptors/device.d.ts +1 -1
- package/dist/signers/descriptors/device.js +1 -1
- package/dist/signers/descriptors/email.cjs +1 -1
- package/dist/signers/descriptors/email.d.cts +1 -1
- package/dist/signers/descriptors/email.d.ts +1 -1
- package/dist/signers/descriptors/email.js +1 -1
- package/dist/signers/descriptors/external-wallet.cjs +1 -1
- package/dist/signers/descriptors/external-wallet.d.cts +1 -1
- package/dist/signers/descriptors/external-wallet.d.ts +1 -1
- package/dist/signers/descriptors/external-wallet.js +1 -1
- package/dist/signers/descriptors/index.cjs +1 -1
- package/dist/signers/descriptors/index.d.cts +1 -1
- package/dist/signers/descriptors/index.d.ts +1 -1
- package/dist/signers/descriptors/index.js +1 -1
- package/dist/signers/descriptors/passkey.d.cts +1 -1
- package/dist/signers/descriptors/passkey.d.ts +1 -1
- package/dist/signers/descriptors/phone.cjs +1 -1
- package/dist/signers/descriptors/phone.d.cts +1 -1
- package/dist/signers/descriptors/phone.d.ts +1 -1
- package/dist/signers/descriptors/phone.js +1 -1
- package/dist/signers/descriptors/server.d.cts +1 -1
- package/dist/signers/descriptors/server.d.ts +1 -1
- package/dist/signers/descriptors/types.d.cts +1 -1
- package/dist/signers/descriptors/types.d.ts +1 -1
- package/dist/signers/device.d.cts +1 -1
- package/dist/signers/device.d.ts +1 -1
- package/dist/signers/evm-api-key.d.cts +1 -1
- package/dist/signers/evm-api-key.d.ts +1 -1
- package/dist/signers/evm-external-wallet.d.cts +1 -1
- package/dist/signers/evm-external-wallet.d.ts +1 -1
- package/dist/signers/external-wallet-signer.d.cts +1 -1
- package/dist/signers/external-wallet-signer.d.ts +1 -1
- package/dist/signers/index.cjs +1 -1
- package/dist/signers/index.d.cts +3 -2
- package/dist/signers/index.d.ts +3 -2
- package/dist/signers/index.js +1 -1
- package/dist/signers/non-custodial/index.cjs +1 -1
- package/dist/signers/non-custodial/index.d.cts +1 -1
- package/dist/signers/non-custodial/index.d.ts +1 -1
- package/dist/signers/non-custodial/index.js +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.d.cts +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.d.ts +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.js +1 -1
- package/dist/signers/non-custodial/ncs-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-signer.d.cts +1 -1
- package/dist/signers/non-custodial/ncs-signer.d.ts +1 -1
- package/dist/signers/non-custodial/ncs-signer.js +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.d.cts +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.d.ts +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.js +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.d.cts +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.js +1 -1
- package/dist/signers/passkey.d.cts +1 -1
- package/dist/signers/passkey.d.ts +1 -1
- package/dist/signers/server/assemble-server-signer.d.cts +1 -1
- package/dist/signers/server/assemble-server-signer.d.ts +1 -1
- package/dist/signers/server/evm-server-signer.d.cts +1 -1
- package/dist/signers/server/evm-server-signer.d.ts +1 -1
- package/dist/signers/server/helpers/derive-server-signer.d.cts +1 -1
- package/dist/signers/server/helpers/derive-server-signer.d.ts +1 -1
- package/dist/signers/server/helpers/index.d.cts +1 -1
- package/dist/signers/server/helpers/index.d.ts +1 -1
- package/dist/signers/server/index.d.cts +1 -1
- package/dist/signers/server/index.d.ts +1 -1
- package/dist/signers/server/resolver.d.cts +1 -1
- package/dist/signers/server/resolver.d.ts +1 -1
- package/dist/signers/server/solana-server-signer.d.cts +1 -1
- package/dist/signers/server/solana-server-signer.d.ts +1 -1
- package/dist/signers/server/stellar-server-signer.d.cts +1 -1
- package/dist/signers/server/stellar-server-signer.d.ts +1 -1
- package/dist/signers/solana-api-key.d.cts +1 -1
- package/dist/signers/solana-api-key.d.ts +1 -1
- package/dist/signers/solana-external-wallet.cjs +1 -1
- package/dist/signers/solana-external-wallet.d.cts +1 -1
- package/dist/signers/solana-external-wallet.d.ts +1 -1
- package/dist/signers/solana-external-wallet.js +1 -1
- package/dist/signers/stellar-external-wallet.d.cts +1 -1
- package/dist/signers/stellar-external-wallet.d.ts +1 -1
- package/dist/signers/types.d.cts +1 -1
- package/dist/signers/types.d.ts +1 -1
- package/dist/{types-XtGH-kml.d.cts → types-4EOfiBxs.d.cts} +1 -0
- package/dist/{types-Cd9b04Z6.d.ts → types-DfpYAsst.d.ts} +1 -0
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.cjs +1 -1
- package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.js +1 -1
- package/dist/utils/device-signers/createDeviceSigner.d.cts +1 -1
- package/dist/utils/device-signers/createDeviceSigner.d.ts +1 -1
- package/dist/utils/device-signers/index.cjs +1 -1
- package/dist/utils/device-signers/index.d.cts +1 -1
- package/dist/utils/device-signers/index.d.ts +1 -1
- package/dist/utils/device-signers/index.js +1 -1
- package/dist/utils/errors.cjs +1 -1
- package/dist/utils/errors.d.cts +4 -1
- package/dist/utils/errors.d.ts +4 -1
- package/dist/utils/errors.js +1 -1
- package/dist/utils/locators.cjs +1 -1
- package/dist/utils/locators.d.cts +1 -1
- package/dist/utils/locators.d.ts +1 -1
- package/dist/utils/locators.js +1 -1
- package/dist/utils/signer-locator.cjs +1 -1
- package/dist/utils/signer-locator.d.cts +1 -1
- package/dist/utils/signer-locator.d.ts +1 -1
- package/dist/utils/signer-locator.js +1 -1
- package/dist/utils/signer-mapping.cjs +1 -1
- package/dist/utils/signer-mapping.d.cts +1 -1
- package/dist/utils/signer-mapping.d.ts +1 -1
- package/dist/utils/signer-mapping.js +1 -1
- package/dist/utils/signer-validation.cjs +1 -1
- package/dist/utils/signer-validation.js +1 -1
- package/dist/wallets/__tests__/test-helpers.cjs +1 -1
- package/dist/wallets/__tests__/test-helpers.d.cts +1 -1
- package/dist/wallets/__tests__/test-helpers.d.ts +1 -1
- package/dist/wallets/__tests__/test-helpers.js +1 -1
- package/dist/wallets/evm.cjs +1 -1
- package/dist/wallets/evm.d.cts +1 -1
- package/dist/wallets/evm.d.ts +1 -1
- package/dist/wallets/evm.js +1 -1
- package/dist/wallets/services/balance-formatter.cjs +1 -1
- package/dist/wallets/services/balance-formatter.d.cts +1 -1
- package/dist/wallets/services/balance-formatter.d.ts +1 -1
- package/dist/wallets/services/balance-formatter.js +1 -1
- package/dist/wallets/services/device-recovery-service.cjs +1 -1
- package/dist/wallets/services/device-recovery-service.d.cts +4 -2
- package/dist/wallets/services/device-recovery-service.d.ts +4 -2
- package/dist/wallets/services/device-recovery-service.js +1 -1
- package/dist/wallets/services/operation-poller.cjs +1 -1
- package/dist/wallets/services/operation-poller.d.cts +1 -1
- package/dist/wallets/services/operation-poller.d.ts +1 -1
- package/dist/wallets/services/operation-poller.js +1 -1
- package/dist/wallets/services/signer-manager.cjs +1 -1
- package/dist/wallets/services/signer-manager.d.cts +1 -1
- package/dist/wallets/services/signer-manager.d.ts +1 -1
- package/dist/wallets/services/signer-manager.js +1 -1
- package/dist/wallets/solana.cjs +1 -1
- package/dist/wallets/solana.d.cts +1 -1
- package/dist/wallets/solana.d.ts +1 -1
- package/dist/wallets/solana.js +1 -1
- package/dist/wallets/stellar.cjs +1 -1
- package/dist/wallets/stellar.d.cts +1 -1
- package/dist/wallets/stellar.d.ts +1 -1
- package/dist/wallets/stellar.js +1 -1
- package/dist/wallets/types.d.cts +1 -1
- package/dist/wallets/types.d.ts +1 -1
- package/dist/wallets/wallet-factory.cjs +1 -1
- package/dist/wallets/wallet-factory.d.cts +1 -1
- package/dist/wallets/wallet-factory.d.ts +1 -1
- package/dist/wallets/wallet-factory.js +1 -1
- package/dist/wallets/wallet.cjs +1 -1
- package/dist/wallets/wallet.d.cts +1 -1
- package/dist/wallets/wallet.d.ts +1 -1
- package/dist/wallets/wallet.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-2F6CGFVL.cjs +0 -1
- package/dist/chunk-2TVSRZ42.js +0 -1
- package/dist/chunk-6DEQI3XT.cjs +0 -1
- package/dist/chunk-6HB4WO5J.js +0 -1
- package/dist/chunk-DFIZFCX4.js +0 -1
- package/dist/chunk-DX2WEUVJ.js +0 -1
- package/dist/chunk-HOK6IZYG.cjs +0 -1
- package/dist/chunk-IBQQA6L3.js +0 -1
- package/dist/chunk-J5W5S2WG.cjs +0 -1
- package/dist/chunk-K2W3NIDO.cjs +0 -1
- package/dist/chunk-LHAOCUXT.cjs +0 -1
- package/dist/chunk-LKYOZL7U.cjs +0 -1
- package/dist/chunk-N5LPV5FV.js +0 -1
- package/dist/chunk-QYNJ3CQP.cjs +0 -1
- package/dist/chunk-SLPKMZNW.js +0 -1
- package/dist/chunk-TM77X7C3.cjs +0 -1
- package/dist/chunk-TVD45ZZM.cjs +0 -1
- package/dist/chunk-UUMP3VCM.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-7FEY62ID.js";import{a}from"./chunk-TJBIBZMF.js";import{b as p,c}from"./chunk-NUBGDLR2.js";import{h as t}from"./chunk-NU7VF7MC.js";import{APIKeyEnvironmentPrefix as d,APIKeyUsageOrigin as g,CrossmintApiClient as P}from"@crossmint/common-sdk-base";var h=class extends P{constructor(e){super(e,{internalConfig:{sdkMetadata:{name:c,version:p}}});this.apiPrefix="api/2025-06-09/wallets";this.unstableApiPrefix="api/unstable/wallets"}createWallet(e){return t(this,null,function*(){let s=this.isServerSide?`${this.apiPrefix}`:`${this.apiPrefix}/me`;a.info("wallets.api.createWallet",{chainType:e.chainType,walletType:e.type});let n=yield(yield this.post(s,{body:JSON.stringify(e),headers:this.headers})).json();return"error"in n?a.error("wallets.api.createWallet.error",{error:n.error,chainType:e.chainType}):"address"in n&&a.info("wallets.api.createWallet.success",{address:n.address,chainType:e.chainType}),n})}getWallet(e){return t(this,null,function*(){a.info("wallets.api.getWallet",{locator:e});let r=yield(yield this.get(`${this.apiPrefix}/${e}`,{headers:this.headers})).json();return"error"in r?a.warn("wallets.api.getWallet.error",{locator:e,error:r.error}):"address"in r&&a.info("wallets.api.getWallet.success",{address:r.address,locator:e}),r})}createTransaction(e,s){return t(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveTransaction(e,s,r){return t(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions/${s}/approvals`,{body:JSON.stringify(r),headers:this.headers})).json()})}getTransaction(e,s){return t(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions/${s}`,{headers:this.headers})).json()})}createSignature(e,s){return t(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveSignature(e,s,r){return t(this,null,function*(){let n=yield this.post(`${this.apiPrefix}/${e}/signatures/${s}/approvals`,{body:JSON.stringify(r),headers:this.headers});return n.status===422?this.getSignature(e,s):n.json()})}getSignature(e,s){return t(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signatures/${s}`,{headers:this.headers})).json()})}getTransactions(e){return t(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions`,{headers:this.headers})).json()})}getNfts(e){return t(this,null,function*(){let s=new URLSearchParams;s.append("page",e.page.toString()),s.append("perPage",e.perPage.toString());let r=`${e.chain}:${e.address}`;return(yield this.get(`${this.apiPrefix}/${r}/nfts?${s.toString()}`,{headers:this.headers})).json()})}getTransfers(e,s){return t(this,null,function*(){let r=new URLSearchParams;return r.append("chain",s.chain.toString()),s.tokens!=null&&r.append("tokens",s.tokens),r.append("status",s.status),(yield this.get(`${this.unstableApiPrefix}/${e}/transfers?${r.toString()}`,{headers:this.headers})).json()})}getBalance(e,s){return t(this,null,function*(){let r=new URLSearchParams;return r.append("tokens",s.tokens.join(",")),r.append("chains",s.chains.join(",")),(yield this.get(`${this.apiPrefix}/${e}/balances?${r.toString()}`,{headers:this.headers})).json()})}fundWallet(e,s){return t(this,null,function*(){if(this.environment===d.PRODUCTION)throw new Error("Funding wallets is only supported in staging environment");return(yield this.post(`api/v1-alpha2/wallets/${e}/balances`,{body:JSON.stringify(s),headers:this.headers})).json()})}registerSigner(e,s){return t(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signers`,{body:JSON.stringify(s),headers:this.headers})).json()})}removeSigner(e,s,r){return t(this,null,function*(){let n=encodeURIComponent(s),i=new URLSearchParams;r.chain&&i.append("chain",r.chain);let l=`${this.apiPrefix}/${e}/signers/${n}${i.size>0?`?${i.toString()}`:""}`;return(yield this.delete(l,{headers:this.headers})).json()})}getSigner(e,s){return t(this,null,function*(){let r=encodeURIComponent(s);return(yield this.get(`${this.apiPrefix}/${e}/signers/${r}`,{headers:this.headers})).json()})}send(e,s,r){return t(this,null,function*(){a.info("wallets.api.send",{walletLocator:e,tokenLocator:s,recipient:r.recipient});let i=yield(yield this.post(`${this.apiPrefix}/${e}/tokens/${s}/transfers`,{body:JSON.stringify(r),headers:this.headers})).json();return"error"in i?a.error("wallets.api.send.error",{walletLocator:e,tokenLocator:s,error:i.error}):"id"in i&&a.info("wallets.api.send.success",{walletLocator:e,transactionId:i.id}),i})}get isServerSide(){return this.parsedAPIKey.usageOrigin===g.SERVER}get environment(){if(!this.parsedAPIKey.isValid)throw new o("Invalid API key");return this.parsedAPIKey.environment}get projectId(){if(!this.parsedAPIKey.isValid)throw new o("Invalid API key");return this.parsedAPIKey.projectId}get headers(){return{"Content-Type":"application/json"}}};export{h as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as S}from"./chunk-SEOBV6KR.js";import{a as s}from"./chunk-F3NUWFQW.js";import{a as l}from"./chunk-3CEGPUJH.js";import{a as o}from"./chunk-6U5MZQQP.js";import{a as g}from"./chunk-3QKB6K3J.js";import{a as y}from"./chunk-K7BPGUFU.js";import{a as f}from"./chunk-MN2BGRRJ.js";import{a as C}from"./chunk-FQ5F3VYJ.js";import{a as m}from"./chunk-HAQMNZO5.js";import{a as p}from"./chunk-TMOWGJ5Z.js";import{a as u}from"./chunk-MLROTECD.js";import{g as i}from"./chunk-7FEY62ID.js";import{h as t}from"./chunk-NU7VF7MC.js";function c(r,e,n){switch(e.type){case"email":case"phone":return r==="solana"?new l(e):r==="stellar"?new o(e):new s(e);case"api-key":return r==="solana"?new u(e):new C(e);case"external-wallet":return r==="solana"?new g(e):r==="stellar"?new y(e):new m(e);case"server":return S(r,e);case"passkey":return new p(e);case"device":if(n==null)throw new i("Device signer key storage is required for device signers");return new f(e,n)}}function k(r,e,n,a){return t(this,null,function*(){if(!e.startsWith("device:"))return null;let w=e.replace("device:","");return(yield a.hasKey(w))?c(r,{type:"device",locator:e,address:n},a):null})}export{c as a,k as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7O3W4JAPcjs = require('./chunk-7O3W4JAP.cjs');var o={nativeToken:"sol",walletLocatorPrefix:"me:solana:smart",supportsSignatures:!1,addSignerChain(n){},extractAddSignerOperation(n,r,a){if(!("transaction"in n)||n.transaction==null)throw _chunk7O3W4JAPcjs.a.error("wallet.addSigner.error",{error:"Expected transaction in response for Solana/Stellar chain"}),new Error("Expected transaction in response for Solana/Stellar chain");return{type:"transaction",id:n.transaction.id}},balanceTokenFields(n){return n!=null&&"mintHash"in n?{mintHash:n.mintHash}:n!=null&&"contractAddress"in n?{contractAddress:n.contractAddress}:{}},emptyBalanceTokenFields(){return{mintHash:void 0}}};exports.a = o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as a}from"./chunk-
|
|
1
|
+
import{g as a}from"./chunk-7FEY62ID.js";import{isEmailValid as c}from"@crossmint/common-sdk-auth";var m=(n,t,o)=>`Wallet signer configuration mismatch at "${n}" - expected "${o}" from existing wallet but found "${t}"`;function u(n){let o=n.toLowerCase().split("@"),r=o[1],i=r==="googlemail.com",e=(i||r==="gmail.com")&&o[0].includes(".");return i&&(o[1]="gmail.com"),e&&(o[0]=o[0].replace(/\./g,"")),`${o[0]}@${o[1]}`}function f(n){return/^0x[0-9a-fA-F]+$/.test(n)?BigInt(n).toString():n}function l(n,t=""){if(typeof n=="string"){if(c(n))return u(n);if(t.endsWith(".x")||t.endsWith(".y"))return f(n)}return n}function d(n,t,o=""){if(n!==t){if(n==null||t==null)throw new Error(`Cannot compare null or undefined signer configs at path: ${o}`);for(let r of Object.keys(n)){if(!(r in t))continue;let i=o?`${o}.${r}`:r,s=n[r],e=t[r];if(typeof s=="object"&&s!==null&&typeof e=="object"&&e!==null)d(s,e,i);else if(l(s,i)!==l(e,i))throw new a(m(i,s,e))}}}export{u as a,l as b,d as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n,c as i}from"./chunk-
|
|
1
|
+
import{b as n,c as i}from"./chunk-NUBGDLR2.js";import{SdkLogger as d,BrowserDatadogSink as k,detectPlatform as g,validateAPIKey as l,ServerDatadogSink as m}from"@crossmint/common-sdk-base";var t=new d;function f(s){let o=g(),e=l(s);if(!e.isValid)throw new Error(`Invalid API key: ${e.message}`);let{environment:a,projectId:c}=e;switch(t.init({packageName:i,packageVersion:n,environment:a,projectId:c,platform:o}),o){case"browser":{let r=new k(a);t.addSink(r);break}case"react-native":break;case"server":{let r=new m(a);t.addSink(r);break}default:break}}export{t as a,f as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-TJBIBZMF.js";var s={nativeToken:"sol",walletLocatorPrefix:"me:solana:smart",supportsSignatures:!1,addSignerChain(n){},extractAddSignerOperation(n,r,a){if(!("transaction"in n)||n.transaction==null)throw e.error("wallet.addSigner.error",{error:"Expected transaction in response for Solana/Stellar chain"}),new Error("Expected transaction in response for Solana/Stellar chain");return{type:"transaction",id:n.transaction.id}},balanceTokenFields(n){return n!=null&&"mintHash"in n?{mintHash:n.mintHash}:n!=null&&"contractAddress"in n?{contractAddress:n.contractAddress}:{}},emptyBalanceTokenFields(){return{mintHash:void 0}}};export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJNKTRQPScjs = require('./chunk-JNKTRQPS.cjs');var _chunkXZ4NKVEBcjs = require('./chunk-XZ4NKVEB.cjs');var _chunk7O3W4JAPcjs = require('./chunk-7O3W4JAP.cjs');var f={nativeToken:"eth",walletLocatorPrefix:"me:evm:smart",supportsSignatures:!0,addSignerChain(e){return e},extractAddSignerOperation(e,r,n){var a,t,o,d;if(!("chains"in e))throw _chunk7O3W4JAPcjs.a.error("wallet.addSigner.error",{error:"Expected chains in response for EVM chain"}),new Error("Expected chains in response for EVM chain");if(((t=(a=e.chains)==null?void 0:a[r])==null?void 0:t.status)==="failed")throw _chunk7O3W4JAPcjs.a.error("wallet.addSigner.failed",{chain:r,signerType:n.type,signerLocator:n.locator,chainStatus:(o=e.chains)==null?void 0:o[r]}),new (0, _chunkXZ4NKVEBcjs.j)(`Signer registration failed for chain ${r} (signer: ${n.locator})`,JSON.stringify((d=e.chains)==null?void 0:d[r]));return _chunkJNKTRQPScjs.c.call(void 0, e,r)},balanceTokenFields(e){return e!=null&&"contractAddress"in e?{contractAddress:e.contractAddress}:{}},emptyBalanceTokenFields(){return{contractAddress:void 0}}};exports.a = f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXZ4NKVEBcjs = require('./chunk-XZ4NKVEB.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');function o(r){if(typeof r=="string"){if(!_commonsdkbase.isValidAddress.call(void 0, r))throw new (0, _chunkXZ4NKVEBcjs.H)(`Invalid recipient address: "${r}". Expected a valid EVM (0x...), Solana (base58), or Stellar (G.../C...) address.`);return r}if("email"in r)return`email:${r.email}`;if("x"in r)return`x:${r.x}`;if("twitter"in r)return`twitter:${r.twitter}`;if("phone"in r)return`phoneNumber:${r.phone}`;if("userId"in r)return`userId:${r.userId}`;throw new Error("Invalid recipient locator")}function d(r,e){return _commonsdkbase.isValidAddress.call(void 0, r)?`${e}:${r}`:`${e}:${r.toLowerCase()}`}exports.a = o; exports.b = d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIDRQPLGQcjs = require('./chunk-IDRQPLGQ.cjs');var _chunkXZ4NKVEBcjs = require('./chunk-XZ4NKVEB.cjs');var _chunk7O3W4JAPcjs = require('./chunk-7O3W4JAP.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var m=409,l=class l extends _chunkIDRQPLGQcjs.a{constructor(e){super({chain:e.chain,address:e.address,owner:e.owner,options:_chunkIDRQPLGQcjs.a.getOptions(e),alias:e.alias,recovery:_chunkIDRQPLGQcjs.a.getRecovery(e),apiRecoveryServerSignerAddress:_chunkIDRQPLGQcjs.a.getApiRecoveryServerSignerAddress(e),apiDelegatedServerSignerAddresses:_chunkIDRQPLGQcjs.a.getApiDelegatedServerSignerAddresses(e),signer:e.signer,signers:_chunkIDRQPLGQcjs.a.getInitialSigners(e)},_chunkIDRQPLGQcjs.a.getApiClient(e))}static from(e){if(!_commonsdkbase.isValidStellarAddress.call(void 0, e.address))throw new Error("Wallet is not a Stellar wallet");return new l(e)}sendTransaction(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var d;_chunk7O3W4JAPcjs.a.info("stellarWallet.sendTransaction.start"),yield this.preAuthIfNeeded();let r=yield this.createTransaction(e);if((d=e.options)!=null&&d.prepareOnly)return _chunk7O3W4JAPcjs.a.info("stellarWallet.sendTransaction.prepared",{transactionId:r.id}),{hash:void 0,explorerLink:void 0,transactionId:r.id};let a={},n=yield this.approveTransactionAndWait(r.id,a);return _chunk7O3W4JAPcjs.a.info("stellarWallet.sendTransaction.success",{transactionId:r.id,hash:n.hash}),n})}upgrade(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){_chunk7O3W4JAPcjs.a.info("stellarWallet.upgrade.start"),yield this.preAuthIfNeeded();let r=yield this.createWalletLifecycleTransaction("upgrade-wallet",e);if(r!=null){if(e!=null&&e.prepareOnly)return _chunk7O3W4JAPcjs.a.info("stellarWallet.upgrade.prepared",{transactionId:r}),{hash:void 0,explorerLink:void 0,transactionId:r};yield this.approveTransactionAndWait(r),_chunk7O3W4JAPcjs.a.info("stellarWallet.upgrade.phase1.success",{transactionId:r})}else _chunk7O3W4JAPcjs.a.info("stellarWallet.upgrade.phase1.skipped",{reason:"wallet already locked from a prior upgrade"});let a=yield this.migrateInternal({signer:e==null?void 0:e.signer,prepareOnly:e==null?void 0:e.prepareOnly});return _chunk7O3W4JAPcjs.a.info("stellarWallet.upgrade.success",{transactionId:a.transactionId,hash:a.hash}),a})}migrate(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return yield this.preAuthIfNeeded(),yield this.migrateInternal(e)})}migrateInternal(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){_chunk7O3W4JAPcjs.a.info("stellarWallet.migrate.start");let r=yield this.createWalletLifecycleTransaction("migrate-wallet",e);if(r==null)throw new (0, _chunkXZ4NKVEBcjs.z)("Failed to create migrate-wallet transaction");if(e!=null&&e.prepareOnly)return _chunk7O3W4JAPcjs.a.info("stellarWallet.migrate.prepared",{transactionId:r}),{hash:void 0,explorerLink:void 0,transactionId:r};let a=yield this.approveTransactionAndWait(r);return _chunk7O3W4JAPcjs.a.info("stellarWallet.migrate.success",{transactionId:r,hash:a.hash}),a})}createTransaction(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let{contractId:r,options:a}=e,n=this.resolveStellarSigner(a==null?void 0:a.signer),d="transaction"in e?{type:"serialized-transaction",serializedTransaction:e.transaction,contractId:r}:{type:"contract-call",contractId:r,method:e.method,memo:e.memo!=null?{type:"text",value:e.memo}:void 0,args:e.args},p=yield this.apiClient.createTransaction(this.walletLocator,{params:{transaction:d,signer:n}});if("error"in p)throw new (0, _chunkXZ4NKVEBcjs.z)(JSON.stringify(p));return p})}createWalletLifecycleTransaction(e,r){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let a=(r==null?void 0:r.signer)!=null?this.resolveStellarSigner(r.signer):void 0,n=yield this.apiClient.createTransaction(this.walletLocator,{params:_chunkDSIFRRBScjs.a.call(void 0, {transaction:{type:e}},a!=null?{signer:a}:{})});if("error"in n){if(e==="upgrade-wallet"&&y(n))return null;throw new (0, _chunkXZ4NKVEBcjs.z)(JSON.stringify(n))}return n.id})}resolveStellarSigner(e){return e==null?this.signerManager.require().locator():typeof e=="string"?e:this.resolveServerSignerApiLocator(e)}};_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunk7O3W4JAPcjs.a,methodName:"stellarWallet.sendTransaction",buildContext(e){return{chain:e.chain,address:e.address}}})],l.prototype,"sendTransaction",1),_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunk7O3W4JAPcjs.a,methodName:"stellarWallet.upgrade",buildContext(e){return{chain:e.chain,address:e.address}}})],l.prototype,"upgrade",1),_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunk7O3W4JAPcjs.a,methodName:"stellarWallet.migrate",buildContext(e){return{chain:e.chain,address:e.address}}})],l.prototype,"migrate",1);var h=l;function y(o){return typeof o=="object"&&o!==null&&"statusCode"in o&&o.statusCode===m}exports.a = h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk-FT5EVMLB.js";import{a as o}from"./chunk-SVIKBM3S.js";import{a as S}from"./chunk-KKQBZXFE.js";import{a as A}from"./chunk-S3DYQVRD.js";import{a as O}from"./chunk-KUP7H7X2.js";import{b as i,c as s}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-FT5EVMLB.js";import{a as o}from"./chunk-SVIKBM3S.js";import{a as S}from"./chunk-KKQBZXFE.js";import{a as A}from"./chunk-S3DYQVRD.js";import{a as O}from"./chunk-KUP7H7X2.js";import{b as i,c as s}from"./chunk-7FEY62ID.js";import{a as E}from"./chunk-TJBIBZMF.js";import{APIKeyEnvironmentPrefix as M,BlockchainIncludingTestnet as e}from"@crossmint/common-sdk-base";import{baseSepolia as m,base as _,polygonAmoy as L,polygon as P,optimismSepolia as u,optimism as c,arbitrumSepolia as R,arbitrum as N,arbitrumNova as p,modeTestnet as h,mode as d,mainnet as f,bsc as W,shape as U,zora as V,zoraSepolia as B,sepolia as y,flowMainnet as H,flowTestnet as v,plume as x,plumeTestnet as b}from"viem/chains";var w=[e.ABSTRACT_TESTNET,e.ARBITRUM_SEPOLIA,e.BASE_SEPOLIA,e.CURTIS,e.ETHEREUM_SEPOLIA,e.FLOW_TESTNET,e.MANTLE_SEPOLIA,e.MODE_SEPOLIA,e.OPTIMISM_SEPOLIA,e.PLUME_TESTNET,e.POLYGON_AMOY,e.SCROLL_SEPOLIA,e.SEI_ATLANTIC_2_TESTNET,e.STORY_TESTNET,e.WORLD_CHAIN_SEPOLIA,e.ZORA_SEPOLIA,e.ARC_TESTNET,e.TEMPO_TESTNET],D=[e.ABSTRACT,e.APECHAIN,e.ARBITRUM,e.ARBITRUMNOVA,e.BASE,e.BSC,e.ETHEREUM,e.FLOW,e.MANTLE,e.MODE,e.OPTIMISM,e.PLUME,e.POLYGON,e.SCROLL,e.SEI_PACIFIC_1,e.SHAPE,e.STORY,e.TEMPO,e.WORLDCHAIN,e.ZORA];function ee(t){switch(t){case e.BASE_SEPOLIA:return m;case e.BASE:return _;case e.POLYGON_AMOY:return L;case e.POLYGON:return P;case e.OPTIMISM_SEPOLIA:return u;case e.OPTIMISM:return c;case e.ARBITRUM_SEPOLIA:return R;case e.ARBITRUM:return N;case e.ARBITRUMNOVA:return p;case e.STORY_TESTNET:return A;case e.STORY:return S;case e.MODE_SEPOLIA:return h;case e.MODE:return d;case e.BSC:return W;case e.SHAPE:return U;case e.ZORA:return V;case e.ZORA_SEPOLIA:return B;case e.ETHEREUM_SEPOLIA:return y;case e.ETHEREUM:return f;case e.FLOW:return H;case e.FLOW_TESTNET:return v;case e.PLUME_TESTNET:return b;case e.PLUME:return x;case e.ARC_TESTNET:return o;case e.TEMPO:return O;case e.TEMPO_TESTNET:return l;case e.ABSTRACT:case e.ABSTRACT_TESTNET:case e.APECHAIN:case e.MANTLE:case e.MANTLE_SEPOLIA:case e.SCROLL:case e.SCROLL_SEPOLIA:case e.SEI_PACIFIC_1:case e.SEI_ATLANTIC_2_TESTNET:case e.CURTIS:case e.WORLDCHAIN:case e.WORLD_CHAIN_SEPOLIA:throw new Error(`Chain ${t} is not yet supported in toViemChain function. Please add the appropriate viem chain definition.`);default:throw new Error(`Unknown chain: ${t}`)}}function I(t){return w.includes(t)}function C(t){return D.includes(t)}var Y={[e.ABSTRACT]:e.ABSTRACT_TESTNET,[e.APECHAIN]:e.CURTIS,[e.ARBITRUM]:e.ARBITRUM_SEPOLIA,[e.BASE]:e.BASE_SEPOLIA,[e.ETHEREUM]:e.ETHEREUM_SEPOLIA,[e.FLOW]:e.FLOW_TESTNET,[e.MANTLE]:e.MANTLE_SEPOLIA,[e.MODE]:e.MODE_SEPOLIA,[e.OPTIMISM]:e.OPTIMISM_SEPOLIA,[e.PLUME]:e.PLUME_TESTNET,[e.POLYGON]:e.POLYGON_AMOY,[e.SCROLL]:e.SCROLL_SEPOLIA,[e.SEI_PACIFIC_1]:e.SEI_ATLANTIC_2_TESTNET,[e.STORY]:e.STORY_TESTNET,[e.WORLDCHAIN]:e.WORLD_CHAIN_SEPOLIA,[e.ZORA]:e.ZORA_SEPOLIA,[e.TEMPO]:e.TEMPO_TESTNET};function g(t){return Y[t]}function F(t){return t==="solana"||t==="stellar"||I(t)||C(t)}function te(t,a){if(!F(t))throw new s(`Unknown chain "${t}". Please use a supported chain name (e.g. "base-sepolia", "polygon", "solana", "stellar").`);if(t==="solana"||t==="stellar")return t;let r=t,T=a===M.PRODUCTION;if(T&&I(r))throw new i(`Chain "${t}" is a testnet chain and cannot be used in production. Please use a mainnet chain instead.`);if(!T&&C(r)){let n=g(r);if(n!=null)return E.debug("validateChainForEnvironment.autoConverted",{chain:t,convertedTo:n,environment:a,message:`Chain "${t}" is a mainnet chain and cannot be used in ${a} environment. Automatically converted to "${n}".`}),n;E.debug("validateChainForEnvironment.mismatch",{chain:t,environment:a,message:`Chain "${t}" is a mainnet chain and should not be used in ${a} environment. No testnet equivalent is available. Please use a testnet chain instead.`})}return t}export{ee as a,I as b,C as c,g as d,F as e,te as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-STRSYJNY.js";function o(e){return e.type==="external-wallet"?`external-wallet:${e.address}`:e.type==="email"&&e.email?`email:${r(e.email)}`:e.type==="phone"&&e.phone?`phone:${e.phone}`:e.type==="passkey"&&"id"in e?`passkey:${e.id}`:e.type==="api-key"?"api-key":e.type==="device"?"locator"in e&&e.locator!=null?e.locator:"device:":e.type}function p(e){let t=e.indexOf(":");return t===-1?{type:e,value:""}:{type:e.substring(0,t),value:e.substring(t+1)}}export{o as a,p as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkPMQQEVKLcjs = require('./chunk-PMQQEVKL.cjs');var _chunk7O3W4JAPcjs = require('./chunk-7O3W4JAP.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');var _ox = require('ox');var _viem = require('viem');var c=class p extends _chunkPMQQEVKLcjs.a{constructor(e){super(e)}signMessage(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let i=_viem.isHex.call(void 0, e)?e:_viem.toHex.call(void 0, e),r=_ox.PersonalMessage.getSignPayload(i);return yield this.sign(r)})}signTransaction(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return yield this.sign(e)})}sign(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var o;yield this.handleAuthRequired();let i=this.getJwtOrThrow(),r=e.replace("0x","");_chunk7O3W4JAPcjs.a.info("sign: sending request",{keyType:"secp256k1"});let y=Date.now(),n=yield(o=this.config.clientTEEConnection)==null?void 0:o.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:i,apiKey:this.config.crossmint.apiKey},data:{keyType:"secp256k1",bytes:r,encoding:"hex"}},options:_chunkPMQQEVKLcjs.b});if(_chunk7O3W4JAPcjs.a.info("sign: response received",{status:n==null?void 0:n.status,durationMs:Date.now()-y}),(n==null?void 0:n.status)==="error")throw new Error(n.error);if((n==null?void 0:n.signature)==null)throw new Error("Failed to sign transaction");return p.verifyPublicKeyFormat(n.publicKey),{signature:n.signature.bytes}})}static verifyPublicKeyFormat(e){if(e==null)throw new Error("No public key found");if(e.encoding!=="hex"||e.keyType!=="secp256k1"||e.bytes==null)throw new Error("Not supported. Expected public key to be in hex encoding and secp256k1 key type. Got: "+JSON.stringify(e))}getChainKeyParams(){return{scheme:"secp256k1",encoding:"hex"}}};exports.a = c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-VCOKK7C2.js";var g={type:"phone",validateConfig(n){if(!("phone"in n)||n.phone==null)throw new Error("Phone signer requires a phone number")},buildInternalConfig(n,e){let i=n;return{type:"phone",phone:i.phone,locator:`phone:${i.phone}`,address:e.walletAddress,crossmint:e.crossmint,clientTEEConnection:e.clientTEEConnection,resetSignerFrame:e.resetSignerFrame,onAuthRequired:e.onAuthRequired}},canAutoAssemble(){return!0},addSignerPayload(n){return r(n)},matchesRecovery(n,e){return r(n)===r(e)},adoptsRecoveryConfigOnMatch:!0,signerUnavailableReason:()=>null};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-3TZJ6D4G.js";import{a as E}from"./chunk-5LNDUSMZ.js";import{a as k}from"./chunk-VCOKK7C2.js";import{b as A,c as P}from"./chunk-STRSYJNY.js";import{b as W,c as x}from"./chunk-TSJUK3ED.js";import{f as w}from"./chunk-URQQBUUX.js";import{e as F,g,l as b}from"./chunk-7FEY62ID.js";import{a as d}from"./chunk-TJBIBZMF.js";import{a as f,b as v,c as S,h as C}from"./chunk-NU7VF7MC.js";import{WithLoggerContext as T}from"@crossmint/common-sdk-base";import{WebAuthnP256 as I}from"ox";var $="When 'signers' is provided to a method that may fetch an existing wallet, each specified signer must exist in that wallet's configuration.",u=class{constructor(e){this.apiClient=e}getWallet(e,t){return C(this,null,function*(){let r,i;if(typeof e=="string"){if(!this.apiClient.isServerSide)throw new g("getWallet with walletLocator is only available on the server side. Use getWallet(args) instead.");if(t==null)throw new g("Wallet configuration is required when using walletLocator: https://docs.crossmint.com/sdk-reference/wallets/type-aliases/WalletArgsFor");r=e,i=t}else{if(this.apiClient.isServerSide)throw new g("getWallet on server side requires a walletLocator parameter. Use getWallet(walletLocator, args) instead.");i=e,r=this.getWalletLocator(i)}let n=v(f({},i),{chain:w(i.chain,this.apiClient.environment)});d.info("walletFactory.getWallet.start");let a=yield this.apiClient.getWallet(r);if("error"in a)throw d.warn("walletFactory.getWallet.notFound",{error:a.error}),new F(JSON.stringify(a));return d.info("walletFactory.getWallet.success",{address:a.address}),yield this.createWalletInstance(a,n)})}createWallet(e){return C(this,null,function*(){var o,c,p,h,y,R;let t=v(f({},e),{chain:w(e.chain,this.apiClient.environment)});if(yield(p=(c=(o=t.options)==null?void 0:o.callbacks)==null?void 0:c.onWalletCreationStart)==null?void 0:p.call(c),d.info("walletFactory.createWallet.start"),!this.apiClient.isServerSide&&t.owner!=null)throw d.error("walletFactory.createWallet.error",{error:"Owner field cannot be specified in client-side createWallet calls"}),new g("Owner field cannot be specified in client-side createWallet calls. Owner is determined from JWT authentication.");let r=(h=t.signers)!=null?h:[],i=((y=t.options)==null?void 0:y.deviceSignerKeyStorage)!=null&&!r.some(m=>m.type==="device"),n=i?[...r,{type:"device"}]:r,a=yield this.registerSigners(n,t.chain,(R=t.options)==null?void 0:R.deviceSignerKeyStorage),s;if(t.recovery.type==="passkey"&&t.recovery.id==null)s=yield this.createPasskeySigner(t.recovery);else if(t.recovery.type==="server"){let{derivedAddress:m}=W(t.recovery,t.chain,this.apiClient.projectId,this.apiClient.environment);s={type:"server",address:m}}else s=t.recovery;let l=yield this.createSmartWallet(t,s,a,i);if("error"in l)throw d.error("walletFactory.createWallet.error",{error:l.error}),new g(JSON.stringify(l));return d.info("walletFactory.createWallet.success",{address:l.address}),yield this.createWalletInstance(l,t)})}createSmartWallet(e,t,r,i){return C(this,null,function*(){let n=o=>{var c,p;return{type:"smart",chainType:this.getChainType(e.chain),config:f(f({adminSigner:t},e.plugins?{plugins:e.plugins}:{}),o!=null?{delegatedSigners:o}:{}),owner:(c=e.owner)!=null?c:void 0,alias:(p=e.alias)!=null?p:void 0}},a=yield this.apiClient.createWallet(n(r));if(!(i&&"error"in a&&a.code===b))return a;d.info("walletFactory.createWallet.deviceSignerUnsupported.retryWithoutDeviceSigner",{chain:e.chain});let l=r.filter(o=>!this.isBuiltDeviceSigner(o));return yield this.apiClient.createWallet(n(l))})}isBuiltDeviceSigner(e){let t=e.signer;return typeof t=="object"&&t!=null&&t.type==="device"}createWalletInstance(e,t){return C(this,null,function*(){var p,h;this.validateExistingWalletConfig(e,t);let r=t,i=e.config.adminSigner,n=((p=r.recovery)==null?void 0:p.type)==="server"||((h=r.recovery)==null?void 0:h.type)==="external-wallet"?r.recovery:i,a=e.config.delegatedSigners,s=a;s!=null&&s.length===1&&(s[0].type==="server"||s[0].type==="external-wallet")&&(s=r.signers);let l=i.type==="server"&&"address"in i&&!("secret"in i)?i.address:void 0,o=(a!=null?a:[]).filter(y=>y.type==="server"&&"address"in y&&!("secret"in y)).map(y=>y.address),c=new D({chain:t.chain,address:e.address,owner:e.owner,options:t.options,alias:t.alias,recovery:n,apiRecoveryServerSignerAddress:l,apiDelegatedServerSignerAddresses:o,signers:s!=null?s:[]},this.apiClient);return yield c.waitForInit(),c})}getWalletLocator(e){return`me:${this.getChainType(e.chain)}:smart`+(e.alias!=null?`:alias:${e.alias}`:"")}createPasskeySigner(e){return C(this,null,function*(){var i;if(e.type!=="passkey")throw new Error("Signer is not a passkey");let t=(i=e.name)!=null?i:`Crossmint Wallet ${Date.now()}`,r=e.onCreatePasskey?yield e.onCreatePasskey(t):yield I.createCredential({name:t});return{type:"passkey",id:r.id,name:t,publicKey:{x:r.publicKey.x.toString(),y:r.publicKey.y.toString()}}})}validateExistingWalletConfig(e,t){if(t.owner!=null&&e.owner!=null&&A(t.owner)!==A(e.owner))throw new g("Wallet owner does not match existing wallet's linked user");if(t.chain==="solana"&&e.chainType!=="solana"||t.chain!=="solana"&&e.chainType==="solana"||t.chain==="stellar"&&e.chainType!=="stellar"||t.chain!=="stellar"&&e.chainType==="stellar")throw new g(`Wallet chain does not match existing wallet's chain. You must use chain: ${e.chainType}.`);if(e.type!=="smart")return;let r=t;if(r.recovery!=null||r.signers!=null){let i=e.config,n=i==null?void 0:i.adminSigner;if(r.recovery!=null&&n!=null){if(r.recovery.type!==n.type)throw new g("The wallet recovery signer type does not match the existing wallet's recovery signer type");P(r.recovery,n)}let a=r.signers;a!=null&&this.validateSigners(e,a,t.chain)}}validateSigners(e,t,r){let i=e.config,n=i==null?void 0:i.delegatedSigners;if(t.length!==0){if(n==null||n.length===0)throw new g(`${t.length} signer(s) specified, but wallet "${e.address}" has no signers. ${$}`);for(let a of t){let s=n.find(l=>{if(this.isMatchingPasskeySigner(a,l,i)||l.type==="device"&&a.type==="device")return!0;if(a.type==="server"){let{primary:o,legacy:c}=x(a,r,this.apiClient.projectId,this.apiClient.environment);return l.locator===`server:${o.derivedAddress}`||c!=null&&l.locator===`server:${c.derivedAddress}`}return l.locator===k(a)});if(s==null){let l=n.map(o=>o.locator).join(", ");throw new g(`Signer '${a.type}' does not exist in wallet "${e.address}". Available signers: ${l}. ${$}`)}P(a,s)}}}isMatchingPasskeySigner(e,t,r){var n,a;let i=((a=(n=r.delegatedSigners)==null?void 0:n.filter(s=>s.type==="passkey").length)!=null?a:0)+(r.adminSigner.type==="passkey"?1:0);if(e.type==="passkey"){if(e.id==null&&i===1)return t.type==="passkey";if(e.id==null&&i>1)throw new g("When creating a wallet with multiple passkeys, you must provide the passkey ID for each passkey.")}return!1}registerSigners(e,t,r){return C(this,null,function*(){var i;return yield Promise.all((i=e==null?void 0:e.map(n=>C(this,null,function*(){if(n.type==="passkey")return n.id==null?{signer:yield this.createPasskeySigner(n)}:{signer:n};if(n.type==="device"){if(n.publicKey!=null)return{signer:{type:"device",publicKey:n.publicKey,name:n.name}};if(n.locator!=null)return{signer:n.locator};if(r==null)throw new g("Device signer key storage is required for device signers");let a=yield E(r);return{signer:{type:"device",publicKey:a.publicKey,name:a.name}}}if(n.type==="server"&&t!=null){let{derivedAddress:a}=W(n,t,this.apiClient.projectId,this.apiClient.environment);return{signer:`server:${a}`}}return{signer:k(n)}})))!=null?i:[])})}getChainType(e){return e==="solana"?"solana":e==="stellar"?"stellar":"evm"}};S([T({logger:d,methodName:"walletFactory.getWallet",buildContext(e,t){if(typeof t[0]=="string"){let i=t[1];return{walletLocator:t[0],chain:i==null?void 0:i.chain}}let r=t[0];return{chain:r==null?void 0:r.chain}}})],u.prototype,"getWallet",1),S([T({logger:d,methodName:"walletFactory.createWallet",buildContext(e,t){return{chain:t[0].chain}}})],u.prototype,"createWallet",1);export{u as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-VCOKK7C2.js";import{a as i,b as a}from"./chunk-NU7VF7MC.js";var o=`No signer is set. External wallet signers require calling wallet.useSigner() with the onSign callback before signing operations.
|
|
2
2
|
Example: wallet.useSigner({ type: "external-wallet", address: "0x...", onSign: async (tx) => ... })`,s={type:"external-wallet",validateConfig(e){if(!("address"in e)||e.address==null)throw new Error("External wallet signer requires a wallet address");if(!("onSign"in e)||typeof e.onSign!="function")throw new Error("External wallet signer requires an onSign callback")},buildInternalConfig(e){let n=e;return a(i({},n),{locator:`external-wallet:${n.address}`})},canAutoAssemble(e){return"onSign"in e&&typeof e.onSign=="function"},addSignerPayload(e){return r(e)},matchesRecovery(e,n){return r(e)===r(n)},adoptsRecoveryConfigOnMatch:!0,signerUnavailableReason:()=>o};export{o as a,s as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUF5HZQUOcjs = require('./chunk-UF5HZQUO.cjs');var _chunkSNBCG5HRcjs = require('./chunk-SNBCG5HR.cjs');var _chunkP4EW7S5Icjs = require('./chunk-P4EW7S5I.cjs');var _chunkENU3EKBGcjs = require('./chunk-ENU3EKBG.cjs');var i={evm:_chunkUF5HZQUOcjs.a,solana:_chunkSNBCG5HRcjs.a,stellar:_chunkP4EW7S5Icjs.a};function h(e){return i[_chunkENU3EKBGcjs.a.call(void 0, e)]}function g(e){return Object.prototype.hasOwnProperty.call(i,e)}exports.a = h; exports.b = g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7SOKSLRQcjs = require('./chunk-7SOKSLRQ.cjs');function n(e){return e.type==="external-wallet"?`external-wallet:${e.address}`:e.type==="email"&&e.email?`email:${_chunk7SOKSLRQcjs.a.call(void 0, e.email)}`:e.type==="phone"&&e.phone?`phone:${e.phone}`:e.type==="passkey"&&"id"in e?`passkey:${e.id}`:e.type==="api-key"?"api-key":e.type==="device"?"locator"in e&&e.locator!=null?e.locator:"device:":e.type}function o(e){let t=e.indexOf(":");return t===-1?{type:e,value:""}:{type:e.substring(0,t),value:e.substring(t+1)}}exports.a = n; exports.b = o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as P}from"./chunk-NZXYWQE5.js";import{a as v}from"./chunk-IOSADDL5.js";import{
|
|
1
|
+
import{a as P}from"./chunk-NZXYWQE5.js";import{a as v}from"./chunk-IOSADDL5.js";import{o as w}from"./chunk-7FEY62ID.js";import{a as l}from"./chunk-TJBIBZMF.js";import{c as m,h as n}from"./chunk-NU7VF7MC.js";import{getEnvironmentForKey as K,APIKeyEnvironmentPrefix as h,WithLoggerContext as u}from"@crossmint/common-sdk-base";import{WebAuthnP256 as b}from"ox";var R={[h.DEVELOPMENT]:"https://development.devicekey.store",[h.STAGING]:"https://staging.devicekey.store",[h.PRODUCTION]:"https://devicekey.store"},E=6e4,L="indexeddb-fatal",c=class extends v{constructor(e){super(e);this.iframePromise=null;this.reloading=null;this.biometricRequestHandler=null;this.biometricListener=null;if(typeof window!="undefined"&&!P())throw new w("Device signer requires a browser with third-party storage partitioning (Chrome \u2265 115, Firefox \u2265 103, or Safari). Without storage partitioning, different embedders of the same iframe can share IndexedDB, allowing cross-site key access. See https://developer.chrome.com/blog/storage-partitioning");let r=K(e);if(r==null)throw new Error("Unable to determine environment from API key");this.iframeUrl=R[r]}setBiometricRequestHandler(e){this.biometricRequestHandler=e}generateKey(){return n(this,arguments,function*(e={biometricPolicy:"none"}){return(yield this.rpc("generateKey",e)).publicKeyBase64})}mapAddressToKey(e,r){return n(this,null,function*(){yield this.rpc("mapAddressToKey",{address:e,publicKeyBase64:r})})}getKey(e){return n(this,null,function*(){return(yield this.rpc("getKey",{address:e})).publicKeyBase64})}hasKey(e){return n(this,null,function*(){return(yield this.rpc("hasKey",{publicKeyBase64:e})).hasKey})}signMessage(e,r){return n(this,null,function*(){return yield this.rpc("signMessage",{address:e,message:r})})}deleteKey(e){return n(this,null,function*(){yield this.rpc("deleteKey",{address:e})})}destroy(){this.biometricListener!=null&&(window.removeEventListener("message",this.biometricListener),this.biometricListener=null),this.iframePromise!=null&&(this.iframePromise.then(e=>e.remove()).catch(()=>{}),this.iframePromise=null)}rpc(e,r){return n(this,null,function*(){let i=yield this.sendRpc(e,r);if(i.fatal){l.warn(`[IframeDeviceSignerKeyStorage] Recoverable IDB error on "${e}", reloading iframe and retrying`),yield this.reloadIframe();let t=yield this.sendRpc(e,r);if(t.fatal)throw new Error(`Device signer IDB fatal error on "${e}" persisted after iframe reload`);return t.value}return i.value})}sendRpc(e,r){return n(this,null,function*(){let t=(yield this.getIframe()).contentWindow;if(t==null)throw new Error("Device signer iframe has no contentWindow");let g=crypto.randomUUID(),a=new URL(this.iframeUrl).origin;return new Promise((s,o)=>{let f=setTimeout(()=>{window.removeEventListener("message",p),o(new Error(`Device signer RPC "${e}" timed out after ${E}ms`))},E);function p(y){let d=y.data;d==null||d.id!==g||y.origin===a&&(clearTimeout(f),window.removeEventListener("message",p),d.type==="error"&&d.code===L?s({fatal:!0}):d.type==="error"?o(new Error(d.error)):s({value:d.result,fatal:!1}))}window.addEventListener("message",p),t.postMessage({type:e,id:g,payload:r},this.iframeUrl)})})}reloadIframe(){return n(this,null,function*(){if(this.reloading!=null)return this.reloading;let e=n(this,null,function*(){try{this.destroy(),yield this.getIframe()}finally{this.reloading=null}});return this.reloading=e,e})}setupBiometricListener(e){let r=new URL(this.iframeUrl).origin;this.biometricListener=i=>n(this,null,function*(){if(i.origin!==r)return;let t=i.data;if((t==null?void 0:t.type)!=="biometric-request")return;let g=e.contentWindow;if(g!=null)try{this.biometricRequestHandler!=null&&(yield this.biometricRequestHandler(t.action));let a=null;if(t.action==="createCredential"){let s=t.payload,o=yield b.createCredential({name:s.name});a={id:o.id,publicKey:{x:`0x${o.publicKey.x.toString(16)}`,y:`0x${o.publicKey.y.toString(16)}`}}}else if(t.action==="sign"){let s=t.payload,{signature:o,metadata:f}=yield b.sign({credentialId:s.credentialId,challenge:s.challenge});a={signature:{r:`0x${o.r.toString(16)}`,s:`0x${o.s.toString(16)}`},metadata:f}}g.postMessage({type:"biometric-response",id:t.id,result:a},this.iframeUrl)}catch(a){let s=a instanceof Error?a.message:"Unknown biometric error";g.postMessage({type:"biometric-response",id:t.id,error:s},this.iframeUrl)}}),window.addEventListener("message",this.biometricListener)}getIframe(){return this.iframePromise==null&&(this.iframePromise=this.createIframe().catch(e=>{throw this.iframePromise=null,e})),this.iframePromise}createIframe(){let e=document.createElement("iframe");return e.src=this.iframeUrl,Object.assign(e.style,{position:"absolute",opacity:"0",pointerEvents:"none",width:"0",height:"0",border:"none",top:"-9999px",left:"-9999px"}),new Promise((r,i)=>{e.onload=()=>{this.setupBiometricListener(e),r(e)},e.onerror=()=>i(new Error("Failed to load device signer iframe")),document.body.appendChild(e)})}getDeviceName(){var t;if(typeof navigator=="undefined")return"Unknown Device";let e=navigator.userAgent,r=this.parseDevice(e),i=this.parseBrowser(e);return r!=null&&i!=null?`${i} on ${r}`:(t=r!=null?r:i)!=null?t:"Unknown Device"}parseDevice(e){return/iPad/.test(e)?"iPad":/iPhone/.test(e)?"iPhone":/Macintosh|Mac OS X/.test(e)?"Mac":/Windows/.test(e)?"Windows":/Android/.test(e)?"Android":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"ChromeOS":null}parseBrowser(e){return/Edg\//.test(e)?"Edge":/OPR\/|Opera/.test(e)?"Opera":typeof navigator!="undefined"&&"brave"in navigator?"Brave":/Chrome\//.test(e)?"Chrome":/Safari\//.test(e)&&!/Chrome\//.test(e)?"Safari":/Firefox\//.test(e)?"Firefox":null}};m([u({logger:l,methodName:"deviceSignerKeyStorage.generateKey"})],c.prototype,"generateKey",1),m([u({logger:l,methodName:"deviceSignerKeyStorage.mapAddressToKey"})],c.prototype,"mapAddressToKey",1),m([u({logger:l,methodName:"deviceSignerKeyStorage.getKey"})],c.prototype,"getKey",1),m([u({logger:l,methodName:"deviceSignerKeyStorage.hasKey"})],c.prototype,"hasKey",1),m([u({logger:l,methodName:"deviceSignerKeyStorage.signMessage"})],c.prototype,"signMessage",1),m([u({logger:l,methodName:"deviceSignerKeyStorage.deleteKey"})],c.prototype,"deleteKey",1);export{c as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5X4EOJFGcjs = require('./chunk-5X4EOJFG.cjs');var _chunkHRUMWG2Fcjs = require('./chunk-HRUMWG2F.cjs');var _chunkIR5WN6FQcjs = require('./chunk-IR5WN6FQ.cjs');var _chunkGEY574THcjs = require('./chunk-GEY574TH.cjs');var _chunkUE3WVHTMcjs = require('./chunk-UE3WVHTM.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5X4EOJFGcjs = require('./chunk-5X4EOJFG.cjs');var _chunkHRUMWG2Fcjs = require('./chunk-HRUMWG2F.cjs');var _chunkIR5WN6FQcjs = require('./chunk-IR5WN6FQ.cjs');var _chunkGEY574THcjs = require('./chunk-GEY574TH.cjs');var _chunkUE3WVHTMcjs = require('./chunk-UE3WVHTM.cjs');var _chunkXZ4NKVEBcjs = require('./chunk-XZ4NKVEB.cjs');var _chunk7O3W4JAPcjs = require('./chunk-7O3W4JAP.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var _chains = require('viem/chains');var w=[_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.BASE_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.CURTIS,_commonsdkbase.BlockchainIncludingTestnet.ETHEREUM_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.FLOW_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.MANTLE_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.MODE_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.PLUME_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.POLYGON_AMOY,_commonsdkbase.BlockchainIncludingTestnet.SCROLL_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.SEI_ATLANTIC_2_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.STORY_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.WORLD_CHAIN_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.ZORA_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.ARC_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.TEMPO_TESTNET],D=[_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT,_commonsdkbase.BlockchainIncludingTestnet.APECHAIN,_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM,_commonsdkbase.BlockchainIncludingTestnet.ARBITRUMNOVA,_commonsdkbase.BlockchainIncludingTestnet.BASE,_commonsdkbase.BlockchainIncludingTestnet.BSC,_commonsdkbase.BlockchainIncludingTestnet.ETHEREUM,_commonsdkbase.BlockchainIncludingTestnet.FLOW,_commonsdkbase.BlockchainIncludingTestnet.MANTLE,_commonsdkbase.BlockchainIncludingTestnet.MODE,_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM,_commonsdkbase.BlockchainIncludingTestnet.PLUME,_commonsdkbase.BlockchainIncludingTestnet.POLYGON,_commonsdkbase.BlockchainIncludingTestnet.SCROLL,_commonsdkbase.BlockchainIncludingTestnet.SEI_PACIFIC_1,_commonsdkbase.BlockchainIncludingTestnet.SHAPE,_commonsdkbase.BlockchainIncludingTestnet.STORY,_commonsdkbase.BlockchainIncludingTestnet.TEMPO,_commonsdkbase.BlockchainIncludingTestnet.WORLDCHAIN,_commonsdkbase.BlockchainIncludingTestnet.ZORA];function X(t){switch(t){case _commonsdkbase.BlockchainIncludingTestnet.BASE_SEPOLIA:return _chains.baseSepolia;case _commonsdkbase.BlockchainIncludingTestnet.BASE:return _chains.base;case _commonsdkbase.BlockchainIncludingTestnet.POLYGON_AMOY:return _chains.polygonAmoy;case _commonsdkbase.BlockchainIncludingTestnet.POLYGON:return _chains.polygon;case _commonsdkbase.BlockchainIncludingTestnet.OPTIMISM_SEPOLIA:return _chains.optimismSepolia;case _commonsdkbase.BlockchainIncludingTestnet.OPTIMISM:return _chains.optimism;case _commonsdkbase.BlockchainIncludingTestnet.ARBITRUM_SEPOLIA:return _chains.arbitrumSepolia;case _commonsdkbase.BlockchainIncludingTestnet.ARBITRUM:return _chains.arbitrum;case _commonsdkbase.BlockchainIncludingTestnet.ARBITRUMNOVA:return _chains.arbitrumNova;case _commonsdkbase.BlockchainIncludingTestnet.STORY_TESTNET:return _chunkGEY574THcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.STORY:return _chunkIR5WN6FQcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.MODE_SEPOLIA:return _chains.modeTestnet;case _commonsdkbase.BlockchainIncludingTestnet.MODE:return _chains.mode;case _commonsdkbase.BlockchainIncludingTestnet.BSC:return _chains.bsc;case _commonsdkbase.BlockchainIncludingTestnet.SHAPE:return _chains.shape;case _commonsdkbase.BlockchainIncludingTestnet.ZORA:return _chains.zora;case _commonsdkbase.BlockchainIncludingTestnet.ZORA_SEPOLIA:return _chains.zoraSepolia;case _commonsdkbase.BlockchainIncludingTestnet.ETHEREUM_SEPOLIA:return _chains.sepolia;case _commonsdkbase.BlockchainIncludingTestnet.ETHEREUM:return _chains.mainnet;case _commonsdkbase.BlockchainIncludingTestnet.FLOW:return _chains.flowMainnet;case _commonsdkbase.BlockchainIncludingTestnet.FLOW_TESTNET:return _chains.flowTestnet;case _commonsdkbase.BlockchainIncludingTestnet.PLUME_TESTNET:return _chains.plumeTestnet;case _commonsdkbase.BlockchainIncludingTestnet.PLUME:return _chains.plume;case _commonsdkbase.BlockchainIncludingTestnet.ARC_TESTNET:return _chunkHRUMWG2Fcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.TEMPO:return _chunkUE3WVHTMcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.TEMPO_TESTNET:return _chunk5X4EOJFGcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.ABSTRACT:case _commonsdkbase.BlockchainIncludingTestnet.ABSTRACT_TESTNET:case _commonsdkbase.BlockchainIncludingTestnet.APECHAIN:case _commonsdkbase.BlockchainIncludingTestnet.MANTLE:case _commonsdkbase.BlockchainIncludingTestnet.MANTLE_SEPOLIA:case _commonsdkbase.BlockchainIncludingTestnet.SCROLL:case _commonsdkbase.BlockchainIncludingTestnet.SCROLL_SEPOLIA:case _commonsdkbase.BlockchainIncludingTestnet.SEI_PACIFIC_1:case _commonsdkbase.BlockchainIncludingTestnet.SEI_ATLANTIC_2_TESTNET:case _commonsdkbase.BlockchainIncludingTestnet.CURTIS:case _commonsdkbase.BlockchainIncludingTestnet.WORLDCHAIN:case _commonsdkbase.BlockchainIncludingTestnet.WORLD_CHAIN_SEPOLIA:throw new Error(`Chain ${t} is not yet supported in toViemChain function. Please add the appropriate viem chain definition.`);default:throw new Error(`Unknown chain: ${t}`)}}function I(t){return w.includes(t)}function C(t){return D.includes(t)}var Y={[_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT]:_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.APECHAIN]:_commonsdkbase.BlockchainIncludingTestnet.CURTIS,[_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM]:_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.BASE]:_commonsdkbase.BlockchainIncludingTestnet.BASE_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.ETHEREUM]:_commonsdkbase.BlockchainIncludingTestnet.ETHEREUM_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.FLOW]:_commonsdkbase.BlockchainIncludingTestnet.FLOW_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.MANTLE]:_commonsdkbase.BlockchainIncludingTestnet.MANTLE_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.MODE]:_commonsdkbase.BlockchainIncludingTestnet.MODE_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM]:_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.PLUME]:_commonsdkbase.BlockchainIncludingTestnet.PLUME_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.POLYGON]:_commonsdkbase.BlockchainIncludingTestnet.POLYGON_AMOY,[_commonsdkbase.BlockchainIncludingTestnet.SCROLL]:_commonsdkbase.BlockchainIncludingTestnet.SCROLL_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.SEI_PACIFIC_1]:_commonsdkbase.BlockchainIncludingTestnet.SEI_ATLANTIC_2_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.STORY]:_commonsdkbase.BlockchainIncludingTestnet.STORY_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.WORLDCHAIN]:_commonsdkbase.BlockchainIncludingTestnet.WORLD_CHAIN_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.ZORA]:_commonsdkbase.BlockchainIncludingTestnet.ZORA_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.TEMPO]:_commonsdkbase.BlockchainIncludingTestnet.TEMPO_TESTNET};function g(t){return Y[t]}function F(t){return t==="solana"||t==="stellar"||I(t)||C(t)}function ee(t,a){if(!F(t))throw new (0, _chunkXZ4NKVEBcjs.c)(`Unknown chain "${t}". Please use a supported chain name (e.g. "base-sepolia", "polygon", "solana", "stellar").`);if(t==="solana"||t==="stellar")return t;let r=t,T=a===_commonsdkbase.APIKeyEnvironmentPrefix.PRODUCTION;if(T&&I(r))throw new (0, _chunkXZ4NKVEBcjs.b)(`Chain "${t}" is a testnet chain and cannot be used in production. Please use a mainnet chain instead.`);if(!T&&C(r)){let n=g(r);if(n!=null)return _chunk7O3W4JAPcjs.a.debug("validateChainForEnvironment.autoConverted",{chain:t,convertedTo:n,environment:a,message:`Chain "${t}" is a mainnet chain and cannot be used in ${a} environment. Automatically converted to "${n}".`}),n;_chunk7O3W4JAPcjs.a.debug("validateChainForEnvironment.mismatch",{chain:t,environment:a,message:`Chain "${t}" is a mainnet chain and should not be used in ${a} environment. No testnet equivalent is available. Please use a testnet chain instead.`})}return t}exports.a = X; exports.b = I; exports.c = C; exports.d = g; exports.e = F; exports.f = ee;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f}from"./chunk-IHMMTMFG.js";import{a as u,b as g,c as w,d as v,e as y}from"./chunk-DCKFFFPG.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as f}from"./chunk-IHMMTMFG.js";import{a as u,b as g,c as w,d as v,e as y}from"./chunk-DCKFFFPG.js";import{a as r}from"./chunk-TJBIBZMF.js";import{c as E,h}from"./chunk-NU7VF7MC.js";import{validateAPIKey as P,WithLoggerContext as A}from"@crossmint/common-sdk-base";var m=class{constructor(i){this.config=i;this._needsAuth=!0;this._authPromise=null;this._initializationPromise=null;this._onboardingConnectionGeneration=null;typeof window!="undefined"&&(this._initializationPromise=this.initialize()),this.type=this.config.type}locator(){return this.config.locator}address(){return this.config.address}initialize(){return h(this,null,function*(){try{if(this.config.clientTEEConnection==null){let i=P(this.config.crossmint.apiKey);if(!i.isValid)throw new Error("Invalid API key");let t=new f({environment:i.environment});this.config.clientTEEConnection=yield t.initialize()}}finally{this._initializationPromise=null}})}getTEEConnection(){return h(this,null,function*(){if(this.config.clientTEEConnection==null){if(this._initializationPromise){if(yield this._initializationPromise,this.config.clientTEEConnection==null)throw new Error("Failed to initialize TEE connection");return this.config.clientTEEConnection}this._initializationPromise=this.initializeTEEConnection();try{yield this._initializationPromise}finally{this._initializationPromise=null}}if(this.config.clientTEEConnection==null)throw new Error("TEE connection is not initialized");return this.config.clientTEEConnection})}initializeTEEConnection(){return h(this,null,function*(){r.info("TEE connection not initialized, initializing now");let i=P(this.config.crossmint.apiKey);if(!i.isValid)throw new Error("Invalid API key");let t=new f({environment:i.environment});if(this.config.clientTEEConnection=yield t.initialize(),this.config.clientTEEConnection==null)throw new Error("Failed to initialize TEE connection");r.info("TEE connection initialized successfully")})}handleAuthRequired(){return h(this,null,function*(){var d;let i=yield this.getTEEConnection();if(this.config.onAuthRequired==null)throw new Error(`${this.type} signer requires the onAuthRequired callback to handle OTP verification. This callback manages the authentication flow (sending OTP and verifying user input). If using our React/React Native SDK, this is handled automatically by the provider. For other environments, implement: onAuthRequired: (needsAuth, sendOtp, verifyOtp, reject) => { /* your UI logic */ }`);r.info("get-status: sending request");let t=Date.now(),e=yield i.sendAction({event:"request:get-status",responseEvent:"response:get-status",data:{authData:{jwt:(d=this.config.crossmint.jwt)!=null?d:"",apiKey:this.config.crossmint.apiKey}},options:l}),n=Date.now()-t;if((e==null?void 0:e.status)!=="success"){let c=(e==null?void 0:e.status)==="error"&&e.error||"Failed to retrieve signer status",p=(e==null?void 0:e.status)==="error"?e.code:void 0;throw r.error("get-status: failed",{status:e==null?void 0:e.status,error:(e==null?void 0:e.status)==="error"?e.error:void 0,code:p,durationMs:n}),new w(c,p)}if(r.info("get-status: response received",{signerStatus:e.signerStatus,durationMs:n}),e.signerStatus==="ready"){this._needsAuth=!1;return}else this._needsAuth=!0;r.info("Auth required, initiating OTP flow",{needsAuth:this._needsAuth});let{promise:s,resolve:o,reject:a}=this.createAuthPromise();if(this._authPromise={promise:s,resolve:o,reject:a},this.config.onAuthRequired)try{yield this.config.onAuthRequired(this.config.type,this.locator(),this._needsAuth,()=>this.sendMessageWithOtp(),c=>this.verifyOtp(c),()=>h(this,null,function*(){r.info("Auth rejected",{authRejected:!0}),this._needsAuth=!1,this.config.onAuthRequired!=null&&(yield this.config.onAuthRequired(this.config.type,this.locator(),this._needsAuth,()=>this.sendMessageWithOtp(),c=>this.verifyOtp(c),()=>{var c;return(c=this._authPromise)==null?void 0:c.reject(new u)})),a(new u)}))}catch(c){r.error("handleAuthRequired error",{error:c}),a(c)}try{yield s}catch(c){throw r.error("handleAuthRequired promise error",{error:c}),c}})}ensureAuthenticated(){return h(this,null,function*(){this.config.resetSignerFrame!=null&&(yield this.config.resetSignerFrame()),yield this.handleAuthRequired()})}getJwtOrThrow(){let i=this.config.crossmint.jwt;if(i==null)throw new Error("JWT is required");return i}createAuthPromise(){let i,t;return{promise:new Promise((n,s)=>{i=n,t=s}),resolve:i,reject:t}}sendMessageWithOtp(){return h(this,null,function*(){var o;let i=yield this.getTEEConnection(),t=this.getAuthId();r.info("start-onboarding: sending request");let e=Date.now(),n=yield i.sendAction({event:"request:start-onboarding",responseEvent:"response:start-onboarding",data:{authData:{jwt:(o=this.config.crossmint.jwt)!=null?o:"",apiKey:this.config.crossmint.apiKey},data:{authId:t}},options:l}),s=Date.now()-e;if(this._onboardingConnectionGeneration=i.connectionGeneration,r.info("start-onboarding: response received",{status:n==null?void 0:n.status,durationMs:s}),(n==null?void 0:n.status)==="success"&&n.signerStatus==="ready"){this._needsAuth=!1;return}if((n==null?void 0:n.status)==="error")throw r.error("start-onboarding: failed",{error:n.error,code:n.code}),new g(n.error||"Failed to initiate OTP process.",n.code)})}getAuthId(){return this.config.type==="email"?`email:${this.config.email}`:`phone:${this.config.phone}`}verifyOtp(i){return h(this,null,function*(){var s,o;let t;try{let a=yield this.getTEEConnection();r.info("complete-onboarding: sending request");let d=Date.now();t=yield a.sendAction({event:"request:complete-onboarding",responseEvent:"response:complete-onboarding",data:{authData:{jwt:(s=this.config.crossmint.jwt)!=null?s:"",apiKey:this.config.crossmint.apiKey},data:{onboardingAuthentication:{encryptedOtp:i}}},options:l}),r.info("complete-onboarding: response received",{status:t==null?void 0:t.status,durationMs:Date.now()-d})}catch(a){return r.error("complete-onboarding: error",{error:a}),yield this.handleOnboardingVerificationFailure(a)}if((t==null?void 0:t.status)==="success"){this._needsAuth=!1,this.config.onAuthRequired!=null&&(yield this.config.onAuthRequired(this.config.type,this.locator(),this._needsAuth,()=>this.sendMessageWithOtp(),a=>this.verifyOtp(a),()=>{var a;return(a=this._authPromise)==null?void 0:a.reject(new u)})),(o=this._authPromise)==null||o.resolve();return}r.error("complete-onboarding: OTP validation failed",{status:t==null?void 0:t.status,error:(t==null?void 0:t.status)==="error"?t.error:void 0,code:(t==null?void 0:t.status)==="error"?t.code:void 0});let e=(t==null?void 0:t.status)==="error"&&t.error||"Failed to validate encrypted OTP",n=(t==null?void 0:t.status)==="error"?t.code:void 0;return yield this.handleOnboardingVerificationFailure(new g(e,n))})}handleOnboardingVerificationFailure(i){return h(this,null,function*(){var n,s,o;this._needsAuth=!0;let t=this.config.clientTEEConnection;if(this._onboardingConnectionGeneration!=null&&t!=null&&t.connectionGeneration!==this._onboardingConnectionGeneration){r.warn("tee.signer.onboarding.reissued",{reason:"signer frame reloaded mid-onboarding, re-issuing OTP",onboardingGeneration:this._onboardingConnectionGeneration,currentGeneration:t==null?void 0:t.connectionGeneration});try{yield this.sendMessageWithOtp()}catch(a){throw(n=this._authPromise)==null||n.reject(a),a}if(!this._needsAuth){(s=this._authPromise)==null||s.resolve();return}throw new y}throw(o=this._authPromise)==null||o.reject(i),i})}_exportPrivateKey(i,t){return h(this,null,function*(){yield this.ensureAuthenticated();let e=this.getJwtOrThrow(),{scheme:n,encoding:s}=this.getChainKeyParams();if(t!=null){let a=i.on("event:key-exported",d=>{i.off(a),d.status==="success"&&Promise.resolve().then(()=>t()).catch(()=>{console.error("[NCS Signer] onExport callback error")})})}let o=yield i.sendAction({event:"request:export-signer",responseEvent:"response:export-signer",data:{authData:{jwt:e,apiKey:this.config.crossmint.apiKey},data:{scheme:n,encoding:s,walletAddress:this.config.address,authId:this.getAuthId()}},options:l});if((o==null?void 0:o.status)==="error")throw r.error("export-signer: failed",{error:o.error,code:o.code}),new v(o.error||"Failed to export private key",o.code)})}};E([A({logger:r,methodName:"handleAuthRequired"})],m.prototype,"handleAuthRequired",1);var l={timeoutMs:3e4};export{m as a,l as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _commonsdkbase = require('@crossmint/common-sdk-base');var o=class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.API_KEY_INVALID,s)}},c= exports.b =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.ENVIRONMENT_INVALID,s)}},i= exports.c =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.WALLET_CREATION_FAILED,s)}},I= exports.d =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.WALLET_TYPE_INVALID,s)}},E= exports.e =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.WALLET_NOT_AVAILABLE,s)}},p= exports.f =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.WALLET_NOT_AVAILABLE,s)}},A= exports.g =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.WALLET_CREATION_FAILED,s)}},x= exports.h =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.WALLET_TYPE_INVALID,s)}},N= exports.i =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.SIGNER_INVALID,s)}},u= exports.j =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.SIGNER_INVALID,s)}},g= exports.k =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.SIGNER_INVALID,s)}},k= exports.l ="DEVICE_SIGNER_NOT_SUPPORTED",_= exports.m =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.SIGNER_INVALID,s)}},T= exports.n =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.SIGNER_INVALID,s)}},d= exports.o =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.ENVIRONMENT_INVALID,s)}},R= exports.p =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.MESSAGE_INVALID,s)}},a= exports.q =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.MESSAGE_INVALID,s)}},l= exports.r =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.SIGNING_FAILED,s)}},L= exports.s =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.SIGNING_FAILED,s)}},D= exports.t =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.SIGNING_FAILED,s)}},O= exports.u =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.NO_SIGNATURE,s)}},S= exports.v =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.NO_SIGNATURE,s)}},W= exports.w =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.SIGNING_FAILED,s)}},C= exports.x =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.SIGNING_FAILED,s)}},G= exports.y =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.NO_TRANSACTION,s)}},V= exports.z =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.NO_TRANSACTION,s)}},J= exports.A =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.NO_TRANSACTION,s)}},w= exports.B =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.TRANSACTION_FAILED,s)}},F= exports.C =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.TRANSACTION_FAILED,s)}},f= exports.D =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.TRANSACTION_FAILED,s)}},h= exports.E =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.TRANSACTION_FAILED,s)}},y= exports.F =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.TRANSACTION_FAILED,s)}},P= exports.G =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.TRANSACTION_FAILED,s)}},m= exports.H =class extends _commonsdkbase.CrossmintSDKError{constructor(r,s){super(r,_commonsdkbase.WalletErrorCode.RECIPIENT_ADDRESS_INVALID,s)}};function Y(t){return typeof t=="object"&&t!=null}function j(t){var s;if(!Y(t)||t.code==null)return;let r=JSON.stringify(t);switch(t.code){case"ERROR_JWT_EXPIRED":throw new (0, _commonsdkbase.JWTExpiredError)(t.expiredAt,r);case"ERROR_JWT_INVALID":throw new (0, _commonsdkbase.JWTInvalidError)(r);case"ERROR_JWT_DECRYPTION":throw new (0, _commonsdkbase.JWTDecryptionError)(r);case"ERROR_JWT_IDENTIFIER_ERROR":throw new (0, _commonsdkbase.JWTIdentifierError)(t.identifierKey,r);case"ERROR_JWT_AUDIENCE_MISMATCH":throw new (0, _commonsdkbase.NotAuthorizedError)((s=t.message)!=null?s:"JWT audience mismatch",r)}}exports.a = o; exports.b = c; exports.c = i; exports.d = I; exports.e = E; exports.f = p; exports.g = A; exports.h = x; exports.i = N; exports.j = u; exports.k = g; exports.l = k; exports.m = _; exports.n = T; exports.o = d; exports.p = R; exports.q = a; exports.r = l; exports.s = L; exports.t = D; exports.u = O; exports.v = S; exports.w = W; exports.x = C; exports.y = G; exports.z = V; exports.A = J; exports.B = w; exports.C = F; exports.D = f; exports.E = h; exports.F = y; exports.G = P; exports.H = m; exports.I = j; exports.J = _commonsdkbase.NotAuthorizedError; exports.K = _commonsdkbase.JWTExpiredError; exports.L = _commonsdkbase.JWTInvalidError; exports.M = _commonsdkbase.JWTDecryptionError; exports.N = _commonsdkbase.JWTIdentifierError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-TJBIBZMF.js";var d={nativeToken:"xlm",walletLocatorPrefix:"me:stellar:smart",supportsSignatures:!1,addSignerChain(n){},extractAddSignerOperation(n,r,t){if(!("transaction"in n)||n.transaction==null)throw e.error("wallet.addSigner.error",{error:"Expected transaction in response for Solana/Stellar chain"}),new Error("Expected transaction in response for Solana/Stellar chain");return{type:"transaction",id:n.transaction.id}},balanceTokenFields(n){return n!=null&&"contractId"in n?{contractId:n.contractId}:n!=null&&"contractAddress"in n?{contractAddress:n.contractAddress}:{}},emptyBalanceTokenFields(){return{contractId:void 0}}};export{d as a};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-YRZHJB2T.cjs');var _chunkYEHBDKR3cjs = require('./chunk-YEHBDKR3.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-YRZHJB2T.cjs');var _chunkYEHBDKR3cjs = require('./chunk-YEHBDKR3.cjs');var _chunkMHKIVDKZcjs = require('./chunk-MHKIVDKZ.cjs');var _chunk65BIFI5Ecjs = require('./chunk-65BIFI5E.cjs');var _chunkUPSASDJPcjs = require('./chunk-UPSASDJP.cjs');var _chunk3N7PKPCHcjs = require('./chunk-3N7PKPCH.cjs');require('./chunk-EAU5Z5O5.cjs');var _chunkIDRQPLGQcjs = require('./chunk-IDRQPLGQ.cjs');require('./chunk-AUDTBFZ4.cjs');require('./chunk-7SGXWFCJ.cjs');require('./chunk-NUIG3XY3.cjs');require('./chunk-CUHDOBKN.cjs');var _chunkGMU3ZYLScjs = require('./chunk-GMU3ZYLS.cjs');require('./chunk-677M3EWV.cjs');require('./chunk-I3H3U7XW.cjs');var _chunkHE4BTHTYcjs = require('./chunk-HE4BTHTY.cjs');require('./chunk-GSNFNRH2.cjs');var _chunk3VYGTPRFcjs = require('./chunk-3VYGTPRF.cjs');require('./chunk-OV256XVK.cjs');require('./chunk-IW4FVUP5.cjs');require('./chunk-GUFTPTSI.cjs');require('./chunk-EBQT52SL.cjs');require('./chunk-JEJYT3WD.cjs');require('./chunk-MIPKK2GZ.cjs');require('./chunk-UWX7ID4X.cjs');require('./chunk-B5U3A75U.cjs');require('./chunk-W6L7J3KL.cjs');require('./chunk-7SOKSLRQ.cjs');require('./chunk-UP5EGWNN.cjs');require('./chunk-Q3LD5CYJ.cjs');require('./chunk-5IC7UWND.cjs');require('./chunk-KULR5B4O.cjs');require('./chunk-IGRPHTXZ.cjs');require('./chunk-Q66YRLSW.cjs');require('./chunk-VMDJJX7P.cjs');require('./chunk-HJH2S644.cjs');require('./chunk-AK3REMFI.cjs');require('./chunk-PO6S7UR3.cjs');require('./chunk-VCX2M3JY.cjs');require('./chunk-P7KLEZYV.cjs');require('./chunk-PEY3R7XG.cjs');require('./chunk-PMQQEVKL.cjs');require('./chunk-ATIC4ENG.cjs');require('./chunk-2YZQ4YYU.cjs');require('./chunk-5FH7WFWL.cjs');require('./chunk-FQZXBS7L.cjs');require('./chunk-5FVDLMWW.cjs');var _chunkQPCZFIUVcjs = require('./chunk-QPCZFIUV.cjs');require('./chunk-LWA3SX6Z.cjs');require('./chunk-XWQC6G7N.cjs');require('./chunk-R4SBFRTM.cjs');require('./chunk-HYWIWJ6H.cjs');require('./chunk-SCEPJO4Q.cjs');require('./chunk-LMHH6ODX.cjs');require('./chunk-CDHMNLZ6.cjs');require('./chunk-6HXIZLEQ.cjs');var _chunk6GZQZEGQcjs = require('./chunk-6GZQZEGQ.cjs');require('./chunk-ECAM5KTH.cjs');require('./chunk-W6APCBJW.cjs');require('./chunk-UF5HZQUO.cjs');require('./chunk-SNBCG5HR.cjs');require('./chunk-P4EW7S5I.cjs');require('./chunk-JNKTRQPS.cjs');require('./chunk-ENU3EKBG.cjs');require('./chunk-WTJC5QBH.cjs');require('./chunk-5X4EOJFG.cjs');require('./chunk-HRUMWG2F.cjs');require('./chunk-IR5WN6FQ.cjs');require('./chunk-GEY574TH.cjs');require('./chunk-UE3WVHTM.cjs');var _chunkXZ4NKVEBcjs = require('./chunk-XZ4NKVEB.cjs');require('./chunk-CCIGWTAO.cjs');require('./chunk-7O3W4JAP.cjs');require('./chunk-6ZAGINES.cjs');require('./chunk-DSIFRRBS.cjs');exports.AuthRejectedError = _chunkQPCZFIUVcjs.a; exports.CrossmintWallets = _chunk3N7PKPCHcjs.b; exports.DeviceSignerKeyStorage = _chunk3VYGTPRFcjs.a; exports.EVMWallet = _chunkMHKIVDKZcjs.a; exports.IframeDeviceSignerKeyStorage = _chunkHE4BTHTYcjs.a; exports.InvalidTransferAmountError = _chunkXZ4NKVEBcjs.y; exports.JWTDecryptionError = _chunkXZ4NKVEBcjs.M; exports.JWTExpiredError = _chunkXZ4NKVEBcjs.K; exports.JWTIdentifierError = _chunkXZ4NKVEBcjs.N; exports.JWTInvalidError = _chunkXZ4NKVEBcjs.L; exports.KeyExportError = _chunkQPCZFIUVcjs.d; exports.NotAuthorizedError = _chunkXZ4NKVEBcjs.J; exports.OnboardingSessionExpiredError = _chunkQPCZFIUVcjs.e; exports.OtpValidationError = _chunkQPCZFIUVcjs.b; exports.QuorumSignerNotSupportedError = _chunkXZ4NKVEBcjs.n; exports.SignerStatusError = _chunkQPCZFIUVcjs.c; exports.SolanaWallet = _chunk65BIFI5Ecjs.a; exports.StellarWallet = _chunkUPSASDJPcjs.a; exports.UnsupportedBrowserError = _chunkXZ4NKVEBcjs.o; exports.Wallet = _chunkIDRQPLGQcjs.a; exports.WalletNotAvailableError = _chunkXZ4NKVEBcjs.e; exports.WalletsApiClient = _chunk6GZQZEGQcjs.a; exports.createCrossmint = _chunk3N7PKPCHcjs.a; exports.createDeviceSigner = _chunkGMU3ZYLScjs.a; exports.createServerSigner = _chunkYEHBDKR3cjs.a; exports.isExportableSignerAdapter = _chunkQPCZFIUVcjs.g;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CrossmintWallets } from './sdk.cjs';
|
|
2
|
-
export { InvalidTransferAmountError, UnsupportedBrowserError, WalletNotAvailableError } from './utils/errors.cjs';
|
|
2
|
+
export { InvalidTransferAmountError, QuorumSignerNotSupportedError, UnsupportedBrowserError, WalletNotAvailableError } from './utils/errors.cjs';
|
|
3
3
|
export { ApiClient as WalletsApiClient } from './api/client.cjs';
|
|
4
|
-
export { A as AddSignerOptions, a as ApiKeySignerLocator, b as ApproveOptions, c as ApproveParams, d as AuthRejectedError, B as Balances, C as Callbacks, e as ClientSideWalletArgsFor, f as ClientSideWalletCreateArgs, D as DeviceSignerConfig, g as DeviceSignerLocator, E as EVMTransactionInput, h as EmailSignerConfig, i as EmailSignerLocator, j as ExportSignerTEEConnection, k as ExportableSignerAdapter, l as ExternalWalletRegistrationConfig, m as ExternalWalletSignerConfigForChain, n as ExternalWalletSignerLocator, K as KeyExportError, O as OnboardingSessionExpiredError, o as OtpValidationError, P as PasskeySignerLocator, p as PhoneSignerConfig, q as PhoneSignerLocator, R as RegisterSignerPasskeyParams, r as RemoveSignerOptions, S as Scope, s as ServerSignerConfig, t as Signature, u as Signer, v as SignerAdapter, w as SignerConfigForChain, x as SignerLocator, y as SignerStatus, z as SignerStatusError, F as SolanaTransactionInput, T as Transaction, G as TransferScope, H as Transfers, W as WalletArgsFor, I as WalletCreateArgs, J as WalletOptions, L as WalletPlugin, M as isExportableSignerAdapter } from './types-
|
|
4
|
+
export { A as AddSignerOptions, a as ApiKeySignerLocator, b as ApproveOptions, c as ApproveParams, d as AuthRejectedError, B as Balances, C as Callbacks, e as ClientSideWalletArgsFor, f as ClientSideWalletCreateArgs, D as DeviceSignerConfig, g as DeviceSignerLocator, E as EVMTransactionInput, h as EmailSignerConfig, i as EmailSignerLocator, j as ExportSignerTEEConnection, k as ExportableSignerAdapter, l as ExternalWalletRegistrationConfig, m as ExternalWalletSignerConfigForChain, n as ExternalWalletSignerLocator, K as KeyExportError, O as OnboardingSessionExpiredError, o as OtpValidationError, P as PasskeySignerLocator, p as PhoneSignerConfig, q as PhoneSignerLocator, R as RegisterSignerPasskeyParams, r as RemoveSignerOptions, S as Scope, s as ServerSignerConfig, t as Signature, u as Signer, v as SignerAdapter, w as SignerConfigForChain, x as SignerLocator, y as SignerStatus, z as SignerStatusError, F as SolanaTransactionInput, T as Transaction, G as TransferScope, H as Transfers, W as WalletArgsFor, I as WalletCreateArgs, J as WalletOptions, L as WalletPlugin, M as isExportableSignerAdapter } from './types-4EOfiBxs.cjs';
|
|
5
5
|
export { Wallet } from './wallets/wallet.cjs';
|
|
6
6
|
export { SolanaWallet } from './wallets/solana.cjs';
|
|
7
7
|
export { EVMWallet } from './wallets/evm.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CrossmintWallets } from './sdk.js';
|
|
2
|
-
export { InvalidTransferAmountError, UnsupportedBrowserError, WalletNotAvailableError } from './utils/errors.js';
|
|
2
|
+
export { InvalidTransferAmountError, QuorumSignerNotSupportedError, UnsupportedBrowserError, WalletNotAvailableError } from './utils/errors.js';
|
|
3
3
|
export { ApiClient as WalletsApiClient } from './api/client.js';
|
|
4
|
-
export { A as AddSignerOptions, a as ApiKeySignerLocator, b as ApproveOptions, c as ApproveParams, d as AuthRejectedError, B as Balances, C as Callbacks, e as ClientSideWalletArgsFor, f as ClientSideWalletCreateArgs, D as DeviceSignerConfig, g as DeviceSignerLocator, E as EVMTransactionInput, h as EmailSignerConfig, i as EmailSignerLocator, j as ExportSignerTEEConnection, k as ExportableSignerAdapter, l as ExternalWalletRegistrationConfig, m as ExternalWalletSignerConfigForChain, n as ExternalWalletSignerLocator, K as KeyExportError, O as OnboardingSessionExpiredError, o as OtpValidationError, P as PasskeySignerLocator, p as PhoneSignerConfig, q as PhoneSignerLocator, R as RegisterSignerPasskeyParams, r as RemoveSignerOptions, S as Scope, s as ServerSignerConfig, t as Signature, u as Signer, v as SignerAdapter, w as SignerConfigForChain, x as SignerLocator, y as SignerStatus, z as SignerStatusError, F as SolanaTransactionInput, T as Transaction, G as TransferScope, H as Transfers, W as WalletArgsFor, I as WalletCreateArgs, J as WalletOptions, L as WalletPlugin, M as isExportableSignerAdapter } from './types-
|
|
4
|
+
export { A as AddSignerOptions, a as ApiKeySignerLocator, b as ApproveOptions, c as ApproveParams, d as AuthRejectedError, B as Balances, C as Callbacks, e as ClientSideWalletArgsFor, f as ClientSideWalletCreateArgs, D as DeviceSignerConfig, g as DeviceSignerLocator, E as EVMTransactionInput, h as EmailSignerConfig, i as EmailSignerLocator, j as ExportSignerTEEConnection, k as ExportableSignerAdapter, l as ExternalWalletRegistrationConfig, m as ExternalWalletSignerConfigForChain, n as ExternalWalletSignerLocator, K as KeyExportError, O as OnboardingSessionExpiredError, o as OtpValidationError, P as PasskeySignerLocator, p as PhoneSignerConfig, q as PhoneSignerLocator, R as RegisterSignerPasskeyParams, r as RemoveSignerOptions, S as Scope, s as ServerSignerConfig, t as Signature, u as Signer, v as SignerAdapter, w as SignerConfigForChain, x as SignerLocator, y as SignerStatus, z as SignerStatusError, F as SolanaTransactionInput, T as Transaction, G as TransferScope, H as Transfers, W as WalletArgsFor, I as WalletCreateArgs, J as WalletOptions, L as WalletPlugin, M as isExportableSignerAdapter } from './types-DfpYAsst.js';
|
|
5
5
|
export { Wallet } from './wallets/wallet.js';
|
|
6
6
|
export { SolanaWallet } from './wallets/solana.js';
|
|
7
7
|
export { EVMWallet } from './wallets/evm.js';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-DTGCFFNW.js";import{a as
|
|
1
|
+
import"./chunk-DTGCFFNW.js";import{a as T}from"./chunk-WTIV4TTS.js";import{a as u}from"./chunk-C2LCF6GA.js";import{a as A}from"./chunk-N7SKSCSW.js";import{a as h}from"./chunk-KZ7LB6ZV.js";import{a as v,b as y}from"./chunk-KVGWACFA.js";import"./chunk-VPJBVKHY.js";import{a as d}from"./chunk-3TZJ6D4G.js";import"./chunk-KSN4TWLX.js";import"./chunk-6IV3GB5W.js";import"./chunk-F3CW7X6C.js";import"./chunk-TOAFCAVT.js";import{a as W}from"./chunk-5LNDUSMZ.js";import"./chunk-HIHX5FRO.js";import"./chunk-OMTJMVSG.js";import{a as C}from"./chunk-WO4ZWJT6.js";import"./chunk-NZXYWQE5.js";import{a as x}from"./chunk-IOSADDL5.js";import"./chunk-3A424HCV.js";import"./chunk-OEMMPPUX.js";import"./chunk-5HMRFOCH.js";import"./chunk-OE6CWWFM.js";import"./chunk-7BW7B47N.js";import"./chunk-VTTD4HPY.js";import"./chunk-TM45QNB3.js";import"./chunk-VFJ7NZBI.js";import"./chunk-VCOKK7C2.js";import"./chunk-STRSYJNY.js";import"./chunk-ARQVCU6M.js";import"./chunk-SGP5B33N.js";import"./chunk-L52GDMSH.js";import"./chunk-SEOBV6KR.js";import"./chunk-QM3BB4E2.js";import"./chunk-TSJUK3ED.js";import"./chunk-277G6KNG.js";import"./chunk-IQ3QQ4M6.js";import"./chunk-GA7EPR4Z.js";import"./chunk-YDZRBHS3.js";import"./chunk-F3NUWFQW.js";import"./chunk-3CEGPUJH.js";import"./chunk-6U5MZQQP.js";import"./chunk-XEWCMK3Z.js";import"./chunk-IHMMTMFG.js";import"./chunk-E3H6RZHM.js";import"./chunk-EM3D5Q3A.js";import"./chunk-3QKB6K3J.js";import"./chunk-K7BPGUFU.js";import{a as p,b as s,c as E,d as f,e as c,g as m}from"./chunk-DCKFFFPG.js";import"./chunk-FJPAMX7L.js";import"./chunk-MN2BGRRJ.js";import"./chunk-FQ5F3VYJ.js";import"./chunk-HAQMNZO5.js";import"./chunk-2YLRFJ66.js";import"./chunk-TMOWGJ5Z.js";import"./chunk-MLROTECD.js";import"./chunk-5IFDVB4Y.js";import{a as S}from"./chunk-RFWY44CJ.js";import"./chunk-KBJA7JDT.js";import"./chunk-EGX2IXWU.js";import"./chunk-EFBUJ2BS.js";import"./chunk-TY33CSCI.js";import"./chunk-ZUBX7T2L.js";import"./chunk-B4GYB3XY.js";import"./chunk-OQZTL6ZG.js";import"./chunk-URQQBUUX.js";import"./chunk-FT5EVMLB.js";import"./chunk-SVIKBM3S.js";import"./chunk-KKQBZXFE.js";import"./chunk-S3DYQVRD.js";import"./chunk-KUP7H7X2.js";import{J as n,K as i,L as a,M as l,N as g,e as r,n as e,o as t,y as o}from"./chunk-7FEY62ID.js";import"./chunk-455NK5LB.js";import"./chunk-TJBIBZMF.js";import"./chunk-NUBGDLR2.js";import"./chunk-NU7VF7MC.js";export{p as AuthRejectedError,y as CrossmintWallets,x as DeviceSignerKeyStorage,u as EVMWallet,C as IframeDeviceSignerKeyStorage,o as InvalidTransferAmountError,l as JWTDecryptionError,i as JWTExpiredError,g as JWTIdentifierError,a as JWTInvalidError,f as KeyExportError,n as NotAuthorizedError,c as OnboardingSessionExpiredError,s as OtpValidationError,e as QuorumSignerNotSupportedError,E as SignerStatusError,A as SolanaWallet,h as StellarWallet,t as UnsupportedBrowserError,d as Wallet,r as WalletNotAvailableError,S as WalletsApiClient,v as createCrossmint,W as createDeviceSigner,T as createServerSigner,m as isExportableSignerAdapter};
|
package/dist/logger/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-CCIGWTAO.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-CCIGWTAO.cjs');var _chunk7O3W4JAPcjs = require('../chunk-7O3W4JAP.cjs');require('../chunk-6ZAGINES.cjs');require('../chunk-DSIFRRBS.cjs');exports.initWalletsLogger = _chunk7O3W4JAPcjs.b; exports.walletsLogger = _chunk7O3W4JAPcjs.a;
|
package/dist/logger/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-455NK5LB.js";import{a,b}from"../chunk-
|
|
1
|
+
import"../chunk-455NK5LB.js";import{a,b}from"../chunk-TJBIBZMF.js";import"../chunk-NUBGDLR2.js";import"../chunk-NU7VF7MC.js";export{b as initWalletsLogger,a as walletsLogger};
|
package/dist/logger/init.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7O3W4JAPcjs = require('../chunk-7O3W4JAP.cjs');require('../chunk-6ZAGINES.cjs');require('../chunk-DSIFRRBS.cjs');exports.initWalletsLogger = _chunk7O3W4JAPcjs.b; exports.walletsLogger = _chunk7O3W4JAPcjs.a;
|
package/dist/logger/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-TJBIBZMF.js";import"../chunk-NUBGDLR2.js";import"../chunk-NU7VF7MC.js";export{b as initWalletsLogger,a as walletsLogger};
|
package/dist/sdk.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3N7PKPCHcjs = require('./chunk-3N7PKPCH.cjs');require('./chunk-EAU5Z5O5.cjs');require('./chunk-IDRQPLGQ.cjs');require('./chunk-AUDTBFZ4.cjs');require('./chunk-7SGXWFCJ.cjs');require('./chunk-NUIG3XY3.cjs');require('./chunk-CUHDOBKN.cjs');require('./chunk-GMU3ZYLS.cjs');require('./chunk-677M3EWV.cjs');require('./chunk-I3H3U7XW.cjs');require('./chunk-HE4BTHTY.cjs');require('./chunk-GSNFNRH2.cjs');require('./chunk-3VYGTPRF.cjs');require('./chunk-OV256XVK.cjs');require('./chunk-IW4FVUP5.cjs');require('./chunk-GUFTPTSI.cjs');require('./chunk-EBQT52SL.cjs');require('./chunk-JEJYT3WD.cjs');require('./chunk-MIPKK2GZ.cjs');require('./chunk-UWX7ID4X.cjs');require('./chunk-B5U3A75U.cjs');require('./chunk-W6L7J3KL.cjs');require('./chunk-7SOKSLRQ.cjs');require('./chunk-UP5EGWNN.cjs');require('./chunk-Q3LD5CYJ.cjs');require('./chunk-5IC7UWND.cjs');require('./chunk-KULR5B4O.cjs');require('./chunk-IGRPHTXZ.cjs');require('./chunk-Q66YRLSW.cjs');require('./chunk-VMDJJX7P.cjs');require('./chunk-HJH2S644.cjs');require('./chunk-AK3REMFI.cjs');require('./chunk-PO6S7UR3.cjs');require('./chunk-VCX2M3JY.cjs');require('./chunk-P7KLEZYV.cjs');require('./chunk-PEY3R7XG.cjs');require('./chunk-PMQQEVKL.cjs');require('./chunk-ATIC4ENG.cjs');require('./chunk-2YZQ4YYU.cjs');require('./chunk-5FH7WFWL.cjs');require('./chunk-FQZXBS7L.cjs');require('./chunk-5FVDLMWW.cjs');require('./chunk-QPCZFIUV.cjs');require('./chunk-LWA3SX6Z.cjs');require('./chunk-XWQC6G7N.cjs');require('./chunk-R4SBFRTM.cjs');require('./chunk-HYWIWJ6H.cjs');require('./chunk-SCEPJO4Q.cjs');require('./chunk-LMHH6ODX.cjs');require('./chunk-CDHMNLZ6.cjs');require('./chunk-6HXIZLEQ.cjs');require('./chunk-6GZQZEGQ.cjs');require('./chunk-ECAM5KTH.cjs');require('./chunk-W6APCBJW.cjs');require('./chunk-UF5HZQUO.cjs');require('./chunk-SNBCG5HR.cjs');require('./chunk-P4EW7S5I.cjs');require('./chunk-JNKTRQPS.cjs');require('./chunk-ENU3EKBG.cjs');require('./chunk-WTJC5QBH.cjs');require('./chunk-5X4EOJFG.cjs');require('./chunk-HRUMWG2F.cjs');require('./chunk-IR5WN6FQ.cjs');require('./chunk-GEY574TH.cjs');require('./chunk-UE3WVHTM.cjs');require('./chunk-XZ4NKVEB.cjs');require('./chunk-CCIGWTAO.cjs');require('./chunk-7O3W4JAP.cjs');require('./chunk-6ZAGINES.cjs');require('./chunk-DSIFRRBS.cjs');exports.CrossmintWallets = _chunk3N7PKPCHcjs.b; exports.createCrossmint = _chunk3N7PKPCHcjs.a;
|
package/dist/sdk.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
2
2
|
export { Crossmint, createCrossmint } from '@crossmint/common-sdk-base';
|
|
3
|
-
import { W as WalletArgsFor, I as WalletCreateArgs, D as DeviceSignerConfig, R as RegisterSignerPasskeyParams } from './types-
|
|
3
|
+
import { W as WalletArgsFor, I as WalletCreateArgs, D as DeviceSignerConfig, R as RegisterSignerPasskeyParams } from './types-4EOfiBxs.cjs';
|
|
4
4
|
import { Chain } from './chains/chains.cjs';
|
|
5
5
|
import { Wallet } from './wallets/wallet.cjs';
|
|
6
6
|
import { DeviceSignerKeyStorage } from './utils/device-signers/DeviceSignerKeyStorage.cjs';
|
package/dist/sdk.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
2
2
|
export { Crossmint, createCrossmint } from '@crossmint/common-sdk-base';
|
|
3
|
-
import { W as WalletArgsFor, I as WalletCreateArgs, D as DeviceSignerConfig, R as RegisterSignerPasskeyParams } from './types-
|
|
3
|
+
import { W as WalletArgsFor, I as WalletCreateArgs, D as DeviceSignerConfig, R as RegisterSignerPasskeyParams } from './types-DfpYAsst.js';
|
|
4
4
|
import { Chain } from './chains/chains.js';
|
|
5
5
|
import { Wallet } from './wallets/wallet.js';
|
|
6
6
|
import { DeviceSignerKeyStorage } from './utils/device-signers/DeviceSignerKeyStorage.js';
|
package/dist/sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-KVGWACFA.js";import"./chunk-VPJBVKHY.js";import"./chunk-3TZJ6D4G.js";import"./chunk-KSN4TWLX.js";import"./chunk-6IV3GB5W.js";import"./chunk-F3CW7X6C.js";import"./chunk-TOAFCAVT.js";import"./chunk-5LNDUSMZ.js";import"./chunk-HIHX5FRO.js";import"./chunk-OMTJMVSG.js";import"./chunk-WO4ZWJT6.js";import"./chunk-NZXYWQE5.js";import"./chunk-IOSADDL5.js";import"./chunk-3A424HCV.js";import"./chunk-OEMMPPUX.js";import"./chunk-5HMRFOCH.js";import"./chunk-OE6CWWFM.js";import"./chunk-7BW7B47N.js";import"./chunk-VTTD4HPY.js";import"./chunk-TM45QNB3.js";import"./chunk-VFJ7NZBI.js";import"./chunk-VCOKK7C2.js";import"./chunk-STRSYJNY.js";import"./chunk-ARQVCU6M.js";import"./chunk-SGP5B33N.js";import"./chunk-L52GDMSH.js";import"./chunk-SEOBV6KR.js";import"./chunk-QM3BB4E2.js";import"./chunk-TSJUK3ED.js";import"./chunk-277G6KNG.js";import"./chunk-IQ3QQ4M6.js";import"./chunk-GA7EPR4Z.js";import"./chunk-YDZRBHS3.js";import"./chunk-F3NUWFQW.js";import"./chunk-3CEGPUJH.js";import"./chunk-6U5MZQQP.js";import"./chunk-XEWCMK3Z.js";import"./chunk-IHMMTMFG.js";import"./chunk-E3H6RZHM.js";import"./chunk-EM3D5Q3A.js";import"./chunk-3QKB6K3J.js";import"./chunk-K7BPGUFU.js";import"./chunk-DCKFFFPG.js";import"./chunk-FJPAMX7L.js";import"./chunk-MN2BGRRJ.js";import"./chunk-FQ5F3VYJ.js";import"./chunk-HAQMNZO5.js";import"./chunk-2YLRFJ66.js";import"./chunk-TMOWGJ5Z.js";import"./chunk-MLROTECD.js";import"./chunk-5IFDVB4Y.js";import"./chunk-RFWY44CJ.js";import"./chunk-KBJA7JDT.js";import"./chunk-EGX2IXWU.js";import"./chunk-EFBUJ2BS.js";import"./chunk-TY33CSCI.js";import"./chunk-ZUBX7T2L.js";import"./chunk-B4GYB3XY.js";import"./chunk-OQZTL6ZG.js";import"./chunk-URQQBUUX.js";import"./chunk-FT5EVMLB.js";import"./chunk-SVIKBM3S.js";import"./chunk-KKQBZXFE.js";import"./chunk-S3DYQVRD.js";import"./chunk-KUP7H7X2.js";import"./chunk-7FEY62ID.js";import"./chunk-455NK5LB.js";import"./chunk-TJBIBZMF.js";import"./chunk-NUBGDLR2.js";import"./chunk-NU7VF7MC.js";export{b as CrossmintWallets,a as createCrossmint};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGUFTPTSIcjs = require('../../chunk-GUFTPTSI.cjs');require('../../chunk-W6L7J3KL.cjs');require('../../chunk-7SOKSLRQ.cjs');require('../../chunk-XZ4NKVEB.cjs');require('../../chunk-DSIFRRBS.cjs');exports.apiKeySignerDescriptor = _chunkGUFTPTSIcjs.a;
|
|
@@ -2,7 +2,7 @@ import { SignerDescriptor } from './types.cjs';
|
|
|
2
2
|
import '@crossmint/client-sdk-window';
|
|
3
3
|
import '@crossmint/client-signers';
|
|
4
4
|
import '@crossmint/common-sdk-base';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-4EOfiBxs.cjs';
|
|
6
6
|
import 'viem';
|
|
7
7
|
import '../../api/gen/types.gen.cjs';
|
|
8
8
|
import 'ox';
|