@crossmint/wallets-sdk 0.21.0 → 1.0.0-beta.3
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.d.cts +2 -1
- package/dist/chains/chains.d.ts +2 -1
- 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-24JKRXBH.js +1 -0
- package/dist/chunk-2C3AOHCT.cjs +1 -0
- package/dist/chunk-2GKPWQBQ.cjs +1 -0
- package/dist/chunk-2JW6HKFK.js +1 -0
- package/dist/chunk-2RNAWXXS.js +1 -0
- package/dist/chunk-2YLRFJ66.js +1 -0
- package/dist/chunk-36OMUNL3.js +1 -0
- package/dist/chunk-3OGAQBMG.cjs +1 -0
- package/dist/chunk-3VYGTPRF.cjs +1 -0
- package/dist/chunk-4ADZVYB5.cjs +1 -0
- package/dist/chunk-4GTMI5ZT.js +1 -0
- package/dist/chunk-4JWRQRKA.cjs +1 -0
- package/dist/chunk-575WRSRN.js +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-6EZCCLTK.cjs +1 -0
- package/dist/chunk-6FGJ3ICD.js +1 -0
- package/dist/chunk-6MGMZ3SI.cjs +1 -0
- package/dist/chunk-6TYV7ADO.js +1 -0
- package/dist/chunk-7VUOD7EI.cjs +1 -0
- package/dist/chunk-A33BEWR7.cjs +1 -0
- package/dist/chunk-CUHDOBKN.cjs +1 -0
- package/dist/chunk-DIGDDKSF.js +1 -0
- package/dist/chunk-E7B6R3GF.cjs +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-EXC7TCGL.js +1 -0
- package/dist/chunk-F2KLBYRR.cjs +1 -0
- package/dist/chunk-FOINTZC5.cjs +1 -0
- package/dist/chunk-FT5EVMLB.js +1 -0
- package/dist/chunk-G5R6VQGJ.js +1 -0
- package/dist/chunk-GEY574TH.cjs +1 -0
- package/dist/chunk-GOXB2RBF.js +1 -0
- package/dist/chunk-HMELCNK6.js +1 -0
- package/dist/chunk-HRUMWG2F.cjs +1 -0
- package/dist/chunk-IOSADDL5.js +1 -0
- package/dist/chunk-IR5WN6FQ.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-JDDMCB6P.js +1 -0
- package/dist/chunk-JDTKL2XR.js +1 -0
- package/dist/chunk-JINIR3YK.cjs +1 -0
- package/dist/chunk-JJ72GFYU.cjs +1 -0
- package/dist/chunk-JJMKQ5PK.cjs +1 -0
- package/dist/chunk-K5TQ4QU3.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-LEALJLNK.js +1 -0
- package/dist/chunk-LZNQBJEK.cjs +1 -0
- package/dist/chunk-MMFZP54X.js +1 -0
- package/dist/chunk-MTK3HWXV.js +1 -0
- package/dist/chunk-N5WVT7QE.js +1 -0
- package/dist/chunk-NJWSHT2H.cjs +1 -0
- package/dist/chunk-NX256LAH.cjs +1 -0
- package/dist/chunk-O5D3H7CZ.cjs +1 -0
- package/dist/chunk-O6VBO7KG.js +1 -0
- package/dist/chunk-OQZTL6ZG.js +1 -0
- package/dist/chunk-PDHWPAGW.js +1 -0
- package/dist/chunk-PKYRYRX4.js +1 -0
- package/dist/chunk-QBS76CBT.cjs +1 -0
- package/dist/chunk-QY5OHQW4.cjs +1 -0
- package/dist/chunk-RBKG6QLZ.js +1 -0
- package/dist/chunk-RC6KDONJ.cjs +1 -0
- package/dist/chunk-RR6DWIRN.js +1 -0
- package/dist/chunk-RXRRXB74.cjs +1 -0
- package/dist/chunk-S3DYQVRD.js +1 -0
- package/dist/chunk-SCEPJO4Q.cjs +1 -0
- package/dist/chunk-SH7KRBXV.js +1 -0
- package/dist/chunk-SMADCELI.js +1 -0
- package/dist/chunk-SPTXAOFR.cjs +1 -0
- package/dist/chunk-STYSP6KL.cjs +1 -0
- package/dist/chunk-SVIKBM3S.js +1 -0
- package/dist/chunk-T3U46LK3.cjs +1 -0
- package/dist/chunk-TOAFCAVT.js +0 -0
- package/dist/chunk-TTSJFEM5.cjs +1 -0
- package/dist/chunk-UE3WVHTM.cjs +1 -0
- package/dist/chunk-USL4YOIR.cjs +1 -0
- package/dist/chunk-VA26VSUQ.cjs +1 -0
- package/dist/chunk-VV6374MW.cjs +1 -0
- package/dist/chunk-W5EH3HYF.cjs +1 -0
- package/dist/chunk-W6V7WGBL.js +1 -0
- package/dist/chunk-W7LJS32A.js +1 -0
- package/dist/chunk-WBIKVPHW.js +1 -0
- package/dist/chunk-WCGUGIGJ.js +1 -0
- package/dist/chunk-WP4V3OCS.cjs +1 -0
- package/dist/chunk-WT5MDUZY.js +1 -0
- package/dist/chunk-XNZLCUTY.js +1 -0
- package/dist/chunk-XS5B3TUE.js +1 -0
- package/dist/chunk-YGL4ITFK.cjs +1 -0
- package/dist/chunk-YIO5XXQ4.js +1 -0
- package/dist/chunk-YPHM2V2G.cjs +1 -0
- package/dist/chunk-ZE4NT3CJ.js +1 -0
- package/dist/chunk-ZIFTCPCX.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 +21 -19
- package/dist/sdk.d.ts +21 -19
- 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 +7 -3
- package/dist/signers/evm-api-key.d.ts +7 -3
- 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 +12 -13
- package/dist/signers/evm-external-wallet.d.ts +12 -13
- 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 +6 -2
- package/dist/signers/index.d.ts +6 -2
- package/dist/signers/index.js +1 -33
- package/dist/signers/non-custodial/index.cjs +1 -27
- package/dist/signers/non-custodial/index.d.cts +6 -2
- package/dist/signers/non-custodial/index.d.ts +6 -2
- 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 +6 -2
- package/dist/signers/non-custodial/ncs-evm-signer.d.ts +6 -2
- 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 +7 -3
- package/dist/signers/non-custodial/ncs-signer.d.ts +7 -3
- 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 +6 -2
- package/dist/signers/non-custodial/ncs-solana-signer.d.ts +6 -2
- 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 +6 -2
- package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +6 -2
- package/dist/signers/non-custodial/ncs-stellar-signer.js +1 -13
- package/dist/signers/passkey.cjs +1 -7
- package/dist/signers/passkey.d.cts +7 -3
- package/dist/signers/passkey.d.ts +7 -3
- 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 +5 -1
- package/dist/signers/server/assemble-server-signer.d.ts +5 -1
- 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 +7 -3
- package/dist/signers/server/evm-server-signer.d.ts +7 -3
- 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 +5 -1
- package/dist/signers/server/helpers/derive-server-signer.d.ts +5 -1
- 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 +5 -1
- package/dist/signers/server/helpers/index.d.ts +5 -1
- package/dist/signers/server/helpers/index.js +1 -15
- package/dist/signers/server/index.cjs +1 -29
- package/dist/signers/server/index.d.cts +5 -1
- package/dist/signers/server/index.d.ts +5 -1
- 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 +7 -3
- package/dist/signers/server/solana-server-signer.d.ts +7 -3
- 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 +7 -3
- package/dist/signers/server/stellar-server-signer.d.ts +7 -3
- 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 +7 -3
- package/dist/signers/solana-api-key.d.ts +7 -3
- 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 +9 -10
- package/dist/signers/solana-external-wallet.d.ts +9 -10
- 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 +9 -9
- package/dist/signers/stellar-external-wallet.d.ts +9 -9
- 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-BaHy48kd.d.ts +427 -0
- package/dist/types-Dz8JNP4U.d.cts +427 -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 +72 -0
- package/dist/utils/device-signers/DeviceSignerKeyStorage.d.ts +72 -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 +51 -0
- package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.d.ts +51 -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 +28 -0
- package/dist/utils/device-signers/createDeviceSigner.d.ts +28 -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.d.cts +11 -2
- package/dist/utils/errors.d.ts +11 -2
- 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.d.cts +6 -4
- package/dist/utils/signer-validation.d.ts +6 -4
- 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 +8 -8
- package/dist/wallets/__tests__/test-helpers.d.ts +8 -8
- package/dist/wallets/__tests__/test-helpers.js +1 -102
- package/dist/wallets/evm.cjs +1 -34
- package/dist/wallets/evm.d.cts +6 -7
- package/dist/wallets/evm.d.ts +6 -7
- package/dist/wallets/evm.js +1 -34
- package/dist/wallets/solana.cjs +1 -35
- package/dist/wallets/solana.d.cts +8 -7
- package/dist/wallets/solana.d.ts +8 -7
- package/dist/wallets/solana.js +1 -35
- package/dist/wallets/stellar.cjs +1 -34
- package/dist/wallets/stellar.d.cts +5 -6
- package/dist/wallets/stellar.d.ts +5 -6
- 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 +14 -10
- package/dist/wallets/wallet-factory.d.ts +14 -10
- package/dist/wallets/wallet-factory.js +1 -42
- package/dist/wallets/wallet.cjs +1 -33
- package/dist/wallets/wallet.d.cts +132 -34
- package/dist/wallets/wallet.d.ts +132 -34
- 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
package/dist/chunk-55V4VMTX.cjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/chains/definitions/storyTestnet.ts
|
|
2
|
-
var _viem = require('viem');
|
|
3
|
-
var storyTestnet = _viem.defineChain.call(void 0, {
|
|
4
|
-
id: 1513,
|
|
5
|
-
name: "Story Testnet",
|
|
6
|
-
nativeCurrency: {
|
|
7
|
-
decimals: 18,
|
|
8
|
-
name: "IP",
|
|
9
|
-
symbol: "IP"
|
|
10
|
-
},
|
|
11
|
-
rpcUrls: {
|
|
12
|
-
default: { http: ["https://testnet.storyrpc.io"] }
|
|
13
|
-
},
|
|
14
|
-
blockExplorers: {
|
|
15
|
-
default: {
|
|
16
|
-
name: "Story Testnet Explorer",
|
|
17
|
-
url: "https://testnet.storyscan.xyz"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
testnet: true
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
exports.storyTestnet = storyTestnet;
|
package/dist/chunk-65KPNJ77.js
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Wallet
|
|
3
|
-
} from "./chunk-VVPGO564.js";
|
|
4
|
-
import {
|
|
5
|
-
deriveServerSignerDetails
|
|
6
|
-
} from "./chunk-S2L5Z2ZT.js";
|
|
7
|
-
import {
|
|
8
|
-
TransactionNotCreatedError
|
|
9
|
-
} from "./chunk-SGINWAB6.js";
|
|
10
|
-
import {
|
|
11
|
-
walletsLogger
|
|
12
|
-
} from "./chunk-XEPUH4XH.js";
|
|
13
|
-
import {
|
|
14
|
-
__async,
|
|
15
|
-
__decorateClass
|
|
16
|
-
} from "./chunk-ASE2FXWP.js";
|
|
17
|
-
|
|
18
|
-
// src/wallets/stellar.ts
|
|
19
|
-
import { isValidStellarAddress, WithLoggerContext } from "@crossmint/common-sdk-base";
|
|
20
|
-
var _StellarWallet = class _StellarWallet extends Wallet {
|
|
21
|
-
constructor(wallet) {
|
|
22
|
-
super(
|
|
23
|
-
{
|
|
24
|
-
chain: wallet.chain,
|
|
25
|
-
address: wallet.address,
|
|
26
|
-
owner: wallet.owner,
|
|
27
|
-
signer: wallet.signer,
|
|
28
|
-
options: Wallet.getOptions(wallet),
|
|
29
|
-
alias: wallet.alias
|
|
30
|
-
},
|
|
31
|
-
Wallet.getApiClient(wallet)
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
static from(wallet) {
|
|
35
|
-
if (!isValidStellarAddress(wallet.address)) {
|
|
36
|
-
throw new Error("Wallet is not a Stellar wallet");
|
|
37
|
-
}
|
|
38
|
-
return new _StellarWallet(wallet);
|
|
39
|
-
}
|
|
40
|
-
sendTransaction(params) {
|
|
41
|
-
return __async(this, null, function* () {
|
|
42
|
-
var _a;
|
|
43
|
-
walletsLogger.info("stellarWallet.sendTransaction.start");
|
|
44
|
-
yield this.preAuthIfNeeded();
|
|
45
|
-
const createdTransaction = yield this.createTransaction(params);
|
|
46
|
-
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
47
|
-
walletsLogger.info("stellarWallet.sendTransaction.prepared", {
|
|
48
|
-
transactionId: createdTransaction.id
|
|
49
|
-
});
|
|
50
|
-
return {
|
|
51
|
-
hash: void 0,
|
|
52
|
-
explorerLink: void 0,
|
|
53
|
-
transactionId: createdTransaction.id
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
const options = {};
|
|
57
|
-
const result = yield this.approveTransactionAndWait(createdTransaction.id, options);
|
|
58
|
-
walletsLogger.info("stellarWallet.sendTransaction.success", {
|
|
59
|
-
transactionId: createdTransaction.id,
|
|
60
|
-
hash: result.hash
|
|
61
|
-
});
|
|
62
|
-
return result;
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
createTransaction(params) {
|
|
66
|
-
return __async(this, null, function* () {
|
|
67
|
-
const { contractId, options } = params;
|
|
68
|
-
let signer;
|
|
69
|
-
if ((options == null ? void 0 : options.experimental_signer) == null) {
|
|
70
|
-
signer = this.signer.locator();
|
|
71
|
-
} else if (typeof options.experimental_signer === "string") {
|
|
72
|
-
signer = options.experimental_signer;
|
|
73
|
-
} else {
|
|
74
|
-
signer = `server:${deriveServerSignerDetails(options.experimental_signer, this.chain, this.apiClient.projectId, this.apiClient.environment).derivedAddress}`;
|
|
75
|
-
}
|
|
76
|
-
let transaction;
|
|
77
|
-
if ("transaction" in params) {
|
|
78
|
-
transaction = {
|
|
79
|
-
type: "serialized-transaction",
|
|
80
|
-
serializedTransaction: params.transaction,
|
|
81
|
-
contractId
|
|
82
|
-
};
|
|
83
|
-
} else {
|
|
84
|
-
const { method, memo, args } = params;
|
|
85
|
-
transaction = {
|
|
86
|
-
type: "contract-call",
|
|
87
|
-
contractId,
|
|
88
|
-
method,
|
|
89
|
-
memo: memo != null ? { type: "text", value: memo } : void 0,
|
|
90
|
-
args
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
const transactionCreationResponse = yield this.apiClient.createTransaction(this.walletLocator, {
|
|
94
|
-
params: {
|
|
95
|
-
transaction,
|
|
96
|
-
signer
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
if ("error" in transactionCreationResponse) {
|
|
100
|
-
throw new TransactionNotCreatedError(JSON.stringify(transactionCreationResponse));
|
|
101
|
-
}
|
|
102
|
-
return transactionCreationResponse;
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
__decorateClass([
|
|
107
|
-
WithLoggerContext({
|
|
108
|
-
logger: walletsLogger,
|
|
109
|
-
methodName: "stellarWallet.sendTransaction",
|
|
110
|
-
buildContext(thisArg) {
|
|
111
|
-
return { chain: thisArg.chain, address: thisArg.address };
|
|
112
|
-
}
|
|
113
|
-
})
|
|
114
|
-
], _StellarWallet.prototype, "sendTransaction", 1);
|
|
115
|
-
var StellarWallet = _StellarWallet;
|
|
116
|
-
|
|
117
|
-
export {
|
|
118
|
-
StellarWallet
|
|
119
|
-
};
|
package/dist/chunk-7EZDSDKA.cjs
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
-
|
|
3
|
-
var _chunk4ZWUI6LEcjs = require('./chunk-4ZWUI6LE.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkKHY5FXO4cjs = require('./chunk-KHY5FXO4.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunkQ5KNPVYIcjs = require('./chunk-Q5KNPVYI.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _chunk2M32LBCAcjs = require('./chunk-2M32LBCA.cjs');
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
20
|
-
|
|
21
|
-
// src/wallets/solana.ts
|
|
22
|
-
var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);
|
|
23
|
-
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
24
|
-
var _SolanaWallet = class _SolanaWallet extends _chunk4ZWUI6LEcjs.Wallet {
|
|
25
|
-
constructor(wallet) {
|
|
26
|
-
super(
|
|
27
|
-
{
|
|
28
|
-
chain: wallet.chain,
|
|
29
|
-
address: wallet.address,
|
|
30
|
-
owner: wallet.owner,
|
|
31
|
-
signer: wallet.signer,
|
|
32
|
-
options: _chunk4ZWUI6LEcjs.Wallet.getOptions(wallet),
|
|
33
|
-
alias: wallet.alias
|
|
34
|
-
},
|
|
35
|
-
_chunk4ZWUI6LEcjs.Wallet.getApiClient(wallet)
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
static from(wallet) {
|
|
39
|
-
if (!_commonsdkbase.isValidSolanaAddress.call(void 0, wallet.address)) {
|
|
40
|
-
throw new Error("Wallet is not a Solana wallet");
|
|
41
|
-
}
|
|
42
|
-
return new _SolanaWallet(wallet);
|
|
43
|
-
}
|
|
44
|
-
sendTransaction(params) {
|
|
45
|
-
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
46
|
-
var _a, _b;
|
|
47
|
-
_chunk2M32LBCAcjs.walletsLogger.info("solanaWallet.sendTransaction.start");
|
|
48
|
-
yield this.preAuthIfNeeded();
|
|
49
|
-
const createdTransaction = yield this.createTransaction(params);
|
|
50
|
-
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
51
|
-
_chunk2M32LBCAcjs.walletsLogger.info("solanaWallet.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 _additionalSigners = (_b = params.additionalSigners) == null ? void 0 : _b.map(
|
|
61
|
-
(signer) => new (0, _chunkQ5KNPVYIcjs.SolanaExternalWalletSigner)({
|
|
62
|
-
type: "external-wallet",
|
|
63
|
-
address: signer.publicKey.toString(),
|
|
64
|
-
locator: `external-wallet:${signer.publicKey.toString()}`,
|
|
65
|
-
onSignTransaction: (transaction) => {
|
|
66
|
-
transaction.sign([signer]);
|
|
67
|
-
return Promise.resolve(transaction);
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
);
|
|
71
|
-
const options = {
|
|
72
|
-
additionalSigners: _additionalSigners
|
|
73
|
-
};
|
|
74
|
-
const result = yield this.approveTransactionAndWait(createdTransaction.id, options);
|
|
75
|
-
_chunk2M32LBCAcjs.walletsLogger.info("solanaWallet.sendTransaction.success", {
|
|
76
|
-
transactionId: createdTransaction.id,
|
|
77
|
-
hash: result.hash
|
|
78
|
-
});
|
|
79
|
-
return result;
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
createTransaction(params) {
|
|
83
|
-
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
84
|
-
var _a;
|
|
85
|
-
let signer;
|
|
86
|
-
if (((_a = params.options) == null ? void 0 : _a.experimental_signer) == null) {
|
|
87
|
-
signer = this.signer.locator();
|
|
88
|
-
} else if (typeof params.options.experimental_signer === "string") {
|
|
89
|
-
signer = params.options.experimental_signer;
|
|
90
|
-
} else {
|
|
91
|
-
signer = `server:${_chunkKHY5FXO4cjs.deriveServerSignerDetails.call(void 0, params.options.experimental_signer, this.chain, this.apiClient.projectId, this.apiClient.environment).derivedAddress}`;
|
|
92
|
-
}
|
|
93
|
-
let serializedTransaction;
|
|
94
|
-
if ("serializedTransaction" in params) {
|
|
95
|
-
serializedTransaction = params.serializedTransaction;
|
|
96
|
-
} else {
|
|
97
|
-
serializedTransaction = _bs582.default.encode(params.transaction.serialize());
|
|
98
|
-
}
|
|
99
|
-
const transactionCreationResponse = yield this.apiClient.createTransaction(this.walletLocator, {
|
|
100
|
-
params: {
|
|
101
|
-
transaction: serializedTransaction,
|
|
102
|
-
signer
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
if ("error" in transactionCreationResponse) {
|
|
106
|
-
throw new (0, _chunkXC2V34TScjs.TransactionNotCreatedError)(JSON.stringify(transactionCreationResponse));
|
|
107
|
-
}
|
|
108
|
-
return transactionCreationResponse;
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
113
|
-
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
114
|
-
logger: _chunk2M32LBCAcjs.walletsLogger,
|
|
115
|
-
methodName: "solanaWallet.sendTransaction",
|
|
116
|
-
buildContext(thisArg) {
|
|
117
|
-
return { chain: thisArg.chain, address: thisArg.address };
|
|
118
|
-
}
|
|
119
|
-
})
|
|
120
|
-
], _SolanaWallet.prototype, "sendTransaction", 1);
|
|
121
|
-
var SolanaWallet = _SolanaWallet;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
exports.SolanaWallet = SolanaWallet;
|
package/dist/chunk-7GOUUPS4.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__async
|
|
3
|
-
} from "./chunk-ASE2FXWP.js";
|
|
4
|
-
|
|
5
|
-
// src/signers/evm-api-key.ts
|
|
6
|
-
var EVMApiKeySigner = 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
|
-
EVMApiKeySigner
|
|
36
|
-
};
|
package/dist/chunk-7SUWMK4J.cjs
DELETED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunk4ZWUI6LEcjs = require('./chunk-4ZWUI6LE.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkKHY5FXO4cjs = require('./chunk-KHY5FXO4.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunkMIKWTXUAcjs = require('./chunk-MIKWTXUA.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var _chunk2M32LBCAcjs = require('./chunk-2M32LBCA.cjs');
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
22
|
-
|
|
23
|
-
// src/wallets/evm.ts
|
|
24
|
-
var _viem = require('viem');
|
|
25
|
-
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
26
|
-
var _EVMWallet = class _EVMWallet extends _chunk4ZWUI6LEcjs.Wallet {
|
|
27
|
-
constructor(wallet) {
|
|
28
|
-
super(
|
|
29
|
-
{
|
|
30
|
-
chain: wallet.chain,
|
|
31
|
-
address: wallet.address,
|
|
32
|
-
owner: wallet.owner,
|
|
33
|
-
signer: wallet.signer,
|
|
34
|
-
options: _chunk4ZWUI6LEcjs.Wallet.getOptions(wallet),
|
|
35
|
-
alias: wallet.alias
|
|
36
|
-
},
|
|
37
|
-
_chunk4ZWUI6LEcjs.Wallet.getApiClient(wallet)
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
static from(wallet) {
|
|
41
|
-
if (!_commonsdkbase.isValidEvmAddress.call(void 0, wallet.address)) {
|
|
42
|
-
throw new Error("Wallet is not an EVM wallet");
|
|
43
|
-
}
|
|
44
|
-
return new _EVMWallet(wallet);
|
|
45
|
-
}
|
|
46
|
-
sendTransaction(params) {
|
|
47
|
-
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
48
|
-
var _a;
|
|
49
|
-
_chunk2M32LBCAcjs.walletsLogger.info("evmWallet.sendTransaction.start");
|
|
50
|
-
yield this.preAuthIfNeeded();
|
|
51
|
-
const builtTransaction = this.buildTransaction(params);
|
|
52
|
-
const createdTransaction = yield this.createTransaction(builtTransaction, params.options);
|
|
53
|
-
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
54
|
-
_chunk2M32LBCAcjs.walletsLogger.info("evmWallet.sendTransaction.prepared", {
|
|
55
|
-
transactionId: createdTransaction.id
|
|
56
|
-
});
|
|
57
|
-
return {
|
|
58
|
-
hash: void 0,
|
|
59
|
-
explorerLink: void 0,
|
|
60
|
-
transactionId: createdTransaction.id
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
const result = yield this.approveTransactionAndWait(createdTransaction.id);
|
|
64
|
-
_chunk2M32LBCAcjs.walletsLogger.info("evmWallet.sendTransaction.success", {
|
|
65
|
-
transactionId: createdTransaction.id,
|
|
66
|
-
hash: result.hash
|
|
67
|
-
});
|
|
68
|
-
return result;
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
signMessage(params) {
|
|
72
|
-
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
73
|
-
var _a;
|
|
74
|
-
_chunk2M32LBCAcjs.walletsLogger.info("evmWallet.signMessage.start");
|
|
75
|
-
yield this.preAuthIfNeeded();
|
|
76
|
-
const signatureCreationResponse = yield this.apiClient.createSignature(this.walletLocator, {
|
|
77
|
-
type: "message",
|
|
78
|
-
params: {
|
|
79
|
-
message: params.message,
|
|
80
|
-
signer: this.signer.locator(),
|
|
81
|
-
chain: this.chain
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
if ("error" in signatureCreationResponse) {
|
|
85
|
-
_chunk2M32LBCAcjs.walletsLogger.error("evmWallet.signMessage.error", { error: signatureCreationResponse });
|
|
86
|
-
throw new (0, _chunkXC2V34TScjs.SignatureNotCreatedError)(JSON.stringify(signatureCreationResponse));
|
|
87
|
-
}
|
|
88
|
-
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
89
|
-
_chunk2M32LBCAcjs.walletsLogger.info("evmWallet.signMessage.prepared", {
|
|
90
|
-
signatureId: signatureCreationResponse.id
|
|
91
|
-
});
|
|
92
|
-
return {
|
|
93
|
-
signature: void 0,
|
|
94
|
-
signatureId: signatureCreationResponse.id
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
const result = yield this.approveSignatureAndWait(signatureCreationResponse.id);
|
|
98
|
-
_chunk2M32LBCAcjs.walletsLogger.info("evmWallet.signMessage.success", { signatureId: signatureCreationResponse.id });
|
|
99
|
-
return result;
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
signTypedData(params) {
|
|
103
|
-
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
104
|
-
var _a;
|
|
105
|
-
_chunk2M32LBCAcjs.walletsLogger.info("evmWallet.signTypedData.start");
|
|
106
|
-
yield this.preAuthIfNeeded();
|
|
107
|
-
const { domain, message, primaryType, types, chain } = params;
|
|
108
|
-
if (!domain || !message || !types || !chain) {
|
|
109
|
-
_chunk2M32LBCAcjs.walletsLogger.error("evmWallet.signTypedData.error", { error: "Invalid typed data" });
|
|
110
|
-
throw new (0, _chunkXC2V34TScjs.InvalidTypedDataError)("Invalid typed data");
|
|
111
|
-
}
|
|
112
|
-
const { name, version, chainId, verifyingContract, salt } = domain;
|
|
113
|
-
if (!name || !version || !chainId || !verifyingContract) {
|
|
114
|
-
_chunk2M32LBCAcjs.walletsLogger.error("evmWallet.signTypedData.error", { error: "Invalid typed data domain" });
|
|
115
|
-
throw new (0, _chunkXC2V34TScjs.InvalidTypedDataError)("Invalid typed data domain");
|
|
116
|
-
}
|
|
117
|
-
const signatureCreationResponse = yield this.apiClient.createSignature(this.walletLocator, {
|
|
118
|
-
type: "typed-data",
|
|
119
|
-
params: {
|
|
120
|
-
typedData: {
|
|
121
|
-
domain: {
|
|
122
|
-
name,
|
|
123
|
-
version,
|
|
124
|
-
chainId: Number(chainId),
|
|
125
|
-
verifyingContract,
|
|
126
|
-
salt
|
|
127
|
-
},
|
|
128
|
-
message,
|
|
129
|
-
primaryType,
|
|
130
|
-
types
|
|
131
|
-
},
|
|
132
|
-
signer: this.signer.locator(),
|
|
133
|
-
chain
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
if ("error" in signatureCreationResponse) {
|
|
137
|
-
_chunk2M32LBCAcjs.walletsLogger.error("evmWallet.signTypedData.error", { error: signatureCreationResponse });
|
|
138
|
-
throw new (0, _chunkXC2V34TScjs.SignatureNotCreatedError)(JSON.stringify(signatureCreationResponse));
|
|
139
|
-
}
|
|
140
|
-
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
141
|
-
_chunk2M32LBCAcjs.walletsLogger.info("evmWallet.signTypedData.prepared", {
|
|
142
|
-
signatureId: signatureCreationResponse.id
|
|
143
|
-
});
|
|
144
|
-
return {
|
|
145
|
-
signature: void 0,
|
|
146
|
-
signatureId: signatureCreationResponse.id
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
const result = yield this.approveSignatureAndWait(signatureCreationResponse.id);
|
|
150
|
-
_chunk2M32LBCAcjs.walletsLogger.info("evmWallet.signTypedData.success", { signatureId: signatureCreationResponse.id });
|
|
151
|
-
return result;
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Get a Viem public client instance configured for this wallet's chain.
|
|
156
|
-
* @param params - Optional transport configuration
|
|
157
|
-
* @returns A Viem public client
|
|
158
|
-
*/
|
|
159
|
-
getViemClient(params) {
|
|
160
|
-
var _a;
|
|
161
|
-
return _viem.createPublicClient.call(void 0, {
|
|
162
|
-
transport: (_a = params == null ? void 0 : params.transport) != null ? _a : _viem.http.call(void 0, ),
|
|
163
|
-
chain: _chunkMIKWTXUAcjs.toViemChain.call(void 0, this.chain)
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
createTransaction(transaction, options) {
|
|
167
|
-
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
168
|
-
let signer;
|
|
169
|
-
if ((options == null ? void 0 : options.experimental_signer) == null) {
|
|
170
|
-
signer = this.signer.locator();
|
|
171
|
-
} else if (typeof options.experimental_signer === "string") {
|
|
172
|
-
signer = options.experimental_signer;
|
|
173
|
-
} else {
|
|
174
|
-
signer = `server:${_chunkKHY5FXO4cjs.deriveServerSignerDetails.call(void 0, options.experimental_signer, this.chain, this.apiClient.projectId, this.apiClient.environment).derivedAddress}`;
|
|
175
|
-
}
|
|
176
|
-
const transactionCreationResponse = yield this.apiClient.createTransaction(this.walletLocator, {
|
|
177
|
-
params: {
|
|
178
|
-
signer,
|
|
179
|
-
chain: this.chain,
|
|
180
|
-
calls: [transaction]
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
if ("error" in transactionCreationResponse) {
|
|
184
|
-
throw new (0, _chunkXC2V34TScjs.TransactionNotCreatedError)(JSON.stringify(transactionCreationResponse));
|
|
185
|
-
}
|
|
186
|
-
return transactionCreationResponse;
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
buildTransaction(params) {
|
|
190
|
-
var _a, _b, _c, _d, _e;
|
|
191
|
-
if ("transaction" in params) {
|
|
192
|
-
return { transaction: params.transaction };
|
|
193
|
-
}
|
|
194
|
-
if (params.abi == null) {
|
|
195
|
-
return {
|
|
196
|
-
to: params.to,
|
|
197
|
-
value: (_b = (_a = params.value) == null ? void 0 : _a.toString()) != null ? _b : "0",
|
|
198
|
-
data: (_c = params.data) != null ? _c : "0x"
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
if (!params.functionName) {
|
|
202
|
-
throw new Error("Function name is required");
|
|
203
|
-
}
|
|
204
|
-
return {
|
|
205
|
-
to: params.to,
|
|
206
|
-
value: (_e = (_d = params.value) == null ? void 0 : _d.toString()) != null ? _e : "0",
|
|
207
|
-
data: _viem.encodeFunctionData.call(void 0, {
|
|
208
|
-
abi: params.abi,
|
|
209
|
-
functionName: params.functionName,
|
|
210
|
-
args: params.args
|
|
211
|
-
})
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
216
|
-
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
217
|
-
logger: _chunk2M32LBCAcjs.walletsLogger,
|
|
218
|
-
methodName: "evmWallet.sendTransaction",
|
|
219
|
-
buildContext(thisArg) {
|
|
220
|
-
return { chain: thisArg.chain, address: thisArg.address };
|
|
221
|
-
}
|
|
222
|
-
})
|
|
223
|
-
], _EVMWallet.prototype, "sendTransaction", 1);
|
|
224
|
-
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
225
|
-
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
226
|
-
logger: _chunk2M32LBCAcjs.walletsLogger,
|
|
227
|
-
methodName: "evmWallet.signMessage",
|
|
228
|
-
buildContext(thisArg) {
|
|
229
|
-
return { chain: thisArg.chain, address: thisArg.address };
|
|
230
|
-
}
|
|
231
|
-
})
|
|
232
|
-
], _EVMWallet.prototype, "signMessage", 1);
|
|
233
|
-
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
234
|
-
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
235
|
-
logger: _chunk2M32LBCAcjs.walletsLogger,
|
|
236
|
-
methodName: "evmWallet.signTypedData",
|
|
237
|
-
buildContext(thisArg) {
|
|
238
|
-
return { chain: thisArg.chain, address: thisArg.address };
|
|
239
|
-
}
|
|
240
|
-
})
|
|
241
|
-
], _EVMWallet.prototype, "signTypedData", 1);
|
|
242
|
-
var EVMWallet = _EVMWallet;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
exports.EVMWallet = EVMWallet;
|
package/dist/chunk-7USEVMTW.cjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/chains/definitions/tempo.ts
|
|
2
|
-
var _viem = require('viem');
|
|
3
|
-
var tempo = _viem.defineChain.call(void 0, {
|
|
4
|
-
id: 4217,
|
|
5
|
-
name: "Tempo",
|
|
6
|
-
nativeCurrency: void 0,
|
|
7
|
-
rpcUrls: {
|
|
8
|
-
default: { http: ["https://rpc.tempo.xyz"] }
|
|
9
|
-
},
|
|
10
|
-
blockExplorers: {
|
|
11
|
-
default: {
|
|
12
|
-
name: "Tempo Explorer",
|
|
13
|
-
url: "https://explore.mainnet.tempo.xyz"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
testnet: false
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
exports.tempo = tempo;
|
package/dist/chunk-7W4HGN3H.cjs
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkM6IPPGXQcjs = require('./chunk-M6IPPGXQ.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkVTF3WCXGcjs = require('./chunk-VTF3WCXG.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunkCPZQ7BK5cjs = require('./chunk-CPZQ7BK5.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _chunkU56Z2EORcjs = require('./chunk-U56Z2EOR.cjs');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _chunkJSWTGW46cjs = require('./chunk-JSWTGW46.cjs');
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var _chunkZTEMOYS2cjs = require('./chunk-ZTEMOYS2.cjs');
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var _chunkZNAGDENGcjs = require('./chunk-ZNAGDENG.cjs');
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var _chunkXOCC3MPKcjs = require('./chunk-XOCC3MPK.cjs');
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var _chunkQ5KNPVYIcjs = require('./chunk-Q5KNPVYI.cjs');
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var _chunkIOMKHF6Rcjs = require('./chunk-IOMKHF6R.cjs');
|
|
31
|
-
|
|
32
|
-
// src/signers/index.ts
|
|
33
|
-
function assembleSigner(chain, config) {
|
|
34
|
-
switch (config.type) {
|
|
35
|
-
case "email":
|
|
36
|
-
case "phone":
|
|
37
|
-
if (chain === "solana") {
|
|
38
|
-
return new (0, _chunkVTF3WCXGcjs.SolanaNonCustodialSigner)(config);
|
|
39
|
-
}
|
|
40
|
-
if (chain === "stellar") {
|
|
41
|
-
return new (0, _chunkCPZQ7BK5cjs.StellarNonCustodialSigner)(config);
|
|
42
|
-
}
|
|
43
|
-
return new (0, _chunkU56Z2EORcjs.EVMNonCustodialSigner)(config);
|
|
44
|
-
case "api-key":
|
|
45
|
-
return chain === "solana" ? new (0, _chunkXOCC3MPKcjs.SolanaApiKeySigner)(config) : new (0, _chunkJSWTGW46cjs.EVMApiKeySigner)(config);
|
|
46
|
-
case "external-wallet":
|
|
47
|
-
if (chain === "solana") {
|
|
48
|
-
return new (0, _chunkQ5KNPVYIcjs.SolanaExternalWalletSigner)(config);
|
|
49
|
-
}
|
|
50
|
-
if (chain === "stellar") {
|
|
51
|
-
return new (0, _chunkIOMKHF6Rcjs.StellarExternalWalletSigner)(config);
|
|
52
|
-
}
|
|
53
|
-
return new (0, _chunkZTEMOYS2cjs.EVMExternalWalletSigner)(config);
|
|
54
|
-
case "server":
|
|
55
|
-
return _chunkM6IPPGXQcjs.assembleServerSigner.call(void 0, chain, config);
|
|
56
|
-
case "passkey":
|
|
57
|
-
return new (0, _chunkZNAGDENGcjs.PasskeySigner)(config);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
exports.assembleSigner = assembleSigner;
|