@crossmint/client-sdk-smart-wallet 0.1.19 → 0.1.21

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 (201) hide show
  1. package/dist/SmartWalletSDK.cjs +1 -0
  2. package/dist/SmartWalletSDK.d.cts +47 -0
  3. package/dist/SmartWalletSDK.d.ts +47 -0
  4. package/dist/SmartWalletSDK.js +1 -0
  5. package/dist/api/CrossmintWalletService.cjs +1 -0
  6. package/dist/api/CrossmintWalletService.d.cts +31 -0
  7. package/dist/api/CrossmintWalletService.d.ts +31 -0
  8. package/dist/api/CrossmintWalletService.js +1 -0
  9. package/dist/blockchain/chains.cjs +1 -0
  10. package/dist/blockchain/chains.d.cts +36 -0
  11. package/dist/blockchain/chains.d.ts +36 -0
  12. package/dist/blockchain/chains.js +1 -0
  13. package/dist/blockchain/rpc.cjs +1 -0
  14. package/dist/blockchain/rpc.d.cts +9 -0
  15. package/dist/blockchain/rpc.d.ts +9 -0
  16. package/dist/blockchain/rpc.js +1 -0
  17. package/dist/blockchain/transfer.cjs +1 -0
  18. package/dist/blockchain/transfer.d.cts +23 -0
  19. package/dist/blockchain/transfer.d.ts +23 -0
  20. package/dist/blockchain/transfer.js +1 -0
  21. package/dist/blockchain/wallets/EVMSmartWallet.cjs +1 -0
  22. package/dist/blockchain/wallets/EVMSmartWallet.d.cts +102 -0
  23. package/dist/blockchain/wallets/EVMSmartWallet.d.ts +102 -0
  24. package/dist/blockchain/wallets/EVMSmartWallet.js +1 -0
  25. package/dist/blockchain/wallets/SendTransactionService.cjs +1 -0
  26. package/dist/blockchain/wallets/SendTransactionService.d.cts +84 -0
  27. package/dist/blockchain/wallets/SendTransactionService.d.ts +84 -0
  28. package/dist/blockchain/wallets/SendTransactionService.js +1 -0
  29. package/dist/blockchain/wallets/account/cache.cjs +1 -0
  30. package/dist/blockchain/wallets/account/cache.d.cts +25 -0
  31. package/dist/blockchain/wallets/account/cache.d.ts +25 -0
  32. package/dist/blockchain/wallets/account/cache.js +1 -0
  33. package/dist/blockchain/wallets/account/config.cjs +1 -0
  34. package/dist/blockchain/wallets/account/config.d.cts +47 -0
  35. package/dist/blockchain/wallets/account/config.d.ts +47 -0
  36. package/dist/blockchain/wallets/account/config.js +1 -0
  37. package/dist/blockchain/wallets/account/creator.cjs +1 -0
  38. package/dist/blockchain/wallets/account/creator.d.cts +26 -0
  39. package/dist/blockchain/wallets/account/creator.d.ts +26 -0
  40. package/dist/blockchain/wallets/account/creator.js +1 -0
  41. package/dist/blockchain/wallets/account/eoa.cjs +1 -0
  42. package/dist/blockchain/wallets/account/eoa.d.cts +21 -0
  43. package/dist/blockchain/wallets/account/eoa.d.ts +21 -0
  44. package/dist/blockchain/wallets/account/eoa.js +1 -0
  45. package/dist/blockchain/wallets/account/passkey.cjs +1 -0
  46. package/dist/blockchain/wallets/account/passkey.d.cts +29 -0
  47. package/dist/blockchain/wallets/account/passkey.d.ts +29 -0
  48. package/dist/blockchain/wallets/account/passkey.js +1 -0
  49. package/dist/blockchain/wallets/account/signer.cjs +1 -0
  50. package/dist/blockchain/wallets/account/signer.d.cts +14 -0
  51. package/dist/blockchain/wallets/account/signer.d.ts +14 -0
  52. package/dist/blockchain/wallets/account/signer.js +1 -0
  53. package/dist/blockchain/wallets/account/strategy.cjs +1 -0
  54. package/dist/blockchain/wallets/account/strategy.d.cts +20 -0
  55. package/dist/blockchain/wallets/account/strategy.d.ts +20 -0
  56. package/dist/blockchain/wallets/account/strategy.js +0 -0
  57. package/dist/blockchain/wallets/clientDecorator.cjs +1 -0
  58. package/dist/blockchain/wallets/clientDecorator.d.cts +38 -0
  59. package/dist/blockchain/wallets/clientDecorator.d.ts +38 -0
  60. package/dist/blockchain/wallets/clientDecorator.js +1 -0
  61. package/dist/blockchain/wallets/index.cjs +1 -0
  62. package/dist/blockchain/wallets/index.d.cts +20 -0
  63. package/dist/blockchain/wallets/index.d.ts +20 -0
  64. package/dist/blockchain/wallets/index.js +1 -0
  65. package/dist/blockchain/wallets/paymaster.cjs +1 -0
  66. package/dist/blockchain/wallets/paymaster.d.cts +29 -0
  67. package/dist/blockchain/wallets/paymaster.d.ts +29 -0
  68. package/dist/blockchain/wallets/paymaster.js +1 -0
  69. package/dist/blockchain/wallets/service.cjs +1 -0
  70. package/dist/blockchain/wallets/service.d.cts +41 -0
  71. package/dist/blockchain/wallets/service.d.ts +41 -0
  72. package/dist/blockchain/wallets/service.js +1 -0
  73. package/dist/chunk-27US7ZBX.js +1 -0
  74. package/dist/chunk-2GS5TXEY.cjs +1 -0
  75. package/dist/chunk-2R6HK64N.cjs +1 -0
  76. package/dist/chunk-3F6P4HUZ.js +1 -0
  77. package/dist/chunk-4SPA557P.js +0 -0
  78. package/dist/chunk-5M3MSPHK.cjs +1 -0
  79. package/dist/chunk-6DE5YEO5.cjs +1 -0
  80. package/dist/chunk-7AVDZZGD.cjs +1 -0
  81. package/dist/chunk-7FXFOOQU.cjs +1 -0
  82. package/dist/chunk-7JAT6GQU.js +1 -0
  83. package/dist/chunk-ATQ4WGCW.js +1 -0
  84. package/dist/chunk-B3LJJZXD.cjs +2 -0
  85. package/dist/chunk-BJZQA5VC.js +1 -0
  86. package/dist/chunk-BXXREMNR.cjs +1 -0
  87. package/dist/chunk-C3VZY7VJ.js +1 -0
  88. package/dist/chunk-CPYNP4XI.js +1 -0
  89. package/dist/chunk-CUTQYF3F.js +1 -0
  90. package/dist/chunk-D4NDUT36.js +1 -0
  91. package/dist/chunk-DIDKPOO2.cjs +1 -0
  92. package/dist/chunk-ETVJGLNY.js +1 -0
  93. package/dist/chunk-FHNNZVNU.js +1 -0
  94. package/dist/chunk-FIJ3CBJ4.js +3 -0
  95. package/dist/chunk-G57LROTD.js +1 -0
  96. package/dist/chunk-GB35YMN4.cjs +1 -0
  97. package/dist/chunk-H4CMXNVK.js +1 -0
  98. package/dist/chunk-IQTGPM2U.cjs +1 -0
  99. package/dist/chunk-KYPTGHC6.cjs +1 -0
  100. package/dist/chunk-LMVY4C4Y.js +1 -0
  101. package/dist/chunk-M4K3IZTT.cjs +1 -0
  102. package/dist/chunk-NLGILHJS.js +1 -0
  103. package/dist/chunk-O2ACORII.cjs +1 -0
  104. package/dist/chunk-OCJYX5QF.cjs +1 -0
  105. package/dist/chunk-ODAUWGUU.cjs +1 -0
  106. package/dist/chunk-PBUJXVQT.js +1 -0
  107. package/dist/chunk-PLRQBDYS.cjs +1 -0
  108. package/dist/chunk-PPTSNCSQ.cjs +1 -0
  109. package/dist/chunk-PZ6Q22YJ.js +1 -0
  110. package/dist/chunk-Q44P7MO7.cjs +1 -0
  111. package/dist/chunk-QVB3HE6Q.js +2 -0
  112. package/dist/chunk-S2XBSAGM.js +1 -0
  113. package/dist/chunk-SCXFZMLR.cjs +1 -0
  114. package/dist/chunk-STH2LE35.cjs +1 -0
  115. package/dist/chunk-SWWOVT47.cjs +1 -0
  116. package/dist/chunk-TZG6MROQ.js +1 -0
  117. package/dist/chunk-UG47CBKR.js +1 -0
  118. package/dist/chunk-UPURFW46.js +1 -0
  119. package/dist/chunk-WDM7PN4O.js +1 -0
  120. package/dist/chunk-WJ6XJMRD.cjs +1 -0
  121. package/dist/chunk-WTPE2I2Q.cjs +1 -0
  122. package/dist/chunk-XHSA4YTO.cjs +3 -0
  123. package/dist/chunk-XJGFG3RT.cjs +1 -0
  124. package/dist/chunk-XP6ESWVJ.js +1 -0
  125. package/dist/chunk-XQ2K2K23.cjs +1 -0
  126. package/dist/chunk-YBHSEZMB.js +1 -0
  127. package/dist/chunk-YZQJV2KA.cjs +1 -0
  128. package/dist/chunk-Z22H3MJS.js +1 -0
  129. package/dist/error/index.cjs +1 -0
  130. package/dist/error/index.d.cts +58 -0
  131. package/dist/error/index.d.ts +58 -0
  132. package/dist/error/index.js +1 -0
  133. package/dist/error/processor.cjs +1 -0
  134. package/dist/error/processor.d.cts +25 -0
  135. package/dist/error/processor.d.ts +25 -0
  136. package/dist/error/processor.js +1 -0
  137. package/dist/index.cjs +1 -5
  138. package/dist/index.d.cts +20 -559
  139. package/dist/index.d.ts +20 -559
  140. package/dist/index.js +1 -5
  141. package/dist/service-DqYCir8s.d.ts +103 -0
  142. package/dist/service-Ir-Qho-9.d.cts +103 -0
  143. package/dist/services/index.cjs +1 -0
  144. package/dist/services/index.d.cts +2 -0
  145. package/dist/services/index.d.ts +2 -0
  146. package/dist/services/index.js +1 -0
  147. package/dist/services/logger.cjs +1 -0
  148. package/dist/services/logger.d.cts +6 -0
  149. package/dist/services/logger.d.ts +6 -0
  150. package/dist/services/logger.js +1 -0
  151. package/dist/types/internal.cjs +1 -0
  152. package/dist/types/internal.d.cts +14 -0
  153. package/dist/types/internal.d.ts +14 -0
  154. package/dist/types/internal.js +1 -0
  155. package/dist/types/params.cjs +1 -0
  156. package/dist/types/params.d.cts +33 -0
  157. package/dist/types/params.d.ts +33 -0
  158. package/dist/types/params.js +0 -0
  159. package/dist/types/schema.cjs +1 -0
  160. package/dist/types/schema.d.cts +241 -0
  161. package/dist/types/schema.d.ts +241 -0
  162. package/dist/types/schema.js +1 -0
  163. package/dist/types/service.cjs +1 -0
  164. package/dist/types/service.d.cts +14 -0
  165. package/dist/types/service.d.ts +14 -0
  166. package/dist/types/service.js +0 -0
  167. package/dist/types/token.cjs +1 -0
  168. package/dist/types/token.d.cts +35 -0
  169. package/dist/types/token.d.ts +35 -0
  170. package/dist/types/token.js +0 -0
  171. package/dist/utils/api.cjs +1 -0
  172. package/dist/utils/api.d.cts +4 -0
  173. package/dist/utils/api.d.ts +4 -0
  174. package/dist/utils/api.js +1 -0
  175. package/dist/utils/blockchain.cjs +1 -0
  176. package/dist/utils/blockchain.d.cts +7 -0
  177. package/dist/utils/blockchain.d.ts +7 -0
  178. package/dist/utils/blockchain.js +1 -0
  179. package/dist/utils/constants.cjs +1 -0
  180. package/dist/utils/constants.d.cts +9 -0
  181. package/dist/utils/constants.d.ts +9 -0
  182. package/dist/utils/constants.js +1 -0
  183. package/dist/utils/environment.cjs +1 -0
  184. package/dist/utils/environment.d.cts +3 -0
  185. package/dist/utils/environment.d.ts +3 -0
  186. package/dist/utils/environment.js +1 -0
  187. package/dist/utils/helpers.cjs +1 -0
  188. package/dist/utils/helpers.d.cts +4 -0
  189. package/dist/utils/helpers.d.ts +4 -0
  190. package/dist/utils/helpers.js +1 -0
  191. package/dist/utils/signer.cjs +1 -0
  192. package/dist/utils/signer.d.cts +15 -0
  193. package/dist/utils/signer.d.ts +15 -0
  194. package/dist/utils/signer.js +1 -0
  195. package/dist/utils/test.cjs +1 -0
  196. package/dist/utils/test.d.cts +18 -0
  197. package/dist/utils/test.d.ts +18 -0
  198. package/dist/utils/test.js +1 -0
  199. package/package.json +4 -5
  200. package/dist/index.cjs.map +0 -1
  201. package/dist/index.js.map +0 -1
@@ -0,0 +1,103 @@
1
+ import { z } from 'zod';
2
+ import { KernelSmartAccount } from '@zerodev/sdk';
3
+ import { SmartAccountClient } from 'permissionless';
4
+ import { SmartAccount } from 'permissionless/accounts';
5
+ import { EntryPoint } from 'permissionless/types/entrypoint';
6
+ import { Address, PublicClient, HttpTransport, Chain } from 'viem';
7
+ import { SmartWalletChain } from './blockchain/chains.js';
8
+ import { EOASignerDataSchema, PasskeyValidatorSerializedDataSchema, PasskeySignerDataSchema, SmartWalletConfigSchema, SignerDataSchema } from './types/schema.js';
9
+ import { SUPPORTED_KERNEL_VERSIONS, SUPPORTED_ENTRYPOINT_VERSIONS } from './utils/constants.js';
10
+ import { UserParams, WalletParams, PasskeySigner, ExternalSigner } from './types/params.js';
11
+
12
+ interface SignerConfig {
13
+ readonly type: "passkeys" | "eoa";
14
+ display(): SignerDisplay;
15
+ readonly data: SignerData;
16
+ }
17
+ declare class PasskeySignerConfig implements SignerConfig {
18
+ readonly data: PasskeySignerData;
19
+ readonly type = "passkeys";
20
+ constructor(data: PasskeySignerData);
21
+ display(): PasskeyDisplay;
22
+ }
23
+ declare class EOASignerConfig implements SignerConfig {
24
+ readonly data: EOASignerData;
25
+ readonly type = "eoa";
26
+ constructor(data: EOASignerData);
27
+ display(): {
28
+ type: "eoa";
29
+ eoaAddress: `0x${string}`;
30
+ };
31
+ }
32
+
33
+ type SupportedKernelVersion = (typeof SUPPORTED_KERNEL_VERSIONS)[number];
34
+ declare function isSupportedKernelVersion(version: string): version is SupportedKernelVersion;
35
+ type SupportedEntryPointVersion = (typeof SUPPORTED_ENTRYPOINT_VERSIONS)[number];
36
+ declare function isSupportedEntryPointVersion(version: string): version is SupportedEntryPointVersion;
37
+ interface PreExistingWalletProperties {
38
+ signerConfig: SignerConfig;
39
+ address: Address;
40
+ }
41
+ interface WalletCreationContext {
42
+ user: UserParams & {
43
+ id: string;
44
+ };
45
+ chain: SmartWalletChain;
46
+ publicClient: PublicClient<HttpTransport>;
47
+ walletParams: WalletParams;
48
+ entryPoint: EntryPoint;
49
+ kernelVersion: SupportedKernelVersion;
50
+ existing?: PreExistingWalletProperties;
51
+ }
52
+ interface PasskeyCreationContext extends WalletCreationContext {
53
+ walletParams: WalletParams & {
54
+ signer: PasskeySigner;
55
+ };
56
+ existing?: {
57
+ signerConfig: PasskeySignerConfig;
58
+ address: Address;
59
+ };
60
+ }
61
+ interface EOACreationContext extends WalletCreationContext {
62
+ walletParams: WalletParams & {
63
+ signer: ExternalSigner;
64
+ };
65
+ existing?: {
66
+ signerConfig: EOASignerConfig;
67
+ address: Address;
68
+ };
69
+ }
70
+ declare function isPasskeyWalletParams(params: WalletParams): params is WalletParams & {
71
+ signer: PasskeySigner;
72
+ };
73
+ declare function isPasskeyCreationContext(params: WalletCreationContext): params is PasskeyCreationContext;
74
+ declare function isEOAWalletParams(params: WalletParams): params is WalletParams & {
75
+ signer: ExternalSigner;
76
+ };
77
+ declare function isEOACreationContext(params: WalletCreationContext): params is EOACreationContext;
78
+ interface AccountAndSigner {
79
+ account: KernelSmartAccount<EntryPoint, HttpTransport>;
80
+ signerConfig: SignerConfig;
81
+ }
82
+ type SmartWalletClient = SmartAccountClient<EntryPoint, HttpTransport, Chain, SmartAccount<EntryPoint>>;
83
+
84
+ type EOASignerData = z.infer<typeof EOASignerDataSchema>;
85
+ type PasskeyValidatorSerializedData = z.infer<typeof PasskeyValidatorSerializedDataSchema>;
86
+ type PasskeySignerData = z.infer<typeof PasskeySignerDataSchema>;
87
+ type SmartWalletConfig = z.infer<typeof SmartWalletConfigSchema>;
88
+ type SignerData = z.infer<typeof SignerDataSchema>;
89
+ type PasskeyDisplay = Pick<PasskeySignerData, "type" | "passkeyName" | "pubKeyX" | "pubKeyY">;
90
+ type SignerDisplay = EOASignerData | PasskeyDisplay;
91
+ type StoreSmartWalletParams = {
92
+ type: string;
93
+ smartContractWalletAddress: string;
94
+ signerData: SignerData;
95
+ sessionKeySignerAddress?: string;
96
+ version: number;
97
+ baseLayer: string;
98
+ chainId: number;
99
+ entryPointVersion: SupportedEntryPointVersion;
100
+ kernelVersion: SupportedKernelVersion;
101
+ };
102
+
103
+ export { type AccountAndSigner as A, type EOACreationContext as E, type PasskeyDisplay as P, type SmartWalletConfig as S, type WalletCreationContext as W, type SignerDisplay as a, type SupportedEntryPointVersion as b, type SupportedKernelVersion as c, type PreExistingWalletProperties as d, type StoreSmartWalletParams as e, type PasskeyCreationContext as f, type SmartWalletClient as g, type SignerConfig as h, PasskeySignerConfig as i, EOASignerConfig as j, isSupportedKernelVersion as k, isSupportedEntryPointVersion as l, isPasskeyWalletParams as m, isPasskeyCreationContext as n, isEOAWalletParams as o, isEOACreationContext as p, type EOASignerData as q, type PasskeyValidatorSerializedData as r, type PasskeySignerData as s, type SignerData as t };
@@ -0,0 +1,103 @@
1
+ import { z } from 'zod';
2
+ import { KernelSmartAccount } from '@zerodev/sdk';
3
+ import { SmartAccountClient } from 'permissionless';
4
+ import { SmartAccount } from 'permissionless/accounts';
5
+ import { EntryPoint } from 'permissionless/types/entrypoint';
6
+ import { Address, PublicClient, HttpTransport, Chain } from 'viem';
7
+ import { SmartWalletChain } from './blockchain/chains.cjs';
8
+ import { EOASignerDataSchema, PasskeyValidatorSerializedDataSchema, PasskeySignerDataSchema, SmartWalletConfigSchema, SignerDataSchema } from './types/schema.cjs';
9
+ import { SUPPORTED_KERNEL_VERSIONS, SUPPORTED_ENTRYPOINT_VERSIONS } from './utils/constants.cjs';
10
+ import { UserParams, WalletParams, PasskeySigner, ExternalSigner } from './types/params.cjs';
11
+
12
+ interface SignerConfig {
13
+ readonly type: "passkeys" | "eoa";
14
+ display(): SignerDisplay;
15
+ readonly data: SignerData;
16
+ }
17
+ declare class PasskeySignerConfig implements SignerConfig {
18
+ readonly data: PasskeySignerData;
19
+ readonly type = "passkeys";
20
+ constructor(data: PasskeySignerData);
21
+ display(): PasskeyDisplay;
22
+ }
23
+ declare class EOASignerConfig implements SignerConfig {
24
+ readonly data: EOASignerData;
25
+ readonly type = "eoa";
26
+ constructor(data: EOASignerData);
27
+ display(): {
28
+ type: "eoa";
29
+ eoaAddress: `0x${string}`;
30
+ };
31
+ }
32
+
33
+ type SupportedKernelVersion = (typeof SUPPORTED_KERNEL_VERSIONS)[number];
34
+ declare function isSupportedKernelVersion(version: string): version is SupportedKernelVersion;
35
+ type SupportedEntryPointVersion = (typeof SUPPORTED_ENTRYPOINT_VERSIONS)[number];
36
+ declare function isSupportedEntryPointVersion(version: string): version is SupportedEntryPointVersion;
37
+ interface PreExistingWalletProperties {
38
+ signerConfig: SignerConfig;
39
+ address: Address;
40
+ }
41
+ interface WalletCreationContext {
42
+ user: UserParams & {
43
+ id: string;
44
+ };
45
+ chain: SmartWalletChain;
46
+ publicClient: PublicClient<HttpTransport>;
47
+ walletParams: WalletParams;
48
+ entryPoint: EntryPoint;
49
+ kernelVersion: SupportedKernelVersion;
50
+ existing?: PreExistingWalletProperties;
51
+ }
52
+ interface PasskeyCreationContext extends WalletCreationContext {
53
+ walletParams: WalletParams & {
54
+ signer: PasskeySigner;
55
+ };
56
+ existing?: {
57
+ signerConfig: PasskeySignerConfig;
58
+ address: Address;
59
+ };
60
+ }
61
+ interface EOACreationContext extends WalletCreationContext {
62
+ walletParams: WalletParams & {
63
+ signer: ExternalSigner;
64
+ };
65
+ existing?: {
66
+ signerConfig: EOASignerConfig;
67
+ address: Address;
68
+ };
69
+ }
70
+ declare function isPasskeyWalletParams(params: WalletParams): params is WalletParams & {
71
+ signer: PasskeySigner;
72
+ };
73
+ declare function isPasskeyCreationContext(params: WalletCreationContext): params is PasskeyCreationContext;
74
+ declare function isEOAWalletParams(params: WalletParams): params is WalletParams & {
75
+ signer: ExternalSigner;
76
+ };
77
+ declare function isEOACreationContext(params: WalletCreationContext): params is EOACreationContext;
78
+ interface AccountAndSigner {
79
+ account: KernelSmartAccount<EntryPoint, HttpTransport>;
80
+ signerConfig: SignerConfig;
81
+ }
82
+ type SmartWalletClient = SmartAccountClient<EntryPoint, HttpTransport, Chain, SmartAccount<EntryPoint>>;
83
+
84
+ type EOASignerData = z.infer<typeof EOASignerDataSchema>;
85
+ type PasskeyValidatorSerializedData = z.infer<typeof PasskeyValidatorSerializedDataSchema>;
86
+ type PasskeySignerData = z.infer<typeof PasskeySignerDataSchema>;
87
+ type SmartWalletConfig = z.infer<typeof SmartWalletConfigSchema>;
88
+ type SignerData = z.infer<typeof SignerDataSchema>;
89
+ type PasskeyDisplay = Pick<PasskeySignerData, "type" | "passkeyName" | "pubKeyX" | "pubKeyY">;
90
+ type SignerDisplay = EOASignerData | PasskeyDisplay;
91
+ type StoreSmartWalletParams = {
92
+ type: string;
93
+ smartContractWalletAddress: string;
94
+ signerData: SignerData;
95
+ sessionKeySignerAddress?: string;
96
+ version: number;
97
+ baseLayer: string;
98
+ chainId: number;
99
+ entryPointVersion: SupportedEntryPointVersion;
100
+ kernelVersion: SupportedKernelVersion;
101
+ };
102
+
103
+ export { type AccountAndSigner as A, type EOACreationContext as E, type PasskeyDisplay as P, type SmartWalletConfig as S, type WalletCreationContext as W, type SignerDisplay as a, type SupportedEntryPointVersion as b, type SupportedKernelVersion as c, type PreExistingWalletProperties as d, type StoreSmartWalletParams as e, type PasskeyCreationContext as f, type SmartWalletClient as g, type SignerConfig as h, PasskeySignerConfig as i, EOASignerConfig as j, isSupportedKernelVersion as k, isSupportedEntryPointVersion as l, isPasskeyWalletParams as m, isPasskeyCreationContext as n, isEOAWalletParams as o, isEOACreationContext as p, type EOASignerData as q, type PasskeyValidatorSerializedData as r, type PasskeySignerData as s, type SignerData as t };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-ODAUWGUU.cjs');var _chunkPLRQBDYScjs = require('../chunk-PLRQBDYS.cjs');require('../chunk-5M3MSPHK.cjs');exports.scwDatadogLogger = _chunkPLRQBDYScjs.b; exports.scwLogger = _chunkPLRQBDYScjs.a;
@@ -0,0 +1,2 @@
1
+ export { scwDatadogLogger, scwLogger } from './logger.cjs';
2
+ import '@crossmint/client-sdk-base';
@@ -0,0 +1,2 @@
1
+ export { scwDatadogLogger, scwLogger } from './logger.js';
2
+ import '@crossmint/client-sdk-base';
@@ -0,0 +1 @@
1
+ import"../chunk-4SPA557P.js";import{a,b}from"../chunk-Z22H3MJS.js";import"../chunk-WDM7PN4O.js";export{b as scwDatadogLogger,a as scwLogger};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkPLRQBDYScjs = require('../chunk-PLRQBDYS.cjs');require('../chunk-5M3MSPHK.cjs');exports.scwDatadogLogger = _chunkPLRQBDYScjs.b; exports.scwLogger = _chunkPLRQBDYScjs.a;
@@ -0,0 +1,6 @@
1
+ import { SDKLogger } from '@crossmint/client-sdk-base';
2
+
3
+ declare const scwLogger: SDKLogger;
4
+ declare const scwDatadogLogger: SDKLogger;
5
+
6
+ export { scwDatadogLogger, scwLogger };
@@ -0,0 +1,6 @@
1
+ import { SDKLogger } from '@crossmint/client-sdk-base';
2
+
3
+ declare const scwLogger: SDKLogger;
4
+ declare const scwDatadogLogger: SDKLogger;
5
+
6
+ export { scwDatadogLogger, scwLogger };
@@ -0,0 +1 @@
1
+ import{a,b}from"../chunk-Z22H3MJS.js";import"../chunk-WDM7PN4O.js";export{b as scwDatadogLogger,a as scwLogger};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6DE5YEO5cjs = require('../chunk-6DE5YEO5.cjs');require('../chunk-5M3MSPHK.cjs');exports.isEOACreationContext = _chunk6DE5YEO5cjs.f; exports.isEOAWalletParams = _chunk6DE5YEO5cjs.e; exports.isPasskeyCreationContext = _chunk6DE5YEO5cjs.d; exports.isPasskeyWalletParams = _chunk6DE5YEO5cjs.c; exports.isSupportedEntryPointVersion = _chunk6DE5YEO5cjs.b; exports.isSupportedKernelVersion = _chunk6DE5YEO5cjs.a;
@@ -0,0 +1,14 @@
1
+ import '@zerodev/sdk';
2
+ import 'permissionless';
3
+ import 'permissionless/accounts';
4
+ import 'permissionless/types/entrypoint';
5
+ import 'viem';
6
+ import '../blockchain/chains.cjs';
7
+ export { A as AccountAndSigner, E as EOACreationContext, f as PasskeyCreationContext, d as PreExistingWalletProperties, g as SmartWalletClient, b as SupportedEntryPointVersion, c as SupportedKernelVersion, W as WalletCreationContext, p as isEOACreationContext, o as isEOAWalletParams, n as isPasskeyCreationContext, m as isPasskeyWalletParams, l as isSupportedEntryPointVersion, k as isSupportedKernelVersion } from '../service-Ir-Qho-9.cjs';
8
+ import '../utils/constants.cjs';
9
+ import './params.cjs';
10
+ import 'viem/chains';
11
+ import '@crossmint/common-sdk-base';
12
+ import 'zod';
13
+ import './schema.cjs';
14
+ import '@zerodev/passkey-validator';
@@ -0,0 +1,14 @@
1
+ import '@zerodev/sdk';
2
+ import 'permissionless';
3
+ import 'permissionless/accounts';
4
+ import 'permissionless/types/entrypoint';
5
+ import 'viem';
6
+ import '../blockchain/chains.js';
7
+ export { A as AccountAndSigner, E as EOACreationContext, f as PasskeyCreationContext, d as PreExistingWalletProperties, g as SmartWalletClient, b as SupportedEntryPointVersion, c as SupportedKernelVersion, W as WalletCreationContext, p as isEOACreationContext, o as isEOAWalletParams, n as isPasskeyCreationContext, m as isPasskeyWalletParams, l as isSupportedEntryPointVersion, k as isSupportedKernelVersion } from '../service-DqYCir8s.js';
8
+ import '../utils/constants.js';
9
+ import './params.js';
10
+ import 'viem/chains';
11
+ import '@crossmint/common-sdk-base';
12
+ import 'zod';
13
+ import './schema.js';
14
+ import '@zerodev/passkey-validator';
@@ -0,0 +1 @@
1
+ import{a,b,c,d,e,f}from"../chunk-XP6ESWVJ.js";import"../chunk-WDM7PN4O.js";export{f as isEOACreationContext,e as isEOAWalletParams,d as isPasskeyCreationContext,c as isPasskeyWalletParams,b as isSupportedEntryPointVersion,a as isSupportedKernelVersion};
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,33 @@
1
+ import { LocalAccount, EIP1193Provider } from 'viem';
2
+
3
+ type SmartWalletSDKInitParams = {
4
+ clientApiKey: string;
5
+ };
6
+ type UserParams = {
7
+ jwt: string;
8
+ };
9
+ type ViemAccount = {
10
+ type: "VIEM_ACCOUNT";
11
+ account: LocalAccount & {
12
+ source: "custom";
13
+ };
14
+ };
15
+ type PasskeySigner = {
16
+ type: "PASSKEY";
17
+ /**
18
+ * Displayed to the user during passkey registration or signing prompts.
19
+ * If not provided, a default name identifier within the JWT
20
+ * that is specified in the project settings (typically `sub`) will be used.
21
+ */
22
+ passkeyName?: string;
23
+ onPrePasskeyRegistration?: () => Promise<void> | void;
24
+ onPasskeyRegistrationError?: (error: unknown) => Promise<void>;
25
+ onFirstTimePasskeySigning?: () => Promise<void> | void;
26
+ onFirstTimePasskeySigningError?: (error: unknown) => Promise<void>;
27
+ };
28
+ type ExternalSigner = EIP1193Provider | ViemAccount;
29
+ interface WalletParams {
30
+ signer: ExternalSigner | PasskeySigner;
31
+ }
32
+
33
+ export type { ExternalSigner, PasskeySigner, SmartWalletSDKInitParams, UserParams, ViemAccount, WalletParams };
@@ -0,0 +1,33 @@
1
+ import { LocalAccount, EIP1193Provider } from 'viem';
2
+
3
+ type SmartWalletSDKInitParams = {
4
+ clientApiKey: string;
5
+ };
6
+ type UserParams = {
7
+ jwt: string;
8
+ };
9
+ type ViemAccount = {
10
+ type: "VIEM_ACCOUNT";
11
+ account: LocalAccount & {
12
+ source: "custom";
13
+ };
14
+ };
15
+ type PasskeySigner = {
16
+ type: "PASSKEY";
17
+ /**
18
+ * Displayed to the user during passkey registration or signing prompts.
19
+ * If not provided, a default name identifier within the JWT
20
+ * that is specified in the project settings (typically `sub`) will be used.
21
+ */
22
+ passkeyName?: string;
23
+ onPrePasskeyRegistration?: () => Promise<void> | void;
24
+ onPasskeyRegistrationError?: (error: unknown) => Promise<void>;
25
+ onFirstTimePasskeySigning?: () => Promise<void> | void;
26
+ onFirstTimePasskeySigningError?: (error: unknown) => Promise<void>;
27
+ };
28
+ type ExternalSigner = EIP1193Provider | ViemAccount;
29
+ interface WalletParams {
30
+ signer: ExternalSigner | PasskeySigner;
31
+ }
32
+
33
+ export type { ExternalSigner, PasskeySigner, SmartWalletSDKInitParams, UserParams, ViemAccount, WalletParams };
File without changes
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBXXREMNRcjs = require('../chunk-BXXREMNR.cjs');require('../chunk-5M3MSPHK.cjs');exports.EOASignerDataSchema = _chunkBXXREMNRcjs.a; exports.PasskeySignerDataSchema = _chunkBXXREMNRcjs.c; exports.PasskeyValidatorSerializedDataSchema = _chunkBXXREMNRcjs.b; exports.SignerDataSchema = _chunkBXXREMNRcjs.d; exports.SmartWalletConfigSchema = _chunkBXXREMNRcjs.e;
@@ -0,0 +1,241 @@
1
+ import { PasskeyValidatorContractVersion } from '@zerodev/passkey-validator';
2
+ import { z } from 'zod';
3
+
4
+ declare const EOASignerDataSchema: z.ZodObject<{
5
+ eoaAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
6
+ type: z.ZodLiteral<"eoa">;
7
+ }, "strip", z.ZodTypeAny, {
8
+ type: "eoa";
9
+ eoaAddress: `0x${string}`;
10
+ }, {
11
+ type: "eoa";
12
+ eoaAddress: `0x${string}`;
13
+ }>;
14
+ declare const PasskeyValidatorSerializedDataSchema: z.ZodObject<{
15
+ entryPoint: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
16
+ validatorAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
17
+ pubKeyX: z.ZodString;
18
+ pubKeyY: z.ZodString;
19
+ authenticatorIdHash: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
20
+ authenticatorId: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ entryPoint: `0x${string}`;
23
+ validatorAddress: `0x${string}`;
24
+ pubKeyX: string;
25
+ pubKeyY: string;
26
+ authenticatorIdHash: `0x${string}`;
27
+ authenticatorId: string;
28
+ }, {
29
+ entryPoint: `0x${string}`;
30
+ validatorAddress: `0x${string}`;
31
+ pubKeyX: string;
32
+ pubKeyY: string;
33
+ authenticatorIdHash: `0x${string}`;
34
+ authenticatorId: string;
35
+ }>;
36
+ declare const PasskeySignerDataSchema: z.ZodObject<{
37
+ entryPoint: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
38
+ validatorAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
39
+ pubKeyX: z.ZodString;
40
+ pubKeyY: z.ZodString;
41
+ authenticatorIdHash: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
42
+ authenticatorId: z.ZodString;
43
+ passkeyName: z.ZodString;
44
+ validatorContractVersion: z.ZodNativeEnum<typeof PasskeyValidatorContractVersion>;
45
+ domain: z.ZodString;
46
+ type: z.ZodLiteral<"passkeys">;
47
+ }, "strip", z.ZodTypeAny, {
48
+ type: "passkeys";
49
+ entryPoint: `0x${string}`;
50
+ domain: string;
51
+ validatorAddress: `0x${string}`;
52
+ pubKeyX: string;
53
+ pubKeyY: string;
54
+ authenticatorIdHash: `0x${string}`;
55
+ authenticatorId: string;
56
+ passkeyName: string;
57
+ validatorContractVersion: PasskeyValidatorContractVersion;
58
+ }, {
59
+ type: "passkeys";
60
+ entryPoint: `0x${string}`;
61
+ domain: string;
62
+ validatorAddress: `0x${string}`;
63
+ pubKeyX: string;
64
+ pubKeyY: string;
65
+ authenticatorIdHash: `0x${string}`;
66
+ authenticatorId: string;
67
+ passkeyName: string;
68
+ validatorContractVersion: PasskeyValidatorContractVersion;
69
+ }>;
70
+ declare const SignerDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
71
+ entryPoint: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
72
+ validatorAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
73
+ pubKeyX: z.ZodString;
74
+ pubKeyY: z.ZodString;
75
+ authenticatorIdHash: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
76
+ authenticatorId: z.ZodString;
77
+ passkeyName: z.ZodString;
78
+ validatorContractVersion: z.ZodNativeEnum<typeof PasskeyValidatorContractVersion>;
79
+ domain: z.ZodString;
80
+ type: z.ZodLiteral<"passkeys">;
81
+ }, "strip", z.ZodTypeAny, {
82
+ type: "passkeys";
83
+ entryPoint: `0x${string}`;
84
+ domain: string;
85
+ validatorAddress: `0x${string}`;
86
+ pubKeyX: string;
87
+ pubKeyY: string;
88
+ authenticatorIdHash: `0x${string}`;
89
+ authenticatorId: string;
90
+ passkeyName: string;
91
+ validatorContractVersion: PasskeyValidatorContractVersion;
92
+ }, {
93
+ type: "passkeys";
94
+ entryPoint: `0x${string}`;
95
+ domain: string;
96
+ validatorAddress: `0x${string}`;
97
+ pubKeyX: string;
98
+ pubKeyY: string;
99
+ authenticatorIdHash: `0x${string}`;
100
+ authenticatorId: string;
101
+ passkeyName: string;
102
+ validatorContractVersion: PasskeyValidatorContractVersion;
103
+ }>, z.ZodObject<{
104
+ eoaAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
105
+ type: z.ZodLiteral<"eoa">;
106
+ }, "strip", z.ZodTypeAny, {
107
+ type: "eoa";
108
+ eoaAddress: `0x${string}`;
109
+ }, {
110
+ type: "eoa";
111
+ eoaAddress: `0x${string}`;
112
+ }>]>;
113
+ declare const SmartWalletConfigSchema: z.ZodObject<{
114
+ kernelVersion: z.ZodEnum<["0.3.1", "0.3.0", "0.2.4"]>;
115
+ entryPointVersion: z.ZodEnum<["v0.6", "v0.7"]>;
116
+ userId: z.ZodString;
117
+ signers: z.ZodArray<z.ZodObject<{
118
+ signerData: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
119
+ entryPoint: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
120
+ validatorAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
121
+ pubKeyX: z.ZodString;
122
+ pubKeyY: z.ZodString;
123
+ authenticatorIdHash: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
124
+ authenticatorId: z.ZodString;
125
+ passkeyName: z.ZodString;
126
+ validatorContractVersion: z.ZodNativeEnum<typeof PasskeyValidatorContractVersion>;
127
+ domain: z.ZodString;
128
+ type: z.ZodLiteral<"passkeys">;
129
+ }, "strip", z.ZodTypeAny, {
130
+ type: "passkeys";
131
+ entryPoint: `0x${string}`;
132
+ domain: string;
133
+ validatorAddress: `0x${string}`;
134
+ pubKeyX: string;
135
+ pubKeyY: string;
136
+ authenticatorIdHash: `0x${string}`;
137
+ authenticatorId: string;
138
+ passkeyName: string;
139
+ validatorContractVersion: PasskeyValidatorContractVersion;
140
+ }, {
141
+ type: "passkeys";
142
+ entryPoint: `0x${string}`;
143
+ domain: string;
144
+ validatorAddress: `0x${string}`;
145
+ pubKeyX: string;
146
+ pubKeyY: string;
147
+ authenticatorIdHash: `0x${string}`;
148
+ authenticatorId: string;
149
+ passkeyName: string;
150
+ validatorContractVersion: PasskeyValidatorContractVersion;
151
+ }>, z.ZodObject<{
152
+ eoaAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
153
+ type: z.ZodLiteral<"eoa">;
154
+ }, "strip", z.ZodTypeAny, {
155
+ type: "eoa";
156
+ eoaAddress: `0x${string}`;
157
+ }, {
158
+ type: "eoa";
159
+ eoaAddress: `0x${string}`;
160
+ }>]>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ signerData: {
163
+ type: "eoa";
164
+ eoaAddress: `0x${string}`;
165
+ } | {
166
+ type: "passkeys";
167
+ entryPoint: `0x${string}`;
168
+ domain: string;
169
+ validatorAddress: `0x${string}`;
170
+ pubKeyX: string;
171
+ pubKeyY: string;
172
+ authenticatorIdHash: `0x${string}`;
173
+ authenticatorId: string;
174
+ passkeyName: string;
175
+ validatorContractVersion: PasskeyValidatorContractVersion;
176
+ };
177
+ }, {
178
+ signerData: {
179
+ type: "eoa";
180
+ eoaAddress: `0x${string}`;
181
+ } | {
182
+ type: "passkeys";
183
+ entryPoint: `0x${string}`;
184
+ domain: string;
185
+ validatorAddress: `0x${string}`;
186
+ pubKeyX: string;
187
+ pubKeyY: string;
188
+ authenticatorIdHash: `0x${string}`;
189
+ authenticatorId: string;
190
+ passkeyName: string;
191
+ validatorContractVersion: PasskeyValidatorContractVersion;
192
+ };
193
+ }>, "many">;
194
+ smartContractWalletAddress: z.ZodOptional<z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
195
+ }, "strip", z.ZodTypeAny, {
196
+ kernelVersion: "0.2.4" | "0.3.0" | "0.3.1";
197
+ entryPointVersion: "v0.6" | "v0.7";
198
+ userId: string;
199
+ signers: {
200
+ signerData: {
201
+ type: "eoa";
202
+ eoaAddress: `0x${string}`;
203
+ } | {
204
+ type: "passkeys";
205
+ entryPoint: `0x${string}`;
206
+ domain: string;
207
+ validatorAddress: `0x${string}`;
208
+ pubKeyX: string;
209
+ pubKeyY: string;
210
+ authenticatorIdHash: `0x${string}`;
211
+ authenticatorId: string;
212
+ passkeyName: string;
213
+ validatorContractVersion: PasskeyValidatorContractVersion;
214
+ };
215
+ }[];
216
+ smartContractWalletAddress?: `0x${string}` | undefined;
217
+ }, {
218
+ kernelVersion: "0.2.4" | "0.3.0" | "0.3.1";
219
+ entryPointVersion: "v0.6" | "v0.7";
220
+ userId: string;
221
+ signers: {
222
+ signerData: {
223
+ type: "eoa";
224
+ eoaAddress: `0x${string}`;
225
+ } | {
226
+ type: "passkeys";
227
+ entryPoint: `0x${string}`;
228
+ domain: string;
229
+ validatorAddress: `0x${string}`;
230
+ pubKeyX: string;
231
+ pubKeyY: string;
232
+ authenticatorIdHash: `0x${string}`;
233
+ authenticatorId: string;
234
+ passkeyName: string;
235
+ validatorContractVersion: PasskeyValidatorContractVersion;
236
+ };
237
+ }[];
238
+ smartContractWalletAddress?: `0x${string}` | undefined;
239
+ }>;
240
+
241
+ export { EOASignerDataSchema, PasskeySignerDataSchema, PasskeyValidatorSerializedDataSchema, SignerDataSchema, SmartWalletConfigSchema };