@crossmint/wallets-sdk 1.18.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/__tests__/constants.d.cts +1 -1
- package/dist/api/__tests__/constants.d.ts +1 -1
- package/dist/api/__tests__/test-utils.cjs +1 -1
- package/dist/api/__tests__/test-utils.d.cts +1 -1
- package/dist/api/__tests__/test-utils.d.ts +1 -1
- package/dist/api/__tests__/test-utils.js +1 -1
- package/dist/api/client.cjs +1 -1
- package/dist/api/client.d.cts +1 -1
- package/dist/api/client.d.ts +1 -1
- package/dist/api/client.js +1 -1
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.d.cts +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/types.d.cts +1 -1
- package/dist/api/types.d.ts +1 -1
- package/dist/chains/adapters/evm.cjs +1 -1
- package/dist/chains/adapters/evm.d.cts +1 -1
- package/dist/chains/adapters/evm.d.ts +1 -1
- package/dist/chains/adapters/evm.js +1 -1
- package/dist/chains/adapters/solana.cjs +1 -1
- package/dist/chains/adapters/solana.d.cts +1 -1
- package/dist/chains/adapters/solana.d.ts +1 -1
- package/dist/chains/adapters/solana.js +1 -1
- package/dist/chains/adapters/stellar.cjs +1 -1
- package/dist/chains/adapters/stellar.d.cts +1 -1
- package/dist/chains/adapters/stellar.d.ts +1 -1
- package/dist/chains/adapters/stellar.js +1 -1
- package/dist/chains/chain-adapter.cjs +1 -1
- package/dist/chains/chain-adapter.d.cts +1 -1
- package/dist/chains/chain-adapter.d.ts +1 -1
- package/dist/chains/chain-adapter.js +1 -1
- package/dist/chains/chains.cjs +1 -1
- package/dist/chains/chains.js +1 -1
- package/dist/{chunk-3UROOLIH.js → chunk-266RS53K.js} +1 -1
- package/dist/{chunk-KSPUJL3Z.js → chunk-2E6IJLDW.js} +1 -1
- package/dist/{chunk-PU3WUUJ6.js → chunk-2J5RPKHK.js} +1 -1
- package/dist/{chunk-SWQSW2AD.js → chunk-2KGAVQXR.js} +1 -1
- package/dist/{chunk-VOFCBB2P.js → chunk-2YLAHC7J.js} +1 -1
- package/dist/{chunk-T5EOJ3ZF.cjs → chunk-36GZTRZX.cjs} +1 -1
- package/dist/{chunk-SH6HXAB2.js → chunk-3F4Z2URU.js} +1 -1
- package/dist/{chunk-MUOGCO7D.cjs → chunk-3FQB7LST.cjs} +1 -1
- package/dist/chunk-3FUVUUXU.cjs +1 -0
- package/dist/{chunk-T5LUBX5J.cjs → chunk-3SSOE7BV.cjs} +2 -2
- package/dist/chunk-3W22A7E7.js +1 -0
- package/dist/chunk-4I3EXM4B.js +1 -0
- package/dist/{chunk-3RVLLQ4M.cjs → chunk-4LXZPDTP.cjs} +1 -1
- package/dist/{chunk-AB2JJTW4.js → chunk-54LGZZX4.js} +1 -1
- package/dist/{chunk-STB2VIIK.cjs → chunk-5GYSXH4X.cjs} +1 -1
- package/dist/chunk-67VE25UL.js +1 -0
- package/dist/{chunk-F7DCMK3I.cjs → chunk-6XLTNU2N.cjs} +1 -1
- package/dist/{chunk-AIAYUJJG.cjs → chunk-AEHDAUN4.cjs} +1 -1
- package/dist/{chunk-P5VJ455G.cjs → chunk-B45GSXKN.cjs} +1 -1
- package/dist/{chunk-R2XC4F3M.cjs → chunk-BJJXTZJB.cjs} +1 -1
- package/dist/chunk-C5LIXILN.js +1 -0
- package/dist/{chunk-ZAIKHHRP.cjs → chunk-CFRSSHAG.cjs} +1 -1
- package/dist/{chunk-XUWIECBY.cjs → chunk-CMER6QR6.cjs} +1 -1
- package/dist/chunk-D2S37DJ5.cjs +1 -0
- package/dist/{chunk-7SDHPRH6.js → chunk-DBFCNM4F.js} +1 -1
- package/dist/{chunk-PJAMNLC2.js → chunk-DCZP3IV7.js} +1 -1
- package/dist/{chunk-PWVGLO7T.cjs → chunk-DXF5442W.cjs} +1 -1
- package/dist/{chunk-JAXFDUNN.js → chunk-ECKSTWA3.js} +1 -1
- package/dist/{chunk-O673G7YH.cjs → chunk-FNDMOANS.cjs} +1 -1
- package/dist/{chunk-IN5ZETZE.cjs → chunk-GAKX357N.cjs} +1 -1
- package/dist/{chunk-FYWSZVID.cjs → chunk-GBTTVLK5.cjs} +1 -1
- package/dist/{chunk-ZRIMMPXR.cjs → chunk-HHA4QJLV.cjs} +1 -1
- package/dist/{chunk-PKFCOQOM.js → chunk-HHY65A7I.js} +1 -1
- package/dist/{chunk-PHIW7FUJ.cjs → chunk-HITDGEGW.cjs} +1 -1
- package/dist/chunk-HLI46UDR.js +1 -0
- package/dist/{chunk-AEO4REZV.js → chunk-HQ2RXBAN.js} +1 -1
- package/dist/{chunk-ZDKIEL5N.cjs → chunk-HUZNB3IW.cjs} +1 -1
- package/dist/{chunk-RE6GCFXZ.js → chunk-J5VWZVHL.js} +1 -1
- package/dist/{chunk-D6UK5JAA.cjs → chunk-JI3OXPVC.cjs} +1 -1
- package/dist/{chunk-OIBCJAF2.cjs → chunk-KQDPQXLL.cjs} +1 -1
- package/dist/chunk-LEPWAFFZ.js +1 -0
- package/dist/{chunk-QQDUYSLH.cjs → chunk-MI3DBGDV.cjs} +1 -1
- package/dist/{chunk-LVSOX532.cjs → chunk-MT2D5VRF.cjs} +1 -1
- package/dist/{chunk-ZV2UOOBX.js → chunk-MVGSX46H.js} +1 -1
- package/dist/chunk-NM33FBA3.cjs +1 -0
- package/dist/{chunk-OMTRYUKH.cjs → chunk-NS7UW4BA.cjs} +1 -1
- package/dist/chunk-O2ET3L2R.cjs +1 -0
- package/dist/{chunk-GC55YCPK.js → chunk-OOMMVXZB.js} +1 -1
- package/dist/{chunk-WVKODEVW.js → chunk-PA3RU64J.js} +1 -1
- package/dist/{chunk-JQIKTIVR.js → chunk-PH4EWT7R.js} +1 -1
- package/dist/{chunk-X56YW5CL.js → chunk-PJ76KALO.js} +1 -1
- package/dist/{chunk-INPOGMPS.js → chunk-PSIZCLMC.js} +1 -1
- package/dist/{chunk-V37HIVBA.cjs → chunk-PWHMYEUN.cjs} +1 -1
- package/dist/{chunk-JLWNRQ4S.js → chunk-PWYCEHYZ.js} +1 -1
- package/dist/{chunk-25TINDQ4.js → chunk-Q7EO6OOI.js} +1 -1
- package/dist/{chunk-IQ6EAHDU.cjs → chunk-QJ3BV3MW.cjs} +1 -1
- package/dist/{chunk-WX6KBOP5.js → chunk-QUPMMNGB.js} +1 -1
- package/dist/chunk-QYBC7GTA.js +1 -0
- package/dist/{chunk-HUGHRNQ3.js → chunk-R4LSFTQB.js} +1 -1
- package/dist/{chunk-BV6IQIQK.js → chunk-RV3Q5EIA.js} +1 -1
- package/dist/chunk-SE5L5SQK.cjs +1 -0
- package/dist/{chunk-T4RCLJ5G.js → chunk-UFYLMDRQ.js} +1 -1
- package/dist/{chunk-FTUJ5XHD.js → chunk-VG67JHRI.js} +1 -1
- package/dist/{chunk-FN4NQTKS.js → chunk-VW24W4N4.js} +1 -1
- package/dist/{chunk-KQIDRPAB.cjs → chunk-VXWRNGOB.cjs} +1 -1
- package/dist/{chunk-X4GV76CR.js → chunk-WRXF6ZSY.js} +1 -1
- package/dist/{chunk-M76VM347.cjs → chunk-WSCABGVO.cjs} +1 -1
- package/dist/{chunk-CZC2MNVK.cjs → chunk-WSDMIQNG.cjs} +1 -1
- package/dist/{chunk-YQ4GAIPZ.js → chunk-WXHLPGEB.js} +1 -1
- package/dist/chunk-X2CTI7IK.cjs +1 -0
- package/dist/chunk-XMV4T3J5.cjs +1 -0
- package/dist/{chunk-7PRP6CYJ.cjs → chunk-Y5JB3XEX.cjs} +1 -1
- package/dist/{chunk-6PNYLGI4.js → chunk-YOF3WB3D.js} +1 -1
- package/dist/{chunk-5V2RGAOS.js → chunk-YSR4FJK7.js} +1 -1
- package/dist/{chunk-SIBFVGGQ.cjs → chunk-ZACJIS35.cjs} +1 -1
- package/dist/{chunk-DVLQXFLW.cjs → chunk-ZR63HKN6.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/logger/index.cjs +1 -1
- package/dist/logger/index.js +1 -1
- package/dist/logger/init.cjs +1 -1
- package/dist/logger/init.js +1 -1
- package/dist/sdk.cjs +1 -1
- package/dist/sdk.d.cts +1 -1
- package/dist/sdk.d.ts +1 -1
- package/dist/sdk.js +1 -1
- package/dist/signers/descriptors/api-key.cjs +1 -1
- package/dist/signers/descriptors/api-key.d.cts +1 -1
- package/dist/signers/descriptors/api-key.d.ts +1 -1
- package/dist/signers/descriptors/api-key.js +1 -1
- package/dist/signers/descriptors/device.cjs +1 -1
- package/dist/signers/descriptors/device.d.cts +1 -1
- package/dist/signers/descriptors/device.d.ts +1 -1
- package/dist/signers/descriptors/device.js +1 -1
- package/dist/signers/descriptors/email.cjs +1 -1
- package/dist/signers/descriptors/email.d.cts +1 -1
- package/dist/signers/descriptors/email.d.ts +1 -1
- package/dist/signers/descriptors/email.js +1 -1
- package/dist/signers/descriptors/external-wallet.cjs +1 -1
- package/dist/signers/descriptors/external-wallet.d.cts +1 -1
- package/dist/signers/descriptors/external-wallet.d.ts +1 -1
- package/dist/signers/descriptors/external-wallet.js +1 -1
- package/dist/signers/descriptors/index.cjs +1 -1
- package/dist/signers/descriptors/index.d.cts +1 -1
- package/dist/signers/descriptors/index.d.ts +1 -1
- package/dist/signers/descriptors/index.js +1 -1
- package/dist/signers/descriptors/passkey.cjs +1 -1
- package/dist/signers/descriptors/passkey.d.cts +1 -1
- package/dist/signers/descriptors/passkey.d.ts +1 -1
- package/dist/signers/descriptors/passkey.js +1 -1
- package/dist/signers/descriptors/phone.cjs +1 -1
- package/dist/signers/descriptors/phone.d.cts +1 -1
- package/dist/signers/descriptors/phone.d.ts +1 -1
- package/dist/signers/descriptors/phone.js +1 -1
- package/dist/signers/descriptors/server.d.cts +1 -1
- package/dist/signers/descriptors/server.d.ts +1 -1
- package/dist/signers/descriptors/types.d.cts +1 -1
- package/dist/signers/descriptors/types.d.ts +1 -1
- package/dist/signers/device.d.cts +1 -1
- package/dist/signers/device.d.ts +1 -1
- package/dist/signers/evm-api-key.d.cts +1 -1
- package/dist/signers/evm-api-key.d.ts +1 -1
- package/dist/signers/evm-external-wallet.d.cts +1 -1
- package/dist/signers/evm-external-wallet.d.ts +1 -1
- package/dist/signers/external-wallet-signer.d.cts +1 -1
- package/dist/signers/external-wallet-signer.d.ts +1 -1
- package/dist/signers/index.cjs +1 -1
- package/dist/signers/index.d.cts +1 -1
- package/dist/signers/index.d.ts +1 -1
- package/dist/signers/index.js +1 -1
- package/dist/signers/non-custodial/index.cjs +1 -1
- package/dist/signers/non-custodial/index.d.cts +1 -1
- package/dist/signers/non-custodial/index.d.ts +1 -1
- package/dist/signers/non-custodial/index.js +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.d.cts +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.d.ts +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.js +1 -1
- package/dist/signers/non-custodial/ncs-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-signer.d.cts +1 -1
- package/dist/signers/non-custodial/ncs-signer.d.ts +1 -1
- package/dist/signers/non-custodial/ncs-signer.js +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.d.cts +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.d.ts +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.js +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.d.cts +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.js +1 -1
- package/dist/signers/passkey.cjs +1 -1
- package/dist/signers/passkey.d.cts +1 -1
- package/dist/signers/passkey.d.ts +1 -1
- package/dist/signers/passkey.js +1 -1
- package/dist/signers/server/assemble-server-signer.d.cts +1 -1
- package/dist/signers/server/assemble-server-signer.d.ts +1 -1
- package/dist/signers/server/evm-server-signer.d.cts +1 -1
- package/dist/signers/server/evm-server-signer.d.ts +1 -1
- package/dist/signers/server/helpers/derive-server-signer.d.cts +1 -1
- package/dist/signers/server/helpers/derive-server-signer.d.ts +1 -1
- package/dist/signers/server/helpers/index.d.cts +1 -1
- package/dist/signers/server/helpers/index.d.ts +1 -1
- package/dist/signers/server/index.d.cts +1 -1
- package/dist/signers/server/index.d.ts +1 -1
- package/dist/signers/server/resolver.d.cts +1 -1
- package/dist/signers/server/resolver.d.ts +1 -1
- package/dist/signers/server/solana-server-signer.d.cts +1 -1
- package/dist/signers/server/solana-server-signer.d.ts +1 -1
- package/dist/signers/server/stellar-server-signer.d.cts +1 -1
- package/dist/signers/server/stellar-server-signer.d.ts +1 -1
- package/dist/signers/solana-api-key.d.cts +1 -1
- package/dist/signers/solana-api-key.d.ts +1 -1
- package/dist/signers/solana-external-wallet.cjs +1 -1
- package/dist/signers/solana-external-wallet.d.cts +1 -1
- package/dist/signers/solana-external-wallet.d.ts +1 -1
- package/dist/signers/solana-external-wallet.js +1 -1
- package/dist/signers/stellar-external-wallet.d.cts +1 -1
- package/dist/signers/stellar-external-wallet.d.ts +1 -1
- package/dist/signers/types.d.cts +1 -1
- package/dist/signers/types.d.ts +1 -1
- package/dist/{types-PtseJnku.d.cts → types-BrPpsHHA.d.cts} +7 -4
- package/dist/{types-BzTdj2KC.d.ts → types-D0tKSMr1.d.ts} +7 -4
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.cjs +1 -1
- package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.js +1 -1
- package/dist/utils/device-signers/createDeviceSigner.d.cts +1 -1
- package/dist/utils/device-signers/createDeviceSigner.d.ts +1 -1
- package/dist/utils/device-signers/index.cjs +1 -1
- package/dist/utils/device-signers/index.d.cts +1 -1
- package/dist/utils/device-signers/index.d.ts +1 -1
- package/dist/utils/device-signers/index.js +1 -1
- package/dist/utils/errors.cjs +1 -1
- package/dist/utils/errors.d.cts +4 -2
- package/dist/utils/errors.d.ts +4 -2
- package/dist/utils/errors.js +1 -1
- package/dist/utils/locators.cjs +1 -1
- package/dist/utils/locators.d.cts +1 -1
- package/dist/utils/locators.d.ts +1 -1
- package/dist/utils/locators.js +1 -1
- package/dist/utils/recovery.cjs +1 -1
- package/dist/utils/recovery.d.cts +1 -1
- package/dist/utils/recovery.d.ts +1 -1
- package/dist/utils/recovery.js +1 -1
- package/dist/utils/signer-locator.cjs +1 -1
- package/dist/utils/signer-locator.d.cts +1 -1
- package/dist/utils/signer-locator.d.ts +1 -1
- package/dist/utils/signer-locator.js +1 -1
- package/dist/utils/signer-mapping.d.cts +1 -1
- package/dist/utils/signer-mapping.d.ts +1 -1
- package/dist/utils/signer-validation.cjs +1 -1
- package/dist/utils/signer-validation.js +1 -1
- package/dist/wallets/__tests__/test-helpers.cjs +1 -1
- package/dist/wallets/__tests__/test-helpers.d.cts +1 -1
- package/dist/wallets/__tests__/test-helpers.d.ts +1 -1
- package/dist/wallets/__tests__/test-helpers.js +1 -1
- package/dist/wallets/evm.cjs +1 -1
- package/dist/wallets/evm.d.cts +1 -1
- package/dist/wallets/evm.d.ts +1 -1
- package/dist/wallets/evm.js +1 -1
- package/dist/wallets/services/balance-formatter.cjs +1 -1
- package/dist/wallets/services/balance-formatter.d.cts +1 -1
- package/dist/wallets/services/balance-formatter.d.ts +1 -1
- package/dist/wallets/services/balance-formatter.js +1 -1
- package/dist/wallets/services/device-recovery-service.cjs +1 -1
- package/dist/wallets/services/device-recovery-service.d.cts +1 -1
- package/dist/wallets/services/device-recovery-service.d.ts +1 -1
- package/dist/wallets/services/device-recovery-service.js +1 -1
- package/dist/wallets/services/operation-poller.cjs +1 -1
- package/dist/wallets/services/operation-poller.d.cts +1 -1
- package/dist/wallets/services/operation-poller.d.ts +1 -1
- package/dist/wallets/services/operation-poller.js +1 -1
- package/dist/wallets/services/signer-manager.cjs +1 -1
- package/dist/wallets/services/signer-manager.d.cts +1 -1
- package/dist/wallets/services/signer-manager.d.ts +1 -1
- package/dist/wallets/services/signer-manager.js +1 -1
- package/dist/wallets/solana.cjs +1 -1
- package/dist/wallets/solana.d.cts +1 -1
- package/dist/wallets/solana.d.ts +1 -1
- package/dist/wallets/solana.js +1 -1
- package/dist/wallets/stellar.cjs +1 -1
- package/dist/wallets/stellar.d.cts +1 -1
- package/dist/wallets/stellar.d.ts +1 -1
- package/dist/wallets/stellar.js +1 -1
- package/dist/wallets/types.d.cts +1 -1
- package/dist/wallets/types.d.ts +1 -1
- package/dist/wallets/wallet-factory.cjs +1 -1
- package/dist/wallets/wallet-factory.d.cts +1 -1
- package/dist/wallets/wallet-factory.d.ts +1 -1
- package/dist/wallets/wallet-factory.js +1 -1
- package/dist/wallets/wallet.cjs +1 -1
- package/dist/wallets/wallet.d.cts +8 -2
- package/dist/wallets/wallet.d.ts +8 -2
- package/dist/wallets/wallet.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-AXFHMPWT.cjs +0 -1
- package/dist/chunk-BHLJZVGK.js +0 -1
- package/dist/chunk-BVFMFBOG.js +0 -1
- package/dist/chunk-BZYYVTXK.js +0 -1
- package/dist/chunk-IGO2ME4H.js +0 -1
- package/dist/chunk-KOHPRJDP.js +0 -1
- package/dist/chunk-OS5IMZ5L.cjs +0 -1
- package/dist/chunk-RFBVYUAZ.cjs +0 -1
- package/dist/chunk-TFAJDUF3.cjs +0 -1
- package/dist/chunk-VIOAYLVZ.cjs +0 -1
- package/dist/chunk-VNFATNQJ.js +0 -1
- package/dist/chunk-VPUAUWI4.js +0 -1
- package/dist/chunk-VS6I4S7X.cjs +0 -1
- package/dist/chunk-ZHI5V3DM.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJ33QM2IDcjs = require('../../chunk-J33QM2ID.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJ33QM2IDcjs = require('../../chunk-J33QM2ID.cjs');var _chunkHHA4QJLVcjs = require('../../chunk-HHA4QJLV.cjs');require('../../chunk-D2S37DJ5.cjs');require('../../chunk-36GZTRZX.cjs');require('../../chunk-AEHDAUN4.cjs');var _chunkDSIFRRBScjs = require('../../chunk-DSIFRRBS.cjs');var _vitest = require('vitest');var P=({data:e,status:t=200,ok:n=!0,statusText:s="OK"})=>({json:_vitest.vi.fn().mockResolvedValue(e),ok:n,status:t,statusText:s}),j= exports.createMockSuccessResponse =e=>P({data:e}),b= exports.createMockErrorResponse =(e,t=400,n="Bad Request")=>P({data:e,status:t,ok:!1,statusText:n}),B= exports.createMockCrossmint =(e={})=>{let t=_chunkDSIFRRBScjs.a.call(void 0, {apiKey:_chunkJ33QM2IDcjs.m},e);return _chunkDSIFRRBScjs.b.call(void 0, _chunkDSIFRRBScjs.a.call(void 0, {},t),{setJwt:_vitest.vi.fn().mockReturnThis()})},L= exports.createTestApiClient =e=>new (0, _chunkHHA4QJLVcjs.a)(e||B()),K= exports.createServerSideApiClient =()=>{let e=L();return Object.defineProperty(e,"isServerSide",{get:()=>!0,configurable:!0}),e},Y= exports.extractFetchCall =e=>{let t=e.mock.calls;if(t.length===0)return;let n=t[t.length-1];return{path:n[0],options:n[1]}},N= exports.expectRequestPath =(e,t)=>{_vitest.expect.call(void 0, e==null?void 0:e.path).toBe(t)},V= exports.expectCommonHeaders =e=>{_vitest.expect.call(void 0, e["Content-Type"]).toBe("application/json")},q= exports.expectRequestBody =(e,t)=>{_vitest.expect.call(void 0, e.body).toBe(JSON.stringify(t))},z= exports.validateRequest =(e,t,n)=>{_vitest.expect.call(void 0, e).toBeDefined(),e&&(N(e,t),e.options.headers&&V(e.options.headers),n!==void 0&&e.options&&q(e.options,n))},X= exports.testHttpErrorResponse =(e,t,n,s)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){t.mockResolvedValue(b(n,s));let a=yield e();_vitest.expect.call(void 0, l(a)).toBe(!0),l(a)&&(_vitest.expect.call(void 0, a.error).toBe(!0),n.message&&_vitest.expect.call(void 0, a.message).toBe(n.message))}),Z= exports.testCommonHttpErrors =(s,a,...o)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,[s,a,...o],function*(e,t,n=[]){for(let{status:c,message:g}of _chunkJ33QM2IDcjs.a){if(n.includes(c))continue;let u={error:!0,message:g};t.mockResolvedValueOnce(b(u,c));let m=yield e();_vitest.expect.call(void 0, l(m)).toBe(!0)}}),Q= exports.testNetworkError =(e,t)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){t.mockRejectedValue(new Error("Network error")),yield _vitest.expect.call(void 0, e()).rejects.toThrow("Network error")}),ee= exports.testInvalidJsonResponse =(e,t)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){let n={json:_vitest.vi.fn().mockRejectedValue(new Error("Invalid JSON")),ok:!0,status:200};t.mockResolvedValue(n),yield _vitest.expect.call(void 0, e()).rejects.toThrow()}),te= exports.testTimeoutError =(e,t)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){t.mockImplementation(()=>new Promise((n,s)=>setTimeout(()=>s(new Error("Request timeout")),0))),yield _vitest.expect.call(void 0, e()).rejects.toThrow("Request timeout")}),ne= exports.testMalformedResponse =(e,t,n)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){t.mockResolvedValue(j(n));let s=yield e();_vitest.expect.call(void 0, s).toEqual(n)}),se= exports.createMockWalletResponse =(e={})=>_chunkDSIFRRBScjs.a.call(void 0, {address:_chunkJ33QM2IDcjs.b.evmAddress,chainType:"evm",type:"smart",config:{adminSigner:{type:"external-wallet",address:_chunkJ33QM2IDcjs.k.EVM_TEST}}},e),oe= exports.createMockSendResponse =(e={})=>_chunkDSIFRRBScjs.a.call(void 0, {id:"txn-123",status:"pending",chainType:"evm",walletType:"evm-smart-wallet",params:{transaction:"0x1234567890abcdef",signer:"api-key:test"},onChain:{txId:"0xabcdef1234567890abcdef1234567890abcdef12",explorerLink:"https://explorer.example.com/tx/0xabcdef1234567890abcdef1234567890abcdef12"},createdAt:Date.now()},e);function l(e){return typeof e=="object"&&e!==null&&"error"in e&&e.error===!0}function C(e){return typeof e=="object"&&e!==null&&"address"in e&&"chainType"in e&&"type"in e}function $(e){return typeof e=="object"&&e!==null&&"id"in e&&"status"in e&&"chainType"in e}var x=e=>new Promise(t=>setTimeout(t,e)),re= exports.isValidEthereumAddress =e=>/^0x[a-fA-F0-9]{40}$/.test(e),ae= exports.isValidSolanaAddress =e=>/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(e),ie= exports.createIntegrationApiClient =(e,t,n={})=>{let s=_chunkDSIFRRBScjs.a.call(void 0, _chunkDSIFRRBScjs.a.call(void 0, {apiKey:e},t&&{overrideBaseUrl:t}),n),a=_chunkDSIFRRBScjs.b.call(void 0, _chunkDSIFRRBScjs.a.call(void 0, {},s),{setJwt:()=>a});return new (0, _chunkHHA4QJLVcjs.a)(a)},v= exports.TestDataFactory =class{constructor(){this.wallets=[];this.transactions=[]}addWallet(t){t&&!this.wallets.includes(t)&&this.wallets.push(t)}addTransaction(t){t&&!this.transactions.includes(t)&&this.transactions.push(t)}getWallet(t=0){return this.wallets[t]}getTransaction(t=0){return this.transactions[t]}hasWallets(){return this.wallets.length>0}clear(){this.wallets=[],this.transactions=[]}};function ce(s,a){return _chunkDSIFRRBScjs.h.call(void 0, this,arguments,function*(e,t,n={}){if(t.hasWallets())return t.getWallet();let{chainType:o="evm",type:c="mpc",owner:g,testName:u="default"}=n,m=g||`userId:integration-${u}-${Date.now()}`,f=yield e.createWallet(_chunkDSIFRRBScjs.a.call(void 0, {chainType:o,type:c},g&&{owner:m}));if(C(f))return t.addWallet(f.address),f.address})}function pe(e,t,n){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let s=yield e.createWallet(n);return C(s)&&t.addWallet(s.address),s})}function le(e,t){_vitest.expect.call(void 0, l(e)).toBe(!0),t&&_vitest.expect.call(void 0, e.message).toBeDefined()}function ue(e){_vitest.expect.call(void 0, C(e)).toBe(!0)}function de(e){_vitest.expect.call(void 0, $(e)).toBe(!0)}var I=(e,t,n,s="usdxm",a="base-sepolia")=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){let o={amount:n,token:s,chain:a},c=yield e.fundWallet(t,o);if(l(c))throw new Error(`Failed to fund wallet: ${c.message||"Unknown error"}`);return yield x(_chunkJ33QM2IDcjs.i),c}),U= exports.approveTransaction =(a,o,c,...g)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,[a,o,c,...g],function*(e,t,n,s=_chunkJ33QM2IDcjs.l.APPROVE_TRANSACTION_MAX_RETRIES){var m;for(let f=0;f<s;f++){let d=yield e.getTransaction(t,n);if(l(d))throw new Error(`Transaction not found: ${d.message||"Unknown error"}`);if("status"in d&&(d.status==="success"||d.status==="failed"))return d;let T="approvals"in d?(m=d.approvals)==null?void 0:m.pending:void 0;if(T&&T.length>0){let O={approvals:T.map(_=>({signer:_.signer.locator,signature:""}))},h=yield e.approveTransaction(t,n,O);if(l(h))throw new Error(`Failed to approve transaction: ${h.message||"Unknown error"}`);yield x(_chunkJ33QM2IDcjs.j);continue}yield x(_chunkJ33QM2IDcjs.i)}let u=yield e.getTransaction(t,n);if(l(u))throw new Error(`Transaction not found after retries: ${u.message||"Unknown error"}`);if(!("status"in u))throw new Error("Transaction response missing status property");return u}),me= exports.fundWalletAndWait =(e,t,n=1,s="usdxm",a="base-sepolia")=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){return I(e,t,n,s,a)}),fe= exports.sendTokenAndApprove =(e,t,n,s,a)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){let o=yield e.send(t,n,{recipient:s,amount:a});if(l(o))throw new Error(`Failed to send token: ${o.message||"Unknown error"}`);if(typeof o=="object"&&o!==null&&"id"in o&&typeof o.id=="string")return U(e,t,o.id);throw new Error("Transaction ID not found in send response")}),ge= exports.ensureWalletFunded =(e,t,n=1,s="usdxm",a="base-sepolia")=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){try{yield I(e,t,n,s,a)}catch(o){let c=o instanceof Error?o.message:String(o);if(!c.includes("already funded")&&!c.includes("insufficient"))throw o}});exports.TestDataFactory = v; exports.approveTransaction = U; exports.createIntegrationApiClient = ie; exports.createMockCrossmint = B; exports.createMockErrorResponse = b; exports.createMockResponse = P; exports.createMockSendResponse = oe; exports.createMockSuccessResponse = j; exports.createMockWalletResponse = se; exports.createServerSideApiClient = K; exports.createTestApiClient = L; exports.createTestWallet = pe; exports.delay = x; exports.ensureWalletExists = ce; exports.ensureWalletFunded = ge; exports.expectCommonHeaders = V; exports.expectErrorResponse = le; exports.expectRequestBody = q; exports.expectRequestPath = N; exports.expectSuccessTransactionResponse = de; exports.expectSuccessWalletResponse = ue; exports.extractFetchCall = Y; exports.fundWallet = I; exports.fundWalletAndWait = me; exports.isErrorResponse = l; exports.isSuccessTransactionResponse = $; exports.isSuccessWalletResponse = C; exports.isValidEthereumAddress = re; exports.isValidSolanaAddress = ae; exports.sendTokenAndApprove = fe; exports.testCommonHttpErrors = Z; exports.testHttpErrorResponse = X; exports.testInvalidJsonResponse = ee; exports.testMalformedResponse = ne; exports.testNetworkError = Q; exports.testTimeoutError = te; exports.validateRequest = z;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MockedFunction } from 'vitest';
|
|
2
2
|
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
3
3
|
import { ApiClient } from '../client.cjs';
|
|
4
|
-
import { ak as WalletLocator, ax as GetTransactionResponse, ay as SendResponse, az as CreateWalletResponse, aA as CreateWalletParams, ad as FundWalletResponse } from '../../types-
|
|
4
|
+
import { ak as WalletLocator, ax as GetTransactionResponse, ay as SendResponse, az as CreateWalletResponse, aA as CreateWalletParams, ad as FundWalletResponse } from '../../types-BrPpsHHA.cjs';
|
|
5
5
|
import '../../chains/chains.cjs';
|
|
6
6
|
import 'viem';
|
|
7
7
|
import '../gen/types.gen.cjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MockedFunction } from 'vitest';
|
|
2
2
|
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
3
3
|
import { ApiClient } from '../client.js';
|
|
4
|
-
import { ak as WalletLocator, ax as GetTransactionResponse, ay as SendResponse, az as CreateWalletResponse, aA as CreateWalletParams, ad as FundWalletResponse } from '../../types-
|
|
4
|
+
import { ak as WalletLocator, ax as GetTransactionResponse, ay as SendResponse, az as CreateWalletResponse, aA as CreateWalletParams, ad as FundWalletResponse } from '../../types-D0tKSMr1.js';
|
|
5
5
|
import '../../chains/chains.js';
|
|
6
6
|
import 'viem';
|
|
7
7
|
import '../gen/types.gen.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as A,b as F,i as R,j as W,k as E,l as M,m as S}from"../../chunk-DIGDDKSF.js";import{a as w}from"../../chunk-
|
|
1
|
+
import{a as A,b as F,i as R,j as W,k as E,l as M,m as S}from"../../chunk-DIGDDKSF.js";import{a as w}from"../../chunk-MVGSX46H.js";import"../../chunk-4I3EXM4B.js";import"../../chunk-2YLAHC7J.js";import"../../chunk-QYBC7GTA.js";import{a as p,b as k,h as i}from"../../chunk-NU7VF7MC.js";import{expect as r,vi as y}from"vitest";var P=({data:e,status:t=200,ok:n=!0,statusText:s="OK"})=>({json:y.fn().mockResolvedValue(e),ok:n,status:t,statusText:s}),j=e=>P({data:e}),b=(e,t=400,n="Bad Request")=>P({data:e,status:t,ok:!1,statusText:n}),B=(e={})=>{let t=p({apiKey:S},e);return k(p({},t),{setJwt:y.fn().mockReturnThis()})},L=e=>new w(e||B()),Y=()=>{let e=L();return Object.defineProperty(e,"isServerSide",{get:()=>!0,configurable:!0}),e},z=e=>{let t=e.mock.calls;if(t.length===0)return;let n=t[t.length-1];return{path:n[0],options:n[1]}},N=(e,t)=>{r(e==null?void 0:e.path).toBe(t)},V=e=>{r(e["Content-Type"]).toBe("application/json")},q=(e,t)=>{r(e.body).toBe(JSON.stringify(t))},X=(e,t,n)=>{r(e).toBeDefined(),e&&(N(e,t),e.options.headers&&V(e.options.headers),n!==void 0&&e.options&&q(e.options,n))},Z=(e,t,n,s)=>i(void 0,null,function*(){t.mockResolvedValue(b(n,s));let a=yield e();r(l(a)).toBe(!0),l(a)&&(r(a.error).toBe(!0),n.message&&r(a.message).toBe(n.message))}),Q=(s,a,...o)=>i(void 0,[s,a,...o],function*(e,t,n=[]){for(let{status:c,message:g}of A){if(n.includes(c))continue;let u={error:!0,message:g};t.mockResolvedValueOnce(b(u,c));let m=yield e();r(l(m)).toBe(!0)}}),ee=(e,t)=>i(void 0,null,function*(){t.mockRejectedValue(new Error("Network error")),yield r(e()).rejects.toThrow("Network error")}),te=(e,t)=>i(void 0,null,function*(){let n={json:y.fn().mockRejectedValue(new Error("Invalid JSON")),ok:!0,status:200};t.mockResolvedValue(n),yield r(e()).rejects.toThrow()}),ne=(e,t)=>i(void 0,null,function*(){t.mockImplementation(()=>new Promise((n,s)=>setTimeout(()=>s(new Error("Request timeout")),0))),yield r(e()).rejects.toThrow("Request timeout")}),se=(e,t,n)=>i(void 0,null,function*(){t.mockResolvedValue(j(n));let s=yield e();r(s).toEqual(n)}),oe=(e={})=>p({address:F.evmAddress,chainType:"evm",type:"smart",config:{adminSigner:{type:"external-wallet",address:E.EVM_TEST}}},e),re=(e={})=>p({id:"txn-123",status:"pending",chainType:"evm",walletType:"evm-smart-wallet",params:{transaction:"0x1234567890abcdef",signer:"api-key:test"},onChain:{txId:"0xabcdef1234567890abcdef1234567890abcdef12",explorerLink:"https://explorer.example.com/tx/0xabcdef1234567890abcdef1234567890abcdef12"},createdAt:Date.now()},e);function l(e){return typeof e=="object"&&e!==null&&"error"in e&&e.error===!0}function C(e){return typeof e=="object"&&e!==null&&"address"in e&&"chainType"in e&&"type"in e}function $(e){return typeof e=="object"&&e!==null&&"id"in e&&"status"in e&&"chainType"in e}var x=e=>new Promise(t=>setTimeout(t,e)),ae=e=>/^0x[a-fA-F0-9]{40}$/.test(e),ie=e=>/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(e),ce=(e,t,n={})=>{let s=p(p({apiKey:e},t&&{overrideBaseUrl:t}),n),a=k(p({},s),{setJwt:()=>a});return new w(a)},v=class{constructor(){this.wallets=[];this.transactions=[]}addWallet(t){t&&!this.wallets.includes(t)&&this.wallets.push(t)}addTransaction(t){t&&!this.transactions.includes(t)&&this.transactions.push(t)}getWallet(t=0){return this.wallets[t]}getTransaction(t=0){return this.transactions[t]}hasWallets(){return this.wallets.length>0}clear(){this.wallets=[],this.transactions=[]}};function pe(s,a){return i(this,arguments,function*(e,t,n={}){if(t.hasWallets())return t.getWallet();let{chainType:o="evm",type:c="mpc",owner:g,testName:u="default"}=n,m=g||`userId:integration-${u}-${Date.now()}`,f=yield e.createWallet(p({chainType:o,type:c},g&&{owner:m}));if(C(f))return t.addWallet(f.address),f.address})}function le(e,t,n){return i(this,null,function*(){let s=yield e.createWallet(n);return C(s)&&t.addWallet(s.address),s})}function ue(e,t){r(l(e)).toBe(!0),t&&r(e.message).toBeDefined()}function de(e){r(C(e)).toBe(!0)}function me(e){r($(e)).toBe(!0)}var I=(e,t,n,s="usdxm",a="base-sepolia")=>i(void 0,null,function*(){let o={amount:n,token:s,chain:a},c=yield e.fundWallet(t,o);if(l(c))throw new Error(`Failed to fund wallet: ${c.message||"Unknown error"}`);return yield x(R),c}),U=(a,o,c,...g)=>i(void 0,[a,o,c,...g],function*(e,t,n,s=M.APPROVE_TRANSACTION_MAX_RETRIES){var m;for(let f=0;f<s;f++){let d=yield e.getTransaction(t,n);if(l(d))throw new Error(`Transaction not found: ${d.message||"Unknown error"}`);if("status"in d&&(d.status==="success"||d.status==="failed"))return d;let T="approvals"in d?(m=d.approvals)==null?void 0:m.pending:void 0;if(T&&T.length>0){let O={approvals:T.map(_=>({signer:_.signer.locator,signature:""}))},h=yield e.approveTransaction(t,n,O);if(l(h))throw new Error(`Failed to approve transaction: ${h.message||"Unknown error"}`);yield x(W);continue}yield x(R)}let u=yield e.getTransaction(t,n);if(l(u))throw new Error(`Transaction not found after retries: ${u.message||"Unknown error"}`);if(!("status"in u))throw new Error("Transaction response missing status property");return u}),fe=(e,t,n=1,s="usdxm",a="base-sepolia")=>i(void 0,null,function*(){return I(e,t,n,s,a)}),ge=(e,t,n,s,a)=>i(void 0,null,function*(){let o=yield e.send(t,n,{recipient:s,amount:a});if(l(o))throw new Error(`Failed to send token: ${o.message||"Unknown error"}`);if(typeof o=="object"&&o!==null&&"id"in o&&typeof o.id=="string")return U(e,t,o.id);throw new Error("Transaction ID not found in send response")}),Te=(e,t,n=1,s="usdxm",a="base-sepolia")=>i(void 0,null,function*(){try{yield I(e,t,n,s,a)}catch(o){let c=o instanceof Error?o.message:String(o);if(!c.includes("already funded")&&!c.includes("insufficient"))throw o}});export{v as TestDataFactory,U as approveTransaction,ce as createIntegrationApiClient,B as createMockCrossmint,b as createMockErrorResponse,P as createMockResponse,re as createMockSendResponse,j as createMockSuccessResponse,oe as createMockWalletResponse,Y as createServerSideApiClient,L as createTestApiClient,le as createTestWallet,x as delay,pe as ensureWalletExists,Te as ensureWalletFunded,V as expectCommonHeaders,ue as expectErrorResponse,q as expectRequestBody,N as expectRequestPath,me as expectSuccessTransactionResponse,de as expectSuccessWalletResponse,z as extractFetchCall,I as fundWallet,fe as fundWalletAndWait,l as isErrorResponse,$ as isSuccessTransactionResponse,C as isSuccessWalletResponse,ae as isValidEthereumAddress,ie as isValidSolanaAddress,ge as sendTokenAndApprove,Q as testCommonHttpErrors,Z as testHttpErrorResponse,te as testInvalidJsonResponse,se as testMalformedResponse,ee as testNetworkError,ne as testTimeoutError,X as validateRequest};
|
package/dist/api/client.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHHA4QJLVcjs = require('../chunk-HHA4QJLV.cjs');require('../chunk-D2S37DJ5.cjs');require('../chunk-36GZTRZX.cjs');require('../chunk-AEHDAUN4.cjs');require('../chunk-DSIFRRBS.cjs');exports.ApiClient = _chunkHHA4QJLVcjs.a;
|
package/dist/api/client.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CrossmintApiClient, Crossmint, APIKeyEnvironmentPrefix } from '@crossmint/common-sdk-base';
|
|
2
|
-
import { aA as CreateWalletParams, az as CreateWalletResponse, ak as WalletLocator, aG as GetWalletResponse, aH as CreateTransactionParams, aI as CreateTransactionResponse, aJ as ApproveTransactionParams, aK as ApproveTransactionResponse, ax as GetTransactionResponse, aL as CreateSignatureParams, aM as CreateSignatureResponse, aN as ApproveSignatureParams, al as ApproveSignatureResponse, aO as GetSignatureResponse, ae as GetTransactionsResponse, aP as GetTransfersResponse, aQ as GetBalanceResponse, aR as FundWalletParams, ad as FundWalletResponse, as as RegisterSignerParams, av as RegisterSignerResponse, aS as RemoveSignerParams, aT as RemoveSignerResponse, aU as RegisterRecoveryMethodParams, aV as RegisterRecoveryMethodResponse, aW as RemoveRecoveryMethodParams, aX as RemoveRecoveryMethodResponse, aq as GetSignerResponse, aY as SendParams, ay as SendResponse } from '../types-
|
|
2
|
+
import { aA as CreateWalletParams, az as CreateWalletResponse, ak as WalletLocator, aG as GetWalletResponse, aH as CreateTransactionParams, aI as CreateTransactionResponse, aJ as ApproveTransactionParams, aK as ApproveTransactionResponse, ax as GetTransactionResponse, aL as CreateSignatureParams, aM as CreateSignatureResponse, aN as ApproveSignatureParams, al as ApproveSignatureResponse, aO as GetSignatureResponse, ae as GetTransactionsResponse, aP as GetTransfersResponse, aQ as GetBalanceResponse, aR as FundWalletParams, ad as FundWalletResponse, as as RegisterSignerParams, av as RegisterSignerResponse, aS as RemoveSignerParams, aT as RemoveSignerResponse, aU as RegisterRecoveryMethodParams, aV as RegisterRecoveryMethodResponse, aW as RemoveRecoveryMethodParams, aX as RemoveRecoveryMethodResponse, aq as GetSignerResponse, aY as SendParams, ay as SendResponse } from '../types-BrPpsHHA.cjs';
|
|
3
3
|
import { Chain } from '../chains/chains.cjs';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import './gen/types.gen.cjs';
|
package/dist/api/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CrossmintApiClient, Crossmint, APIKeyEnvironmentPrefix } from '@crossmint/common-sdk-base';
|
|
2
|
-
import { aA as CreateWalletParams, az as CreateWalletResponse, ak as WalletLocator, aG as GetWalletResponse, aH as CreateTransactionParams, aI as CreateTransactionResponse, aJ as ApproveTransactionParams, aK as ApproveTransactionResponse, ax as GetTransactionResponse, aL as CreateSignatureParams, aM as CreateSignatureResponse, aN as ApproveSignatureParams, al as ApproveSignatureResponse, aO as GetSignatureResponse, ae as GetTransactionsResponse, aP as GetTransfersResponse, aQ as GetBalanceResponse, aR as FundWalletParams, ad as FundWalletResponse, as as RegisterSignerParams, av as RegisterSignerResponse, aS as RemoveSignerParams, aT as RemoveSignerResponse, aU as RegisterRecoveryMethodParams, aV as RegisterRecoveryMethodResponse, aW as RemoveRecoveryMethodParams, aX as RemoveRecoveryMethodResponse, aq as GetSignerResponse, aY as SendParams, ay as SendResponse } from '../types-
|
|
2
|
+
import { aA as CreateWalletParams, az as CreateWalletResponse, ak as WalletLocator, aG as GetWalletResponse, aH as CreateTransactionParams, aI as CreateTransactionResponse, aJ as ApproveTransactionParams, aK as ApproveTransactionResponse, ax as GetTransactionResponse, aL as CreateSignatureParams, aM as CreateSignatureResponse, aN as ApproveSignatureParams, al as ApproveSignatureResponse, aO as GetSignatureResponse, ae as GetTransactionsResponse, aP as GetTransfersResponse, aQ as GetBalanceResponse, aR as FundWalletParams, ad as FundWalletResponse, as as RegisterSignerParams, av as RegisterSignerResponse, aS as RemoveSignerParams, aT as RemoveSignerResponse, aU as RegisterRecoveryMethodParams, aV as RegisterRecoveryMethodResponse, aW as RemoveRecoveryMethodParams, aX as RemoveRecoveryMethodResponse, aq as GetSignerResponse, aY as SendParams, ay as SendResponse } from '../types-D0tKSMr1.js';
|
|
3
3
|
import { Chain } from '../chains/chains.js';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import './gen/types.gen.js';
|
package/dist/api/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-MVGSX46H.js";import"../chunk-4I3EXM4B.js";import"../chunk-2YLAHC7J.js";import"../chunk-QYBC7GTA.js";import"../chunk-NU7VF7MC.js";export{a as ApiClient};
|
package/dist/api/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');var _chunkHHA4QJLVcjs = require('../chunk-HHA4QJLV.cjs');require('../chunk-ECAM5KTH.cjs');require('../chunk-D2S37DJ5.cjs');require('../chunk-36GZTRZX.cjs');require('../chunk-AEHDAUN4.cjs');require('../chunk-DSIFRRBS.cjs');exports.ApiClient = _chunkHHA4QJLVcjs.a;
|
package/dist/api/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ApiClient } from './client.cjs';
|
|
2
|
-
export { aN as ApproveSignatureParams, al as ApproveSignatureResponse, aJ as ApproveTransactionParams, aK as ApproveTransactionResponse, aL as CreateSignatureParams, aM as CreateSignatureResponse, aH as CreateTransactionParams, aI as CreateTransactionResponse, aZ as CreateTransactionSuccessResponse, aA as CreateWalletParams, az as CreateWalletResponse, aR as FundWalletParams, ad as FundWalletResponse, aQ as GetBalanceResponse, aF as GetBalanceSuccessResponse, aO as GetSignatureResponse, aq as GetSignerResponse, a_ as GetSignersResponse, ax as GetTransactionResponse, af as GetTransactionSuccessResponse, ae as GetTransactionsResponse, aP as GetTransfersResponse, aG as GetWalletResponse, a$ as GetWalletSuccessResponse, b0 as RecoverySignerConfig, aU as RegisterRecoveryMethodParams, aV as RegisterRecoveryMethodResponse, au as RegisterSignerChain, as as RegisterSignerParams, t as RegisterSignerPasskeyParams, av as RegisterSignerResponse, aW as RemoveRecoveryMethodParams, aX as RemoveRecoveryMethodResponse, aS as RemoveSignerParams, aT as RemoveSignerResponse, S as Scope, aY as SendParams, ay as SendResponse, a8 as Signer, N as TransferScope, Q as Transfers, ak as WalletLocator } from '../types-
|
|
2
|
+
export { aN as ApproveSignatureParams, al as ApproveSignatureResponse, aJ as ApproveTransactionParams, aK as ApproveTransactionResponse, aL as CreateSignatureParams, aM as CreateSignatureResponse, aH as CreateTransactionParams, aI as CreateTransactionResponse, aZ as CreateTransactionSuccessResponse, aA as CreateWalletParams, az as CreateWalletResponse, aR as FundWalletParams, ad as FundWalletResponse, aQ as GetBalanceResponse, aF as GetBalanceSuccessResponse, aO as GetSignatureResponse, aq as GetSignerResponse, a_ as GetSignersResponse, ax as GetTransactionResponse, af as GetTransactionSuccessResponse, ae as GetTransactionsResponse, aP as GetTransfersResponse, aG as GetWalletResponse, a$ as GetWalletSuccessResponse, b0 as RecoverySignerConfig, aU as RegisterRecoveryMethodParams, aV as RegisterRecoveryMethodResponse, au as RegisterSignerChain, as as RegisterSignerParams, t as RegisterSignerPasskeyParams, av as RegisterSignerResponse, aW as RemoveRecoveryMethodParams, aX as RemoveRecoveryMethodResponse, aS as RemoveSignerParams, aT as RemoveSignerResponse, S as Scope, aY as SendParams, ay as SendResponse, a8 as Signer, N as TransferScope, Q as Transfers, ak as WalletLocator } from '../types-BrPpsHHA.cjs';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import '../chains/chains.cjs';
|
|
5
5
|
import 'viem';
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ApiClient } from './client.js';
|
|
2
|
-
export { aN as ApproveSignatureParams, al as ApproveSignatureResponse, aJ as ApproveTransactionParams, aK as ApproveTransactionResponse, aL as CreateSignatureParams, aM as CreateSignatureResponse, aH as CreateTransactionParams, aI as CreateTransactionResponse, aZ as CreateTransactionSuccessResponse, aA as CreateWalletParams, az as CreateWalletResponse, aR as FundWalletParams, ad as FundWalletResponse, aQ as GetBalanceResponse, aF as GetBalanceSuccessResponse, aO as GetSignatureResponse, aq as GetSignerResponse, a_ as GetSignersResponse, ax as GetTransactionResponse, af as GetTransactionSuccessResponse, ae as GetTransactionsResponse, aP as GetTransfersResponse, aG as GetWalletResponse, a$ as GetWalletSuccessResponse, b0 as RecoverySignerConfig, aU as RegisterRecoveryMethodParams, aV as RegisterRecoveryMethodResponse, au as RegisterSignerChain, as as RegisterSignerParams, t as RegisterSignerPasskeyParams, av as RegisterSignerResponse, aW as RemoveRecoveryMethodParams, aX as RemoveRecoveryMethodResponse, aS as RemoveSignerParams, aT as RemoveSignerResponse, S as Scope, aY as SendParams, ay as SendResponse, a8 as Signer, N as TransferScope, Q as Transfers, ak as WalletLocator } from '../types-
|
|
2
|
+
export { aN as ApproveSignatureParams, al as ApproveSignatureResponse, aJ as ApproveTransactionParams, aK as ApproveTransactionResponse, aL as CreateSignatureParams, aM as CreateSignatureResponse, aH as CreateTransactionParams, aI as CreateTransactionResponse, aZ as CreateTransactionSuccessResponse, aA as CreateWalletParams, az as CreateWalletResponse, aR as FundWalletParams, ad as FundWalletResponse, aQ as GetBalanceResponse, aF as GetBalanceSuccessResponse, aO as GetSignatureResponse, aq as GetSignerResponse, a_ as GetSignersResponse, ax as GetTransactionResponse, af as GetTransactionSuccessResponse, ae as GetTransactionsResponse, aP as GetTransfersResponse, aG as GetWalletResponse, a$ as GetWalletSuccessResponse, b0 as RecoverySignerConfig, aU as RegisterRecoveryMethodParams, aV as RegisterRecoveryMethodResponse, au as RegisterSignerChain, as as RegisterSignerParams, t as RegisterSignerPasskeyParams, av as RegisterSignerResponse, aW as RemoveRecoveryMethodParams, aX as RemoveRecoveryMethodResponse, aS as RemoveSignerParams, aT as RemoveSignerResponse, S as Scope, aY as SendParams, ay as SendResponse, a8 as Signer, N as TransferScope, Q as Transfers, ak as WalletLocator } from '../types-D0tKSMr1.js';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import '../chains/chains.js';
|
|
5
5
|
import 'viem';
|
package/dist/api/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-5IFDVB4Y.js";import{a}from"../chunk-
|
|
1
|
+
import"../chunk-5IFDVB4Y.js";import{a}from"../chunk-MVGSX46H.js";import"../chunk-KBJA7JDT.js";import"../chunk-4I3EXM4B.js";import"../chunk-2YLAHC7J.js";import"../chunk-QYBC7GTA.js";import"../chunk-NU7VF7MC.js";export{a as ApiClient};
|
package/dist/api/types.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'viem';
|
|
2
2
|
import './gen/types.gen.cjs';
|
|
3
|
-
export { aN as ApproveSignatureParams, al as ApproveSignatureResponse, aJ as ApproveTransactionParams, aK as ApproveTransactionResponse, aL as CreateSignatureParams, aM as CreateSignatureResponse, aH as CreateTransactionParams, aI as CreateTransactionResponse, aZ as CreateTransactionSuccessResponse, aA as CreateWalletParams, az as CreateWalletResponse, aR as FundWalletParams, ad as FundWalletResponse, aQ as GetBalanceResponse, aF as GetBalanceSuccessResponse, aO as GetSignatureResponse, aq as GetSignerResponse, a_ as GetSignersResponse, ax as GetTransactionResponse, af as GetTransactionSuccessResponse, ae as GetTransactionsResponse, aP as GetTransfersResponse, aG as GetWalletResponse, a$ as GetWalletSuccessResponse, b0 as RecoverySignerConfig, aU as RegisterRecoveryMethodParams, aV as RegisterRecoveryMethodResponse, au as RegisterSignerChain, as as RegisterSignerParams, t as RegisterSignerPasskeyParams, av as RegisterSignerResponse, aW as RemoveRecoveryMethodParams, aX as RemoveRecoveryMethodResponse, aS as RemoveSignerParams, aT as RemoveSignerResponse, S as Scope, aY as SendParams, ay as SendResponse, a8 as Signer, N as TransferScope, Q as Transfers, ak as WalletLocator } from '../types-
|
|
3
|
+
export { aN as ApproveSignatureParams, al as ApproveSignatureResponse, aJ as ApproveTransactionParams, aK as ApproveTransactionResponse, aL as CreateSignatureParams, aM as CreateSignatureResponse, aH as CreateTransactionParams, aI as CreateTransactionResponse, aZ as CreateTransactionSuccessResponse, aA as CreateWalletParams, az as CreateWalletResponse, aR as FundWalletParams, ad as FundWalletResponse, aQ as GetBalanceResponse, aF as GetBalanceSuccessResponse, aO as GetSignatureResponse, aq as GetSignerResponse, a_ as GetSignersResponse, ax as GetTransactionResponse, af as GetTransactionSuccessResponse, ae as GetTransactionsResponse, aP as GetTransfersResponse, aG as GetWalletResponse, a$ as GetWalletSuccessResponse, b0 as RecoverySignerConfig, aU as RegisterRecoveryMethodParams, aV as RegisterRecoveryMethodResponse, au as RegisterSignerChain, as as RegisterSignerParams, t as RegisterSignerPasskeyParams, av as RegisterSignerResponse, aW as RemoveRecoveryMethodParams, aX as RemoveRecoveryMethodResponse, aS as RemoveSignerParams, aT as RemoveSignerResponse, S as Scope, aY as SendParams, ay as SendResponse, a8 as Signer, N as TransferScope, Q as Transfers, ak as WalletLocator } from '../types-BrPpsHHA.cjs';
|
|
4
4
|
import '../chains/chains.cjs';
|
|
5
5
|
import 'ox';
|
|
6
6
|
import '@crossmint/client-sdk-window';
|
package/dist/api/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'viem';
|
|
2
2
|
import './gen/types.gen.js';
|
|
3
|
-
export { aN as ApproveSignatureParams, al as ApproveSignatureResponse, aJ as ApproveTransactionParams, aK as ApproveTransactionResponse, aL as CreateSignatureParams, aM as CreateSignatureResponse, aH as CreateTransactionParams, aI as CreateTransactionResponse, aZ as CreateTransactionSuccessResponse, aA as CreateWalletParams, az as CreateWalletResponse, aR as FundWalletParams, ad as FundWalletResponse, aQ as GetBalanceResponse, aF as GetBalanceSuccessResponse, aO as GetSignatureResponse, aq as GetSignerResponse, a_ as GetSignersResponse, ax as GetTransactionResponse, af as GetTransactionSuccessResponse, ae as GetTransactionsResponse, aP as GetTransfersResponse, aG as GetWalletResponse, a$ as GetWalletSuccessResponse, b0 as RecoverySignerConfig, aU as RegisterRecoveryMethodParams, aV as RegisterRecoveryMethodResponse, au as RegisterSignerChain, as as RegisterSignerParams, t as RegisterSignerPasskeyParams, av as RegisterSignerResponse, aW as RemoveRecoveryMethodParams, aX as RemoveRecoveryMethodResponse, aS as RemoveSignerParams, aT as RemoveSignerResponse, S as Scope, aY as SendParams, ay as SendResponse, a8 as Signer, N as TransferScope, Q as Transfers, ak as WalletLocator } from '../types-
|
|
3
|
+
export { aN as ApproveSignatureParams, al as ApproveSignatureResponse, aJ as ApproveTransactionParams, aK as ApproveTransactionResponse, aL as CreateSignatureParams, aM as CreateSignatureResponse, aH as CreateTransactionParams, aI as CreateTransactionResponse, aZ as CreateTransactionSuccessResponse, aA as CreateWalletParams, az as CreateWalletResponse, aR as FundWalletParams, ad as FundWalletResponse, aQ as GetBalanceResponse, aF as GetBalanceSuccessResponse, aO as GetSignatureResponse, aq as GetSignerResponse, a_ as GetSignersResponse, ax as GetTransactionResponse, af as GetTransactionSuccessResponse, ae as GetTransactionsResponse, aP as GetTransfersResponse, aG as GetWalletResponse, a$ as GetWalletSuccessResponse, b0 as RecoverySignerConfig, aU as RegisterRecoveryMethodParams, aV as RegisterRecoveryMethodResponse, au as RegisterSignerChain, as as RegisterSignerParams, t as RegisterSignerPasskeyParams, av as RegisterSignerResponse, aW as RemoveRecoveryMethodParams, aX as RemoveRecoveryMethodResponse, aS as RemoveSignerParams, aT as RemoveSignerResponse, S as Scope, aY as SendParams, ay as SendResponse, a8 as Signer, N as TransferScope, Q as Transfers, ak as WalletLocator } from '../types-D0tKSMr1.js';
|
|
4
4
|
import '../chains/chains.js';
|
|
5
5
|
import 'ox';
|
|
6
6
|
import '@crossmint/client-sdk-window';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMI3DBGDVcjs = require('../../chunk-MI3DBGDV.cjs');require('../../chunk-JNKTRQPS.cjs');require('../../chunk-D2S37DJ5.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-36GZTRZX.cjs');require('../../chunk-AEHDAUN4.cjs');require('../../chunk-DSIFRRBS.cjs');exports.evmChainAdapter = _chunkMI3DBGDVcjs.a;
|
|
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.cjs';
|
|
|
2
2
|
import '../chains.cjs';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-BrPpsHHA.cjs';
|
|
6
6
|
import '../../api/gen/types.gen.cjs';
|
|
7
7
|
import 'ox';
|
|
8
8
|
import '@crossmint/client-sdk-window';
|
|
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.js';
|
|
|
2
2
|
import '../chains.js';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-D0tKSMr1.js';
|
|
6
6
|
import '../../api/gen/types.gen.js';
|
|
7
7
|
import 'ox';
|
|
8
8
|
import '@crossmint/client-sdk-window';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-WRXF6ZSY.js";import"../../chunk-B4GYB3XY.js";import"../../chunk-4I3EXM4B.js";import"../../chunk-455NK5LB.js";import"../../chunk-2YLAHC7J.js";import"../../chunk-QYBC7GTA.js";import"../../chunk-NU7VF7MC.js";export{a as evmChainAdapter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSE5L5SQKcjs = require('../../chunk-SE5L5SQK.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-36GZTRZX.cjs');require('../../chunk-AEHDAUN4.cjs');require('../../chunk-DSIFRRBS.cjs');exports.solanaChainAdapter = _chunkSE5L5SQKcjs.a;
|
|
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.cjs';
|
|
|
2
2
|
import '../chains.cjs';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-BrPpsHHA.cjs';
|
|
6
6
|
import '../../api/gen/types.gen.cjs';
|
|
7
7
|
import 'ox';
|
|
8
8
|
import '@crossmint/client-sdk-window';
|
|
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.js';
|
|
|
2
2
|
import '../chains.js';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-D0tKSMr1.js';
|
|
6
6
|
import '../../api/gen/types.gen.js';
|
|
7
7
|
import 'ox';
|
|
8
8
|
import '@crossmint/client-sdk-window';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-3W22A7E7.js";import"../../chunk-455NK5LB.js";import"../../chunk-2YLAHC7J.js";import"../../chunk-QYBC7GTA.js";import"../../chunk-NU7VF7MC.js";export{a as solanaChainAdapter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3FUVUUXUcjs = require('../../chunk-3FUVUUXU.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-36GZTRZX.cjs');require('../../chunk-AEHDAUN4.cjs');require('../../chunk-DSIFRRBS.cjs');exports.stellarChainAdapter = _chunk3FUVUUXUcjs.a;
|
|
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.cjs';
|
|
|
2
2
|
import '../chains.cjs';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-BrPpsHHA.cjs';
|
|
6
6
|
import '../../api/gen/types.gen.cjs';
|
|
7
7
|
import 'ox';
|
|
8
8
|
import '@crossmint/client-sdk-window';
|
|
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.js';
|
|
|
2
2
|
import '../chains.js';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-D0tKSMr1.js';
|
|
6
6
|
import '../../api/gen/types.gen.js';
|
|
7
7
|
import 'ox';
|
|
8
8
|
import '@crossmint/client-sdk-window';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-67VE25UL.js";import"../../chunk-455NK5LB.js";import"../../chunk-2YLAHC7J.js";import"../../chunk-QYBC7GTA.js";import"../../chunk-NU7VF7MC.js";export{a as stellarChainAdapter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNM33FBA3cjs = require('../chunk-NM33FBA3.cjs');require('../chunk-MI3DBGDV.cjs');require('../chunk-SE5L5SQK.cjs');require('../chunk-3FUVUUXU.cjs');require('../chunk-JNKTRQPS.cjs');require('../chunk-ENU3EKBG.cjs');require('../chunk-D2S37DJ5.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-36GZTRZX.cjs');require('../chunk-AEHDAUN4.cjs');require('../chunk-DSIFRRBS.cjs');exports.getApprovalAdapter = _chunkNM33FBA3cjs.c; exports.getChainAdapter = _chunkNM33FBA3cjs.a; exports.isSupportedChainType = _chunkNM33FBA3cjs.b;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Chain } from './chains.cjs';
|
|
2
|
-
import { au as RegisterSignerChain, av as RegisterSignerResponse, a9 as PendingSignerOperation, aw as TokenBalance, F as SignerAdapter, af as GetTransactionSuccessResponse } from '../types-
|
|
2
|
+
import { au as RegisterSignerChain, av as RegisterSignerResponse, a9 as PendingSignerOperation, aw as TokenBalance, F as SignerAdapter, af as GetTransactionSuccessResponse } from '../types-BrPpsHHA.cjs';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '../api/gen/types.gen.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Chain } from './chains.js';
|
|
2
|
-
import { au as RegisterSignerChain, av as RegisterSignerResponse, a9 as PendingSignerOperation, aw as TokenBalance, F as SignerAdapter, af as GetTransactionSuccessResponse } from '../types-
|
|
2
|
+
import { au as RegisterSignerChain, av as RegisterSignerResponse, a9 as PendingSignerOperation, aw as TokenBalance, F as SignerAdapter, af as GetTransactionSuccessResponse } from '../types-D0tKSMr1.js';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '../api/gen/types.gen.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-PJ76KALO.js";import"../chunk-WRXF6ZSY.js";import"../chunk-3W22A7E7.js";import"../chunk-67VE25UL.js";import"../chunk-B4GYB3XY.js";import"../chunk-OQZTL6ZG.js";import"../chunk-4I3EXM4B.js";import"../chunk-455NK5LB.js";import"../chunk-2YLAHC7J.js";import"../chunk-QYBC7GTA.js";import"../chunk-NU7VF7MC.js";export{c as getApprovalAdapter,a as getChainAdapter,b as isSupportedChainType};
|
package/dist/chains/chains.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKQDPQXLLcjs = require('../chunk-KQDPQXLL.cjs');require('../chunk-OQFZL5LI.cjs');require('../chunk-AUO6R32H.cjs');require('../chunk-ZPO3XSWU.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-UE3WVHTM.cjs');require('../chunk-5X4EOJFG.cjs');require('../chunk-TCDH5Q6Q.cjs');require('../chunk-HRUMWG2F.cjs');require('../chunk-D2S37DJ5.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-36GZTRZX.cjs');require('../chunk-AEHDAUN4.cjs');require('../chunk-DSIFRRBS.cjs');exports.isMainnetChain = _chunkKQDPQXLLcjs.c; exports.isTestnetChain = _chunkKQDPQXLLcjs.b; exports.isValidChain = _chunkKQDPQXLLcjs.e; exports.mainnetToTestnet = _chunkKQDPQXLLcjs.d; exports.toViemChain = _chunkKQDPQXLLcjs.a; exports.validateChainForEnvironment = _chunkKQDPQXLLcjs.f;
|
package/dist/chains/chains.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f}from"../chunk-PSIZCLMC.js";import"../chunk-C6E6WC4P.js";import"../chunk-V5NY4W5H.js";import"../chunk-CGQCRDG7.js";import"../chunk-KKQBZXFE.js";import"../chunk-S3DYQVRD.js";import"../chunk-KUP7H7X2.js";import"../chunk-FT5EVMLB.js";import"../chunk-QLOW4D2N.js";import"../chunk-SVIKBM3S.js";import"../chunk-4I3EXM4B.js";import"../chunk-455NK5LB.js";import"../chunk-2YLAHC7J.js";import"../chunk-QYBC7GTA.js";import"../chunk-NU7VF7MC.js";export{c as isMainnetChain,b as isTestnetChain,e as isValidChain,d as mainnetToTestnet,a as toViemChain,f as validateChainForEnvironment};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as i}from"./chunk-
|
|
1
|
+
import{b as i}from"./chunk-RV3Q5EIA.js";var g={type:"device",validateConfig(e){},buildInternalConfig(e,r){return{type:"device",locator:"locator"in e&&e.locator?e.locator:void 0,address:r.walletAddress}},canAutoAssemble(e,r){return r.deviceSignerKeyStorage!=null},addSignerPayload(e){return"publicKey"in e&&e.publicKey!=null?{type:"device",publicKey:e.publicKey,name:e.name}:i(e)},matchesRecovery(){return!1},adoptsRecoveryConfigOnMatch:!0,signerUnavailableReason:()=>null};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as O}from"./chunk-
|
|
1
|
+
import{a as O}from"./chunk-LEPWAFFZ.js";import{b as D}from"./chunk-RV3Q5EIA.js";import{a as W}from"./chunk-UFYLMDRQ.js";import{g as x}from"./chunk-P3P5Q5XX.js";import{b as P,c as K}from"./chunk-B4GYB3XY.js";import{o as q,t as $}from"./chunk-4I3EXM4B.js";import{a as L}from"./chunk-2YLAHC7J.js";import{a as T,b as I,d as i,e as l,f as a,g as w,h as d}from"./chunk-NU7VF7MC.js";import{ApiClientError as z}from"@crossmint/common-sdk-base";var g,o,p,u,c,h,m,y,C,R,A,S,E,k,M=class{constructor(e){l(this,S);l(this,g);l(this,o);l(this,p,null);l(this,u);l(this,c);l(this,h);l(this,m);l(this,y);l(this,C);l(this,R);l(this,A);if(a(this,u,e.apiClient),a(this,c,e.options),a(this,h,e.chain),a(this,m,e.walletAddress),a(this,y,e.walletLocator),a(this,C,e.serverSignerResolver),e.recoverySigners.length===0)throw new q("At least one recovery signer is required");a(this,o,[...e.recoverySigners]),a(this,R,e.initialSigners),a(this,A,e.signers),a(this,g,e.signer)}get activeSigner(){return i(this,g)}setActiveSigner(e){a(this,g,e)}get recovery(){return i(this,o)[0]}get recoverySigners(){return[...i(this,o)]}get selectedRecovery(){var e,r;return(r=(e=i(this,p))==null?void 0:e.config)!=null?r:null}selectRecovery(e,r=i(this,o)[e]){w(this,S,E).call(this,e),a(this,p,{index:e,config:r})}descriptorContext(){var e,r,n,s,t;return{chain:i(this,h),walletAddress:i(this,m),crossmint:i(this,u).crossmint,clientTEEConnection:(e=i(this,c))==null?void 0:e.clientTEEConnection,resetSignerFrame:(r=i(this,c))==null?void 0:r.resetSignerFrame,onAuthRequired:(s=(n=i(this,c))==null?void 0:n.callbacks)==null?void 0:s.onAuthRequired,deviceSignerKeyStorage:(t=i(this,c))==null?void 0:t.deviceSignerKeyStorage,serverSigners:i(this,C)}}adoptRecoveryConfig(e,r){w(this,S,E).call(this,e),i(this,o)[e]=r}stripSecretFromRecovery(e,r){w(this,S,E).call(this,e);let n=i(this,o)[e];n.type==="server"&&!x(n)&&(i(this,o)[e]={type:"server",address:r})}addRecoverySigner(e){let r=this.recoveryLocator(e);r!=null&&i(this,o).some(s=>this.recoveryLocator(s)===r)||i(this,o).push(e)}removeRecoverySigner(e){let r=i(this,p),n=r==null?null:i(this,o)[r.index],s=r!=null&&this.recoveryLocator(r.config)===e;if(a(this,o,i(this,o).filter(t=>this.recoveryLocator(t)!==e&&!(s&&t===n))),r!=null){let t=s||n==null?-1:i(this,o).indexOf(n);a(this,p,t===-1?null:I(T({},r),{index:t}))}}assemble(e,r){return d(this,null,function*(){var s,t;let n=W(i(this,h),e,(s=i(this,c))==null?void 0:s.deviceSignerKeyStorage);if(r!=null&&r.isAdminSigner)n.status="active";else{let v=yield this.getSignerState(n.locator());n.status=(t=v.signer)==null?void 0:t.status}return n})}require(){if(i(this,g)==null){if(i(this,R).length>1)throw new Error("No signer is set. This wallet has multiple signers configured. Call wallet.useSigner() to select which signer to use before signing operations.");let e=this.recovery,r=O(e.type),n=r.signerUnavailableReason();throw n!=null?new Error(n):r.canAutoAssemble(e,this.descriptorContext())?new Error("This wallet is read-only because no signer was provided. Operations that require signing (send, approve, addSigner, etc.) are not available."):new Error("No signer is set. This wallet requires calling wallet.useSigner() before signing operations.")}return i(this,g)}resolveAuthorizingRecovery(){var t,v;let e=this.selectedRecovery;if(e!=null)return{recovery:e,approver:(t=this.recoveryLocator(e))!=null?t:void 0};if(i(this,o).length===1)return{recovery:i(this,o)[0],approver:void 0};let r=i(this,o).map(f=>this.recoveryLocator(f)),n=(v=i(this,g))==null?void 0:v.locator(),s=n==null?-1:r.indexOf(n);if(s===-1){let b=`Call wallet.useRecoveryMethod() with one of them (${r.filter(F=>F!=null).join(", ")}) first.`;throw new $(n==null?`This wallet has multiple recovery methods, so the one authorizing this operation must be selected. ${b}`:`Signer "${n}" is not one of this wallet's recovery methods, and only a recovery method can add or remove signers. ${b}`)}return{recovery:i(this,o)[s],approver:n}}recoveryLocator(e){return e.type==="server"?x(e)?`server:${e.address}`:null:D(e)}withRecoverySigner(e){return d(this,null,function*(){var F;let r=i(this,g),{recovery:n,approver:s}=this.resolveAuthorizingRecovery(),t=n;if(x(t)&&!i(this,C).hasRecoveryResolutionFor(t.address))throw new Error('Cannot assemble server signer: no secret available. Call wallet.useRecoveryMethod({ type: "server", secret: ... }) first with the recovery server secret.');let v=O(t.type),f=this.descriptorContext();if(t.type==="external-wallet"&&!v.canAutoAssemble(t,f))throw new Error('Cannot assemble external wallet signer: no onSign callback available. Call wallet.useRecoveryMethod({ type: "external-wallet", address: "0x...", onSign: async (tx) => ... }) first.');let b=v.buildInternalConfig(t,f);a(this,g,W(i(this,h),b,(F=i(this,c))==null?void 0:F.deviceSignerKeyStorage));try{return yield e(s)}finally{a(this,g,r)}})}getSignerState(e){return d(this,null,function*(){let r=null;try{r=yield i(this,u).getSigner(i(this,y).call(this),e)}catch(s){return L.warn("wallet.signers.getSignerState.fetchFailed",{signerLocator:e,error:s}),{response:null,signer:null,pendingOperation:null}}if(r==null||typeof r!="object"||"error"in r)return L.warn("wallet.signers.getSignerState.errorResponse",{signerLocator:e,response:r}),{response:null,signer:null,pendingOperation:null};let n=P(r,i(this,h));return{response:r,signer:n,pendingOperation:K(r,i(this,h))}})}signerIsRegistered(e){return d(this,null,function*(){return(yield i(this,A).call(this)).some(n=>n.locator===e)})}isSignerApproved(e){return d(this,null,function*(){try{let r=yield w(this,S,k).call(this,e);return this.isApprovedSignerStatus(r==null?void 0:r.status)}catch(r){if(r instanceof z&&r.status===404)return!1;throw L.error("wallet.signers.isSignerApproved.failed",{signerLocator:e,error:r}),r}})}isApprovedSignerStatus(e){return e==="success"||e==="active"}};g=new WeakMap,o=new WeakMap,p=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,m=new WeakMap,y=new WeakMap,C=new WeakMap,R=new WeakMap,A=new WeakMap,S=new WeakSet,E=function(e){if(e<0||e>=i(this,o).length)throw new Error(`Recovery signer index ${e} is out of range`)},k=function(e){return d(this,null,function*(){let r=yield i(this,u).getSigner(i(this,y).call(this),e);if(r==null||typeof r!="object"||"error"in r)throw new Error(`Failed to fetch the approval state of signer ${e}`);return P(r,i(this,h))})};export{M as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-C5LIXILN.js";import{a as W}from"./chunk-PSIZCLMC.js";import{D as f,I as w,z as l}from"./chunk-4I3EXM4B.js";import{a as n}from"./chunk-2YLAHC7J.js";import{c as u,h as p}from"./chunk-NU7VF7MC.js";import{createPublicClient as O,encodeFunctionData as x,http as E}from"viem";import{isValidEvmAddress as A,WithLoggerContext as h}from"@crossmint/common-sdk-base";var c=class c extends o{constructor(e){super({chain:e.chain,address:e.address,owner:e.owner,options:o.getOptions(e),alias:e.alias,recovery:o.getRecoverySigners(e),apiRecoveryServerSignerAddresses:o.getApiRecoveryServerSignerAddresses(e),apiDelegatedServerSignerAddresses:o.getApiDelegatedServerSignerAddresses(e),signer:e.signer,signers:o.getInitialSigners(e)},o.getApiClient(e))}static from(e){if(!A(e.address))throw new Error("Wallet is not an EVM wallet");return new c(e)}sendTransaction(e){return p(this,null,function*(){var i;n.info("evmWallet.sendTransaction.start"),yield this.preAuthIfNeeded();let t=this.buildTransaction(e),r=yield this.createTransaction(t,e.options);if((i=e.options)!=null&&i.prepareOnly)return n.info("evmWallet.sendTransaction.prepared",{transactionId:r.id}),{hash:void 0,explorerLink:void 0,transactionId:r.id};let a=yield this.approveTransactionAndWait(r.id);return n.info("evmWallet.sendTransaction.success",{transactionId:r.id,hash:a.hash}),a})}signMessage(e){return p(this,null,function*(){var i;n.info("evmWallet.signMessage.start"),yield this.preAuthIfNeeded();let t=this.signerManager.require(),r=yield this.apiClient.createSignature(this.walletLocator,{type:"message",params:{message:e.message,signer:t.locator(),chain:this.chain}});if("error"in r)throw n.error("evmWallet.signMessage.error",{error:r}),new f(JSON.stringify(r));if((i=e.options)!=null&&i.prepareOnly)return n.info("evmWallet.signMessage.prepared",{signatureId:r.id}),{signature:void 0,signatureId:r.id};let a=yield this.approveSignatureAndWait(r.id);return n.info("evmWallet.signMessage.success",{signatureId:r.id}),a})}signTypedData(e){return p(this,null,function*(){var C;n.info("evmWallet.signTypedData.start"),yield this.preAuthIfNeeded();let t=this.signerManager.require(),{domain:r,message:a,primaryType:i,types:g,chain:T}=e;if(!r||!a||!g||!T)throw n.error("evmWallet.signTypedData.error",{error:"Invalid typed data"}),new l("Invalid typed data");let{name:m,version:v,chainId:S,verifyingContract:I,salt:b}=r;if(!m||!v||!S||!I)throw n.error("evmWallet.signTypedData.error",{error:"Invalid typed data domain"}),new l("Invalid typed data domain");let d=yield this.apiClient.createSignature(this.walletLocator,{type:"typed-data",params:{typedData:{domain:{name:m,version:v,chainId:Number(S),verifyingContract:I,salt:b},message:y(a),primaryType:i,types:g},signer:t.locator(),chain:T}});if("error"in d)throw n.error("evmWallet.signTypedData.error",{error:d}),new f(JSON.stringify(d));if((C=e.options)!=null&&C.prepareOnly)return n.info("evmWallet.signTypedData.prepared",{signatureId:d.id}),{signature:void 0,signatureId:d.id};let D=yield this.approveSignatureAndWait(d.id);return n.info("evmWallet.signTypedData.success",{signatureId:d.id}),D})}getViemClient(e){var t;return O({transport:(t=e==null?void 0:e.transport)!=null?t:E(),chain:W(this.chain)})}createTransaction(e,t){return p(this,null,function*(){let r;(t==null?void 0:t.signer)==null?r=this.signerManager.require().locator():typeof t.signer=="string"?r=t.signer:r=this.resolveServerSignerApiLocator(t.signer);let a=yield this.apiClient.createTransaction(this.walletLocator,{params:{signer:r,chain:this.chain,calls:[e]}});if("error"in a)throw new w(JSON.stringify(a));return a})}buildTransaction(e){var t,r,a,i,g;if("transaction"in e)return{transaction:e.transaction};if(e.abi==null)return{to:e.to,value:(r=(t=e.value)==null?void 0:t.toString())!=null?r:"0",data:(a=e.data)!=null?a:"0x"};if(!e.functionName)throw new Error("Function name is required");return{to:e.to,value:(g=(i=e.value)==null?void 0:i.toString())!=null?g:"0",data:x({abi:e.abi,functionName:e.functionName,args:e.args})}}};u([h({logger:n,methodName:"evmWallet.sendTransaction",buildContext(e){return{chain:e.chain,address:e.address}}})],c.prototype,"sendTransaction",1),u([h({logger:n,methodName:"evmWallet.signMessage",buildContext(e){return{chain:e.chain,address:e.address}}})],c.prototype,"signMessage",1),u([h({logger:n,methodName:"evmWallet.signTypedData",buildContext(e){return{chain:e.chain,address:e.address}}})],c.prototype,"signTypedData",1);var M=c;function y(s){return typeof s=="bigint"?s.toString():Array.isArray(s)?s.map(y):s!==null&&typeof s=="object"?Object.fromEntries(Object.entries(s).map(([e,t])=>[e,y(t)])):s}export{M as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as r}from"./chunk-
|
|
1
|
+
import{b as r}from"./chunk-RV3Q5EIA.js";import{a as i,b as a}from"./chunk-NU7VF7MC.js";var o=`No signer is set. External wallet signers require calling wallet.useSigner() with the onSign callback before signing operations.
|
|
2
2
|
Example: wallet.useSigner({ type: "external-wallet", address: "0x...", onSign: async (tx) => ... })`,s={type:"external-wallet",validateConfig(e){if(!("address"in e)||e.address==null)throw new Error("External wallet signer requires a wallet address");if(!("onSign"in e)||typeof e.onSign!="function")throw new Error("External wallet signer requires an onSign callback")},buildInternalConfig(e){let n=e;return a(i({},n),{locator:`external-wallet:${n.address}`})},canAutoAssemble(e){return"onSign"in e&&typeof e.onSign=="function"},addSignerPayload(e){return r(e)},matchesRecovery(e,n){return r(e)===r(n)},adoptsRecoveryConfigOnMatch:!0,signerUnavailableReason:()=>o};export{o as a,s as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n,c as i}from"./chunk-
|
|
1
|
+
import{b as n,c as i}from"./chunk-QYBC7GTA.js";import{SdkLogger as d,BrowserDatadogSink as k,detectPlatform as g,validateAPIKey as l,ServerDatadogSink as m}from"@crossmint/common-sdk-base";var t=new d;function f(s){let o=g(),e=l(s);if(!e.isValid)throw new Error(`Invalid API key: ${e.message}`);let{environment:a,projectId:c}=e;switch(t.init({packageName:i,packageVersion:n,environment:a,projectId:c,platform:o}),o){case"browser":{let r=new k(a);t.addSink(r);break}case"react-native":break;case"server":{let r=new m(a);t.addSink(r);break}default:break}}export{t as a,f as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkAEHDAUN4cjs = require('./chunk-AEHDAUN4.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var t=new _commonsdkbase.SdkLogger;function v(s){let o=_commonsdkbase.detectPlatform.call(void 0, ),e=_commonsdkbase.validateAPIKey.call(void 0, s);if(!e.isValid)throw new Error(`Invalid API key: ${e.message}`);let{environment:a,projectId:c}=e;switch(t.init({packageName:_chunkAEHDAUN4cjs.c,packageVersion:_chunkAEHDAUN4cjs.b,environment:a,projectId:c,platform:o}),o){case"browser":{let r=new (0, _commonsdkbase.BrowserDatadogSink)(a);t.addSink(r);break}case"react-native":break;case"server":{let r=new (0, _commonsdkbase.ServerDatadogSink)(a);t.addSink(r);break}default:break}}exports.a = t; exports.b = v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p}from"./chunk-IHMMTMFG.js";import{a as b}from"./chunk-
|
|
1
|
+
import{a as p}from"./chunk-IHMMTMFG.js";import{a as b}from"./chunk-PWYCEHYZ.js";import{a as g,b as m,c as u,d as A,e as P,f as T}from"./chunk-P3P5Q5XX.js";import{a as n}from"./chunk-2YLAHC7J.js";import{a as v,c as y,h as s}from"./chunk-NU7VF7MC.js";import{validateAPIKey as O,WithLoggerContext as C}from"@crossmint/common-sdk-base";var w=class{constructor(i){this.config=i;this._needsAuth=!0;this._authPromise=null;this._initializationPromise=null;this._onboardingConnectionGeneration=null;typeof window!="undefined"&&(this._initializationPromise=this.initialize()),this.type=this.config.type}locator(){return this.config.locator}address(){return this.config.address}initialize(){return s(this,null,function*(){try{if(this.config.clientTEEConnection==null){let i=O(this.config.crossmint.apiKey);if(!i.isValid)throw new Error("Invalid API key");let t=new p({environment:i.environment});this.config.clientTEEConnection=yield t.initialize()}}finally{this._initializationPromise=null}})}getTEEConnection(){return s(this,null,function*(){if(this.config.clientTEEConnection==null){if(this._initializationPromise){if(yield this._initializationPromise,this.config.clientTEEConnection==null)throw new Error("Failed to initialize TEE connection");return this.config.clientTEEConnection}this._initializationPromise=this.initializeTEEConnection();try{yield this._initializationPromise}finally{this._initializationPromise=null}}if(this.config.clientTEEConnection==null)throw new Error("TEE connection is not initialized");return this.config.clientTEEConnection})}initializeTEEConnection(){return s(this,null,function*(){n.info("TEE connection not initialized, initializing now");let i=O(this.config.crossmint.apiKey);if(!i.isValid)throw new Error("Invalid API key");let t=new p({environment:i.environment});if(this.config.clientTEEConnection=yield t.initialize(),this.config.clientTEEConnection==null)throw new Error("Failed to initialize TEE connection");n.info("TEE connection initialized successfully")})}handleAuthRequired(){return s(this,null,function*(){let i=this.getAuthDataOrThrow(),t=yield this.getTEEConnection();if(this.config.onAuthRequired==null)throw new Error(`${this.type} signer requires the onAuthRequired callback to handle OTP verification. This callback manages the authentication flow (sending OTP and verifying user input). If using our React/React Native SDK, this is handled automatically by the provider. For other environments, implement: onAuthRequired: (needsAuth, sendOtp, verifyOtp, reject) => { /* your UI logic */ }`);n.info("get-status: sending request");let h=Date.now(),r=yield t.sendAction({event:"request:get-status",responseEvent:"response:get-status",data:{authData:i,data:{authId:this.getAuthId()}},options:f}),a=Date.now()-h;if((r==null?void 0:r.status)!=="success"){let o=(r==null?void 0:r.status)==="error"&&r.error||"Failed to retrieve signer status",l=(r==null?void 0:r.status)==="error"?r.code:void 0;throw n.error("get-status: failed",{status:r==null?void 0:r.status,error:(r==null?void 0:r.status)==="error"?r.error:void 0,code:l,durationMs:a}),_(o,l)?new u(o,l):new A(o,l)}if(n.info("get-status: response received",{signerStatus:r.signerStatus,durationMs:a}),r.signerStatus==="ready"){this._needsAuth=!1;return}else this._needsAuth=!0;n.info("Auth required, initiating OTP flow",{needsAuth:this._needsAuth});let{promise:e,resolve:c,reject:d}=this.createAuthPromise();if(this._authPromise={promise:e,resolve:c,reject:d},this.config.onAuthRequired)try{yield this.config.onAuthRequired(this.config.type,this.locator(),this._needsAuth,()=>this.sendMessageWithOtp(),o=>this.verifyOtp(o),()=>s(this,null,function*(){n.info("Auth rejected",{authRejected:!0}),this._needsAuth=!1,this.config.onAuthRequired!=null&&(yield this.config.onAuthRequired(this.config.type,this.locator(),this._needsAuth,()=>this.sendMessageWithOtp(),o=>this.verifyOtp(o),()=>{var o;return(o=this._authPromise)==null?void 0:o.reject(new g)})),d(new g)}))}catch(o){n.error("handleAuthRequired error",{error:o}),d(o)}try{yield e}catch(o){throw n.error("handleAuthRequired promise error",{error:o}),o}})}ensureAuthenticated(){return s(this,null,function*(){this.getJwtOrThrow(),this.config.resetSignerFrame!=null&&(yield this.config.resetSignerFrame()),yield this.handleAuthRequired()})}getJwtOrThrow(){let i=this.config.crossmint.jwt;if(i==null||i.trim()==="")throw new u(`${this.type} signer requires a valid Crossmint JWT. The user's session is missing or has expired: re-authenticate the user and refresh the JWT before retrying.`,S);return i}getAuthDataOrThrow(){return{jwt:this.getJwtOrThrow(),apiKey:this.config.crossmint.apiKey}}createAuthPromise(){let i,t;return{promise:new Promise((r,a)=>{i=r,t=a}),resolve:i,reject:t}}sendMessageWithOtp(){return s(this,null,function*(){var i;try{yield this.startOnboarding()}catch(t){throw t instanceof u&&((i=this._authPromise)==null||i.reject(t)),t}})}startOnboarding(){return s(this,null,function*(){let i=this.getAuthDataOrThrow(),t=yield this.getTEEConnection(),h=this.getAuthId();n.info("start-onboarding: sending request");let r=Date.now(),a=this.config.type==="phone"?this.config.channel:void 0,e=yield t.sendAction({event:"request:start-onboarding",responseEvent:"response:start-onboarding",data:{authData:i,data:v({authId:h},a!=null?{channel:a}:{})},options:f}),c=Date.now()-r;if(this._onboardingConnectionGeneration=t.connectionGeneration,n.info("start-onboarding: response received",{status:e==null?void 0:e.status,durationMs:c}),(e==null?void 0:e.status)==="success"&&e.signerStatus==="ready"){this._needsAuth=!1;return}if((e==null?void 0:e.status)==="error"){n.error("start-onboarding: failed",{error:e.error,code:e.code});let d=e.error||"Failed to initiate OTP process.";throw _(d,e.code)?new u(d,e.code):new m(d,e.code)}})}getAuthId(){return this.config.type==="email"?this.config.email!=null?`email:${b(this.config.email)}`:this.config.locator:this.config.phone!=null?`phone:${this.config.phone}`:this.config.locator}verifyOtp(i){return s(this,null,function*(){var a;let t;try{let e=yield this.getTEEConnection();n.info("complete-onboarding: sending request");let c=Date.now();t=yield e.sendAction({event:"request:complete-onboarding",responseEvent:"response:complete-onboarding",data:{authData:this.getAuthDataOrThrow(),data:{onboardingAuthentication:{encryptedOtp:i}}},options:f}),n.info("complete-onboarding: response received",{status:t==null?void 0:t.status,durationMs:Date.now()-c})}catch(e){return n.error("complete-onboarding: error",{error:e}),yield this.handleOnboardingVerificationFailure(e)}if((t==null?void 0:t.status)==="success"){this._needsAuth=!1,this.config.onAuthRequired!=null&&(yield this.config.onAuthRequired(this.config.type,this.locator(),this._needsAuth,()=>this.sendMessageWithOtp(),e=>this.verifyOtp(e),()=>{var e;return(e=this._authPromise)==null?void 0:e.reject(new g)})),(a=this._authPromise)==null||a.resolve();return}n.error("complete-onboarding: OTP validation failed",{status:t==null?void 0:t.status,error:(t==null?void 0:t.status)==="error"?t.error:void 0,code:(t==null?void 0:t.status)==="error"?t.code:void 0});let h=(t==null?void 0:t.status)==="error"&&t.error||"Failed to validate encrypted OTP",r=(t==null?void 0:t.status)==="error"?t.code:void 0;return yield this.handleOnboardingVerificationFailure(new m(h,r))})}handleOnboardingVerificationFailure(i){return s(this,null,function*(){var r,a,e;this._needsAuth=!0;let t=this.config.clientTEEConnection;if(this._onboardingConnectionGeneration!=null&&t!=null&&t.connectionGeneration!==this._onboardingConnectionGeneration){n.warn("tee.signer.onboarding.reissued",{reason:"signer frame reloaded mid-onboarding, re-issuing OTP",onboardingGeneration:this._onboardingConnectionGeneration,currentGeneration:t==null?void 0:t.connectionGeneration});try{yield this.sendMessageWithOtp()}catch(c){throw(r=this._authPromise)==null||r.reject(c),c}if(!this._needsAuth){(a=this._authPromise)==null||a.resolve();return}throw new T}throw(e=this._authPromise)==null||e.reject(i),i})}_exportPrivateKey(i,t){return s(this,null,function*(){yield this.ensureAuthenticated();let h=this.getJwtOrThrow(),{scheme:r,encoding:a}=this.getChainKeyParams();if(t!=null){let c=i.on("event:key-exported",d=>{i.off(c),d.status==="success"&&Promise.resolve().then(()=>t()).catch(()=>{console.error("[NCS Signer] onExport callback error")})})}let e=yield i.sendAction({event:"request:export-signer",responseEvent:"response:export-signer",data:{authData:{jwt:h,apiKey:this.config.crossmint.apiKey},data:{scheme:r,encoding:a,walletAddress:this.config.address,authId:this.getAuthId()}},options:f});if((e==null?void 0:e.status)==="error")throw n.error("export-signer: failed",{error:e.error,code:e.code}),new P(e.error||"Failed to export private key",e.code)})}};y([C({logger:n,methodName:"handleAuthRequired"})],w.prototype,"handleAuthRequired",1);var f={timeoutMs:3e4},S="jwt-required",q=new Set(["unauthorized","unauthenticated"]);function _(E,i){return i!=null&&q.has(i.toLowerCase())?!0:/\bHTTP 401\b/.test(E)}export{w as a,f as b,S as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkD2S37DJ5cjs = require('./chunk-D2S37DJ5.cjs');var _chunk36GZTRZXcjs = require('./chunk-36GZTRZX.cjs');function n(e){if(e.recoveryMethods!=null&&e.recovery!=null)throw new (0, _chunkD2S37DJ5cjs.o)("Pass either `recovery` or `recoveryMethods`, not both");if(e.recoveryMethods!=null){if(!Array.isArray(e.recoveryMethods))throw new (0, _chunkD2S37DJ5cjs.o)("`recoveryMethods` must be an array of recovery methods. To pass a single recovery method, use `recovery`");return e.recoveryMethods}return e.recovery==null?[]:Array.isArray(e.recovery)?(_chunk36GZTRZXcjs.a.warn("wallet.create.recovery.deprecatedListForm",{message:"Passing a list to `recovery` is deprecated. Use `recoveryMethods` instead.",count:e.recovery.length}),e.recovery):[e.recovery]}function i(e){return e.recoveryMethods!=null||Array.isArray(e.recovery)}exports.a = n; exports.b = i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk36GZTRZXcjs = require('./chunk-36GZTRZX.cjs');var _ox = require('ox');var c={nativeToken:"xlm",walletLocatorPrefix:"me:stellar:smart",supportsSignatures:!1,addSignerChain(n){},extractAddSignerOperation(n,t,r){if(!("transaction"in n)||n.transaction==null)throw _chunk36GZTRZXcjs.a.error("wallet.addSigner.error",{error:"Expected transaction in response for Solana/Stellar chain"}),new Error("Expected transaction in response for Solana/Stellar chain");return{type:"transaction",id:n.transaction.id}},balanceTokenFields(n){return n!=null&&"contractId"in n?{contractId:n.contractId}:n!=null&&"contractAddress"in n?{contractAddress:n.contractAddress}:{}},emptyBalanceTokenFields(){return{contractId:void 0}},signApproval(n,t,r){return n.type==="passkey"?n.signTransaction(_ox.Hex.fromBytes(_ox.Base64.toBytes(r))):n.signTransaction(r)}};exports.a = c;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
2
|
-
Example: wallet.useSigner({ type: "external-wallet", address: "0x...", onSign: async (tx) => ... })`,l= exports.b ={type:"external-wallet",validateConfig(e){if(!("address"in e)||e.address==null)throw new Error("External wallet signer requires a wallet address");if(!("onSign"in e)||typeof e.onSign!="function")throw new Error("External wallet signer requires an onSign callback")},buildInternalConfig(e){let n=e;return _chunkDSIFRRBScjs.b.call(void 0, _chunkDSIFRRBScjs.a.call(void 0, {},n),{locator:`external-wallet:${n.address}`})},canAutoAssemble(e){return"onSign"in e&&typeof e.onSign=="function"},addSignerPayload(e){return
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWSDMIQNGcjs = require('./chunk-WSDMIQNG.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');var o=`No signer is set. External wallet signers require calling wallet.useSigner() with the onSign callback before signing operations.
|
|
2
|
+
Example: wallet.useSigner({ type: "external-wallet", address: "0x...", onSign: async (tx) => ... })`,l= exports.b ={type:"external-wallet",validateConfig(e){if(!("address"in e)||e.address==null)throw new Error("External wallet signer requires a wallet address");if(!("onSign"in e)||typeof e.onSign!="function")throw new Error("External wallet signer requires an onSign callback")},buildInternalConfig(e){let n=e;return _chunkDSIFRRBScjs.b.call(void 0, _chunkDSIFRRBScjs.a.call(void 0, {},n),{locator:`external-wallet:${n.address}`})},canAutoAssemble(e){return"onSign"in e&&typeof e.onSign=="function"},addSignerPayload(e){return _chunkWSDMIQNGcjs.b.call(void 0, e)},matchesRecovery(e,n){return _chunkWSDMIQNGcjs.b.call(void 0, e)===_chunkWSDMIQNGcjs.b.call(void 0, n)},adoptsRecoveryConfigOnMatch:!0,signerUnavailableReason:()=>o};exports.a = o; exports.b = l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i}from"./chunk-2YLAHC7J.js";import a from"bs58";import{Base64 as o,Hex as s}from"ox";function d(n){let e=a.decode(n)[0];return e!=null&&(e&128)!==0&&(e&127)===1}function c(n){return"transaction"in n.onChain&&typeof n.onChain.transaction=="string"?n.onChain.transaction:void 0}var m={nativeToken:"sol",walletLocatorPrefix:"me:solana:smart",supportsSignatures:!1,addSignerChain(n){},extractAddSignerOperation(n,e,r){if(!("transaction"in n)||n.transaction==null)throw i.error("wallet.addSigner.error",{error:"Expected transaction in response for Solana/Stellar chain"}),new Error("Expected transaction in response for Solana/Stellar chain");return{type:"transaction",id:n.transaction.id}},balanceTokenFields(n){return n!=null&&"mintHash"in n?{mintHash:n.mintHash}:n!=null&&"contractAddress"in n?{contractAddress:n.contractAddress}:{}},emptyBalanceTokenFields(){return{mintHash:void 0}},signApproval(n,e,r){var t;return n.type==="passkey"?n.signTransaction(s.fromBytes(o.toBytes(r))):n.type!=="external-wallet"?n.signTransaction(r):d(r)?n.signMessage(r):n.signTransaction((t=c(e))!=null?t:r)}};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CrossmintSDKError as e,JWTDecryptionError as X,JWTExpiredError as j,JWTIdentifierError as q,JWTInvalidError as Q,NotAuthorizedError as Z,WalletErrorCode as n}from"@crossmint/common-sdk-base";import{NotAuthorizedError as Ir,JWTExpiredError as Er,JWTInvalidError as Nr,JWTDecryptionError as pr,JWTIdentifierError as ur}from"@crossmint/common-sdk-base";var u=class extends e{constructor(t,r){super(t,n.API_KEY_INVALID,r)}},x=class extends e{constructor(t,r){super(t,n.ENVIRONMENT_INVALID,r)}},A=class extends e{constructor(t,r){super(t,n.WALLET_CREATION_FAILED,r)}},g=class extends e{constructor(t,r){super(t,n.WALLET_TYPE_INVALID,r)}},_=class extends e{constructor(t,r){super(t,n.WALLET_NOT_AVAILABLE,r)}},d=class extends e{constructor(t,r){super(t,n.WALLET_NOT_AVAILABLE,r)}},R=class extends e{constructor(t,r){super(t,n.WALLET_CREATION_FAILED,r)}},l=class extends e{constructor(t,r){super(t,n.WALLET_TYPE_INVALID,r)}},a=class extends e{constructor(t,r){super(t,n.SIGNER_INVALID,r)}},T=class extends e{constructor(t,r){super(t,n.SIGNER_INVALID,r)}},D=class extends e{constructor(t,r){super(t,n.SIGNER_INVALID,r)}},sr="DEVICE_SIGNER_NOT_SUPPORTED",L=class extends e{constructor(t,r){super(t,n.SIGNER_INVALID,r)}},S=class extends e{constructor(t,r){super(t,n.SIGNER_INVALID,r)}},O=class extends e{constructor(t,r){super(t,n.SIGNER_INVALID,r)}},c=class extends e{constructor(t,r){super(t,n.SIGNER_INVALID,r)}},i=class extends e{constructor(t,r){super(t,n.SIGNER_INVALID,r)}},I=class extends e{constructor(t,r){super(t,n.SIGNER_INVALID,r)}},o=class extends e{constructor(t,r){super(t,n.SIGNER_INVALID,r)}},h=class extends o{},E=class extends e{constructor(t,r){super(t,n.SIGNER_INVALID,r)}},N=class extends e{constructor(t,r){super(t,n.SIGNER_INVALID,r)}},p=class extends e{constructor(t,r){super(t,n.SIGNER_INVALID,r)}},w=class extends e{constructor(t,r){super(t,n.ENVIRONMENT_INVALID,r)}},C=class extends e{constructor(t,r){super(t,n.MESSAGE_INVALID,r)}},G=class extends e{constructor(t,r){super(t,n.MESSAGE_INVALID,r)}},V=class extends e{constructor(t,r){super(t,n.SIGNING_FAILED,r)}},W=class extends e{constructor(t,r){super(t,n.SIGNING_FAILED,r)}},y=class extends e{constructor(t,r){super(t,n.SIGNING_FAILED,r)}},J=class extends e{constructor(t,r){super(t,n.NO_SIGNATURE,r)}},f=class extends e{constructor(t,r){super(t,n.NO_SIGNATURE,r)}},P=class extends e{constructor(t,r){super(t,n.SIGNING_FAILED,r)}},F=class extends e{constructor(t,r){super(t,n.SIGNING_FAILED,r)}},v=class extends e{constructor(t,r){super(t,n.NO_TRANSACTION,r)}},M=class extends e{constructor(t,r){super(t,n.NO_TRANSACTION,r)}},U=class extends e{constructor(t,r){super(t,n.NO_TRANSACTION,r)}},Y=class extends e{constructor(t,r){super(t,n.TRANSACTION_FAILED,r)}},b=class extends e{constructor(t,r){super(t,n.TRANSACTION_FAILED,r)}},m=class extends e{constructor(t,r){super(t,n.TRANSACTION_FAILED,r)}},B=class extends e{constructor(t,r){super(t,n.TRANSACTION_FAILED,r)}},z=class extends e{constructor(t,r){super(t,n.TRANSACTION_FAILED,r)}},K=class extends e{constructor(t,r){super(t,n.TRANSACTION_FAILED,r)}},k=class extends e{constructor(t,r){super(t,n.RECIPIENT_ADDRESS_INVALID,r)}};function H(s){return typeof s=="object"&&s!=null}function er(s){var r;if(!H(s)||s.code==null)return;let t=JSON.stringify(s);switch(s.code){case"ERROR_JWT_EXPIRED":throw new j(s.expiredAt,t);case"ERROR_JWT_INVALID":throw new Q(t);case"ERROR_JWT_DECRYPTION":throw new X(t);case"ERROR_JWT_IDENTIFIER_ERROR":throw new q(s.identifierKey,t);case"ERROR_JWT_AUDIENCE_MISMATCH":throw new Z((r=s.message)!=null?r:"JWT audience mismatch",t)}}function nr(s){if(!H(s)||s.code==null)return;let t=JSON.stringify(s),r=s.message;switch(s.code){case"SIGNER_LIMIT_EXCEEDED":throw new c(r!=null?r:"The wallet exceeds the maximum number of recovery signers",t);case"RECOVERY_DUPLICATE_SIGNER":throw new i(r!=null?r:"The recovery list contains the same signer more than once",t);case"RECOVERY_SIGNER_CONFLICT":throw new I(r!=null?r:"A recovery signer cannot also be registered as an operational signer",t);case"SIGNER_REQUIRED":throw new o(r!=null?r:"This wallet has multiple recovery signers, so the signer to authorize with must be specified explicitly",t);case"RECOVERY_NOT_SUPPORTED_ON_CHAIN":throw new E(r!=null?r:"Multiple recovery signers are not supported on this chain yet",t);case"NOT_SUPPORTED_ON_API_VERSION":throw new N(r!=null?r:"Multiple recovery signers are not supported on this API version",t);case"RECOVERY_ADMIN_SIGNER_CONFLICT":throw new p(r!=null?r:"Only one of `adminSigner` and `recovery` can be provided",t)}}export{u as a,x as b,A as c,g as d,_ as e,d as f,R as g,l as h,a as i,T as j,D as k,sr as l,L as m,S as n,O as o,c as p,i as q,I as r,o as s,h as t,E as u,N as v,p as w,w as x,C as y,G as z,V as A,W as B,y as C,J as D,f as E,P as F,F as G,v as H,M as I,U as J,Y as K,b as L,m as M,B as N,z as O,K as P,k as Q,er as R,nr as S,Ir as T,Er as U,Nr as V,pr as W,ur as X};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWSDMIQNGcjs = require('./chunk-WSDMIQNG.cjs');var g={type:"passkey",validateConfig(){},buildInternalConfig(n){var r;let e=n,i=(r=_chunkWSDMIQNGcjs.a.call(void 0, e))!=null?r:"";return{type:"passkey",id:i,locator:`passkey:${i}`,name:"name"in e?e.name:void 0,publicKey:"publicKey"in e?e.publicKey:void 0,onCreatePasskey:e.onCreatePasskey,onSignWithPasskey:e.onSignWithPasskey}},canAutoAssemble(){return!0},addSignerPayload(n){return n},matchesRecovery(n,e){let i=_chunkWSDMIQNGcjs.a.call(void 0, n),r=_chunkWSDMIQNGcjs.a.call(void 0, e);return i==null||r==null?!0:i===r},adoptsRecoveryConfigOnMatch:!1,signerUnavailableReason:()=>null};exports.a = g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{B as n}from"./chunk-4I3EXM4B.js";import{h as e}from"./chunk-NU7VF7MC.js";import{Hex as g,WebAuthnP256 as c}from"ox";var u=37,h=32,f=4;function A(i){let t=g.toBytes(i);return t.length<u?!1:(t[h]&f)!==0}var a=class{constructor(t){this.config=t;this.type="passkey";this.id=t.id}locator(){return this.config.locator}signMessage(t){return e(this,null,function*(){if(this.config.onSignWithPasskey){let r=yield this.config.onSignWithPasskey(t);if(!A(r.metadata.authenticatorData))throw new n('The passkey assertion was created without user verification, and the on-chain verifier requires it. Request the assertion with `userVerification: "required"` so the authenticator prompts for biometrics or a PIN.');return r}let{signature:s,metadata:o}=yield c.sign({credentialId:this.id,challenge:t});return{signature:{r:`0x${s.r.toString(16)}`,s:`0x${s.s.toString(16)}`},metadata:o}})}signTransaction(t){return e(this,null,function*(){return yield this.signMessage(t)})}};export{a};
|