@crossmint/wallets-sdk 0.20.2 → 1.0.0-beta.2

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 (390) hide show
  1. package/README.md +6 -6
  2. package/dist/api/__tests__/constants.cjs +1 -31
  3. package/dist/api/__tests__/constants.d.cts +9 -1
  4. package/dist/api/__tests__/constants.d.ts +9 -1
  5. package/dist/api/__tests__/constants.js +1 -31
  6. package/dist/api/__tests__/test-utils.cjs +1 -372
  7. package/dist/api/__tests__/test-utils.d.cts +10 -4
  8. package/dist/api/__tests__/test-utils.d.ts +10 -4
  9. package/dist/api/__tests__/test-utils.js +1 -372
  10. package/dist/api/client.cjs +1 -10
  11. package/dist/api/client.d.cts +15 -6
  12. package/dist/api/client.d.ts +15 -6
  13. package/dist/api/client.js +1 -10
  14. package/dist/api/gen/client.gen.cjs +1 -7
  15. package/dist/api/gen/client.gen.js +1 -7
  16. package/dist/api/gen/index.cjs +1 -179
  17. package/dist/api/gen/index.d.cts +2 -2
  18. package/dist/api/gen/index.d.ts +2 -2
  19. package/dist/api/gen/index.js +1 -179
  20. package/dist/api/gen/sdk.gen.cjs +1 -178
  21. package/dist/api/gen/sdk.gen.d.cts +18 -373
  22. package/dist/api/gen/sdk.gen.d.ts +18 -373
  23. package/dist/api/gen/sdk.gen.js +1 -178
  24. package/dist/api/gen/types.gen.d.cts +3125 -5778
  25. package/dist/api/gen/types.gen.d.ts +3125 -5778
  26. package/dist/api/gen/types.gen.js +1 -1
  27. package/dist/api/index.cjs +1 -12
  28. package/dist/api/index.d.cts +7 -1
  29. package/dist/api/index.d.ts +7 -1
  30. package/dist/api/index.js +1 -12
  31. package/dist/api/types.d.cts +11 -55
  32. package/dist/api/types.d.ts +11 -55
  33. package/dist/api/types.js +1 -1
  34. package/dist/chains/chains.cjs +1 -24
  35. package/dist/chains/chains.js +1 -24
  36. package/dist/chains/definitions/arcTestnet.cjs +1 -7
  37. package/dist/chains/definitions/arcTestnet.js +1 -7
  38. package/dist/chains/definitions/story.cjs +1 -7
  39. package/dist/chains/definitions/story.js +1 -7
  40. package/dist/chains/definitions/storyTestnet.cjs +1 -7
  41. package/dist/chains/definitions/storyTestnet.js +1 -7
  42. package/dist/chains/definitions/tempo.cjs +1 -7
  43. package/dist/chains/definitions/tempo.js +1 -7
  44. package/dist/chains/definitions/tempoTestnet.cjs +1 -7
  45. package/dist/chains/definitions/tempoTestnet.js +1 -7
  46. package/dist/chunk-2GKPWQBQ.cjs +1 -0
  47. package/dist/chunk-2YLRFJ66.js +1 -0
  48. package/dist/chunk-3HLCTEWX.js +1 -0
  49. package/dist/chunk-4ADZVYB5.cjs +1 -0
  50. package/dist/chunk-576HP23H.cjs +1 -0
  51. package/dist/chunk-5IC7UWND.cjs +1 -0
  52. package/dist/chunk-5M7IRODB.js +1 -0
  53. package/dist/chunk-5QIW67NU.cjs +1 -0
  54. package/dist/chunk-5X4EOJFG.cjs +1 -0
  55. package/dist/chunk-5YG5A77Q.js +1 -0
  56. package/dist/chunk-67Z4SJMH.js +1 -0
  57. package/dist/chunk-6MGMZ3SI.cjs +1 -0
  58. package/dist/chunk-6OXELDPD.js +1 -0
  59. package/dist/chunk-7VUOD7EI.cjs +1 -0
  60. package/dist/chunk-A33BEWR7.cjs +1 -0
  61. package/dist/chunk-BEW7JDW6.cjs +1 -0
  62. package/dist/chunk-BFIHTTMM.cjs +1 -0
  63. package/dist/chunk-BW27ZG6O.cjs +1 -0
  64. package/dist/chunk-CUHDOBKN.cjs +1 -0
  65. package/dist/chunk-D5YDWSO5.cjs +1 -0
  66. package/dist/chunk-DIGDDKSF.js +1 -0
  67. package/dist/chunk-EE4ITUGS.js +1 -0
  68. package/dist/chunk-EIHK5TYE.js +1 -0
  69. package/dist/chunk-ENU3EKBG.cjs +1 -0
  70. package/dist/chunk-F6PYIH4E.cjs +1 -0
  71. package/dist/chunk-FT5EVMLB.js +1 -0
  72. package/dist/chunk-G5R6VQGJ.js +1 -0
  73. package/dist/chunk-GDRKG42L.cjs +1 -0
  74. package/dist/chunk-GEY574TH.cjs +1 -0
  75. package/dist/chunk-GOXB2RBF.js +1 -0
  76. package/dist/chunk-HOWDLODW.cjs +1 -0
  77. package/dist/chunk-HRUMWG2F.cjs +1 -0
  78. package/dist/chunk-IFD3BVMM.js +1 -0
  79. package/dist/chunk-IGRPHTXZ.cjs +1 -0
  80. package/dist/chunk-IR5WN6FQ.cjs +1 -0
  81. package/dist/chunk-ISXH7QXG.cjs +1 -0
  82. package/dist/chunk-J33QM2ID.cjs +1 -0
  83. package/dist/chunk-J3R36SGJ.js +1 -0
  84. package/dist/chunk-JBP52JOH.cjs +1 -0
  85. package/dist/chunk-JINIR3YK.cjs +1 -0
  86. package/dist/chunk-JJMKQ5PK.cjs +1 -0
  87. package/dist/chunk-JLT4EA2Z.js +1 -0
  88. package/dist/chunk-JUKCHXJ6.cjs +1 -0
  89. package/dist/chunk-KKQBZXFE.js +1 -0
  90. package/dist/chunk-KUP7H7X2.js +1 -0
  91. package/dist/chunk-L52GDMSH.js +0 -0
  92. package/dist/chunk-LB4V5KKI.js +1 -0
  93. package/dist/chunk-MCBBBEJT.js +1 -0
  94. package/dist/chunk-MMFZP54X.js +1 -0
  95. package/dist/chunk-N5WVT7QE.js +1 -0
  96. package/dist/chunk-NCXMTHC4.js +1 -0
  97. package/dist/chunk-NF7KU2ML.cjs +1 -0
  98. package/dist/chunk-NJWSHT2H.cjs +1 -0
  99. package/dist/chunk-NKR3UAMA.cjs +1 -0
  100. package/dist/chunk-NPCKXKQ7.js +1 -0
  101. package/dist/chunk-NX256LAH.cjs +1 -0
  102. package/dist/chunk-O4FVTK7X.cjs +1 -0
  103. package/dist/chunk-O6VBO7KG.js +1 -0
  104. package/dist/chunk-OQZTL6ZG.js +1 -0
  105. package/dist/chunk-P6MB5P2F.js +1 -0
  106. package/dist/chunk-PDHWPAGW.js +1 -0
  107. package/dist/chunk-PHXT77LR.js +1 -0
  108. package/dist/chunk-PKYRYRX4.js +1 -0
  109. package/dist/chunk-PSXRNSOE.js +1 -0
  110. package/dist/chunk-QM3BB4E2.js +0 -0
  111. package/dist/chunk-R3EQXI46.js +1 -0
  112. package/dist/chunk-RC6KDONJ.cjs +1 -0
  113. package/dist/chunk-RLAW2ERD.js +1 -0
  114. package/dist/chunk-RN77IYDQ.js +1 -0
  115. package/dist/chunk-RXRRXB74.cjs +1 -0
  116. package/dist/chunk-S3DMYMEQ.js +1 -0
  117. package/dist/chunk-S3DYQVRD.js +1 -0
  118. package/dist/chunk-S4O54O4C.cjs +1 -0
  119. package/dist/chunk-S5KDZFZ7.cjs +1 -0
  120. package/dist/chunk-SCEPJO4Q.cjs +1 -0
  121. package/dist/chunk-SH7KRBXV.js +1 -0
  122. package/dist/chunk-SP2YD44M.js +1 -0
  123. package/dist/chunk-SPTXAOFR.cjs +1 -0
  124. package/dist/chunk-SPVAZXRY.js +1 -0
  125. package/dist/chunk-STYSP6KL.cjs +1 -0
  126. package/dist/chunk-SVIKBM3S.js +1 -0
  127. package/dist/chunk-TFMNBTFK.cjs +1 -0
  128. package/dist/chunk-TOAFCAVT.js +0 -0
  129. package/dist/chunk-TTSJFEM5.cjs +1 -0
  130. package/dist/chunk-TYFWX53A.js +1 -0
  131. package/dist/chunk-U7QSF6P7.cjs +1 -0
  132. package/dist/chunk-UE3WVHTM.cjs +1 -0
  133. package/dist/chunk-W5EH3HYF.cjs +1 -0
  134. package/dist/chunk-WBIKVPHW.js +1 -0
  135. package/dist/chunk-WCGUGIGJ.js +1 -0
  136. package/dist/chunk-WT5MDUZY.js +1 -0
  137. package/dist/chunk-WTVI4AL4.js +1 -0
  138. package/dist/chunk-WYMBO52A.js +1 -0
  139. package/dist/chunk-XNZLCUTY.js +1 -0
  140. package/dist/chunk-XS5B3TUE.js +1 -0
  141. package/dist/chunk-YFAJXQAM.cjs +1 -0
  142. package/dist/chunk-YGL4ITFK.cjs +1 -0
  143. package/dist/chunk-YLRD3ANZ.cjs +1 -0
  144. package/dist/chunk-YQQWKSNT.cjs +1 -0
  145. package/dist/chunk-ZACCKNGY.cjs +1 -0
  146. package/dist/chunk-ZE4NT3CJ.js +1 -0
  147. package/dist/chunk-ZKL4RO4I.cjs +1 -0
  148. package/dist/index.cjs +1 -60
  149. package/dist/index.d.cts +9 -7
  150. package/dist/index.d.ts +9 -7
  151. package/dist/index.js +1 -60
  152. package/dist/logger/index.cjs +1 -11
  153. package/dist/logger/index.js +1 -11
  154. package/dist/logger/init.cjs +1 -10
  155. package/dist/logger/init.js +1 -10
  156. package/dist/sdk.cjs +1 -39
  157. package/dist/sdk.d.cts +25 -23
  158. package/dist/sdk.d.ts +25 -23
  159. package/dist/sdk.js +1 -39
  160. package/dist/signers/device.cjs +1 -0
  161. package/dist/signers/device.d.cts +23 -0
  162. package/dist/signers/device.d.ts +23 -0
  163. package/dist/signers/device.js +1 -0
  164. package/dist/signers/evm-api-key.cjs +1 -7
  165. package/dist/signers/evm-api-key.d.cts +8 -4
  166. package/dist/signers/evm-api-key.d.ts +8 -4
  167. package/dist/signers/evm-api-key.js +1 -7
  168. package/dist/signers/evm-external-wallet.cjs +1 -7
  169. package/dist/signers/evm-external-wallet.d.cts +13 -14
  170. package/dist/signers/evm-external-wallet.d.ts +13 -14
  171. package/dist/signers/evm-external-wallet.js +1 -7
  172. package/dist/signers/external-wallet-signer.cjs +1 -0
  173. package/dist/signers/external-wallet-signer.d.cts +28 -0
  174. package/dist/signers/external-wallet-signer.d.ts +28 -0
  175. package/dist/signers/external-wallet-signer.js +1 -0
  176. package/dist/signers/index.cjs +1 -24
  177. package/dist/signers/index.d.cts +7 -3
  178. package/dist/signers/index.d.ts +7 -3
  179. package/dist/signers/index.js +1 -24
  180. package/dist/signers/non-custodial/index.cjs +1 -27
  181. package/dist/signers/non-custodial/index.d.cts +7 -3
  182. package/dist/signers/non-custodial/index.d.ts +7 -3
  183. package/dist/signers/non-custodial/index.js +1 -27
  184. package/dist/signers/non-custodial/ncs-evm-signer.cjs +1 -13
  185. package/dist/signers/non-custodial/ncs-evm-signer.d.cts +7 -3
  186. package/dist/signers/non-custodial/ncs-evm-signer.d.ts +7 -3
  187. package/dist/signers/non-custodial/ncs-evm-signer.js +1 -13
  188. package/dist/signers/non-custodial/ncs-iframe-manager.cjs +1 -7
  189. package/dist/signers/non-custodial/ncs-iframe-manager.js +1 -7
  190. package/dist/signers/non-custodial/ncs-signer.cjs +1 -14
  191. package/dist/signers/non-custodial/ncs-signer.d.cts +8 -4
  192. package/dist/signers/non-custodial/ncs-signer.d.ts +8 -4
  193. package/dist/signers/non-custodial/ncs-signer.js +1 -14
  194. package/dist/signers/non-custodial/ncs-solana-signer.cjs +1 -13
  195. package/dist/signers/non-custodial/ncs-solana-signer.d.cts +7 -3
  196. package/dist/signers/non-custodial/ncs-solana-signer.d.ts +7 -3
  197. package/dist/signers/non-custodial/ncs-solana-signer.js +1 -13
  198. package/dist/signers/non-custodial/ncs-stellar-signer.cjs +1 -13
  199. package/dist/signers/non-custodial/ncs-stellar-signer.d.cts +7 -3
  200. package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +7 -3
  201. package/dist/signers/non-custodial/ncs-stellar-signer.js +1 -13
  202. package/dist/signers/passkey.cjs +1 -7
  203. package/dist/signers/passkey.d.cts +8 -4
  204. package/dist/signers/passkey.d.ts +8 -4
  205. package/dist/signers/passkey.js +1 -7
  206. package/dist/signers/server/assemble-server-signer.cjs +1 -0
  207. package/dist/signers/server/assemble-server-signer.d.cts +15 -0
  208. package/dist/signers/server/assemble-server-signer.d.ts +15 -0
  209. package/dist/signers/server/assemble-server-signer.js +1 -0
  210. package/dist/signers/server/evm-server-signer.cjs +1 -0
  211. package/dist/signers/server/evm-server-signer.d.cts +29 -0
  212. package/dist/signers/server/evm-server-signer.d.ts +29 -0
  213. package/dist/signers/server/evm-server-signer.js +1 -0
  214. package/dist/signers/server/helpers/derive-server-signer.cjs +1 -0
  215. package/dist/signers/server/helpers/derive-server-signer.d.cts +19 -0
  216. package/dist/signers/server/helpers/derive-server-signer.d.ts +19 -0
  217. package/dist/signers/server/helpers/derive-server-signer.js +1 -0
  218. package/dist/signers/server/helpers/get-chain-type.cjs +1 -0
  219. package/dist/signers/server/helpers/get-chain-type.d.cts +7 -0
  220. package/dist/signers/server/helpers/get-chain-type.d.ts +7 -0
  221. package/dist/signers/server/helpers/get-chain-type.js +1 -0
  222. package/dist/signers/server/helpers/index.cjs +1 -0
  223. package/dist/signers/server/helpers/index.d.cts +13 -0
  224. package/dist/signers/server/helpers/index.d.ts +13 -0
  225. package/dist/signers/server/helpers/index.js +1 -0
  226. package/dist/signers/server/index.cjs +1 -0
  227. package/dist/signers/server/index.d.cts +16 -0
  228. package/dist/signers/server/index.d.ts +16 -0
  229. package/dist/signers/server/index.js +1 -0
  230. package/dist/signers/server/solana-server-signer.cjs +1 -0
  231. package/dist/signers/server/solana-server-signer.d.cts +29 -0
  232. package/dist/signers/server/solana-server-signer.d.ts +29 -0
  233. package/dist/signers/server/solana-server-signer.js +1 -0
  234. package/dist/signers/server/stellar-server-signer.cjs +1 -0
  235. package/dist/signers/server/stellar-server-signer.d.cts +29 -0
  236. package/dist/signers/server/stellar-server-signer.d.ts +29 -0
  237. package/dist/signers/server/stellar-server-signer.js +1 -0
  238. package/dist/signers/solana-api-key.cjs +1 -7
  239. package/dist/signers/solana-api-key.d.cts +8 -4
  240. package/dist/signers/solana-api-key.d.ts +8 -4
  241. package/dist/signers/solana-api-key.js +1 -7
  242. package/dist/signers/solana-external-wallet.cjs +1 -8
  243. package/dist/signers/solana-external-wallet.d.cts +10 -11
  244. package/dist/signers/solana-external-wallet.d.ts +10 -11
  245. package/dist/signers/solana-external-wallet.js +1 -8
  246. package/dist/signers/stellar-external-wallet.cjs +1 -7
  247. package/dist/signers/stellar-external-wallet.d.cts +10 -10
  248. package/dist/signers/stellar-external-wallet.d.ts +10 -10
  249. package/dist/signers/stellar-external-wallet.js +1 -7
  250. package/dist/signers/types.cjs +1 -9
  251. package/dist/signers/types.d.cts +10 -90
  252. package/dist/signers/types.d.ts +10 -90
  253. package/dist/signers/types.js +1 -9
  254. package/dist/types/base32.js.d.cjs +1 -0
  255. package/dist/types/base32.js.d.d.cts +4 -0
  256. package/dist/types/base32.js.d.d.ts +4 -0
  257. package/dist/types/base32.js.d.js +0 -0
  258. package/dist/types-BDRS_MOb.d.ts +425 -0
  259. package/dist/types-D-xASbms.d.cts +425 -0
  260. package/dist/utils/constants.cjs +1 -13
  261. package/dist/utils/constants.js +1 -13
  262. package/dist/utils/device-signers/DeviceSignerKeyStorage.cjs +1 -0
  263. package/dist/utils/device-signers/DeviceSignerKeyStorage.d.cts +66 -0
  264. package/dist/utils/device-signers/DeviceSignerKeyStorage.d.ts +66 -0
  265. package/dist/utils/device-signers/DeviceSignerKeyStorage.js +1 -0
  266. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.cjs +1 -0
  267. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.d.cts +48 -0
  268. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.d.ts +48 -0
  269. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.js +1 -0
  270. package/dist/utils/device-signers/createDeviceSigner.cjs +1 -0
  271. package/dist/utils/device-signers/createDeviceSigner.d.cts +27 -0
  272. package/dist/utils/device-signers/createDeviceSigner.d.ts +27 -0
  273. package/dist/utils/device-signers/createDeviceSigner.js +1 -0
  274. package/dist/utils/device-signers/index.cjs +1 -0
  275. package/dist/utils/device-signers/index.d.cts +13 -0
  276. package/dist/utils/device-signers/index.d.ts +13 -0
  277. package/dist/utils/device-signers/index.js +1 -0
  278. package/dist/utils/errors.cjs +1 -55
  279. package/dist/utils/errors.js +1 -55
  280. package/dist/utils/server-key-derivation.cjs +1 -0
  281. package/dist/utils/server-key-derivation.d.cts +20 -0
  282. package/dist/utils/server-key-derivation.d.ts +20 -0
  283. package/dist/utils/server-key-derivation.js +1 -0
  284. package/dist/utils/signer-locator.cjs +1 -0
  285. package/dist/utils/signer-locator.d.cts +26 -0
  286. package/dist/utils/signer-locator.d.ts +26 -0
  287. package/dist/utils/signer-locator.js +1 -0
  288. package/dist/utils/signer-mapping.cjs +1 -0
  289. package/dist/utils/signer-mapping.d.cts +32 -0
  290. package/dist/utils/signer-mapping.d.ts +32 -0
  291. package/dist/utils/signer-mapping.js +1 -0
  292. package/dist/utils/signer-validation.cjs +1 -10
  293. package/dist/utils/signer-validation.js +1 -10
  294. package/dist/wallets/__tests__/setup.cjs +1 -36
  295. package/dist/wallets/__tests__/setup.js +1 -36
  296. package/dist/wallets/__tests__/test-helpers.cjs +1 -93
  297. package/dist/wallets/__tests__/test-helpers.d.cts +6 -6
  298. package/dist/wallets/__tests__/test-helpers.d.ts +6 -6
  299. package/dist/wallets/__tests__/test-helpers.js +1 -93
  300. package/dist/wallets/evm.cjs +1 -25
  301. package/dist/wallets/evm.d.cts +2 -3
  302. package/dist/wallets/evm.d.ts +2 -3
  303. package/dist/wallets/evm.js +1 -25
  304. package/dist/wallets/solana.cjs +1 -26
  305. package/dist/wallets/solana.d.cts +5 -4
  306. package/dist/wallets/solana.d.ts +5 -4
  307. package/dist/wallets/solana.js +1 -26
  308. package/dist/wallets/stellar.cjs +1 -25
  309. package/dist/wallets/stellar.d.cts +2 -3
  310. package/dist/wallets/stellar.d.ts +2 -3
  311. package/dist/wallets/stellar.js +1 -25
  312. package/dist/wallets/types.d.cts +9 -168
  313. package/dist/wallets/types.d.ts +9 -168
  314. package/dist/wallets/wallet-factory.cjs +1 -33
  315. package/dist/wallets/wallet-factory.d.cts +17 -13
  316. package/dist/wallets/wallet-factory.d.ts +17 -13
  317. package/dist/wallets/wallet-factory.js +1 -33
  318. package/dist/wallets/wallet.cjs +1 -24
  319. package/dist/wallets/wallet.d.cts +97 -32
  320. package/dist/wallets/wallet.d.ts +97 -32
  321. package/dist/wallets/wallet.js +1 -24
  322. package/package.json +10 -5
  323. package/dist/chunk-2I2OFGNL.js +0 -36
  324. package/dist/chunk-2T5HHKUI.js +0 -19
  325. package/dist/chunk-2WBSPOWU.js +0 -223
  326. package/dist/chunk-3U6UAYOV.js +0 -25
  327. package/dist/chunk-47R3UV3J.cjs +0 -58
  328. package/dist/chunk-47WKYTRN.js +0 -63
  329. package/dist/chunk-4GFSUI2I.cjs +0 -66
  330. package/dist/chunk-55V4VMTX.cjs +0 -25
  331. package/dist/chunk-66UY53KP.cjs +0 -336
  332. package/dist/chunk-6FG5QXII.cjs +0 -110
  333. package/dist/chunk-6UMJYMAY.js +0 -82
  334. package/dist/chunk-7GOUUPS4.js +0 -36
  335. package/dist/chunk-7TT3VUDF.cjs +0 -84
  336. package/dist/chunk-7USEVMTW.cjs +0 -21
  337. package/dist/chunk-A6E67ZZP.js +0 -237
  338. package/dist/chunk-ABMZ3ZVN.js +0 -52
  339. package/dist/chunk-ASE2FXWP.js +0 -65
  340. package/dist/chunk-BMMZIPXT.js +0 -778
  341. package/dist/chunk-CMBFV325.js +0 -69
  342. package/dist/chunk-COR3CNRW.cjs +0 -778
  343. package/dist/chunk-F7L2TZ3I.cjs +0 -21
  344. package/dist/chunk-FHMKNG62.js +0 -741
  345. package/dist/chunk-FICVKSXZ.js +0 -84
  346. package/dist/chunk-FOOISYCJ.js +0 -66
  347. package/dist/chunk-G6QJHFSY.cjs +0 -74
  348. package/dist/chunk-HTSQPZHW.cjs +0 -25
  349. package/dist/chunk-HXJ3YPAN.js +0 -110
  350. package/dist/chunk-IDKGJO2G.cjs +0 -115
  351. package/dist/chunk-IOMKHF6R.cjs +0 -44
  352. package/dist/chunk-IPO25BCU.js +0 -43
  353. package/dist/chunk-JREZWZ2S.cjs +0 -52
  354. package/dist/chunk-JSWTGW46.cjs +0 -36
  355. package/dist/chunk-JWMQALLN.js +0 -21
  356. package/dist/chunk-KQH5ZXJ4.js +0 -336
  357. package/dist/chunk-KT3CVXFG.js +0 -9
  358. package/dist/chunk-MMISP35W.js +0 -21
  359. package/dist/chunk-MRZXYVQO.cjs +0 -82
  360. package/dist/chunk-NIBKCMQ2.cjs +0 -19
  361. package/dist/chunk-PIFD6KNH.js +0 -59
  362. package/dist/chunk-PJOJIRTY.js +0 -74
  363. package/dist/chunk-PK7J3Y3L.js +0 -44
  364. package/dist/chunk-PM7BGATN.cjs +0 -237
  365. package/dist/chunk-POG76HDD.cjs +0 -741
  366. package/dist/chunk-PUO4QNXH.js +0 -89
  367. package/dist/chunk-Q5KNPVYI.cjs +0 -59
  368. package/dist/chunk-R4AW5ADG.cjs +0 -16
  369. package/dist/chunk-R6DH4V7S.cjs +0 -69
  370. package/dist/chunk-RBHGZDDX.cjs +0 -58
  371. package/dist/chunk-RHR6P2KP.cjs +0 -15
  372. package/dist/chunk-RYQI3RXL.cjs +0 -247
  373. package/dist/chunk-SGINWAB6.js +0 -155
  374. package/dist/chunk-T2XUADHW.js +0 -58
  375. package/dist/chunk-TYQ4YIP7.js +0 -16
  376. package/dist/chunk-U3NV7UY7.js +0 -323
  377. package/dist/chunk-UO2J2ZB2.cjs +0 -65
  378. package/dist/chunk-W7K5E64Q.js +0 -247
  379. package/dist/chunk-WDZY4PP4.cjs +0 -223
  380. package/dist/chunk-WHTECI7J.cjs +0 -89
  381. package/dist/chunk-WJUPOCKJ.js +0 -15
  382. package/dist/chunk-WWW6IGZ7.js +0 -115
  383. package/dist/chunk-XC2V34TS.cjs +0 -155
  384. package/dist/chunk-XOCC3MPK.cjs +0 -36
  385. package/dist/chunk-ZAX22GSI.cjs +0 -323
  386. package/dist/chunk-ZBLW42YE.js +0 -25
  387. package/dist/chunk-ZNAGDENG.cjs +0 -43
  388. package/dist/chunk-ZP4ZZCIE.js +0 -58
  389. package/dist/chunk-ZT7EGOCI.cjs +0 -9
  390. package/dist/chunk-ZTEMOYS2.cjs +0 -63
@@ -1,336 +0,0 @@
1
- import {
2
- compareSignerConfigs,
3
- normalizeValueForComparison
4
- } from "./chunk-ZP4ZZCIE.js";
5
- import {
6
- Wallet
7
- } from "./chunk-FHMKNG62.js";
8
- import {
9
- assembleSigner
10
- } from "./chunk-T2XUADHW.js";
11
- import {
12
- validateChainForEnvironment
13
- } from "./chunk-2WBSPOWU.js";
14
- import {
15
- WalletCreationError,
16
- WalletNotAvailableError
17
- } from "./chunk-SGINWAB6.js";
18
- import {
19
- walletsLogger
20
- } from "./chunk-ABMZ3ZVN.js";
21
- import {
22
- __async,
23
- __decorateClass,
24
- __spreadProps,
25
- __spreadValues
26
- } from "./chunk-ASE2FXWP.js";
27
-
28
- // src/wallets/wallet-factory.ts
29
- import { WithLoggerContext } from "@crossmint/common-sdk-base";
30
- import { WebAuthnP256 } from "ox";
31
- var DELEGATED_SIGNER_MISMATCH_ERROR = "When 'delegatedSigners' is provided to a method that may fetch an existing wallet, each specified delegated signer must exist in that wallet's configuration.";
32
- var WalletFactory = class {
33
- constructor(apiClient) {
34
- this.apiClient = apiClient;
35
- }
36
- getOrCreateWallet(args) {
37
- return __async(this, null, function* () {
38
- if (this.apiClient.isServerSide) {
39
- walletsLogger.error("walletFactory.getOrCreateWallet.error", {
40
- error: "getOrCreateWallet can only be called from client-side code"
41
- });
42
- throw new WalletCreationError(
43
- "getOrCreateWallet can only be called from client-side code.\n- Make sure you're running this in the browser (or another client environment), not on your server.\n- Use your Crossmint Client API Key (not a server key)."
44
- );
45
- }
46
- args = __spreadProps(__spreadValues({}, args), { chain: validateChainForEnvironment(args.chain, this.apiClient.environment) });
47
- const locator = this.getWalletLocator(args);
48
- walletsLogger.info("walletFactory.getOrCreateWallet.start");
49
- const existingWallet = yield this.apiClient.getWallet(locator);
50
- if (existingWallet != null && !("error" in existingWallet)) {
51
- walletsLogger.info("walletFactory.getOrCreateWallet.existing", {
52
- address: existingWallet.address
53
- });
54
- return this.createWalletInstance(existingWallet, args);
55
- }
56
- walletsLogger.info("walletFactory.getOrCreateWallet.creating");
57
- return this.createWalletInternal(args);
58
- });
59
- }
60
- getWallet(walletLocator, args) {
61
- return __async(this, null, function* () {
62
- if (!this.apiClient.isServerSide) {
63
- walletsLogger.error("walletFactory.getWallet.error", {
64
- error: "getWallet is not supported on client side"
65
- });
66
- throw new WalletCreationError("getWallet is not supported on client side, use getOrCreateWallet instead");
67
- }
68
- args = __spreadProps(__spreadValues({}, args), { chain: validateChainForEnvironment(args.chain, this.apiClient.environment) });
69
- walletsLogger.info("walletFactory.getWallet.start");
70
- const existingWallet = yield this.apiClient.getWallet(walletLocator);
71
- if ("error" in existingWallet) {
72
- walletsLogger.warn("walletFactory.getWallet.notFound", {
73
- error: existingWallet.error
74
- });
75
- throw new WalletNotAvailableError(JSON.stringify(existingWallet));
76
- }
77
- walletsLogger.info("walletFactory.getWallet.success", {
78
- address: existingWallet.address
79
- });
80
- return this.createWalletInstance(existingWallet, args);
81
- });
82
- }
83
- createWallet(args) {
84
- return __async(this, null, function* () {
85
- args = __spreadProps(__spreadValues({}, args), { chain: validateChainForEnvironment(args.chain, this.apiClient.environment) });
86
- return this.createWalletInternal(args);
87
- });
88
- }
89
- createWalletInternal(args) {
90
- return __async(this, null, function* () {
91
- var _a, _b, _c, _d, _e;
92
- yield (_c = (_b = (_a = args.options) == null ? void 0 : _a.experimental_callbacks) == null ? void 0 : _b.onWalletCreationStart) == null ? void 0 : _c.call(_b);
93
- walletsLogger.info("walletFactory.createWallet.start");
94
- this.mutateSignerFromCustomAuth(args, true);
95
- const adminSigner = args.signer.type === "passkey" ? yield this.createPasskeyAdminSigner(args.signer) : args.signer;
96
- const walletResponse = yield this.apiClient.createWallet({
97
- type: "smart",
98
- chainType: this.getChainType(args.chain),
99
- config: __spreadValues(__spreadValues({
100
- adminSigner
101
- }, (args == null ? void 0 : args.plugins) ? { plugins: args.plugins } : {}), args.delegatedSigners != null ? { delegatedSigners: args.delegatedSigners } : {}),
102
- owner: (_d = args.owner) != null ? _d : void 0,
103
- alias: (_e = args.alias) != null ? _e : void 0
104
- });
105
- if ("error" in walletResponse) {
106
- walletsLogger.error("walletFactory.createWallet.error", {
107
- error: walletResponse.error
108
- });
109
- throw new WalletCreationError(JSON.stringify(walletResponse));
110
- }
111
- walletsLogger.info("walletFactory.createWallet.success", {
112
- address: walletResponse.address
113
- });
114
- return this.createWalletInstance(walletResponse, args);
115
- });
116
- }
117
- createWalletInstance(walletResponse, args) {
118
- this.validateExistingWalletConfig(walletResponse, args);
119
- const signerConfig = this.toInternalSignerConfig(walletResponse, args.signer, args.options);
120
- return new Wallet(
121
- {
122
- chain: args.chain,
123
- address: walletResponse.address,
124
- owner: walletResponse.owner,
125
- signer: assembleSigner(args.chain, signerConfig),
126
- options: args.options,
127
- alias: args.alias
128
- },
129
- this.apiClient
130
- );
131
- }
132
- toInternalSignerConfig(walletResponse, signerArgs, options) {
133
- var _a, _b, _c, _d, _e, _f;
134
- if (!(walletResponse.chainType === "evm" || walletResponse.chainType === "solana" || walletResponse.chainType === "stellar")) {
135
- throw new WalletCreationError(`Wallet type ${walletResponse.chainType} is not supported`);
136
- }
137
- if (signerArgs == null && ((_a = walletResponse.config) == null ? void 0 : _a.adminSigner) == null) {
138
- throw new WalletCreationError("Signer is required to create a wallet");
139
- }
140
- switch (signerArgs.type) {
141
- case "api-key": {
142
- if (((_b = walletResponse.config) == null ? void 0 : _b.adminSigner.type) !== "api-key") {
143
- throw new WalletCreationError("API key signer does not match the wallet's signer type");
144
- }
145
- return {
146
- type: "api-key",
147
- address: walletResponse.config.adminSigner.address,
148
- locator: walletResponse.config.adminSigner.locator
149
- };
150
- }
151
- case "external-wallet":
152
- if (((_c = walletResponse.config) == null ? void 0 : _c.adminSigner.type) !== "external-wallet") {
153
- throw new WalletCreationError("External wallet signer does not match the wallet's signer type");
154
- }
155
- return __spreadValues(__spreadValues({}, walletResponse.config.adminSigner), signerArgs);
156
- case "passkey":
157
- if (((_d = walletResponse.config) == null ? void 0 : _d.adminSigner.type) !== "passkey") {
158
- throw new WalletCreationError("Passkey signer does not match the wallet's signer type");
159
- }
160
- return {
161
- type: "passkey",
162
- id: walletResponse.config.adminSigner.id,
163
- name: walletResponse.config.adminSigner.name,
164
- locator: walletResponse.config.adminSigner.locator,
165
- onCreatePasskey: signerArgs.onCreatePasskey,
166
- onSignWithPasskey: signerArgs.onSignWithPasskey
167
- };
168
- case "email": {
169
- if (((_e = walletResponse.config) == null ? void 0 : _e.adminSigner.type) !== "email") {
170
- throw new WalletCreationError("Email signer does not match the wallet's signer type");
171
- }
172
- const { locator, email, address } = walletResponse.config.adminSigner;
173
- return {
174
- type: "email",
175
- email,
176
- locator,
177
- address,
178
- crossmint: this.apiClient.crossmint,
179
- onAuthRequired: signerArgs.onAuthRequired,
180
- clientTEEConnection: options == null ? void 0 : options.clientTEEConnection
181
- };
182
- }
183
- case "phone": {
184
- if (((_f = walletResponse.config) == null ? void 0 : _f.adminSigner.type) !== "phone") {
185
- throw new WalletCreationError("Phone signer does not match the wallet's signer type");
186
- }
187
- const { locator, phone, address } = walletResponse.config.adminSigner;
188
- return {
189
- type: "phone",
190
- phone,
191
- locator,
192
- address,
193
- crossmint: this.apiClient.crossmint,
194
- onAuthRequired: signerArgs.onAuthRequired,
195
- clientTEEConnection: options == null ? void 0 : options.clientTEEConnection
196
- };
197
- }
198
- default:
199
- throw new Error("Invalid signer type");
200
- }
201
- }
202
- getWalletLocator(args) {
203
- return `me:${this.getChainType(args.chain)}:smart` + (args.alias != null ? `:alias:${args.alias}` : "");
204
- }
205
- createPasskeyAdminSigner(signer) {
206
- return __async(this, null, function* () {
207
- var _a;
208
- if (signer.type !== "passkey") {
209
- throw new Error("Signer is not a passkey");
210
- }
211
- const passkeyName = (_a = signer.name) != null ? _a : `Crossmint Wallet ${Date.now()}`;
212
- const passkeyCredential = signer.onCreatePasskey ? yield signer.onCreatePasskey(passkeyName) : yield WebAuthnP256.createCredential({ name: passkeyName });
213
- return {
214
- type: "passkey",
215
- id: passkeyCredential.id,
216
- name: passkeyName,
217
- publicKey: {
218
- x: passkeyCredential.publicKey.x.toString(),
219
- y: passkeyCredential.publicKey.y.toString()
220
- }
221
- };
222
- });
223
- }
224
- mutateSignerFromCustomAuth(args, isNewWalletSigner = false) {
225
- var _a, _b;
226
- const { experimental_customAuth } = this.apiClient.crossmint;
227
- if (args.signer.type === "email" && (experimental_customAuth == null ? void 0 : experimental_customAuth.email) != null) {
228
- args.signer.email = (_a = args.signer.email) != null ? _a : experimental_customAuth.email;
229
- }
230
- if (args.signer.type === "phone" && (experimental_customAuth == null ? void 0 : experimental_customAuth.phone) != null) {
231
- args.signer.phone = (_b = args.signer.phone) != null ? _b : experimental_customAuth.phone;
232
- }
233
- if (args.signer.type === "external-wallet" && (experimental_customAuth == null ? void 0 : experimental_customAuth.externalWalletSigner) != null) {
234
- args.signer = isNewWalletSigner ? {
235
- type: "external-wallet",
236
- address: experimental_customAuth.externalWalletSigner.address
237
- } : experimental_customAuth.externalWalletSigner;
238
- }
239
- return;
240
- }
241
- validateExistingWalletConfig(existingWallet, args) {
242
- var _a;
243
- this.mutateSignerFromCustomAuth(args);
244
- if (args.owner != null && existingWallet.owner != null && normalizeValueForComparison(args.owner) !== normalizeValueForComparison(existingWallet.owner)) {
245
- throw new WalletCreationError("Wallet owner does not match existing wallet's linked user");
246
- }
247
- if (args.chain === "solana" && existingWallet.chainType !== "solana" || args.chain !== "solana" && existingWallet.chainType === "solana" || args.chain === "stellar" && existingWallet.chainType !== "stellar" || args.chain !== "stellar" && existingWallet.chainType === "stellar") {
248
- throw new WalletCreationError(
249
- `Wallet chain does not match existing wallet's chain. You must use chain: ${existingWallet.chainType}.`
250
- );
251
- }
252
- if (existingWallet.type !== "smart") {
253
- return;
254
- }
255
- const adminSignerArgs = args.signer;
256
- const existingWalletSigner = (_a = existingWallet == null ? void 0 : existingWallet.config) == null ? void 0 : _a.adminSigner;
257
- if (adminSignerArgs != null && existingWalletSigner != null) {
258
- if (adminSignerArgs.type !== existingWalletSigner.type) {
259
- throw new WalletCreationError(
260
- "The wallet signer type provided in the wallet config does not match the existing wallet's adminSigner type"
261
- );
262
- }
263
- compareSignerConfigs(adminSignerArgs, existingWalletSigner);
264
- }
265
- if (args.delegatedSigners != null) {
266
- this.validateDelegatedSigners(existingWallet, args.delegatedSigners);
267
- }
268
- }
269
- validateDelegatedSigners(existingWallet, inputDelegatedSigners) {
270
- var _a;
271
- const existingDelegatedSigners = (_a = existingWallet == null ? void 0 : existingWallet.config) == null ? void 0 : _a.delegatedSigners;
272
- if (inputDelegatedSigners.length === 0) {
273
- return;
274
- }
275
- if (existingDelegatedSigners == null || existingDelegatedSigners.length === 0) {
276
- throw new WalletCreationError(
277
- `${inputDelegatedSigners.length} delegated signer(s) specified, but wallet "${existingWallet.address}" has no delegated signers. ${DELEGATED_SIGNER_MISMATCH_ERROR}`
278
- );
279
- }
280
- for (const argSigner of inputDelegatedSigners) {
281
- const matchingExistingSigner = existingDelegatedSigners.find(
282
- (existingSigner) => existingSigner.locator === argSigner.signer
283
- );
284
- if (matchingExistingSigner == null) {
285
- const walletSigners = existingDelegatedSigners.map((s) => s.locator).join(", ");
286
- throw new WalletCreationError(
287
- `Delegated signer '${argSigner.signer}' does not exist in wallet "${existingWallet.address}". Available delegated signers: ${walletSigners}. ${DELEGATED_SIGNER_MISMATCH_ERROR}`
288
- );
289
- }
290
- }
291
- }
292
- getChainType(chain) {
293
- if (chain === "solana") {
294
- return "solana";
295
- }
296
- if (chain === "stellar") {
297
- return "stellar";
298
- }
299
- return "evm";
300
- }
301
- };
302
- __decorateClass([
303
- WithLoggerContext({
304
- logger: walletsLogger,
305
- methodName: "walletFactory.getOrCreateWallet",
306
- buildContext(_thisArg, args) {
307
- const walletArgs = args[0];
308
- return { chain: walletArgs.chain, signerType: walletArgs.signer.type };
309
- }
310
- })
311
- ], WalletFactory.prototype, "getOrCreateWallet", 1);
312
- __decorateClass([
313
- WithLoggerContext({
314
- logger: walletsLogger,
315
- methodName: "walletFactory.getWallet",
316
- buildContext(_thisArg, args) {
317
- const walletLocator = args[0];
318
- const walletArgs = args[1];
319
- return { walletLocator, chain: walletArgs.chain };
320
- }
321
- })
322
- ], WalletFactory.prototype, "getWallet", 1);
323
- __decorateClass([
324
- WithLoggerContext({
325
- logger: walletsLogger,
326
- methodName: "walletFactory.createWallet",
327
- buildContext(_thisArg, args) {
328
- const walletArgs = args[0];
329
- return { chain: walletArgs.chain, signerType: walletArgs.signer.type };
330
- }
331
- })
332
- ], WalletFactory.prototype, "createWallet", 1);
333
-
334
- export {
335
- WalletFactory
336
- };
@@ -1,9 +0,0 @@
1
- // src/api/gen/client.gen.ts
2
- import { createClient, createConfig } from "@hey-api/client-fetch";
3
- var client = createClient(createConfig({
4
- baseUrl: "https://staging.crossmint.com/api"
5
- }));
6
-
7
- export {
8
- client
9
- };
@@ -1,21 +0,0 @@
1
- // src/chains/definitions/tempo.ts
2
- import { defineChain } from "viem";
3
- var tempo = defineChain({
4
- id: 4217,
5
- name: "Tempo",
6
- nativeCurrency: void 0,
7
- rpcUrls: {
8
- default: { http: ["https://rpc.tempo.xyz"] }
9
- },
10
- blockExplorers: {
11
- default: {
12
- name: "Tempo Explorer",
13
- url: "https://explore.mainnet.tempo.xyz"
14
- }
15
- },
16
- testnet: false
17
- });
18
-
19
- export {
20
- tempo
21
- };
@@ -1,82 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
- var _chunkZAX22GSIcjs = require('./chunk-ZAX22GSI.cjs');
5
-
6
-
7
- var _chunkJREZWZ2Scjs = require('./chunk-JREZWZ2S.cjs');
8
-
9
-
10
- var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
11
-
12
- // src/signers/non-custodial/ncs-stellar-signer.ts
13
- var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkZAX22GSIcjs.NonCustodialSigner {
14
- constructor(config) {
15
- super(config);
16
- }
17
- signMessage() {
18
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
19
- return yield Promise.reject(new Error("signMessage method not implemented for stellar signer"));
20
- });
21
- }
22
- signTransaction(payload) {
23
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
24
- var _a;
25
- yield this.handleAuthRequired();
26
- const jwt = this.getJwtOrThrow();
27
- _chunkJREZWZ2Scjs.walletsLogger.info("sign: sending request", { keyType: "ed25519" });
28
- const startTime = Date.now();
29
- const res = yield (_a = this.config.clientTEEConnection) == null ? void 0 : _a.sendAction({
30
- event: "request:sign",
31
- responseEvent: "response:sign",
32
- data: {
33
- authData: {
34
- jwt,
35
- apiKey: this.config.crossmint.apiKey
36
- },
37
- data: {
38
- keyType: "ed25519",
39
- bytes: payload,
40
- encoding: "base64"
41
- }
42
- },
43
- options: _chunkZAX22GSIcjs.DEFAULT_EVENT_OPTIONS
44
- });
45
- _chunkJREZWZ2Scjs.walletsLogger.info("sign: response received", {
46
- status: res == null ? void 0 : res.status,
47
- durationMs: Date.now() - startTime
48
- });
49
- if ((res == null ? void 0 : res.status) === "error") {
50
- throw new Error(res.error);
51
- }
52
- if ((res == null ? void 0 : res.signature) == null) {
53
- throw new Error("Failed to sign transaction");
54
- }
55
- _StellarNonCustodialSigner.verifyPublicKeyFormat(res.publicKey);
56
- if (res.signature.encoding !== "base64") {
57
- throw new Error("Wrong encoding for signature. Expected base64, got " + res.signature.encoding);
58
- }
59
- return { signature: res.signature.bytes };
60
- });
61
- }
62
- static verifyPublicKeyFormat(publicKey) {
63
- if (publicKey == null) {
64
- throw new Error("No public key found");
65
- }
66
- if (publicKey.encoding !== "base64" || publicKey.keyType !== "ed25519" || publicKey.bytes == null) {
67
- throw new Error(
68
- "Not supported. Expected public key to be in base64 encoding and ed25519 key type. Got: " + JSON.stringify(publicKey)
69
- );
70
- }
71
- }
72
- getChainKeyParams() {
73
- return {
74
- scheme: "ed25519",
75
- encoding: "strkey"
76
- };
77
- }
78
- };
79
-
80
-
81
-
82
- exports.StellarNonCustodialSigner = StellarNonCustodialSigner;
@@ -1,19 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/chains/definitions/story.ts
2
- var _viem = require('viem');
3
- var story = _viem.defineChain.call(void 0, {
4
- id: 1514,
5
- name: "Story",
6
- nativeCurrency: {
7
- decimals: 18,
8
- name: "IP Token",
9
- symbol: "IP"
10
- },
11
- rpcUrls: {
12
- default: { http: ["https://mainnet.storyrpc.io"] }
13
- },
14
- testnet: false
15
- });
16
-
17
-
18
-
19
- exports.story = story;
@@ -1,59 +0,0 @@
1
- import {
2
- TransactionFailedError
3
- } from "./chunk-SGINWAB6.js";
4
- import {
5
- __async
6
- } from "./chunk-ASE2FXWP.js";
7
-
8
- // src/signers/solana-external-wallet.ts
9
- import { PublicKey, VersionedTransaction } from "@solana/web3.js";
10
- import base58 from "bs58";
11
- var SolanaExternalWalletSigner = class {
12
- constructor(config) {
13
- this.config = config;
14
- this.type = "external-wallet";
15
- if (config.address == null) {
16
- throw new Error("Please provide an address for the External Wallet Signer");
17
- }
18
- this._address = config.address;
19
- this.onSignTransaction = config.onSignTransaction;
20
- }
21
- address() {
22
- return this._address;
23
- }
24
- locator() {
25
- return this.config.locator;
26
- }
27
- signMessage() {
28
- return __async(this, null, function* () {
29
- return yield Promise.reject(new Error("signMessage method not implemented for solana external wallet signer"));
30
- });
31
- }
32
- signTransaction(transaction) {
33
- return __async(this, null, function* () {
34
- if (this.onSignTransaction == null) {
35
- return yield Promise.reject(
36
- new Error("onSignTransaction method is required to sign transactions with a Solana external wallet")
37
- );
38
- }
39
- const transactionBytes = base58.decode(transaction);
40
- const deserializedTransaction = VersionedTransaction.deserialize(transactionBytes);
41
- const signedTxn = yield this.onSignTransaction(deserializedTransaction);
42
- const externalWalletPublicKey = new PublicKey(this._address);
43
- const signerIndex = signedTxn.message.staticAccountKeys.findIndex((key) => key.equals(externalWalletPublicKey));
44
- if (signerIndex === -1) {
45
- throw new TransactionFailedError("Wallet public key not found in transaction signers");
46
- }
47
- const validSignature = signedTxn.signatures[signerIndex];
48
- if (validSignature == null) {
49
- throw new TransactionFailedError("No valid signature found in the transaction");
50
- }
51
- const signatureBytes = new Uint8Array(Object.values(validSignature));
52
- return { signature: base58.encode(signatureBytes) };
53
- });
54
- }
55
- };
56
-
57
- export {
58
- SolanaExternalWalletSigner
59
- };
@@ -1,74 +0,0 @@
1
- // src/api/__tests__/constants.ts
2
- var HTTP_ERROR_STATUSES = [
3
- { status: 400, message: "Bad Request" },
4
- { status: 401, message: "Unauthorized" },
5
- { status: 403, message: "Forbidden" },
6
- { status: 404, message: "Not Found" },
7
- { status: 429, message: "Rate limit exceeded" },
8
- { status: 500, message: "Internal server error" },
9
- { status: 502, message: "Bad Gateway" },
10
- { status: 503, message: "Service Unavailable" }
11
- ];
12
- var WALLET_LOCATORS = {
13
- evmSmart: "me:evm:smart",
14
- evmMpc: "me:evm:mpc",
15
- solanaSmart: "me:solana:smart",
16
- solanaAddress: "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
17
- evmAddress: "0x1234567890123456789012345678901234567890",
18
- evmAddressWithSpecialChars: "0xABCDEFabcdef0123456789ABCDEFabcdef012345"
19
- };
20
- var TOKEN_LOCATORS = {
21
- eth: "base-sepolia:eth",
22
- usdc: "base-sepolia:usdc",
23
- sol: "solana:sol",
24
- customContract: "base-sepolia:0x1234567890123456789012345678901234567890",
25
- tokenWithSpecialChars: "base-sepolia:0xABCDEFabcdef0123456789ABCDEFabcdef012345"
26
- };
27
- var TIMEOUT_SHORT = 3e4;
28
- var TIMEOUT_MEDIUM = 6e4;
29
- var TIMEOUT_LONG = 12e4;
30
- var DELAY_SHORT = 200;
31
- var DELAY_MEDIUM = 500;
32
- var DELAY_LONG = 1e3;
33
- var DELAY_RATE_LIMIT_WINDOW = 2e3;
34
- var TEST_ADDRESSES = {
35
- EVM_ADMIN_SIGNER: "0xe5E91D9b21C3563011cc332B050150fb9211bBEB",
36
- SOLANA_ADMIN_SIGNER: "CsHuaddA9J8j9vSTdL9wpvBsyjYe4F7iQQLuPg3EUqsU",
37
- EVM_RECIPIENT: "0xDF8b5F9c19E187f1Ea00730a1e46180152244315",
38
- EVM_NON_EXISTENT: "0x0000000000000000000000000000000000000000",
39
- EVM_TEST: "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd"
40
- };
41
- var TEST_VALUES = {
42
- FUNDING_AMOUNT_SMALL: 1,
43
- FUNDING_AMOUNT_LARGE: 10,
44
- SEND_AMOUNT_SMALL: "0.0001",
45
- SEND_AMOUNT_VERY_SMALL: "0.000000000000000001",
46
- SEND_AMOUNT_ZERO: "0",
47
- SEND_AMOUNT_INVALID: "999999999999999999.0",
48
- SEND_AMOUNT_EXTREME: "999999999999999999999999999999.999999999999999999",
49
- LONG_STRING_LENGTH: 1e4,
50
- CONCURRENT_REQUESTS: 3,
51
- RAPID_SEQUENTIAL_COUNT: 3,
52
- RATE_LIMIT_BATCH_SIZE: 5,
53
- RATE_LIMIT_BATCHES: 3,
54
- RATE_LIMIT_RAPID_COUNT: 20,
55
- RATE_LIMIT_STRESS_COUNT: 50,
56
- APPROVE_TRANSACTION_MAX_RETRIES: 10
57
- };
58
- var MOCK_API_KEY = "ck_development_A61UZQnvjSQcM5qVBaBactgqebxafWAVsNdD2xLkgBxoYuH5q2guM8r9DUmZQzE1WYyoByGVYpEG2o9gVSzAZFsrLbfKGERUJ6D5CW6S9AsJGAc3ctgrsD4n2ioekzGj7KPbLwT3SysDjMamYXLxEroUbQSdwf6aLF4zeEpECq2crkTUQeLFzxzmjWNxFDHFYefDrfrFPCURvBXJLf5pCxCQ";
59
-
60
- export {
61
- HTTP_ERROR_STATUSES,
62
- WALLET_LOCATORS,
63
- TOKEN_LOCATORS,
64
- TIMEOUT_SHORT,
65
- TIMEOUT_MEDIUM,
66
- TIMEOUT_LONG,
67
- DELAY_SHORT,
68
- DELAY_MEDIUM,
69
- DELAY_LONG,
70
- DELAY_RATE_LIMIT_WINDOW,
71
- TEST_ADDRESSES,
72
- TEST_VALUES,
73
- MOCK_API_KEY
74
- };
@@ -1,44 +0,0 @@
1
- import {
2
- __async
3
- } from "./chunk-ASE2FXWP.js";
4
-
5
- // src/signers/stellar-external-wallet.ts
6
- var StellarExternalWalletSigner = class {
7
- constructor(config) {
8
- this.config = config;
9
- this.type = "external-wallet";
10
- if (config.address == null) {
11
- throw new Error("Please provide an address for the External Wallet Signer");
12
- }
13
- this._address = config.address;
14
- this.onSignStellarTransaction = config.onSignStellarTransaction;
15
- }
16
- address() {
17
- return this._address;
18
- }
19
- locator() {
20
- return this.config.locator;
21
- }
22
- signMessage() {
23
- return __async(this, null, function* () {
24
- return yield Promise.reject(new Error("signMessage method not implemented for stellar external wallet signer"));
25
- });
26
- }
27
- signTransaction(payload) {
28
- return __async(this, null, function* () {
29
- if (this.onSignStellarTransaction == null) {
30
- return yield Promise.reject(
31
- new Error(
32
- "onSignStellarTransaction method is required to sign transactions with a Stellar external wallet"
33
- )
34
- );
35
- }
36
- const signedTx = yield this.onSignStellarTransaction(payload);
37
- return { signature: signedTx };
38
- });
39
- }
40
- };
41
-
42
- export {
43
- StellarExternalWalletSigner
44
- };