@crossmint/wallets-sdk 0.20.2 → 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 +15 -6
- package/dist/api/client.d.ts +15 -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 -179
- 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 -179
- package/dist/api/gen/sdk.gen.cjs +1 -178
- package/dist/api/gen/sdk.gen.d.cts +18 -373
- package/dist/api/gen/sdk.gen.d.ts +18 -373
- package/dist/api/gen/sdk.gen.js +1 -178
- package/dist/api/gen/types.gen.d.cts +3125 -5778
- package/dist/api/gen/types.gen.d.ts +3125 -5778
- 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-5IC7UWND.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-IGRPHTXZ.cjs +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-L52GDMSH.js +0 -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-QM3BB4E2.js +0 -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 -60
- package/dist/index.d.cts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.js +1 -60
- 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 -39
- package/dist/sdk.d.cts +25 -23
- package/dist/sdk.d.ts +25 -23
- package/dist/sdk.js +1 -39
- 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 -24
- package/dist/signers/index.d.cts +7 -3
- package/dist/signers/index.d.ts +7 -3
- package/dist/signers/index.js +1 -24
- 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 -0
- package/dist/signers/server/assemble-server-signer.d.cts +15 -0
- package/dist/signers/server/assemble-server-signer.d.ts +15 -0
- package/dist/signers/server/assemble-server-signer.js +1 -0
- package/dist/signers/server/evm-server-signer.cjs +1 -0
- package/dist/signers/server/evm-server-signer.d.cts +29 -0
- package/dist/signers/server/evm-server-signer.d.ts +29 -0
- package/dist/signers/server/evm-server-signer.js +1 -0
- package/dist/signers/server/helpers/derive-server-signer.cjs +1 -0
- package/dist/signers/server/helpers/derive-server-signer.d.cts +19 -0
- package/dist/signers/server/helpers/derive-server-signer.d.ts +19 -0
- package/dist/signers/server/helpers/derive-server-signer.js +1 -0
- package/dist/signers/server/helpers/get-chain-type.cjs +1 -0
- package/dist/signers/server/helpers/get-chain-type.d.cts +7 -0
- package/dist/signers/server/helpers/get-chain-type.d.ts +7 -0
- package/dist/signers/server/helpers/get-chain-type.js +1 -0
- package/dist/signers/server/helpers/index.cjs +1 -0
- package/dist/signers/server/helpers/index.d.cts +13 -0
- package/dist/signers/server/helpers/index.d.ts +13 -0
- package/dist/signers/server/helpers/index.js +1 -0
- package/dist/signers/server/index.cjs +1 -0
- package/dist/signers/server/index.d.cts +16 -0
- package/dist/signers/server/index.d.ts +16 -0
- package/dist/signers/server/index.js +1 -0
- package/dist/signers/server/solana-server-signer.cjs +1 -0
- package/dist/signers/server/solana-server-signer.d.cts +29 -0
- package/dist/signers/server/solana-server-signer.d.ts +29 -0
- package/dist/signers/server/solana-server-signer.js +1 -0
- package/dist/signers/server/stellar-server-signer.cjs +1 -0
- package/dist/signers/server/stellar-server-signer.d.cts +29 -0
- package/dist/signers/server/stellar-server-signer.d.ts +29 -0
- package/dist/signers/server/stellar-server-signer.js +1 -0
- 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 -90
- package/dist/signers/types.d.ts +10 -90
- 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 -0
- package/dist/utils/server-key-derivation.d.cts +20 -0
- package/dist/utils/server-key-derivation.d.ts +20 -0
- package/dist/utils/server-key-derivation.js +1 -0
- 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 -93
- 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 -93
- package/dist/wallets/evm.cjs +1 -25
- package/dist/wallets/evm.d.cts +2 -3
- package/dist/wallets/evm.d.ts +2 -3
- package/dist/wallets/evm.js +1 -25
- package/dist/wallets/solana.cjs +1 -26
- package/dist/wallets/solana.d.cts +5 -4
- package/dist/wallets/solana.d.ts +5 -4
- package/dist/wallets/solana.js +1 -26
- package/dist/wallets/stellar.cjs +1 -25
- package/dist/wallets/stellar.d.cts +2 -3
- package/dist/wallets/stellar.d.ts +2 -3
- package/dist/wallets/stellar.js +1 -25
- package/dist/wallets/types.d.cts +9 -168
- package/dist/wallets/types.d.ts +9 -168
- package/dist/wallets/wallet-factory.cjs +1 -33
- 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 -33
- package/dist/wallets/wallet.cjs +1 -24
- package/dist/wallets/wallet.d.cts +97 -32
- package/dist/wallets/wallet.d.ts +97 -32
- package/dist/wallets/wallet.js +1 -24
- package/package.json +10 -5
- package/dist/chunk-2I2OFGNL.js +0 -36
- package/dist/chunk-2T5HHKUI.js +0 -19
- package/dist/chunk-2WBSPOWU.js +0 -223
- package/dist/chunk-3U6UAYOV.js +0 -25
- package/dist/chunk-47R3UV3J.cjs +0 -58
- package/dist/chunk-47WKYTRN.js +0 -63
- package/dist/chunk-4GFSUI2I.cjs +0 -66
- package/dist/chunk-55V4VMTX.cjs +0 -25
- package/dist/chunk-66UY53KP.cjs +0 -336
- package/dist/chunk-6FG5QXII.cjs +0 -110
- package/dist/chunk-6UMJYMAY.js +0 -82
- package/dist/chunk-7GOUUPS4.js +0 -36
- package/dist/chunk-7TT3VUDF.cjs +0 -84
- package/dist/chunk-7USEVMTW.cjs +0 -21
- package/dist/chunk-A6E67ZZP.js +0 -237
- package/dist/chunk-ABMZ3ZVN.js +0 -52
- package/dist/chunk-ASE2FXWP.js +0 -65
- package/dist/chunk-BMMZIPXT.js +0 -778
- package/dist/chunk-CMBFV325.js +0 -69
- package/dist/chunk-COR3CNRW.cjs +0 -778
- package/dist/chunk-F7L2TZ3I.cjs +0 -21
- package/dist/chunk-FHMKNG62.js +0 -741
- package/dist/chunk-FICVKSXZ.js +0 -84
- package/dist/chunk-FOOISYCJ.js +0 -66
- package/dist/chunk-G6QJHFSY.cjs +0 -74
- package/dist/chunk-HTSQPZHW.cjs +0 -25
- package/dist/chunk-HXJ3YPAN.js +0 -110
- package/dist/chunk-IDKGJO2G.cjs +0 -115
- package/dist/chunk-IOMKHF6R.cjs +0 -44
- package/dist/chunk-IPO25BCU.js +0 -43
- package/dist/chunk-JREZWZ2S.cjs +0 -52
- package/dist/chunk-JSWTGW46.cjs +0 -36
- package/dist/chunk-JWMQALLN.js +0 -21
- package/dist/chunk-KQH5ZXJ4.js +0 -336
- package/dist/chunk-KT3CVXFG.js +0 -9
- package/dist/chunk-MMISP35W.js +0 -21
- package/dist/chunk-MRZXYVQO.cjs +0 -82
- package/dist/chunk-NIBKCMQ2.cjs +0 -19
- package/dist/chunk-PIFD6KNH.js +0 -59
- package/dist/chunk-PJOJIRTY.js +0 -74
- package/dist/chunk-PK7J3Y3L.js +0 -44
- package/dist/chunk-PM7BGATN.cjs +0 -237
- package/dist/chunk-POG76HDD.cjs +0 -741
- package/dist/chunk-PUO4QNXH.js +0 -89
- package/dist/chunk-Q5KNPVYI.cjs +0 -59
- package/dist/chunk-R4AW5ADG.cjs +0 -16
- package/dist/chunk-R6DH4V7S.cjs +0 -69
- package/dist/chunk-RBHGZDDX.cjs +0 -58
- package/dist/chunk-RHR6P2KP.cjs +0 -15
- package/dist/chunk-RYQI3RXL.cjs +0 -247
- package/dist/chunk-SGINWAB6.js +0 -155
- package/dist/chunk-T2XUADHW.js +0 -58
- package/dist/chunk-TYQ4YIP7.js +0 -16
- package/dist/chunk-U3NV7UY7.js +0 -323
- package/dist/chunk-UO2J2ZB2.cjs +0 -65
- package/dist/chunk-W7K5E64Q.js +0 -247
- package/dist/chunk-WDZY4PP4.cjs +0 -223
- package/dist/chunk-WHTECI7J.cjs +0 -89
- package/dist/chunk-WJUPOCKJ.js +0 -15
- package/dist/chunk-WWW6IGZ7.js +0 -115
- package/dist/chunk-XC2V34TS.cjs +0 -155
- package/dist/chunk-XOCC3MPK.cjs +0 -36
- package/dist/chunk-ZAX22GSI.cjs +0 -323
- 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
package/dist/chunk-A6E67ZZP.js
DELETED
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Wallet
|
|
3
|
-
} from "./chunk-FHMKNG62.js";
|
|
4
|
-
import {
|
|
5
|
-
toViemChain
|
|
6
|
-
} from "./chunk-2WBSPOWU.js";
|
|
7
|
-
import {
|
|
8
|
-
InvalidTypedDataError,
|
|
9
|
-
SignatureNotCreatedError,
|
|
10
|
-
TransactionNotCreatedError
|
|
11
|
-
} from "./chunk-SGINWAB6.js";
|
|
12
|
-
import {
|
|
13
|
-
walletsLogger
|
|
14
|
-
} from "./chunk-ABMZ3ZVN.js";
|
|
15
|
-
import {
|
|
16
|
-
__async,
|
|
17
|
-
__decorateClass
|
|
18
|
-
} from "./chunk-ASE2FXWP.js";
|
|
19
|
-
|
|
20
|
-
// src/wallets/evm.ts
|
|
21
|
-
import { createPublicClient, encodeFunctionData, http } from "viem";
|
|
22
|
-
import { isValidEvmAddress, WithLoggerContext } from "@crossmint/common-sdk-base";
|
|
23
|
-
var _EVMWallet = class _EVMWallet extends Wallet {
|
|
24
|
-
constructor(wallet) {
|
|
25
|
-
super(
|
|
26
|
-
{
|
|
27
|
-
chain: wallet.chain,
|
|
28
|
-
address: wallet.address,
|
|
29
|
-
owner: wallet.owner,
|
|
30
|
-
signer: wallet.signer,
|
|
31
|
-
options: Wallet.getOptions(wallet),
|
|
32
|
-
alias: wallet.alias
|
|
33
|
-
},
|
|
34
|
-
Wallet.getApiClient(wallet)
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
static from(wallet) {
|
|
38
|
-
if (!isValidEvmAddress(wallet.address)) {
|
|
39
|
-
throw new Error("Wallet is not an EVM wallet");
|
|
40
|
-
}
|
|
41
|
-
return new _EVMWallet(wallet);
|
|
42
|
-
}
|
|
43
|
-
sendTransaction(params) {
|
|
44
|
-
return __async(this, null, function* () {
|
|
45
|
-
var _a;
|
|
46
|
-
walletsLogger.info("evmWallet.sendTransaction.start");
|
|
47
|
-
yield this.preAuthIfNeeded();
|
|
48
|
-
const builtTransaction = this.buildTransaction(params);
|
|
49
|
-
const createdTransaction = yield this.createTransaction(builtTransaction, params.options);
|
|
50
|
-
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
51
|
-
walletsLogger.info("evmWallet.sendTransaction.prepared", {
|
|
52
|
-
transactionId: createdTransaction.id
|
|
53
|
-
});
|
|
54
|
-
return {
|
|
55
|
-
hash: void 0,
|
|
56
|
-
explorerLink: void 0,
|
|
57
|
-
transactionId: createdTransaction.id
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
const result = yield this.approveTransactionAndWait(createdTransaction.id);
|
|
61
|
-
walletsLogger.info("evmWallet.sendTransaction.success", {
|
|
62
|
-
transactionId: createdTransaction.id,
|
|
63
|
-
hash: result.hash
|
|
64
|
-
});
|
|
65
|
-
return result;
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
signMessage(params) {
|
|
69
|
-
return __async(this, null, function* () {
|
|
70
|
-
var _a;
|
|
71
|
-
walletsLogger.info("evmWallet.signMessage.start");
|
|
72
|
-
yield this.preAuthIfNeeded();
|
|
73
|
-
const signatureCreationResponse = yield this.apiClient.createSignature(this.walletLocator, {
|
|
74
|
-
type: "message",
|
|
75
|
-
params: {
|
|
76
|
-
message: params.message,
|
|
77
|
-
signer: this.signer.locator(),
|
|
78
|
-
chain: this.chain
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
if ("error" in signatureCreationResponse) {
|
|
82
|
-
walletsLogger.error("evmWallet.signMessage.error", { error: signatureCreationResponse });
|
|
83
|
-
throw new SignatureNotCreatedError(JSON.stringify(signatureCreationResponse));
|
|
84
|
-
}
|
|
85
|
-
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
86
|
-
walletsLogger.info("evmWallet.signMessage.prepared", {
|
|
87
|
-
signatureId: signatureCreationResponse.id
|
|
88
|
-
});
|
|
89
|
-
return {
|
|
90
|
-
signature: void 0,
|
|
91
|
-
signatureId: signatureCreationResponse.id
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
const result = yield this.approveSignatureAndWait(signatureCreationResponse.id);
|
|
95
|
-
walletsLogger.info("evmWallet.signMessage.success", { signatureId: signatureCreationResponse.id });
|
|
96
|
-
return result;
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
signTypedData(params) {
|
|
100
|
-
return __async(this, null, function* () {
|
|
101
|
-
var _a;
|
|
102
|
-
walletsLogger.info("evmWallet.signTypedData.start");
|
|
103
|
-
yield this.preAuthIfNeeded();
|
|
104
|
-
const { domain, message, primaryType, types, chain } = params;
|
|
105
|
-
if (!domain || !message || !types || !chain) {
|
|
106
|
-
walletsLogger.error("evmWallet.signTypedData.error", { error: "Invalid typed data" });
|
|
107
|
-
throw new InvalidTypedDataError("Invalid typed data");
|
|
108
|
-
}
|
|
109
|
-
const { name, version, chainId, verifyingContract, salt } = domain;
|
|
110
|
-
if (!name || !version || !chainId || !verifyingContract) {
|
|
111
|
-
walletsLogger.error("evmWallet.signTypedData.error", { error: "Invalid typed data domain" });
|
|
112
|
-
throw new InvalidTypedDataError("Invalid typed data domain");
|
|
113
|
-
}
|
|
114
|
-
const signatureCreationResponse = yield this.apiClient.createSignature(this.walletLocator, {
|
|
115
|
-
type: "typed-data",
|
|
116
|
-
params: {
|
|
117
|
-
typedData: {
|
|
118
|
-
domain: {
|
|
119
|
-
name,
|
|
120
|
-
version,
|
|
121
|
-
chainId: Number(chainId),
|
|
122
|
-
verifyingContract,
|
|
123
|
-
salt
|
|
124
|
-
},
|
|
125
|
-
message,
|
|
126
|
-
primaryType,
|
|
127
|
-
types
|
|
128
|
-
},
|
|
129
|
-
signer: this.signer.locator(),
|
|
130
|
-
chain
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
if ("error" in signatureCreationResponse) {
|
|
134
|
-
walletsLogger.error("evmWallet.signTypedData.error", { error: signatureCreationResponse });
|
|
135
|
-
throw new SignatureNotCreatedError(JSON.stringify(signatureCreationResponse));
|
|
136
|
-
}
|
|
137
|
-
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
138
|
-
walletsLogger.info("evmWallet.signTypedData.prepared", {
|
|
139
|
-
signatureId: signatureCreationResponse.id
|
|
140
|
-
});
|
|
141
|
-
return {
|
|
142
|
-
signature: void 0,
|
|
143
|
-
signatureId: signatureCreationResponse.id
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
const result = yield this.approveSignatureAndWait(signatureCreationResponse.id);
|
|
147
|
-
walletsLogger.info("evmWallet.signTypedData.success", { signatureId: signatureCreationResponse.id });
|
|
148
|
-
return result;
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Get a Viem public client instance configured for this wallet's chain.
|
|
153
|
-
* @param params - Optional transport configuration
|
|
154
|
-
* @returns A Viem public client
|
|
155
|
-
*/
|
|
156
|
-
getViemClient(params) {
|
|
157
|
-
var _a;
|
|
158
|
-
return createPublicClient({
|
|
159
|
-
transport: (_a = params == null ? void 0 : params.transport) != null ? _a : http(),
|
|
160
|
-
chain: toViemChain(this.chain)
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
createTransaction(transaction, options) {
|
|
164
|
-
return __async(this, null, function* () {
|
|
165
|
-
var _a;
|
|
166
|
-
const signer = (_a = options == null ? void 0 : options.experimental_signer) != null ? _a : this.signer.locator();
|
|
167
|
-
const transactionCreationResponse = yield this.apiClient.createTransaction(this.walletLocator, {
|
|
168
|
-
params: {
|
|
169
|
-
signer,
|
|
170
|
-
chain: this.chain,
|
|
171
|
-
calls: [transaction]
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
if ("error" in transactionCreationResponse) {
|
|
175
|
-
throw new TransactionNotCreatedError(JSON.stringify(transactionCreationResponse));
|
|
176
|
-
}
|
|
177
|
-
return transactionCreationResponse;
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
buildTransaction(params) {
|
|
181
|
-
var _a, _b, _c, _d, _e;
|
|
182
|
-
if ("transaction" in params) {
|
|
183
|
-
return { transaction: params.transaction };
|
|
184
|
-
}
|
|
185
|
-
if (params.abi == null) {
|
|
186
|
-
return {
|
|
187
|
-
to: params.to,
|
|
188
|
-
value: (_b = (_a = params.value) == null ? void 0 : _a.toString()) != null ? _b : "0",
|
|
189
|
-
data: (_c = params.data) != null ? _c : "0x"
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
if (!params.functionName) {
|
|
193
|
-
throw new Error("Function name is required");
|
|
194
|
-
}
|
|
195
|
-
return {
|
|
196
|
-
to: params.to,
|
|
197
|
-
value: (_e = (_d = params.value) == null ? void 0 : _d.toString()) != null ? _e : "0",
|
|
198
|
-
data: encodeFunctionData({
|
|
199
|
-
abi: params.abi,
|
|
200
|
-
functionName: params.functionName,
|
|
201
|
-
args: params.args
|
|
202
|
-
})
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
__decorateClass([
|
|
207
|
-
WithLoggerContext({
|
|
208
|
-
logger: walletsLogger,
|
|
209
|
-
methodName: "evmWallet.sendTransaction",
|
|
210
|
-
buildContext(thisArg) {
|
|
211
|
-
return { chain: thisArg.chain, address: thisArg.address };
|
|
212
|
-
}
|
|
213
|
-
})
|
|
214
|
-
], _EVMWallet.prototype, "sendTransaction", 1);
|
|
215
|
-
__decorateClass([
|
|
216
|
-
WithLoggerContext({
|
|
217
|
-
logger: walletsLogger,
|
|
218
|
-
methodName: "evmWallet.signMessage",
|
|
219
|
-
buildContext(thisArg) {
|
|
220
|
-
return { chain: thisArg.chain, address: thisArg.address };
|
|
221
|
-
}
|
|
222
|
-
})
|
|
223
|
-
], _EVMWallet.prototype, "signMessage", 1);
|
|
224
|
-
__decorateClass([
|
|
225
|
-
WithLoggerContext({
|
|
226
|
-
logger: walletsLogger,
|
|
227
|
-
methodName: "evmWallet.signTypedData",
|
|
228
|
-
buildContext(thisArg) {
|
|
229
|
-
return { chain: thisArg.chain, address: thisArg.address };
|
|
230
|
-
}
|
|
231
|
-
})
|
|
232
|
-
], _EVMWallet.prototype, "signTypedData", 1);
|
|
233
|
-
var EVMWallet = _EVMWallet;
|
|
234
|
-
|
|
235
|
-
export {
|
|
236
|
-
EVMWallet
|
|
237
|
-
};
|
package/dist/chunk-ABMZ3ZVN.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SDK_NAME,
|
|
3
|
-
SDK_VERSION
|
|
4
|
-
} from "./chunk-TYQ4YIP7.js";
|
|
5
|
-
|
|
6
|
-
// src/logger/init.ts
|
|
7
|
-
import {
|
|
8
|
-
SdkLogger,
|
|
9
|
-
BrowserDatadogSink,
|
|
10
|
-
detectPlatform,
|
|
11
|
-
validateAPIKey,
|
|
12
|
-
ServerDatadogSink
|
|
13
|
-
} from "@crossmint/common-sdk-base";
|
|
14
|
-
var walletsLogger = new SdkLogger();
|
|
15
|
-
function initWalletsLogger(apiKey) {
|
|
16
|
-
const platform = detectPlatform();
|
|
17
|
-
const validationResult = validateAPIKey(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: SDK_NAME,
|
|
24
|
-
packageVersion: SDK_VERSION,
|
|
25
|
-
environment,
|
|
26
|
-
projectId,
|
|
27
|
-
platform
|
|
28
|
-
});
|
|
29
|
-
switch (platform) {
|
|
30
|
-
case "browser": {
|
|
31
|
-
const sink = new BrowserDatadogSink(environment);
|
|
32
|
-
walletsLogger.addSink(sink);
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
case "react-native": {
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
case "server": {
|
|
39
|
-
const sink = new ServerDatadogSink(environment);
|
|
40
|
-
walletsLogger.addSink(sink);
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
default: {
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export {
|
|
50
|
-
walletsLogger,
|
|
51
|
-
initWalletsLogger
|
|
52
|
-
};
|
package/dist/chunk-ASE2FXWP.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __typeError = (msg) => {
|
|
9
|
-
throw TypeError(msg);
|
|
10
|
-
};
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
25
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
26
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
27
|
-
if (decorator = decorators[i])
|
|
28
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
29
|
-
if (kind && result) __defProp(target, key, result);
|
|
30
|
-
return result;
|
|
31
|
-
};
|
|
32
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
33
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
34
|
-
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
35
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
36
|
-
var __async = (__this, __arguments, generator) => {
|
|
37
|
-
return new Promise((resolve, reject) => {
|
|
38
|
-
var fulfilled = (value) => {
|
|
39
|
-
try {
|
|
40
|
-
step(generator.next(value));
|
|
41
|
-
} catch (e) {
|
|
42
|
-
reject(e);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
var rejected = (value) => {
|
|
46
|
-
try {
|
|
47
|
-
step(generator.throw(value));
|
|
48
|
-
} catch (e) {
|
|
49
|
-
reject(e);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
53
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export {
|
|
58
|
-
__spreadValues,
|
|
59
|
-
__spreadProps,
|
|
60
|
-
__decorateClass,
|
|
61
|
-
__privateGet,
|
|
62
|
-
__privateAdd,
|
|
63
|
-
__privateSet,
|
|
64
|
-
__async
|
|
65
|
-
};
|