@crossmint/wallets-sdk 1.10.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-PWOSYRP7.js → chunk-3CEGPUJH.js} +1 -1
- package/dist/{chunk-MBFZQQQY.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-72ATJ6TI.cjs → chunk-65BIFI5E.cjs} +1 -1
- package/dist/{chunk-X6FEF7IR.cjs → chunk-677M3EWV.cjs} +1 -1
- package/dist/{chunk-XNH3I436.cjs → chunk-6GZQZEGQ.cjs} +1 -1
- package/dist/{chunk-THDXNOZG.js → chunk-6IV3GB5W.js} +1 -1
- package/dist/{chunk-Z3YQFRAQ.js → chunk-6U5MZQQP.js} +1 -1
- package/dist/{chunk-5GYNNLVW.cjs → chunk-6ZAGINES.cjs} +1 -1
- package/dist/{chunk-7HVCPMZA.js → chunk-7BW7B47N.js} +1 -1
- package/dist/chunk-7FEY62ID.js +1 -0
- package/dist/{chunk-QFZSILOI.cjs → chunk-7O3W4JAP.cjs} +1 -1
- package/dist/{chunk-UZN6B2NV.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-DI6RHRZL.js → chunk-C2LCF6GA.js} +1 -1
- package/dist/{chunk-Z7NKKPX3.cjs → chunk-EAU5Z5O5.cjs} +1 -1
- package/dist/{chunk-BGQZNCXO.cjs → chunk-EBQT52SL.cjs} +1 -1
- package/dist/{chunk-KRODF7KK.js → chunk-EFBUJ2BS.js} +1 -1
- package/dist/{chunk-5RW5KBQT.js → chunk-EGX2IXWU.js} +1 -1
- package/dist/{chunk-S5VWQSTF.js → chunk-F3CW7X6C.js} +1 -1
- package/dist/{chunk-YFYV2J4S.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-Q542QHF4.cjs → chunk-HE4BTHTY.cjs} +1 -1
- package/dist/{chunk-QQYB76KH.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-FQ72MI5X.js → chunk-KVGWACFA.js} +1 -1
- package/dist/{chunk-YAWVSDCB.js → chunk-KZ7LB6ZV.js} +1 -1
- package/dist/{chunk-TMSRJGFL.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-TODN3BHC.js → chunk-N7SKSCSW.js} +1 -1
- package/dist/chunk-NUBGDLR2.js +1 -0
- package/dist/{chunk-5ARUTNXL.cjs → chunk-NUIG3XY3.cjs} +1 -1
- package/dist/{chunk-VWYK4DKI.js → chunk-OE6CWWFM.js} +1 -1
- package/dist/chunk-OV256XVK.cjs +1 -0
- package/dist/{chunk-VGDORB2L.cjs → chunk-P4EW7S5I.cjs} +1 -1
- package/dist/{chunk-ILD5AY26.cjs → chunk-P7KLEZYV.cjs} +1 -1
- package/dist/{chunk-LTTMLPVE.cjs → chunk-PEY3R7XG.cjs} +1 -1
- package/dist/{chunk-3V7BHEQD.cjs → chunk-PMQQEVKL.cjs} +1 -1
- package/dist/{chunk-GPV7CQRP.cjs → chunk-Q3LD5CYJ.cjs} +1 -1
- package/dist/chunk-QV4LLMZM.js +1 -0
- package/dist/{chunk-HIQJJVCM.js → chunk-RFWY44CJ.js} +1 -1
- package/dist/{chunk-D5MVJQXK.js → chunk-SGP5B33N.js} +1 -1
- package/dist/{chunk-UWQ6UZGE.cjs → chunk-SNBCG5HR.cjs} +1 -1
- package/dist/{chunk-EZ6E5QGL.js → chunk-STRSYJNY.js} +1 -1
- package/dist/{chunk-SI3GYRHH.js → chunk-TJBIBZMF.js} +1 -1
- package/dist/{chunk-MMIBGH44.js → chunk-TY33CSCI.js} +1 -1
- package/dist/{chunk-KICS3RGF.cjs → chunk-UF5HZQUO.cjs} +1 -1
- package/dist/{chunk-EOXMCIRY.cjs → chunk-UP5EGWNN.cjs} +1 -1
- package/dist/{chunk-T2DDN34X.cjs → chunk-UPSASDJP.cjs} +1 -1
- package/dist/{chunk-KRBTB7ZD.js → chunk-URQQBUUX.js} +1 -1
- package/dist/{chunk-PJKTUGX2.js → chunk-VCOKK7C2.js} +1 -1
- package/dist/{chunk-F44BTXOF.cjs → chunk-VCX2M3JY.cjs} +1 -1
- package/dist/{chunk-NBM25TBK.js → chunk-VFJ7NZBI.js} +1 -1
- package/dist/{chunk-W7V3VEMM.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-375QJHH2.js → chunk-WO4ZWJT6.js} +1 -1
- package/dist/{chunk-WKHVIEB2.cjs → chunk-WTJC5QBH.cjs} +1 -1
- package/dist/{chunk-DPU7ZDOR.js → chunk-XEWCMK3Z.js} +1 -1
- package/dist/chunk-XZ4NKVEB.cjs +1 -0
- package/dist/{chunk-IX4WR4RQ.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 +1 -1
- package/dist/signers/index.d.ts +1 -1
- 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 +2 -1
- package/dist/wallets/services/device-recovery-service.d.ts +2 -1
- 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 +2 -2
- package/dist/chunk-3MF3O7DM.js +0 -1
- package/dist/chunk-3VKLU6RH.cjs +0 -1
- package/dist/chunk-6HB4WO5J.js +0 -1
- package/dist/chunk-HOK6IZYG.cjs +0 -1
- package/dist/chunk-IP6YYDHR.cjs +0 -1
- package/dist/chunk-LHAOCUXT.cjs +0 -1
- package/dist/chunk-MSG2HGUJ.js +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-TZR7N7VZ.js +0 -1
- package/dist/chunk-UUMP3VCM.js +0 -1
- package/dist/chunk-WFWX6G26.cjs +0 -1
package/dist/api/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');var _chunk6GZQZEGQcjs = require('../chunk-6GZQZEGQ.cjs');require('../chunk-ECAM5KTH.cjs');require('../chunk-XZ4NKVEB.cjs');require('../chunk-7O3W4JAP.cjs');require('../chunk-6ZAGINES.cjs');require('../chunk-DSIFRRBS.cjs');exports.ApiClient = _chunk6GZQZEGQcjs.a;
|
package/dist/api/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ApiClient } from './client.cjs';
|
|
2
|
-
export { aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aO as CreateTransactionSuccessResponse, at as CreateWalletParams, as as CreateWalletResponse, aK as FundWalletParams, aa as FundWalletResponse, aJ as GetBalanceResponse, ay as GetBalanceSuccessResponse, aH as GetSignatureResponse, aj as GetSignerResponse, aP as GetSignersResponse, aq as GetTransactionResponse, ac as GetTransactionSuccessResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, az as GetWalletResponse, aQ as GetWalletSuccessResponse, aR as RecoverySignerConfig, an as RegisterSignerChain, al as RegisterSignerParams, R as RegisterSignerPasskeyParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, S as Scope, aN as SendParams, ar as SendResponse, a0 as Signer, G as TransferScope, H as Transfers, ah as WalletLocator } from '../types-
|
|
2
|
+
export { aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aO as CreateTransactionSuccessResponse, at as CreateWalletParams, as as CreateWalletResponse, aK as FundWalletParams, aa as FundWalletResponse, aJ as GetBalanceResponse, ay as GetBalanceSuccessResponse, aH as GetSignatureResponse, aj as GetSignerResponse, aP as GetSignersResponse, aq as GetTransactionResponse, ac as GetTransactionSuccessResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, az as GetWalletResponse, aQ as GetWalletSuccessResponse, aR as RecoverySignerConfig, an as RegisterSignerChain, al as RegisterSignerParams, R as RegisterSignerPasskeyParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, S as Scope, aN as SendParams, ar as SendResponse, a0 as Signer, G as TransferScope, H as Transfers, ah as WalletLocator } from '../types-4EOfiBxs.cjs';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import '../chains/chains.cjs';
|
|
5
5
|
import 'viem';
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ApiClient } from './client.js';
|
|
2
|
-
export { aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aO as CreateTransactionSuccessResponse, at as CreateWalletParams, as as CreateWalletResponse, aK as FundWalletParams, aa as FundWalletResponse, aJ as GetBalanceResponse, ay as GetBalanceSuccessResponse, aH as GetSignatureResponse, aj as GetSignerResponse, aP as GetSignersResponse, aq as GetTransactionResponse, ac as GetTransactionSuccessResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, az as GetWalletResponse, aQ as GetWalletSuccessResponse, aR as RecoverySignerConfig, an as RegisterSignerChain, al as RegisterSignerParams, R as RegisterSignerPasskeyParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, S as Scope, aN as SendParams, ar as SendResponse, a0 as Signer, G as TransferScope, H as Transfers, ah as WalletLocator } from '../types-
|
|
2
|
+
export { aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aO as CreateTransactionSuccessResponse, at as CreateWalletParams, as as CreateWalletResponse, aK as FundWalletParams, aa as FundWalletResponse, aJ as GetBalanceResponse, ay as GetBalanceSuccessResponse, aH as GetSignatureResponse, aj as GetSignerResponse, aP as GetSignersResponse, aq as GetTransactionResponse, ac as GetTransactionSuccessResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, az as GetWalletResponse, aQ as GetWalletSuccessResponse, aR as RecoverySignerConfig, an as RegisterSignerChain, al as RegisterSignerParams, R as RegisterSignerPasskeyParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, S as Scope, aN as SendParams, ar as SendResponse, a0 as Signer, G as TransferScope, H as Transfers, ah as WalletLocator } from '../types-DfpYAsst.js';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import '../chains/chains.js';
|
|
5
5
|
import 'viem';
|
package/dist/api/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-5IFDVB4Y.js";import{a}from"../chunk-
|
|
1
|
+
import"../chunk-5IFDVB4Y.js";import{a}from"../chunk-RFWY44CJ.js";import"../chunk-KBJA7JDT.js";import"../chunk-7FEY62ID.js";import"../chunk-TJBIBZMF.js";import"../chunk-NUBGDLR2.js";import"../chunk-NU7VF7MC.js";export{a as ApiClient};
|
package/dist/api/types.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'viem';
|
|
2
2
|
import './gen/types.gen.cjs';
|
|
3
|
-
export { aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aO as CreateTransactionSuccessResponse, at as CreateWalletParams, as as CreateWalletResponse, aK as FundWalletParams, aa as FundWalletResponse, aJ as GetBalanceResponse, ay as GetBalanceSuccessResponse, aH as GetSignatureResponse, aj as GetSignerResponse, aP as GetSignersResponse, aq as GetTransactionResponse, ac as GetTransactionSuccessResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, az as GetWalletResponse, aQ as GetWalletSuccessResponse, aR as RecoverySignerConfig, an as RegisterSignerChain, al as RegisterSignerParams, R as RegisterSignerPasskeyParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, S as Scope, aN as SendParams, ar as SendResponse, a0 as Signer, G as TransferScope, H as Transfers, ah as WalletLocator } from '../types-
|
|
3
|
+
export { aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aO as CreateTransactionSuccessResponse, at as CreateWalletParams, as as CreateWalletResponse, aK as FundWalletParams, aa as FundWalletResponse, aJ as GetBalanceResponse, ay as GetBalanceSuccessResponse, aH as GetSignatureResponse, aj as GetSignerResponse, aP as GetSignersResponse, aq as GetTransactionResponse, ac as GetTransactionSuccessResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, az as GetWalletResponse, aQ as GetWalletSuccessResponse, aR as RecoverySignerConfig, an as RegisterSignerChain, al as RegisterSignerParams, R as RegisterSignerPasskeyParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, S as Scope, aN as SendParams, ar as SendResponse, a0 as Signer, G as TransferScope, H as Transfers, ah as WalletLocator } from '../types-4EOfiBxs.cjs';
|
|
4
4
|
import '../chains/chains.cjs';
|
|
5
5
|
import 'ox';
|
|
6
6
|
import '@crossmint/client-sdk-window';
|
package/dist/api/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'viem';
|
|
2
2
|
import './gen/types.gen.js';
|
|
3
|
-
export { aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aO as CreateTransactionSuccessResponse, at as CreateWalletParams, as as CreateWalletResponse, aK as FundWalletParams, aa as FundWalletResponse, aJ as GetBalanceResponse, ay as GetBalanceSuccessResponse, aH as GetSignatureResponse, aj as GetSignerResponse, aP as GetSignersResponse, aq as GetTransactionResponse, ac as GetTransactionSuccessResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, az as GetWalletResponse, aQ as GetWalletSuccessResponse, aR as RecoverySignerConfig, an as RegisterSignerChain, al as RegisterSignerParams, R as RegisterSignerPasskeyParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, S as Scope, aN as SendParams, ar as SendResponse, a0 as Signer, G as TransferScope, H as Transfers, ah as WalletLocator } from '../types-
|
|
3
|
+
export { aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aO as CreateTransactionSuccessResponse, at as CreateWalletParams, as as CreateWalletResponse, aK as FundWalletParams, aa as FundWalletResponse, aJ as GetBalanceResponse, ay as GetBalanceSuccessResponse, aH as GetSignatureResponse, aj as GetSignerResponse, aP as GetSignersResponse, aq as GetTransactionResponse, ac as GetTransactionSuccessResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, az as GetWalletResponse, aQ as GetWalletSuccessResponse, aR as RecoverySignerConfig, an as RegisterSignerChain, al as RegisterSignerParams, R as RegisterSignerPasskeyParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, S as Scope, aN as SendParams, ar as SendResponse, a0 as Signer, G as TransferScope, H as Transfers, ah as WalletLocator } from '../types-DfpYAsst.js';
|
|
4
4
|
import '../chains/chains.js';
|
|
5
5
|
import 'ox';
|
|
6
6
|
import '@crossmint/client-sdk-window';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUF5HZQUOcjs = require('../../chunk-UF5HZQUO.cjs');require('../../chunk-JNKTRQPS.cjs');require('../../chunk-XZ4NKVEB.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-7O3W4JAP.cjs');require('../../chunk-6ZAGINES.cjs');require('../../chunk-DSIFRRBS.cjs');exports.evmChainAdapter = _chunkUF5HZQUOcjs.a;
|
|
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.cjs';
|
|
|
2
2
|
import '../chains.cjs';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-4EOfiBxs.cjs';
|
|
6
6
|
import '../../api/gen/types.gen.cjs';
|
|
7
7
|
import 'ox';
|
|
8
8
|
import '@crossmint/client-sdk-window';
|
|
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.js';
|
|
|
2
2
|
import '../chains.js';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-DfpYAsst.js';
|
|
6
6
|
import '../../api/gen/types.gen.js';
|
|
7
7
|
import 'ox';
|
|
8
8
|
import '@crossmint/client-sdk-window';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-EFBUJ2BS.js";import"../../chunk-B4GYB3XY.js";import"../../chunk-7FEY62ID.js";import"../../chunk-455NK5LB.js";import"../../chunk-TJBIBZMF.js";import"../../chunk-NUBGDLR2.js";import"../../chunk-NU7VF7MC.js";export{a as evmChainAdapter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSNBCG5HRcjs = require('../../chunk-SNBCG5HR.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-7O3W4JAP.cjs');require('../../chunk-6ZAGINES.cjs');require('../../chunk-DSIFRRBS.cjs');exports.solanaChainAdapter = _chunkSNBCG5HRcjs.a;
|
|
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.cjs';
|
|
|
2
2
|
import '../chains.cjs';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-4EOfiBxs.cjs';
|
|
6
6
|
import '../../api/gen/types.gen.cjs';
|
|
7
7
|
import 'ox';
|
|
8
8
|
import '@crossmint/client-sdk-window';
|
|
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.js';
|
|
|
2
2
|
import '../chains.js';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-DfpYAsst.js';
|
|
6
6
|
import '../../api/gen/types.gen.js';
|
|
7
7
|
import 'ox';
|
|
8
8
|
import '@crossmint/client-sdk-window';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-TY33CSCI.js";import"../../chunk-455NK5LB.js";import"../../chunk-TJBIBZMF.js";import"../../chunk-NUBGDLR2.js";import"../../chunk-NU7VF7MC.js";export{a as solanaChainAdapter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkP4EW7S5Icjs = require('../../chunk-P4EW7S5I.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-7O3W4JAP.cjs');require('../../chunk-6ZAGINES.cjs');require('../../chunk-DSIFRRBS.cjs');exports.stellarChainAdapter = _chunkP4EW7S5Icjs.a;
|
|
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.cjs';
|
|
|
2
2
|
import '../chains.cjs';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-4EOfiBxs.cjs';
|
|
6
6
|
import '../../api/gen/types.gen.cjs';
|
|
7
7
|
import 'ox';
|
|
8
8
|
import '@crossmint/client-sdk-window';
|
|
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.js';
|
|
|
2
2
|
import '../chains.js';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-DfpYAsst.js';
|
|
6
6
|
import '../../api/gen/types.gen.js';
|
|
7
7
|
import 'ox';
|
|
8
8
|
import '@crossmint/client-sdk-window';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-ZUBX7T2L.js";import"../../chunk-455NK5LB.js";import"../../chunk-TJBIBZMF.js";import"../../chunk-NUBGDLR2.js";import"../../chunk-NU7VF7MC.js";export{a as stellarChainAdapter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkW6APCBJWcjs = 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-XZ4NKVEB.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-7O3W4JAP.cjs');require('../chunk-6ZAGINES.cjs');require('../chunk-DSIFRRBS.cjs');exports.getChainAdapter = _chunkW6APCBJWcjs.a; exports.isSupportedChainType = _chunkW6APCBJWcjs.b;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Chain } from './chains.cjs';
|
|
2
|
-
import { an as RegisterSignerChain, ao as RegisterSignerResponse, a1 as PendingSignerOperation, ap as TokenBalance } from '../types-
|
|
2
|
+
import { an as RegisterSignerChain, ao as RegisterSignerResponse, a1 as PendingSignerOperation, ap as TokenBalance } from '../types-4EOfiBxs.cjs';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '../api/gen/types.gen.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Chain } from './chains.js';
|
|
2
|
-
import { an as RegisterSignerChain, ao as RegisterSignerResponse, a1 as PendingSignerOperation, ap as TokenBalance } from '../types-
|
|
2
|
+
import { an as RegisterSignerChain, ao as RegisterSignerResponse, a1 as PendingSignerOperation, ap as TokenBalance } from '../types-DfpYAsst.js';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '../api/gen/types.gen.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../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-7FEY62ID.js";import"../chunk-455NK5LB.js";import"../chunk-TJBIBZMF.js";import"../chunk-NUBGDLR2.js";import"../chunk-NU7VF7MC.js";export{a as getChainAdapter,b as isSupportedChainType};
|
package/dist/chains/chains.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWTJC5QBHcjs = 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.isMainnetChain = _chunkWTJC5QBHcjs.c; exports.isTestnetChain = _chunkWTJC5QBHcjs.b; exports.isValidChain = _chunkWTJC5QBHcjs.e; exports.mainnetToTestnet = _chunkWTJC5QBHcjs.d; exports.toViemChain = _chunkWTJC5QBHcjs.a; exports.validateChainForEnvironment = _chunkWTJC5QBHcjs.f;
|
package/dist/chains/chains.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f}from"../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{c as isMainnetChain,b as isTestnetChain,e as isValidChain,d as mainnetToTestnet,a as toViemChain,f as validateChainForEnvironment};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c}from"./chunk-OEMMPPUX.js";import{a as i}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-OEMMPPUX.js";import{a as i}from"./chunk-5HMRFOCH.js";import{a as t}from"./chunk-OE6CWWFM.js";import{a as o}from"./chunk-7BW7B47N.js";import{b as n}from"./chunk-VTTD4HPY.js";import{a as s}from"./chunk-TM45QNB3.js";import{a as p}from"./chunk-VFJ7NZBI.js";import{k as e}from"./chunk-7FEY62ID.js";function h(r){switch(r){case"email":return o;case"phone":return p;case"passkey":return s;case"device":return t;case"api-key":return i;case"server":return c;case"external-wallet":return n;default:throw new e(`Unknown signer type: ${r}`)}}export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s,b as o}from"./chunk-
|
|
1
|
+
import{a as s,b as o}from"./chunk-XEWCMK3Z.js";import{a as r}from"./chunk-TJBIBZMF.js";import{h as t}from"./chunk-NU7VF7MC.js";import{VersionedTransaction as u}from"@solana/web3.js";import a from"bs58";var g=class c extends s{constructor(n){super(n)}signMessage(){return t(this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for email signer"))})}signTransaction(n){return t(this,null,function*(){var i;yield this.handleAuthRequired();let d=this.getJwtOrThrow(),m=a.decode(n),y=u.deserialize(m).message.serialize();r.info("sign: sending request",{keyType:"ed25519"});let l=Date.now(),e=yield(i=this.config.clientTEEConnection)==null?void 0:i.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:d,apiKey:this.config.crossmint.apiKey},data:{keyType:"ed25519",bytes:a.encode(new Uint8Array(y)),encoding:"base58"}},options:o});if(r.info("sign: response received",{status:e==null?void 0:e.status,durationMs:Date.now()-l}),(e==null?void 0:e.status)==="error")throw new Error(e.error);if((e==null?void 0:e.signature)==null)throw new Error("Failed to sign transaction");return c.verifyPublicKeyFormat(e.publicKey),{signature:e.signature.bytes}})}static verifyPublicKeyFormat(n){if(n==null)throw new Error("No public key found");if(n.encoding!=="base58"||n.keyType!=="ed25519"||n.bytes==null)throw new Error("Not supported. Expected public key to be in base58 encoding and ed25519 key type. Got: "+JSON.stringify(n))}getChainKeyParams(){return{scheme:"ed25519",encoding:"base58"}}};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEAU5Z5O5cjs = require('./chunk-EAU5Z5O5.cjs');var _chunkGMU3ZYLScjs = require('./chunk-GMU3ZYLS.cjs');var _chunk6GZQZEGQcjs = require('./chunk-6GZQZEGQ.cjs');var _chunk7O3W4JAPcjs = require('./chunk-7O3W4JAP.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var _ox = require('ox');var o=class c{constructor(e){_chunk7O3W4JAPcjs.b.call(void 0, e.apiKey);let t=new (0, _chunk6GZQZEGQcjs.a)(e);this.walletFactory=new (0, _chunkEAU5Z5O5cjs.a)(t),_chunk7O3W4JAPcjs.a.info("wallets.sdk.initialized")}static from(e){return new c(e)}getWallet(e,t){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){if(typeof e=="string"){if(t==null)throw new Error("Args parameter is required when walletLocator is provided");return yield this.walletFactory.getWallet(e,t)}return yield this.walletFactory.getWallet(e)})}createWallet(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return yield this.walletFactory.createWallet(e)})}createDeviceSigner(e,t){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return yield _chunkGMU3ZYLScjs.a.call(void 0, e,t)})}createPasskeySigner(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let t=yield _ox.WebAuthnP256.createCredential({name:e});return{type:"passkey",id:t.id,name:e,publicKey:{x:t.publicKey.x.toString(),y:t.publicKey.y.toString()}}})}};exports.a = _commonsdkbase.createCrossmint; exports.b = o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-2YLRFJ66.js";import{
|
|
1
|
+
import{a as s}from"./chunk-2YLRFJ66.js";import{F as a}from"./chunk-7FEY62ID.js";import{h as e}from"./chunk-NU7VF7MC.js";import{PublicKey as h,VersionedTransaction as f}from"@solana/web3.js";import o from"bs58";var l=class extends s{constructor(n){super(n),this.onSign=n.onSign}signMessage(){return e(this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for solana external wallet signer"))})}signTransaction(n){return e(this,null,function*(){if(this.onSign==null)throw new Error("[SolanaExternalWalletSigner] No onSign callback provided. Pass an onSign callback when configuring the external wallet signer.");let c=o.decode(n),g=f.deserialize(c),t=yield this.onSign(g),d=new h(this._address),i=t.message.staticAccountKeys.findIndex(m=>m.equals(d));if(i===-1)throw new a("Wallet public key not found in transaction signers");let r=t.signatures[i];if(r==null)throw new a("No valid signature found in the transaction");let u=new Uint8Array(Object.values(r));return{signature:o.encode(u)}})}};export{l as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ge}from"./chunk-KSN4TWLX.js";import{a as de,b as pe}from"./chunk-6IV3GB5W.js";import{a as ce}from"./chunk-F3CW7X6C.js";import{a as le}from"./chunk-HIHX5FRO.js";import{a as se}from"./chunk-OMTJMVSG.js";import{a as L}from"./chunk-3A424HCV.js";import{a as $}from"./chunk-VCOKK7C2.js";import{a as ae,b as oe}from"./chunk-ARQVCU6M.js";import{a as ne}from"./chunk-XEWCMK3Z.js";import{f as _}from"./chunk-DCKFFFPG.js";import{a as te,b as ie}from"./chunk-EGX2IXWU.js";import{b as re}from"./chunk-B4GYB3XY.js";import{f as ee}from"./chunk-URQQBUUX.js";import{A as Y,F as Z,I as k,d as U,e as H,j as J,l as j,m as B,n as V,v as z,w as Q,y as K,z as X}from"./chunk-7FEY62ID.js";import{a as s}from"./chunk-TJBIBZMF.js";import{a as w,b as D,c as P,d as i,e as A,f as T,g as W,h as o}from"./chunk-NU7VF7MC.js";import{WithLoggerContext as E}from"@crossmint/common-sdk-base";var N,c,b,x,l,S,F,O,I,C,he,ue,q,G,R=class{constructor(e,r){A(this,C);A(this,N);A(this,c);A(this,b);A(this,x);A(this,l);A(this,S);A(this,F,[]);A(this,O);A(this,I,null);let{chain:t,address:n,owner:a,options:h,alias:u,recovery:d,apiRecoveryServerSignerAddress:g,apiDelegatedServerSignerAddresses:p,signers:y,signer:v}=e;T(this,c,r),this.chain=t,this.address=n,this.owner=a,T(this,N,h),this.alias=u;let m=null;g!=null?m=g:d.type==="server"&&_(d)&&(m=d.address),T(this,F,p!=null?p:[]),T(this,b,y!=null?y:[]),T(this,x,new se({chain:t,projectId:i(this,c).projectId,environment:i(this,c).environment,apiRecoveryAddress:m,apiDelegatedAddresses:i(this,F),knownOnChainAddresses:()=>[...i(this,b).filter(f=>f.type==="server"&&_(f)).map(f=>f.address),...i(this,F)]})),T(this,l,new ce({apiClient:r,options:h,chain:t,walletAddress:this.address,walletLocator:()=>this.walletLocator,serverSignerResolver:i(this,x),recovery:d,initialSigners:i(this,b),signers:()=>this.signers(),signer:v})),T(this,S,new ge({chain:t,walletAddress:this.address,options:h,signerManager:i(this,l),serverSignerResolver:i(this,x),signers:()=>this.signers(),addSigner:f=>this.addSigner(f),removeSigner:f=>this.removeSigner({type:"device",locator:f}),approveSignature:f=>this.approveSignatureAndWait(f),approveTransaction:f=>this.approveTransactionAndWait(f)})),T(this,O,this.initDefaultSigner())}get signer(){return i(this,l).activeSigner}waitForInit(){return o(this,null,function*(){yield i(this,O)})}initDefaultSigner(){return o(this,null,function*(){if(i(this,l).activeSigner!=null||(yield i(this,S).initDeviceSigner(),i(this,l).activeSigner!=null||i(this,S).needsRecovery))return;let e=i(this,b).length===0?i(this,l).recovery:i(this,b).length===1?i(this,b)[0]:null;if(e==null)return;let r=L(e.type),t=i(this,l).descriptorContext();if(!r.canAutoAssemble(e,t))return;let n=e===i(this,l).recovery;try{let a=r.buildInternalConfig(e,t);i(this,l).setActiveSigner(yield i(this,l).assemble(a,{isAdminSigner:n}))}catch(a){s.warn("wallet.initDefaultSigner.autoAssemblyFailed",{recoveryType:i(this,l).recovery.type,signerCount:i(this,b).length,error:a})}})}static getApiClient(e){return e.apiClient}static getOptions(e){return e.options}static getRecovery(e){return i(e,l).recovery}static getInitialSigners(e){return i(e,b)}static getApiRecoveryServerSignerAddress(e){var r;return(r=i(e,x).apiRecoveryAddress)!=null?r:void 0}static getApiDelegatedServerSignerAddresses(e){return i(e,F)}get apiClient(){return i(this,c)}get options(){return i(this,N)}get chainAdapter(){return te(this.chain)}resolveServerSignerApiLocator(e){return i(this,x).apiLocator(e)}get recovery(){return i(this,l).recovery}balances(e){return o(this,null,function*(){s.info("wallet.balances.start");let r=this.resolveChainForEnvironment(),t=this.chainAdapter.nativeToken,n=[t,"usdc",...e!=null?e:[]],a=yield i(this,c).getBalance(this.address,{chains:[r],tokens:n});if("error"in a)throw s.error("wallet.balances.error",{error:a}),new Error(`Failed to get balances for wallet: ${JSON.stringify(a.message)}`);return s.info("wallet.balances.success"),le(a,this.chain,t,e)})}stagingFund(e,r){return o(this,null,function*(){s.info("wallet.stagingFund.start",{amount:e,chain:r!=null?r:this.chain});let t=yield this.apiClient.fundWallet(this.address,{amount:e,token:"usdxm",chain:r!=null?r:this.chain});if("error"in t)throw s.error("wallet.stagingFund.error",{error:t}),new Error(`Failed to fund wallet: ${JSON.stringify(t.message)}`);return s.info("wallet.stagingFund.success"),t})}nfts(e){return o(this,null,function*(){let r=this.resolveChainForEnvironment(),t=yield i(this,c).getNfts(D(w({},e),{chain:r,address:this.address}));if(t!=null&&typeof t=="object"&&"error"in t)throw s.error("wallet.nfts.error",{error:t}),new Error(`Failed to get nfts: ${JSON.stringify(t.message)}`);return t})}transactions(){return o(this,null,function*(){let e=yield i(this,c).getTransactions(this.walletLocator);if("error"in e)throw new Error(`Failed to get transactions: ${JSON.stringify(e.message)}`);return e})}transaction(e){return o(this,null,function*(){let r=yield i(this,c).getTransaction(this.walletLocator,e);if("error"in r)throw new Error(`Failed to get transaction: ${JSON.stringify(r.message)}`);return r})}transfers(e){return o(this,null,function*(){let r=this.resolveChainForEnvironment(),t=yield this.apiClient.getTransfers(this.walletLocator,{chain:r,tokens:e.tokens,status:e.status});if("error"in t)throw new Error(`Failed to get transfers: ${JSON.stringify(t.message)}`);return t})}send(e,r,t,n){return o(this,null,function*(){let a=Number(t);if(Number.isNaN(a)||!Number.isFinite(a)||a<=0)throw new K(`Invalid transfer amount: "${t}". Amount must be a positive number greater than zero.`);let h=ae(e),u=this.resolveChainForEnvironment(),d=oe(r,u);s.info("wallet.send.start",w({recipient:h,token:d,amount:t},(n==null?void 0:n.transactionType)!=null?{transactionType:n.transactionType}:{})),yield this.preAuthIfNeeded();let g=i(this,l).require(),p;(n==null?void 0:n.signer)==null?p=g.locator():typeof n.signer=="string"?p=n.signer:p=this.resolveServerSignerApiLocator(n.signer);let y=w({recipient:h,amount:t,signer:p},(n==null?void 0:n.transactionType)!=null?{transactionType:n.transactionType}:{}),v=yield i(this,c).send(this.walletLocator,d,y);if("message"in v)throw s.error("wallet.send.error",{error:v}),new X(`Failed to send token: ${JSON.stringify(v.message)}`);if((n==null?void 0:n.prepareOnly)===!0)return s.info("wallet.send.prepared",{transactionId:v.id}),{hash:void 0,explorerLink:void 0,transactionId:v.id};let m=yield this.approveTransactionAndWait(v.id);return s.info("wallet.send.success",{transactionId:v.id,hash:m.hash}),m})}approveTransaction(e){return o(this,null,function*(){return console.warn("approveTransaction is deprecated. Use approve instead. This method will be removed in the next major version."),yield this.approve(e)})}approve(e){return o(this,null,function*(){if(s.info("wallet.approve.start",{transactionId:e.transactionId,signatureId:e.signatureId}),yield this.preAuthIfNeeded(),e.transactionId!=null){let r=yield this.approveTransactionAndWait(e.transactionId,e.options);return s.info("wallet.approve.success",{transactionId:e.transactionId}),r}if(e.signatureId!=null){let r=yield this.approveSignatureAndWait(e.signatureId,e.options);return s.info("wallet.approve.success",{signatureId:e.signatureId}),r}throw s.error("wallet.approve.error",{error:"Either transactionId or signatureId must be provided"}),new Error("Either transactionId or signatureId must be provided")})}addSigner(e,r){return o(this,null,function*(){s.info("wallet.addSigner.start");let t=typeof e=="object"&&"type"in e&&e.type==="server"?this.resolveServerSignerApiLocator(e):e;return i(this,l).withRecoverySigner(()=>o(this,null,function*(){var v;let n=typeof t=="string"?t:$(t),a=yield i(this,l).getSignerState(n);if(a.signer!=null){if(i(this,l).isApprovedSignerStatus(a.signer.status))return(r==null?void 0:r.scopes)!=null&&s.warn("wallet.addSigner.scopesIgnored",{reason:"signer already approved",signerLocator:n}),s.info("wallet.addSigner.alreadyApproved"),this.completeSignerRegistration(a.signer,null,r);if(a.pendingOperation!=null){if((r==null?void 0:r.scopes)!=null)throw new Error("Cannot apply scopes when resuming a pending signer registration. Remove the pending signer and register it again with the desired scopes.");return s.info("wallet.addSigner.resuming",{operationType:a.pendingOperation.type,operationId:a.pendingOperation.id}),this.completeSignerRegistration(a.signer,a.pendingOperation,r)}}let h=typeof t=="string"?t:L(t.type).addSignerPayload(t,i(this,l).descriptorContext()),d=this.chain!=="solana"&&this.chain!=="stellar"?(v=r==null?void 0:r.deployImmediately)!=null?v:!0:void 0,g=yield i(this,c).registerSigner(this.walletLocator,w(w({signer:h,chain:this.chainAdapter.addSignerChain(this.chain)},(r==null?void 0:r.scopes)!=null&&{scopes:r.scopes}),d!=null&&{deployImmediately:d}));if("error"in g)throw s.error("wallet.addSigner.error",{error:g}),g.code===j?new B(g.message):new J(`Failed to register signer: ${JSON.stringify(g.message)}`);let p=re(g,this.chain);if(p==null)throw new Error(`No approval found for chain ${this.chain} in register signer response`);let y=this.chainAdapter.extractAddSignerOperation(g,this.chain,{locator:n,type:e.type});return this.completeSignerRegistration(p,y,r)}))})}completeSignerRegistration(e,r,t){return o(this,null,function*(){if(t!=null&&t.prepareOnly){if(r==null)return w({},e);switch(r.type){case"transaction":{let n={transactionId:r.id};return s.info("wallet.addSigner.prepared",n),w(w({},e),n)}case"signature":{let n={signatureId:r.id};return s.info("wallet.addSigner.prepared",n),w(w({},e),n)}default:{let n=r.type;throw new Error(`Unknown pending operation type: ${n}`)}}}if(r!=null)switch(r.type){case"transaction":yield this.approveTransactionAndWait(r.id),s.info("wallet.addSigner.success",{transactionId:r.id});break;case"signature":yield this.approveSignatureAndWait(r.id),s.info("wallet.addSigner.success",{signatureId:r.id});break;default:{let n=r.type;throw new Error(`Unknown pending operation type: ${n}`)}}else s.info("wallet.addSigner.success");return D(w({},e),{status:"success"})})}removeSigner(e,r){return o(this,null,function*(){let t=this.resolveSignerLocator(e);return s.info("wallet.removeSigner.start",{signerLocator:t}),i(this,l).withRecoverySigner(()=>o(this,null,function*(){let n=yield i(this,c).removeSigner(this.walletLocator,t,{chain:this.chainAdapter.addSignerChain(this.chain)});if("error"in n)throw s.error("wallet.removeSigner.error",{error:n}),new Error(`Failed to remove signer: ${JSON.stringify(n)}`);let a=n.id;return r!=null&&r.prepareOnly?(s.info("wallet.removeSigner.prepared",{transactionId:a}),{transactionId:a,status:void 0}):(yield this.approveTransactionAndWait(a),s.info("wallet.removeSigner.success",{transactionId:a}),{transactionId:a,status:"success"})}))})}useSigner(e){return o(this,null,function*(){s.info("wallet.useSigner.start"),e.type==="server"&&i(this,x).resetDelegatedCache(),L(e.type).validateConfig(e);let r=!1;e.type==="device"?yield i(this,S).resolveAvailability(e):r=yield this.resolveNonDeviceSigner(e);let t=L(e.type).buildInternalConfig(e,i(this,l).descriptorContext()),n=$(e);i(this,l).setActiveSigner(yield i(this,l).assemble(t,{isAdminSigner:r})),s.info("wallet.useSigner.success",{signerLocator:n})})}resolveNonDeviceSigner(e){return o(this,null,function*(){if(e.type!=="passkey"&&e.type!=="server"&&this.isRecoverySigner(e))return i(this,S).onSignerSelected(),!0;if(e.type==="passkey"&&this.isPasskeyMissingId(e)&&!(yield this.tryAutoSelectPasskey(e))){if(this.isRecoverySigner(e))return i(this,S).onSignerSelected(),!0;throw new Error("No passkey signer is registered on this wallet.")}if(e.type==="server")return this.resolveServerSigner(e);let r=this.resolveSignerLocator(e);if(yield this.signerIsRegistered(r))return i(this,S).onSignerSelected(),!1;if(this.isRecoverySigner(e))return i(this,S).onSignerSelected(),!0;throw new Error(`Signer "${r}" is not registered in this wallet.`)})}resolveServerSigner(e){return o(this,null,function*(){let t=(yield this.signers()).map(a=>a.locator),n=i(this,x).resolveForUseSigner(e,t,()=>this.isRecoverySigner(e));switch(n.kind){case"delegated":return i(this,S).onSignerSelected(),!1;case"recovery":return i(this,l).stripSecretFromRecovery(),i(this,S).onSignerSelected(),!0;case"unregistered":throw new Error(n.message)}})}tryAutoSelectPasskey(e){return o(this,null,function*(){let t=(yield this.signers()).filter(n=>n.type==="passkey");if(t.length===0)return!1;if(t.length>1)throw new Error('Multiple passkey signers are registered on this wallet. Please specify the credential id: wallet.useSigner({ type: "passkey", id: "<credential-id>" })');return e.id=t[0].locator.replace("passkey:",""),!0})}resolveSignerLocator(e){return e.type==="server"?this.resolveServerSignerApiLocator(e):$(e)}isPasskeyMissingId(e){return e.id==null||e.id===""}signerIsRegistered(e){return o(this,null,function*(){return i(this,l).signerIsRegistered(e)})}isSignerApproved(e){return o(this,null,function*(){return i(this,l).isSignerApproved(e)})}needsRecovery(){return i(this,S).needsRecovery}recover(){return o(this,null,function*(){yield i(this,S).recover()})}signers(){return o(this,null,function*(){var a,h;s.info("wallet.signers.start");let e=yield i(this,c).getWallet(this.walletLocator);if("error"in e)throw s.error("wallet.signers.error",{error:e}),new H(JSON.stringify(e));if(!fe(e)){let u=e.type!=="smart"?`Wallet type ${e.type} not supported`:`Wallet chain type ${e.chainType} not supported`;throw s.error("wallet.signers.error",{error:u}),new U(u)}let r=(h=(a=e==null?void 0:e.config)==null?void 0:a.delegatedSigners)!=null?h:[],n=(yield Promise.all(r.map(u=>o(this,null,function*(){try{return(yield i(this,l).getSignerState(u.locator)).signer}catch(d){return s.warn("wallet.signers.mapSigner.failed",{locator:u.locator,error:d}),null}})))).filter(u=>u!=null);return s.info("wallet.signers.success",{count:n.length}),n})}get walletLocator(){if(i(this,c).isServerSide)return this.address;{let e=this.chainAdapter.walletLocatorPrefix,r=this.alias!=null?`:alias:${this.alias}`:"";return e+r}}get signerManager(){return i(this,l)}preAuthIfNeeded(){return o(this,null,function*(){yield i(this,O),i(this,I)==null&&T(this,I,this.recover());try{yield i(this,I)}finally{T(this,I,null)}let e=i(this,l).require();e instanceof ne&&(yield e.ensureAuthenticated())})}isRecoverySigner(e){let r=i(this,l).recovery;if(r==null||r.type!==e.type)return!1;let t=L(e.type);return t.matchesRecovery(e,r,i(this,l).descriptorContext())?(t.adoptsRecoveryConfigOnMatch&&i(this,l).adoptRecoveryConfig(e),!0):!1}resolveChainForEnvironment(){let e=ee(this.chain,i(this,c).environment);return e!==this.chain&&(this.chain=e),this.chain}approveTransactionAndWait(e,r){return o(this,null,function*(){return yield this.approveTransactionInternal(e,r),yield this.sleep(1e3),yield this.waitForTransaction(e)})}approveSignatureAndWait(e,r){return o(this,null,function*(){let t=yield this.approveSignatureInternal(e,r);return!("error"in t)&&t.status==="success"&&t.outputSignature!=null?{signature:t.outputSignature,signatureId:e}:(yield this.sleep(1e3),yield this.waitForSignature(e))})}approveSignatureInternal(e,r){return o(this,null,function*(){var d,g;if(!this.chainAdapter.supportsSignatures)throw new Error("Approving signatures is only supported for EVM smart wallets");let t=i(this,l).require(),n=yield i(this,c).getSignature(this.walletLocator,e);if("error"in n)throw k(n),new z(JSON.stringify(n));if(t.type==="api-key")return n;if((r==null?void 0:r.approval)!=null){let p=[r.approval];return yield this.executeApproveSignatureWithErrorHandling(e,p)}let a=(d=n.approvals)==null?void 0:d.pending;if(a==null||a.length===0)return n;let h=[...(g=r==null?void 0:r.additionalSigners)!=null?g:[],t],u=yield W(this,C,G).call(this,W(this,C,q).call(this,a),h,(p,y)=>p.signMessage(y.message));return yield this.executeApproveSignatureWithErrorHandling(e,u)})}approveTransactionInternal(e,r){return o(this,null,function*(){var d,g,p,y,v;let t=yield i(this,c).getTransaction(this.walletLocator,e);if("error"in t)throw k(t),new Y(JSON.stringify(t));yield(p=(g=(d=i(this,N))==null?void 0:d.callbacks)==null?void 0:g.onTransactionStart)==null?void 0:p.call(g);let n=i(this,l).require();if(n.type==="api-key")return t;if((r==null?void 0:r.approval)!=null){let m=[r.approval];return yield this.executeApproveTransactionWithErrorHandling(e,m)}let a=(y=t.approvals)==null?void 0:y.pending;if(a==null||a.length===0)return t;let h=[...(v=r==null?void 0:r.additionalSigners)!=null?v:[],n],u=yield W(this,C,G).call(this,W(this,C,q).call(this,a),h,(m,f)=>{let Se=m.type==="device",ve=t.chainType==="solana"&&"transaction"in t.onChain&&!Se?t.onChain.transaction:f.message;return m.signTransaction(ve)});return yield this.executeApproveTransactionWithErrorHandling(e,u)})}executeApproveTransactionWithErrorHandling(e,r){return o(this,null,function*(){s.info("wallet.approve: submitting approval to API",{transactionId:e});let t=yield i(this,c).approveTransaction(this.walletLocator,e,{approvals:r});if(t.error)throw k(t),new Z(JSON.stringify(t));return t})}executeApproveSignatureWithErrorHandling(e,r){return o(this,null,function*(){let t=yield i(this,c).approveSignature(this.walletLocator,e,{approvals:r});if(t.error)throw k(t),new Q(JSON.stringify(t));return t})}waitForSignature(e){return o(this,null,function*(){return yield pe(i(this,c),this.walletLocator,e)})}waitForTransaction(n){return o(this,arguments,function*(e,r=6e4,t={}){return yield de(i(this,c),this.walletLocator,e,w({timeoutMs:r},t))})}sleep(e){return o(this,null,function*(){return new Promise(r=>setTimeout(r,e))})}};N=new WeakMap,c=new WeakMap,b=new WeakMap,x=new WeakMap,l=new WeakMap,S=new WeakMap,F=new WeakMap,O=new WeakMap,I=new WeakMap,C=new WeakSet,he=function(e){return o(this,null,function*(){let r=yield i(this,S).tryResolveLocallyAvailableSigner(e);return r!=null&&s.info("wallet.approve.deviceSignerRecoveredViaFallback",{signerLocator:e}),r})},ue=function(e,r){return o(this,null,function*(){var n;let t=e.find(a=>a.locator()===r);if(t==null&&(t=(n=yield W(this,C,he).call(this,r))!=null?n:void 0),t==null)throw new J(`Signer ${r} not found in pending approvals`);return t})},q=function(e){return e.map(r=>{if(r.signer.type==="quorum")throw new V(`This wallet requires approval from a quorum signer (${r.signer.locator}), which is not yet supported by this SDK version`);return r})},G=function(e,r,t){return o(this,null,function*(){return yield Promise.all(e.map(n=>o(this,null,function*(){let a=yield W(this,C,ue).call(this,r,n.signer.locator),h=yield t(a,n);return D(w({},h),{signer:a.locator()})})))})},P([E({logger:s,methodName:"wallet.balances",buildContext(e){return{chain:e.chain,address:e.address}}})],R.prototype,"balances",1),P([E({logger:s,methodName:"wallet.stagingFund",buildContext(e){return{chain:e.chain,address:e.address}}})],R.prototype,"stagingFund",1),P([E({logger:s,methodName:"wallet.send",buildContext(e){return{chain:e.chain,address:e.address}}})],R.prototype,"send",1),P([E({logger:s,methodName:"wallet.approve",buildContext(e){return{chain:e.chain,address:e.address}}})],R.prototype,"approve",1),P([E({logger:s,methodName:"wallet.addSigner",buildContext(e){return{chain:e.chain,address:e.address}}})],R.prototype,"addSigner",1),P([E({logger:s,methodName:"wallet.removeSigner",buildContext(e){return{chain:e.chain,address:e.address}}})],R.prototype,"removeSigner",1),P([E({logger:s,methodName:"wallet.useSigner",buildContext(e){return{chain:e.chain,address:e.address}}})],R.prototype,"useSigner",1),P([E({logger:s,methodName:"wallet.recover",buildContext(e){return{chain:e.chain,address:e.address}}})],R.prototype,"recover",1),P([E({logger:s,methodName:"wallet.signers",buildContext(e){return{chain:e.chain,address:e.address}}})],R.prototype,"signers",1);function fe(M){return M.type==="smart"&&ie(M.chainType)}export{R as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-VCOKK7C2.js";var t={type:"api-key",validateConfig(){},buildInternalConfig(e,i){return{type:"api-key",locator:"api-key",address:i.walletAddress}},canAutoAssemble(){return!0},addSignerPayload(e){return r(e)},matchesRecovery(e,i){return r(e)===r(i)},adoptsRecoveryConfigOnMatch:!0,signerUnavailableReason:()=>null};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkIDRQPLGQcjs = require('./chunk-IDRQPLGQ.cjs');var _chunkFQZXBS7Lcjs = require('./chunk-FQZXBS7L.cjs');var _chunkXZ4NKVEBcjs = require('./chunk-XZ4NKVEB.cjs');var _chunk7O3W4JAPcjs = require('./chunk-7O3W4JAP.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var _commonsdkbase = require('@crossmint/common-sdk-base');var o=class o 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.isValidSolanaAddress.call(void 0, e.address))throw new Error("Wallet is not a Solana wallet");return new o(e)}sendTransaction(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var l,p;_chunk7O3W4JAPcjs.a.info("solanaWallet.sendTransaction.start"),yield this.preAuthIfNeeded();let n=yield this.createTransaction(e);if((l=e.options)!=null&&l.prepareOnly)return _chunk7O3W4JAPcjs.a.info("solanaWallet.sendTransaction.prepared",{transactionId:n.id}),{hash:void 0,explorerLink:void 0,transactionId:n.id};let i={additionalSigners:(p=e.additionalSigners)==null?void 0:p.map(d=>new (0, _chunkFQZXBS7Lcjs.a)({type:"external-wallet",address:d.publicKey.toString(),locator:`external-wallet:${d.publicKey.toString()}`,onSign:g=>(g.sign([d]),Promise.resolve(g))}))},a=yield this.approveTransactionAndWait(n.id,i);return _chunk7O3W4JAPcjs.a.info("solanaWallet.sendTransaction.success",{transactionId:n.id,hash:a.hash}),a})}createTransaction(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var a;let n;((a=e.options)==null?void 0:a.signer)==null?n=this.signerManager.require().locator():typeof e.options.signer=="string"?n=e.options.signer:n=this.resolveServerSignerApiLocator(e.options.signer);let s;"serializedTransaction"in e?s=e.serializedTransaction:s=_bs582.default.encode(e.transaction.serialize());let i=yield this.apiClient.createTransaction(this.walletLocator,{params:{transaction:s,signer:n}});if("error"in i)throw new (0, _chunkXZ4NKVEBcjs.z)(JSON.stringify(i));return i})}};_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunk7O3W4JAPcjs.a,methodName:"solanaWallet.sendTransaction",buildContext(e){return{chain:e.chain,address:e.address}}})],o.prototype,"sendTransaction",1);var f=o;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 _chunkW6APCBJWcjs = require('./chunk-W6APCBJW.cjs');var _chunkENU3EKBGcjs = require('./chunk-ENU3EKBG.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');function d(s,n){var e,l,r,i,a;let t=(e=s.chains)==null?void 0:e[n],o=_chunkW6APCBJWcjs.a.call(void 0, n).balanceTokenFields(t);return _chunkDSIFRRBScjs.a.call(void 0, {symbol:(l=s.symbol)!=null?l:"",name:(r=s.name)!=null?r:"",amount:(i=s.amount)!=null?i:"0",decimals:s.decimals,rawAmount:(a=s.rawAmount)!=null?a:"0"},o)}function h(s,n){let t={symbol:s,name:s,amount:"0",decimals:0,rawAmount:"0"},o=_chunkW6APCBJWcjs.a.call(void 0, n).emptyBalanceTokenFields();return _chunkDSIFRRBScjs.a.call(void 0, _chunkDSIFRRBScjs.a.call(void 0, {},t),o)}function B(s,n,t){var r,i,a,f,p;if(n==null)return!0;let o=((r=s.symbol)!=null?r:"").toLowerCase();if(n.has(o))return!0;let e=(i=s.chains)==null?void 0:i[t];if(e==null)return!1;let l=_chunkENU3EKBGcjs.a.call(void 0, t);if(l==="solana"&&"mintHash"in e){let c=(a=e.mintHash)==null?void 0:a.toLowerCase();return c!=null&&(n.has(c)||n.has(`solana:${c}`))}if(l==="stellar"&&"contractId"in e){let c=(f=e.contractId)==null?void 0:f.toLowerCase();return c!=null&&(n.has(c)||n.has(`stellar:${c}`))}if("contractAddress"in e){let c=(p=e.contractAddress)==null?void 0:p.toLowerCase();return c!=null&&(n.has(c)||n.has(`${t}:${c}`))}return!1}function T(s,n,t,o){let e=s.find(a=>a.symbol===t),l=s.find(a=>a.symbol==="usdc"),r=o!=null?new Set(o.map(a=>a.toLowerCase())):null,i=s.filter(a=>a.symbol!==t&&a.symbol!=="usdc"&&B(a,r,n));return{nativeToken:e!=null?d(e,n):h(t,n),usdc:l!=null?d(l,n):h("usdc",n),tokens:i.map(a=>d(a,n))}}exports.a = T;
|
|
@@ -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 _chunk7O3W4JAPcjs = require('./chunk-7O3W4JAP.cjs');var _chunk6ZAGINEScjs = require('./chunk-6ZAGINES.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var h=class extends _commonsdkbase.CrossmintApiClient{constructor(e){super(e,{internalConfig:{sdkMetadata:{name:_chunk6ZAGINEScjs.c,version:_chunk6ZAGINEScjs.b}}});this.apiPrefix="api/2025-06-09/wallets";this.unstableApiPrefix="api/unstable/wallets"}createWallet(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let s=this.isServerSide?`${this.apiPrefix}`:`${this.apiPrefix}/me`;_chunk7O3W4JAPcjs.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?_chunk7O3W4JAPcjs.a.error("wallets.api.createWallet.error",{error:n.error,chainType:e.chainType}):"address"in n&&_chunk7O3W4JAPcjs.a.info("wallets.api.createWallet.success",{address:n.address,chainType:e.chainType}),n})}getWallet(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){_chunk7O3W4JAPcjs.a.info("wallets.api.getWallet",{locator:e});let r=yield(yield this.get(`${this.apiPrefix}/${e}`,{headers:this.headers})).json();return"error"in r?_chunk7O3W4JAPcjs.a.warn("wallets.api.getWallet.error",{locator:e,error:r.error}):"address"in r&&_chunk7O3W4JAPcjs.a.info("wallets.api.getWallet.success",{address:r.address,locator:e}),r})}createTransaction(e,s){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveTransaction(e,s,r){return _chunkDSIFRRBScjs.h.call(void 0, 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 _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions/${s}`,{headers:this.headers})).json()})}createSignature(e,s){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveSignature(e,s,r){return _chunkDSIFRRBScjs.h.call(void 0, 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 _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signatures/${s}`,{headers:this.headers})).json()})}getTransactions(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions`,{headers:this.headers})).json()})}getNfts(e){return _chunkDSIFRRBScjs.h.call(void 0, 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 _chunkDSIFRRBScjs.h.call(void 0, 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 _chunkDSIFRRBScjs.h.call(void 0, 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 _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){if(this.environment===_commonsdkbase.APIKeyEnvironmentPrefix.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 _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signers`,{body:JSON.stringify(s),headers:this.headers})).json()})}removeSigner(e,s,r){return _chunkDSIFRRBScjs.h.call(void 0, 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 _chunkDSIFRRBScjs.h.call(void 0, 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 _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){_chunk7O3W4JAPcjs.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?_chunk7O3W4JAPcjs.a.error("wallets.api.send.error",{walletLocator:e,tokenLocator:s,error:i.error}):"id"in i&&_chunk7O3W4JAPcjs.a.info("wallets.api.send.success",{walletLocator:e,transactionId:i.id}),i})}get isServerSide(){return this.parsedAPIKey.usageOrigin===_commonsdkbase.APIKeyUsageOrigin.SERVER}get environment(){if(!this.parsedAPIKey.isValid)throw new (0, _chunkXZ4NKVEBcjs.a)("Invalid API key");return this.parsedAPIKey.environment}get projectId(){if(!this.parsedAPIKey.isValid)throw new (0, _chunkXZ4NKVEBcjs.a)("Invalid API key");return this.parsedAPIKey.projectId}get headers(){return{"Content-Type":"application/json"}}};exports.a = h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as
|
|
1
|
+
import{A as C,B as x,C as A,D as y,E as k,I as w,s as M,v as m,x as b}from"./chunk-7FEY62ID.js";import{a as E}from"./chunk-TJBIBZMF.js";import{d as S}from"./chunk-NUBGDLR2.js";import{h as l}from"./chunk-NU7VF7MC.js";function W(i,o,a,r){return l(this,null,function*(){var h,d;let{timeoutMs:e=6e4,initialBackoffMs:u=500,backoffMultiplier:n=1.5,maxBackoffMs:f=2e3,fastWindowMs:L=5e3}=r!=null?r:{};E.info("wallet.approve: waiting for transaction confirmation",{transactionId:a,timeoutMs:e});let p=Date.now(),c=u,t;do{if(Date.now()-p>e)throw new x("Transaction confirmation timeout");let s=Date.now();if(t=yield i.getTransaction(o,a),t.error)throw w(t),new C(JSON.stringify(t));if(t.status!=="pending")break;let T=Date.now()-p;T>L&&(c=Math.min(Math.round(c*n),f));let v=Date.now()-s;yield D(Math.max(1,Math.min(c-v,e-T)))}while(!0);if(t.status==="failed")throw new A(`Transaction sending failed: ${JSON.stringify(t)}`);if(t.status==="awaiting-approval")throw new y("Transaction is awaiting approval. Please submit required approvals before waiting for completion.");let P="txHash"in t.onChain&&typeof t.onChain.txHash=="string"?t.onChain.txHash:void 0,g=(h=t.onChain.txId)!=null?h:P;if(g==null)throw new k("Transaction hash not found on transaction response");return{hash:g,explorerLink:(d=t.onChain.explorerLink)!=null?d:"",transactionId:t.id}})}function B(i,o,a,r){return l(this,null,function*(){let{timeoutMs:e=6e4}=r!=null?r:{},u=Date.now(),n=null;do{if(Date.now()-u>e)throw new b("Signature confirmation timeout");if(yield new Promise(f=>setTimeout(f,S)),n=yield i.getSignature(o,a),"error"in n)throw w(n),new m(JSON.stringify(n))}while(n===null||n.status==="pending");if(n.status==="failed")throw new M("Signature signing failed");if(!n.outputSignature)throw new m("Signature not available");return{signature:n.outputSignature,signatureId:a}})}function D(i){return l(this,null,function*(){return new Promise(o=>setTimeout(o,i))})}export{W as a,B as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s,b as o}from"./chunk-
|
|
1
|
+
import{a as s,b as o}from"./chunk-XEWCMK3Z.js";import{a as r}from"./chunk-TJBIBZMF.js";import{h as t}from"./chunk-NU7VF7MC.js";var a=class g extends s{constructor(n){super(n)}signMessage(){return t(this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for stellar signer"))})}signTransaction(n){return t(this,null,function*(){var i;yield this.handleAuthRequired();let c=this.getJwtOrThrow();r.info("sign: sending request",{keyType:"ed25519"});let d=Date.now(),e=yield(i=this.config.clientTEEConnection)==null?void 0:i.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:c,apiKey:this.config.crossmint.apiKey},data:{keyType:"ed25519",bytes:n,encoding:"base64"}},options:o});if(r.info("sign: response received",{status:e==null?void 0:e.status,durationMs:Date.now()-d}),(e==null?void 0:e.status)==="error")throw new Error(e.error);if((e==null?void 0:e.signature)==null)throw new Error("Failed to sign transaction");if(g.verifyPublicKeyFormat(e.publicKey),e.signature.encoding!=="base64")throw new Error("Wrong encoding for signature. Expected base64, got "+e.signature.encoding);return{signature:e.signature.bytes}})}static verifyPublicKeyFormat(n){if(n==null)throw new Error("No public key found");if(n.encoding!=="base64"||n.keyType!=="ed25519"||n.bytes==null)throw new Error("Not supported. Expected public key to be in base64 encoding and ed25519 key type. Got: "+JSON.stringify(n))}getChainKeyParams(){return{scheme:"ed25519",encoding:"strkey"}}};export{a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="@crossmint/wallets-sdk",t="1.
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="@crossmint/wallets-sdk",t="1.11.0";var p="WALLETS_SDK",c= exports.b =t,r= exports.c =s,a= exports.d =200;exports.a = p; exports.b = c; exports.c = r; exports.d = a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-VCOKK7C2.js";var s={type:"email",validateConfig(e){if(!("email"in e)||e.email==null)throw new Error("Email signer requires an email address")},buildInternalConfig(e,i){let r=e,o=n(e);return{type:"email",email:r.email,locator:o,address:i.walletAddress,crossmint:i.crossmint,clientTEEConnection:i.clientTEEConnection,resetSignerFrame:i.resetSignerFrame,onAuthRequired:i.onAuthRequired}},canAutoAssemble(){return!0},addSignerPayload(e){return n(e)},matchesRecovery(e,i){return n(e)===n(i)},adoptsRecoveryConfigOnMatch:!0,signerUnavailableReason:()=>null};export{s as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CrossmintSDKError as e,JWTDecryptionError as M,JWTExpiredError as B,JWTIdentifierError as U,JWTInvalidError as v,NotAuthorizedError as K,WalletErrorCode as n}from"@crossmint/common-sdk-base";import{NotAuthorizedError as $,JWTExpiredError as Q,JWTInvalidError as rr,JWTDecryptionError as sr,JWTIdentifierError as tr}from"@crossmint/common-sdk-base";var o=class extends e{constructor(r,s){super(r,n.API_KEY_INVALID,s)}},c=class extends e{constructor(r,s){super(r,n.ENVIRONMENT_INVALID,s)}},i=class extends e{constructor(r,s){super(r,n.WALLET_CREATION_FAILED,s)}},I=class extends e{constructor(r,s){super(r,n.WALLET_TYPE_INVALID,s)}},E=class extends e{constructor(r,s){super(r,n.WALLET_NOT_AVAILABLE,s)}},p=class extends e{constructor(r,s){super(r,n.WALLET_NOT_AVAILABLE,s)}},A=class extends e{constructor(r,s){super(r,n.WALLET_CREATION_FAILED,s)}},x=class extends e{constructor(r,s){super(r,n.WALLET_TYPE_INVALID,s)}},N=class extends e{constructor(r,s){super(r,n.SIGNER_INVALID,s)}},u=class extends e{constructor(r,s){super(r,n.SIGNER_INVALID,s)}},g=class extends e{constructor(r,s){super(r,n.SIGNER_INVALID,s)}},j="DEVICE_SIGNER_NOT_SUPPORTED",_=class extends e{constructor(r,s){super(r,n.SIGNER_INVALID,s)}},T=class extends e{constructor(r,s){super(r,n.SIGNER_INVALID,s)}},d=class extends e{constructor(r,s){super(r,n.ENVIRONMENT_INVALID,s)}},R=class extends e{constructor(r,s){super(r,n.MESSAGE_INVALID,s)}},a=class extends e{constructor(r,s){super(r,n.MESSAGE_INVALID,s)}},l=class extends e{constructor(r,s){super(r,n.SIGNING_FAILED,s)}},L=class extends e{constructor(r,s){super(r,n.SIGNING_FAILED,s)}},D=class extends e{constructor(r,s){super(r,n.SIGNING_FAILED,s)}},O=class extends e{constructor(r,s){super(r,n.NO_SIGNATURE,s)}},S=class extends e{constructor(r,s){super(r,n.NO_SIGNATURE,s)}},W=class extends e{constructor(r,s){super(r,n.SIGNING_FAILED,s)}},C=class extends e{constructor(r,s){super(r,n.SIGNING_FAILED,s)}},G=class extends e{constructor(r,s){super(r,n.NO_TRANSACTION,s)}},V=class extends e{constructor(r,s){super(r,n.NO_TRANSACTION,s)}},J=class extends e{constructor(r,s){super(r,n.NO_TRANSACTION,s)}},w=class extends e{constructor(r,s){super(r,n.TRANSACTION_FAILED,s)}},F=class extends e{constructor(r,s){super(r,n.TRANSACTION_FAILED,s)}},f=class extends e{constructor(r,s){super(r,n.TRANSACTION_FAILED,s)}},h=class extends e{constructor(r,s){super(r,n.TRANSACTION_FAILED,s)}},y=class extends e{constructor(r,s){super(r,n.TRANSACTION_FAILED,s)}},P=class extends e{constructor(r,s){super(r,n.TRANSACTION_FAILED,s)}},m=class extends e{constructor(r,s){super(r,n.RECIPIENT_ADDRESS_INVALID,s)}};function Y(t){return typeof t=="object"&&t!=null}function H(t){var s;if(!Y(t)||t.code==null)return;let r=JSON.stringify(t);switch(t.code){case"ERROR_JWT_EXPIRED":throw new B(t.expiredAt,r);case"ERROR_JWT_INVALID":throw new v(r);case"ERROR_JWT_DECRYPTION":throw new M(r);case"ERROR_JWT_IDENTIFIER_ERROR":throw new U(t.identifierKey,r);case"ERROR_JWT_AUDIENCE_MISMATCH":throw new K((s=t.message)!=null?s:"JWT audience mismatch",r)}}export{o as a,c as b,i as c,I as d,E as e,p as f,A as g,x as h,N as i,u as j,g as k,j as l,_ as m,T as n,d as o,R as p,a as q,l as r,L as s,D as t,O as u,S as v,W as w,C as x,G as y,V as z,J as A,w as B,F as C,f as D,h as E,y as F,P as G,m as H,H as I,$ as J,Q as K,rr as L,sr as M,tr as N};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6ZAGINEScjs = require('./chunk-6ZAGINES.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var t=new _commonsdkbase.SdkLogger;function v(s){let o=_commonsdkbase.detectPlatform.call(void 0, ),e=_commonsdkbase.validateAPIKey.call(void 0, s);if(!e.isValid)throw new Error(`Invalid API key: ${e.message}`);let{environment:a,projectId:c}=e;switch(t.init({packageName:_chunk6ZAGINEScjs.c,packageVersion:_chunk6ZAGINEScjs.b,environment:a,projectId:c,platform:o}),o){case"browser":{let r=new (0, _commonsdkbase.BrowserDatadogSink)(a);t.addSink(r);break}case"react-native":break;case"server":{let r=new (0, _commonsdkbase.ServerDatadogSink)(a);t.addSink(r);break}default:break}}exports.a = t; exports.b = v;
|
|
@@ -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 _chunk7O3W4JAPcjs = require('./chunk-7O3W4JAP.cjs');var _chunk6ZAGINEScjs = require('./chunk-6ZAGINES.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');function R(i,o,a,r){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var h,d;let{timeoutMs:e=6e4,initialBackoffMs:u=500,backoffMultiplier:n=1.5,maxBackoffMs:f=2e3,fastWindowMs:L=5e3}=r!=null?r:{};_chunk7O3W4JAPcjs.a.info("wallet.approve: waiting for transaction confirmation",{transactionId:a,timeoutMs:e});let p=Date.now(),c=u,t;do{if(Date.now()-p>e)throw new (0, _chunkXZ4NKVEBcjs.B)("Transaction confirmation timeout");let s=Date.now();if(t=yield i.getTransaction(o,a),t.error)throw _chunkXZ4NKVEBcjs.I.call(void 0, t),new (0, _chunkXZ4NKVEBcjs.A)(JSON.stringify(t));if(t.status!=="pending")break;let T=Date.now()-p;T>L&&(c=Math.min(Math.round(c*n),f));let v=Date.now()-s;yield D(Math.max(1,Math.min(c-v,e-T)))}while(!0);if(t.status==="failed")throw new (0, _chunkXZ4NKVEBcjs.C)(`Transaction sending failed: ${JSON.stringify(t)}`);if(t.status==="awaiting-approval")throw new (0, _chunkXZ4NKVEBcjs.D)("Transaction is awaiting approval. Please submit required approvals before waiting for completion.");let P="txHash"in t.onChain&&typeof t.onChain.txHash=="string"?t.onChain.txHash:void 0,g=(h=t.onChain.txId)!=null?h:P;if(g==null)throw new (0, _chunkXZ4NKVEBcjs.E)("Transaction hash not found on transaction response");return{hash:g,explorerLink:(d=t.onChain.explorerLink)!=null?d:"",transactionId:t.id}})}function W(i,o,a,r){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let{timeoutMs:e=6e4}=r!=null?r:{},u=Date.now(),n=null;do{if(Date.now()-u>e)throw new (0, _chunkXZ4NKVEBcjs.x)("Signature confirmation timeout");if(yield new Promise(f=>setTimeout(f,_chunk6ZAGINEScjs.d)),n=yield i.getSignature(o,a),"error"in n)throw _chunkXZ4NKVEBcjs.I.call(void 0, n),new (0, _chunkXZ4NKVEBcjs.v)(JSON.stringify(n))}while(n===null||n.status==="pending");if(n.status==="failed")throw new (0, _chunkXZ4NKVEBcjs.s)("Signature signing failed");if(!n.outputSignature)throw new (0, _chunkXZ4NKVEBcjs.v)("Signature not available");return{signature:n.outputSignature,signatureId:a}})}function D(i){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return new Promise(o=>setTimeout(o,i))})}exports.a = R; exports.b = W;
|
|
@@ -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 _commonsdkauth = require('@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(_commonsdkauth.isEmailValid.call(void 0, 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 (0, _chunkXZ4NKVEBcjs.g)(m(i,s,e))}}}exports.a = u; exports.b = l; exports.c = d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{H as i}from"./chunk-7FEY62ID.js";import{isValidAddress as t}from"@crossmint/common-sdk-base";function d(r){if(typeof r=="string"){if(!t(r))throw new i(`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 p(r,e){return t(r)?`${e}:${r}`:`${e}:${r.toLowerCase()}`}export{d as a,p as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGMU3ZYLScjs = require('./chunk-GMU3ZYLS.cjs');var _chunkOV256XVKcjs = require('./chunk-OV256XVK.cjs');var _chunkQ3LD5CYJcjs = require('./chunk-Q3LD5CYJ.cjs');var _chunkQPCZFIUVcjs = require('./chunk-QPCZFIUV.cjs');var _chunkXZ4NKVEBcjs = require('./chunk-XZ4NKVEB.cjs');var _chunk7O3W4JAPcjs = require('./chunk-7O3W4JAP.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');var l,m,C,p,y,n,b,A,k,L,K,P,u,V,F,q,B,$,N= exports.a =class{constructor(r){_chunkDSIFRRBScjs.e.call(void 0, this,u);_chunkDSIFRRBScjs.e.call(void 0, this,l,"unknown");_chunkDSIFRRBScjs.e.call(void 0, this,m,!1);_chunkDSIFRRBScjs.e.call(void 0, this,C);_chunkDSIFRRBScjs.e.call(void 0, this,p);_chunkDSIFRRBScjs.e.call(void 0, this,y);_chunkDSIFRRBScjs.e.call(void 0, this,n);_chunkDSIFRRBScjs.e.call(void 0, this,b);_chunkDSIFRRBScjs.e.call(void 0, this,A);_chunkDSIFRRBScjs.e.call(void 0, this,k);_chunkDSIFRRBScjs.e.call(void 0, this,L);_chunkDSIFRRBScjs.e.call(void 0, this,K);_chunkDSIFRRBScjs.e.call(void 0, this,P);_chunkDSIFRRBScjs.f.call(void 0, this,C,r.chain),_chunkDSIFRRBScjs.f.call(void 0, this,p,r.walletAddress),_chunkDSIFRRBScjs.f.call(void 0, this,y,r.options),_chunkDSIFRRBScjs.f.call(void 0, this,n,r.signerManager),_chunkDSIFRRBScjs.f.call(void 0, this,b,r.serverSignerResolver),_chunkDSIFRRBScjs.f.call(void 0, this,A,r.signers),_chunkDSIFRRBScjs.f.call(void 0, this,k,r.addSigner),_chunkDSIFRRBScjs.f.call(void 0, this,L,r.removeSigner),_chunkDSIFRRBScjs.f.call(void 0, this,K,r.approveSignature),_chunkDSIFRRBScjs.f.call(void 0, this,P,r.approveTransaction)}get needsRecovery(){return _chunkDSIFRRBScjs.d.call(void 0, this,l)==="needs-recovery"}onSignerSelected(){_chunkDSIFRRBScjs.d.call(void 0, this,l)==="needs-recovery"&&_chunkDSIFRRBScjs.f.call(void 0, this,l,"unknown")}initDeviceSigner(){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var g;if(((g=_chunkDSIFRRBScjs.d.call(void 0, this,y))==null?void 0:g.deviceSignerKeyStorage)==null||_chunkDSIFRRBScjs.d.call(void 0, this,m))return;let i={type:"device"};try{yield this.resolveAvailability(i)}catch(S){_chunk7O3W4JAPcjs.a.error("wallet.initDeviceSigner.error",{error:S}),_chunkDSIFRRBScjs.f.call(void 0, this,l,"needs-recovery");return}if(_chunkDSIFRRBScjs.d.call(void 0, this,l)==="needs-recovery")return;let a=_chunkOV256XVKcjs.a.call(void 0, i.type).buildInternalConfig(i,_chunkDSIFRRBScjs.d.call(void 0, this,n).descriptorContext()),t=yield _chunkDSIFRRBScjs.d.call(void 0, this,n).assemble(a);_chunkDSIFRRBScjs.d.call(void 0, this,n).setActiveSigner(t),_chunkDSIFRRBScjs.d.call(void 0, this,n).isApprovedSignerStatus(t.status)||(_chunk7O3W4JAPcjs.a.info("wallet.initDeviceSigner.pendingApproval",{signerLocator:t.locator(),status:t.status}),_chunkDSIFRRBScjs.f.call(void 0, this,l,"needs-recovery"))})}recover(){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var D;if(_chunk7O3W4JAPcjs.a.info("wallet.recover.start"),_chunkDSIFRRBScjs.d.call(void 0, this,l)==="resolved"){_chunk7O3W4JAPcjs.a.info("wallet.recover.skipped",{reason:"Device signer already approved (cached)"});return}if(_chunkDSIFRRBScjs.d.call(void 0, this,m)){_chunk7O3W4JAPcjs.a.info("wallet.recover.skipped",{reason:"device signer not supported (cached)"}),_chunkDSIFRRBScjs.f.call(void 0, this,l,"resolved");return}let r=_chunkDSIFRRBScjs.d.call(void 0, this,n).activeSigner;if((r==null?void 0:r.type)==="device"&&(yield _chunkDSIFRRBScjs.g.call(void 0, this,u,F).call(this,r))){_chunkDSIFRRBScjs.f.call(void 0, this,l,"resolved");return}if(r!=null&&r.type!=="device"){_chunk7O3W4JAPcjs.a.warn("wallet.recover.skipped",{reason:"Recovery is only supported for device signers"}),_chunkDSIFRRBScjs.f.call(void 0, this,l,"unknown");return}let i=(D=_chunkDSIFRRBScjs.d.call(void 0, this,y))==null?void 0:D.deviceSignerKeyStorage;if(i==null){if(_chunkDSIFRRBScjs.d.call(void 0, this,l)!=="needs-recovery")return;throw new Error("Device signer key storage is required to recover a device signer")}let a=yield _chunkDSIFRRBScjs.d.call(void 0, this,A).call(this),t=yield _chunkDSIFRRBScjs.g.call(void 0, this,u,B).call(this,i,a);if(t!=null&&(yield _chunkDSIFRRBScjs.g.call(void 0, this,u,F).call(this,t))){_chunkDSIFRRBScjs.d.call(void 0, this,n).setActiveSigner(t),_chunkDSIFRRBScjs.f.call(void 0, this,l,"resolved");let c=t.locator().replace("device:","");try{yield i.mapAddressToKey(_chunkDSIFRRBScjs.d.call(void 0, this,p),c)}catch(z){_chunk7O3W4JAPcjs.a.warn("wallet.recover.mapAddressToKey.error",{error:z})}return}let g=a.filter(c=>c.type==="device"),S=_chunkDSIFRRBScjs.g.call(void 0, this,u,V).call(this,g,i),v=yield _chunkGMU3ZYLScjs.a.call(void 0, i,_chunkDSIFRRBScjs.d.call(void 0, this,p));try{yield _chunkDSIFRRBScjs.d.call(void 0, this,k).call(this,v)}catch(c){if(c instanceof _chunkXZ4NKVEBcjs.m){_chunk7O3W4JAPcjs.a.info("wallet.recover.device.unsupportedFallback",{signerLocator:v.locator}),yield i.deleteKey(_chunkDSIFRRBScjs.d.call(void 0, this,p)),_chunkDSIFRRBScjs.f.call(void 0, this,m,!0),_chunkDSIFRRBScjs.f.call(void 0, this,l,"resolved"),yield _chunkDSIFRRBScjs.g.call(void 0, this,u,$).call(this);return}else if(G(c))_chunk7O3W4JAPcjs.a.info("wallet.recover.skipped",{reason:"Device signer already approved",signerLocator:v.locator});else throw c instanceof _chunkQPCZFIUVcjs.a||c instanceof Error&&c.name==="AuthRejectedError"?(_chunk7O3W4JAPcjs.a.info("wallet.recover.device.authRejected",{signerLocator:v.locator}),c):c instanceof _chunkQPCZFIUVcjs.b||c instanceof Error&&c.name==="OtpValidationError"?(_chunk7O3W4JAPcjs.a.warn("wallet.recover.device.otpValidationFailed",{signerLocator:v.locator,code:c instanceof _chunkQPCZFIUVcjs.b?c.code:void 0}),c):(_chunk7O3W4JAPcjs.a.error("wallet.recover.device.error",{error:c}),yield i.deleteKey(_chunkDSIFRRBScjs.d.call(void 0, this,p)),c)}let h=yield _chunkDSIFRRBScjs.d.call(void 0, this,n).assemble({type:"device",locator:v.locator,address:_chunkDSIFRRBScjs.d.call(void 0, this,p)});if(_chunkDSIFRRBScjs.d.call(void 0, this,n).setActiveSigner(h),h.type==="device"&&(h.status="success"),_chunk7O3W4JAPcjs.a.info("wallet.recover.device.success",{signerLocator:v.locator}),_chunkDSIFRRBScjs.f.call(void 0, this,l,"resolved"),S!=null)try{yield _chunkDSIFRRBScjs.d.call(void 0, this,L).call(this,S),_chunk7O3W4JAPcjs.a.info("wallet.recover.staleSignerRemoved",{signerLocator:S})}catch(c){_chunk7O3W4JAPcjs.a.warn("wallet.recover.staleSignerRemovalFailed",{signerLocator:S,error:c})}})}resolveAvailability(r){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var S;let i=(S=_chunkDSIFRRBScjs.d.call(void 0, this,y))==null?void 0:S.deviceSignerKeyStorage;if(i==null)throw new Error("Device signer key storage is required for device signers");let a=yield i.getKey(_chunkDSIFRRBScjs.d.call(void 0, this,p));if(a!=null){r.locator=`device:${a}`,_chunkDSIFRRBScjs.f.call(void 0, this,l,"unknown");return}let g=(yield _chunkDSIFRRBScjs.d.call(void 0, this,A).call(this)).filter(v=>v.locator.startsWith("device:"));for(let v of g){let h=v.locator.replace("device:","");if(yield i.hasKey(h)){yield i.mapAddressToKey(_chunkDSIFRRBScjs.d.call(void 0, this,p),h),r.locator=v.locator,_chunkDSIFRRBScjs.f.call(void 0, this,l,"unknown");return}}_chunkDSIFRRBScjs.f.call(void 0, this,l,"needs-recovery")})}tryResolveLocallyAvailableSigner(t){return _chunkDSIFRRBScjs.h.call(void 0, this,arguments,function*(r,i=(a=>(a=_chunkDSIFRRBScjs.d.call(void 0, this,y))==null?void 0:a.deviceSignerKeyStorage)()){if(i==null)return null;try{return yield _chunkQ3LD5CYJcjs.b.call(void 0, _chunkDSIFRRBScjs.d.call(void 0, this,C),r,_chunkDSIFRRBScjs.d.call(void 0, this,p),i)}catch(g){return _chunk7O3W4JAPcjs.a.warn("wallet.deviceRecovery.tryResolveLocallyAvailableSigner.failed",{signerLocator:r,error:g}),null}})}};l=new WeakMap,m=new WeakMap,C=new WeakMap,p=new WeakMap,y=new WeakMap,n=new WeakMap,b=new WeakMap,A=new WeakMap,k=new WeakMap,L=new WeakMap,K=new WeakMap,P=new WeakMap,u=new WeakSet,V=function(r,i){if(r.length===0)return;if(r.length===1)return r[0].locator;let a=i.getDeviceName(),t=r.filter(g=>g.name===a);return t.length===1?t[0].locator:void 0},F=function(r){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var a;if(_chunkDSIFRRBScjs.d.call(void 0, this,n).isApprovedSignerStatus(r.status))return _chunk7O3W4JAPcjs.a.info("wallet.recover.skipped",{reason:"Device signer already approved"}),!0;let i=yield _chunkDSIFRRBScjs.d.call(void 0, this,n).getSignerState(r.locator());return r.status=(a=i.signer)==null?void 0:a.status,i.pendingOperation!=null?(yield _chunkDSIFRRBScjs.g.call(void 0, this,u,q).call(this,r,i.pendingOperation),!0):_chunkDSIFRRBScjs.d.call(void 0, this,n).isApprovedSignerStatus(r.status)?(_chunk7O3W4JAPcjs.a.info("wallet.recover.skipped",{reason:"Device signer already approved"}),!0):!1})},q=function(r,i){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var h;let a=_chunkDSIFRRBScjs.d.call(void 0, this,n).activeSigner,t=_chunkDSIFRRBScjs.d.call(void 0, this,n).recovery;if(_chunkQPCZFIUVcjs.f.call(void 0, t)&&!_chunkDSIFRRBScjs.d.call(void 0, this,b).hasRecoveryResolution)throw new Error('Cannot resume pending approval: no secret available. Call wallet.useSigner({ type: "server", secret: ... }) first with the recovery server secret.');let g=_chunkOV256XVKcjs.a.call(void 0, t.type),S=_chunkDSIFRRBScjs.d.call(void 0, this,n).descriptorContext();if(t.type==="external-wallet"&&!g.canAutoAssemble(t,S))throw new Error('Cannot resume pending approval: no onSign callback available. Call wallet.useSigner({ type: "external-wallet", address: "0x...", onSign: async (tx) => ... }) first.');let v=g.buildInternalConfig(t,S);_chunkDSIFRRBScjs.d.call(void 0, this,n).setActiveSigner(_chunkQ3LD5CYJcjs.a.call(void 0, _chunkDSIFRRBScjs.d.call(void 0, this,C),v,(h=_chunkDSIFRRBScjs.d.call(void 0, this,y))==null?void 0:h.deviceSignerKeyStorage));try{i.type==="signature"?yield _chunkDSIFRRBScjs.d.call(void 0, this,K).call(this,i.id):yield _chunkDSIFRRBScjs.d.call(void 0, this,P).call(this,i.id)}catch(D){throw _chunkDSIFRRBScjs.d.call(void 0, this,n).setActiveSigner(r),D}finally{_chunkDSIFRRBScjs.d.call(void 0, this,n).activeSigner!==r&&_chunkDSIFRRBScjs.d.call(void 0, this,n).setActiveSigner(a)}r.status="success",_chunk7O3W4JAPcjs.a.info("wallet.recover.device.success",{signerLocator:r.locator(),resumed:!0})})},B=function(r,i){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let a=i.filter(t=>t.locator.startsWith("device:"));for(let t of a){let g=yield this.tryResolveLocallyAvailableSigner(t.locator,r);if(g!=null)return _chunk7O3W4JAPcjs.a.info("wallet.recover.foundLocalDeviceSigner",{signerLocator:t.locator}),g}return null})},$=function(){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let r=_chunkDSIFRRBScjs.d.call(void 0, this,n).recovery,i=_chunkOV256XVKcjs.a.call(void 0, r.type),a=_chunkDSIFRRBScjs.d.call(void 0, this,n).descriptorContext();if(i.canAutoAssemble(r,a))try{let t=i.buildInternalConfig(r,a);_chunkDSIFRRBScjs.d.call(void 0, this,n).setActiveSigner(yield _chunkDSIFRRBScjs.d.call(void 0, this,n).assemble(t,{isAdminSigner:!0}))}catch(t){_chunk7O3W4JAPcjs.a.warn("wallet.recover.device.unsupportedFallback.autoAssemblyFailed",{recoveryType:r.type,error:t})}})};function G(x){if(!(x instanceof Error))return!1;let r=x.message.toLowerCase();return r.includes("delegated signer")&&r.includes("already")&&r.includes("approved")}exports.a = N;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b as r}from"./chunk-NU7VF7MC.js";function l(t){switch(t.type){case"passkey":return{type:"passkey",id:t.id,name:t.name,publicKey:t.publicKey,validatorContractVersion:t.validatorContractVersion,locator:t.locator};case"api-key":return{type:"api-key",address:t.address,locator:t.locator};case"external-wallet":return{type:"external-wallet",address:t.address,locator:t.locator};case"email":return{type:"email",email:t.email,address:t.address,locator:t.locator};case"phone":return{type:"phone",phone:t.phone,address:t.address,locator:t.locator};case"device":return{type:"device",publicKey:t.publicKey,locator:t.locator,name:t.name};case"server":return{type:"server",address:t.address,locator:t.locator};default:throw new Error(`Unknown signer type: ${t.type}`)}}function i(t,n){let e=l(t),s="scopes"in t?t.scopes:void 0;if(n==="solana"||n==="stellar"){let o="success";return"transaction"in t&&t.transaction!=null&&(o=t.transaction.status),a(r(a({},e),{status:o}),s!=null&&{scopes:s})}if("chains"in t&&t.chains!=null&&Object.keys(t.chains).length>0){let o=t.chains[n];return o==null?null:a(r(a({},e),{status:o.status}),s!=null&&{scopes:s})}return a(r(a({},e),{status:"success"}),s!=null&&{scopes:s})}function d(t,n){if(n==="solana"||n==="stellar")return"transaction"in t&&t.transaction!=null&&(t.transaction.status==="pending"||t.transaction.status==="awaiting-approval")?{type:"transaction",id:t.transaction.id}:null;if("chains"in t&&t.chains!=null){let e=t.chains[n];if(e!=null&&(e.status==="pending"||e.status==="awaiting-approval"))return{type:"onChain"in e?"transaction":"signature",id:e.id}}return null}function y(t,n){let e=r(a({},t),{status:n});return t.locator.indexOf(":")===-1&&(t.type==="api-key"?e.locator=t.locator:(e.locator=`external-wallet:${t.locator}`,e.type="external-wallet")),e}export{l as a,i as b,d as c,y as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkW6L7J3KLcjs = require('./chunk-W6L7J3KL.cjs');var t={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 _chunkW6L7J3KLcjs.a.call(void 0, n)},matchesRecovery(n,e){return _chunkW6L7J3KLcjs.a.call(void 0, n)===_chunkW6L7J3KLcjs.a.call(void 0, e)},adoptsRecoveryConfigOnMatch:!0,signerUnavailableReason:()=>null};exports.a = t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-3TZJ6D4G.js";import{a as W}from"./chunk-URQQBUUX.js";import{q as l,u as f,z as w}from"./chunk-7FEY62ID.js";import{a as n}from"./chunk-TJBIBZMF.js";import{c as u,h as p}from"./chunk-NU7VF7MC.js";import{createPublicClient as O,encodeFunctionData as x,http as E}from"viem";import{isValidEvmAddress as A,WithLoggerContext as h}from"@crossmint/common-sdk-base";var c=class c extends o{constructor(e){super({chain:e.chain,address:e.address,owner:e.owner,options:o.getOptions(e),alias:e.alias,recovery:o.getRecovery(e),apiRecoveryServerSignerAddress:o.getApiRecoveryServerSignerAddress(e),apiDelegatedServerSignerAddresses:o.getApiDelegatedServerSignerAddresses(e),signer:e.signer,signers:o.getInitialSigners(e)},o.getApiClient(e))}static from(e){if(!A(e.address))throw new Error("Wallet is not an EVM wallet");return new c(e)}sendTransaction(e){return p(this,null,function*(){var i;n.info("evmWallet.sendTransaction.start"),yield this.preAuthIfNeeded();let t=this.buildTransaction(e),r=yield this.createTransaction(t,e.options);if((i=e.options)!=null&&i.prepareOnly)return n.info("evmWallet.sendTransaction.prepared",{transactionId:r.id}),{hash:void 0,explorerLink:void 0,transactionId:r.id};let a=yield this.approveTransactionAndWait(r.id);return n.info("evmWallet.sendTransaction.success",{transactionId:r.id,hash:a.hash}),a})}signMessage(e){return p(this,null,function*(){var i;n.info("evmWallet.signMessage.start"),yield this.preAuthIfNeeded();let t=this.signerManager.require(),r=yield this.apiClient.createSignature(this.walletLocator,{type:"message",params:{message:e.message,signer:t.locator(),chain:this.chain}});if("error"in r)throw n.error("evmWallet.signMessage.error",{error:r}),new f(JSON.stringify(r));if((i=e.options)!=null&&i.prepareOnly)return n.info("evmWallet.signMessage.prepared",{signatureId:r.id}),{signature:void 0,signatureId:r.id};let a=yield this.approveSignatureAndWait(r.id);return n.info("evmWallet.signMessage.success",{signatureId:r.id}),a})}signTypedData(e){return p(this,null,function*(){var C;n.info("evmWallet.signTypedData.start"),yield this.preAuthIfNeeded();let t=this.signerManager.require(),{domain:r,message:a,primaryType:i,types:g,chain:T}=e;if(!r||!a||!g||!T)throw n.error("evmWallet.signTypedData.error",{error:"Invalid typed data"}),new l("Invalid typed data");let{name:m,version:v,chainId:S,verifyingContract:I,salt:b}=r;if(!m||!v||!S||!I)throw n.error("evmWallet.signTypedData.error",{error:"Invalid typed data domain"}),new l("Invalid typed data domain");let d=yield this.apiClient.createSignature(this.walletLocator,{type:"typed-data",params:{typedData:{domain:{name:m,version:v,chainId:Number(S),verifyingContract:I,salt:b},message:y(a),primaryType:i,types:g},signer:t.locator(),chain:T}});if("error"in d)throw n.error("evmWallet.signTypedData.error",{error:d}),new f(JSON.stringify(d));if((C=e.options)!=null&&C.prepareOnly)return n.info("evmWallet.signTypedData.prepared",{signatureId:d.id}),{signature:void 0,signatureId:d.id};let D=yield this.approveSignatureAndWait(d.id);return n.info("evmWallet.signTypedData.success",{signatureId:d.id}),D})}getViemClient(e){var t;return O({transport:(t=e==null?void 0:e.transport)!=null?t:E(),chain:W(this.chain)})}createTransaction(e,t){return p(this,null,function*(){let r;(t==null?void 0:t.signer)==null?r=this.signerManager.require().locator():typeof t.signer=="string"?r=t.signer:r=this.resolveServerSignerApiLocator(t.signer);let a=yield this.apiClient.createTransaction(this.walletLocator,{params:{signer:r,chain:this.chain,calls:[e]}});if("error"in a)throw new w(JSON.stringify(a));return a})}buildTransaction(e){var t,r,a,i,g;if("transaction"in e)return{transaction:e.transaction};if(e.abi==null)return{to:e.to,value:(r=(t=e.value)==null?void 0:t.toString())!=null?r:"0",data:(a=e.data)!=null?a:"0x"};if(!e.functionName)throw new Error("Function name is required");return{to:e.to,value:(g=(i=e.value)==null?void 0:i.toString())!=null?g:"0",data:x({abi:e.abi,functionName:e.functionName,args:e.args})}}};u([h({logger:n,methodName:"evmWallet.sendTransaction",buildContext(e){return{chain:e.chain,address:e.address}}})],c.prototype,"sendTransaction",1),u([h({logger:n,methodName:"evmWallet.signMessage",buildContext(e){return{chain:e.chain,address:e.address}}})],c.prototype,"signMessage",1),u([h({logger:n,methodName:"evmWallet.signTypedData",buildContext(e){return{chain:e.chain,address:e.address}}})],c.prototype,"signTypedData",1);var M=c;function y(s){return typeof s=="bigint"?s.toString():Array.isArray(s)?s.map(y):s!==null&&typeof s=="object"?Object.fromEntries(Object.entries(s).map(([e,t])=>[e,y(t)])):s}export{M as a};
|