@crossmint/wallets-sdk 0.21.0 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/api/__tests__/constants.cjs +1 -31
- package/dist/api/__tests__/constants.d.cts +9 -1
- package/dist/api/__tests__/constants.d.ts +9 -1
- package/dist/api/__tests__/constants.js +1 -31
- package/dist/api/__tests__/test-utils.cjs +1 -372
- package/dist/api/__tests__/test-utils.d.cts +10 -4
- package/dist/api/__tests__/test-utils.d.ts +10 -4
- package/dist/api/__tests__/test-utils.js +1 -372
- package/dist/api/client.cjs +1 -10
- package/dist/api/client.d.cts +14 -6
- package/dist/api/client.d.ts +14 -6
- package/dist/api/client.js +1 -10
- package/dist/api/gen/client.gen.cjs +1 -7
- package/dist/api/gen/client.gen.js +1 -7
- package/dist/api/gen/index.cjs +1 -79
- 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 -79
- package/dist/api/gen/sdk.gen.cjs +1 -78
- package/dist/api/gen/sdk.gen.d.cts +2 -9
- package/dist/api/gen/sdk.gen.d.ts +2 -9
- package/dist/api/gen/sdk.gen.js +1 -78
- package/dist/api/gen/types.gen.d.cts +593 -92
- package/dist/api/gen/types.gen.d.ts +593 -92
- package/dist/api/gen/types.gen.js +1 -1
- package/dist/api/index.cjs +1 -12
- package/dist/api/index.d.cts +7 -1
- package/dist/api/index.d.ts +7 -1
- package/dist/api/index.js +1 -12
- package/dist/api/types.d.cts +11 -55
- package/dist/api/types.d.ts +11 -55
- package/dist/api/types.js +1 -1
- package/dist/chains/chains.cjs +1 -24
- package/dist/chains/chains.js +1 -24
- package/dist/chains/definitions/arcTestnet.cjs +1 -7
- package/dist/chains/definitions/arcTestnet.js +1 -7
- package/dist/chains/definitions/story.cjs +1 -7
- package/dist/chains/definitions/story.js +1 -7
- package/dist/chains/definitions/storyTestnet.cjs +1 -7
- package/dist/chains/definitions/storyTestnet.js +1 -7
- package/dist/chains/definitions/tempo.cjs +1 -7
- package/dist/chains/definitions/tempo.js +1 -7
- package/dist/chains/definitions/tempoTestnet.cjs +1 -7
- package/dist/chains/definitions/tempoTestnet.js +1 -7
- package/dist/chunk-2GKPWQBQ.cjs +1 -0
- package/dist/chunk-2YLRFJ66.js +1 -0
- package/dist/chunk-3HLCTEWX.js +1 -0
- package/dist/chunk-4ADZVYB5.cjs +1 -0
- package/dist/chunk-576HP23H.cjs +1 -0
- package/dist/chunk-5M7IRODB.js +1 -0
- package/dist/chunk-5QIW67NU.cjs +1 -0
- package/dist/chunk-5X4EOJFG.cjs +1 -0
- package/dist/chunk-5YG5A77Q.js +1 -0
- package/dist/chunk-67Z4SJMH.js +1 -0
- package/dist/chunk-6MGMZ3SI.cjs +1 -0
- package/dist/chunk-6OXELDPD.js +1 -0
- package/dist/chunk-7VUOD7EI.cjs +1 -0
- package/dist/chunk-A33BEWR7.cjs +1 -0
- package/dist/chunk-BEW7JDW6.cjs +1 -0
- package/dist/chunk-BFIHTTMM.cjs +1 -0
- package/dist/chunk-BW27ZG6O.cjs +1 -0
- package/dist/chunk-CUHDOBKN.cjs +1 -0
- package/dist/chunk-D5YDWSO5.cjs +1 -0
- package/dist/chunk-DIGDDKSF.js +1 -0
- package/dist/chunk-EE4ITUGS.js +1 -0
- package/dist/chunk-EIHK5TYE.js +1 -0
- package/dist/chunk-ENU3EKBG.cjs +1 -0
- package/dist/chunk-F6PYIH4E.cjs +1 -0
- package/dist/chunk-FT5EVMLB.js +1 -0
- package/dist/chunk-G5R6VQGJ.js +1 -0
- package/dist/chunk-GDRKG42L.cjs +1 -0
- package/dist/chunk-GEY574TH.cjs +1 -0
- package/dist/chunk-GOXB2RBF.js +1 -0
- package/dist/chunk-HOWDLODW.cjs +1 -0
- package/dist/chunk-HRUMWG2F.cjs +1 -0
- package/dist/chunk-IFD3BVMM.js +1 -0
- package/dist/chunk-IR5WN6FQ.cjs +1 -0
- package/dist/chunk-ISXH7QXG.cjs +1 -0
- package/dist/chunk-J33QM2ID.cjs +1 -0
- package/dist/chunk-J3R36SGJ.js +1 -0
- package/dist/chunk-JBP52JOH.cjs +1 -0
- package/dist/chunk-JINIR3YK.cjs +1 -0
- package/dist/chunk-JJMKQ5PK.cjs +1 -0
- package/dist/chunk-JLT4EA2Z.js +1 -0
- package/dist/chunk-JUKCHXJ6.cjs +1 -0
- package/dist/chunk-KKQBZXFE.js +1 -0
- package/dist/chunk-KUP7H7X2.js +1 -0
- package/dist/chunk-LB4V5KKI.js +1 -0
- package/dist/chunk-MCBBBEJT.js +1 -0
- package/dist/chunk-MMFZP54X.js +1 -0
- package/dist/chunk-N5WVT7QE.js +1 -0
- package/dist/chunk-NCXMTHC4.js +1 -0
- package/dist/chunk-NF7KU2ML.cjs +1 -0
- package/dist/chunk-NJWSHT2H.cjs +1 -0
- package/dist/chunk-NKR3UAMA.cjs +1 -0
- package/dist/chunk-NPCKXKQ7.js +1 -0
- package/dist/chunk-NX256LAH.cjs +1 -0
- package/dist/chunk-O4FVTK7X.cjs +1 -0
- package/dist/chunk-O6VBO7KG.js +1 -0
- package/dist/chunk-OQZTL6ZG.js +1 -0
- package/dist/chunk-P6MB5P2F.js +1 -0
- package/dist/chunk-PDHWPAGW.js +1 -0
- package/dist/chunk-PHXT77LR.js +1 -0
- package/dist/chunk-PKYRYRX4.js +1 -0
- package/dist/chunk-PSXRNSOE.js +1 -0
- package/dist/chunk-R3EQXI46.js +1 -0
- package/dist/chunk-RC6KDONJ.cjs +1 -0
- package/dist/chunk-RLAW2ERD.js +1 -0
- package/dist/chunk-RN77IYDQ.js +1 -0
- package/dist/chunk-RXRRXB74.cjs +1 -0
- package/dist/chunk-S3DMYMEQ.js +1 -0
- package/dist/chunk-S3DYQVRD.js +1 -0
- package/dist/chunk-S4O54O4C.cjs +1 -0
- package/dist/chunk-S5KDZFZ7.cjs +1 -0
- package/dist/chunk-SCEPJO4Q.cjs +1 -0
- package/dist/chunk-SH7KRBXV.js +1 -0
- package/dist/chunk-SP2YD44M.js +1 -0
- package/dist/chunk-SPTXAOFR.cjs +1 -0
- package/dist/chunk-SPVAZXRY.js +1 -0
- package/dist/chunk-STYSP6KL.cjs +1 -0
- package/dist/chunk-SVIKBM3S.js +1 -0
- package/dist/chunk-TFMNBTFK.cjs +1 -0
- package/dist/chunk-TOAFCAVT.js +0 -0
- package/dist/chunk-TTSJFEM5.cjs +1 -0
- package/dist/chunk-TYFWX53A.js +1 -0
- package/dist/chunk-U7QSF6P7.cjs +1 -0
- package/dist/chunk-UE3WVHTM.cjs +1 -0
- package/dist/chunk-W5EH3HYF.cjs +1 -0
- package/dist/chunk-WBIKVPHW.js +1 -0
- package/dist/chunk-WCGUGIGJ.js +1 -0
- package/dist/chunk-WT5MDUZY.js +1 -0
- package/dist/chunk-WTVI4AL4.js +1 -0
- package/dist/chunk-WYMBO52A.js +1 -0
- package/dist/chunk-XNZLCUTY.js +1 -0
- package/dist/chunk-XS5B3TUE.js +1 -0
- package/dist/chunk-YFAJXQAM.cjs +1 -0
- package/dist/chunk-YGL4ITFK.cjs +1 -0
- package/dist/chunk-YLRD3ANZ.cjs +1 -0
- package/dist/chunk-YQQWKSNT.cjs +1 -0
- package/dist/chunk-ZACCKNGY.cjs +1 -0
- package/dist/chunk-ZE4NT3CJ.js +1 -0
- package/dist/chunk-ZKL4RO4I.cjs +1 -0
- package/dist/index.cjs +1 -69
- package/dist/index.d.cts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.js +1 -69
- package/dist/logger/index.cjs +1 -11
- package/dist/logger/index.js +1 -11
- package/dist/logger/init.cjs +1 -10
- package/dist/logger/init.js +1 -10
- package/dist/sdk.cjs +1 -48
- package/dist/sdk.d.cts +25 -23
- package/dist/sdk.d.ts +25 -23
- package/dist/sdk.js +1 -48
- package/dist/signers/device.cjs +1 -0
- package/dist/signers/device.d.cts +23 -0
- package/dist/signers/device.d.ts +23 -0
- package/dist/signers/device.js +1 -0
- package/dist/signers/evm-api-key.cjs +1 -7
- package/dist/signers/evm-api-key.d.cts +8 -4
- package/dist/signers/evm-api-key.d.ts +8 -4
- package/dist/signers/evm-api-key.js +1 -7
- package/dist/signers/evm-external-wallet.cjs +1 -7
- package/dist/signers/evm-external-wallet.d.cts +13 -14
- package/dist/signers/evm-external-wallet.d.ts +13 -14
- package/dist/signers/evm-external-wallet.js +1 -7
- package/dist/signers/external-wallet-signer.cjs +1 -0
- package/dist/signers/external-wallet-signer.d.cts +28 -0
- package/dist/signers/external-wallet-signer.d.ts +28 -0
- package/dist/signers/external-wallet-signer.js +1 -0
- package/dist/signers/index.cjs +1 -33
- package/dist/signers/index.d.cts +7 -3
- package/dist/signers/index.d.ts +7 -3
- package/dist/signers/index.js +1 -33
- package/dist/signers/non-custodial/index.cjs +1 -27
- package/dist/signers/non-custodial/index.d.cts +7 -3
- package/dist/signers/non-custodial/index.d.ts +7 -3
- package/dist/signers/non-custodial/index.js +1 -27
- package/dist/signers/non-custodial/ncs-evm-signer.cjs +1 -13
- package/dist/signers/non-custodial/ncs-evm-signer.d.cts +7 -3
- package/dist/signers/non-custodial/ncs-evm-signer.d.ts +7 -3
- package/dist/signers/non-custodial/ncs-evm-signer.js +1 -13
- package/dist/signers/non-custodial/ncs-iframe-manager.cjs +1 -7
- package/dist/signers/non-custodial/ncs-iframe-manager.js +1 -7
- package/dist/signers/non-custodial/ncs-signer.cjs +1 -14
- package/dist/signers/non-custodial/ncs-signer.d.cts +8 -4
- package/dist/signers/non-custodial/ncs-signer.d.ts +8 -4
- package/dist/signers/non-custodial/ncs-signer.js +1 -14
- package/dist/signers/non-custodial/ncs-solana-signer.cjs +1 -13
- package/dist/signers/non-custodial/ncs-solana-signer.d.cts +7 -3
- package/dist/signers/non-custodial/ncs-solana-signer.d.ts +7 -3
- package/dist/signers/non-custodial/ncs-solana-signer.js +1 -13
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +1 -13
- package/dist/signers/non-custodial/ncs-stellar-signer.d.cts +7 -3
- package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +7 -3
- package/dist/signers/non-custodial/ncs-stellar-signer.js +1 -13
- package/dist/signers/passkey.cjs +1 -7
- package/dist/signers/passkey.d.cts +8 -4
- package/dist/signers/passkey.d.ts +8 -4
- package/dist/signers/passkey.js +1 -7
- package/dist/signers/server/assemble-server-signer.cjs +1 -14
- package/dist/signers/server/assemble-server-signer.d.cts +6 -2
- package/dist/signers/server/assemble-server-signer.d.ts +6 -2
- package/dist/signers/server/assemble-server-signer.js +1 -14
- package/dist/signers/server/evm-server-signer.cjs +1 -7
- package/dist/signers/server/evm-server-signer.d.cts +8 -4
- package/dist/signers/server/evm-server-signer.d.ts +8 -4
- package/dist/signers/server/evm-server-signer.js +1 -7
- package/dist/signers/server/helpers/derive-server-signer.cjs +1 -11
- package/dist/signers/server/helpers/derive-server-signer.d.cts +6 -2
- package/dist/signers/server/helpers/derive-server-signer.d.ts +6 -2
- package/dist/signers/server/helpers/derive-server-signer.js +1 -11
- package/dist/signers/server/helpers/get-chain-type.cjs +1 -7
- package/dist/signers/server/helpers/get-chain-type.js +1 -7
- package/dist/signers/server/helpers/index.cjs +1 -15
- package/dist/signers/server/helpers/index.d.cts +6 -2
- package/dist/signers/server/helpers/index.d.ts +6 -2
- package/dist/signers/server/helpers/index.js +1 -15
- package/dist/signers/server/index.cjs +1 -29
- package/dist/signers/server/index.d.cts +6 -2
- package/dist/signers/server/index.d.ts +6 -2
- package/dist/signers/server/index.js +1 -29
- package/dist/signers/server/solana-server-signer.cjs +1 -7
- package/dist/signers/server/solana-server-signer.d.cts +8 -4
- package/dist/signers/server/solana-server-signer.d.ts +8 -4
- package/dist/signers/server/solana-server-signer.js +1 -7
- package/dist/signers/server/stellar-server-signer.cjs +1 -7
- package/dist/signers/server/stellar-server-signer.d.cts +8 -4
- package/dist/signers/server/stellar-server-signer.d.ts +8 -4
- package/dist/signers/server/stellar-server-signer.js +1 -7
- package/dist/signers/solana-api-key.cjs +1 -7
- package/dist/signers/solana-api-key.d.cts +8 -4
- package/dist/signers/solana-api-key.d.ts +8 -4
- package/dist/signers/solana-api-key.js +1 -7
- package/dist/signers/solana-external-wallet.cjs +1 -8
- package/dist/signers/solana-external-wallet.d.cts +10 -11
- package/dist/signers/solana-external-wallet.d.ts +10 -11
- package/dist/signers/solana-external-wallet.js +1 -8
- package/dist/signers/stellar-external-wallet.cjs +1 -7
- package/dist/signers/stellar-external-wallet.d.cts +10 -10
- package/dist/signers/stellar-external-wallet.d.ts +10 -10
- package/dist/signers/stellar-external-wallet.js +1 -7
- package/dist/signers/types.cjs +1 -9
- package/dist/signers/types.d.cts +10 -102
- package/dist/signers/types.d.ts +10 -102
- package/dist/signers/types.js +1 -9
- package/dist/types/base32.js.d.cjs +1 -0
- package/dist/types/base32.js.d.d.cts +4 -0
- package/dist/types/base32.js.d.d.ts +4 -0
- package/dist/types/base32.js.d.js +0 -0
- package/dist/types-BDRS_MOb.d.ts +425 -0
- package/dist/types-D-xASbms.d.cts +425 -0
- package/dist/utils/constants.cjs +1 -13
- package/dist/utils/constants.js +1 -13
- package/dist/utils/device-signers/DeviceSignerKeyStorage.cjs +1 -0
- package/dist/utils/device-signers/DeviceSignerKeyStorage.d.cts +66 -0
- package/dist/utils/device-signers/DeviceSignerKeyStorage.d.ts +66 -0
- package/dist/utils/device-signers/DeviceSignerKeyStorage.js +1 -0
- package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.cjs +1 -0
- package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.d.cts +48 -0
- package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.d.ts +48 -0
- package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.js +1 -0
- package/dist/utils/device-signers/createDeviceSigner.cjs +1 -0
- package/dist/utils/device-signers/createDeviceSigner.d.cts +27 -0
- package/dist/utils/device-signers/createDeviceSigner.d.ts +27 -0
- package/dist/utils/device-signers/createDeviceSigner.js +1 -0
- package/dist/utils/device-signers/index.cjs +1 -0
- package/dist/utils/device-signers/index.d.cts +13 -0
- package/dist/utils/device-signers/index.d.ts +13 -0
- package/dist/utils/device-signers/index.js +1 -0
- package/dist/utils/errors.cjs +1 -55
- package/dist/utils/errors.js +1 -55
- package/dist/utils/server-key-derivation.cjs +1 -9
- package/dist/utils/server-key-derivation.js +1 -9
- package/dist/utils/signer-locator.cjs +1 -0
- package/dist/utils/signer-locator.d.cts +26 -0
- package/dist/utils/signer-locator.d.ts +26 -0
- package/dist/utils/signer-locator.js +1 -0
- package/dist/utils/signer-mapping.cjs +1 -0
- package/dist/utils/signer-mapping.d.cts +32 -0
- package/dist/utils/signer-mapping.d.ts +32 -0
- package/dist/utils/signer-mapping.js +1 -0
- package/dist/utils/signer-validation.cjs +1 -10
- package/dist/utils/signer-validation.js +1 -10
- package/dist/wallets/__tests__/setup.cjs +1 -36
- package/dist/wallets/__tests__/setup.js +1 -36
- package/dist/wallets/__tests__/test-helpers.cjs +1 -102
- package/dist/wallets/__tests__/test-helpers.d.cts +6 -6
- package/dist/wallets/__tests__/test-helpers.d.ts +6 -6
- package/dist/wallets/__tests__/test-helpers.js +1 -102
- package/dist/wallets/evm.cjs +1 -34
- package/dist/wallets/evm.d.cts +2 -3
- package/dist/wallets/evm.d.ts +2 -3
- package/dist/wallets/evm.js +1 -34
- package/dist/wallets/solana.cjs +1 -35
- package/dist/wallets/solana.d.cts +5 -4
- package/dist/wallets/solana.d.ts +5 -4
- package/dist/wallets/solana.js +1 -35
- package/dist/wallets/stellar.cjs +1 -34
- package/dist/wallets/stellar.d.cts +2 -3
- package/dist/wallets/stellar.d.ts +2 -3
- package/dist/wallets/stellar.js +1 -34
- package/dist/wallets/types.d.cts +9 -171
- package/dist/wallets/types.d.ts +9 -171
- package/dist/wallets/wallet-factory.cjs +1 -42
- package/dist/wallets/wallet-factory.d.cts +17 -13
- package/dist/wallets/wallet-factory.d.ts +17 -13
- package/dist/wallets/wallet-factory.js +1 -42
- package/dist/wallets/wallet.cjs +1 -33
- package/dist/wallets/wallet.d.cts +97 -32
- package/dist/wallets/wallet.d.ts +97 -32
- package/dist/wallets/wallet.js +1 -33
- package/package.json +9 -5
- package/dist/chunk-2I2OFGNL.js +0 -36
- package/dist/chunk-2M32LBCA.cjs +0 -52
- package/dist/chunk-2PSAUSOG.js +0 -379
- package/dist/chunk-2RG6642I.js +0 -39
- package/dist/chunk-2T5HHKUI.js +0 -19
- package/dist/chunk-3U6UAYOV.js +0 -25
- package/dist/chunk-3WZUNLYI.cjs +0 -16
- package/dist/chunk-47WKYTRN.js +0 -63
- package/dist/chunk-4GFSUI2I.cjs +0 -66
- package/dist/chunk-4Z3YDHHG.js +0 -82
- package/dist/chunk-4ZWUI6LE.cjs +0 -757
- package/dist/chunk-55V4VMTX.cjs +0 -25
- package/dist/chunk-65KPNJ77.js +0 -119
- package/dist/chunk-7EZDSDKA.cjs +0 -125
- package/dist/chunk-7GOUUPS4.js +0 -36
- package/dist/chunk-7SUWMK4J.cjs +0 -246
- package/dist/chunk-7USEVMTW.cjs +0 -21
- package/dist/chunk-7W4HGN3H.cjs +0 -63
- package/dist/chunk-ASE2FXWP.js +0 -65
- package/dist/chunk-BR4UVMIC.js +0 -332
- package/dist/chunk-BUBSPQ7U.cjs +0 -332
- package/dist/chunk-CPZQ7BK5.cjs +0 -82
- package/dist/chunk-CTOLL4BK.js +0 -29
- package/dist/chunk-DDNG224J.cjs +0 -45
- package/dist/chunk-EVR4CD53.js +0 -63
- package/dist/chunk-F7L2TZ3I.cjs +0 -21
- package/dist/chunk-FOOISYCJ.js +0 -66
- package/dist/chunk-FZQG6OX2.js +0 -323
- package/dist/chunk-G6QJHFSY.cjs +0 -74
- package/dist/chunk-GJT2JD3E.js +0 -45
- package/dist/chunk-GLUD6EBN.js +0 -16
- package/dist/chunk-H6WV5NRT.js +0 -10
- package/dist/chunk-HFEF2URB.js +0 -84
- package/dist/chunk-HTSQPZHW.cjs +0 -25
- package/dist/chunk-HWTWDQYT.cjs +0 -42
- package/dist/chunk-HYA3ESUA.js +0 -69
- package/dist/chunk-IOMKHF6R.cjs +0 -44
- package/dist/chunk-IPO25BCU.js +0 -43
- package/dist/chunk-JSWTGW46.cjs +0 -36
- package/dist/chunk-JWMQALLN.js +0 -21
- package/dist/chunk-K6LSGLG6.js +0 -42
- package/dist/chunk-KHY5FXO4.cjs +0 -37
- package/dist/chunk-KT3CVXFG.js +0 -9
- package/dist/chunk-M47ZHA7Q.js +0 -246
- package/dist/chunk-M4HCASMG.cjs +0 -119
- package/dist/chunk-M6IPPGXQ.cjs +0 -29
- package/dist/chunk-M7OPRXZH.cjs +0 -69
- package/dist/chunk-MIKWTXUA.cjs +0 -223
- package/dist/chunk-MMISP35W.js +0 -21
- package/dist/chunk-MNHK6EQK.cjs +0 -57
- package/dist/chunk-NIBKCMQ2.cjs +0 -19
- package/dist/chunk-NO2KMGS2.cjs +0 -379
- package/dist/chunk-OPKFMXPI.cjs +0 -39
- package/dist/chunk-OXB6RTW7.js +0 -125
- package/dist/chunk-P4XJHOLW.cjs +0 -253
- package/dist/chunk-PIFD6KNH.js +0 -59
- package/dist/chunk-PJOJIRTY.js +0 -74
- package/dist/chunk-PK7J3Y3L.js +0 -44
- package/dist/chunk-Q52MMQSC.js +0 -57
- package/dist/chunk-Q5KNPVYI.cjs +0 -59
- package/dist/chunk-QQNDLR6E.cjs +0 -323
- package/dist/chunk-RBHGZDDX.cjs +0 -58
- package/dist/chunk-RHR6P2KP.cjs +0 -15
- package/dist/chunk-RUQYXEEG.cjs +0 -10
- package/dist/chunk-S2L5Z2ZT.js +0 -37
- package/dist/chunk-SGINWAB6.js +0 -155
- package/dist/chunk-T5NKL6F4.js +0 -89
- package/dist/chunk-U56Z2EOR.cjs +0 -89
- package/dist/chunk-UO2J2ZB2.cjs +0 -65
- package/dist/chunk-VLZ5ZS5U.js +0 -253
- package/dist/chunk-VTF3WCXG.cjs +0 -84
- package/dist/chunk-VVPGO564.js +0 -757
- package/dist/chunk-WJUPOCKJ.js +0 -15
- package/dist/chunk-X4SPF4KJ.js +0 -223
- package/dist/chunk-XC2V34TS.cjs +0 -155
- package/dist/chunk-XEPUH4XH.js +0 -52
- package/dist/chunk-XOCC3MPK.cjs +0 -36
- package/dist/chunk-ZBLW42YE.js +0 -25
- package/dist/chunk-ZNAGDENG.cjs +0 -43
- package/dist/chunk-ZP4ZZCIE.js +0 -58
- package/dist/chunk-ZT7EGOCI.cjs +0 -9
- package/dist/chunk-ZTEMOYS2.cjs +0 -63
|
@@ -1,24 +1,24 @@
|
|
|
1
|
+
import { WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.cjs';
|
|
1
2
|
import { ApiClient } from '../api/client.cjs';
|
|
2
|
-
import { FundWalletResponse, GetTransactionsResponse, GetTransactionSuccessResponse,
|
|
3
|
-
import { WalletNftsResponseDto, WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.cjs';
|
|
4
|
-
import { WalletOptions, Balances, SendTokenTransactionOptions, UserLocator, Transaction, PrepareOnly, ApproveParams, ApproveResult, AddDelegatedSignerOptions, AddDelegatedSignerReturnType, DelegatedSigner, ApproveOptions, Signature } from './types.cjs';
|
|
3
|
+
import { f as WalletOptions, o as SignerConfigForChain, x as Signer, B as Balances, V as FundWalletResponse, X as GetTransactionsResponse, Y as GetTransactionSuccessResponse, T as Transfers, Z as SendTokenTransactionOptions, _ as UserLocator, c as Transaction, L as PrepareOnly, $ as ApproveParams, a0 as ApproveResult, a1 as AddSignerOptions, n as ServerSignerConfig, l as ExternalWalletRegistrationConfig, a2 as AddSignerReturnType, D as DelegatedSigner, p as SignerLocator, U as WalletLocator, a3 as ApproveOptions, a4 as ApproveSignatureResponse, h as Signature } from '../types-D-xASbms.cjs';
|
|
5
4
|
import { Chain } from '../chains/chains.cjs';
|
|
6
|
-
import { Signer, ServerSignerConfig } from '../signers/types.cjs';
|
|
7
5
|
import '@crossmint/common-sdk-base';
|
|
8
|
-
import 'viem';
|
|
9
6
|
import '@solana/web3.js';
|
|
10
7
|
import '@crossmint/client-sdk-window';
|
|
11
8
|
import '@crossmint/client-signers';
|
|
9
|
+
import 'viem';
|
|
12
10
|
import 'abitype';
|
|
13
11
|
import 'ox';
|
|
12
|
+
import '../utils/device-signers/DeviceSignerKeyStorage.cjs';
|
|
14
13
|
|
|
15
14
|
type WalletContructorType<C extends Chain> = {
|
|
16
15
|
chain: C;
|
|
17
16
|
address: string;
|
|
18
17
|
owner?: string;
|
|
19
18
|
alias?: string;
|
|
20
|
-
signer: Signer;
|
|
21
19
|
options?: WalletOptions;
|
|
20
|
+
recovery: SignerConfigForChain<C>;
|
|
21
|
+
signer?: Signer;
|
|
22
22
|
};
|
|
23
23
|
declare class Wallet<C extends Chain> {
|
|
24
24
|
#private;
|
|
@@ -26,18 +26,26 @@ declare class Wallet<C extends Chain> {
|
|
|
26
26
|
address: string;
|
|
27
27
|
owner?: string;
|
|
28
28
|
alias?: string;
|
|
29
|
-
signer: Signer;
|
|
30
29
|
constructor(args: WalletContructorType<C>, apiClient: ApiClient);
|
|
30
|
+
get signer(): Signer | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Initialize the device signer by resolving key availability.
|
|
33
|
+
* If a device key is found locally, assembles the signer immediately.
|
|
34
|
+
* If not, flags the wallet for recovery so a key is generated during the next transaction.
|
|
35
|
+
* Device signers are not supported for Solana (Squads does not support device signer registration).
|
|
36
|
+
*/
|
|
37
|
+
private initDeviceSigner;
|
|
31
38
|
protected static getApiClient<C extends Chain>(wallet: Wallet<C>): ApiClient;
|
|
32
39
|
protected static getOptions<C extends Chain>(wallet: Wallet<C>): WalletOptions | undefined;
|
|
40
|
+
protected static getRecovery<C extends Chain>(wallet: Wallet<C>): SignerConfigForChain<C>;
|
|
33
41
|
protected get apiClient(): ApiClient;
|
|
34
42
|
protected get options(): WalletOptions | undefined;
|
|
35
43
|
/**
|
|
36
|
-
* Get the
|
|
37
|
-
* @returns The
|
|
44
|
+
* Get the recovery signer config
|
|
45
|
+
* @returns The recovery signer config
|
|
38
46
|
* @experimental This API is experimental and may change in the future
|
|
39
47
|
*/
|
|
40
|
-
|
|
48
|
+
get recovery(): SignerConfigForChain<C>;
|
|
41
49
|
/**
|
|
42
50
|
* Get the wallet balances - always includes USDC and native token (ETH/SOL)
|
|
43
51
|
* @param {string[]} tokens - Additional tokens to request (optional: native token and usdc are always included)
|
|
@@ -68,31 +76,32 @@ declare class Wallet<C extends Chain> {
|
|
|
68
76
|
* @param {number} params.page - The page number
|
|
69
77
|
* @param {WalletLocator} [params.locator] - The locator
|
|
70
78
|
* @returns The NFTs
|
|
71
|
-
* @experimental This API is experimental and may change in the future
|
|
72
79
|
*/
|
|
73
|
-
|
|
80
|
+
nfts(params: {
|
|
74
81
|
perPage: number;
|
|
75
82
|
page: number;
|
|
76
|
-
}): Promise<
|
|
83
|
+
}): Promise<unknown>;
|
|
77
84
|
/**
|
|
78
85
|
* Get the wallet transactions
|
|
79
86
|
* @returns The transactions
|
|
80
87
|
* @throws {Error} If the transactions cannot be retrieved
|
|
81
88
|
*/
|
|
82
|
-
|
|
89
|
+
transactions(): Promise<GetTransactionsResponse>;
|
|
83
90
|
/**
|
|
84
91
|
* Get a transaction by id
|
|
85
92
|
* @returns The transaction
|
|
86
93
|
* @throws {Error} If the transaction cannot be retrieved
|
|
87
94
|
*/
|
|
88
|
-
|
|
95
|
+
transaction(transactionId: string): Promise<GetTransactionSuccessResponse>;
|
|
89
96
|
/**
|
|
90
|
-
* Get the wallet
|
|
91
|
-
* @returns The
|
|
92
|
-
* @
|
|
93
|
-
* @throws {Error} If the activity cannot be retrieved
|
|
97
|
+
* Get the wallet transfers
|
|
98
|
+
* @returns The transfers
|
|
99
|
+
* @throws {Error} If the transfers cannot be retrieved
|
|
94
100
|
*/
|
|
95
|
-
|
|
101
|
+
transfers(params: {
|
|
102
|
+
tokens: string;
|
|
103
|
+
status: "successful" | "failed";
|
|
104
|
+
}): Promise<Transfers>;
|
|
96
105
|
/**
|
|
97
106
|
* Send a token to a wallet or user locator
|
|
98
107
|
* @param {string | UserLocator} to - The recipient (address or user locator)
|
|
@@ -108,7 +117,7 @@ declare class Wallet<C extends Chain> {
|
|
|
108
117
|
* @param params - The parameters
|
|
109
118
|
* @param params.transactionId - The transaction id
|
|
110
119
|
* @param params.options - The options for the transaction
|
|
111
|
-
* @param params.options.
|
|
120
|
+
* @param params.options.approval - The approval
|
|
112
121
|
* @param params.options.additionalSigners - The additional signers
|
|
113
122
|
* @returns The transaction
|
|
114
123
|
*/
|
|
@@ -119,28 +128,84 @@ declare class Wallet<C extends Chain> {
|
|
|
119
128
|
* @param params.transactionId - The transaction id or
|
|
120
129
|
* @param params.signatureId - The signature id
|
|
121
130
|
* @param params.options - The options for the transaction
|
|
122
|
-
* @param params.options.
|
|
131
|
+
* @param params.options.approval - The approval
|
|
123
132
|
* @param params.options.additionalSigners - The additional signers
|
|
124
133
|
* @returns The transaction or signature
|
|
125
134
|
*/
|
|
126
135
|
approve<T extends ApproveParams>(params: T): Promise<ApproveResult<T>>;
|
|
127
136
|
/**
|
|
128
|
-
* Add a
|
|
129
|
-
*
|
|
137
|
+
* Add a signer to the wallet.
|
|
138
|
+
* Always uses the recovery signer internally to approve the registration.
|
|
139
|
+
* If the signer being added is the current operational signer, it will be reassembled with the new locator.
|
|
140
|
+
* Otherwise, the original signer is restored after the operation.
|
|
141
|
+
* @param signer - The signer configuration object
|
|
130
142
|
* @param options - The options for the operation
|
|
131
|
-
* @param options.
|
|
143
|
+
* @param options.prepareOnly - If true, returns the signer with approval ID without auto-approving
|
|
144
|
+
*/
|
|
145
|
+
addSigner<T extends AddSignerOptions | undefined = undefined>(signer: SignerConfigForChain<C> | ServerSignerConfig | ExternalWalletRegistrationConfig, options?: T): Promise<T extends PrepareOnly<true> ? AddSignerReturnType<C> : DelegatedSigner>;
|
|
146
|
+
/**
|
|
147
|
+
* Set the active signer for this wallet.
|
|
148
|
+
* Accepts a signer locator string (e.g. "email:user@example.com") or a signer config object.
|
|
149
|
+
*
|
|
150
|
+
* For passkey signers: if no `id` is provided, the wallet will auto-select the passkey
|
|
151
|
+
* if exactly one passkey signer is registered. If multiple passkeys exist, an `id` must be specified.
|
|
152
|
+
*
|
|
153
|
+
* For device signers: if no device key is found locally, the signer will be created
|
|
154
|
+
* automatically during the next transaction (via recovery).
|
|
155
|
+
*
|
|
156
|
+
* For all other signer types: the signer must already be registered on the wallet.
|
|
157
|
+
*
|
|
158
|
+
* @param signer - The signer to use, by locator or config
|
|
159
|
+
*/
|
|
160
|
+
useSigner(signer: SignerLocator | SignerConfigForChain<C>): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Check if a signer is registered (delegated) in this wallet.
|
|
163
|
+
* @param signerLocator - The locator of the signer to check
|
|
164
|
+
* @returns true if the signer is registered
|
|
132
165
|
*/
|
|
133
|
-
|
|
134
|
-
signer: string | RegisterSignerPasskeyParams | ServerSignerConfig;
|
|
135
|
-
options?: T;
|
|
136
|
-
}): Promise<T extends PrepareOnly<true> ? AddDelegatedSignerReturnType<C> : void>;
|
|
166
|
+
signerIsRegistered(signerLocator: SignerLocator | string): Promise<boolean>;
|
|
137
167
|
/**
|
|
138
|
-
*
|
|
139
|
-
* @returns
|
|
168
|
+
* Whether the wallet needs recovery (signer registration) before the next transaction.
|
|
169
|
+
* @returns true if recovery is needed
|
|
140
170
|
*/
|
|
141
|
-
|
|
171
|
+
needsRecovery(): boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Register a device signer with the wallet using the recovery signer.
|
|
174
|
+
* Generates a new device key and registers it on-chain.
|
|
175
|
+
* Returns early if the device signer's locator is already approved on-chain.
|
|
176
|
+
*/
|
|
177
|
+
recover(): Promise<void>;
|
|
178
|
+
/**
|
|
179
|
+
* List the signers for this wallet.
|
|
180
|
+
* Returns full signer objects with status.
|
|
181
|
+
* For EVM wallets, only signers with an approval (pending or completed) for the wallet's chain are included.
|
|
182
|
+
* @returns {Promise<DelegatedSigner[]>} The signers
|
|
183
|
+
*/
|
|
184
|
+
signers(): Promise<DelegatedSigner[]>;
|
|
142
185
|
protected get walletLocator(): WalletLocator;
|
|
186
|
+
/**
|
|
187
|
+
* Ensures that a signer is available. Throws if the wallet is read-only.
|
|
188
|
+
*/
|
|
189
|
+
protected requireSigner(): Signer;
|
|
143
190
|
protected preAuthIfNeeded(): Promise<void>;
|
|
191
|
+
/**
|
|
192
|
+
* Parse a signer locator string or config object into a SignerConfigForChain.
|
|
193
|
+
*/
|
|
194
|
+
private resolveSignerInput;
|
|
195
|
+
/**
|
|
196
|
+
* Validate that the signer input has the required values for its type.
|
|
197
|
+
*/
|
|
198
|
+
private validateSignerInput;
|
|
199
|
+
/**
|
|
200
|
+
* Check if a device signer key is available locally, or flag for recovery.
|
|
201
|
+
* Looks up device key storage by wallet address, then by matching registered device signers.
|
|
202
|
+
* If no key is found, sets needsRecovery so a new device key is generated during the next transaction.
|
|
203
|
+
*/
|
|
204
|
+
private resolveDeviceSignerAvailability;
|
|
205
|
+
/**
|
|
206
|
+
* Build an InternalSignerConfig from a SignerConfigForChain.
|
|
207
|
+
*/
|
|
208
|
+
private buildInternalSignerConfig;
|
|
144
209
|
protected get isSolanaWallet(): boolean;
|
|
145
210
|
protected resolveChainForEnvironment(): C;
|
|
146
211
|
protected approveTransactionAndWait(transactionId: string, options?: ApproveOptions): Promise<{
|
package/dist/wallets/wallet.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
+
import { WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.js';
|
|
1
2
|
import { ApiClient } from '../api/client.js';
|
|
2
|
-
import { FundWalletResponse, GetTransactionsResponse, GetTransactionSuccessResponse,
|
|
3
|
-
import { WalletNftsResponseDto, WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.js';
|
|
4
|
-
import { WalletOptions, Balances, SendTokenTransactionOptions, UserLocator, Transaction, PrepareOnly, ApproveParams, ApproveResult, AddDelegatedSignerOptions, AddDelegatedSignerReturnType, DelegatedSigner, ApproveOptions, Signature } from './types.js';
|
|
3
|
+
import { f as WalletOptions, o as SignerConfigForChain, x as Signer, B as Balances, V as FundWalletResponse, X as GetTransactionsResponse, Y as GetTransactionSuccessResponse, T as Transfers, Z as SendTokenTransactionOptions, _ as UserLocator, c as Transaction, L as PrepareOnly, $ as ApproveParams, a0 as ApproveResult, a1 as AddSignerOptions, n as ServerSignerConfig, l as ExternalWalletRegistrationConfig, a2 as AddSignerReturnType, D as DelegatedSigner, p as SignerLocator, U as WalletLocator, a3 as ApproveOptions, a4 as ApproveSignatureResponse, h as Signature } from '../types-BDRS_MOb.js';
|
|
5
4
|
import { Chain } from '../chains/chains.js';
|
|
6
|
-
import { Signer, ServerSignerConfig } from '../signers/types.js';
|
|
7
5
|
import '@crossmint/common-sdk-base';
|
|
8
|
-
import 'viem';
|
|
9
6
|
import '@solana/web3.js';
|
|
10
7
|
import '@crossmint/client-sdk-window';
|
|
11
8
|
import '@crossmint/client-signers';
|
|
9
|
+
import 'viem';
|
|
12
10
|
import 'abitype';
|
|
13
11
|
import 'ox';
|
|
12
|
+
import '../utils/device-signers/DeviceSignerKeyStorage.js';
|
|
14
13
|
|
|
15
14
|
type WalletContructorType<C extends Chain> = {
|
|
16
15
|
chain: C;
|
|
17
16
|
address: string;
|
|
18
17
|
owner?: string;
|
|
19
18
|
alias?: string;
|
|
20
|
-
signer: Signer;
|
|
21
19
|
options?: WalletOptions;
|
|
20
|
+
recovery: SignerConfigForChain<C>;
|
|
21
|
+
signer?: Signer;
|
|
22
22
|
};
|
|
23
23
|
declare class Wallet<C extends Chain> {
|
|
24
24
|
#private;
|
|
@@ -26,18 +26,26 @@ declare class Wallet<C extends Chain> {
|
|
|
26
26
|
address: string;
|
|
27
27
|
owner?: string;
|
|
28
28
|
alias?: string;
|
|
29
|
-
signer: Signer;
|
|
30
29
|
constructor(args: WalletContructorType<C>, apiClient: ApiClient);
|
|
30
|
+
get signer(): Signer | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Initialize the device signer by resolving key availability.
|
|
33
|
+
* If a device key is found locally, assembles the signer immediately.
|
|
34
|
+
* If not, flags the wallet for recovery so a key is generated during the next transaction.
|
|
35
|
+
* Device signers are not supported for Solana (Squads does not support device signer registration).
|
|
36
|
+
*/
|
|
37
|
+
private initDeviceSigner;
|
|
31
38
|
protected static getApiClient<C extends Chain>(wallet: Wallet<C>): ApiClient;
|
|
32
39
|
protected static getOptions<C extends Chain>(wallet: Wallet<C>): WalletOptions | undefined;
|
|
40
|
+
protected static getRecovery<C extends Chain>(wallet: Wallet<C>): SignerConfigForChain<C>;
|
|
33
41
|
protected get apiClient(): ApiClient;
|
|
34
42
|
protected get options(): WalletOptions | undefined;
|
|
35
43
|
/**
|
|
36
|
-
* Get the
|
|
37
|
-
* @returns The
|
|
44
|
+
* Get the recovery signer config
|
|
45
|
+
* @returns The recovery signer config
|
|
38
46
|
* @experimental This API is experimental and may change in the future
|
|
39
47
|
*/
|
|
40
|
-
|
|
48
|
+
get recovery(): SignerConfigForChain<C>;
|
|
41
49
|
/**
|
|
42
50
|
* Get the wallet balances - always includes USDC and native token (ETH/SOL)
|
|
43
51
|
* @param {string[]} tokens - Additional tokens to request (optional: native token and usdc are always included)
|
|
@@ -68,31 +76,32 @@ declare class Wallet<C extends Chain> {
|
|
|
68
76
|
* @param {number} params.page - The page number
|
|
69
77
|
* @param {WalletLocator} [params.locator] - The locator
|
|
70
78
|
* @returns The NFTs
|
|
71
|
-
* @experimental This API is experimental and may change in the future
|
|
72
79
|
*/
|
|
73
|
-
|
|
80
|
+
nfts(params: {
|
|
74
81
|
perPage: number;
|
|
75
82
|
page: number;
|
|
76
|
-
}): Promise<
|
|
83
|
+
}): Promise<unknown>;
|
|
77
84
|
/**
|
|
78
85
|
* Get the wallet transactions
|
|
79
86
|
* @returns The transactions
|
|
80
87
|
* @throws {Error} If the transactions cannot be retrieved
|
|
81
88
|
*/
|
|
82
|
-
|
|
89
|
+
transactions(): Promise<GetTransactionsResponse>;
|
|
83
90
|
/**
|
|
84
91
|
* Get a transaction by id
|
|
85
92
|
* @returns The transaction
|
|
86
93
|
* @throws {Error} If the transaction cannot be retrieved
|
|
87
94
|
*/
|
|
88
|
-
|
|
95
|
+
transaction(transactionId: string): Promise<GetTransactionSuccessResponse>;
|
|
89
96
|
/**
|
|
90
|
-
* Get the wallet
|
|
91
|
-
* @returns The
|
|
92
|
-
* @
|
|
93
|
-
* @throws {Error} If the activity cannot be retrieved
|
|
97
|
+
* Get the wallet transfers
|
|
98
|
+
* @returns The transfers
|
|
99
|
+
* @throws {Error} If the transfers cannot be retrieved
|
|
94
100
|
*/
|
|
95
|
-
|
|
101
|
+
transfers(params: {
|
|
102
|
+
tokens: string;
|
|
103
|
+
status: "successful" | "failed";
|
|
104
|
+
}): Promise<Transfers>;
|
|
96
105
|
/**
|
|
97
106
|
* Send a token to a wallet or user locator
|
|
98
107
|
* @param {string | UserLocator} to - The recipient (address or user locator)
|
|
@@ -108,7 +117,7 @@ declare class Wallet<C extends Chain> {
|
|
|
108
117
|
* @param params - The parameters
|
|
109
118
|
* @param params.transactionId - The transaction id
|
|
110
119
|
* @param params.options - The options for the transaction
|
|
111
|
-
* @param params.options.
|
|
120
|
+
* @param params.options.approval - The approval
|
|
112
121
|
* @param params.options.additionalSigners - The additional signers
|
|
113
122
|
* @returns The transaction
|
|
114
123
|
*/
|
|
@@ -119,28 +128,84 @@ declare class Wallet<C extends Chain> {
|
|
|
119
128
|
* @param params.transactionId - The transaction id or
|
|
120
129
|
* @param params.signatureId - The signature id
|
|
121
130
|
* @param params.options - The options for the transaction
|
|
122
|
-
* @param params.options.
|
|
131
|
+
* @param params.options.approval - The approval
|
|
123
132
|
* @param params.options.additionalSigners - The additional signers
|
|
124
133
|
* @returns The transaction or signature
|
|
125
134
|
*/
|
|
126
135
|
approve<T extends ApproveParams>(params: T): Promise<ApproveResult<T>>;
|
|
127
136
|
/**
|
|
128
|
-
* Add a
|
|
129
|
-
*
|
|
137
|
+
* Add a signer to the wallet.
|
|
138
|
+
* Always uses the recovery signer internally to approve the registration.
|
|
139
|
+
* If the signer being added is the current operational signer, it will be reassembled with the new locator.
|
|
140
|
+
* Otherwise, the original signer is restored after the operation.
|
|
141
|
+
* @param signer - The signer configuration object
|
|
130
142
|
* @param options - The options for the operation
|
|
131
|
-
* @param options.
|
|
143
|
+
* @param options.prepareOnly - If true, returns the signer with approval ID without auto-approving
|
|
144
|
+
*/
|
|
145
|
+
addSigner<T extends AddSignerOptions | undefined = undefined>(signer: SignerConfigForChain<C> | ServerSignerConfig | ExternalWalletRegistrationConfig, options?: T): Promise<T extends PrepareOnly<true> ? AddSignerReturnType<C> : DelegatedSigner>;
|
|
146
|
+
/**
|
|
147
|
+
* Set the active signer for this wallet.
|
|
148
|
+
* Accepts a signer locator string (e.g. "email:user@example.com") or a signer config object.
|
|
149
|
+
*
|
|
150
|
+
* For passkey signers: if no `id` is provided, the wallet will auto-select the passkey
|
|
151
|
+
* if exactly one passkey signer is registered. If multiple passkeys exist, an `id` must be specified.
|
|
152
|
+
*
|
|
153
|
+
* For device signers: if no device key is found locally, the signer will be created
|
|
154
|
+
* automatically during the next transaction (via recovery).
|
|
155
|
+
*
|
|
156
|
+
* For all other signer types: the signer must already be registered on the wallet.
|
|
157
|
+
*
|
|
158
|
+
* @param signer - The signer to use, by locator or config
|
|
159
|
+
*/
|
|
160
|
+
useSigner(signer: SignerLocator | SignerConfigForChain<C>): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Check if a signer is registered (delegated) in this wallet.
|
|
163
|
+
* @param signerLocator - The locator of the signer to check
|
|
164
|
+
* @returns true if the signer is registered
|
|
132
165
|
*/
|
|
133
|
-
|
|
134
|
-
signer: string | RegisterSignerPasskeyParams | ServerSignerConfig;
|
|
135
|
-
options?: T;
|
|
136
|
-
}): Promise<T extends PrepareOnly<true> ? AddDelegatedSignerReturnType<C> : void>;
|
|
166
|
+
signerIsRegistered(signerLocator: SignerLocator | string): Promise<boolean>;
|
|
137
167
|
/**
|
|
138
|
-
*
|
|
139
|
-
* @returns
|
|
168
|
+
* Whether the wallet needs recovery (signer registration) before the next transaction.
|
|
169
|
+
* @returns true if recovery is needed
|
|
140
170
|
*/
|
|
141
|
-
|
|
171
|
+
needsRecovery(): boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Register a device signer with the wallet using the recovery signer.
|
|
174
|
+
* Generates a new device key and registers it on-chain.
|
|
175
|
+
* Returns early if the device signer's locator is already approved on-chain.
|
|
176
|
+
*/
|
|
177
|
+
recover(): Promise<void>;
|
|
178
|
+
/**
|
|
179
|
+
* List the signers for this wallet.
|
|
180
|
+
* Returns full signer objects with status.
|
|
181
|
+
* For EVM wallets, only signers with an approval (pending or completed) for the wallet's chain are included.
|
|
182
|
+
* @returns {Promise<DelegatedSigner[]>} The signers
|
|
183
|
+
*/
|
|
184
|
+
signers(): Promise<DelegatedSigner[]>;
|
|
142
185
|
protected get walletLocator(): WalletLocator;
|
|
186
|
+
/**
|
|
187
|
+
* Ensures that a signer is available. Throws if the wallet is read-only.
|
|
188
|
+
*/
|
|
189
|
+
protected requireSigner(): Signer;
|
|
143
190
|
protected preAuthIfNeeded(): Promise<void>;
|
|
191
|
+
/**
|
|
192
|
+
* Parse a signer locator string or config object into a SignerConfigForChain.
|
|
193
|
+
*/
|
|
194
|
+
private resolveSignerInput;
|
|
195
|
+
/**
|
|
196
|
+
* Validate that the signer input has the required values for its type.
|
|
197
|
+
*/
|
|
198
|
+
private validateSignerInput;
|
|
199
|
+
/**
|
|
200
|
+
* Check if a device signer key is available locally, or flag for recovery.
|
|
201
|
+
* Looks up device key storage by wallet address, then by matching registered device signers.
|
|
202
|
+
* If no key is found, sets needsRecovery so a new device key is generated during the next transaction.
|
|
203
|
+
*/
|
|
204
|
+
private resolveDeviceSignerAvailability;
|
|
205
|
+
/**
|
|
206
|
+
* Build an InternalSignerConfig from a SignerConfigForChain.
|
|
207
|
+
*/
|
|
208
|
+
private buildInternalSignerConfig;
|
|
144
209
|
protected get isSolanaWallet(): boolean;
|
|
145
210
|
protected resolveChainForEnvironment(): C;
|
|
146
211
|
protected approveTransactionAndWait(transactionId: string, options?: ApproveOptions): Promise<{
|
package/dist/wallets/wallet.js
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
Wallet
|
|
3
|
-
} from "../chunk-VVPGO564.js";
|
|
4
|
-
import "../chunk-L52GDMSH.js";
|
|
5
|
-
import "../chunk-CTOLL4BK.js";
|
|
6
|
-
import "../chunk-QM3BB4E2.js";
|
|
7
|
-
import "../chunk-S2L5Z2ZT.js";
|
|
8
|
-
import "../chunk-H6WV5NRT.js";
|
|
9
|
-
import "../chunk-GJT2JD3E.js";
|
|
10
|
-
import "../chunk-K6LSGLG6.js";
|
|
11
|
-
import "../chunk-2RG6642I.js";
|
|
12
|
-
import "../chunk-YDZRBHS3.js";
|
|
13
|
-
import "../chunk-HFEF2URB.js";
|
|
14
|
-
import "../chunk-4Z3YDHHG.js";
|
|
15
|
-
import "../chunk-T5NKL6F4.js";
|
|
16
|
-
import "../chunk-FZQG6OX2.js";
|
|
17
|
-
import "../chunk-FOOISYCJ.js";
|
|
18
|
-
import "../chunk-Q52MMQSC.js";
|
|
19
|
-
import "../chunk-WJUPOCKJ.js";
|
|
20
|
-
import "../chunk-X4SPF4KJ.js";
|
|
21
|
-
import "../chunk-ZBLW42YE.js";
|
|
22
|
-
import "../chunk-2T5HHKUI.js";
|
|
23
|
-
import "../chunk-3U6UAYOV.js";
|
|
24
|
-
import "../chunk-MMISP35W.js";
|
|
25
|
-
import "../chunk-JWMQALLN.js";
|
|
26
|
-
import "../chunk-SGINWAB6.js";
|
|
27
|
-
import "../chunk-455NK5LB.js";
|
|
28
|
-
import "../chunk-XEPUH4XH.js";
|
|
29
|
-
import "../chunk-GLUD6EBN.js";
|
|
30
|
-
import "../chunk-ASE2FXWP.js";
|
|
31
|
-
export {
|
|
32
|
-
Wallet
|
|
33
|
-
};
|
|
1
|
+
import{a}from"../chunk-WTVI4AL4.js";import"../chunk-GOXB2RBF.js";import"../chunk-N5WVT7QE.js";import"../chunk-MCBBBEJT.js";import"../chunk-L52GDMSH.js";import"../chunk-G5R6VQGJ.js";import"../chunk-QM3BB4E2.js";import"../chunk-PKYRYRX4.js";import"../chunk-OQZTL6ZG.js";import"../chunk-ZE4NT3CJ.js";import"../chunk-MMFZP54X.js";import"../chunk-WT5MDUZY.js";import"../chunk-YDZRBHS3.js";import"../chunk-RN77IYDQ.js";import"../chunk-3HLCTEWX.js";import"../chunk-67Z4SJMH.js";import"../chunk-SP2YD44M.js";import"../chunk-O6VBO7KG.js";import"../chunk-EE4ITUGS.js";import"../chunk-WCGUGIGJ.js";import"../chunk-XNZLCUTY.js";import"../chunk-LB4V5KKI.js";import"../chunk-SH7KRBXV.js";import"../chunk-XS5B3TUE.js";import"../chunk-EIHK5TYE.js";import"../chunk-WBIKVPHW.js";import"../chunk-WYMBO52A.js";import"../chunk-2YLRFJ66.js";import"../chunk-SPVAZXRY.js";import"../chunk-KUP7H7X2.js";import"../chunk-FT5EVMLB.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-S3DYQVRD.js";import"../chunk-PSXRNSOE.js";import"../chunk-455NK5LB.js";import"../chunk-R3EQXI46.js";import"../chunk-TYFWX53A.js";import"../chunk-J3R36SGJ.js";export{a as Wallet};
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossmint/wallets-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"repository": "https://github.com/Crossmint/crossmint-sdk",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Paella Labs Inc",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
10
|
-
"
|
|
11
|
-
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
}
|
|
12
14
|
},
|
|
13
15
|
"main": "./dist/index.cjs",
|
|
14
16
|
"module": "./dist/index.js",
|
|
@@ -22,15 +24,17 @@
|
|
|
22
24
|
"@solana/web3.js": "1.98.1",
|
|
23
25
|
"@stellar/stellar-sdk": "v14.0.0-rc.3",
|
|
24
26
|
"abitype": "1.0.8",
|
|
27
|
+
"base32.js": "0.1.0",
|
|
25
28
|
"bs58": "5.0.0",
|
|
26
29
|
"@noble/hashes": "1.8.0",
|
|
27
30
|
"ox": "0.6.9",
|
|
28
31
|
"tweetnacl": "1.0.3",
|
|
29
32
|
"viem": "2.33.1",
|
|
30
33
|
"@crossmint/client-sdk-window": "1.0.9",
|
|
34
|
+
"@crossmint/client-signers-cryptography": "0.0.4",
|
|
35
|
+
"@crossmint/common-sdk-auth": "1.1.0-beta.0",
|
|
31
36
|
"@crossmint/client-signers": "0.1.2",
|
|
32
|
-
"@crossmint/common-sdk-
|
|
33
|
-
"@crossmint/common-sdk-base": "0.9.20"
|
|
37
|
+
"@crossmint/common-sdk-base": "0.10.0-beta.0"
|
|
34
38
|
},
|
|
35
39
|
"devDependencies": {
|
|
36
40
|
"@hey-api/openapi-ts": "0.69.2",
|
package/dist/chunk-2I2OFGNL.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__async
|
|
3
|
-
} from "./chunk-ASE2FXWP.js";
|
|
4
|
-
|
|
5
|
-
// src/signers/solana-api-key.ts
|
|
6
|
-
var SolanaApiKeySigner = class {
|
|
7
|
-
constructor(config) {
|
|
8
|
-
this.config = config;
|
|
9
|
-
this.type = "api-key";
|
|
10
|
-
}
|
|
11
|
-
locator() {
|
|
12
|
-
return this.config.locator;
|
|
13
|
-
}
|
|
14
|
-
signMessage() {
|
|
15
|
-
return __async(this, null, function* () {
|
|
16
|
-
return yield Promise.reject(
|
|
17
|
-
new Error(
|
|
18
|
-
"API key signers do not support direct message signing - signatures are handled automatically by the backend"
|
|
19
|
-
)
|
|
20
|
-
);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
signTransaction() {
|
|
24
|
-
return __async(this, null, function* () {
|
|
25
|
-
return yield Promise.reject(
|
|
26
|
-
new Error(
|
|
27
|
-
"API key signers do not support direct transaction signing - transaction are handled automatically by the backend"
|
|
28
|
-
)
|
|
29
|
-
);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
SolanaApiKeySigner
|
|
36
|
-
};
|
package/dist/chunk-2M32LBCA.cjs
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunk3WZUNLYIcjs = require('./chunk-3WZUNLYI.cjs');
|
|
5
|
-
|
|
6
|
-
// src/logger/init.ts
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
14
|
-
var walletsLogger = new (0, _commonsdkbase.SdkLogger)();
|
|
15
|
-
function initWalletsLogger(apiKey) {
|
|
16
|
-
const platform = _commonsdkbase.detectPlatform.call(void 0, );
|
|
17
|
-
const validationResult = _commonsdkbase.validateAPIKey.call(void 0, apiKey);
|
|
18
|
-
if (!validationResult.isValid) {
|
|
19
|
-
throw new Error(`Invalid API key: ${validationResult.message}`);
|
|
20
|
-
}
|
|
21
|
-
const { environment, projectId } = validationResult;
|
|
22
|
-
walletsLogger.init({
|
|
23
|
-
packageName: _chunk3WZUNLYIcjs.SDK_NAME,
|
|
24
|
-
packageVersion: _chunk3WZUNLYIcjs.SDK_VERSION,
|
|
25
|
-
environment,
|
|
26
|
-
projectId,
|
|
27
|
-
platform
|
|
28
|
-
});
|
|
29
|
-
switch (platform) {
|
|
30
|
-
case "browser": {
|
|
31
|
-
const sink = new (0, _commonsdkbase.BrowserDatadogSink)(environment);
|
|
32
|
-
walletsLogger.addSink(sink);
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
case "react-native": {
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
case "server": {
|
|
39
|
-
const sink = new (0, _commonsdkbase.ServerDatadogSink)(environment);
|
|
40
|
-
walletsLogger.addSink(sink);
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
default: {
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
exports.walletsLogger = walletsLogger; exports.initWalletsLogger = initWalletsLogger;
|