@crossmint/client-sdk-smart-wallet 0.1.30 → 0.1.31

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.
Files changed (52) hide show
  1. package/dist/SmartWalletSDK.cjs +1 -1
  2. package/dist/SmartWalletSDK.js +1 -1
  3. package/dist/api/CrossmintWalletService.cjs +1 -1
  4. package/dist/api/CrossmintWalletService.js +1 -1
  5. package/dist/blockchain/wallets/account/cache.cjs +1 -1
  6. package/dist/blockchain/wallets/account/cache.js +1 -1
  7. package/dist/blockchain/wallets/account/creator.cjs +1 -1
  8. package/dist/blockchain/wallets/account/creator.js +1 -1
  9. package/dist/blockchain/wallets/clientDecorator.cjs +1 -1
  10. package/dist/blockchain/wallets/clientDecorator.js +1 -1
  11. package/dist/blockchain/wallets/service.cjs +1 -1
  12. package/dist/blockchain/wallets/service.js +1 -1
  13. package/dist/{chunk-64C66S6G.js → chunk-2JFDW6FB.js} +1 -1
  14. package/dist/{chunk-6ETXLX6A.cjs → chunk-2ZFXHKSK.cjs} +1 -1
  15. package/dist/{chunk-KQ6FRWZY.js → chunk-3S4DTJXJ.js} +1 -1
  16. package/dist/{chunk-GOIOZ4ZV.cjs → chunk-4JNKYPFM.cjs} +1 -1
  17. package/dist/{chunk-WEXHROZ3.cjs → chunk-5KWFKKDU.cjs} +1 -1
  18. package/dist/{chunk-ZPMEGEMG.cjs → chunk-7EN7XZPB.cjs} +1 -1
  19. package/dist/{chunk-RSTUCDFV.cjs → chunk-BY3CQ5TZ.cjs} +2 -2
  20. package/dist/{chunk-IUGFPMB3.js → chunk-GPTN6IY5.js} +1 -1
  21. package/dist/{chunk-ADSI4245.js → chunk-I2QLGZFG.js} +1 -1
  22. package/dist/{chunk-6XIUO34Z.cjs → chunk-IOQR3XSO.cjs} +1 -1
  23. package/dist/{chunk-2LKIEBPA.js → chunk-JKRC2CSU.js} +1 -1
  24. package/dist/{chunk-YWXTA4CU.cjs → chunk-MK3ZL667.cjs} +1 -1
  25. package/dist/chunk-NCEABZLK.cjs +1 -0
  26. package/dist/{chunk-YTCBXLXA.js → chunk-OBSM5E7E.js} +1 -1
  27. package/dist/{chunk-PV2ZNROI.js → chunk-QNRRZIBE.js} +1 -1
  28. package/dist/{chunk-IORWPTP7.js → chunk-RWM6VY26.js} +1 -1
  29. package/dist/{chunk-GCJ76BZ2.cjs → chunk-S2TPVSDB.cjs} +1 -1
  30. package/dist/{chunk-TOVBSUWA.cjs → chunk-TJUTD6N4.cjs} +1 -1
  31. package/dist/{chunk-NZOH2NTL.cjs → chunk-WN3BESV4.cjs} +1 -1
  32. package/dist/{chunk-AOL56PW7.js → chunk-YH3MFIZQ.js} +1 -1
  33. package/dist/{chunk-TSAUHOIU.js → chunk-YQJ4J6HH.js} +1 -1
  34. package/dist/{chunk-MMNHHCSK.js → chunk-ZROTX6WS.js} +1 -1
  35. package/dist/error/processor.cjs +1 -1
  36. package/dist/error/processor.js +1 -1
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.js +1 -1
  39. package/dist/services/index.cjs +1 -1
  40. package/dist/services/index.js +1 -1
  41. package/dist/services/logger.cjs +1 -1
  42. package/dist/services/logger.js +1 -1
  43. package/dist/types/internal.cjs +1 -1
  44. package/dist/types/internal.js +1 -1
  45. package/dist/types/schema.cjs +1 -1
  46. package/dist/types/schema.d.cts +26 -26
  47. package/dist/types/schema.d.ts +26 -26
  48. package/dist/types/schema.js +1 -1
  49. package/dist/utils/constants.cjs +1 -1
  50. package/dist/utils/constants.js +1 -1
  51. package/package.json +2 -2
  52. package/dist/chunk-7FSJHX5Q.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGOIOZ4ZVcjs = require('./chunk-GOIOZ4ZV.cjs');require('./chunk-SCXFZMLR.cjs');require('./chunk-NZOH2NTL.cjs');require('./chunk-6ETXLX6A.cjs');require('./chunk-IQTGPM2U.cjs');require('./chunk-YWXTA4CU.cjs');require('./chunk-O2ACORII.cjs');require('./chunk-RSTUCDFV.cjs');require('./chunk-2R6HK64N.cjs');require('./chunk-GB35YMN4.cjs');require('./chunk-WJ6XJMRD.cjs');require('./chunk-STH2LE35.cjs');require('./chunk-XJGFG3RT.cjs');require('./chunk-DIDKPOO2.cjs');require('./chunk-SWWOVT47.cjs');require('./chunk-7AVDZZGD.cjs');require('./chunk-WEXHROZ3.cjs');require('./chunk-GCJ76BZ2.cjs');require('./chunk-ODAUWGUU.cjs');require('./chunk-7FSJHX5Q.cjs');require('./chunk-6XIUO34Z.cjs');require('./chunk-XQ2K2K23.cjs');require('./chunk-2GS5TXEY.cjs');require('./chunk-7FXFOOQU.cjs');require('./chunk-KYPTGHC6.cjs');require('./chunk-ZPMEGEMG.cjs');require('./chunk-TOVBSUWA.cjs');require('./chunk-M4K3IZTT.cjs');exports.SmartWalletSDK = _chunkGOIOZ4ZVcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4JNKYPFMcjs = require('./chunk-4JNKYPFM.cjs');require('./chunk-SCXFZMLR.cjs');require('./chunk-WN3BESV4.cjs');require('./chunk-2ZFXHKSK.cjs');require('./chunk-IQTGPM2U.cjs');require('./chunk-MK3ZL667.cjs');require('./chunk-O2ACORII.cjs');require('./chunk-BY3CQ5TZ.cjs');require('./chunk-2R6HK64N.cjs');require('./chunk-GB35YMN4.cjs');require('./chunk-WJ6XJMRD.cjs');require('./chunk-STH2LE35.cjs');require('./chunk-XJGFG3RT.cjs');require('./chunk-DIDKPOO2.cjs');require('./chunk-SWWOVT47.cjs');require('./chunk-7AVDZZGD.cjs');require('./chunk-5KWFKKDU.cjs');require('./chunk-S2TPVSDB.cjs');require('./chunk-ODAUWGUU.cjs');require('./chunk-NCEABZLK.cjs');require('./chunk-IOQR3XSO.cjs');require('./chunk-XQ2K2K23.cjs');require('./chunk-2GS5TXEY.cjs');require('./chunk-7FXFOOQU.cjs');require('./chunk-KYPTGHC6.cjs');require('./chunk-7EN7XZPB.cjs');require('./chunk-TJUTD6N4.cjs');require('./chunk-M4K3IZTT.cjs');exports.SmartWalletSDK = _chunk4JNKYPFMcjs.a;
@@ -1 +1 @@
1
- import{a}from"./chunk-2LKIEBPA.js";import"./chunk-H4CMXNVK.js";import"./chunk-64C66S6G.js";import"./chunk-AOL56PW7.js";import"./chunk-NLGILHJS.js";import"./chunk-ADSI4245.js";import"./chunk-ATQ4WGCW.js";import"./chunk-YTCBXLXA.js";import"./chunk-UG47CBKR.js";import"./chunk-BJZQA5VC.js";import"./chunk-C3VZY7VJ.js";import"./chunk-D4NDUT36.js";import"./chunk-CUTQYF3F.js";import"./chunk-FHNNZVNU.js";import"./chunk-ETVJGLNY.js";import"./chunk-S2XBSAGM.js";import"./chunk-MMNHHCSK.js";import"./chunk-PV2ZNROI.js";import"./chunk-4SPA557P.js";import"./chunk-IUGFPMB3.js";import"./chunk-IORWPTP7.js";import"./chunk-PZ6Q22YJ.js";import"./chunk-YBHSEZMB.js";import"./chunk-TZG6MROQ.js";import"./chunk-3F6P4HUZ.js";import"./chunk-KQ6FRWZY.js";import"./chunk-TSAUHOIU.js";import"./chunk-UPURFW46.js";export{a as SmartWalletSDK};
1
+ import{a}from"./chunk-JKRC2CSU.js";import"./chunk-H4CMXNVK.js";import"./chunk-2JFDW6FB.js";import"./chunk-YH3MFIZQ.js";import"./chunk-NLGILHJS.js";import"./chunk-I2QLGZFG.js";import"./chunk-ATQ4WGCW.js";import"./chunk-OBSM5E7E.js";import"./chunk-UG47CBKR.js";import"./chunk-BJZQA5VC.js";import"./chunk-C3VZY7VJ.js";import"./chunk-D4NDUT36.js";import"./chunk-CUTQYF3F.js";import"./chunk-FHNNZVNU.js";import"./chunk-ETVJGLNY.js";import"./chunk-S2XBSAGM.js";import"./chunk-ZROTX6WS.js";import"./chunk-QNRRZIBE.js";import"./chunk-4SPA557P.js";import"./chunk-GPTN6IY5.js";import"./chunk-RWM6VY26.js";import"./chunk-PZ6Q22YJ.js";import"./chunk-YBHSEZMB.js";import"./chunk-TZG6MROQ.js";import"./chunk-3F6P4HUZ.js";import"./chunk-3S4DTJXJ.js";import"./chunk-YQJ4J6HH.js";import"./chunk-UPURFW46.js";export{a as SmartWalletSDK};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGCJ76BZ2cjs = require('../chunk-GCJ76BZ2.cjs');require('../chunk-ODAUWGUU.cjs');require('../chunk-7FSJHX5Q.cjs');require('../chunk-6XIUO34Z.cjs');require('../chunk-XQ2K2K23.cjs');require('../chunk-TOVBSUWA.cjs');require('../chunk-M4K3IZTT.cjs');exports.CrossmintWalletService = _chunkGCJ76BZ2cjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkS2TPVSDBcjs = require('../chunk-S2TPVSDB.cjs');require('../chunk-ODAUWGUU.cjs');require('../chunk-NCEABZLK.cjs');require('../chunk-IOQR3XSO.cjs');require('../chunk-XQ2K2K23.cjs');require('../chunk-TJUTD6N4.cjs');require('../chunk-M4K3IZTT.cjs');exports.CrossmintWalletService = _chunkS2TPVSDBcjs.a;
@@ -1 +1 @@
1
- import{a}from"../chunk-PV2ZNROI.js";import"../chunk-4SPA557P.js";import"../chunk-IUGFPMB3.js";import"../chunk-IORWPTP7.js";import"../chunk-PZ6Q22YJ.js";import"../chunk-TSAUHOIU.js";import"../chunk-UPURFW46.js";export{a as CrossmintWalletService};
1
+ import{a}from"../chunk-QNRRZIBE.js";import"../chunk-4SPA557P.js";import"../chunk-GPTN6IY5.js";import"../chunk-RWM6VY26.js";import"../chunk-PZ6Q22YJ.js";import"../chunk-YQJ4J6HH.js";import"../chunk-UPURFW46.js";export{a as CrossmintWalletService};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYWXTA4CUcjs = require('../../../chunk-YWXTA4CU.cjs');require('../../../chunk-6XIUO34Z.cjs');require('../../../chunk-TOVBSUWA.cjs');exports.AccountConfigCache = _chunkYWXTA4CUcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMK3ZL667cjs = require('../../../chunk-MK3ZL667.cjs');require('../../../chunk-IOQR3XSO.cjs');require('../../../chunk-TJUTD6N4.cjs');exports.AccountConfigCache = _chunkMK3ZL667cjs.a;
@@ -1 +1 @@
1
- import{a}from"../../../chunk-ADSI4245.js";import"../../../chunk-IORWPTP7.js";import"../../../chunk-TSAUHOIU.js";export{a as AccountConfigCache};
1
+ import{a}from"../../../chunk-I2QLGZFG.js";import"../../../chunk-RWM6VY26.js";import"../../../chunk-YQJ4J6HH.js";export{a as AccountConfigCache};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRSTUCDFVcjs = require('../../../chunk-RSTUCDFV.cjs');require('../../../chunk-WEXHROZ3.cjs');require('../../../chunk-TOVBSUWA.cjs');require('../../../chunk-M4K3IZTT.cjs');exports.AccountCreator = _chunkRSTUCDFVcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBY3CQ5TZcjs = require('../../../chunk-BY3CQ5TZ.cjs');require('../../../chunk-5KWFKKDU.cjs');require('../../../chunk-TJUTD6N4.cjs');require('../../../chunk-M4K3IZTT.cjs');exports.AccountCreator = _chunkBY3CQ5TZcjs.a;
@@ -1 +1 @@
1
- import{a}from"../../../chunk-YTCBXLXA.js";import"../../../chunk-MMNHHCSK.js";import"../../../chunk-TSAUHOIU.js";import"../../../chunk-UPURFW46.js";export{a as AccountCreator};
1
+ import{a}from"../../../chunk-OBSM5E7E.js";import"../../../chunk-ZROTX6WS.js";import"../../../chunk-YQJ4J6HH.js";import"../../../chunk-UPURFW46.js";export{a as AccountCreator};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNZOH2NTLcjs = require('../../chunk-NZOH2NTL.cjs');require('../../chunk-WJ6XJMRD.cjs');require('../../chunk-ODAUWGUU.cjs');require('../../chunk-7FSJHX5Q.cjs');require('../../chunk-TOVBSUWA.cjs');require('../../chunk-M4K3IZTT.cjs');exports.ClientDecorator = _chunkNZOH2NTLcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWN3BESV4cjs = require('../../chunk-WN3BESV4.cjs');require('../../chunk-WJ6XJMRD.cjs');require('../../chunk-ODAUWGUU.cjs');require('../../chunk-NCEABZLK.cjs');require('../../chunk-TJUTD6N4.cjs');require('../../chunk-M4K3IZTT.cjs');exports.ClientDecorator = _chunkWN3BESV4cjs.a;
@@ -1 +1 @@
1
- import{a}from"../../chunk-64C66S6G.js";import"../../chunk-C3VZY7VJ.js";import"../../chunk-4SPA557P.js";import"../../chunk-IUGFPMB3.js";import"../../chunk-TSAUHOIU.js";import"../../chunk-UPURFW46.js";export{a as ClientDecorator};
1
+ import{a}from"../../chunk-2JFDW6FB.js";import"../../chunk-C3VZY7VJ.js";import"../../chunk-4SPA557P.js";import"../../chunk-GPTN6IY5.js";import"../../chunk-YQJ4J6HH.js";import"../../chunk-UPURFW46.js";export{a as ClientDecorator};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6ETXLX6Acjs = require('../../chunk-6ETXLX6A.cjs');require('../../chunk-IQTGPM2U.cjs');require('../../chunk-WJ6XJMRD.cjs');require('../../chunk-SWWOVT47.cjs');require('../../chunk-7AVDZZGD.cjs');require('../../chunk-2GS5TXEY.cjs');require('../../chunk-7FXFOOQU.cjs');require('../../chunk-KYPTGHC6.cjs');require('../../chunk-TOVBSUWA.cjs');require('../../chunk-M4K3IZTT.cjs');exports.SmartWalletService = _chunk6ETXLX6Acjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2ZFXHKSKcjs = require('../../chunk-2ZFXHKSK.cjs');require('../../chunk-IQTGPM2U.cjs');require('../../chunk-WJ6XJMRD.cjs');require('../../chunk-SWWOVT47.cjs');require('../../chunk-7AVDZZGD.cjs');require('../../chunk-2GS5TXEY.cjs');require('../../chunk-7FXFOOQU.cjs');require('../../chunk-KYPTGHC6.cjs');require('../../chunk-TJUTD6N4.cjs');require('../../chunk-M4K3IZTT.cjs');exports.SmartWalletService = _chunk2ZFXHKSKcjs.a;
@@ -1 +1 @@
1
- import{a}from"../../chunk-AOL56PW7.js";import"../../chunk-NLGILHJS.js";import"../../chunk-C3VZY7VJ.js";import"../../chunk-ETVJGLNY.js";import"../../chunk-S2XBSAGM.js";import"../../chunk-YBHSEZMB.js";import"../../chunk-TZG6MROQ.js";import"../../chunk-3F6P4HUZ.js";import"../../chunk-TSAUHOIU.js";import"../../chunk-UPURFW46.js";export{a as SmartWalletService};
1
+ import{a}from"../../chunk-YH3MFIZQ.js";import"../../chunk-NLGILHJS.js";import"../../chunk-C3VZY7VJ.js";import"../../chunk-ETVJGLNY.js";import"../../chunk-S2XBSAGM.js";import"../../chunk-YBHSEZMB.js";import"../../chunk-TZG6MROQ.js";import"../../chunk-3F6P4HUZ.js";import"../../chunk-YQJ4J6HH.js";import"../../chunk-UPURFW46.js";export{a as SmartWalletService};
@@ -1 +1 @@
1
- import{a as d}from"./chunk-C3VZY7VJ.js";import{a as m}from"./chunk-IUGFPMB3.js";import{a as l}from"./chunk-UPURFW46.js";import{stringify as y}from"viem";var h=["sendTransaction","writeContract","sendUserOperation"],g=["signMessage","signTypedData"];function c(a){return h.includes(a)}function p(a){return g.includes(a)}var u=class{constructor(o,t=m){this.errorProcessor=o;this.logger=t}decorate({crossmintChain:o,smartAccountClient:t}){return new Proxy(t,{get:(n,e,s)=>{let r=Reflect.get(n,e,s);return typeof r!="function"||typeof e!="string"||!(p(e)||c(e))?r:(...i)=>this.logger.logPerformance(`CrossmintSmartWallet.${e}`,()=>this.execute(n,e,r,i,o))}})}async execute(o,t,n,e,s){try{this.logger.log(`[CrossmintSmartWallet.${t}] - params: ${y(e)}`);let r=c(t)?this.processTxnArgs(t,s,e):e;return await n.call(o,...r)}catch(r){let i=c(t)?"signing":"sending transaction";throw this.errorProcessor.map(r,new l(`Error ${i}: ${r.message}`,y(r)))}}processTxnArgs(o,t,n){if(o==="sendUserOperation"){let[{userOperation:s,middleware:r,account:i}]=n;return[{middleware:r,account:i,userOperation:this.addGelatoBundlerProperties(t,s)},...n.slice(1)]}let[e]=n;return[this.addGelatoBundlerProperties(t,e),...n.slice(1)]}addGelatoBundlerProperties(o,t){return d(o)?{...t,maxFeePerGas:"0x0",maxPriorityFeePerGas:"0x0"}:t}};export{u as a};
1
+ import{a as d}from"./chunk-C3VZY7VJ.js";import{a as m}from"./chunk-GPTN6IY5.js";import{a as l}from"./chunk-UPURFW46.js";import{stringify as y}from"viem";var h=["sendTransaction","writeContract","sendUserOperation"],g=["signMessage","signTypedData"];function c(a){return h.includes(a)}function p(a){return g.includes(a)}var u=class{constructor(o,t=m){this.errorProcessor=o;this.logger=t}decorate({crossmintChain:o,smartAccountClient:t}){return new Proxy(t,{get:(n,e,s)=>{let r=Reflect.get(n,e,s);return typeof r!="function"||typeof e!="string"||!(p(e)||c(e))?r:(...i)=>this.logger.logPerformance(`CrossmintSmartWallet.${e}`,()=>this.execute(n,e,r,i,o))}})}async execute(o,t,n,e,s){try{this.logger.log(`[CrossmintSmartWallet.${t}] - params: ${y(e)}`);let r=c(t)?this.processTxnArgs(t,s,e):e;return await n.call(o,...r)}catch(r){let i=c(t)?"signing":"sending transaction";throw this.errorProcessor.map(r,new l(`Error ${i}: ${r.message}`,y(r)))}}processTxnArgs(o,t,n){if(o==="sendUserOperation"){let[{userOperation:s,middleware:r,account:i}]=n;return[{middleware:r,account:i,userOperation:this.addGelatoBundlerProperties(t,s)},...n.slice(1)]}let[e]=n;return[this.addGelatoBundlerProperties(t,e),...n.slice(1)]}addGelatoBundlerProperties(o,t){return d(o)?{...t,maxFeePerGas:"0x0",maxPriorityFeePerGas:"0x0"}:t}};export{u as a};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIQTGPM2Ucjs = require('./chunk-IQTGPM2U.cjs');var _chunkSWWOVT47cjs = require('./chunk-SWWOVT47.cjs');var _chunk2GS5TXEYcjs = require('./chunk-2GS5TXEY.cjs');var _chunk7FXFOOQUcjs = require('./chunk-7FXFOOQU.cjs');var _chunkTOVBSUWAcjs = require('./chunk-TOVBSUWA.cjs');var _permissionless = require('permissionless');var _pimlico = require('permissionless/clients/pimlico');var _viem = require('viem');var _commonsdkbase = require('@crossmint/common-sdk-base');var v=class{constructor(r,t,i,e){this.crossmintService=r;this.accountConfigService=t;this.accountCreator=i;this.clientDecorator=e}async getOrCreate(r,t,i){let{config:{entryPointVersion:e,kernelVersion:o,existing:n,userWithId:a},cached:g}=await this.accountConfigService.get(r,t),c=_viem.createPublicClient.call(void 0, {transport:_viem.http.call(void 0, _chunk7FXFOOQUcjs.b.call(void 0, t))}),{account:s,signerConfig:l}=await this.accountCreator.get({chain:t,walletParams:i,publicClient:c,user:a,entryPoint:e==="v0.6"?_permissionless.ENTRYPOINT_ADDRESS_V06:_permissionless.ENTRYPOINT_ADDRESS_V07,kernelVersion:o,existing:n});return n==null&&await this.crossmintService.idempotentCreateSmartWallet(r,{type:_chunkTOVBSUWAcjs.a,smartContractWalletAddress:s.address,signerData:l.data,version:_chunkTOVBSUWAcjs.b,baseLayer:"evm",chainId:_commonsdkbase.blockchainToChainId.call(void 0, t),entryPointVersion:e,kernelVersion:o}),g||this.accountConfigService.cache({entryPointVersion:e,kernelVersion:o,user:a,existing:{address:s.address,signerConfig:l}}),new (0, _chunkSWWOVT47cjs.a)({wallet:this.smartAccountClient(t,s,r),public:c},t,this.crossmintService)}smartAccountClient(r,t,i){let e=_viem.http.call(void 0, _chunk7FXFOOQUcjs.c.call(void 0, r)),o={chain:_chunk2GS5TXEYcjs.i[r],entryPoint:t.entryPoint},n=_pimlico.createPimlicoBundlerClient.call(void 0, {...o,transport:e}),a=_permissionless.createSmartAccountClient.call(void 0, {account:t,bundlerTransport:e,...o,..._chunkIQTGPM2Ucjs.a.call(void 0, r)&&_chunkIQTGPM2Ucjs.b.call(void 0, {bundlerClient:n,entryPoint:t.entryPoint,chain:r,walletService:this.crossmintService,user:i})});return this.clientDecorator.decorate({crossmintChain:r,smartAccountClient:a})}};exports.a = v;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIQTGPM2Ucjs = require('./chunk-IQTGPM2U.cjs');var _chunkSWWOVT47cjs = require('./chunk-SWWOVT47.cjs');var _chunk2GS5TXEYcjs = require('./chunk-2GS5TXEY.cjs');var _chunk7FXFOOQUcjs = require('./chunk-7FXFOOQU.cjs');var _chunkTJUTD6N4cjs = require('./chunk-TJUTD6N4.cjs');var _permissionless = require('permissionless');var _pimlico = require('permissionless/clients/pimlico');var _viem = require('viem');var _commonsdkbase = require('@crossmint/common-sdk-base');var v=class{constructor(r,t,i,e){this.crossmintService=r;this.accountConfigService=t;this.accountCreator=i;this.clientDecorator=e}async getOrCreate(r,t,i){let{config:{entryPointVersion:e,kernelVersion:o,existing:n,userWithId:a},cached:g}=await this.accountConfigService.get(r,t),c=_viem.createPublicClient.call(void 0, {transport:_viem.http.call(void 0, _chunk7FXFOOQUcjs.b.call(void 0, t))}),{account:s,signerConfig:l}=await this.accountCreator.get({chain:t,walletParams:i,publicClient:c,user:a,entryPoint:e==="v0.6"?_permissionless.ENTRYPOINT_ADDRESS_V06:_permissionless.ENTRYPOINT_ADDRESS_V07,kernelVersion:o,existing:n});return n==null&&await this.crossmintService.idempotentCreateSmartWallet(r,{type:_chunkTJUTD6N4cjs.a,smartContractWalletAddress:s.address,signerData:l.data,version:_chunkTJUTD6N4cjs.b,baseLayer:"evm",chainId:_commonsdkbase.blockchainToChainId.call(void 0, t),entryPointVersion:e,kernelVersion:o}),g||this.accountConfigService.cache({entryPointVersion:e,kernelVersion:o,user:a,existing:{address:s.address,signerConfig:l}}),new (0, _chunkSWWOVT47cjs.a)({wallet:this.smartAccountClient(t,s,r),public:c},t,this.crossmintService)}smartAccountClient(r,t,i){let e=_viem.http.call(void 0, _chunk7FXFOOQUcjs.c.call(void 0, r)),o={chain:_chunk2GS5TXEYcjs.i[r],entryPoint:t.entryPoint},n=_pimlico.createPimlicoBundlerClient.call(void 0, {...o,transport:e}),a=_permissionless.createSmartAccountClient.call(void 0, {account:t,bundlerTransport:e,...o,..._chunkIQTGPM2Ucjs.a.call(void 0, r)&&_chunkIQTGPM2Ucjs.b.call(void 0, {bundlerClient:n,entryPoint:t.entryPoint,chain:r,walletService:this.crossmintService,user:i})});return this.clientDecorator.decorate({crossmintChain:r,smartAccountClient:a})}};exports.a = v;
@@ -1 +1 @@
1
- import{d as o}from"./chunk-TSAUHOIU.js";import{a}from"./chunk-UPURFW46.js";import{BaseError as e,stringify as i}from"viem";var r=class{constructor(n){this.logger=n}map(n,t){return this.record(n),n instanceof a||n instanceof e?n:t}record(n){let t=n instanceof Error?n.message:String(n);this.logger.error(`Smart Wallet SDK Error: ${t}`,{stack:n instanceof Error?n.stack:void 0,name:n instanceof Error?n.name:"UnknownError",details:i(n),domain:window.location.hostname,sdk_version:o})}};export{r as a};
1
+ import{d as o}from"./chunk-YQJ4J6HH.js";import{a}from"./chunk-UPURFW46.js";import{BaseError as e,stringify as i}from"viem";var r=class{constructor(n){this.logger=n}map(n,t){return this.record(n),n instanceof a||n instanceof e?n:t}record(n){let t=n instanceof Error?n.message:String(n);this.logger.error(`Smart Wallet SDK Error: ${t}`,{stack:n instanceof Error?n.stack:void 0,name:n instanceof Error?n.name:"UnknownError",details:i(n),domain:window.location.hostname,sdk_version:o})}};export{r as a};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSCXFZMLRcjs = require('./chunk-SCXFZMLR.cjs');var _chunkNZOH2NTLcjs = require('./chunk-NZOH2NTL.cjs');var _chunk6ETXLX6Acjs = require('./chunk-6ETXLX6A.cjs');var _chunkYWXTA4CUcjs = require('./chunk-YWXTA4CU.cjs');var _chunkO2ACORIIcjs = require('./chunk-O2ACORII.cjs');var _chunkRSTUCDFVcjs = require('./chunk-RSTUCDFV.cjs');var _chunk2R6HK64Ncjs = require('./chunk-2R6HK64N.cjs');var _chunkSTH2LE35cjs = require('./chunk-STH2LE35.cjs');var _chunkGCJ76BZ2cjs = require('./chunk-GCJ76BZ2.cjs');var _chunk7FSJHX5Qcjs = require('./chunk-7FSJHX5Q.cjs');var _chunk2GS5TXEYcjs = require('./chunk-2GS5TXEY.cjs');var _chunkZPMEGEMGcjs = require('./chunk-ZPMEGEMG.cjs');var _chunkTOVBSUWAcjs = require('./chunk-TOVBSUWA.cjs');var _chunkM4K3IZTTcjs = require('./chunk-M4K3IZTT.cjs');var _viem = require('viem');var _commonsdkbase = require('@crossmint/common-sdk-base');var P=class W{constructor(r,t,a,e=_chunk7FSJHX5Qcjs.a){this.crossmintEnv=r;this.smartWalletService=t;this.errorProcessor=a;this.logger=e}static init({clientApiKey:r}){let t=_commonsdkbase.validateAPIKey.call(void 0, r);if(!t.isValid)throw new Error("API key invalid");let a=new (0, _chunkGCJ76BZ2cjs.a)(r),e=new (0, _chunkZPMEGEMGcjs.a)(_chunk7FSJHX5Qcjs.b),d=new (0, _chunkRSTUCDFVcjs.a)(new _chunk2R6HK64Ncjs.a,new (0, _chunkSCXFZMLRcjs.a)(a.getPasskeyServerUrl(),r)),E=new (0, _chunkYWXTA4CUcjs.a)(`smart-wallet-${_chunkTOVBSUWAcjs.d}`),u=new (0, _chunk6ETXLX6Acjs.a)(a,new (0, _chunkO2ACORIIcjs.a)(a,E),d,new (0, _chunkNZOH2NTLcjs.a)(e));return new W(t.environment,u,e)}async getOrCreateWallet(r,t,a={signer:{type:"PASSKEY"}}){if(!_chunkSTH2LE35cjs.a.call(void 0, ))throw new (0, _chunkM4K3IZTTcjs.a)("Smart Wallet SDK should only be used client side.");return this.assertValidChain(t),await this.logger.logPerformance("GET_OR_CREATE_WALLET",async()=>{try{return await this.smartWalletService.getOrCreate(r,t,a)}catch(e){throw this.errorProcessor.map(e,new (0, _chunkM4K3IZTTcjs.a)(`Wallet creation failed: ${e.message}.`,_viem.stringify.call(void 0, e)))}})}assertValidChain(r){if(!this.validChain(r))throw new (0, _chunkM4K3IZTTcjs.a)(`The selected chain "${r}" is not available in "${this.crossmintEnv}". Either set a valid chain or check you're using an API key for the environment you're trying to target.`)}validChain(r){return this.crossmintEnv==="development"||this.crossmintEnv==="staging"?_chunk2GS5TXEYcjs.g.call(void 0, r):_chunk2GS5TXEYcjs.h.call(void 0, r)}};exports.a = P;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSCXFZMLRcjs = require('./chunk-SCXFZMLR.cjs');var _chunkWN3BESV4cjs = require('./chunk-WN3BESV4.cjs');var _chunk2ZFXHKSKcjs = require('./chunk-2ZFXHKSK.cjs');var _chunkMK3ZL667cjs = require('./chunk-MK3ZL667.cjs');var _chunkO2ACORIIcjs = require('./chunk-O2ACORII.cjs');var _chunkBY3CQ5TZcjs = require('./chunk-BY3CQ5TZ.cjs');var _chunk2R6HK64Ncjs = require('./chunk-2R6HK64N.cjs');var _chunkSTH2LE35cjs = require('./chunk-STH2LE35.cjs');var _chunkS2TPVSDBcjs = require('./chunk-S2TPVSDB.cjs');var _chunkNCEABZLKcjs = require('./chunk-NCEABZLK.cjs');var _chunk2GS5TXEYcjs = require('./chunk-2GS5TXEY.cjs');var _chunk7EN7XZPBcjs = require('./chunk-7EN7XZPB.cjs');var _chunkTJUTD6N4cjs = require('./chunk-TJUTD6N4.cjs');var _chunkM4K3IZTTcjs = require('./chunk-M4K3IZTT.cjs');var _viem = require('viem');var _commonsdkbase = require('@crossmint/common-sdk-base');var P=class W{constructor(r,t,a,e=_chunkNCEABZLKcjs.a){this.crossmintEnv=r;this.smartWalletService=t;this.errorProcessor=a;this.logger=e}static init({clientApiKey:r}){let t=_commonsdkbase.validateAPIKey.call(void 0, r);if(!t.isValid)throw new Error("API key invalid");let a=new (0, _chunkS2TPVSDBcjs.a)(r),e=new (0, _chunk7EN7XZPBcjs.a)(_chunkNCEABZLKcjs.b),d=new (0, _chunkBY3CQ5TZcjs.a)(new _chunk2R6HK64Ncjs.a,new (0, _chunkSCXFZMLRcjs.a)(a.getPasskeyServerUrl(),r)),E=new (0, _chunkMK3ZL667cjs.a)(`smart-wallet-${_chunkTJUTD6N4cjs.d}`),u=new (0, _chunk2ZFXHKSKcjs.a)(a,new (0, _chunkO2ACORIIcjs.a)(a,E),d,new (0, _chunkWN3BESV4cjs.a)(e));return new W(t.environment,u,e)}async getOrCreateWallet(r,t,a={signer:{type:"PASSKEY"}}){if(!_chunkSTH2LE35cjs.a.call(void 0, ))throw new (0, _chunkM4K3IZTTcjs.a)("Smart Wallet SDK should only be used client side.");return this.assertValidChain(t),await this.logger.logPerformance("GET_OR_CREATE_WALLET",async()=>{try{return await this.smartWalletService.getOrCreate(r,t,a)}catch(e){throw this.errorProcessor.map(e,new (0, _chunkM4K3IZTTcjs.a)(`Wallet creation failed: ${e.message}.`,_viem.stringify.call(void 0, e)))}})}assertValidChain(r){if(!this.validChain(r))throw new (0, _chunkM4K3IZTTcjs.a)(`The selected chain "${r}" is not available in "${this.crossmintEnv}". Either set a valid chain or check you're using an API key for the environment you're trying to target.`)}validChain(r){return this.crossmintEnv==="development"||this.crossmintEnv==="staging"?_chunk2GS5TXEYcjs.g.call(void 0, r):_chunk2GS5TXEYcjs.h.call(void 0, r)}};exports.a = P;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTOVBSUWAcjs = require('./chunk-TOVBSUWA.cjs');function l(e){return _chunkTOVBSUWAcjs.f.includes(e)}function p(e){return _chunkTOVBSUWAcjs.g.includes(e)}function i(e){return"signer"in e&&"type"in e.signer&&e.signer.type==="PASSKEY"}function g(e){let t=e.existing==null||e.existing.signerConfig.type==="passkeys";return i(e.walletParams)&&t}function s(e){return"signer"in e&&("type"in e.signer&&e.signer.type==="VIEM_ACCOUNT"||"request"in e.signer&&typeof e.signer.request=="function")}function P(e){let t=e.existing==null||e.existing.signerConfig.type==="eoa";return s(e.walletParams)&&t}exports.a = l; exports.b = p; exports.c = i; exports.d = g; exports.e = s; exports.f = P;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTJUTD6N4cjs = require('./chunk-TJUTD6N4.cjs');function l(e){return _chunkTJUTD6N4cjs.f.includes(e)}function p(e){return _chunkTJUTD6N4cjs.g.includes(e)}function i(e){return"signer"in e&&"type"in e.signer&&e.signer.type==="PASSKEY"}function g(e){let t=e.existing==null||e.existing.signerConfig.type==="passkeys";return i(e.walletParams)&&t}function s(e){return"signer"in e&&("type"in e.signer&&e.signer.type==="VIEM_ACCOUNT"||"request"in e.signer&&typeof e.signer.request=="function")}function P(e){let t=e.existing==null||e.existing.signerConfig.type==="eoa";return s(e.walletParams)&&t}exports.a = l; exports.b = p; exports.c = i; exports.d = g; exports.e = s; exports.f = P;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTOVBSUWAcjs = require('./chunk-TOVBSUWA.cjs');var _chunkM4K3IZTTcjs = require('./chunk-M4K3IZTT.cjs');var _viem = require('viem');var r=class{constructor(n){this.logger=n}map(n,t){return this.record(n),n instanceof _chunkM4K3IZTTcjs.a||n instanceof _viem.BaseError?n:t}record(n){let t=n instanceof Error?n.message:String(n);this.logger.error(`Smart Wallet SDK Error: ${t}`,{stack:n instanceof Error?n.stack:void 0,name:n instanceof Error?n.name:"UnknownError",details:_viem.stringify.call(void 0, n),domain:window.location.hostname,sdk_version:_chunkTOVBSUWAcjs.d})}};exports.a = r;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTJUTD6N4cjs = require('./chunk-TJUTD6N4.cjs');var _chunkM4K3IZTTcjs = require('./chunk-M4K3IZTT.cjs');var _viem = require('viem');var r=class{constructor(n){this.logger=n}map(n,t){return this.record(n),n instanceof _chunkM4K3IZTTcjs.a||n instanceof _viem.BaseError?n:t}record(n){let t=n instanceof Error?n.message:String(n);this.logger.error(`Smart Wallet SDK Error: ${t}`,{stack:n instanceof Error?n.stack:void 0,name:n instanceof Error?n.name:"UnknownError",details:_viem.stringify.call(void 0, n),domain:window.location.hostname,sdk_version:_chunkTJUTD6N4cjs.d})}};exports.a = r;
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWEXHROZ3cjs = require('./chunk-WEXHROZ3.cjs');var _chunkM4K3IZTTcjs = require('./chunk-M4K3IZTT.cjs');var o=class{constructor(e,r){this.eoaStrategy=e;this.passkeyStrategy=r}get(e){if(_chunkWEXHROZ3cjs.d.call(void 0, e))return this.passkeyStrategy.create(e);if(_chunkWEXHROZ3cjs.f.call(void 0, e))return this.eoaStrategy.create(e);if(e.existing==null)throw new (0, _chunkM4K3IZTTcjs.h)(`Unsupported wallet params:
2
- ${e.walletParams}`);let r=e.existing.signerConfig.display(),y=_chunkWEXHROZ3cjs.c.call(void 0, e.walletParams)?"passkey":"eoa";throw new (0, _chunkM4K3IZTTcjs.b)(`Cannot create wallet with ${y} signer for user ${e.user.id}', they already have a wallet with signer:
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5KWFKKDUcjs = require('./chunk-5KWFKKDU.cjs');var _chunkM4K3IZTTcjs = require('./chunk-M4K3IZTT.cjs');var o=class{constructor(e,r){this.eoaStrategy=e;this.passkeyStrategy=r}get(e){if(_chunk5KWFKKDUcjs.d.call(void 0, e))return this.passkeyStrategy.create(e);if(_chunk5KWFKKDUcjs.f.call(void 0, e))return this.eoaStrategy.create(e);if(e.existing==null)throw new (0, _chunkM4K3IZTTcjs.h)(`Unsupported wallet params:
2
+ ${e.walletParams}`);let r=e.existing.signerConfig.display(),y=_chunk5KWFKKDUcjs.c.call(void 0, e.walletParams)?"passkey":"eoa";throw new (0, _chunkM4K3IZTTcjs.b)(`Cannot create wallet with ${y} signer for user ${e.user.id}', they already have a wallet with signer:
3
3
  '${JSON.stringify(r,null,2)}'`,r)}};exports.a = o;
@@ -1 +1 @@
1
- import{c as o}from"./chunk-TSAUHOIU.js";import{SDKLogger as r,getBrowserLogger as e}from"@crossmint/client-sdk-base";var w=new r(o),a=new r(o,e(o,{onlyDatadog:!0}));export{w as a,a as b};
1
+ import{c as o}from"./chunk-YQJ4J6HH.js";import{SDKLogger as r,getBrowserLogger as e}from"@crossmint/client-sdk-base";var w=new r(o),a=new r(o,e(o,{onlyDatadog:!0}));export{w as a,a as b};
@@ -1 +1 @@
1
- import{e as l}from"./chunk-IORWPTP7.js";import{keccak256 as o,toHex as i}from"viem";var s=class{constructor(e){this.keyPrefix=e}set(e,t){localStorage.setItem(this.key(e),JSON.stringify(t))}get(e){let t=this.key(e),r=localStorage.getItem(t);if(r==null)return null;let a=l.safeParse(JSON.parse(r));return a.success?a.data:(localStorage.removeItem(t),null)}clear(){for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);t&&t.startsWith(this.keyPrefix)&&(localStorage.removeItem(t),e--)}}key(e){return`${this.keyPrefix}-${o(i(e.jwt))}`}};export{s as a};
1
+ import{e as l}from"./chunk-RWM6VY26.js";import{keccak256 as o,toHex as i}from"viem";var s=class{constructor(e){this.keyPrefix=e}set(e,t){localStorage.setItem(this.key(e),JSON.stringify(t))}get(e){let t=this.key(e),r=localStorage.getItem(t);if(r==null)return null;let a=l.safeParse(JSON.parse(r));return a.success?a.data:(localStorage.removeItem(t),null)}clear(){for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);t&&t.startsWith(this.keyPrefix)&&(localStorage.removeItem(t),e--)}}key(e){return`${this.keyPrefix}-${o(i(e.jwt))}`}};export{s as a};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTOVBSUWAcjs = require('./chunk-TOVBSUWA.cjs');var _passkeyvalidator = require('@zerodev/passkey-validator');var _viem = require('viem');var _zod = require('zod');var m=_zod.z.custom(t=>_viem.isHex.call(void 0, t),{message:"Invalid hex string"}),s=_zod.z.custom(t=>_viem.isAddress.call(void 0, t),{message:"Invalid evm address"}),p= exports.a =_zod.z.object({eoaAddress:s,type:_zod.z.literal("eoa")}),c= exports.b =_zod.z.object({entryPoint:s,validatorAddress:s,pubKeyX:_zod.z.string(),pubKeyY:_zod.z.string(),authenticatorIdHash:m,authenticatorId:_zod.z.string()}),l= exports.c =c.extend({passkeyName:_zod.z.string(),validatorContractVersion:_zod.z.nativeEnum(_passkeyvalidator.PasskeyValidatorContractVersion),domain:_zod.z.string(),type:_zod.z.literal("passkeys")}),g= exports.d =_zod.z.discriminatedUnion("type",[l,p]),P= exports.e =_zod.z.object({kernelVersion:_zod.z.enum(_chunkTOVBSUWAcjs.f,{errorMap:(t,r)=>({message:`Unsupported kernel version. Supported versions: ${_chunkTOVBSUWAcjs.f.join(", ")}. Version used: ${r.data}. Please contact support`})}),entryPointVersion:_zod.z.enum(_chunkTOVBSUWAcjs.g,{errorMap:(t,r)=>({message:`Unsupported entry point version. Supported versions: ${_chunkTOVBSUWAcjs.g.join(", ")}. Version used: ${r.data}. Please contact support`})}),userId:_zod.z.string().min(1),signers:_zod.z.array(_zod.z.object({signerData:g})).min(0).max(1,"Invalid wallet signer configuration. Please contact support"),smartContractWalletAddress:s.optional()});exports.a = p; exports.b = c; exports.c = l; exports.d = g; exports.e = P;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTJUTD6N4cjs = require('./chunk-TJUTD6N4.cjs');var _passkeyvalidator = require('@zerodev/passkey-validator');var _viem = require('viem');var _zod = require('zod');var m=_zod.z.custom(t=>_viem.isHex.call(void 0, t),{message:"Invalid hex string"}),s=_zod.z.custom(t=>_viem.isAddress.call(void 0, t),{message:"Invalid evm address"}),p= exports.a =_zod.z.object({eoaAddress:s,type:_zod.z.literal("eoa")}),c= exports.b =_zod.z.object({entryPoint:s,validatorAddress:s,pubKeyX:_zod.z.string(),pubKeyY:_zod.z.string(),authenticatorIdHash:m,authenticatorId:_zod.z.string()}),l= exports.c =c.extend({passkeyName:_zod.z.string(),validatorContractVersion:_zod.z.nativeEnum(_passkeyvalidator.PasskeyValidatorContractVersion),domain:_zod.z.string(),type:_zod.z.literal("passkeys")}),g= exports.d =_zod.z.discriminatedUnion("type",[l,p]),P= exports.e =_zod.z.object({kernelVersion:_zod.z.enum(_chunkTJUTD6N4cjs.f,{errorMap:(t,r)=>({message:`Unsupported kernel version. Supported versions: ${_chunkTJUTD6N4cjs.f.join(", ")}. Version used: ${r.data}. Please contact support`})}),entryPointVersion:_zod.z.enum(_chunkTJUTD6N4cjs.g,{errorMap:(t,r)=>({message:`Unsupported entry point version. Supported versions: ${_chunkTJUTD6N4cjs.g.join(", ")}. Version used: ${r.data}. Please contact support`})}),userId:_zod.z.string().min(1),signers:_zod.z.array(_zod.z.object({signerData:g})).min(0).max(1,"Invalid wallet signer configuration. Please contact support"),smartContractWalletAddress:s.optional()});exports.a = p; exports.b = c; exports.c = l; exports.d = g; exports.e = P;
@@ -1 +1 @@
1
- import{a as S}from"./chunk-H4CMXNVK.js";import{a as y}from"./chunk-64C66S6G.js";import{a as g}from"./chunk-AOL56PW7.js";import{a as p}from"./chunk-ADSI4245.js";import{a as v}from"./chunk-ATQ4WGCW.js";import{a as f}from"./chunk-YTCBXLXA.js";import{a as h}from"./chunk-UG47CBKR.js";import{a as C}from"./chunk-D4NDUT36.js";import{a as m}from"./chunk-PV2ZNROI.js";import{a as n,b as s}from"./chunk-IUGFPMB3.js";import{g as l,h as c}from"./chunk-YBHSEZMB.js";import{a as w}from"./chunk-KQ6FRWZY.js";import{d as i}from"./chunk-TSAUHOIU.js";import{a as o}from"./chunk-UPURFW46.js";import{stringify as A}from"viem";import{validateAPIKey as I}from"@crossmint/common-sdk-base";var P=class W{constructor(r,t,a,e=n){this.crossmintEnv=r;this.smartWalletService=t;this.errorProcessor=a;this.logger=e}static init({clientApiKey:r}){let t=I(r);if(!t.isValid)throw new Error("API key invalid");let a=new m(r),e=new w(s),d=new f(new h,new S(a.getPasskeyServerUrl(),r)),E=new p(`smart-wallet-${i}`),u=new g(a,new v(a,E),d,new y(e));return new W(t.environment,u,e)}async getOrCreateWallet(r,t,a={signer:{type:"PASSKEY"}}){if(!C())throw new o("Smart Wallet SDK should only be used client side.");return this.assertValidChain(t),await this.logger.logPerformance("GET_OR_CREATE_WALLET",async()=>{try{return await this.smartWalletService.getOrCreate(r,t,a)}catch(e){throw this.errorProcessor.map(e,new o(`Wallet creation failed: ${e.message}.`,A(e)))}})}assertValidChain(r){if(!this.validChain(r))throw new o(`The selected chain "${r}" is not available in "${this.crossmintEnv}". Either set a valid chain or check you're using an API key for the environment you're trying to target.`)}validChain(r){return this.crossmintEnv==="development"||this.crossmintEnv==="staging"?l(r):c(r)}};export{P as a};
1
+ import{a as S}from"./chunk-H4CMXNVK.js";import{a as y}from"./chunk-2JFDW6FB.js";import{a as g}from"./chunk-YH3MFIZQ.js";import{a as p}from"./chunk-I2QLGZFG.js";import{a as v}from"./chunk-ATQ4WGCW.js";import{a as f}from"./chunk-OBSM5E7E.js";import{a as h}from"./chunk-UG47CBKR.js";import{a as C}from"./chunk-D4NDUT36.js";import{a as m}from"./chunk-QNRRZIBE.js";import{a as n,b as s}from"./chunk-GPTN6IY5.js";import{g as l,h as c}from"./chunk-YBHSEZMB.js";import{a as w}from"./chunk-3S4DTJXJ.js";import{d as i}from"./chunk-YQJ4J6HH.js";import{a as o}from"./chunk-UPURFW46.js";import{stringify as A}from"viem";import{validateAPIKey as I}from"@crossmint/common-sdk-base";var P=class W{constructor(r,t,a,e=n){this.crossmintEnv=r;this.smartWalletService=t;this.errorProcessor=a;this.logger=e}static init({clientApiKey:r}){let t=I(r);if(!t.isValid)throw new Error("API key invalid");let a=new m(r),e=new w(s),d=new f(new h,new S(a.getPasskeyServerUrl(),r)),E=new p(`smart-wallet-${i}`),u=new g(a,new v(a,E),d,new y(e));return new W(t.environment,u,e)}async getOrCreateWallet(r,t,a={signer:{type:"PASSKEY"}}){if(!C())throw new o("Smart Wallet SDK should only be used client side.");return this.assertValidChain(t),await this.logger.logPerformance("GET_OR_CREATE_WALLET",async()=>{try{return await this.smartWalletService.getOrCreate(r,t,a)}catch(e){throw this.errorProcessor.map(e,new o(`Wallet creation failed: ${e.message}.`,A(e)))}})}assertValidChain(r){if(!this.validChain(r))throw new o(`The selected chain "${r}" is not available in "${this.crossmintEnv}". Either set a valid chain or check you're using an API key for the environment you're trying to target.`)}validChain(r){return this.crossmintEnv==="development"||this.crossmintEnv==="staging"?l(r):c(r)}};export{P as a};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6XIUO34Zcjs = require('./chunk-6XIUO34Z.cjs');var _viem = require('viem');var s=class{constructor(e){this.keyPrefix=e}set(e,t){localStorage.setItem(this.key(e),JSON.stringify(t))}get(e){let t=this.key(e),r=localStorage.getItem(t);if(r==null)return null;let a=_chunk6XIUO34Zcjs.e.safeParse(JSON.parse(r));return a.success?a.data:(localStorage.removeItem(t),null)}clear(){for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);t&&t.startsWith(this.keyPrefix)&&(localStorage.removeItem(t),e--)}}key(e){return`${this.keyPrefix}-${_viem.keccak256.call(void 0, _viem.toHex.call(void 0, e.jwt))}`}};exports.a = s;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIOQR3XSOcjs = require('./chunk-IOQR3XSO.cjs');var _viem = require('viem');var s=class{constructor(e){this.keyPrefix=e}set(e,t){localStorage.setItem(this.key(e),JSON.stringify(t))}get(e){let t=this.key(e),r=localStorage.getItem(t);if(r==null)return null;let a=_chunkIOQR3XSOcjs.e.safeParse(JSON.parse(r));return a.success?a.data:(localStorage.removeItem(t),null)}clear(){for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);t&&t.startsWith(this.keyPrefix)&&(localStorage.removeItem(t),e--)}}key(e){return`${this.keyPrefix}-${_viem.keccak256.call(void 0, _viem.toHex.call(void 0, e.jwt))}`}};exports.a = s;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTJUTD6N4cjs = require('./chunk-TJUTD6N4.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var s=new (0, _clientsdkbase.SDKLogger)(_chunkTJUTD6N4cjs.c),w= exports.b =new (0, _clientsdkbase.SDKLogger)(_chunkTJUTD6N4cjs.c,_clientsdkbase.getBrowserLogger.call(void 0, _chunkTJUTD6N4cjs.c,{onlyDatadog:!0}));exports.a = s; exports.b = w;
@@ -1,3 +1,3 @@
1
- import{c as i,d as s,f as n}from"./chunk-MMNHHCSK.js";import{b as a,h as t}from"./chunk-UPURFW46.js";var o=class{constructor(e,r){this.eoaStrategy=e;this.passkeyStrategy=r}get(e){if(s(e))return this.passkeyStrategy.create(e);if(n(e))return this.eoaStrategy.create(e);if(e.existing==null)throw new t(`Unsupported wallet params:
1
+ import{c as i,d as s,f as n}from"./chunk-ZROTX6WS.js";import{b as a,h as t}from"./chunk-UPURFW46.js";var o=class{constructor(e,r){this.eoaStrategy=e;this.passkeyStrategy=r}get(e){if(s(e))return this.passkeyStrategy.create(e);if(n(e))return this.eoaStrategy.create(e);if(e.existing==null)throw new t(`Unsupported wallet params:
2
2
  ${e.walletParams}`);let r=e.existing.signerConfig.display(),y=i(e.walletParams)?"passkey":"eoa";throw new a(`Cannot create wallet with ${y} signer for user ${e.user.id}', they already have a wallet with signer:
3
3
  '${JSON.stringify(r,null,2)}'`,r)}};export{o as a};
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-IUGFPMB3.js";import{e as l}from"./chunk-IORWPTP7.js";import{a as p,b as E}from"./chunk-PZ6Q22YJ.js";import{e as s}from"./chunk-TSAUHOIU.js";import{d as a,i as n,j as i}from"./chunk-UPURFW46.js";import{APIErrorService as A,BaseCrossmintService as R,CrossmintServiceError as f}from"@crossmint/client-sdk-base";import{blockchainToChainId as h}from"@crossmint/common-sdk-base";var c=class extends R{constructor(){super(...arguments);this.logger=m;this.apiErrorService=new A({ERROR_USER_WALLET_ALREADY_CREATED:({userId:r})=>new a(r),ERROR_ADMIN_SIGNER_ALREADY_USED:()=>new n,ERROR_PROJECT_NONCUSTODIAL_WALLETS_NOT_ENABLED:()=>new i})}async idempotentCreateSmartWallet(r,t){await this.fetchCrossmintAPI(`${s}/sdk/smart-wallet`,{method:"PUT",body:JSON.stringify(t)},"Error creating abstract wallet. Please contact support",r.jwt)}async sponsorUserOperation(r,t,o,e){let S=h(e),P=await this.fetchCrossmintAPI(`${s}/sdk/paymaster`,{method:"POST",body:JSON.stringify({userOp:p(t),entryPoint:o,chainId:S})},"Error sponsoring user operation. Please contact support",r.jwt);return E(P)}async getSmartWalletConfig(r,t){let o=await this.fetchCrossmintAPI(`${s}/sdk/smart-wallet/config?chain=${t}`,{method:"GET"},"Error getting smart wallet version configuration. Please contact support",r.jwt),e=l.safeParse(o);if(!e.success)throw new f(`Invalid smart wallet config, please contact support. Details below:
1
+ import{a as m}from"./chunk-GPTN6IY5.js";import{e as l}from"./chunk-RWM6VY26.js";import{a as p,b as E}from"./chunk-PZ6Q22YJ.js";import{e as s}from"./chunk-YQJ4J6HH.js";import{d as a,i as n,j as i}from"./chunk-UPURFW46.js";import{APIErrorService as A,BaseCrossmintService as R,CrossmintServiceError as f}from"@crossmint/client-sdk-base";import{blockchainToChainId as h}from"@crossmint/common-sdk-base";var c=class extends R{constructor(){super(...arguments);this.logger=m;this.apiErrorService=new A({ERROR_USER_WALLET_ALREADY_CREATED:({userId:r})=>new a(r),ERROR_ADMIN_SIGNER_ALREADY_USED:()=>new n,ERROR_PROJECT_NONCUSTODIAL_WALLETS_NOT_ENABLED:()=>new i})}async idempotentCreateSmartWallet(r,t){await this.fetchCrossmintAPI(`${s}/sdk/smart-wallet`,{method:"PUT",body:JSON.stringify(t)},"Error creating abstract wallet. Please contact support",r.jwt)}async sponsorUserOperation(r,t,o,e){let S=h(e),P=await this.fetchCrossmintAPI(`${s}/sdk/paymaster`,{method:"POST",body:JSON.stringify({userOp:p(t),entryPoint:o,chainId:S})},"Error sponsoring user operation. Please contact support",r.jwt);return E(P)}async getSmartWalletConfig(r,t){let o=await this.fetchCrossmintAPI(`${s}/sdk/smart-wallet/config?chain=${t}`,{method:"GET"},"Error getting smart wallet version configuration. Please contact support",r.jwt),e=l.safeParse(o);if(!e.success)throw new f(`Invalid smart wallet config, please contact support. Details below:
2
2
  ${e.error.toString()}`);return e.data}async fetchNFTs(r,t){return this.fetchCrossmintAPI(`v1-alpha1/wallets/${t}:${r}/nfts`,{method:"GET"},`Error fetching NFTs for wallet: ${r}`)}getPasskeyServerUrl(){return this.crossmintBaseUrl+"api/internal/passkeys"}};export{c as a};
@@ -1 +1 @@
1
- import{f as a,g as n}from"./chunk-TSAUHOIU.js";import{PasskeyValidatorContractVersion as o}from"@zerodev/passkey-validator";import{isAddress as i,isHex as d}from"viem";import{z as e}from"zod";var m=e.custom(t=>d(t),{message:"Invalid hex string"}),s=e.custom(t=>i(t),{message:"Invalid evm address"}),p=e.object({eoaAddress:s,type:e.literal("eoa")}),c=e.object({entryPoint:s,validatorAddress:s,pubKeyX:e.string(),pubKeyY:e.string(),authenticatorIdHash:m,authenticatorId:e.string()}),l=c.extend({passkeyName:e.string(),validatorContractVersion:e.nativeEnum(o),domain:e.string(),type:e.literal("passkeys")}),g=e.discriminatedUnion("type",[l,p]),h=e.object({kernelVersion:e.enum(a,{errorMap:(t,r)=>({message:`Unsupported kernel version. Supported versions: ${a.join(", ")}. Version used: ${r.data}. Please contact support`})}),entryPointVersion:e.enum(n,{errorMap:(t,r)=>({message:`Unsupported entry point version. Supported versions: ${n.join(", ")}. Version used: ${r.data}. Please contact support`})}),userId:e.string().min(1),signers:e.array(e.object({signerData:g})).min(0).max(1,"Invalid wallet signer configuration. Please contact support"),smartContractWalletAddress:s.optional()});export{p as a,c as b,l as c,g as d,h as e};
1
+ import{f as a,g as n}from"./chunk-YQJ4J6HH.js";import{PasskeyValidatorContractVersion as o}from"@zerodev/passkey-validator";import{isAddress as i,isHex as d}from"viem";import{z as e}from"zod";var m=e.custom(t=>d(t),{message:"Invalid hex string"}),s=e.custom(t=>i(t),{message:"Invalid evm address"}),p=e.object({eoaAddress:s,type:e.literal("eoa")}),c=e.object({entryPoint:s,validatorAddress:s,pubKeyX:e.string(),pubKeyY:e.string(),authenticatorIdHash:m,authenticatorId:e.string()}),l=c.extend({passkeyName:e.string(),validatorContractVersion:e.nativeEnum(o),domain:e.string(),type:e.literal("passkeys")}),g=e.discriminatedUnion("type",[l,p]),h=e.object({kernelVersion:e.enum(a,{errorMap:(t,r)=>({message:`Unsupported kernel version. Supported versions: ${a.join(", ")}. Version used: ${r.data}. Please contact support`})}),entryPointVersion:e.enum(n,{errorMap:(t,r)=>({message:`Unsupported entry point version. Supported versions: ${n.join(", ")}. Version used: ${r.data}. Please contact support`})}),userId:e.string().min(1),signers:e.array(e.object({signerData:g})).min(0).max(1,"Invalid wallet signer configuration. Please contact support"),smartContractWalletAddress:s.optional()});export{p as a,c as b,l as c,g as d,h as e};
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7FSJHX5Qcjs = require('./chunk-7FSJHX5Q.cjs');var _chunk6XIUO34Zcjs = require('./chunk-6XIUO34Z.cjs');var _chunkXQ2K2K23cjs = require('./chunk-XQ2K2K23.cjs');var _chunkTOVBSUWAcjs = require('./chunk-TOVBSUWA.cjs');var _chunkM4K3IZTTcjs = require('./chunk-M4K3IZTT.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var _commonsdkbase = require('@crossmint/common-sdk-base');var c=class extends _clientsdkbase.BaseCrossmintService{constructor(){super(...arguments);this.logger=_chunk7FSJHX5Qcjs.a;this.apiErrorService=new (0, _clientsdkbase.APIErrorService)({ERROR_USER_WALLET_ALREADY_CREATED:({userId:r})=>new (0, _chunkM4K3IZTTcjs.d)(r),ERROR_ADMIN_SIGNER_ALREADY_USED:()=>new _chunkM4K3IZTTcjs.i,ERROR_PROJECT_NONCUSTODIAL_WALLETS_NOT_ENABLED:()=>new _chunkM4K3IZTTcjs.j})}async idempotentCreateSmartWallet(r,t){await this.fetchCrossmintAPI(`${_chunkTOVBSUWAcjs.e}/sdk/smart-wallet`,{method:"PUT",body:JSON.stringify(t)},"Error creating abstract wallet. Please contact support",r.jwt)}async sponsorUserOperation(r,t,o,e){let S=_commonsdkbase.blockchainToChainId.call(void 0, e),P=await this.fetchCrossmintAPI(`${_chunkTOVBSUWAcjs.e}/sdk/paymaster`,{method:"POST",body:JSON.stringify({userOp:_chunkXQ2K2K23cjs.a.call(void 0, t),entryPoint:o,chainId:S})},"Error sponsoring user operation. Please contact support",r.jwt);return _chunkXQ2K2K23cjs.b.call(void 0, P)}async getSmartWalletConfig(r,t){let o=await this.fetchCrossmintAPI(`${_chunkTOVBSUWAcjs.e}/sdk/smart-wallet/config?chain=${t}`,{method:"GET"},"Error getting smart wallet version configuration. Please contact support",r.jwt),e=_chunk6XIUO34Zcjs.e.safeParse(o);if(!e.success)throw new (0, _clientsdkbase.CrossmintServiceError)(`Invalid smart wallet config, please contact support. Details below:
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNCEABZLKcjs = require('./chunk-NCEABZLK.cjs');var _chunkIOQR3XSOcjs = require('./chunk-IOQR3XSO.cjs');var _chunkXQ2K2K23cjs = require('./chunk-XQ2K2K23.cjs');var _chunkTJUTD6N4cjs = require('./chunk-TJUTD6N4.cjs');var _chunkM4K3IZTTcjs = require('./chunk-M4K3IZTT.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var _commonsdkbase = require('@crossmint/common-sdk-base');var c=class extends _clientsdkbase.BaseCrossmintService{constructor(){super(...arguments);this.logger=_chunkNCEABZLKcjs.a;this.apiErrorService=new (0, _clientsdkbase.APIErrorService)({ERROR_USER_WALLET_ALREADY_CREATED:({userId:r})=>new (0, _chunkM4K3IZTTcjs.d)(r),ERROR_ADMIN_SIGNER_ALREADY_USED:()=>new _chunkM4K3IZTTcjs.i,ERROR_PROJECT_NONCUSTODIAL_WALLETS_NOT_ENABLED:()=>new _chunkM4K3IZTTcjs.j})}async idempotentCreateSmartWallet(r,t){await this.fetchCrossmintAPI(`${_chunkTJUTD6N4cjs.e}/sdk/smart-wallet`,{method:"PUT",body:JSON.stringify(t)},"Error creating abstract wallet. Please contact support",r.jwt)}async sponsorUserOperation(r,t,o,e){let S=_commonsdkbase.blockchainToChainId.call(void 0, e),P=await this.fetchCrossmintAPI(`${_chunkTJUTD6N4cjs.e}/sdk/paymaster`,{method:"POST",body:JSON.stringify({userOp:_chunkXQ2K2K23cjs.a.call(void 0, t),entryPoint:o,chainId:S})},"Error sponsoring user operation. Please contact support",r.jwt);return _chunkXQ2K2K23cjs.b.call(void 0, P)}async getSmartWalletConfig(r,t){let o=await this.fetchCrossmintAPI(`${_chunkTJUTD6N4cjs.e}/sdk/smart-wallet/config?chain=${t}`,{method:"GET"},"Error getting smart wallet version configuration. Please contact support",r.jwt),e=_chunkIOQR3XSOcjs.e.safeParse(o);if(!e.success)throw new (0, _clientsdkbase.CrossmintServiceError)(`Invalid smart wallet config, please contact support. Details below:
2
2
  ${e.error.toString()}`);return e.data}async fetchNFTs(r,t){return this.fetchCrossmintAPI(`v1-alpha1/wallets/${t}:${r}/nfts`,{method:"GET"},`Error fetching NFTs for wallet: ${r}`)}getPasskeyServerUrl(){return this.crossmintBaseUrl+"api/internal/passkeys"}};exports.a = c;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var e="0.1.30";var n="ZeroDev",r= exports.b =0,d= exports.c ="SCW_SDK",c= exports.d =e,p= exports.e ="2024-06-09",a= exports.f =["0.3.1","0.3.0","0.2.4"],m= exports.g =["v0.6","v0.7"];exports.a = n; exports.b = r; exports.c = d; exports.d = c; exports.e = p; exports.f = a; exports.g = m;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var e="0.1.31";var n="ZeroDev",r= exports.b =0,d= exports.c ="SCW_SDK",c= exports.d =e,p= exports.e ="2024-06-09",a= exports.f =["0.3.1","0.3.0","0.2.4"],m= exports.g =["v0.6","v0.7"];exports.a = n; exports.b = r; exports.c = d; exports.d = c; exports.e = p; exports.f = a; exports.g = m;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWJ6XJMRDcjs = require('./chunk-WJ6XJMRD.cjs');var _chunk7FSJHX5Qcjs = require('./chunk-7FSJHX5Q.cjs');var _chunkM4K3IZTTcjs = require('./chunk-M4K3IZTT.cjs');var _viem = require('viem');var h=["sendTransaction","writeContract","sendUserOperation"],g=["signMessage","signTypedData"];function c(a){return h.includes(a)}function p(a){return g.includes(a)}var u=class{constructor(o,t=_chunk7FSJHX5Qcjs.a){this.errorProcessor=o;this.logger=t}decorate({crossmintChain:o,smartAccountClient:t}){return new Proxy(t,{get:(n,e,s)=>{let r=Reflect.get(n,e,s);return typeof r!="function"||typeof e!="string"||!(p(e)||c(e))?r:(...i)=>this.logger.logPerformance(`CrossmintSmartWallet.${e}`,()=>this.execute(n,e,r,i,o))}})}async execute(o,t,n,e,s){try{this.logger.log(`[CrossmintSmartWallet.${t}] - params: ${_viem.stringify.call(void 0, e)}`);let r=c(t)?this.processTxnArgs(t,s,e):e;return await n.call(o,...r)}catch(r){let i=c(t)?"signing":"sending transaction";throw this.errorProcessor.map(r,new (0, _chunkM4K3IZTTcjs.a)(`Error ${i}: ${r.message}`,_viem.stringify.call(void 0, r)))}}processTxnArgs(o,t,n){if(o==="sendUserOperation"){let[{userOperation:s,middleware:r,account:i}]=n;return[{middleware:r,account:i,userOperation:this.addGelatoBundlerProperties(t,s)},...n.slice(1)]}let[e]=n;return[this.addGelatoBundlerProperties(t,e),...n.slice(1)]}addGelatoBundlerProperties(o,t){return _chunkWJ6XJMRDcjs.a.call(void 0, o)?{...t,maxFeePerGas:"0x0",maxPriorityFeePerGas:"0x0"}:t}};exports.a = u;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWJ6XJMRDcjs = require('./chunk-WJ6XJMRD.cjs');var _chunkNCEABZLKcjs = require('./chunk-NCEABZLK.cjs');var _chunkM4K3IZTTcjs = require('./chunk-M4K3IZTT.cjs');var _viem = require('viem');var h=["sendTransaction","writeContract","sendUserOperation"],g=["signMessage","signTypedData"];function c(a){return h.includes(a)}function p(a){return g.includes(a)}var u=class{constructor(o,t=_chunkNCEABZLKcjs.a){this.errorProcessor=o;this.logger=t}decorate({crossmintChain:o,smartAccountClient:t}){return new Proxy(t,{get:(n,e,s)=>{let r=Reflect.get(n,e,s);return typeof r!="function"||typeof e!="string"||!(p(e)||c(e))?r:(...i)=>this.logger.logPerformance(`CrossmintSmartWallet.${e}`,()=>this.execute(n,e,r,i,o))}})}async execute(o,t,n,e,s){try{this.logger.log(`[CrossmintSmartWallet.${t}] - params: ${_viem.stringify.call(void 0, e)}`);let r=c(t)?this.processTxnArgs(t,s,e):e;return await n.call(o,...r)}catch(r){let i=c(t)?"signing":"sending transaction";throw this.errorProcessor.map(r,new (0, _chunkM4K3IZTTcjs.a)(`Error ${i}: ${r.message}`,_viem.stringify.call(void 0, r)))}}processTxnArgs(o,t,n){if(o==="sendUserOperation"){let[{userOperation:s,middleware:r,account:i}]=n;return[{middleware:r,account:i,userOperation:this.addGelatoBundlerProperties(t,s)},...n.slice(1)]}let[e]=n;return[this.addGelatoBundlerProperties(t,e),...n.slice(1)]}addGelatoBundlerProperties(o,t){return _chunkWJ6XJMRDcjs.a.call(void 0, o)?{...t,maxFeePerGas:"0x0",maxPriorityFeePerGas:"0x0"}:t}};exports.a = u;
@@ -1 +1 @@
1
- import{a as f,b as S}from"./chunk-NLGILHJS.js";import{a as d}from"./chunk-ETVJGLNY.js";import{i as C}from"./chunk-YBHSEZMB.js";import{b as y,c as u}from"./chunk-TZG6MROQ.js";import{a as m,b as p}from"./chunk-TSAUHOIU.js";import{ENTRYPOINT_ADDRESS_V06 as W,ENTRYPOINT_ADDRESS_V07 as A,createSmartAccountClient as E}from"permissionless";import{createPimlicoBundlerClient as h}from"permissionless/clients/pimlico";import{createPublicClient as D,http as P}from"viem";import{blockchainToChainId as R}from"@crossmint/common-sdk-base";var v=class{constructor(r,t,i,e){this.crossmintService=r;this.accountConfigService=t;this.accountCreator=i;this.clientDecorator=e}async getOrCreate(r,t,i){let{config:{entryPointVersion:e,kernelVersion:o,existing:n,userWithId:a},cached:g}=await this.accountConfigService.get(r,t),c=D({transport:P(y(t))}),{account:s,signerConfig:l}=await this.accountCreator.get({chain:t,walletParams:i,publicClient:c,user:a,entryPoint:e==="v0.6"?W:A,kernelVersion:o,existing:n});return n==null&&await this.crossmintService.idempotentCreateSmartWallet(r,{type:m,smartContractWalletAddress:s.address,signerData:l.data,version:p,baseLayer:"evm",chainId:R(t),entryPointVersion:e,kernelVersion:o}),g||this.accountConfigService.cache({entryPointVersion:e,kernelVersion:o,user:a,existing:{address:s.address,signerConfig:l}}),new d({wallet:this.smartAccountClient(t,s,r),public:c},t,this.crossmintService)}smartAccountClient(r,t,i){let e=P(u(r)),o={chain:C[r],entryPoint:t.entryPoint},n=h({...o,transport:e}),a=E({account:t,bundlerTransport:e,...o,...f(r)&&S({bundlerClient:n,entryPoint:t.entryPoint,chain:r,walletService:this.crossmintService,user:i})});return this.clientDecorator.decorate({crossmintChain:r,smartAccountClient:a})}};export{v as a};
1
+ import{a as f,b as S}from"./chunk-NLGILHJS.js";import{a as d}from"./chunk-ETVJGLNY.js";import{i as C}from"./chunk-YBHSEZMB.js";import{b as y,c as u}from"./chunk-TZG6MROQ.js";import{a as m,b as p}from"./chunk-YQJ4J6HH.js";import{ENTRYPOINT_ADDRESS_V06 as W,ENTRYPOINT_ADDRESS_V07 as A,createSmartAccountClient as E}from"permissionless";import{createPimlicoBundlerClient as h}from"permissionless/clients/pimlico";import{createPublicClient as D,http as P}from"viem";import{blockchainToChainId as R}from"@crossmint/common-sdk-base";var v=class{constructor(r,t,i,e){this.crossmintService=r;this.accountConfigService=t;this.accountCreator=i;this.clientDecorator=e}async getOrCreate(r,t,i){let{config:{entryPointVersion:e,kernelVersion:o,existing:n,userWithId:a},cached:g}=await this.accountConfigService.get(r,t),c=D({transport:P(y(t))}),{account:s,signerConfig:l}=await this.accountCreator.get({chain:t,walletParams:i,publicClient:c,user:a,entryPoint:e==="v0.6"?W:A,kernelVersion:o,existing:n});return n==null&&await this.crossmintService.idempotentCreateSmartWallet(r,{type:m,smartContractWalletAddress:s.address,signerData:l.data,version:p,baseLayer:"evm",chainId:R(t),entryPointVersion:e,kernelVersion:o}),g||this.accountConfigService.cache({entryPointVersion:e,kernelVersion:o,user:a,existing:{address:s.address,signerConfig:l}}),new d({wallet:this.smartAccountClient(t,s,r),public:c},t,this.crossmintService)}smartAccountClient(r,t,i){let e=P(u(r)),o={chain:C[r],entryPoint:t.entryPoint},n=h({...o,transport:e}),a=E({account:t,bundlerTransport:e,...o,...f(r)&&S({bundlerClient:n,entryPoint:t.entryPoint,chain:r,walletService:this.crossmintService,user:i})});return this.clientDecorator.decorate({crossmintChain:r,smartAccountClient:a})}};export{v as a};
@@ -1 +1 @@
1
- var e="0.1.30";var r="ZeroDev",d=0,c="SCW_SDK",p=e,a="2024-06-09",m=["0.3.1","0.3.0","0.2.4"],E=["v0.6","v0.7"];export{r as a,d as b,c,p as d,a as e,m as f,E as g};
1
+ var e="0.1.31";var r="ZeroDev",d=0,c="SCW_SDK",p=e,a="2024-06-09",m=["0.3.1","0.3.0","0.2.4"],E=["v0.6","v0.7"];export{r as a,d as b,c,p as d,a as e,m as f,E as g};
@@ -1 +1 @@
1
- import{f as n,g as r}from"./chunk-TSAUHOIU.js";function p(e){return n.includes(e)}function g(e){return r.includes(e)}function i(e){return"signer"in e&&"type"in e.signer&&e.signer.type==="PASSKEY"}function P(e){let t=e.existing==null||e.existing.signerConfig.type==="passkeys";return i(e.walletParams)&&t}function s(e){return"signer"in e&&("type"in e.signer&&e.signer.type==="VIEM_ACCOUNT"||"request"in e.signer&&typeof e.signer.request=="function")}function C(e){let t=e.existing==null||e.existing.signerConfig.type==="eoa";return s(e.walletParams)&&t}export{p as a,g as b,i as c,P as d,s as e,C as f};
1
+ import{f as n,g as r}from"./chunk-YQJ4J6HH.js";function p(e){return n.includes(e)}function g(e){return r.includes(e)}function i(e){return"signer"in e&&"type"in e.signer&&e.signer.type==="PASSKEY"}function P(e){let t=e.existing==null||e.existing.signerConfig.type==="passkeys";return i(e.walletParams)&&t}function s(e){return"signer"in e&&("type"in e.signer&&e.signer.type==="VIEM_ACCOUNT"||"request"in e.signer&&typeof e.signer.request=="function")}function C(e){let t=e.existing==null||e.existing.signerConfig.type==="eoa";return s(e.walletParams)&&t}export{p as a,g as b,i as c,P as d,s as e,C as f};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZPMEGEMGcjs = require('../chunk-ZPMEGEMG.cjs');require('../chunk-TOVBSUWA.cjs');require('../chunk-M4K3IZTT.cjs');exports.ErrorProcessor = _chunkZPMEGEMGcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7EN7XZPBcjs = require('../chunk-7EN7XZPB.cjs');require('../chunk-TJUTD6N4.cjs');require('../chunk-M4K3IZTT.cjs');exports.ErrorProcessor = _chunk7EN7XZPBcjs.a;
@@ -1 +1 @@
1
- import{a}from"../chunk-KQ6FRWZY.js";import"../chunk-TSAUHOIU.js";import"../chunk-UPURFW46.js";export{a as ErrorProcessor};
1
+ import{a}from"../chunk-3S4DTJXJ.js";import"../chunk-YQJ4J6HH.js";import"../chunk-UPURFW46.js";export{a as ErrorProcessor};
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGOIOZ4ZVcjs = require('./chunk-GOIOZ4ZV.cjs');require('./chunk-SCXFZMLR.cjs');require('./chunk-NZOH2NTL.cjs');require('./chunk-6ETXLX6A.cjs');require('./chunk-IQTGPM2U.cjs');require('./chunk-YWXTA4CU.cjs');require('./chunk-O2ACORII.cjs');require('./chunk-RSTUCDFV.cjs');require('./chunk-2R6HK64N.cjs');require('./chunk-GB35YMN4.cjs');require('./chunk-WJ6XJMRD.cjs');require('./chunk-STH2LE35.cjs');require('./chunk-XJGFG3RT.cjs');require('./chunk-DIDKPOO2.cjs');var _chunkSWWOVT47cjs = require('./chunk-SWWOVT47.cjs');var _chunk7AVDZZGDcjs = require('./chunk-7AVDZZGD.cjs');require('./chunk-WEXHROZ3.cjs');require('./chunk-GCJ76BZ2.cjs');require('./chunk-ODAUWGUU.cjs');require('./chunk-7FSJHX5Q.cjs');require('./chunk-6XIUO34Z.cjs');require('./chunk-XQ2K2K23.cjs');require('./chunk-2GS5TXEY.cjs');require('./chunk-7FXFOOQU.cjs');require('./chunk-KYPTGHC6.cjs');require('./chunk-ZPMEGEMG.cjs');require('./chunk-TOVBSUWA.cjs');var _chunkM4K3IZTTcjs = require('./chunk-M4K3IZTT.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var _clientsdkbase = require('@crossmint/client-sdk-base');exports.AdminAlreadyUsedError = _chunkM4K3IZTTcjs.i; exports.AdminMismatchError = _chunkM4K3IZTTcjs.b; exports.Chain = _commonsdkbase.EVMBlockchainIncludingTestnet; exports.ConfigError = _chunkM4K3IZTTcjs.h; exports.CrossmintSDKError = _clientsdkbase.CrossmintSDKError; exports.CrossmintServiceError = _clientsdkbase.CrossmintServiceError; exports.EVMSendTransactionError = _chunk7AVDZZGDcjs.a; exports.EVMSendTransactionExecutionRevertedError = _chunk7AVDZZGDcjs.b; exports.EVMSmartWallet = _chunkSWWOVT47cjs.a; exports.JWTDecryptionError = _clientsdkbase.JWTDecryptionError; exports.JWTExpiredError = _clientsdkbase.JWTExpiredError; exports.JWTIdentifierError = _clientsdkbase.JWTIdentifierError; exports.JWTInvalidError = _clientsdkbase.JWTInvalidError; exports.NotAuthorizedError = _clientsdkbase.NotAuthorizedError; exports.PasskeyIncompatibleAuthenticatorError = _chunkM4K3IZTTcjs.g; exports.PasskeyMismatchError = _chunkM4K3IZTTcjs.c; exports.PasskeyPromptError = _chunkM4K3IZTTcjs.e; exports.PasskeyRegistrationError = _chunkM4K3IZTTcjs.f; exports.SmartWalletError = _chunkM4K3IZTTcjs.a; exports.SmartWalletErrorCode = _clientsdkbase.SmartWalletErrorCode; exports.SmartWalletSDK = _chunkGOIOZ4ZVcjs.a; exports.SmartWalletsNotEnabledError = _chunkM4K3IZTTcjs.j; exports.UserWalletAlreadyCreatedError = _chunkM4K3IZTTcjs.d; exports.blockchainToChainId = _commonsdkbase.blockchainToChainId;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4JNKYPFMcjs = require('./chunk-4JNKYPFM.cjs');require('./chunk-SCXFZMLR.cjs');require('./chunk-WN3BESV4.cjs');require('./chunk-2ZFXHKSK.cjs');require('./chunk-IQTGPM2U.cjs');require('./chunk-MK3ZL667.cjs');require('./chunk-O2ACORII.cjs');require('./chunk-BY3CQ5TZ.cjs');require('./chunk-2R6HK64N.cjs');require('./chunk-GB35YMN4.cjs');require('./chunk-WJ6XJMRD.cjs');require('./chunk-STH2LE35.cjs');require('./chunk-XJGFG3RT.cjs');require('./chunk-DIDKPOO2.cjs');var _chunkSWWOVT47cjs = require('./chunk-SWWOVT47.cjs');var _chunk7AVDZZGDcjs = require('./chunk-7AVDZZGD.cjs');require('./chunk-5KWFKKDU.cjs');require('./chunk-S2TPVSDB.cjs');require('./chunk-ODAUWGUU.cjs');require('./chunk-NCEABZLK.cjs');require('./chunk-IOQR3XSO.cjs');require('./chunk-XQ2K2K23.cjs');require('./chunk-2GS5TXEY.cjs');require('./chunk-7FXFOOQU.cjs');require('./chunk-KYPTGHC6.cjs');require('./chunk-7EN7XZPB.cjs');require('./chunk-TJUTD6N4.cjs');var _chunkM4K3IZTTcjs = require('./chunk-M4K3IZTT.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var _clientsdkbase = require('@crossmint/client-sdk-base');exports.AdminAlreadyUsedError = _chunkM4K3IZTTcjs.i; exports.AdminMismatchError = _chunkM4K3IZTTcjs.b; exports.Chain = _commonsdkbase.EVMBlockchainIncludingTestnet; exports.ConfigError = _chunkM4K3IZTTcjs.h; exports.CrossmintSDKError = _clientsdkbase.CrossmintSDKError; exports.CrossmintServiceError = _clientsdkbase.CrossmintServiceError; exports.EVMSendTransactionError = _chunk7AVDZZGDcjs.a; exports.EVMSendTransactionExecutionRevertedError = _chunk7AVDZZGDcjs.b; exports.EVMSmartWallet = _chunkSWWOVT47cjs.a; exports.JWTDecryptionError = _clientsdkbase.JWTDecryptionError; exports.JWTExpiredError = _clientsdkbase.JWTExpiredError; exports.JWTIdentifierError = _clientsdkbase.JWTIdentifierError; exports.JWTInvalidError = _clientsdkbase.JWTInvalidError; exports.NotAuthorizedError = _clientsdkbase.NotAuthorizedError; exports.PasskeyIncompatibleAuthenticatorError = _chunkM4K3IZTTcjs.g; exports.PasskeyMismatchError = _chunkM4K3IZTTcjs.c; exports.PasskeyPromptError = _chunkM4K3IZTTcjs.e; exports.PasskeyRegistrationError = _chunkM4K3IZTTcjs.f; exports.SmartWalletError = _chunkM4K3IZTTcjs.a; exports.SmartWalletErrorCode = _clientsdkbase.SmartWalletErrorCode; exports.SmartWalletSDK = _chunk4JNKYPFMcjs.a; exports.SmartWalletsNotEnabledError = _chunkM4K3IZTTcjs.j; exports.UserWalletAlreadyCreatedError = _chunkM4K3IZTTcjs.d; exports.blockchainToChainId = _commonsdkbase.blockchainToChainId;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{a as T}from"./chunk-2LKIEBPA.js";import"./chunk-H4CMXNVK.js";import"./chunk-64C66S6G.js";import"./chunk-AOL56PW7.js";import"./chunk-NLGILHJS.js";import"./chunk-ADSI4245.js";import"./chunk-ATQ4WGCW.js";import"./chunk-YTCBXLXA.js";import"./chunk-UG47CBKR.js";import"./chunk-BJZQA5VC.js";import"./chunk-C3VZY7VJ.js";import"./chunk-D4NDUT36.js";import"./chunk-CUTQYF3F.js";import"./chunk-FHNNZVNU.js";import{a as c}from"./chunk-ETVJGLNY.js";import{a as E,b as p}from"./chunk-S2XBSAGM.js";import"./chunk-MMNHHCSK.js";import"./chunk-PV2ZNROI.js";import"./chunk-4SPA557P.js";import"./chunk-IUGFPMB3.js";import"./chunk-IORWPTP7.js";import"./chunk-PZ6Q22YJ.js";import"./chunk-YBHSEZMB.js";import"./chunk-TZG6MROQ.js";import"./chunk-3F6P4HUZ.js";import"./chunk-KQ6FRWZY.js";import"./chunk-TSAUHOIU.js";import{a as r,b as e,c as a,d as o,e as t,f as n,g as s,h as i,i as l,j as m}from"./chunk-UPURFW46.js";import{blockchainToChainId as h,EVMBlockchainIncludingTestnet as x}from"@crossmint/common-sdk-base";import{SmartWalletErrorCode as M,CrossmintSDKError as I,CrossmintServiceError as V,JWTDecryptionError as g,JWTExpiredError as u,JWTIdentifierError as b,JWTInvalidError as D,NotAuthorizedError as J}from"@crossmint/client-sdk-base";export{l as AdminAlreadyUsedError,e as AdminMismatchError,x as Chain,i as ConfigError,I as CrossmintSDKError,V as CrossmintServiceError,E as EVMSendTransactionError,p as EVMSendTransactionExecutionRevertedError,c as EVMSmartWallet,g as JWTDecryptionError,u as JWTExpiredError,b as JWTIdentifierError,D as JWTInvalidError,J as NotAuthorizedError,s as PasskeyIncompatibleAuthenticatorError,a as PasskeyMismatchError,t as PasskeyPromptError,n as PasskeyRegistrationError,r as SmartWalletError,M as SmartWalletErrorCode,T as SmartWalletSDK,m as SmartWalletsNotEnabledError,o as UserWalletAlreadyCreatedError,h as blockchainToChainId};
1
+ import{a as T}from"./chunk-JKRC2CSU.js";import"./chunk-H4CMXNVK.js";import"./chunk-2JFDW6FB.js";import"./chunk-YH3MFIZQ.js";import"./chunk-NLGILHJS.js";import"./chunk-I2QLGZFG.js";import"./chunk-ATQ4WGCW.js";import"./chunk-OBSM5E7E.js";import"./chunk-UG47CBKR.js";import"./chunk-BJZQA5VC.js";import"./chunk-C3VZY7VJ.js";import"./chunk-D4NDUT36.js";import"./chunk-CUTQYF3F.js";import"./chunk-FHNNZVNU.js";import{a as c}from"./chunk-ETVJGLNY.js";import{a as E,b as p}from"./chunk-S2XBSAGM.js";import"./chunk-ZROTX6WS.js";import"./chunk-QNRRZIBE.js";import"./chunk-4SPA557P.js";import"./chunk-GPTN6IY5.js";import"./chunk-RWM6VY26.js";import"./chunk-PZ6Q22YJ.js";import"./chunk-YBHSEZMB.js";import"./chunk-TZG6MROQ.js";import"./chunk-3F6P4HUZ.js";import"./chunk-3S4DTJXJ.js";import"./chunk-YQJ4J6HH.js";import{a as r,b as e,c as a,d as o,e as t,f as n,g as s,h as i,i as l,j as m}from"./chunk-UPURFW46.js";import{blockchainToChainId as h,EVMBlockchainIncludingTestnet as x}from"@crossmint/common-sdk-base";import{SmartWalletErrorCode as M,CrossmintSDKError as I,CrossmintServiceError as V,JWTDecryptionError as g,JWTExpiredError as u,JWTIdentifierError as b,JWTInvalidError as D,NotAuthorizedError as J}from"@crossmint/client-sdk-base";export{l as AdminAlreadyUsedError,e as AdminMismatchError,x as Chain,i as ConfigError,I as CrossmintSDKError,V as CrossmintServiceError,E as EVMSendTransactionError,p as EVMSendTransactionExecutionRevertedError,c as EVMSmartWallet,g as JWTDecryptionError,u as JWTExpiredError,b as JWTIdentifierError,D as JWTInvalidError,J as NotAuthorizedError,s as PasskeyIncompatibleAuthenticatorError,a as PasskeyMismatchError,t as PasskeyPromptError,n as PasskeyRegistrationError,r as SmartWalletError,M as SmartWalletErrorCode,T as SmartWalletSDK,m as SmartWalletsNotEnabledError,o as UserWalletAlreadyCreatedError,h as blockchainToChainId};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-ODAUWGUU.cjs');var _chunk7FSJHX5Qcjs = require('../chunk-7FSJHX5Q.cjs');require('../chunk-TOVBSUWA.cjs');exports.scwDatadogLogger = _chunk7FSJHX5Qcjs.b; exports.scwLogger = _chunk7FSJHX5Qcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-ODAUWGUU.cjs');var _chunkNCEABZLKcjs = require('../chunk-NCEABZLK.cjs');require('../chunk-TJUTD6N4.cjs');exports.scwDatadogLogger = _chunkNCEABZLKcjs.b; exports.scwLogger = _chunkNCEABZLKcjs.a;
@@ -1 +1 @@
1
- import"../chunk-4SPA557P.js";import{a,b}from"../chunk-IUGFPMB3.js";import"../chunk-TSAUHOIU.js";export{b as scwDatadogLogger,a as scwLogger};
1
+ import"../chunk-4SPA557P.js";import{a,b}from"../chunk-GPTN6IY5.js";import"../chunk-YQJ4J6HH.js";export{b as scwDatadogLogger,a as scwLogger};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7FSJHX5Qcjs = require('../chunk-7FSJHX5Q.cjs');require('../chunk-TOVBSUWA.cjs');exports.scwDatadogLogger = _chunk7FSJHX5Qcjs.b; exports.scwLogger = _chunk7FSJHX5Qcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNCEABZLKcjs = require('../chunk-NCEABZLK.cjs');require('../chunk-TJUTD6N4.cjs');exports.scwDatadogLogger = _chunkNCEABZLKcjs.b; exports.scwLogger = _chunkNCEABZLKcjs.a;
@@ -1 +1 @@
1
- import{a,b}from"../chunk-IUGFPMB3.js";import"../chunk-TSAUHOIU.js";export{b as scwDatadogLogger,a as scwLogger};
1
+ import{a,b}from"../chunk-GPTN6IY5.js";import"../chunk-YQJ4J6HH.js";export{b as scwDatadogLogger,a as scwLogger};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWEXHROZ3cjs = require('../chunk-WEXHROZ3.cjs');require('../chunk-TOVBSUWA.cjs');exports.isEOACreationContext = _chunkWEXHROZ3cjs.f; exports.isEOAWalletParams = _chunkWEXHROZ3cjs.e; exports.isPasskeyCreationContext = _chunkWEXHROZ3cjs.d; exports.isPasskeyWalletParams = _chunkWEXHROZ3cjs.c; exports.isSupportedEntryPointVersion = _chunkWEXHROZ3cjs.b; exports.isSupportedKernelVersion = _chunkWEXHROZ3cjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5KWFKKDUcjs = require('../chunk-5KWFKKDU.cjs');require('../chunk-TJUTD6N4.cjs');exports.isEOACreationContext = _chunk5KWFKKDUcjs.f; exports.isEOAWalletParams = _chunk5KWFKKDUcjs.e; exports.isPasskeyCreationContext = _chunk5KWFKKDUcjs.d; exports.isPasskeyWalletParams = _chunk5KWFKKDUcjs.c; exports.isSupportedEntryPointVersion = _chunk5KWFKKDUcjs.b; exports.isSupportedKernelVersion = _chunk5KWFKKDUcjs.a;
@@ -1 +1 @@
1
- import{a,b,c,d,e,f}from"../chunk-MMNHHCSK.js";import"../chunk-TSAUHOIU.js";export{f as isEOACreationContext,e as isEOAWalletParams,d as isPasskeyCreationContext,c as isPasskeyWalletParams,b as isSupportedEntryPointVersion,a as isSupportedKernelVersion};
1
+ import{a,b,c,d,e,f}from"../chunk-ZROTX6WS.js";import"../chunk-YQJ4J6HH.js";export{f as isEOACreationContext,e as isEOAWalletParams,d as isPasskeyCreationContext,c as isPasskeyWalletParams,b as isSupportedEntryPointVersion,a as isSupportedKernelVersion};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6XIUO34Zcjs = require('../chunk-6XIUO34Z.cjs');require('../chunk-TOVBSUWA.cjs');exports.EOASignerDataSchema = _chunk6XIUO34Zcjs.a; exports.PasskeySignerDataSchema = _chunk6XIUO34Zcjs.c; exports.PasskeyValidatorSerializedDataSchema = _chunk6XIUO34Zcjs.b; exports.SignerDataSchema = _chunk6XIUO34Zcjs.d; exports.SmartWalletConfigSchema = _chunk6XIUO34Zcjs.e;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIOQR3XSOcjs = require('../chunk-IOQR3XSO.cjs');require('../chunk-TJUTD6N4.cjs');exports.EOASignerDataSchema = _chunkIOQR3XSOcjs.a; exports.PasskeySignerDataSchema = _chunkIOQR3XSOcjs.c; exports.PasskeyValidatorSerializedDataSchema = _chunkIOQR3XSOcjs.b; exports.SignerDataSchema = _chunkIOQR3XSOcjs.d; exports.SmartWalletConfigSchema = _chunkIOQR3XSOcjs.e;
@@ -47,6 +47,7 @@ declare const PasskeySignerDataSchema: z.ZodObject<{
47
47
  }, "strip", z.ZodTypeAny, {
48
48
  type: "passkeys";
49
49
  entryPoint: `0x${string}`;
50
+ domain: string;
50
51
  validatorAddress: `0x${string}`;
51
52
  pubKeyX: string;
52
53
  pubKeyY: string;
@@ -54,10 +55,10 @@ declare const PasskeySignerDataSchema: z.ZodObject<{
54
55
  authenticatorId: string;
55
56
  passkeyName: string;
56
57
  validatorContractVersion: PasskeyValidatorContractVersion;
57
- domain: string;
58
58
  }, {
59
59
  type: "passkeys";
60
60
  entryPoint: `0x${string}`;
61
+ domain: string;
61
62
  validatorAddress: `0x${string}`;
62
63
  pubKeyX: string;
63
64
  pubKeyY: string;
@@ -65,7 +66,6 @@ declare const PasskeySignerDataSchema: z.ZodObject<{
65
66
  authenticatorId: string;
66
67
  passkeyName: string;
67
68
  validatorContractVersion: PasskeyValidatorContractVersion;
68
- domain: string;
69
69
  }>;
70
70
  declare const SignerDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
71
71
  entryPoint: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
@@ -81,6 +81,7 @@ declare const SignerDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
81
81
  }, "strip", z.ZodTypeAny, {
82
82
  type: "passkeys";
83
83
  entryPoint: `0x${string}`;
84
+ domain: string;
84
85
  validatorAddress: `0x${string}`;
85
86
  pubKeyX: string;
86
87
  pubKeyY: string;
@@ -88,10 +89,10 @@ declare const SignerDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
88
89
  authenticatorId: string;
89
90
  passkeyName: string;
90
91
  validatorContractVersion: PasskeyValidatorContractVersion;
91
- domain: string;
92
92
  }, {
93
93
  type: "passkeys";
94
94
  entryPoint: `0x${string}`;
95
+ domain: string;
95
96
  validatorAddress: `0x${string}`;
96
97
  pubKeyX: string;
97
98
  pubKeyY: string;
@@ -99,7 +100,6 @@ declare const SignerDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
99
100
  authenticatorId: string;
100
101
  passkeyName: string;
101
102
  validatorContractVersion: PasskeyValidatorContractVersion;
102
- domain: string;
103
103
  }>, z.ZodObject<{
104
104
  eoaAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
105
105
  type: z.ZodLiteral<"eoa">;
@@ -129,6 +129,7 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
129
129
  }, "strip", z.ZodTypeAny, {
130
130
  type: "passkeys";
131
131
  entryPoint: `0x${string}`;
132
+ domain: string;
132
133
  validatorAddress: `0x${string}`;
133
134
  pubKeyX: string;
134
135
  pubKeyY: string;
@@ -136,10 +137,10 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
136
137
  authenticatorId: string;
137
138
  passkeyName: string;
138
139
  validatorContractVersion: PasskeyValidatorContractVersion;
139
- domain: string;
140
140
  }, {
141
141
  type: "passkeys";
142
142
  entryPoint: `0x${string}`;
143
+ domain: string;
143
144
  validatorAddress: `0x${string}`;
144
145
  pubKeyX: string;
145
146
  pubKeyY: string;
@@ -147,7 +148,6 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
147
148
  authenticatorId: string;
148
149
  passkeyName: string;
149
150
  validatorContractVersion: PasskeyValidatorContractVersion;
150
- domain: string;
151
151
  }>, z.ZodObject<{
152
152
  eoaAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
153
153
  type: z.ZodLiteral<"eoa">;
@@ -160,8 +160,12 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
160
160
  }>]>;
161
161
  }, "strip", z.ZodTypeAny, {
162
162
  signerData: {
163
+ type: "eoa";
164
+ eoaAddress: `0x${string}`;
165
+ } | {
163
166
  type: "passkeys";
164
167
  entryPoint: `0x${string}`;
168
+ domain: string;
165
169
  validatorAddress: `0x${string}`;
166
170
  pubKeyX: string;
167
171
  pubKeyY: string;
@@ -169,15 +173,15 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
169
173
  authenticatorId: string;
170
174
  passkeyName: string;
171
175
  validatorContractVersion: PasskeyValidatorContractVersion;
172
- domain: string;
173
- } | {
174
- type: "eoa";
175
- eoaAddress: `0x${string}`;
176
176
  };
177
177
  }, {
178
178
  signerData: {
179
+ type: "eoa";
180
+ eoaAddress: `0x${string}`;
181
+ } | {
179
182
  type: "passkeys";
180
183
  entryPoint: `0x${string}`;
184
+ domain: string;
181
185
  validatorAddress: `0x${string}`;
182
186
  pubKeyX: string;
183
187
  pubKeyY: string;
@@ -185,21 +189,21 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
185
189
  authenticatorId: string;
186
190
  passkeyName: string;
187
191
  validatorContractVersion: PasskeyValidatorContractVersion;
188
- domain: string;
189
- } | {
190
- type: "eoa";
191
- eoaAddress: `0x${string}`;
192
192
  };
193
193
  }>, "many">;
194
194
  smartContractWalletAddress: z.ZodOptional<z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
195
195
  }, "strip", z.ZodTypeAny, {
196
- userId: string;
197
- kernelVersion: "0.3.1" | "0.3.0" | "0.2.4";
196
+ kernelVersion: "0.2.4" | "0.3.0" | "0.3.1";
198
197
  entryPointVersion: "v0.6" | "v0.7";
198
+ userId: string;
199
199
  signers: {
200
200
  signerData: {
201
+ type: "eoa";
202
+ eoaAddress: `0x${string}`;
203
+ } | {
201
204
  type: "passkeys";
202
205
  entryPoint: `0x${string}`;
206
+ domain: string;
203
207
  validatorAddress: `0x${string}`;
204
208
  pubKeyX: string;
205
209
  pubKeyY: string;
@@ -207,21 +211,21 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
207
211
  authenticatorId: string;
208
212
  passkeyName: string;
209
213
  validatorContractVersion: PasskeyValidatorContractVersion;
210
- domain: string;
211
- } | {
212
- type: "eoa";
213
- eoaAddress: `0x${string}`;
214
214
  };
215
215
  }[];
216
216
  smartContractWalletAddress?: `0x${string}` | undefined;
217
217
  }, {
218
- userId: string;
219
- kernelVersion: "0.3.1" | "0.3.0" | "0.2.4";
218
+ kernelVersion: "0.2.4" | "0.3.0" | "0.3.1";
220
219
  entryPointVersion: "v0.6" | "v0.7";
220
+ userId: string;
221
221
  signers: {
222
222
  signerData: {
223
+ type: "eoa";
224
+ eoaAddress: `0x${string}`;
225
+ } | {
223
226
  type: "passkeys";
224
227
  entryPoint: `0x${string}`;
228
+ domain: string;
225
229
  validatorAddress: `0x${string}`;
226
230
  pubKeyX: string;
227
231
  pubKeyY: string;
@@ -229,10 +233,6 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
229
233
  authenticatorId: string;
230
234
  passkeyName: string;
231
235
  validatorContractVersion: PasskeyValidatorContractVersion;
232
- domain: string;
233
- } | {
234
- type: "eoa";
235
- eoaAddress: `0x${string}`;
236
236
  };
237
237
  }[];
238
238
  smartContractWalletAddress?: `0x${string}` | undefined;
@@ -47,6 +47,7 @@ declare const PasskeySignerDataSchema: z.ZodObject<{
47
47
  }, "strip", z.ZodTypeAny, {
48
48
  type: "passkeys";
49
49
  entryPoint: `0x${string}`;
50
+ domain: string;
50
51
  validatorAddress: `0x${string}`;
51
52
  pubKeyX: string;
52
53
  pubKeyY: string;
@@ -54,10 +55,10 @@ declare const PasskeySignerDataSchema: z.ZodObject<{
54
55
  authenticatorId: string;
55
56
  passkeyName: string;
56
57
  validatorContractVersion: PasskeyValidatorContractVersion;
57
- domain: string;
58
58
  }, {
59
59
  type: "passkeys";
60
60
  entryPoint: `0x${string}`;
61
+ domain: string;
61
62
  validatorAddress: `0x${string}`;
62
63
  pubKeyX: string;
63
64
  pubKeyY: string;
@@ -65,7 +66,6 @@ declare const PasskeySignerDataSchema: z.ZodObject<{
65
66
  authenticatorId: string;
66
67
  passkeyName: string;
67
68
  validatorContractVersion: PasskeyValidatorContractVersion;
68
- domain: string;
69
69
  }>;
70
70
  declare const SignerDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
71
71
  entryPoint: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
@@ -81,6 +81,7 @@ declare const SignerDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
81
81
  }, "strip", z.ZodTypeAny, {
82
82
  type: "passkeys";
83
83
  entryPoint: `0x${string}`;
84
+ domain: string;
84
85
  validatorAddress: `0x${string}`;
85
86
  pubKeyX: string;
86
87
  pubKeyY: string;
@@ -88,10 +89,10 @@ declare const SignerDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
88
89
  authenticatorId: string;
89
90
  passkeyName: string;
90
91
  validatorContractVersion: PasskeyValidatorContractVersion;
91
- domain: string;
92
92
  }, {
93
93
  type: "passkeys";
94
94
  entryPoint: `0x${string}`;
95
+ domain: string;
95
96
  validatorAddress: `0x${string}`;
96
97
  pubKeyX: string;
97
98
  pubKeyY: string;
@@ -99,7 +100,6 @@ declare const SignerDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
99
100
  authenticatorId: string;
100
101
  passkeyName: string;
101
102
  validatorContractVersion: PasskeyValidatorContractVersion;
102
- domain: string;
103
103
  }>, z.ZodObject<{
104
104
  eoaAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
105
105
  type: z.ZodLiteral<"eoa">;
@@ -129,6 +129,7 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
129
129
  }, "strip", z.ZodTypeAny, {
130
130
  type: "passkeys";
131
131
  entryPoint: `0x${string}`;
132
+ domain: string;
132
133
  validatorAddress: `0x${string}`;
133
134
  pubKeyX: string;
134
135
  pubKeyY: string;
@@ -136,10 +137,10 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
136
137
  authenticatorId: string;
137
138
  passkeyName: string;
138
139
  validatorContractVersion: PasskeyValidatorContractVersion;
139
- domain: string;
140
140
  }, {
141
141
  type: "passkeys";
142
142
  entryPoint: `0x${string}`;
143
+ domain: string;
143
144
  validatorAddress: `0x${string}`;
144
145
  pubKeyX: string;
145
146
  pubKeyY: string;
@@ -147,7 +148,6 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
147
148
  authenticatorId: string;
148
149
  passkeyName: string;
149
150
  validatorContractVersion: PasskeyValidatorContractVersion;
150
- domain: string;
151
151
  }>, z.ZodObject<{
152
152
  eoaAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
153
153
  type: z.ZodLiteral<"eoa">;
@@ -160,8 +160,12 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
160
160
  }>]>;
161
161
  }, "strip", z.ZodTypeAny, {
162
162
  signerData: {
163
+ type: "eoa";
164
+ eoaAddress: `0x${string}`;
165
+ } | {
163
166
  type: "passkeys";
164
167
  entryPoint: `0x${string}`;
168
+ domain: string;
165
169
  validatorAddress: `0x${string}`;
166
170
  pubKeyX: string;
167
171
  pubKeyY: string;
@@ -169,15 +173,15 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
169
173
  authenticatorId: string;
170
174
  passkeyName: string;
171
175
  validatorContractVersion: PasskeyValidatorContractVersion;
172
- domain: string;
173
- } | {
174
- type: "eoa";
175
- eoaAddress: `0x${string}`;
176
176
  };
177
177
  }, {
178
178
  signerData: {
179
+ type: "eoa";
180
+ eoaAddress: `0x${string}`;
181
+ } | {
179
182
  type: "passkeys";
180
183
  entryPoint: `0x${string}`;
184
+ domain: string;
181
185
  validatorAddress: `0x${string}`;
182
186
  pubKeyX: string;
183
187
  pubKeyY: string;
@@ -185,21 +189,21 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
185
189
  authenticatorId: string;
186
190
  passkeyName: string;
187
191
  validatorContractVersion: PasskeyValidatorContractVersion;
188
- domain: string;
189
- } | {
190
- type: "eoa";
191
- eoaAddress: `0x${string}`;
192
192
  };
193
193
  }>, "many">;
194
194
  smartContractWalletAddress: z.ZodOptional<z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
195
195
  }, "strip", z.ZodTypeAny, {
196
- userId: string;
197
- kernelVersion: "0.3.1" | "0.3.0" | "0.2.4";
196
+ kernelVersion: "0.2.4" | "0.3.0" | "0.3.1";
198
197
  entryPointVersion: "v0.6" | "v0.7";
198
+ userId: string;
199
199
  signers: {
200
200
  signerData: {
201
+ type: "eoa";
202
+ eoaAddress: `0x${string}`;
203
+ } | {
201
204
  type: "passkeys";
202
205
  entryPoint: `0x${string}`;
206
+ domain: string;
203
207
  validatorAddress: `0x${string}`;
204
208
  pubKeyX: string;
205
209
  pubKeyY: string;
@@ -207,21 +211,21 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
207
211
  authenticatorId: string;
208
212
  passkeyName: string;
209
213
  validatorContractVersion: PasskeyValidatorContractVersion;
210
- domain: string;
211
- } | {
212
- type: "eoa";
213
- eoaAddress: `0x${string}`;
214
214
  };
215
215
  }[];
216
216
  smartContractWalletAddress?: `0x${string}` | undefined;
217
217
  }, {
218
- userId: string;
219
- kernelVersion: "0.3.1" | "0.3.0" | "0.2.4";
218
+ kernelVersion: "0.2.4" | "0.3.0" | "0.3.1";
220
219
  entryPointVersion: "v0.6" | "v0.7";
220
+ userId: string;
221
221
  signers: {
222
222
  signerData: {
223
+ type: "eoa";
224
+ eoaAddress: `0x${string}`;
225
+ } | {
223
226
  type: "passkeys";
224
227
  entryPoint: `0x${string}`;
228
+ domain: string;
225
229
  validatorAddress: `0x${string}`;
226
230
  pubKeyX: string;
227
231
  pubKeyY: string;
@@ -229,10 +233,6 @@ declare const SmartWalletConfigSchema: z.ZodObject<{
229
233
  authenticatorId: string;
230
234
  passkeyName: string;
231
235
  validatorContractVersion: PasskeyValidatorContractVersion;
232
- domain: string;
233
- } | {
234
- type: "eoa";
235
- eoaAddress: `0x${string}`;
236
236
  };
237
237
  }[];
238
238
  smartContractWalletAddress?: `0x${string}` | undefined;
@@ -1 +1 @@
1
- import{a,b,c,d,e}from"../chunk-IORWPTP7.js";import"../chunk-TSAUHOIU.js";export{a as EOASignerDataSchema,c as PasskeySignerDataSchema,b as PasskeyValidatorSerializedDataSchema,d as SignerDataSchema,e as SmartWalletConfigSchema};
1
+ import{a,b,c,d,e}from"../chunk-RWM6VY26.js";import"../chunk-YQJ4J6HH.js";export{a as EOASignerDataSchema,c as PasskeySignerDataSchema,b as PasskeyValidatorSerializedDataSchema,d as SignerDataSchema,e as SmartWalletConfigSchema};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTOVBSUWAcjs = require('../chunk-TOVBSUWA.cjs');exports.API_VERSION = _chunkTOVBSUWAcjs.e; exports.CURRENT_VERSION = _chunkTOVBSUWAcjs.b; exports.SCW_SERVICE = _chunkTOVBSUWAcjs.c; exports.SDK_VERSION = _chunkTOVBSUWAcjs.d; exports.SUPPORTED_ENTRYPOINT_VERSIONS = _chunkTOVBSUWAcjs.g; exports.SUPPORTED_KERNEL_VERSIONS = _chunkTOVBSUWAcjs.f; exports.ZERO_DEV_TYPE = _chunkTOVBSUWAcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTJUTD6N4cjs = require('../chunk-TJUTD6N4.cjs');exports.API_VERSION = _chunkTJUTD6N4cjs.e; exports.CURRENT_VERSION = _chunkTJUTD6N4cjs.b; exports.SCW_SERVICE = _chunkTJUTD6N4cjs.c; exports.SDK_VERSION = _chunkTJUTD6N4cjs.d; exports.SUPPORTED_ENTRYPOINT_VERSIONS = _chunkTJUTD6N4cjs.g; exports.SUPPORTED_KERNEL_VERSIONS = _chunkTJUTD6N4cjs.f; exports.ZERO_DEV_TYPE = _chunkTJUTD6N4cjs.a;
@@ -1 +1 @@
1
- import{a,b,c,d,e,f,g}from"../chunk-TSAUHOIU.js";export{e as API_VERSION,b as CURRENT_VERSION,c as SCW_SERVICE,d as SDK_VERSION,g as SUPPORTED_ENTRYPOINT_VERSIONS,f as SUPPORTED_KERNEL_VERSIONS,a as ZERO_DEV_TYPE};
1
+ import{a,b,c,d,e,f,g}from"../chunk-YQJ4J6HH.js";export{e as API_VERSION,b as CURRENT_VERSION,c as SCW_SERVICE,d as SDK_VERSION,g as SUPPORTED_ENTRYPOINT_VERSIONS,f as SUPPORTED_KERNEL_VERSIONS,a as ZERO_DEV_TYPE};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossmint/client-sdk-smart-wallet",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "repository": "https://github.com/Crossmint/crossmint-sdk",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Paella Labs Inc",
@@ -25,7 +25,7 @@
25
25
  "permissionless": "0.1.36",
26
26
  "viem": "2.17.5",
27
27
  "zod": "3.22.4",
28
- "@crossmint/client-sdk-base": "1.4.5",
28
+ "@crossmint/client-sdk-base": "1.4.6",
29
29
  "@crossmint/common-sdk-base": "0.3.1"
30
30
  },
31
31
  "devDependencies": {
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTOVBSUWAcjs = require('./chunk-TOVBSUWA.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var s=new (0, _clientsdkbase.SDKLogger)(_chunkTOVBSUWAcjs.c),w= exports.b =new (0, _clientsdkbase.SDKLogger)(_chunkTOVBSUWAcjs.c,_clientsdkbase.getBrowserLogger.call(void 0, _chunkTOVBSUWAcjs.c,{onlyDatadog:!0}));exports.a = s; exports.b = w;