@crossmint/wallets-sdk 1.0.14 → 1.0.15

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 (176) hide show
  1. package/dist/api/__tests__/constants.d.cts +1 -1
  2. package/dist/api/__tests__/constants.d.ts +1 -1
  3. package/dist/api/__tests__/test-utils.cjs +1 -1
  4. package/dist/api/__tests__/test-utils.d.cts +1 -1
  5. package/dist/api/__tests__/test-utils.d.ts +1 -1
  6. package/dist/api/__tests__/test-utils.js +1 -1
  7. package/dist/api/client.cjs +1 -1
  8. package/dist/api/client.d.cts +1 -1
  9. package/dist/api/client.d.ts +1 -1
  10. package/dist/api/client.js +1 -1
  11. package/dist/api/gen/index.cjs +1 -1
  12. package/dist/api/gen/index.js +1 -1
  13. package/dist/api/gen/sdk.gen.d.cts +1 -1
  14. package/dist/api/gen/sdk.gen.d.ts +1 -1
  15. package/dist/api/gen/types.gen.d.cts +295 -5
  16. package/dist/api/gen/types.gen.d.ts +295 -5
  17. package/dist/api/index.cjs +1 -1
  18. package/dist/api/index.d.cts +1 -1
  19. package/dist/api/index.d.ts +1 -1
  20. package/dist/api/index.js +1 -1
  21. package/dist/api/types.d.cts +1 -1
  22. package/dist/api/types.d.ts +1 -1
  23. package/dist/chains/chains.cjs +1 -1
  24. package/dist/chains/chains.js +1 -1
  25. package/dist/chunk-2W2B225C.js +1 -0
  26. package/dist/{chunk-QWHQ5NAY.js → chunk-3N2BHSMW.js} +1 -1
  27. package/dist/{chunk-EFK26RL5.cjs → chunk-4XSIN3T2.cjs} +1 -1
  28. package/dist/{chunk-7EZQOS37.cjs → chunk-5DC3XWQQ.cjs} +1 -1
  29. package/dist/chunk-6E6H6VGD.js +1 -0
  30. package/dist/chunk-6YTCZIBX.js +1 -0
  31. package/dist/{chunk-LEIODNM5.js → chunk-BFCNGLFS.js} +1 -1
  32. package/dist/{chunk-QLHOHXVZ.cjs → chunk-EAHN2I4F.cjs} +1 -1
  33. package/dist/{chunk-QMSW23Z6.js → chunk-EASVVFAM.js} +1 -1
  34. package/dist/{chunk-SWXDKYWM.js → chunk-EKMCOM5W.js} +1 -1
  35. package/dist/{chunk-KEEHHSIZ.cjs → chunk-EXPPKQFE.cjs} +1 -1
  36. package/dist/{chunk-RUD4GDRD.cjs → chunk-F6FVWFUV.cjs} +1 -1
  37. package/dist/{chunk-BS55OS3S.js → chunk-FIMDIIR7.js} +1 -1
  38. package/dist/chunk-GRSBILWF.js +1 -0
  39. package/dist/{chunk-CF5YIHZX.cjs → chunk-HKHLMNN2.cjs} +1 -1
  40. package/dist/chunk-J7GVRM5E.cjs +3 -0
  41. package/dist/{chunk-4NYZ24DW.js → chunk-JUVCT33M.js} +1 -1
  42. package/dist/{chunk-CU332MNQ.js → chunk-L6JLRSM5.js} +1 -1
  43. package/dist/{chunk-HFQTOJEG.cjs → chunk-MQ7C5IHY.cjs} +1 -1
  44. package/dist/chunk-NL3YSWSD.cjs +1 -0
  45. package/dist/{chunk-VVLFMWTS.js → chunk-OEP5YPON.js} +1 -1
  46. package/dist/{chunk-XKKIMGTA.cjs → chunk-QYASJT55.cjs} +1 -1
  47. package/dist/{chunk-K5FNXQIQ.js → chunk-RGONMZYW.js} +1 -1
  48. package/dist/{chunk-5QHWUYYN.js → chunk-SKSMRE3E.js} +1 -1
  49. package/dist/chunk-SSJ7QGO2.js +3 -0
  50. package/dist/{chunk-GSGBIM5E.cjs → chunk-UPWRXCS4.cjs} +1 -1
  51. package/dist/{chunk-PGHXTBM2.cjs → chunk-V4F7PAHI.cjs} +1 -1
  52. package/dist/{chunk-6OELZRMT.cjs → chunk-X3NBRTSB.cjs} +1 -1
  53. package/dist/chunk-YPSBCX4T.cjs +1 -0
  54. package/dist/chunk-ZBRAPOTF.cjs +1 -0
  55. package/dist/{chunk-TP7RAANC.js → chunk-ZHB3CE3R.js} +1 -1
  56. package/dist/{chunk-6XGP4HMG.cjs → chunk-ZWWESD2F.cjs} +1 -1
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.d.cts +1 -1
  59. package/dist/index.d.ts +1 -1
  60. package/dist/index.js +1 -1
  61. package/dist/logger/index.cjs +1 -1
  62. package/dist/logger/index.js +1 -1
  63. package/dist/logger/init.cjs +1 -1
  64. package/dist/logger/init.js +1 -1
  65. package/dist/sdk.cjs +1 -1
  66. package/dist/sdk.d.cts +1 -1
  67. package/dist/sdk.d.ts +1 -1
  68. package/dist/sdk.js +1 -1
  69. package/dist/signers/device.d.cts +1 -1
  70. package/dist/signers/device.d.ts +1 -1
  71. package/dist/signers/evm-api-key.d.cts +1 -1
  72. package/dist/signers/evm-api-key.d.ts +1 -1
  73. package/dist/signers/evm-external-wallet.d.cts +1 -1
  74. package/dist/signers/evm-external-wallet.d.ts +1 -1
  75. package/dist/signers/external-wallet-signer.d.cts +1 -1
  76. package/dist/signers/external-wallet-signer.d.ts +1 -1
  77. package/dist/signers/index.cjs +1 -1
  78. package/dist/signers/index.d.cts +1 -1
  79. package/dist/signers/index.d.ts +1 -1
  80. package/dist/signers/index.js +1 -1
  81. package/dist/signers/non-custodial/index.cjs +1 -1
  82. package/dist/signers/non-custodial/index.d.cts +1 -1
  83. package/dist/signers/non-custodial/index.d.ts +1 -1
  84. package/dist/signers/non-custodial/index.js +1 -1
  85. package/dist/signers/non-custodial/ncs-evm-signer.cjs +1 -1
  86. package/dist/signers/non-custodial/ncs-evm-signer.d.cts +1 -1
  87. package/dist/signers/non-custodial/ncs-evm-signer.d.ts +1 -1
  88. package/dist/signers/non-custodial/ncs-evm-signer.js +1 -1
  89. package/dist/signers/non-custodial/ncs-signer.cjs +1 -1
  90. package/dist/signers/non-custodial/ncs-signer.d.cts +1 -1
  91. package/dist/signers/non-custodial/ncs-signer.d.ts +1 -1
  92. package/dist/signers/non-custodial/ncs-signer.js +1 -1
  93. package/dist/signers/non-custodial/ncs-solana-signer.cjs +1 -1
  94. package/dist/signers/non-custodial/ncs-solana-signer.d.cts +1 -1
  95. package/dist/signers/non-custodial/ncs-solana-signer.d.ts +1 -1
  96. package/dist/signers/non-custodial/ncs-solana-signer.js +1 -1
  97. package/dist/signers/non-custodial/ncs-stellar-signer.cjs +1 -1
  98. package/dist/signers/non-custodial/ncs-stellar-signer.d.cts +1 -1
  99. package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +1 -1
  100. package/dist/signers/non-custodial/ncs-stellar-signer.js +1 -1
  101. package/dist/signers/passkey.d.cts +1 -1
  102. package/dist/signers/passkey.d.ts +1 -1
  103. package/dist/signers/server/assemble-server-signer.d.cts +1 -1
  104. package/dist/signers/server/assemble-server-signer.d.ts +1 -1
  105. package/dist/signers/server/evm-server-signer.d.cts +1 -1
  106. package/dist/signers/server/evm-server-signer.d.ts +1 -1
  107. package/dist/signers/server/helpers/derive-server-signer.d.cts +1 -1
  108. package/dist/signers/server/helpers/derive-server-signer.d.ts +1 -1
  109. package/dist/signers/server/helpers/index.d.cts +1 -1
  110. package/dist/signers/server/helpers/index.d.ts +1 -1
  111. package/dist/signers/server/index.d.cts +1 -1
  112. package/dist/signers/server/index.d.ts +1 -1
  113. package/dist/signers/server/solana-server-signer.d.cts +1 -1
  114. package/dist/signers/server/solana-server-signer.d.ts +1 -1
  115. package/dist/signers/server/stellar-server-signer.d.cts +1 -1
  116. package/dist/signers/server/stellar-server-signer.d.ts +1 -1
  117. package/dist/signers/solana-api-key.d.cts +1 -1
  118. package/dist/signers/solana-api-key.d.ts +1 -1
  119. package/dist/signers/solana-external-wallet.d.cts +1 -1
  120. package/dist/signers/solana-external-wallet.d.ts +1 -1
  121. package/dist/signers/stellar-external-wallet.d.cts +1 -1
  122. package/dist/signers/stellar-external-wallet.d.ts +1 -1
  123. package/dist/signers/types.d.cts +1 -1
  124. package/dist/signers/types.d.ts +1 -1
  125. package/dist/{types-BZ83dAVx.d.ts → types-a9zAn0G2.d.ts} +7 -1
  126. package/dist/{types-fUCYdXAl.d.cts → types-r-OYYHDs.d.cts} +7 -1
  127. package/dist/utils/constants.cjs +1 -1
  128. package/dist/utils/constants.js +1 -1
  129. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.cjs +1 -1
  130. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.js +1 -1
  131. package/dist/utils/device-signers/createDeviceSigner.d.cts +1 -1
  132. package/dist/utils/device-signers/createDeviceSigner.d.ts +1 -1
  133. package/dist/utils/device-signers/index.cjs +1 -1
  134. package/dist/utils/device-signers/index.d.cts +1 -1
  135. package/dist/utils/device-signers/index.d.ts +1 -1
  136. package/dist/utils/device-signers/index.js +1 -1
  137. package/dist/utils/signer-locator.d.cts +1 -1
  138. package/dist/utils/signer-locator.d.ts +1 -1
  139. package/dist/utils/signer-mapping.d.cts +1 -1
  140. package/dist/utils/signer-mapping.d.ts +1 -1
  141. package/dist/wallets/__tests__/test-helpers.cjs +1 -1
  142. package/dist/wallets/__tests__/test-helpers.d.cts +1 -1
  143. package/dist/wallets/__tests__/test-helpers.d.ts +1 -1
  144. package/dist/wallets/__tests__/test-helpers.js +1 -1
  145. package/dist/wallets/evm.cjs +1 -1
  146. package/dist/wallets/evm.d.cts +1 -1
  147. package/dist/wallets/evm.d.ts +1 -1
  148. package/dist/wallets/evm.js +1 -1
  149. package/dist/wallets/solana.cjs +1 -1
  150. package/dist/wallets/solana.d.cts +1 -1
  151. package/dist/wallets/solana.d.ts +1 -1
  152. package/dist/wallets/solana.js +1 -1
  153. package/dist/wallets/stellar.cjs +1 -1
  154. package/dist/wallets/stellar.d.cts +40 -1
  155. package/dist/wallets/stellar.d.ts +40 -1
  156. package/dist/wallets/stellar.js +1 -1
  157. package/dist/wallets/types.d.cts +1 -1
  158. package/dist/wallets/types.d.ts +1 -1
  159. package/dist/wallets/wallet-factory.cjs +1 -1
  160. package/dist/wallets/wallet-factory.d.cts +2 -2
  161. package/dist/wallets/wallet-factory.d.ts +2 -2
  162. package/dist/wallets/wallet-factory.js +1 -1
  163. package/dist/wallets/wallet.cjs +1 -1
  164. package/dist/wallets/wallet.d.cts +2 -2
  165. package/dist/wallets/wallet.d.ts +2 -2
  166. package/dist/wallets/wallet.js +1 -1
  167. package/package.json +3 -3
  168. package/dist/chunk-6Z4EZBIA.js +0 -1
  169. package/dist/chunk-C7ZRKJGY.cjs +0 -1
  170. package/dist/chunk-LTA4BVJ2.js +0 -1
  171. package/dist/chunk-LTTG4ATS.js +0 -1
  172. package/dist/chunk-OH2QJLHX.cjs +0 -1
  173. package/dist/chunk-PTCXLH65.cjs +0 -3
  174. package/dist/chunk-XFPV6OUZ.js +0 -3
  175. package/dist/chunk-XWG5HSVL.cjs +0 -1
  176. package/dist/chunk-ZPVXC2SA.js +0 -1
@@ -2146,6 +2146,22 @@ type CreateSignerV2025InputDtoClass = {
2146
2146
  */
2147
2147
  name?: string;
2148
2148
  }) | string;
2149
+ /**
2150
+ * Optional array of scopes to restrict the signer's capabilities
2151
+ */
2152
+ scopes?: Array<{
2153
+ type: 'transfer';
2154
+ tokenLocator: string;
2155
+ recipients?: Array<string>;
2156
+ spendingLimit?: {
2157
+ amount: string;
2158
+ interval?: number;
2159
+ };
2160
+ }>;
2161
+ /**
2162
+ * The expiry date of the signer in ISO 8601 format
2163
+ */
2164
+ expiresAt?: string;
2149
2165
  } | {
2150
2166
  signer: ({
2151
2167
  /**
@@ -2421,6 +2437,16 @@ type CreateTransactionV2025DtoClass = {
2421
2437
  args: {
2422
2438
  [key: string]: unknown;
2423
2439
  };
2440
+ } | {
2441
+ /**
2442
+ * The type of transaction to execute
2443
+ */
2444
+ type: 'upgrade-wallet';
2445
+ } | {
2446
+ /**
2447
+ * The type of transaction to execute
2448
+ */
2449
+ type: 'migrate-wallet';
2424
2450
  };
2425
2451
  /**
2426
2452
  * Signer Locator
@@ -2432,7 +2458,7 @@ type CreateTransactionV2025DtoClass = {
2432
2458
  type CreateWalletV2025DtoClass = {
2433
2459
  chainType: 'evm';
2434
2460
  type?: 'smart';
2435
- config?: {
2461
+ config: {
2436
2462
  adminSigner: {
2437
2463
  /**
2438
2464
  * Identifier for external wallet signer type
@@ -2605,7 +2631,7 @@ type CreateWalletV2025DtoClass = {
2605
2631
  */
2606
2632
  creationSeed?: string;
2607
2633
  };
2608
- owner?: 'COMPANY' | string;
2634
+ owner?: string;
2609
2635
  /**
2610
2636
  * The wallet alias
2611
2637
  */
@@ -2626,7 +2652,7 @@ type CreateWalletV2025DtoClass = {
2626
2652
  } | {
2627
2653
  chainType: 'solana';
2628
2654
  type?: 'smart';
2629
- config?: {
2655
+ config: {
2630
2656
  adminSigner: {
2631
2657
  /**
2632
2658
  * Identifier for external wallet signer type
@@ -2763,9 +2789,25 @@ type CreateWalletV2025DtoClass = {
2763
2789
  */
2764
2790
  name?: string;
2765
2791
  }) | string;
2792
+ /**
2793
+ * Optional array of scopes to restrict the signer's capabilities
2794
+ */
2795
+ scopes?: Array<{
2796
+ type: 'transfer';
2797
+ tokenLocator: string;
2798
+ recipients?: Array<string>;
2799
+ spendingLimit?: {
2800
+ amount: string;
2801
+ interval?: number;
2802
+ };
2803
+ }>;
2804
+ /**
2805
+ * The expiry date of the signer in ISO 8601 format
2806
+ */
2807
+ expiresAt?: string;
2766
2808
  }>;
2767
2809
  };
2768
- owner?: 'COMPANY' | string;
2810
+ owner?: string;
2769
2811
  /**
2770
2812
  * The wallet alias
2771
2813
  */
@@ -2971,7 +3013,7 @@ type CreateWalletV2025DtoClass = {
2971
3013
  */
2972
3014
  plugins?: Array<string>;
2973
3015
  };
2974
- owner?: 'COMPANY' | string;
3016
+ owner?: string;
2975
3017
  /**
2976
3018
  * The wallet alias
2977
3019
  */
@@ -3111,6 +3153,22 @@ type DelegatedSignerV2025DtoClass = (({
3111
3153
  */
3112
3154
  name?: string;
3113
3155
  }) & {
3156
+ /**
3157
+ * Optional array of scopes restricting the signer's capabilities
3158
+ */
3159
+ scopes?: Array<{
3160
+ type: 'transfer';
3161
+ tokenLocator: string;
3162
+ recipients?: Array<string>;
3163
+ spendingLimit?: {
3164
+ amount: string;
3165
+ interval?: number;
3166
+ };
3167
+ }>;
3168
+ /**
3169
+ * The expiry date of the signer in ISO 8601 format
3170
+ */
3171
+ expiresAt?: number | string;
3114
3172
  /**
3115
3173
  * The transaction for the signer
3116
3174
  */
@@ -3368,6 +3426,20 @@ type DelegatedSignerV2025DtoClass = (({
3368
3426
  recipientAddress: string;
3369
3427
  };
3370
3428
  };
3429
+ /**
3430
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
3431
+ */
3432
+ fees?: {
3433
+ mode: 'user-native' | 'user-fungible' | 'project';
3434
+ estimate?: unknown;
3435
+ actual?: unknown;
3436
+ billed?: {
3437
+ usd: number;
3438
+ };
3439
+ billing?: {
3440
+ status: 'pending' | 'settled' | 'failed';
3441
+ };
3442
+ };
3371
3443
  walletType: 'smart';
3372
3444
  };
3373
3445
  }) | (({
@@ -4122,6 +4194,20 @@ type DelegatedSignerV2025DtoClass = (({
4122
4194
  recipientAddress: string;
4123
4195
  };
4124
4196
  };
4197
+ /**
4198
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
4199
+ */
4200
+ fees?: {
4201
+ mode: 'user-native' | 'user-fungible' | 'project';
4202
+ estimate?: unknown;
4203
+ actual?: unknown;
4204
+ billed?: {
4205
+ usd: number;
4206
+ };
4207
+ billing?: {
4208
+ status: 'pending' | 'settled' | 'failed';
4209
+ };
4210
+ };
4125
4211
  walletType: 'smart';
4126
4212
  };
4127
4213
  });
@@ -5863,6 +5949,20 @@ type WalletsMultipleTransactionV2025ResponseDto = {
5863
5949
  recipientAddress: string;
5864
5950
  };
5865
5951
  };
5952
+ /**
5953
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
5954
+ */
5955
+ fees?: {
5956
+ mode: 'user-native' | 'user-fungible' | 'project';
5957
+ estimate?: unknown;
5958
+ actual?: unknown;
5959
+ billed?: {
5960
+ usd: number;
5961
+ };
5962
+ billing?: {
5963
+ status: 'pending' | 'settled' | 'failed';
5964
+ };
5965
+ };
5866
5966
  } | {
5867
5967
  /**
5868
5968
  * The blockchain type of the wallet
@@ -6175,6 +6275,20 @@ type WalletsMultipleTransactionV2025ResponseDto = {
6175
6275
  recipientAddress: string;
6176
6276
  };
6177
6277
  };
6278
+ /**
6279
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
6280
+ */
6281
+ fees?: {
6282
+ mode: 'user-native' | 'user-fungible' | 'project';
6283
+ estimate?: unknown;
6284
+ actual?: unknown;
6285
+ billed?: {
6286
+ usd: number;
6287
+ };
6288
+ billing?: {
6289
+ status: 'pending' | 'settled' | 'failed';
6290
+ };
6291
+ };
6178
6292
  } | {
6179
6293
  /**
6180
6294
  * The blockchain type of the wallet
@@ -6588,6 +6702,20 @@ type WalletsMultipleTransactionV2025ResponseDto = {
6588
6702
  recipientAddress: string;
6589
6703
  };
6590
6704
  };
6705
+ /**
6706
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
6707
+ */
6708
+ fees?: {
6709
+ mode: 'user-native' | 'user-fungible' | 'project';
6710
+ estimate?: unknown;
6711
+ actual?: unknown;
6712
+ billed?: {
6713
+ usd: number;
6714
+ };
6715
+ billing?: {
6716
+ status: 'pending' | 'settled' | 'failed';
6717
+ };
6718
+ };
6591
6719
  } | {
6592
6720
  /**
6593
6721
  * The blockchain type of the wallet
@@ -6918,6 +7046,20 @@ type WalletsMultipleTransactionV2025ResponseDto = {
6918
7046
  recipientAddress: string;
6919
7047
  };
6920
7048
  };
7049
+ /**
7050
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
7051
+ */
7052
+ fees?: {
7053
+ mode: 'user-native' | 'user-fungible' | 'project';
7054
+ estimate?: unknown;
7055
+ actual?: unknown;
7056
+ billed?: {
7057
+ usd: number;
7058
+ };
7059
+ billing?: {
7060
+ status: 'pending' | 'settled' | 'failed';
7061
+ };
7062
+ };
6921
7063
  } | {
6922
7064
  /**
6923
7065
  * The blockchain type of the wallet
@@ -6963,6 +7105,16 @@ type WalletsMultipleTransactionV2025ResponseDto = {
6963
7105
  args: {
6964
7106
  [key: string]: unknown;
6965
7107
  };
7108
+ } | {
7109
+ /**
7110
+ * The type of transaction to execute
7111
+ */
7112
+ type: 'upgrade-wallet';
7113
+ } | {
7114
+ /**
7115
+ * The type of transaction to execute
7116
+ */
7117
+ type: 'migrate-wallet';
6966
7118
  };
6967
7119
  /**
6968
7120
  * Signer Locator
@@ -7246,6 +7398,20 @@ type WalletsMultipleTransactionV2025ResponseDto = {
7246
7398
  recipientAddress: string;
7247
7399
  };
7248
7400
  };
7401
+ /**
7402
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
7403
+ */
7404
+ fees?: {
7405
+ mode: 'user-native' | 'user-fungible' | 'project';
7406
+ estimate?: unknown;
7407
+ actual?: unknown;
7408
+ billed?: {
7409
+ usd: number;
7410
+ };
7411
+ billing?: {
7412
+ status: 'pending' | 'settled' | 'failed';
7413
+ };
7414
+ };
7249
7415
  }>;
7250
7416
  };
7251
7417
  type WalletsSignatureV2025ResponseDto = {
@@ -8161,6 +8327,20 @@ type WalletsTransactionV2025ResponseDtoClass = {
8161
8327
  recipientAddress: string;
8162
8328
  };
8163
8329
  };
8330
+ /**
8331
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
8332
+ */
8333
+ fees?: {
8334
+ mode: 'user-native' | 'user-fungible' | 'project';
8335
+ estimate?: unknown;
8336
+ actual?: unknown;
8337
+ billed?: {
8338
+ usd: number;
8339
+ };
8340
+ billing?: {
8341
+ status: 'pending' | 'settled' | 'failed';
8342
+ };
8343
+ };
8164
8344
  } | {
8165
8345
  /**
8166
8346
  * The blockchain type of the wallet
@@ -8473,6 +8653,20 @@ type WalletsTransactionV2025ResponseDtoClass = {
8473
8653
  recipientAddress: string;
8474
8654
  };
8475
8655
  };
8656
+ /**
8657
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
8658
+ */
8659
+ fees?: {
8660
+ mode: 'user-native' | 'user-fungible' | 'project';
8661
+ estimate?: unknown;
8662
+ actual?: unknown;
8663
+ billed?: {
8664
+ usd: number;
8665
+ };
8666
+ billing?: {
8667
+ status: 'pending' | 'settled' | 'failed';
8668
+ };
8669
+ };
8476
8670
  } | {
8477
8671
  /**
8478
8672
  * The blockchain type of the wallet
@@ -8886,6 +9080,20 @@ type WalletsTransactionV2025ResponseDtoClass = {
8886
9080
  recipientAddress: string;
8887
9081
  };
8888
9082
  };
9083
+ /**
9084
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
9085
+ */
9086
+ fees?: {
9087
+ mode: 'user-native' | 'user-fungible' | 'project';
9088
+ estimate?: unknown;
9089
+ actual?: unknown;
9090
+ billed?: {
9091
+ usd: number;
9092
+ };
9093
+ billing?: {
9094
+ status: 'pending' | 'settled' | 'failed';
9095
+ };
9096
+ };
8889
9097
  } | {
8890
9098
  /**
8891
9099
  * The blockchain type of the wallet
@@ -9216,6 +9424,20 @@ type WalletsTransactionV2025ResponseDtoClass = {
9216
9424
  recipientAddress: string;
9217
9425
  };
9218
9426
  };
9427
+ /**
9428
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
9429
+ */
9430
+ fees?: {
9431
+ mode: 'user-native' | 'user-fungible' | 'project';
9432
+ estimate?: unknown;
9433
+ actual?: unknown;
9434
+ billed?: {
9435
+ usd: number;
9436
+ };
9437
+ billing?: {
9438
+ status: 'pending' | 'settled' | 'failed';
9439
+ };
9440
+ };
9219
9441
  } | {
9220
9442
  /**
9221
9443
  * The blockchain type of the wallet
@@ -9261,6 +9483,16 @@ type WalletsTransactionV2025ResponseDtoClass = {
9261
9483
  args: {
9262
9484
  [key: string]: unknown;
9263
9485
  };
9486
+ } | {
9487
+ /**
9488
+ * The type of transaction to execute
9489
+ */
9490
+ type: 'upgrade-wallet';
9491
+ } | {
9492
+ /**
9493
+ * The type of transaction to execute
9494
+ */
9495
+ type: 'migrate-wallet';
9264
9496
  };
9265
9497
  /**
9266
9498
  * Signer Locator
@@ -9544,6 +9776,20 @@ type WalletsTransactionV2025ResponseDtoClass = {
9544
9776
  recipientAddress: string;
9545
9777
  };
9546
9778
  };
9779
+ /**
9780
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
9781
+ */
9782
+ fees?: {
9783
+ mode: 'user-native' | 'user-fungible' | 'project';
9784
+ estimate?: unknown;
9785
+ actual?: unknown;
9786
+ billed?: {
9787
+ usd: number;
9788
+ };
9789
+ billing?: {
9790
+ status: 'pending' | 'settled' | 'failed';
9791
+ };
9792
+ };
9547
9793
  };
9548
9794
  type WalletsV1Alpha2TransactionResponseDtoClass = {
9549
9795
  /**
@@ -11699,6 +11945,22 @@ type WalletV2025ResponseDtoClass = {
11699
11945
  */
11700
11946
  name?: string;
11701
11947
  }) & {
11948
+ /**
11949
+ * Optional array of scopes restricting the signer's capabilities
11950
+ */
11951
+ scopes?: Array<{
11952
+ type: 'transfer';
11953
+ tokenLocator: string;
11954
+ recipients?: Array<string>;
11955
+ spendingLimit?: {
11956
+ amount: string;
11957
+ interval?: number;
11958
+ };
11959
+ }>;
11960
+ /**
11961
+ * The expiry date of the signer in ISO 8601 format
11962
+ */
11963
+ expiresAt?: number | string;
11702
11964
  /**
11703
11965
  * The transaction for the signer
11704
11966
  */
@@ -11956,6 +12218,20 @@ type WalletV2025ResponseDtoClass = {
11956
12218
  recipientAddress: string;
11957
12219
  };
11958
12220
  };
12221
+ /**
12222
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
12223
+ */
12224
+ fees?: {
12225
+ mode: 'user-native' | 'user-fungible' | 'project';
12226
+ estimate?: unknown;
12227
+ actual?: unknown;
12228
+ billed?: {
12229
+ usd: number;
12230
+ };
12231
+ billing?: {
12232
+ status: 'pending' | 'settled' | 'failed';
12233
+ };
12234
+ };
11959
12235
  walletType: 'smart';
11960
12236
  };
11961
12237
  }>;
@@ -12556,6 +12832,20 @@ type WalletV2025ResponseDtoClass = {
12556
12832
  recipientAddress: string;
12557
12833
  };
12558
12834
  };
12835
+ /**
12836
+ * Transaction fee information including actual gas costs, billed amounts, and billing status
12837
+ */
12838
+ fees?: {
12839
+ mode: 'user-native' | 'user-fungible' | 'project';
12840
+ estimate?: unknown;
12841
+ actual?: unknown;
12842
+ billed?: {
12843
+ usd: number;
12844
+ };
12845
+ billing?: {
12846
+ status: 'pending' | 'settled' | 'failed';
12847
+ };
12848
+ };
12559
12849
  walletType: 'smart';
12560
12850
  };
12561
12851
  }>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');var _chunkQLHOHXVZcjs = require('../chunk-QLHOHXVZ.cjs');require('../chunk-ECAM5KTH.cjs');require('../chunk-T3U46LK3.cjs');require('../chunk-HFQTOJEG.cjs');require('../chunk-6XGP4HMG.cjs');require('../chunk-2GKPWQBQ.cjs');exports.ApiClient = _chunkQLHOHXVZcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');var _chunkEAHN2I4Fcjs = require('../chunk-EAHN2I4F.cjs');require('../chunk-T3U46LK3.cjs');require('../chunk-MQ7C5IHY.cjs');require('../chunk-ZWWESD2F.cjs');require('../chunk-2GKPWQBQ.cjs');require('../chunk-ECAM5KTH.cjs');exports.ApiClient = _chunkEAHN2I4Fcjs.a;
@@ -1,5 +1,5 @@
1
1
  export { ApiClient } from './client.cjs';
2
- export { an as ApproveSignatureParams, a7 as ApproveSignatureResponse, aj as ApproveTransactionParams, ak as ApproveTransactionResponse, al as CreateSignatureParams, am as CreateSignatureResponse, ah as CreateTransactionParams, ai as CreateTransactionResponse, aA as CreateTransactionSuccessResponse, aa as CreateWalletParams, a8 as CreateWalletResponse, ar as FundWalletParams, _ as FundWalletResponse, aq as GetBalanceResponse, aB as GetBalanceSuccessResponse, ao as GetSignatureResponse, aw as GetSignerResponse, aD as GetSignersResponse, ab as GetTransactionResponse, a0 as GetTransactionSuccessResponse, $ as GetTransactionsResponse, ap as GetTransfersResponse, ag as GetWalletResponse, ay as GetWalletSuccessResponse, az as RecoverySignerConfig, aC as RegisterSignerChain, as as RegisterSignerParams, R as RegisterSignerPasskeyParams, at as RegisterSignerResponse, au as RemoveSignerParams, av as RemoveSignerResponse, ax as SendParams, a9 as SendResponse, O as Signer, T as Transfers, a6 as WalletLocator } from '../types-fUCYdXAl.cjs';
2
+ export { ap as ApproveSignatureParams, a9 as ApproveSignatureResponse, al as ApproveTransactionParams, am as ApproveTransactionResponse, an as CreateSignatureParams, ao as CreateSignatureResponse, aj as CreateTransactionParams, ak as CreateTransactionResponse, aA as CreateTransactionSuccessResponse, ad as CreateWalletParams, ac as CreateWalletResponse, at as FundWalletParams, a0 as FundWalletResponse, as as GetBalanceResponse, aB as GetBalanceSuccessResponse, aq as GetSignatureResponse, ay as GetSignerResponse, aC as GetSignersResponse, aa as GetTransactionResponse, a2 as GetTransactionSuccessResponse, a1 as GetTransactionsResponse, ar as GetTransfersResponse, ai as GetWalletResponse, aD as GetWalletSuccessResponse, aE as RecoverySignerConfig, aF as RegisterSignerChain, au as RegisterSignerParams, R as RegisterSignerPasskeyParams, av as RegisterSignerResponse, aw as RemoveSignerParams, ax as RemoveSignerResponse, az as SendParams, ab as SendResponse, O as Signer, x as Transfers, a8 as WalletLocator } from '../types-r-OYYHDs.cjs';
3
3
  import '@crossmint/common-sdk-base';
4
4
  import '../chains/chains.cjs';
5
5
  import 'viem';
@@ -1,5 +1,5 @@
1
1
  export { ApiClient } from './client.js';
2
- export { an as ApproveSignatureParams, a7 as ApproveSignatureResponse, aj as ApproveTransactionParams, ak as ApproveTransactionResponse, al as CreateSignatureParams, am as CreateSignatureResponse, ah as CreateTransactionParams, ai as CreateTransactionResponse, aA as CreateTransactionSuccessResponse, aa as CreateWalletParams, a8 as CreateWalletResponse, ar as FundWalletParams, _ as FundWalletResponse, aq as GetBalanceResponse, aB as GetBalanceSuccessResponse, ao as GetSignatureResponse, aw as GetSignerResponse, aD as GetSignersResponse, ab as GetTransactionResponse, a0 as GetTransactionSuccessResponse, $ as GetTransactionsResponse, ap as GetTransfersResponse, ag as GetWalletResponse, ay as GetWalletSuccessResponse, az as RecoverySignerConfig, aC as RegisterSignerChain, as as RegisterSignerParams, R as RegisterSignerPasskeyParams, at as RegisterSignerResponse, au as RemoveSignerParams, av as RemoveSignerResponse, ax as SendParams, a9 as SendResponse, O as Signer, T as Transfers, a6 as WalletLocator } from '../types-BZ83dAVx.js';
2
+ export { ap as ApproveSignatureParams, a9 as ApproveSignatureResponse, al as ApproveTransactionParams, am as ApproveTransactionResponse, an as CreateSignatureParams, ao as CreateSignatureResponse, aj as CreateTransactionParams, ak as CreateTransactionResponse, aA as CreateTransactionSuccessResponse, ad as CreateWalletParams, ac as CreateWalletResponse, at as FundWalletParams, a0 as FundWalletResponse, as as GetBalanceResponse, aB as GetBalanceSuccessResponse, aq as GetSignatureResponse, ay as GetSignerResponse, aC as GetSignersResponse, aa as GetTransactionResponse, a2 as GetTransactionSuccessResponse, a1 as GetTransactionsResponse, ar as GetTransfersResponse, ai as GetWalletResponse, aD as GetWalletSuccessResponse, aE as RecoverySignerConfig, aF as RegisterSignerChain, au as RegisterSignerParams, R as RegisterSignerPasskeyParams, av as RegisterSignerResponse, aw as RemoveSignerParams, ax as RemoveSignerResponse, az as SendParams, ab as SendResponse, O as Signer, x as Transfers, a8 as WalletLocator } from '../types-a9zAn0G2.js';
3
3
  import '@crossmint/common-sdk-base';
4
4
  import '../chains/chains.js';
5
5
  import 'viem';
package/dist/api/index.js CHANGED
@@ -1 +1 @@
1
- import"../chunk-5IFDVB4Y.js";import{a}from"../chunk-VVLFMWTS.js";import"../chunk-KBJA7JDT.js";import"../chunk-EXC7TCGL.js";import"../chunk-LEIODNM5.js";import"../chunk-6Z4EZBIA.js";import"../chunk-J3R36SGJ.js";export{a as ApiClient};
1
+ import"../chunk-5IFDVB4Y.js";import{a}from"../chunk-OEP5YPON.js";import"../chunk-EXC7TCGL.js";import"../chunk-BFCNGLFS.js";import"../chunk-6E6H6VGD.js";import"../chunk-J3R36SGJ.js";import"../chunk-KBJA7JDT.js";export{a as ApiClient};
@@ -1,6 +1,6 @@
1
1
  import 'viem';
2
2
  import './gen/types.gen.cjs';
3
- export { an as ApproveSignatureParams, a7 as ApproveSignatureResponse, aj as ApproveTransactionParams, ak as ApproveTransactionResponse, al as CreateSignatureParams, am as CreateSignatureResponse, ah as CreateTransactionParams, ai as CreateTransactionResponse, aA as CreateTransactionSuccessResponse, aa as CreateWalletParams, a8 as CreateWalletResponse, ar as FundWalletParams, _ as FundWalletResponse, aq as GetBalanceResponse, aB as GetBalanceSuccessResponse, ao as GetSignatureResponse, aw as GetSignerResponse, aD as GetSignersResponse, ab as GetTransactionResponse, a0 as GetTransactionSuccessResponse, $ as GetTransactionsResponse, ap as GetTransfersResponse, ag as GetWalletResponse, ay as GetWalletSuccessResponse, az as RecoverySignerConfig, aC as RegisterSignerChain, as as RegisterSignerParams, R as RegisterSignerPasskeyParams, at as RegisterSignerResponse, au as RemoveSignerParams, av as RemoveSignerResponse, ax as SendParams, a9 as SendResponse, O as Signer, T as Transfers, a6 as WalletLocator } from '../types-fUCYdXAl.cjs';
3
+ export { ap as ApproveSignatureParams, a9 as ApproveSignatureResponse, al as ApproveTransactionParams, am as ApproveTransactionResponse, an as CreateSignatureParams, ao as CreateSignatureResponse, aj as CreateTransactionParams, ak as CreateTransactionResponse, aA as CreateTransactionSuccessResponse, ad as CreateWalletParams, ac as CreateWalletResponse, at as FundWalletParams, a0 as FundWalletResponse, as as GetBalanceResponse, aB as GetBalanceSuccessResponse, aq as GetSignatureResponse, ay as GetSignerResponse, aC as GetSignersResponse, aa as GetTransactionResponse, a2 as GetTransactionSuccessResponse, a1 as GetTransactionsResponse, ar as GetTransfersResponse, ai as GetWalletResponse, aD as GetWalletSuccessResponse, aE as RecoverySignerConfig, aF as RegisterSignerChain, au as RegisterSignerParams, R as RegisterSignerPasskeyParams, av as RegisterSignerResponse, aw as RemoveSignerParams, ax as RemoveSignerResponse, az as SendParams, ab as SendResponse, O as Signer, x as Transfers, a8 as WalletLocator } from '../types-r-OYYHDs.cjs';
4
4
  import '../chains/chains.cjs';
5
5
  import 'ox';
6
6
  import '@crossmint/client-sdk-window';
@@ -1,6 +1,6 @@
1
1
  import 'viem';
2
2
  import './gen/types.gen.js';
3
- export { an as ApproveSignatureParams, a7 as ApproveSignatureResponse, aj as ApproveTransactionParams, ak as ApproveTransactionResponse, al as CreateSignatureParams, am as CreateSignatureResponse, ah as CreateTransactionParams, ai as CreateTransactionResponse, aA as CreateTransactionSuccessResponse, aa as CreateWalletParams, a8 as CreateWalletResponse, ar as FundWalletParams, _ as FundWalletResponse, aq as GetBalanceResponse, aB as GetBalanceSuccessResponse, ao as GetSignatureResponse, aw as GetSignerResponse, aD as GetSignersResponse, ab as GetTransactionResponse, a0 as GetTransactionSuccessResponse, $ as GetTransactionsResponse, ap as GetTransfersResponse, ag as GetWalletResponse, ay as GetWalletSuccessResponse, az as RecoverySignerConfig, aC as RegisterSignerChain, as as RegisterSignerParams, R as RegisterSignerPasskeyParams, at as RegisterSignerResponse, au as RemoveSignerParams, av as RemoveSignerResponse, ax as SendParams, a9 as SendResponse, O as Signer, T as Transfers, a6 as WalletLocator } from '../types-BZ83dAVx.js';
3
+ export { ap as ApproveSignatureParams, a9 as ApproveSignatureResponse, al as ApproveTransactionParams, am as ApproveTransactionResponse, an as CreateSignatureParams, ao as CreateSignatureResponse, aj as CreateTransactionParams, ak as CreateTransactionResponse, aA as CreateTransactionSuccessResponse, ad as CreateWalletParams, ac as CreateWalletResponse, at as FundWalletParams, a0 as FundWalletResponse, as as GetBalanceResponse, aB as GetBalanceSuccessResponse, aq as GetSignatureResponse, ay as GetSignerResponse, aC as GetSignersResponse, aa as GetTransactionResponse, a2 as GetTransactionSuccessResponse, a1 as GetTransactionsResponse, ar as GetTransfersResponse, ai as GetWalletResponse, aD as GetWalletSuccessResponse, aE as RecoverySignerConfig, aF as RegisterSignerChain, au as RegisterSignerParams, R as RegisterSignerPasskeyParams, av as RegisterSignerResponse, aw as RemoveSignerParams, ax as RemoveSignerResponse, az as SendParams, ab as SendResponse, O as Signer, x as Transfers, a8 as WalletLocator } from '../types-a9zAn0G2.js';
4
4
  import '../chains/chains.js';
5
5
  import 'ox';
6
6
  import '@crossmint/client-sdk-window';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKEEHHSIZcjs = require('../chunk-KEEHHSIZ.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-UE3WVHTM.cjs');require('../chunk-5X4EOJFG.cjs');require('../chunk-HRUMWG2F.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-T3U46LK3.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-HFQTOJEG.cjs');require('../chunk-6XGP4HMG.cjs');require('../chunk-2GKPWQBQ.cjs');exports.isMainnetChain = _chunkKEEHHSIZcjs.c; exports.isTestnetChain = _chunkKEEHHSIZcjs.b; exports.isValidChain = _chunkKEEHHSIZcjs.e; exports.mainnetToTestnet = _chunkKEEHHSIZcjs.d; exports.toViemChain = _chunkKEEHHSIZcjs.a; exports.validateChainForEnvironment = _chunkKEEHHSIZcjs.f;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEXPPKQFEcjs = require('../chunk-EXPPKQFE.cjs');require('../chunk-HRUMWG2F.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-UE3WVHTM.cjs');require('../chunk-5X4EOJFG.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-T3U46LK3.cjs');require('../chunk-MQ7C5IHY.cjs');require('../chunk-ZWWESD2F.cjs');require('../chunk-2GKPWQBQ.cjs');exports.isMainnetChain = _chunkEXPPKQFEcjs.c; exports.isTestnetChain = _chunkEXPPKQFEcjs.b; exports.isValidChain = _chunkEXPPKQFEcjs.e; exports.mainnetToTestnet = _chunkEXPPKQFEcjs.d; exports.toViemChain = _chunkEXPPKQFEcjs.a; exports.validateChainForEnvironment = _chunkEXPPKQFEcjs.f;
@@ -1 +1 @@
1
- import{a,b,c,d,e,f}from"../chunk-4NYZ24DW.js";import"../chunk-S3DYQVRD.js";import"../chunk-KUP7H7X2.js";import"../chunk-FT5EVMLB.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-EXC7TCGL.js";import"../chunk-455NK5LB.js";import"../chunk-LEIODNM5.js";import"../chunk-6Z4EZBIA.js";import"../chunk-J3R36SGJ.js";export{c as isMainnetChain,b as isTestnetChain,e as isValidChain,d as mainnetToTestnet,a as toViemChain,f as validateChainForEnvironment};
1
+ import{a,b,c,d,e,f}from"../chunk-JUVCT33M.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-S3DYQVRD.js";import"../chunk-KUP7H7X2.js";import"../chunk-FT5EVMLB.js";import"../chunk-455NK5LB.js";import"../chunk-EXC7TCGL.js";import"../chunk-BFCNGLFS.js";import"../chunk-6E6H6VGD.js";import"../chunk-J3R36SGJ.js";export{c as isMainnetChain,b as isTestnetChain,e as isValidChain,d as mainnetToTestnet,a as toViemChain,f as validateChainForEnvironment};
@@ -0,0 +1 @@
1
+ import{a as S,b as v}from"./chunk-YIO5XXQ4.js";import{a as R}from"./chunk-SSJ7QGO2.js";import{a as b}from"./chunk-N4IWDL6M.js";import{a as m}from"./chunk-GOXB2RBF.js";import{b as C}from"./chunk-RBSMBO4T.js";import{f as u}from"./chunk-JUVCT33M.js";import{e as P,g as l}from"./chunk-EXC7TCGL.js";import{a as c}from"./chunk-BFCNGLFS.js";import{a as y,b as d,c as f,g as p}from"./chunk-J3R36SGJ.js";import{WithLoggerContext as x}from"@crossmint/common-sdk-base";import{WebAuthnP256 as $}from"ox";var E="When 'signers' is provided to a method that may fetch an existing wallet, each specified signer must exist in that wallet's configuration.",h=class{constructor(t){this.apiClient=t}getWallet(t,e){return p(this,null,function*(){let a,n;if(typeof t=="string"){if(!this.apiClient.isServerSide)throw new l("getWallet with walletLocator is only available on the server side. Use getWallet(args) instead.");if(e==null)throw new l("Wallet configuration is required when using walletLocator: https://docs.crossmint.com/sdk-reference/wallets/type-aliases/WalletArgsFor");a=t,n=e}else{if(this.apiClient.isServerSide)throw new l("getWallet on server side requires a walletLocator parameter. Use getWallet(walletLocator, args) instead.");n=t,a=this.getWalletLocator(n)}let i=d(y({},n),{chain:u(n.chain,this.apiClient.environment)});c.info("walletFactory.getWallet.start");let r=yield this.apiClient.getWallet(a);if("error"in r)throw c.warn("walletFactory.getWallet.notFound",{error:r.error}),new P(JSON.stringify(r));return c.info("walletFactory.getWallet.success",{address:r.address}),yield this.createWalletInstance(r,i)})}createWallet(t){return p(this,null,function*(){var o,s,g,w,W,A,k,F;let e=d(y({},t),{chain:u(t.chain,this.apiClient.environment)});if(yield(g=(s=(o=e.options)==null?void 0:o.callbacks)==null?void 0:s.onWalletCreationStart)==null?void 0:g.call(s),c.info("walletFactory.createWallet.start"),!this.apiClient.isServerSide&&e.owner!=null)throw c.error("walletFactory.createWallet.error",{error:"Owner field cannot be specified in client-side createWallet calls"}),new l("Owner field cannot be specified in client-side createWallet calls. Owner is determined from JWT authentication.");let a=((w=e.options)==null?void 0:w.deviceSignerKeyStorage)!=null?this.ensureDeviceSignerInSigners(e):(W=e.signers)!=null?W:[],n=yield this.registerSigners(a,e.chain,(A=e.options)==null?void 0:A.deviceSignerKeyStorage),i;if(e.recovery.type==="passkey"&&e.recovery.id==null)i=yield this.createPasskeySigner(e.recovery);else if(e.recovery.type==="server"){let{derivedAddress:D}=C(e.recovery,e.chain,this.apiClient.projectId,this.apiClient.environment);i={type:"server",address:D}}else i=e.recovery;let r=yield this.apiClient.createWallet({type:"smart",chainType:this.getChainType(e.chain),config:y(y({adminSigner:i},e.plugins?{plugins:e.plugins}:{}),n!=null?{delegatedSigners:n}:{}),owner:(k=e.owner)!=null?k:void 0,alias:(F=e.alias)!=null?F:void 0});if("error"in r)throw c.error("walletFactory.createWallet.error",{error:r.error}),new l(JSON.stringify(r));return c.info("walletFactory.createWallet.success",{address:r.address}),yield this.createWalletInstance(r,e)})}createWalletInstance(t,e){return p(this,null,function*(){var s,g;this.validateExistingWalletConfig(t,e);let a=e,n=t.config.adminSigner,i=((s=a.recovery)==null?void 0:s.type)==="server"||((g=a.recovery)==null?void 0:g.type)==="external-wallet"?a.recovery:n,r=t.config.delegatedSigners;r!=null&&r.length===1&&(r[0].type==="server"||r[0].type==="external-wallet")&&(r=a.signers);let o=new R({chain:e.chain,address:t.address,owner:t.owner,options:e.options,alias:e.alias,recovery:i,signers:r!=null?r:[]},this.apiClient);return yield o.waitForInit(),o})}getWalletLocator(t){return`me:${this.getChainType(t.chain)}:smart`+(t.alias!=null?`:alias:${t.alias}`:"")}createPasskeySigner(t){return p(this,null,function*(){var n;if(t.type!=="passkey")throw new Error("Signer is not a passkey");let e=(n=t.name)!=null?n:`Crossmint Wallet ${Date.now()}`,a=t.onCreatePasskey?yield t.onCreatePasskey(e):yield $.createCredential({name:e});return{type:"passkey",id:a.id,name:e,publicKey:{x:a.publicKey.x.toString(),y:a.publicKey.y.toString()}}})}ensureDeviceSignerInSigners(t){var n;let e=(n=t.signers)!=null?n:[];return e.some(i=>i.type==="device")?e:[...e,{type:"device"}]}validateExistingWalletConfig(t,e){if(e.owner!=null&&t.owner!=null&&S(e.owner)!==S(t.owner))throw new l("Wallet owner does not match existing wallet's linked user");if(e.chain==="solana"&&t.chainType!=="solana"||e.chain!=="solana"&&t.chainType==="solana"||e.chain==="stellar"&&t.chainType!=="stellar"||e.chain!=="stellar"&&t.chainType==="stellar")throw new l(`Wallet chain does not match existing wallet's chain. You must use chain: ${t.chainType}.`);if(t.type!=="smart")return;let a=e;if(a.recovery!=null||a.signers!=null){let n=t.config,i=n==null?void 0:n.adminSigner;if(a.recovery!=null&&i!=null){if(a.recovery.type!==i.type)throw new l("The wallet recovery signer type does not match the existing wallet's recovery signer type");v(a.recovery,i)}let r=a.signers;r!=null&&this.validateSigners(t,r,e.chain)}}validateSigners(t,e,a){let n=t.config,i=n==null?void 0:n.delegatedSigners;if(e.length!==0){if(i==null||i.length===0)throw new l(`${e.length} signer(s) specified, but wallet "${t.address}" has no signers. ${E}`);for(let r of e){let o=i.find(s=>{if(this.isMatchingPasskeySigner(r,s,n)||s.type==="device"&&r.type==="device")return!0;if(r.type==="server"){let{derivedAddress:g}=C(r,a,this.apiClient.projectId,this.apiClient.environment);return s.locator===`server:${g}`}return s.locator===m(r)});if(o==null){let s=i.map(g=>g.locator).join(", ");throw new l(`Signer '${r.type}' does not exist in wallet "${t.address}". Available signers: ${s}. ${E}`)}v(r,o)}}}isMatchingPasskeySigner(t,e,a){var i,r;let n=((r=(i=a.delegatedSigners)==null?void 0:i.filter(o=>o.type==="passkey").length)!=null?r:0)+(a.adminSigner.type==="passkey"?1:0);if(t.type==="passkey"){if(t.id==null&&n===1)return e.type==="passkey";if(t.id==null&&n>1)throw new l("When creating a wallet with multiple passkeys, you must provide the passkey ID for each passkey.")}return!1}registerSigners(t,e,a){return p(this,null,function*(){var n;return yield Promise.all((n=t==null?void 0:t.map(i=>p(this,null,function*(){if(i.type==="passkey")return i.id==null?{signer:yield this.createPasskeySigner(i)}:{signer:i};if(i.type==="device"){if(i.publicKey!=null)return{signer:{type:"device",publicKey:i.publicKey,name:i.name}};if(i.locator!=null)return{signer:i.locator};if(a==null)throw new l("Device signer key storage is required for device signers");let r=yield b(a);return{signer:{type:"device",publicKey:r.publicKey,name:r.name}}}if(i.type==="server"&&e!=null){let{derivedAddress:r}=C(i,e,this.apiClient.projectId,this.apiClient.environment);return{signer:`server:${r}`}}return{signer:m(i)}})))!=null?n:[])})}getChainType(t){return t==="solana"?"solana":t==="stellar"?"stellar":"evm"}};f([x({logger:c,methodName:"walletFactory.getWallet",buildContext(t,e){if(typeof e[0]=="string"){let n=e[1];return{walletLocator:e[0],chain:n==null?void 0:n.chain}}let a=e[0];return{chain:a==null?void 0:a.chain}}})],h.prototype,"getWallet",1),f([x({logger:c,methodName:"walletFactory.createWallet",buildContext(t,e){return{chain:e[0].chain}}})],h.prototype,"createWallet",1);export{h as a};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-LTTG4ATS.js";import{a as s}from"./chunk-N4IWDL6M.js";import{a as l}from"./chunk-VVLFMWTS.js";import{a,b as i}from"./chunk-LEIODNM5.js";import{g as r}from"./chunk-J3R36SGJ.js";import{createCrossmint as C}from"@crossmint/common-sdk-base";import{WebAuthnP256 as p}from"ox";var o=class c{constructor(e){i(e.apiKey);let t=new l(e);this.walletFactory=new n(t),a.info("wallets.sdk.initialized")}static from(e){return new c(e)}getWallet(e,t){return r(this,null,function*(){if(typeof e=="string"){if(t==null)throw new Error("Args parameter is required when walletLocator is provided");return yield this.walletFactory.getWallet(e,t)}return yield this.walletFactory.getWallet(e)})}createWallet(e){return r(this,null,function*(){return yield this.walletFactory.createWallet(e)})}createDeviceSigner(e,t){return r(this,null,function*(){return yield s(e,t)})}createPasskeySigner(e){return r(this,null,function*(){let t=yield p.createCredential({name:e});return{type:"passkey",id:t.id,name:e,publicKey:{x:t.publicKey.x.toString(),y:t.publicKey.y.toString()}}})}};export{C as a,o as b};
1
+ import{a as n}from"./chunk-2W2B225C.js";import{a as s}from"./chunk-N4IWDL6M.js";import{a as l}from"./chunk-OEP5YPON.js";import{a,b as i}from"./chunk-BFCNGLFS.js";import{g as r}from"./chunk-J3R36SGJ.js";import{createCrossmint as C}from"@crossmint/common-sdk-base";import{WebAuthnP256 as p}from"ox";var o=class c{constructor(e){i(e.apiKey);let t=new l(e);this.walletFactory=new n(t),a.info("wallets.sdk.initialized")}static from(e){return new c(e)}getWallet(e,t){return r(this,null,function*(){if(typeof e=="string"){if(t==null)throw new Error("Args parameter is required when walletLocator is provided");return yield this.walletFactory.getWallet(e,t)}return yield this.walletFactory.getWallet(e)})}createWallet(e){return r(this,null,function*(){return yield this.walletFactory.createWallet(e)})}createDeviceSigner(e,t){return r(this,null,function*(){return yield s(e,t)})}createPasskeySigner(e){return r(this,null,function*(){let t=yield p.createCredential({name:e});return{type:"passkey",id:t.id,name:e,publicKey:{x:t.publicKey.x.toString(),y:t.publicKey.y.toString()}}})}};export{C as a,o as b};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGZP2JQ6Pcjs = require('./chunk-GZP2JQ6P.cjs');var _chunkGSGBIM5Ecjs = require('./chunk-GSGBIM5E.cjs');var _chunkCF5YIHZXcjs = require('./chunk-CF5YIHZX.cjs');var _chunkPGHXTBM2cjs = require('./chunk-PGHXTBM2.cjs');var _chunkSPTXAOFRcjs = require('./chunk-SPTXAOFR.cjs');var _chunkGEY3BU62cjs = require('./chunk-GEY3BU62.cjs');var _chunkPHPBBEXUcjs = require('./chunk-PHPBBEXU.cjs');var _chunkA33BEWR7cjs = require('./chunk-A33BEWR7.cjs');var _chunkOGP7B5O3cjs = require('./chunk-OGP7B5O3.cjs');var _chunkIJ632UXDcjs = require('./chunk-IJ632UXD.cjs');var _chunk6EZCCLTKcjs = require('./chunk-6EZCCLTK.cjs');var _chunkT3U46LK3cjs = require('./chunk-T3U46LK3.cjs');function M(r,e,n){switch(e.type){case"email":case"phone":return r==="solana"?new (0, _chunkPGHXTBM2cjs.a)(e):r==="stellar"?new (0, _chunkGSGBIM5Ecjs.a)(e):new (0, _chunkCF5YIHZXcjs.a)(e);case"api-key":return r==="solana"?new (0, _chunkIJ632UXDcjs.a)(e):new (0, _chunkPHPBBEXUcjs.a)(e);case"external-wallet":return r==="solana"?new (0, _chunk6EZCCLTKcjs.a)(e):r==="stellar"?new (0, _chunkSPTXAOFRcjs.a)(e):new (0, _chunkA33BEWR7cjs.a)(e);case"server":return _chunkGZP2JQ6Pcjs.a.call(void 0, r,e);case"passkey":return new (0, _chunkOGP7B5O3cjs.a)(e);case"device":if(n==null)throw new (0, _chunkT3U46LK3cjs.g)("Device signer key storage is required for device signers");return new (0, _chunkGEY3BU62cjs.a)(e,n)}}exports.a = M;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGZP2JQ6Pcjs = require('./chunk-GZP2JQ6P.cjs');var _chunkUPWRXCS4cjs = require('./chunk-UPWRXCS4.cjs');var _chunkHKHLMNN2cjs = require('./chunk-HKHLMNN2.cjs');var _chunkV4F7PAHIcjs = require('./chunk-V4F7PAHI.cjs');var _chunkSPTXAOFRcjs = require('./chunk-SPTXAOFR.cjs');var _chunkGEY3BU62cjs = require('./chunk-GEY3BU62.cjs');var _chunkPHPBBEXUcjs = require('./chunk-PHPBBEXU.cjs');var _chunkA33BEWR7cjs = require('./chunk-A33BEWR7.cjs');var _chunkOGP7B5O3cjs = require('./chunk-OGP7B5O3.cjs');var _chunkIJ632UXDcjs = require('./chunk-IJ632UXD.cjs');var _chunk6EZCCLTKcjs = require('./chunk-6EZCCLTK.cjs');var _chunkT3U46LK3cjs = require('./chunk-T3U46LK3.cjs');function M(r,e,n){switch(e.type){case"email":case"phone":return r==="solana"?new (0, _chunkV4F7PAHIcjs.a)(e):r==="stellar"?new (0, _chunkUPWRXCS4cjs.a)(e):new (0, _chunkHKHLMNN2cjs.a)(e);case"api-key":return r==="solana"?new (0, _chunkIJ632UXDcjs.a)(e):new (0, _chunkPHPBBEXUcjs.a)(e);case"external-wallet":return r==="solana"?new (0, _chunk6EZCCLTKcjs.a)(e):r==="stellar"?new (0, _chunkSPTXAOFRcjs.a)(e):new (0, _chunkA33BEWR7cjs.a)(e);case"server":return _chunkGZP2JQ6Pcjs.a.call(void 0, r,e);case"passkey":return new (0, _chunkOGP7B5O3cjs.a)(e);case"device":if(n==null)throw new (0, _chunkT3U46LK3cjs.g)("Device signer key storage is required for device signers");return new (0, _chunkGEY3BU62cjs.a)(e,n)}}exports.a = M;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkPTCXLH65cjs = require('./chunk-PTCXLH65.cjs');var _chunk3VSFHDFHcjs = require('./chunk-3VSFHDFH.cjs');var _chunk6EZCCLTKcjs = require('./chunk-6EZCCLTK.cjs');var _chunkT3U46LK3cjs = require('./chunk-T3U46LK3.cjs');var _chunkHFQTOJEGcjs = require('./chunk-HFQTOJEG.cjs');var _chunk2GKPWQBQcjs = require('./chunk-2GKPWQBQ.cjs');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var _commonsdkbase = require('@crossmint/common-sdk-base');var o=class o extends _chunkPTCXLH65cjs.a{constructor(n){super({chain:n.chain,address:n.address,owner:n.owner,options:_chunkPTCXLH65cjs.a.getOptions(n),alias:n.alias,recovery:_chunkPTCXLH65cjs.a.getRecovery(n),signer:n.signer,signers:_chunkPTCXLH65cjs.a.getInitialSigners(n)},_chunkPTCXLH65cjs.a.getApiClient(n))}static from(n){if(!_commonsdkbase.isValidSolanaAddress.call(void 0, n.address))throw new Error("Wallet is not a Solana wallet");return new o(n)}sendTransaction(n){return _chunk2GKPWQBQcjs.g.call(void 0, this,null,function*(){var d,p;_chunkHFQTOJEGcjs.a.info("solanaWallet.sendTransaction.start"),yield this.preAuthIfNeeded();let e=yield this.createTransaction(n);if((d=n.options)!=null&&d.prepareOnly)return _chunkHFQTOJEGcjs.a.info("solanaWallet.sendTransaction.prepared",{transactionId:e.id}),{hash:void 0,explorerLink:void 0,transactionId:e.id};let t={additionalSigners:(p=n.additionalSigners)==null?void 0:p.map(c=>new (0, _chunk6EZCCLTKcjs.a)({type:"external-wallet",address:c.publicKey.toString(),locator:`external-wallet:${c.publicKey.toString()}`,onSign:h=>(h.sign([c]),Promise.resolve(h))}))},a=yield this.approveTransactionAndWait(e.id,t);return _chunkHFQTOJEGcjs.a.info("solanaWallet.sendTransaction.success",{transactionId:e.id,hash:a.hash}),a})}createTransaction(n){return _chunk2GKPWQBQcjs.g.call(void 0, this,null,function*(){var a;let e;((a=n.options)==null?void 0:a.signer)==null?e=this.requireSigner().locator():typeof n.options.signer=="string"?e=n.options.signer:e=`server:${_chunk3VSFHDFHcjs.b.call(void 0, n.options.signer,this.chain,this.apiClient.projectId,this.apiClient.environment).derivedAddress}`;let s;"serializedTransaction"in n?s=n.serializedTransaction:s=_bs582.default.encode(n.transaction.serialize());let t=yield this.apiClient.createTransaction(this.walletLocator,{params:{transaction:s,signer:e}});if("error"in t)throw new (0, _chunkT3U46LK3cjs.t)(JSON.stringify(t));return t})}};_chunk2GKPWQBQcjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunkHFQTOJEGcjs.a,methodName:"solanaWallet.sendTransaction",buildContext(n){return{chain:n.chain,address:n.address}}})],o.prototype,"sendTransaction",1);var S=o;exports.a = S;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkJ7GVRM5Ecjs = require('./chunk-J7GVRM5E.cjs');var _chunk3VSFHDFHcjs = require('./chunk-3VSFHDFH.cjs');var _chunk6EZCCLTKcjs = require('./chunk-6EZCCLTK.cjs');var _chunkT3U46LK3cjs = require('./chunk-T3U46LK3.cjs');var _chunkMQ7C5IHYcjs = require('./chunk-MQ7C5IHY.cjs');var _chunk2GKPWQBQcjs = require('./chunk-2GKPWQBQ.cjs');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var _commonsdkbase = require('@crossmint/common-sdk-base');var o=class o extends _chunkJ7GVRM5Ecjs.a{constructor(n){super({chain:n.chain,address:n.address,owner:n.owner,options:_chunkJ7GVRM5Ecjs.a.getOptions(n),alias:n.alias,recovery:_chunkJ7GVRM5Ecjs.a.getRecovery(n),signer:n.signer,signers:_chunkJ7GVRM5Ecjs.a.getInitialSigners(n)},_chunkJ7GVRM5Ecjs.a.getApiClient(n))}static from(n){if(!_commonsdkbase.isValidSolanaAddress.call(void 0, n.address))throw new Error("Wallet is not a Solana wallet");return new o(n)}sendTransaction(n){return _chunk2GKPWQBQcjs.g.call(void 0, this,null,function*(){var d,p;_chunkMQ7C5IHYcjs.a.info("solanaWallet.sendTransaction.start"),yield this.preAuthIfNeeded();let e=yield this.createTransaction(n);if((d=n.options)!=null&&d.prepareOnly)return _chunkMQ7C5IHYcjs.a.info("solanaWallet.sendTransaction.prepared",{transactionId:e.id}),{hash:void 0,explorerLink:void 0,transactionId:e.id};let t={additionalSigners:(p=n.additionalSigners)==null?void 0:p.map(c=>new (0, _chunk6EZCCLTKcjs.a)({type:"external-wallet",address:c.publicKey.toString(),locator:`external-wallet:${c.publicKey.toString()}`,onSign:h=>(h.sign([c]),Promise.resolve(h))}))},a=yield this.approveTransactionAndWait(e.id,t);return _chunkMQ7C5IHYcjs.a.info("solanaWallet.sendTransaction.success",{transactionId:e.id,hash:a.hash}),a})}createTransaction(n){return _chunk2GKPWQBQcjs.g.call(void 0, this,null,function*(){var a;let e;((a=n.options)==null?void 0:a.signer)==null?e=this.requireSigner().locator():typeof n.options.signer=="string"?e=n.options.signer:e=`server:${_chunk3VSFHDFHcjs.b.call(void 0, n.options.signer,this.chain,this.apiClient.projectId,this.apiClient.environment).derivedAddress}`;let s;"serializedTransaction"in n?s=n.serializedTransaction:s=_bs582.default.encode(n.transaction.serialize());let t=yield this.apiClient.createTransaction(this.walletLocator,{params:{transaction:s,signer:e}});if("error"in t)throw new (0, _chunkT3U46LK3cjs.t)(JSON.stringify(t));return t})}};_chunk2GKPWQBQcjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunkMQ7C5IHYcjs.a,methodName:"solanaWallet.sendTransaction",buildContext(n){return{chain:n.chain,address:n.address}}})],o.prototype,"sendTransaction",1);var S=o;exports.a = S;
@@ -0,0 +1 @@
1
+ var s="@crossmint/wallets-sdk",t="1.0.15";var c="WALLETS_SDK",r=t,a=s,d=500;export{c as a,r as b,a as c,d};
@@ -0,0 +1 @@
1
+ import{a as d}from"./chunk-SSJ7QGO2.js";import{b}from"./chunk-RBSMBO4T.js";import{a as W}from"./chunk-JUVCT33M.js";import{l,p as h,t as w}from"./chunk-EXC7TCGL.js";import{a as r}from"./chunk-BFCNGLFS.js";import{c as g,g as u}from"./chunk-J3R36SGJ.js";import{createPublicClient as x,encodeFunctionData as E,http as N}from"viem";import{isValidEvmAddress as P,WithLoggerContext as f}from"@crossmint/common-sdk-base";var c=class c extends d{constructor(e){super({chain:e.chain,address:e.address,owner:e.owner,options:d.getOptions(e),alias:e.alias,recovery:d.getRecovery(e),signer:e.signer,signers:d.getInitialSigners(e)},d.getApiClient(e))}static from(e){if(!P(e.address))throw new Error("Wallet is not an EVM wallet");return new c(e)}sendTransaction(e){return u(this,null,function*(){var i;r.info("evmWallet.sendTransaction.start"),yield this.preAuthIfNeeded();let n=this.buildTransaction(e),t=yield this.createTransaction(n,e.options);if((i=e.options)!=null&&i.prepareOnly)return r.info("evmWallet.sendTransaction.prepared",{transactionId:t.id}),{hash:void 0,explorerLink:void 0,transactionId:t.id};let a=yield this.approveTransactionAndWait(t.id);return r.info("evmWallet.sendTransaction.success",{transactionId:t.id,hash:a.hash}),a})}signMessage(e){return u(this,null,function*(){var i;r.info("evmWallet.signMessage.start"),yield this.preAuthIfNeeded();let n=this.requireSigner(),t=yield this.apiClient.createSignature(this.walletLocator,{type:"message",params:{message:e.message,signer:n.locator(),chain:this.chain}});if("error"in t)throw r.error("evmWallet.signMessage.error",{error:t}),new h(JSON.stringify(t));if((i=e.options)!=null&&i.prepareOnly)return r.info("evmWallet.signMessage.prepared",{signatureId:t.id}),{signature:void 0,signatureId:t.id};let a=yield this.approveSignatureAndWait(t.id);return r.info("evmWallet.signMessage.success",{signatureId:t.id}),a})}signTypedData(e){return u(this,null,function*(){var S;r.info("evmWallet.signTypedData.start"),yield this.preAuthIfNeeded();let n=this.requireSigner(),{domain:t,message:a,primaryType:i,types:p,chain:m}=e;if(!t||!a||!p||!m)throw r.error("evmWallet.signTypedData.error",{error:"Invalid typed data"}),new l("Invalid typed data");let{name:y,version:v,chainId:I,verifyingContract:C,salt:M}=t;if(!y||!v||!I||!C)throw r.error("evmWallet.signTypedData.error",{error:"Invalid typed data domain"}),new l("Invalid typed data domain");let o=yield this.apiClient.createSignature(this.walletLocator,{type:"typed-data",params:{typedData:{domain:{name:y,version:v,chainId:Number(I),verifyingContract:C,salt:M},message:T(a),primaryType:i,types:p},signer:n.locator(),chain:m}});if("error"in o)throw r.error("evmWallet.signTypedData.error",{error:o}),new h(JSON.stringify(o));if((S=e.options)!=null&&S.prepareOnly)return r.info("evmWallet.signTypedData.prepared",{signatureId:o.id}),{signature:void 0,signatureId:o.id};let O=yield this.approveSignatureAndWait(o.id);return r.info("evmWallet.signTypedData.success",{signatureId:o.id}),O})}getViemClient(e){var n;return x({transport:(n=e==null?void 0:e.transport)!=null?n:N(),chain:W(this.chain)})}createTransaction(e,n){return u(this,null,function*(){let t;(n==null?void 0:n.signer)==null?t=this.requireSigner().locator():typeof n.signer=="string"?t=n.signer:t=`server:${b(n.signer,this.chain,this.apiClient.projectId,this.apiClient.environment).derivedAddress}`;let a=yield this.apiClient.createTransaction(this.walletLocator,{params:{signer:t,chain:this.chain,calls:[e]}});if("error"in a)throw new w(JSON.stringify(a));return a})}buildTransaction(e){var n,t,a,i,p;if("transaction"in e)return{transaction:e.transaction};if(e.abi==null)return{to:e.to,value:(t=(n=e.value)==null?void 0:n.toString())!=null?t:"0",data:(a=e.data)!=null?a:"0x"};if(!e.functionName)throw new Error("Function name is required");return{to:e.to,value:(p=(i=e.value)==null?void 0:i.toString())!=null?p:"0",data:E({abi:e.abi,functionName:e.functionName,args:e.args})}}};g([f({logger:r,methodName:"evmWallet.sendTransaction",buildContext(e){return{chain:e.chain,address:e.address}}})],c.prototype,"sendTransaction",1),g([f({logger:r,methodName:"evmWallet.signMessage",buildContext(e){return{chain:e.chain,address:e.address}}})],c.prototype,"signMessage",1),g([f({logger:r,methodName:"evmWallet.signTypedData",buildContext(e){return{chain:e.chain,address:e.address}}})],c.prototype,"signTypedData",1);var D=c;function T(s){return typeof s=="bigint"?s.toString():Array.isArray(s)?s.map(T):s!==null&&typeof s=="object"?Object.fromEntries(Object.entries(s).map(([e,n])=>[e,T(n)])):s}export{D as a};
@@ -1 +1 @@
1
- import{b as n,c as i}from"./chunk-6Z4EZBIA.js";import{SdkLogger as d,BrowserDatadogSink as k,detectPlatform as g,validateAPIKey as l,ServerDatadogSink as m}from"@crossmint/common-sdk-base";var t=new d;function f(s){let o=g(),e=l(s);if(!e.isValid)throw new Error(`Invalid API key: ${e.message}`);let{environment:a,projectId:c}=e;switch(t.init({packageName:i,packageVersion:n,environment:a,projectId:c,platform:o}),o){case"browser":{let r=new k(a);t.addSink(r);break}case"react-native":break;case"server":{let r=new m(a);t.addSink(r);break}default:break}}export{t as a,f as b};
1
+ import{b as n,c as i}from"./chunk-6E6H6VGD.js";import{SdkLogger as d,BrowserDatadogSink as k,detectPlatform as g,validateAPIKey as l,ServerDatadogSink as m}from"@crossmint/common-sdk-base";var t=new d;function f(s){let o=g(),e=l(s);if(!e.isValid)throw new Error(`Invalid API key: ${e.message}`);let{environment:a,projectId:c}=e;switch(t.init({packageName:i,packageVersion:n,environment:a,projectId:c,platform:o}),o){case"browser":{let r=new k(a);t.addSink(r);break}case"react-native":break;case"server":{let r=new m(a);t.addSink(r);break}default:break}}export{t as a,f as b};