@crossmint/wallets-sdk 0.18.2 → 0.18.4

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 (191) hide show
  1. package/dist/api/client.cjs +9 -1
  2. package/dist/api/client.d.cts +4 -4
  3. package/dist/api/client.d.ts +4 -4
  4. package/dist/api/client.js +9 -1
  5. package/dist/api/gen/client.gen.cjs +7 -1
  6. package/dist/api/gen/client.gen.js +7 -1
  7. package/dist/api/gen/index.cjs +179 -1
  8. package/dist/api/gen/index.js +179 -1
  9. package/dist/api/gen/sdk.gen.cjs +178 -1
  10. package/dist/api/gen/sdk.gen.js +178 -1
  11. package/dist/api/gen/types.gen.js +1 -1
  12. package/dist/api/index.cjs +11 -1
  13. package/dist/api/index.d.cts +1 -1
  14. package/dist/api/index.d.ts +1 -1
  15. package/dist/api/index.js +11 -1
  16. package/dist/api/types.d.cts +4 -2
  17. package/dist/api/types.d.ts +4 -2
  18. package/dist/api/types.js +1 -1
  19. package/dist/chains/chains.cjs +9 -1
  20. package/dist/chains/chains.js +9 -1
  21. package/dist/chains/definitions/story.cjs +7 -1
  22. package/dist/chains/definitions/story.js +7 -1
  23. package/dist/chains/definitions/storyTestnet.cjs +7 -1
  24. package/dist/chains/definitions/storyTestnet.js +7 -1
  25. package/dist/chunk-2DHIAP2S.js +58 -0
  26. package/dist/chunk-2T5HHKUI.js +19 -0
  27. package/dist/chunk-2VOEAAFA.cjs +200 -0
  28. package/dist/chunk-3U6UAYOV.js +25 -0
  29. package/dist/chunk-4BMNDPJ4.cjs +92 -0
  30. package/dist/chunk-4QGBVHV3.js +629 -0
  31. package/dist/chunk-55V4VMTX.cjs +25 -0
  32. package/dist/chunk-5H5YHSCK.js +200 -0
  33. package/dist/chunk-7ECQJFYM.cjs +63 -0
  34. package/dist/chunk-7GHQBCRV.cjs +57 -0
  35. package/dist/chunk-7JFVG4IY.js +59 -0
  36. package/dist/chunk-7QL5JVK4.js +262 -0
  37. package/dist/chunk-AJCWEEWH.js +73 -0
  38. package/dist/chunk-AL77JANE.js +36 -0
  39. package/dist/chunk-BAHU3KZE.cjs +75 -0
  40. package/dist/chunk-BAULM7A2.js +289 -0
  41. package/dist/chunk-BFAU2NL6.js +175 -0
  42. package/dist/chunk-BSC55MYK.cjs +43 -0
  43. package/dist/chunk-CHGPNMRL.cjs +36 -0
  44. package/dist/chunk-CN2GVFBU.cjs +138 -0
  45. package/dist/chunk-COVOGZ4S.js +80 -0
  46. package/dist/chunk-DPERJZBG.js +63 -0
  47. package/dist/chunk-DQCXGBZM.js +59 -0
  48. package/dist/chunk-E4LJ7252.cjs +289 -0
  49. package/dist/chunk-EM6H7EUU.cjs +80 -0
  50. package/dist/chunk-EYJQSDDI.js +43 -0
  51. package/dist/chunk-FAGFW4AR.js +16 -0
  52. package/dist/chunk-FK23BDCU.js +87 -0
  53. package/dist/chunk-FPMW7Q5O.js +55 -0
  54. package/dist/chunk-G5NYLGM5.cjs +55 -0
  55. package/dist/chunk-HHDDI3CS.js +75 -0
  56. package/dist/chunk-HNRM45KF.cjs +87 -0
  57. package/dist/chunk-JICSSJOK.js +57 -0
  58. package/dist/chunk-KS63YEQ4.js +138 -0
  59. package/dist/chunk-KT3CVXFG.js +9 -0
  60. package/dist/chunk-LLFD22UQ.cjs +36 -0
  61. package/dist/chunk-MPGPBFUZ.cjs +16 -0
  62. package/dist/chunk-MYKPHXUR.cjs +629 -0
  63. package/dist/chunk-MZBFXUHT.js +63 -0
  64. package/dist/chunk-NIBKCMQ2.cjs +19 -0
  65. package/dist/chunk-OD5RGQ4Z.js +92 -0
  66. package/dist/chunk-PSPNZEG4.cjs +175 -0
  67. package/dist/chunk-R2OY54EJ.cjs +59 -0
  68. package/dist/chunk-RHR6P2KP.cjs +15 -0
  69. package/dist/chunk-RSPJPRQW.cjs +262 -0
  70. package/dist/chunk-RTRDZB52.js +778 -0
  71. package/dist/chunk-SG7WIZLK.cjs +63 -0
  72. package/dist/chunk-SGINWAB6.js +155 -0
  73. package/dist/chunk-TK3EUCQ4.cjs +59 -0
  74. package/dist/chunk-V3QJQUT7.cjs +778 -0
  75. package/dist/chunk-WC7T2CR4.js +44 -0
  76. package/dist/chunk-WJUPOCKJ.js +15 -0
  77. package/dist/chunk-XC2V34TS.cjs +155 -0
  78. package/dist/chunk-XH3ARVJG.cjs +58 -0
  79. package/dist/chunk-YBA7WO32.cjs +44 -0
  80. package/dist/chunk-YOJETSLN.cjs +73 -0
  81. package/dist/chunk-ZT7EGOCI.cjs +9 -0
  82. package/dist/chunk-ZTGRDOOH.js +36 -0
  83. package/dist/index.cjs +55 -1
  84. package/dist/index.js +55 -1
  85. package/dist/sdk.cjs +31 -1
  86. package/dist/sdk.js +31 -1
  87. package/dist/signers/evm-api-key.cjs +7 -1
  88. package/dist/signers/evm-api-key.js +7 -1
  89. package/dist/signers/evm-external-wallet.cjs +7 -1
  90. package/dist/signers/evm-external-wallet.js +7 -1
  91. package/dist/signers/index.cjs +21 -1
  92. package/dist/signers/index.js +21 -1
  93. package/dist/signers/non-custodial/index.cjs +24 -1
  94. package/dist/signers/non-custodial/index.js +24 -1
  95. package/dist/signers/non-custodial/ncs-evm-signer.cjs +10 -1
  96. package/dist/signers/non-custodial/ncs-evm-signer.js +10 -1
  97. package/dist/signers/non-custodial/ncs-iframe-manager.cjs +7 -1
  98. package/dist/signers/non-custodial/ncs-iframe-manager.js +7 -1
  99. package/dist/signers/non-custodial/ncs-signer.cjs +11 -1
  100. package/dist/signers/non-custodial/ncs-signer.js +11 -1
  101. package/dist/signers/non-custodial/ncs-solana-signer.cjs +10 -1
  102. package/dist/signers/non-custodial/ncs-solana-signer.js +10 -1
  103. package/dist/signers/non-custodial/ncs-stellar-signer.cjs +10 -1
  104. package/dist/signers/non-custodial/ncs-stellar-signer.js +10 -1
  105. package/dist/signers/passkey.cjs +7 -1
  106. package/dist/signers/passkey.js +7 -1
  107. package/dist/signers/solana-api-key.cjs +7 -1
  108. package/dist/signers/solana-api-key.js +7 -1
  109. package/dist/signers/solana-external-wallet.cjs +8 -1
  110. package/dist/signers/solana-external-wallet.js +8 -1
  111. package/dist/signers/stellar-external-wallet.cjs +7 -1
  112. package/dist/signers/stellar-external-wallet.js +7 -1
  113. package/dist/signers/types.cjs +9 -1
  114. package/dist/signers/types.js +9 -1
  115. package/dist/utils/constants.cjs +13 -1
  116. package/dist/utils/constants.js +13 -1
  117. package/dist/utils/errors.cjs +55 -1
  118. package/dist/utils/errors.js +55 -1
  119. package/dist/utils/signer-validation.cjs +8 -1
  120. package/dist/utils/signer-validation.js +8 -1
  121. package/dist/wallets/evm.cjs +20 -1
  122. package/dist/wallets/evm.js +20 -1
  123. package/dist/wallets/solana.cjs +18 -1
  124. package/dist/wallets/solana.js +18 -1
  125. package/dist/wallets/stellar.cjs +17 -1
  126. package/dist/wallets/stellar.js +17 -1
  127. package/dist/wallets/wallet-factory.cjs +25 -1
  128. package/dist/wallets/wallet-factory.js +25 -1
  129. package/dist/wallets/wallet.cjs +16 -1
  130. package/dist/wallets/wallet.d.cts +12 -1
  131. package/dist/wallets/wallet.d.ts +12 -1
  132. package/dist/wallets/wallet.js +16 -1
  133. package/package.json +4 -4
  134. package/dist/chunk-23ZHV3VD.js +0 -1
  135. package/dist/chunk-2SHDBC47.js +0 -1
  136. package/dist/chunk-2XVV7Z43.cjs +0 -1
  137. package/dist/chunk-2YH3NVVK.cjs +0 -1
  138. package/dist/chunk-3APSOOE3.js +0 -1
  139. package/dist/chunk-3IZNWAZE.cjs +0 -1
  140. package/dist/chunk-4AJT6I6Q.js +0 -1
  141. package/dist/chunk-4KXOWU5E.cjs +0 -1
  142. package/dist/chunk-5M7IRODB.js +0 -1
  143. package/dist/chunk-5QIW67NU.cjs +0 -1
  144. package/dist/chunk-6PVKL5RC.js +0 -1
  145. package/dist/chunk-73RCBQG5.js +0 -1
  146. package/dist/chunk-7JIPYRKX.js +0 -1
  147. package/dist/chunk-7WKKOG6H.cjs +0 -3
  148. package/dist/chunk-BQZES4ST.js +0 -1
  149. package/dist/chunk-BW7YYVZE.js +0 -1
  150. package/dist/chunk-C3T63EC7.cjs +0 -1
  151. package/dist/chunk-CVZ3RNWV.cjs +0 -1
  152. package/dist/chunk-GEY574TH.cjs +0 -1
  153. package/dist/chunk-H4T4IXCF.js +0 -1
  154. package/dist/chunk-HJ5EDMTA.js +0 -1
  155. package/dist/chunk-HMPMFEPS.cjs +0 -1
  156. package/dist/chunk-HPHVJ6BA.cjs +0 -1
  157. package/dist/chunk-HRSVFJND.cjs +0 -1
  158. package/dist/chunk-IGBQEAD5.js +0 -1
  159. package/dist/chunk-IR5WN6FQ.cjs +0 -1
  160. package/dist/chunk-JUSY5XEE.js +0 -1
  161. package/dist/chunk-KHSWQE6W.js +0 -1
  162. package/dist/chunk-KKQBZXFE.js +0 -1
  163. package/dist/chunk-KO6QYKDX.cjs +0 -1
  164. package/dist/chunk-KRV3IXJU.cjs +0 -1
  165. package/dist/chunk-L5L64FWM.js +0 -1
  166. package/dist/chunk-LW6JSI4J.js +0 -1
  167. package/dist/chunk-M4TOGGLV.cjs +0 -1
  168. package/dist/chunk-MQP5VZCA.cjs +0 -1
  169. package/dist/chunk-NEJPPLYW.cjs +0 -1
  170. package/dist/chunk-NIKULSJK.cjs +0 -1
  171. package/dist/chunk-NT4EICOB.cjs +0 -1
  172. package/dist/chunk-O4FVTK7X.cjs +0 -1
  173. package/dist/chunk-P6JJHAAV.js +0 -1
  174. package/dist/chunk-PONCGT2H.cjs +0 -1
  175. package/dist/chunk-PSXRNSOE.js +0 -1
  176. package/dist/chunk-R6VFNNAA.js +0 -3
  177. package/dist/chunk-RJZV72YF.js +0 -1
  178. package/dist/chunk-S3DYQVRD.js +0 -1
  179. package/dist/chunk-SHVVA55W.js +0 -1
  180. package/dist/chunk-STYSP6KL.cjs +0 -1
  181. package/dist/chunk-UBOWSXW3.js +0 -1
  182. package/dist/chunk-UNBXKCNN.js +0 -1
  183. package/dist/chunk-VXFSSEA4.js +0 -1
  184. package/dist/chunk-VY634F3J.js +0 -1
  185. package/dist/chunk-WQP2FSVI.js +0 -1
  186. package/dist/chunk-WYYAPI4G.cjs +0 -1
  187. package/dist/chunk-WZFHEUWT.cjs +0 -1
  188. package/dist/chunk-XALFCQKD.cjs +0 -1
  189. package/dist/chunk-XIRT2EZN.cjs +0 -1
  190. package/dist/chunk-YWPTI2QO.cjs +0 -1
  191. package/dist/chunk-YZ4HRYSL.cjs +0 -1
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSTYSP6KLcjs = require('./chunk-STYSP6KL.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var s=e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},i= exports.b =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/transactions/{transactionId}"},e))},C= exports.c =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/transactions"},e))},p= exports.d =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},W= exports.e =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signers/{signer}"},e))},c= exports.f =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},u= exports.g =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},V= exports.h =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signatures/{signatureId}"},e))},w= exports.i =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},T= exports.j =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/activity"},e))},h= exports.k =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}"},e))},g= exports.l =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},E= exports.m =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},S= exports.n =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/transactions/{transactionId}"},e))},O= exports.o =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/transactions"},e))},d= exports.p =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},G= exports.q =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signers/{signer}"},e))},D= exports.r =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},M= exports.s =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},R= exports.t =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signatures/{signatureId}"},e))},b= exports.u =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signatures"},e))},v= exports.v =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},x= exports.w =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/balances"},e))},y= exports.x =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/balances"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},A= exports.y =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/activity"},e))},m= exports.z =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}"},e))},f= exports.A =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},L= exports.B =e=>{var r;return((r=e==null?void 0:e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.a.call(void 0, {url:"/unstable/wallets/verify-ownership"},e))},B= exports.C =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/unstable/wallets/me{walletType}/tokens/{tokenLocator}/transfers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},k= exports.D =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/unstable/wallets/me{walletLocator}/activity"},e))},q= exports.E =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/unstable/wallets/{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},j= exports.F =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/unstable/wallets/{walletLocator}/balances"},e))},F= exports.G =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/unstable/wallets/{walletLocator}/activity"},e))},I= exports.H =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},U= exports.I =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/transactions/{transactionId}"},e))},N= exports.J =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/transactions"},e))},_= exports.K =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},z= exports.L =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},H= exports.M =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signers/{signer}"},e))},J= exports.N =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},K= exports.O =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},P= exports.P =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signatures/{signatureId}"},e))},Q= exports.Q =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signatures"},e))},X= exports.R =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Y= exports.S =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}"},e))},Z= exports.T =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},$= exports.U =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},ee= exports.V =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/transactions/{transactionId}"},e))},re= exports.W =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/transactions"},e))},te= exports.X =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},le= exports.Y =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},oe= exports.Z =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signers/{signer}"},e))},ae= exports._ =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},ne= exports.$ =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},se= exports.aa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signatures/{signatureId}"},e))},ie= exports.ba =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signatures"},e))},Ce= exports.ca =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},pe= exports.da =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/balances"},e))},We= exports.ea =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}"},e))},ce= exports.fa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},ue= exports.ga =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Ve= exports.ha =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/transactions/{transactionId}"},e))},we= exports.ia =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/transactions"},e))},Te= exports.ja =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},he= exports.ka =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signers/{signer}"},e))},ge= exports.la =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Ee= exports.ma =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Se= exports.na =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signatures/{signatureId}"},e))},Oe= exports.oa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},de= exports.pa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/activity"},e))},Ge= exports.qa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}"},e))},De= exports.ra =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Me= exports.sa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Re= exports.ta =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/transactions/{transactionId}"},e))},be= exports.ua =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/transactions"},e))},ve= exports.va =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},xe= exports.wa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signers/{signer}"},e))},ye= exports.xa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Ae= exports.ya =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},me= exports.za =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signatures/{signatureId}"},e))},fe= exports.Aa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signatures"},e))},Le= exports.Ba =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Be= exports.Ca =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/activity"},e))},ke= exports.Da =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}"},e))},qe= exports.Ea =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{locator}/nfts"},e))},je= exports.Fa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))};exports.a = s; exports.b = i; exports.c = C; exports.d = p; exports.e = W; exports.f = c; exports.g = u; exports.h = V; exports.i = w; exports.j = T; exports.k = h; exports.l = g; exports.m = E; exports.n = S; exports.o = O; exports.p = d; exports.q = G; exports.r = D; exports.s = M; exports.t = R; exports.u = b; exports.v = v; exports.w = x; exports.x = y; exports.y = A; exports.z = m; exports.A = f; exports.B = L; exports.C = B; exports.D = k; exports.E = q; exports.F = j; exports.G = F; exports.H = I; exports.I = U; exports.J = N; exports.K = _; exports.L = z; exports.M = H; exports.N = J; exports.O = K; exports.P = P; exports.Q = Q; exports.R = X; exports.S = Y; exports.T = Z; exports.U = $; exports.V = ee; exports.W = re; exports.X = te; exports.Y = le; exports.Z = oe; exports._ = ae; exports.$ = ne; exports.aa = se; exports.ba = ie; exports.ca = Ce; exports.da = pe; exports.ea = We; exports.fa = ce; exports.ga = ue; exports.ha = Ve; exports.ia = we; exports.ja = Te; exports.ka = he; exports.la = ge; exports.ma = Ee; exports.na = Se; exports.oa = Oe; exports.pa = de; exports.qa = Ge; exports.ra = De; exports.sa = Me; exports.ta = Re; exports.ua = be; exports.va = ve; exports.wa = xe; exports.xa = ye; exports.ya = Ae; exports.za = me; exports.Aa = fe; exports.Ba = Le; exports.Ca = Be; exports.Da = ke; exports.Ea = qe; exports.Fa = je;
@@ -1 +0,0 @@
1
- import{CrossmintSDKError as t,WalletErrorCode as e}from"@crossmint/common-sdk-base";var o=class extends t{constructor(s,r){super(s,e.API_KEY_INVALID,r)}},c=class extends t{constructor(s,r){super(s,e.ENVIRONMENT_INVALID,r)}},p=class extends t{constructor(s,r){super(s,e.WALLET_TYPE_INVALID,r)}},i=class extends t{constructor(s,r){super(s,e.WALLET_NOT_AVAILABLE,r)}},A=class extends t{constructor(s,r){super(s,e.WALLET_NOT_AVAILABLE,r)}},I=class extends t{constructor(s,r){super(s,e.WALLET_CREATION_FAILED,r)}},x=class extends t{constructor(s,r){super(s,e.WALLET_TYPE_INVALID,r)}},g=class extends t{constructor(s,r){super(s,e.SIGNER_INVALID,r)}},u=class extends t{constructor(s,r){super(s,e.SIGNER_INVALID,r)}},N=class extends t{constructor(s,r){super(s,e.MESSAGE_INVALID,r)}},E=class extends t{constructor(s,r){super(s,e.MESSAGE_INVALID,r)}},L=class extends t{constructor(s,r){super(s,e.SIGNING_FAILED,r)}},_=class extends t{constructor(s,r){super(s,e.SIGNING_FAILED,r)}},l=class extends t{constructor(s,r){super(s,e.SIGNING_FAILED,r)}},T=class extends t{constructor(s,r){super(s,e.NO_SIGNATURE,r)}},a=class extends t{constructor(s,r){super(s,e.NO_SIGNATURE,r)}},d=class extends t{constructor(s,r){super(s,e.SIGNING_FAILED,r)}},S=class extends t{constructor(s,r){super(s,e.NO_TRANSACTION,r)}},D=class extends t{constructor(s,r){super(s,e.NO_TRANSACTION,r)}},O=class extends t{constructor(s,r){super(s,e.TRANSACTION_FAILED,r)}},G=class extends t{constructor(s,r){super(s,e.TRANSACTION_FAILED,r)}},R=class extends t{constructor(s,r){super(s,e.TRANSACTION_FAILED,r)}},C=class extends t{constructor(s,r){super(s,e.TRANSACTION_FAILED,r)}},F=class extends t{constructor(s,r){super(s,e.TRANSACTION_FAILED,r)}},V=class extends t{constructor(s,r){super(s,e.TRANSACTION_FAILED,r)}};export{o as a,c as b,p as c,i as d,A as e,I as f,x as g,g as h,u as i,N as j,E as k,L as l,_ as m,l as n,T as o,a as p,d as q,S as r,D as s,O as t,G as u,R as v,C as w,F as x,V as y};
@@ -1,3 +0,0 @@
1
- import{a as S}from"./chunk-BQZES4ST.js";import{a as y}from"./chunk-SHVVA55W.js";import{a as f}from"./chunk-UNBXKCNN.js";import{d as m,f as r}from"./chunk-PSXRNSOE.js";import{a as c,f as d}from"./chunk-BW7YYVZE.js";import{WebAuthnP256 as W}from"ox";var u="When 'delegatedSigners' is provided to a method that may fetch an existing wallet, each specified delegated signer must exist in that wallet's configuration.",w=class{constructor(e){this.apiClient=e}getOrCreateWallet(e){return d(this,null,function*(){if(this.apiClient.isServerSide)throw new r(`getOrCreateWallet can only be called from client-side code.
2
- - Make sure you're running this in the browser (or another client environment), not on your server.
3
- - Use your Crossmint Client API Key (not a server key).`);let i=this.getWalletLocator(e),n=yield this.apiClient.getWallet(i);return n!=null&&!("error"in n)?this.createWalletInstance(n,e):this.createWallet(e)})}getWallet(e,i){return d(this,null,function*(){if(!this.apiClient.isServerSide)throw new r("getWallet is not supported on client side, use getOrCreateWallet instead");let n=yield this.apiClient.getWallet(e);if("error"in n)throw new m(JSON.stringify(n));return this.createWalletInstance(n,i)})}createWallet(e){return d(this,null,function*(){var t,a,s,o,l;yield(s=(a=(t=e.options)==null?void 0:t.experimental_callbacks)==null?void 0:a.onWalletCreationStart)==null?void 0:s.call(a),this.mutateSignerFromCustomAuth(e,!0);let i=e.signer.type==="passkey"?yield this.createPasskeyAdminSigner(e.signer):e.signer,n=yield this.apiClient.createWallet({type:"smart",chainType:this.getChainType(e.chain),config:c(c({adminSigner:i},e!=null&&e.plugins?{plugins:e.plugins}:{}),e.delegatedSigners!=null?{delegatedSigners:e.delegatedSigners}:{}),owner:(o=e.owner)!=null?o:void 0,alias:(l=e.alias)!=null?l:void 0});if("error"in n)throw new r(JSON.stringify(n));return this.createWalletInstance(n,e)})}createWalletInstance(e,i){this.validateExistingWalletConfig(e,i);let n=this.toInternalSignerConfig(e,i.signer,i.options);return new y({chain:i.chain,address:e.address,owner:e.owner,signer:f(i.chain,n),options:i.options,alias:i.alias},this.apiClient)}toInternalSignerConfig(e,i,n){var t,a,s,o,l,C;if(!(e.chainType==="evm"||e.chainType==="solana"||e.chainType==="stellar"))throw new r(`Wallet type ${e.chainType} is not supported`);if(i==null&&((t=e.config)==null?void 0:t.adminSigner)==null)throw new r("Signer is required to create a wallet");switch(i.type){case"api-key":{if(((a=e.config)==null?void 0:a.adminSigner.type)!=="api-key")throw new r("API key signer does not match the wallet's signer type");return{type:"api-key",address:e.config.adminSigner.address,locator:e.config.adminSigner.locator}}case"external-wallet":if(((s=e.config)==null?void 0:s.adminSigner.type)!=="external-wallet")throw new r("External wallet signer does not match the wallet's signer type");return c(c({},e.config.adminSigner),i);case"passkey":if(((o=e.config)==null?void 0:o.adminSigner.type)!=="passkey")throw new r("Passkey signer does not match the wallet's signer type");return{type:"passkey",id:e.config.adminSigner.id,name:e.config.adminSigner.name,locator:e.config.adminSigner.locator,onCreatePasskey:i.onCreatePasskey,onSignWithPasskey:i.onSignWithPasskey};case"email":{if(((l=e.config)==null?void 0:l.adminSigner.type)!=="email")throw new r("Email signer does not match the wallet's signer type");let{locator:h,email:g,address:p}=e.config.adminSigner;return{type:"email",email:g,locator:h,address:p,crossmint:this.apiClient.crossmint,onAuthRequired:i.onAuthRequired,clientTEEConnection:n==null?void 0:n.clientTEEConnection}}case"phone":{if(((C=e.config)==null?void 0:C.adminSigner.type)!=="phone")throw new r("Phone signer does not match the wallet's signer type");let{locator:h,phone:g,address:p}=e.config.adminSigner;return{type:"phone",phone:g,locator:h,address:p,crossmint:this.apiClient.crossmint,onAuthRequired:i.onAuthRequired,clientTEEConnection:n==null?void 0:n.clientTEEConnection}}default:throw new Error("Invalid signer type")}}getWalletLocator(e){return`me:${this.getChainType(e.chain)}:smart`+(e.alias!=null?`:alias:${e.alias}`:"")}createPasskeyAdminSigner(e){return d(this,null,function*(){var t;if(e.type!=="passkey")throw new Error("Signer is not a passkey");let i=(t=e.name)!=null?t:`Crossmint Wallet ${Date.now()}`,n=e.onCreatePasskey?yield e.onCreatePasskey(i):yield W.createCredential({name:i});return{type:"passkey",id:n.id,name:i,publicKey:{x:n.publicKey.x.toString(),y:n.publicKey.y.toString()}}})}mutateSignerFromCustomAuth(e,i=!1){var t,a;let{experimental_customAuth:n}=this.apiClient.crossmint;e.signer.type==="email"&&(n==null?void 0:n.email)!=null&&(e.signer.email=(t=e.signer.email)!=null?t:n.email),e.signer.type==="phone"&&(n==null?void 0:n.phone)!=null&&(e.signer.phone=(a=e.signer.phone)!=null?a:n.phone),e.signer.type==="external-wallet"&&(n==null?void 0:n.externalWalletSigner)!=null&&(e.signer=i?{type:"external-wallet",address:n.externalWalletSigner.address}:n.externalWalletSigner)}validateExistingWalletConfig(e,i){var a;if(this.mutateSignerFromCustomAuth(i),i.owner!=null&&e.owner!=null&&i.owner!==e.owner)throw new r("Wallet owner does not match existing wallet's linked user");if(i.chain==="solana"&&e.chainType!=="solana"||i.chain!=="solana"&&e.chainType==="solana"||i.chain==="stellar"&&e.chainType!=="stellar"||i.chain!=="stellar"&&e.chainType==="stellar")throw new r(`Wallet chain does not match existing wallet's chain. You must use chain: ${e.chainType}.`);if(e.type!=="smart")return;let n=i.signer,t=(a=e==null?void 0:e.config)==null?void 0:a.adminSigner;if(n!=null&&t!=null){if(n.type!==t.type)throw new r("The wallet signer type provided in the wallet config does not match the existing wallet's adminSigner type");S(n,t)}i.delegatedSigners!=null&&this.validateDelegatedSigners(e,i.delegatedSigners)}validateDelegatedSigners(e,i){var t;let n=(t=e==null?void 0:e.config)==null?void 0:t.delegatedSigners;if(i.length!==0){if(n==null||n.length===0)throw new r(`${i.length} delegated signer(s) specified, but wallet "${e.address}" has no delegated signers. ${u}`);for(let a of i)if(n.find(o=>o.locator===a.signer)==null){let o=n.map(l=>l.locator).join(", ");throw new r(`Delegated signer '${a.signer}' does not exist in wallet "${e.address}". Available delegated signers: ${o}. ${u}`)}}}getChainType(e){return e==="solana"?"solana":e==="stellar"?"stellar":"evm"}};export{w as a};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-KKQBZXFE.js";import{a as r}from"./chunk-S3DYQVRD.js";import{BlockchainIncludingTestnet as e}from"@crossmint/common-sdk-base";import{baseSepolia as E,base as n,polygonAmoy as S,polygon as T,optimismSepolia as A,optimism as s,arbitrumSepolia as o,arbitrum as O,arbitrumNova as I,modeTestnet as i,mode as L,bsc as _,shape as c,zora as C,zoraSepolia as M,sepolia as p,flowMainnet as l,flowTestnet as P,plume as R,plumeTestnet as m}from"viem/chains";var V=[e.ABSTRACT_TESTNET,e.ARBITRUM_SEPOLIA,e.BASE_SEPOLIA,e.CURTIS,e.ETHEREUM_SEPOLIA,e.FLOW_TESTNET,e.MANTLE_SEPOLIA,e.MODE_SEPOLIA,e.OPTIMISM_SEPOLIA,e.PLUME_TESTNET,e.POLYGON_AMOY,e.SCROLL_SEPOLIA,e.SEI_ATLANTIC_2_TESTNET,e.STORY_TESTNET,e.WORLD_CHAIN_SEPOLIA,e.ZORA_SEPOLIA],W=[e.ABSTRACT,e.APECHAIN,e.ARBITRUM,e.ARBITRUMNOVA,e.BASE,e.BSC,e.FLOW,e.MANTLE,e.MODE,e.OPTIMISM,e.PLUME,e.POLYGON,e.SCROLL,e.SEI_PACIFIC_1,e.SHAPE,e.STORY,e.WORLDCHAIN,e.ZORA];function H(t){switch(t){case e.BASE_SEPOLIA:return E;case e.BASE:return n;case e.POLYGON_AMOY:return S;case e.POLYGON:return T;case e.OPTIMISM_SEPOLIA:return A;case e.OPTIMISM:return s;case e.ARBITRUM_SEPOLIA:return o;case e.ARBITRUM:return O;case e.ARBITRUMNOVA:return I;case e.STORY_TESTNET:return r;case e.STORY:return a;case e.MODE_SEPOLIA:return i;case e.MODE:return L;case e.BSC:return _;case e.SHAPE:return c;case e.ZORA:return C;case e.ZORA_SEPOLIA:return M;case e.ETHEREUM_SEPOLIA:return p;case e.FLOW:return l;case e.FLOW_TESTNET:return P;case e.PLUME_TESTNET:return m;case e.PLUME:return R;case e.ABSTRACT:case e.ABSTRACT_TESTNET:case e.APECHAIN:case e.MANTLE:case e.MANTLE_SEPOLIA:case e.SCROLL:case e.SCROLL_SEPOLIA:case e.SEI_PACIFIC_1:case e.SEI_ATLANTIC_2_TESTNET:case e.CURTIS:case e.WORLDCHAIN:case e.WORLD_CHAIN_SEPOLIA:throw new Error(`Chain ${t} is not yet supported in toViemChain function. Please add the appropriate viem chain definition.`);default:throw new Error(`Unknown chain: ${t}`)}}export{H as a};
@@ -1 +0,0 @@
1
- import{defineChain as t}from"viem";var n=t({id:1513,name:"Story Testnet",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},rpcUrls:{default:{http:["https://testnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story Testnet Explorer",url:"https://testnet.storyscan.xyz"}},testnet:!0});export{n as a};
@@ -1 +0,0 @@
1
- import{a as J}from"./chunk-HJ5EDMTA.js";import{d as O}from"./chunk-23ZHV3VD.js";import{c as L,d as W,i as E,m as N,p as x,q as I,r as _,s as P,t as k,u as $,v as F,w as B,x as R}from"./chunk-PSXRNSOE.js";import{a as f,b as A,c as u,d as b,e as C,f as l}from"./chunk-BW7YYVZE.js";import{isValidAddress as G}from"@crossmint/common-sdk-base";var T,c,H=class{constructor(e,t){b(this,T);b(this,c);let{chain:r,address:n,owner:s,signer:h,options:g,alias:i}=e;C(this,c,t),this.chain=r,this.address=n,this.owner=s,this.signer=h,C(this,T,g),this.alias=i}static getApiClient(e){return e.apiClient}static getOptions(e){return e.options}get apiClient(){return u(this,c)}get options(){return u(this,T)}experimental_apiClient(){return u(this,c)}balances(e,t){return l(this,null,function*(){let r;switch(this.chain){case"solana":r="sol";break;case"stellar":r="xlm";break;default:r="eth";break}let n=[r,"usdc",...e!=null?e:[]],s=yield u(this,c).getBalance(this.address,{chains:t!=null?t:[this.chain],tokens:n});if("error"in s)throw new Error(`Failed to get balances for wallet: ${JSON.stringify(s.message)}`);return this.transformBalanceResponse(s,r,e)})}transformBalanceResponse(e,t,r){let n=a=>{var m,w,v,y,S;let o=(m=a.chains)==null?void 0:m[this.chain],p={};return this.chain==="solana"&&o!=null&&"mintHash"in o?p={mintHash:o.mintHash}:this.chain==="stellar"&&o!=null&&"contractId"in o?p={contractId:o.contractId}:o!=null&&"contractAddress"in o&&(p={contractAddress:o.contractAddress}),f({symbol:(w=a.symbol)!=null?w:"",name:(v=a.name)!=null?v:"",amount:(y=a.amount)!=null?y:"0",decimals:a.decimals,rawAmount:(S=a.rawAmount)!=null?S:"0"},p)},s=e.find(a=>a.symbol===t),h=e.find(a=>a.symbol==="usdc"),g=e.filter(a=>a.symbol!==t&&a.symbol!=="usdc"),i=a=>{let o={symbol:a,name:a,amount:"0",decimals:0,rawAmount:"0"},p={};return this.chain==="solana"?p={mintHash:void 0}:this.chain==="stellar"?p={contractId:void 0}:p={contractAddress:void 0},f(f({},o),p)};return{nativeToken:s!=null?n(s):i(t),usdc:h!=null?n(h):i("usdc"),tokens:g.map(n)}}experimental_nfts(e){return l(this,null,function*(){return yield u(this,c).experimental_getNfts(A(f({},e),{chain:this.chain,address:this.address}))})}experimental_transactions(){return l(this,null,function*(){let e=yield u(this,c).getTransactions(this.walletLocator);if("error"in e)throw new Error(`Failed to get transactions: ${JSON.stringify(e.message)}`);return e})}experimental_transaction(e){return l(this,null,function*(){let t=yield u(this,c).getTransaction(this.walletLocator,e);if("error"in t)throw new Error(`Failed to get transaction: ${JSON.stringify(t.error)}`);return t})}experimental_activity(){return l(this,null,function*(){let e=yield this.apiClient.experimental_activity(this.walletLocator,{chain:this.chain});if("error"in e)throw new Error(`Failed to get activity: ${JSON.stringify(e.message)}`);return e})}send(e,t,r,n){return l(this,null,function*(){yield this.preAuthIfNeeded();let s=D(e),h=M(t,this.chain),g=f({recipient:s,amount:r},(n==null?void 0:n.experimental_signer)!=null?{signer:n.experimental_signer}:{}),i=yield u(this,c).send(this.walletLocator,h,g);if("message"in i)throw new _(`Failed to send token: ${JSON.stringify(i.message)}`);return n!=null&&n.experimental_prepareOnly?{hash:void 0,explorerLink:void 0,transactionId:i.id}:yield this.approveTransactionAndWait(i.id)})}approveTransaction(e){return l(this,null,function*(){return console.warn("approveTransaction is deprecated. Use approve instead. This method will be removed in the next major version."),yield this.approve(e)})}approve(e){return l(this,null,function*(){if(e.transactionId!=null)return yield this.approveTransactionAndWait(e.transactionId,e.options);if(e.signatureId!=null)return yield this.approveSignatureAndWait(e.signatureId,e.options);throw new Error("Either transactionId or signatureId must be provided")})}addDelegatedSigner(e){return l(this,null,function*(){var n,s,h;let t=yield u(this,c).registerSigner(this.walletLocator,{signer:e.signer,chain:this.chain==="solana"||this.chain==="stellar"?void 0:this.chain});if("error"in t)throw new Error(`Failed to register signer: ${JSON.stringify(t.message)}`);if(this.chain==="solana"||this.chain==="stellar"){if(!("transaction"in t)||t.transaction==null)throw new Error("Expected transaction in response for Solana/Stellar chain");let g=t.transaction.id;if((n=e.options)!=null&&n.experimental_prepareOnly)return{transactionId:g};yield this.approveTransactionAndWait(g);return}if(!("chains"in t))throw new Error("Expected chains in response for EVM chain");let r=(s=t.chains)==null?void 0:s[this.chain];if((h=e.options)!=null&&h.experimental_prepareOnly)return{signatureId:(r==null?void 0:r.status)!=="success"?r==null?void 0:r.id:void 0};if((r==null?void 0:r.status)==="awaiting-approval"){yield this.approveSignatureAndWait(r.id);return}if((r==null?void 0:r.status)==="pending"){yield this.waitForSignature(r.id);return}})}delegatedSigners(){return l(this,null,function*(){var t,r,n;let e=yield u(this,c).getWallet(this.walletLocator);if("error"in e)throw new W(JSON.stringify(e));if(e.type!=="smart"||e.chainType!=="evm"&&e.chainType!=="solana"&&e.chainType!=="stellar")throw new L(`Wallet type ${e.type} not supported`);return(n=(r=(t=e==null?void 0:e.config)==null?void 0:t.delegatedSigners)==null?void 0:r.map(s=>{let h=s.locator.indexOf(":");return{signer:`external-wallet:${h>=0?s.locator.slice(h+1):s.locator}`}}))!=null?n:[]})}get walletLocator(){if(u(this,c).isServerSide)return this.address;{let e;switch(this.chain){case"stellar":e="me:stellar:smart";break;case"solana":e="me:solana:smart";break;default:e="me:evm:smart";break}let t=this.alias!=null?`:alias:${this.alias}`:"";return e+t}}preAuthIfNeeded(){return l(this,null,function*(){this.signer instanceof J&&(yield this.signer.ensureAuthenticated())})}get isSolanaWallet(){return this.chain==="solana"}approveTransactionAndWait(e,t){return l(this,null,function*(){return yield this.approveTransactionInternal(e,t),yield this.sleep(1e3),yield this.waitForTransaction(e)})}approveSignatureAndWait(e,t){return l(this,null,function*(){let r=yield this.approveSignatureInternal(e,t);return!("error"in r)&&r.status==="success"&&r.outputSignature!=null?{signature:r.outputSignature,signatureId:e}:(yield this.sleep(1e3),yield this.waitForSignature(e))})}approveSignatureInternal(e,t){return l(this,null,function*(){var i,a;if(this.isSolanaWallet)throw new Error("Approving signatures is only supported for EVM smart wallets");let r=yield u(this,c).getSignature(this.walletLocator,e);if("error"in r)throw new x(JSON.stringify(r));if(this.signer.type==="api-key")return r;if((t==null?void 0:t.experimental_approval)!=null){let o=[t.experimental_approval];return yield this.executeApproveSignatureWithErrorHandling(e,o)}let n=(i=r.approvals)==null?void 0:i.pending;if(n==null)return r;let s=[...(a=t==null?void 0:t.additionalSigners)!=null?a:[],this.signer],g=(yield Promise.all(n.map(o=>{let p=s.find(m=>m.locator()===o.signer.locator);if(p==null)throw new E(`Signer ${o.signer} not found in pending approvals`);return p.signMessage(o.message)}))).map(o=>A(f({},o),{signer:this.signer.locator()}));return yield this.executeApproveSignatureWithErrorHandling(e,g)})}approveTransactionInternal(e,t){return l(this,null,function*(){var i,a,o,p,m;let r=yield u(this,c).getTransaction(this.walletLocator,e);if("error"in r)throw new P(JSON.stringify(r));if(yield(o=(a=(i=u(this,T))==null?void 0:i.experimental_callbacks)==null?void 0:a.onTransactionStart)==null?void 0:o.call(a),this.signer.type==="api-key")return r;if((t==null?void 0:t.experimental_approval)!=null){let w=[t.experimental_approval];return yield this.executeApproveTransactionWithErrorHandling(e,w)}let n=(p=r.approvals)==null?void 0:p.pending;if(n==null)return r;let s=[...(m=t==null?void 0:t.additionalSigners)!=null?m:[],this.signer],g=(yield Promise.all(n.map(w=>{let v=s.find(S=>S.locator()===w.signer.locator);if(v==null)throw new E(`Signer ${w.signer} not found in pending approvals`);let y=r.chainType==="solana"&&"transaction"in r.onChain?r.onChain.transaction:w.message;return v.signTransaction(y)}))).map(w=>A(f({},w),{signer:this.signer.locator()}));return yield this.executeApproveTransactionWithErrorHandling(e,g)})}executeApproveTransactionWithErrorHandling(e,t){return l(this,null,function*(){let r=yield u(this,c).approveTransaction(this.walletLocator,e,{approvals:t});if(r.error)throw new R(JSON.stringify(r));return r})}executeApproveSignatureWithErrorHandling(e,t){return l(this,null,function*(){let r=yield u(this,c).approveSignature(this.walletLocator,e,{approvals:t});if(r.error)throw new I(JSON.stringify(r));return r})}waitForSignature(e){return l(this,null,function*(){let t=null;do if(yield new Promise(r=>setTimeout(r,O)),t=yield u(this,c).getSignature(this.walletLocator,e),"error"in t)throw new x(JSON.stringify(t));while(t===null||t.status==="pending");if(t.status==="failed")throw new N("Signature signing failed");if(!t.outputSignature)throw new x("Signature not available");return{signature:t.outputSignature,signatureId:e}})}waitForTransaction(h){return l(this,arguments,function*(e,t=6e4,{backoffMultiplier:r=1.1,maxBackoffMs:n=2e3,initialBackoffMs:s=O}={}){var o;let g=Date.now(),i;do{if(Date.now()-g>t)throw new k("Transaction confirmation timeout");if(i=yield u(this,c).getTransaction(this.walletLocator,e),i.error)throw new P(JSON.stringify(i));yield this.sleep(s),s=Math.min(s*r,n)}while(i.status==="pending");if(i.status==="failed")throw new $(`Transaction sending failed: ${JSON.stringify(i.error)}`);if(i.status==="awaiting-approval")throw new F("Transaction is awaiting approval. Please submit required approvals before waiting for completion.");let a=i.onChain.txId;if(a==null)throw new B("Transaction hash not found on transaction response");return{hash:a,explorerLink:(o=i.onChain.explorerLink)!=null?o:"",transactionId:i.id}})}sleep(e){return l(this,null,function*(){return new Promise(t=>setTimeout(t,e))})}};T=new WeakMap,c=new WeakMap;function D(d){if(typeof d=="string")return d;if("email"in d)return`email:${d.email}`;if("x"in d)return`x:${d.x}`;if("twitter"in d)return`twitter:${d.twitter}`;if("phone"in d)return`phoneNumber:${d.phone}`;if("userId"in d)return`userId:${d.userId}`;throw new Error("Invalid recipient locator")}function M(d,e){return G(d)?`${e}:${d}`:`${e}:${d.toLowerCase()}`}export{H as a};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _clientfetch = require('@hey-api/client-fetch');var o=_clientfetch.createClient.call(void 0, _clientfetch.createConfig.call(void 0, {baseUrl:"https://staging.crossmint.com/api"}));exports.a = o;
@@ -1 +0,0 @@
1
- import{f as i}from"./chunk-BW7YYVZE.js";import{WebAuthnP256 as e}from"ox";var n=class{constructor(t){this.config=t;this.type="passkey";this.id=t.id}locator(){return this.config.locator}signMessage(t){return i(this,null,function*(){if(this.config.onSignWithPasskey)return yield this.config.onSignWithPasskey(t);let{signature:s,metadata:r}=yield e.sign({credentialId:this.id,challenge:t});return{signature:{r:`0x${s.r.toString(16)}`,s:`0x${s.s.toString(16)}`},metadata:r}})}signTransaction(t){return i(this,null,function*(){return yield this.signMessage(t)})}};export{n as a};
@@ -1 +0,0 @@
1
- import{a as n}from"./chunk-VY634F3J.js";import{a}from"./chunk-H4T4IXCF.js";import{a as t}from"./chunk-WQP2FSVI.js";import{a as o}from"./chunk-UBOWSXW3.js";import{a as m}from"./chunk-IGBQEAD5.js";import{a as l}from"./chunk-6PVKL5RC.js";import{a as p}from"./chunk-2SHDBC47.js";import{a as s}from"./chunk-LW6JSI4J.js";import{a as i}from"./chunk-3APSOOE3.js";function d(r,e){switch(e.type){case"email":case"phone":return r==="solana"?new n(e):r==="stellar"?new a(e):new t(e);case"api-key":return r==="solana"?new m(e):new s(e);case"external-wallet":return r==="solana"?new l(e):r==="stellar"?new p(e):new i(e);case"passkey":return new o(e)}}export{d as a};
@@ -1 +0,0 @@
1
- import{b as n,c as i}from"./chunk-23ZHV3VD.js";import{a as o}from"./chunk-PSXRNSOE.js";import{f as r}from"./chunk-BW7YYVZE.js";import{APIKeyUsageOrigin as c,CrossmintApiClient as h}from"@crossmint/common-sdk-base";var p=class extends h{constructor(e){super(e,{internalConfig:{sdkMetadata:{name:i,version:n}}});this.apiPrefix="api/2025-06-09/wallets";this.legacyApiPrefix="api/2022-06-09/wallets"}createWallet(e){return r(this,null,function*(){let s=this.isServerSide?`${this.apiPrefix}`:`${this.apiPrefix}/me`;return(yield this.post(s,{body:JSON.stringify(e),headers:this.headers})).json()})}getWallet(e){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}`,{headers:this.headers})).json()})}createTransaction(e,s){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveTransaction(e,s,t){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions/${s}/approvals`,{body:JSON.stringify(t),headers:this.headers})).json()})}getTransaction(e,s){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions/${s}`,{headers:this.headers})).json()})}createSignature(e,s){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveSignature(e,s,t){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures/${s}/approvals`,{body:JSON.stringify(t),headers:this.headers})).json()})}getSignature(e,s){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signatures/${s}`,{headers:this.headers})).json()})}getTransactions(e){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions`,{headers:this.headers})).json()})}experimental_getNfts(e){return r(this,null,function*(){let s=new URLSearchParams;s.append("page",e.page.toString()),s.append("perPage",e.perPage.toString());let t=`${e.chain}:${e.address}`;return(yield this.get(`${this.apiPrefix}/${t}/nfts?${s.toString()}`,{headers:this.headers})).json()})}experimental_activity(e,s){return r(this,null,function*(){let t=e;this.isServerSide||(t=`me:${s.chain==="solana"?"solana-smart-wallet":"evm-smart-wallet"}`);let a=new URLSearchParams;return a.append("chain",s.chain.toString()),(yield this.get(`${this.legacyApiPrefix}/${t}/activity?${a.toString()}`,{headers:this.headers})).json()})}getBalance(e,s){return r(this,null,function*(){let t=new URLSearchParams;return t.append("tokens",s.tokens.join(",")),t.append("chains",s.chains.join(",")),(yield this.get(`${this.apiPrefix}/${e}/balances?${t.toString()}`,{headers:this.headers})).json()})}registerSigner(e,s){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signers`,{body:JSON.stringify(s),headers:this.headers})).json()})}getSigner(e,s){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signers/${s}`,{headers:this.headers})).json()})}send(e,s,t){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/tokens/${s}/transfers`,{body:JSON.stringify(t),headers:this.headers})).json()})}get isServerSide(){return this.parsedAPIKey.usageOrigin===c.SERVER}get environment(){if(!this.parsedAPIKey.isValid)throw new o("Invalid API key");return this.parsedAPIKey.environment}get headers(){return{"Content-Type":"application/json"}}};export{p as a};
@@ -1 +0,0 @@
1
- import{a as i,b as s}from"./chunk-HJ5EDMTA.js";import{f as t}from"./chunk-BW7YYVZE.js";import{VersionedTransaction as m}from"@solana/web3.js";import o from"bs58";var a=class g extends i{constructor(e){super(e)}signMessage(){return t(this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for email signer"))})}signTransaction(e){return t(this,null,function*(){var r;yield this.handleAuthRequired();let c=this.getJwtOrThrow(),d=o.decode(e),l=m.deserialize(d).message.serialize(),n=yield(r=this.config.clientTEEConnection)==null?void 0:r.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:c,apiKey:this.config.crossmint.apiKey},data:{keyType:"ed25519",bytes:o.encode(l),encoding:"base58"}},options:s});if((n==null?void 0:n.status)==="error")throw new Error(n.error);if((n==null?void 0:n.signature)==null)throw new Error("Failed to sign transaction");return g.verifyPublicKeyFormat(n.publicKey),{signature:n.signature.bytes}})}static verifyPublicKeyFormat(e){if(e==null)throw new Error("No public key found");if(e.encoding!=="base58"||e.keyType!=="ed25519"||e.bytes==null)throw new Error("Not supported. Expected public key to be in base58 encoding and ed25519 key type. Got: "+JSON.stringify(e))}getChainKeyParams(){return{scheme:"ed25519",encoding:"base58"}}};export{a};
@@ -1 +0,0 @@
1
- import{a as o,b as a}from"./chunk-HJ5EDMTA.js";import{f as t}from"./chunk-BW7YYVZE.js";import{PersonalMessage as p}from"ox";import{isHex as y,toHex as h}from"viem";var g=class c extends o{constructor(e){super(e)}signMessage(e){return t(this,null,function*(){let i=y(e)?e:h(e),r=p.getSignPayload(i);return yield this.sign(r)})}signTransaction(e){return t(this,null,function*(){return yield this.sign(e)})}sign(e){return t(this,null,function*(){var s;yield this.handleAuthRequired();let i=this.getJwtOrThrow(),r=e.replace("0x",""),n=yield(s=this.config.clientTEEConnection)==null?void 0:s.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:i,apiKey:this.config.crossmint.apiKey},data:{keyType:"secp256k1",bytes:r,encoding:"hex"}},options:a});if((n==null?void 0:n.status)==="error")throw new Error(n.error);if((n==null?void 0:n.signature)==null)throw new Error("Failed to sign transaction");return c.verifyPublicKeyFormat(n.publicKey),{signature:n.signature.bytes}})}static verifyPublicKeyFormat(e){if(e==null)throw new Error("No public key found");if(e.encoding!=="hex"||e.keyType!=="secp256k1"||e.bytes==null)throw new Error("Not supported. Expected public key to be in hex encoding and secp256k1 key type. Got: "+JSON.stringify(e))}getChainKeyParams(){return{scheme:"secp256k1",encoding:"hex"}}};export{g as a};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKO6QYKDXcjs = require('./chunk-KO6QYKDX.cjs');var _chunk2XVV7Z43cjs = require('./chunk-2XVV7Z43.cjs');var _chunkHPHVJ6BAcjs = require('./chunk-HPHVJ6BA.cjs');var _chunkYWPTI2QOcjs = require('./chunk-YWPTI2QO.cjs');var _chunk4KXOWU5Ecjs = require('./chunk-4KXOWU5E.cjs');var _chunkHRSVFJNDcjs = require('./chunk-HRSVFJND.cjs');var _chunkC3T63EC7cjs = require('./chunk-C3T63EC7.cjs');var _chunkYZ4HRYSLcjs = require('./chunk-YZ4HRYSL.cjs');var _chunkM4TOGGLVcjs = require('./chunk-M4TOGGLV.cjs');function E(r,e){switch(e.type){case"email":case"phone":return r==="solana"?new (0, _chunkKO6QYKDXcjs.a)(e):r==="stellar"?new (0, _chunk2XVV7Z43cjs.a)(e):new (0, _chunkHPHVJ6BAcjs.a)(e);case"api-key":return r==="solana"?new (0, _chunk4KXOWU5Ecjs.a)(e):new (0, _chunkYZ4HRYSLcjs.a)(e);case"external-wallet":return r==="solana"?new (0, _chunkHRSVFJNDcjs.a)(e):r==="stellar"?new (0, _chunkC3T63EC7cjs.a)(e):new (0, _chunkM4TOGGLVcjs.a)(e);case"passkey":return new (0, _chunkYWPTI2QOcjs.a)(e)}}exports.a = E;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIR5WN6FQcjs = require('./chunk-IR5WN6FQ.cjs');var _chunkGEY574THcjs = require('./chunk-GEY574TH.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var _chains = require('viem/chains');var y=[_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.BASE_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.CURTIS,_commonsdkbase.BlockchainIncludingTestnet.ETHEREUM_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.FLOW_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.MANTLE_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.MODE_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.PLUME_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.POLYGON_AMOY,_commonsdkbase.BlockchainIncludingTestnet.SCROLL_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.SEI_ATLANTIC_2_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.STORY_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.WORLD_CHAIN_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.ZORA_SEPOLIA],V=[_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT,_commonsdkbase.BlockchainIncludingTestnet.APECHAIN,_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM,_commonsdkbase.BlockchainIncludingTestnet.ARBITRUMNOVA,_commonsdkbase.BlockchainIncludingTestnet.BASE,_commonsdkbase.BlockchainIncludingTestnet.BSC,_commonsdkbase.BlockchainIncludingTestnet.FLOW,_commonsdkbase.BlockchainIncludingTestnet.MANTLE,_commonsdkbase.BlockchainIncludingTestnet.MODE,_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM,_commonsdkbase.BlockchainIncludingTestnet.PLUME,_commonsdkbase.BlockchainIncludingTestnet.POLYGON,_commonsdkbase.BlockchainIncludingTestnet.SCROLL,_commonsdkbase.BlockchainIncludingTestnet.SEI_PACIFIC_1,_commonsdkbase.BlockchainIncludingTestnet.SHAPE,_commonsdkbase.BlockchainIncludingTestnet.STORY,_commonsdkbase.BlockchainIncludingTestnet.WORLDCHAIN,_commonsdkbase.BlockchainIncludingTestnet.ZORA];function W(t){switch(t){case _commonsdkbase.BlockchainIncludingTestnet.BASE_SEPOLIA:return _chains.baseSepolia;case _commonsdkbase.BlockchainIncludingTestnet.BASE:return _chains.base;case _commonsdkbase.BlockchainIncludingTestnet.POLYGON_AMOY:return _chains.polygonAmoy;case _commonsdkbase.BlockchainIncludingTestnet.POLYGON:return _chains.polygon;case _commonsdkbase.BlockchainIncludingTestnet.OPTIMISM_SEPOLIA:return _chains.optimismSepolia;case _commonsdkbase.BlockchainIncludingTestnet.OPTIMISM:return _chains.optimism;case _commonsdkbase.BlockchainIncludingTestnet.ARBITRUM_SEPOLIA:return _chains.arbitrumSepolia;case _commonsdkbase.BlockchainIncludingTestnet.ARBITRUM:return _chains.arbitrum;case _commonsdkbase.BlockchainIncludingTestnet.ARBITRUMNOVA:return _chains.arbitrumNova;case _commonsdkbase.BlockchainIncludingTestnet.STORY_TESTNET:return _chunkGEY574THcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.STORY:return _chunkIR5WN6FQcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.MODE_SEPOLIA:return _chains.modeTestnet;case _commonsdkbase.BlockchainIncludingTestnet.MODE:return _chains.mode;case _commonsdkbase.BlockchainIncludingTestnet.BSC:return _chains.bsc;case _commonsdkbase.BlockchainIncludingTestnet.SHAPE:return _chains.shape;case _commonsdkbase.BlockchainIncludingTestnet.ZORA:return _chains.zora;case _commonsdkbase.BlockchainIncludingTestnet.ZORA_SEPOLIA:return _chains.zoraSepolia;case _commonsdkbase.BlockchainIncludingTestnet.ETHEREUM_SEPOLIA:return _chains.sepolia;case _commonsdkbase.BlockchainIncludingTestnet.FLOW:return _chains.flowMainnet;case _commonsdkbase.BlockchainIncludingTestnet.FLOW_TESTNET:return _chains.flowTestnet;case _commonsdkbase.BlockchainIncludingTestnet.PLUME_TESTNET:return _chains.plumeTestnet;case _commonsdkbase.BlockchainIncludingTestnet.PLUME:return _chains.plume;case _commonsdkbase.BlockchainIncludingTestnet.ABSTRACT:case _commonsdkbase.BlockchainIncludingTestnet.ABSTRACT_TESTNET:case _commonsdkbase.BlockchainIncludingTestnet.APECHAIN:case _commonsdkbase.BlockchainIncludingTestnet.MANTLE:case _commonsdkbase.BlockchainIncludingTestnet.MANTLE_SEPOLIA:case _commonsdkbase.BlockchainIncludingTestnet.SCROLL:case _commonsdkbase.BlockchainIncludingTestnet.SCROLL_SEPOLIA:case _commonsdkbase.BlockchainIncludingTestnet.SEI_PACIFIC_1:case _commonsdkbase.BlockchainIncludingTestnet.SEI_ATLANTIC_2_TESTNET:case _commonsdkbase.BlockchainIncludingTestnet.CURTIS:case _commonsdkbase.BlockchainIncludingTestnet.WORLDCHAIN:case _commonsdkbase.BlockchainIncludingTestnet.WORLD_CHAIN_SEPOLIA:throw new Error(`Chain ${t} is not yet supported in toViemChain function. Please add the appropriate viem chain definition.`);default:throw new Error(`Unknown chain: ${t}`)}}exports.a = W;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var o=Object.defineProperty,p=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var i=Object.getOwnPropertySymbols;var r=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var k=a=>{throw TypeError(a)};var j=(a,b,c)=>b in a?o(a,b,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[b]=c,t= exports.a =(a,b)=>{for(var c in b||(b={}))r.call(b,c)&&j(a,c,b[c]);if(i)for(var c of i(b))s.call(b,c)&&j(a,c,b[c]);return a},u= exports.b =(a,b)=>p(a,q(b));var l=(a,b,c)=>b.has(a)||k("Cannot "+c);var v=(a,b,c)=>(l(a,b,"read from private field"),c?c.call(a):b.get(a)),w= exports.d =(a,b,c)=>b.has(a)?k("Cannot add the same private member more than once"):b instanceof WeakSet?b.add(a):b.set(a,c),x= exports.e =(a,b,c,e)=>(l(a,b,"write to private field"),e?e.call(a,c):b.set(a,c),c);var y=(a,b,c)=>new Promise((e,h)=>{var m=d=>{try{f(c.next(d))}catch(g){h(g)}},n=d=>{try{f(c.throw(d))}catch(g){h(g)}},f=d=>d.done?e(d.value):Promise.resolve(d.value).then(m,n);f((c=c.apply(a,b)).next())});exports.a = t; exports.b = u; exports.c = v; exports.d = w; exports.e = x; exports.f = y;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkNIKULSJKcjs = require('./chunk-NIKULSJK.cjs');var _chunkHRSVFJNDcjs = require('./chunk-HRSVFJND.cjs');var _chunkO4FVTK7Xcjs = require('./chunk-O4FVTK7X.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var _commonsdkbase = require('@crossmint/common-sdk-base');var u=class T extends _chunkNIKULSJKcjs.a{constructor(n){super({chain:n.chain,address:n.address,owner:n.owner,signer:n.signer,options:_chunkNIKULSJKcjs.a.getOptions(n),alias:n.alias},_chunkNIKULSJKcjs.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 T(n)}sendTransaction(n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var e,i;yield this.preAuthIfNeeded();let t=yield this.createTransaction(n);if((e=n.options)!=null&&e.experimental_prepareOnly)return{hash:void 0,explorerLink:void 0,transactionId:t.id};let a={additionalSigners:(i=n.additionalSigners)==null?void 0:i.map(s=>new (0, _chunkHRSVFJNDcjs.a)({type:"external-wallet",address:s.publicKey.toString(),locator:`external-wallet:${s.publicKey.toString()}`,onSignTransaction:p=>(p.sign([s]),Promise.resolve(p))}))};return yield this.approveTransactionAndWait(t.id,a)})}createTransaction(n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var e,i;let t=(i=(e=n.options)==null?void 0:e.experimental_signer)!=null?i:this.signer.locator(),r;"serializedTransaction"in n?r=n.serializedTransaction:r=_bs582.default.encode(n.transaction.serialize());let a=yield this.apiClient.createTransaction(this.walletLocator,{params:{transaction:r,signer:t}});if("error"in a)throw new (0, _chunkO4FVTK7Xcjs.r)(JSON.stringify(a));return a})}};exports.a = u;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _ox = require('ox');var n=class{constructor(t){this.config=t;this.type="passkey";this.id=t.id}locator(){return this.config.locator}signMessage(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(this.config.onSignWithPasskey)return yield this.config.onSignWithPasskey(t);let{signature:s,metadata:r}=yield _ox.WebAuthnP256.sign({credentialId:this.id,challenge:t});return{signature:{r:`0x${s.r.toString(16)}`,s:`0x${s.s.toString(16)}`},metadata:r}})}signTransaction(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.signMessage(t)})}};exports.a = n;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var n=class{constructor(t){this.config=t;this.type="api-key"}locator(){return this.config.locator}signMessage(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield Promise.reject(new Error("API key signers do not support direct message signing - signatures are handled automatically by the backend"))})}signTransaction(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield Promise.reject(new Error("API key signers do not support direct transaction signing - transaction are handled automatically by the backend"))})}};exports.a = n;