@crossmint/wallets-sdk 0.20.2 → 0.20.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 (344) hide show
  1. package/dist/api/__tests__/constants.cjs +4 -3
  2. package/dist/api/__tests__/constants.cjs.map +1 -0
  3. package/dist/api/__tests__/constants.js +3 -2
  4. package/dist/api/__tests__/constants.js.map +1 -0
  5. package/dist/api/__tests__/test-utils.cjs +36 -35
  6. package/dist/api/__tests__/test-utils.cjs.map +1 -0
  7. package/dist/api/__tests__/test-utils.js +7 -6
  8. package/dist/api/__tests__/test-utils.js.map +1 -0
  9. package/dist/api/client.cjs +7 -6
  10. package/dist/api/client.cjs.map +1 -0
  11. package/dist/api/client.js +6 -5
  12. package/dist/api/client.js.map +1 -0
  13. package/dist/api/gen/client.gen.cjs +4 -3
  14. package/dist/api/gen/client.gen.cjs.map +1 -0
  15. package/dist/api/gen/client.gen.js +3 -2
  16. package/dist/api/gen/client.gen.js.map +1 -0
  17. package/dist/api/gen/index.cjs +6 -5
  18. package/dist/api/gen/index.cjs.map +1 -0
  19. package/dist/api/gen/index.js +5 -4
  20. package/dist/api/gen/index.js.map +1 -0
  21. package/dist/api/gen/sdk.gen.cjs +5 -4
  22. package/dist/api/gen/sdk.gen.cjs.map +1 -0
  23. package/dist/api/gen/sdk.gen.js +4 -3
  24. package/dist/api/gen/sdk.gen.js.map +1 -0
  25. package/dist/api/gen/types.gen.cjs +2 -1
  26. package/dist/api/gen/types.gen.cjs.map +1 -0
  27. package/dist/api/gen/types.gen.js +2 -1
  28. package/dist/api/gen/types.gen.js.map +1 -0
  29. package/dist/api/index.cjs +9 -8
  30. package/dist/api/index.cjs.map +1 -0
  31. package/dist/api/index.js +8 -7
  32. package/dist/api/index.js.map +1 -0
  33. package/dist/api/types.cjs +2 -1
  34. package/dist/api/types.cjs.map +1 -0
  35. package/dist/api/types.js +2 -1
  36. package/dist/api/types.js.map +1 -0
  37. package/dist/chains/chains.cjs +13 -12
  38. package/dist/chains/chains.cjs.map +1 -0
  39. package/dist/chains/chains.js +12 -11
  40. package/dist/chains/chains.js.map +1 -0
  41. package/dist/chains/definitions/arcTestnet.cjs +4 -3
  42. package/dist/chains/definitions/arcTestnet.cjs.map +1 -0
  43. package/dist/chains/definitions/arcTestnet.js +3 -2
  44. package/dist/chains/definitions/arcTestnet.js.map +1 -0
  45. package/dist/chains/definitions/story.cjs +4 -3
  46. package/dist/chains/definitions/story.cjs.map +1 -0
  47. package/dist/chains/definitions/story.js +3 -2
  48. package/dist/chains/definitions/story.js.map +1 -0
  49. package/dist/chains/definitions/storyTestnet.cjs +4 -3
  50. package/dist/chains/definitions/storyTestnet.cjs.map +1 -0
  51. package/dist/chains/definitions/storyTestnet.js +3 -2
  52. package/dist/chains/definitions/storyTestnet.js.map +1 -0
  53. package/dist/chains/definitions/tempo.cjs +4 -3
  54. package/dist/chains/definitions/tempo.cjs.map +1 -0
  55. package/dist/chains/definitions/tempo.js +3 -2
  56. package/dist/chains/definitions/tempo.js.map +1 -0
  57. package/dist/chains/definitions/tempoTestnet.cjs +4 -3
  58. package/dist/chains/definitions/tempoTestnet.cjs.map +1 -0
  59. package/dist/chains/definitions/tempoTestnet.js +3 -2
  60. package/dist/chains/definitions/tempoTestnet.js.map +1 -0
  61. package/dist/{chunk-FICVKSXZ.js → chunk-2QI75IOB.js} +4 -3
  62. package/dist/chunk-2QI75IOB.js.map +1 -0
  63. package/dist/{chunk-2T5HHKUI.js → chunk-2RQYQVVY.js} +1 -0
  64. package/dist/chunk-2RQYQVVY.js.map +1 -0
  65. package/dist/{chunk-JWMQALLN.js → chunk-33TLFTHT.js} +1 -0
  66. package/dist/chunk-33TLFTHT.js.map +1 -0
  67. package/dist/{chunk-SGINWAB6.js → chunk-36C7SCPK.js} +1 -0
  68. package/dist/chunk-36C7SCPK.js.map +1 -0
  69. package/dist/{chunk-WJUPOCKJ.js → chunk-3J2BNUTO.js} +1 -0
  70. package/dist/chunk-3J2BNUTO.js.map +1 -0
  71. package/dist/{chunk-FOOISYCJ.js → chunk-3PG4HRAS.js} +2 -1
  72. package/dist/chunk-3PG4HRAS.js.map +1 -0
  73. package/dist/{chunk-ZP4ZZCIE.js → chunk-4AV3GY27.js} +2 -1
  74. package/dist/chunk-4AV3GY27.js.map +1 -0
  75. package/dist/{chunk-47WKYTRN.js → chunk-4BB7YYTT.js} +2 -1
  76. package/dist/chunk-4BB7YYTT.js.map +1 -0
  77. package/dist/{chunk-XC2V34TS.cjs → chunk-4GADBBZN.cjs} +1 -0
  78. package/dist/chunk-4GADBBZN.cjs.map +1 -0
  79. package/dist/{chunk-PUO4QNXH.js → chunk-4GSHSMCA.js} +4 -3
  80. package/dist/chunk-4GSHSMCA.js.map +1 -0
  81. package/dist/{chunk-6UMJYMAY.js → chunk-5NIFUAZH.js} +4 -3
  82. package/dist/chunk-5NIFUAZH.js.map +1 -0
  83. package/dist/{chunk-HXJ3YPAN.js → chunk-5OFC4HSW.js} +5 -4
  84. package/dist/chunk-5OFC4HSW.js.map +1 -0
  85. package/dist/{chunk-6FG5QXII.cjs → chunk-5QPU62QL.cjs} +16 -15
  86. package/dist/chunk-5QPU62QL.cjs.map +1 -0
  87. package/dist/{chunk-4GFSUI2I.cjs → chunk-6CR6FGAO.cjs} +4 -3
  88. package/dist/chunk-6CR6FGAO.cjs.map +1 -0
  89. package/dist/{chunk-JSWTGW46.cjs → chunk-6DPHKKVR.cjs} +4 -3
  90. package/dist/chunk-6DPHKKVR.cjs.map +1 -0
  91. package/dist/{chunk-MMISP35W.js → chunk-6G4QLBSO.js} +1 -0
  92. package/dist/chunk-6G4QLBSO.js.map +1 -0
  93. package/dist/{chunk-ZNAGDENG.cjs → chunk-6PIQDY3F.cjs} +4 -3
  94. package/dist/chunk-6PIQDY3F.cjs.map +1 -0
  95. package/dist/{chunk-WWW6IGZ7.js → chunk-6QZLBFZZ.js} +6 -5
  96. package/dist/chunk-6QZLBFZZ.js.map +1 -0
  97. package/dist/{chunk-TYQ4YIP7.js → chunk-7PHIXK4Q.js} +2 -1
  98. package/dist/chunk-7PHIXK4Q.js.map +1 -0
  99. package/dist/{chunk-RBHGZDDX.cjs → chunk-A3QJT5UU.cjs} +3 -2
  100. package/dist/chunk-A3QJT5UU.cjs.map +1 -0
  101. package/dist/{chunk-A6E67ZZP.js → chunk-AMS7MCD6.js} +6 -5
  102. package/dist/chunk-AMS7MCD6.js.map +1 -0
  103. package/dist/{chunk-JREZWZ2S.cjs → chunk-BBUEX3DG.cjs} +4 -3
  104. package/dist/chunk-BBUEX3DG.cjs.map +1 -0
  105. package/dist/chunk-BD3ZXT5D.js +1 -0
  106. package/dist/chunk-BD3ZXT5D.js.map +1 -0
  107. package/dist/{chunk-ZBLW42YE.js → chunk-C6WWOWGR.js} +1 -0
  108. package/dist/chunk-C6WWOWGR.js.map +1 -0
  109. package/dist/{chunk-Q5KNPVYI.cjs → chunk-CLVXR2JV.cjs} +7 -6
  110. package/dist/chunk-CLVXR2JV.cjs.map +1 -0
  111. package/dist/{chunk-55V4VMTX.cjs → chunk-CYUJJIHO.cjs} +1 -0
  112. package/dist/chunk-CYUJJIHO.cjs.map +1 -0
  113. package/dist/{chunk-7GOUUPS4.js → chunk-D2OS4757.js} +2 -1
  114. package/dist/chunk-D2OS4757.js.map +1 -0
  115. package/dist/chunk-DA47DMPI.js +1 -0
  116. package/dist/chunk-DA47DMPI.js.map +1 -0
  117. package/dist/{chunk-IPO25BCU.js → chunk-DGBAFJTM.js} +2 -1
  118. package/dist/chunk-DGBAFJTM.js.map +1 -0
  119. package/dist/{chunk-IDKGJO2G.cjs → chunk-DIJNSNWN.cjs} +18 -17
  120. package/dist/chunk-DIJNSNWN.cjs.map +1 -0
  121. package/dist/{chunk-7USEVMTW.cjs → chunk-DN2SNZIX.cjs} +1 -0
  122. package/dist/chunk-DN2SNZIX.cjs.map +1 -0
  123. package/dist/{chunk-PIFD6KNH.js → chunk-EKMTR3GD.js} +3 -2
  124. package/dist/chunk-EKMTR3GD.js.map +1 -0
  125. package/dist/{chunk-COR3CNRW.cjs → chunk-FLI7NWQN.cjs} +130 -129
  126. package/dist/chunk-FLI7NWQN.cjs.map +1 -0
  127. package/dist/{chunk-NIBKCMQ2.cjs → chunk-G43MR76L.cjs} +1 -0
  128. package/dist/chunk-G43MR76L.cjs.map +1 -0
  129. package/dist/{chunk-XOCC3MPK.cjs → chunk-GGMUF77N.cjs} +4 -3
  130. package/dist/chunk-GGMUF77N.cjs.map +1 -0
  131. package/dist/{chunk-2WBSPOWU.js → chunk-GNU6RIKU.js} +8 -7
  132. package/dist/chunk-GNU6RIKU.js.map +1 -0
  133. package/dist/{chunk-WDZY4PP4.cjs → chunk-H6BH7OK4.cjs} +16 -15
  134. package/dist/chunk-H6BH7OK4.cjs.map +1 -0
  135. package/dist/{chunk-CMBFV325.js → chunk-HP6T3FTF.js} +5 -4
  136. package/dist/chunk-HP6T3FTF.js.map +1 -0
  137. package/dist/{chunk-RHR6P2KP.cjs → chunk-I2O3XXRZ.cjs} +1 -0
  138. package/dist/chunk-I2O3XXRZ.cjs.map +1 -0
  139. package/dist/chunk-IE4R2VDM.cjs +1 -0
  140. package/dist/chunk-IE4R2VDM.cjs.map +1 -0
  141. package/dist/{chunk-W7K5E64Q.js → chunk-IP6APT2S.js} +5 -4
  142. package/dist/chunk-IP6APT2S.js.map +1 -0
  143. package/dist/{chunk-BMMZIPXT.js → chunk-IUSTF2DR.js} +3 -2
  144. package/dist/chunk-IUSTF2DR.js.map +1 -0
  145. package/dist/{chunk-R6DH4V7S.cjs → chunk-IYQMWYQI.cjs} +12 -11
  146. package/dist/chunk-IYQMWYQI.cjs.map +1 -0
  147. package/dist/{chunk-ZAX22GSI.cjs → chunk-IZYJJUOE.cjs} +37 -36
  148. package/dist/chunk-IZYJJUOE.cjs.map +1 -0
  149. package/dist/{chunk-HTSQPZHW.cjs → chunk-J2OH6EMB.cjs} +1 -0
  150. package/dist/chunk-J2OH6EMB.cjs.map +1 -0
  151. package/dist/{chunk-FHMKNG62.js → chunk-J6AO2ZDU.js} +8 -6
  152. package/dist/chunk-J6AO2ZDU.js.map +1 -0
  153. package/dist/{chunk-ASE2FXWP.js → chunk-JF4JR5QQ.js} +1 -0
  154. package/dist/chunk-JF4JR5QQ.js.map +1 -0
  155. package/dist/{chunk-2I2OFGNL.js → chunk-JMRG565N.js} +2 -1
  156. package/dist/chunk-JMRG565N.js.map +1 -0
  157. package/dist/{chunk-ABMZ3ZVN.js → chunk-JXXXM7AV.js} +2 -1
  158. package/dist/chunk-JXXXM7AV.js.map +1 -0
  159. package/dist/{chunk-ZT7EGOCI.cjs → chunk-KV7KHODO.cjs} +1 -0
  160. package/dist/chunk-KV7KHODO.cjs.map +1 -0
  161. package/dist/{chunk-MRZXYVQO.cjs → chunk-KXXRVRR6.cjs} +10 -9
  162. package/dist/chunk-KXXRVRR6.cjs.map +1 -0
  163. package/dist/chunk-L33DZOLM.cjs +1 -0
  164. package/dist/chunk-L33DZOLM.cjs.map +1 -0
  165. package/dist/chunk-M2OFHRMU.cjs +1 -0
  166. package/dist/chunk-M2OFHRMU.cjs.map +1 -0
  167. package/dist/{chunk-ZTEMOYS2.cjs → chunk-NAGMAP3Y.cjs} +4 -3
  168. package/dist/chunk-NAGMAP3Y.cjs.map +1 -0
  169. package/dist/{chunk-PK7J3Y3L.js → chunk-NG77OKLY.js} +2 -1
  170. package/dist/chunk-NG77OKLY.js.map +1 -0
  171. package/dist/{chunk-R4AW5ADG.cjs → chunk-NQR4AQOW.cjs} +2 -1
  172. package/dist/chunk-NQR4AQOW.cjs.map +1 -0
  173. package/dist/chunk-PHGHKSBT.js +1 -0
  174. package/dist/chunk-PHGHKSBT.js.map +1 -0
  175. package/dist/{chunk-G6QJHFSY.cjs → chunk-QFE6TYBN.cjs} +1 -0
  176. package/dist/chunk-QFE6TYBN.cjs.map +1 -0
  177. package/dist/{chunk-PJOJIRTY.js → chunk-QUIRXKKE.js} +1 -0
  178. package/dist/chunk-QUIRXKKE.js.map +1 -0
  179. package/dist/chunk-RB7HTHG4.js +1 -0
  180. package/dist/chunk-RB7HTHG4.js.map +1 -0
  181. package/dist/{chunk-IOMKHF6R.cjs → chunk-RJ3VNO74.cjs} +4 -3
  182. package/dist/chunk-RJ3VNO74.cjs.map +1 -0
  183. package/dist/chunk-RLWGW5R2.js +1 -0
  184. package/dist/chunk-RLWGW5R2.js.map +1 -0
  185. package/dist/{chunk-WHTECI7J.cjs → chunk-RPLIXWF3.cjs} +11 -10
  186. package/dist/chunk-RPLIXWF3.cjs.map +1 -0
  187. package/dist/{chunk-T2XUADHW.js → chunk-RUUBB4EB.js} +10 -9
  188. package/dist/chunk-RUUBB4EB.js.map +1 -0
  189. package/dist/{chunk-POG76HDD.cjs → chunk-TONAC74L.cjs} +121 -119
  190. package/dist/chunk-TONAC74L.cjs.map +1 -0
  191. package/dist/{chunk-F7L2TZ3I.cjs → chunk-TXLF6BM6.cjs} +1 -0
  192. package/dist/chunk-TXLF6BM6.cjs.map +1 -0
  193. package/dist/{chunk-U3NV7UY7.js → chunk-UAFXNE4C.js} +5 -4
  194. package/dist/chunk-UAFXNE4C.js.map +1 -0
  195. package/dist/chunk-UBZ7RWBZ.cjs +1 -0
  196. package/dist/chunk-UBZ7RWBZ.cjs.map +1 -0
  197. package/dist/chunk-UDLDOYUB.cjs +1 -0
  198. package/dist/chunk-UDLDOYUB.cjs.map +1 -0
  199. package/dist/chunk-V5HHKVTT.cjs +59 -0
  200. package/dist/chunk-V5HHKVTT.cjs.map +1 -0
  201. package/dist/{chunk-KQH5ZXJ4.js → chunk-VIL33DEX.js} +8 -7
  202. package/dist/chunk-VIL33DEX.js.map +1 -0
  203. package/dist/{chunk-UO2J2ZB2.cjs → chunk-W4VYO3P6.cjs} +1 -0
  204. package/dist/chunk-W4VYO3P6.cjs.map +1 -0
  205. package/dist/{chunk-7TT3VUDF.cjs → chunk-W5LNQWQD.cjs} +10 -9
  206. package/dist/chunk-W5LNQWQD.cjs.map +1 -0
  207. package/dist/{chunk-PM7BGATN.cjs → chunk-XOVH2G3J.cjs} +38 -37
  208. package/dist/chunk-XOVH2G3J.cjs.map +1 -0
  209. package/dist/{chunk-RYQI3RXL.cjs → chunk-XWXIO5PH.cjs} +32 -31
  210. package/dist/chunk-XWXIO5PH.cjs.map +1 -0
  211. package/dist/{chunk-66UY53KP.cjs → chunk-Y3CJJ3GO.cjs} +55 -54
  212. package/dist/chunk-Y3CJJ3GO.cjs.map +1 -0
  213. package/dist/{chunk-3U6UAYOV.js → chunk-Y5AADOPZ.js} +1 -0
  214. package/dist/chunk-Y5AADOPZ.js.map +1 -0
  215. package/dist/{chunk-KT3CVXFG.js → chunk-ZEH4W3O4.js} +1 -0
  216. package/dist/chunk-ZEH4W3O4.js.map +1 -0
  217. package/dist/index.cjs +37 -36
  218. package/dist/index.cjs.map +1 -0
  219. package/dist/index.js +36 -35
  220. package/dist/index.js.map +1 -0
  221. package/dist/logger/index.cjs +6 -5
  222. package/dist/logger/index.cjs.map +1 -0
  223. package/dist/logger/index.js +5 -4
  224. package/dist/logger/index.js.map +1 -0
  225. package/dist/logger/init.cjs +5 -4
  226. package/dist/logger/init.cjs.map +1 -0
  227. package/dist/logger/init.js +4 -3
  228. package/dist/logger/init.js.map +1 -0
  229. package/dist/sdk.cjs +34 -33
  230. package/dist/sdk.cjs.map +1 -0
  231. package/dist/sdk.js +33 -32
  232. package/dist/sdk.js.map +1 -0
  233. package/dist/signers/evm-api-key.cjs +4 -3
  234. package/dist/signers/evm-api-key.cjs.map +1 -0
  235. package/dist/signers/evm-api-key.js +3 -2
  236. package/dist/signers/evm-api-key.js.map +1 -0
  237. package/dist/signers/evm-external-wallet.cjs +4 -3
  238. package/dist/signers/evm-external-wallet.cjs.map +1 -0
  239. package/dist/signers/evm-external-wallet.js +3 -2
  240. package/dist/signers/evm-external-wallet.js.map +1 -0
  241. package/dist/signers/index.cjs +21 -20
  242. package/dist/signers/index.cjs.map +1 -0
  243. package/dist/signers/index.js +20 -19
  244. package/dist/signers/index.js.map +1 -0
  245. package/dist/signers/non-custodial/index.cjs +13 -12
  246. package/dist/signers/non-custodial/index.cjs.map +1 -0
  247. package/dist/signers/non-custodial/index.js +12 -11
  248. package/dist/signers/non-custodial/index.js.map +1 -0
  249. package/dist/signers/non-custodial/ncs-evm-signer.cjs +10 -9
  250. package/dist/signers/non-custodial/ncs-evm-signer.cjs.map +1 -0
  251. package/dist/signers/non-custodial/ncs-evm-signer.js +9 -8
  252. package/dist/signers/non-custodial/ncs-evm-signer.js.map +1 -0
  253. package/dist/signers/non-custodial/ncs-iframe-manager.cjs +4 -3
  254. package/dist/signers/non-custodial/ncs-iframe-manager.cjs.map +1 -0
  255. package/dist/signers/non-custodial/ncs-iframe-manager.js +3 -2
  256. package/dist/signers/non-custodial/ncs-iframe-manager.js.map +1 -0
  257. package/dist/signers/non-custodial/ncs-signer.cjs +9 -8
  258. package/dist/signers/non-custodial/ncs-signer.cjs.map +1 -0
  259. package/dist/signers/non-custodial/ncs-signer.js +8 -7
  260. package/dist/signers/non-custodial/ncs-signer.js.map +1 -0
  261. package/dist/signers/non-custodial/ncs-solana-signer.cjs +10 -9
  262. package/dist/signers/non-custodial/ncs-solana-signer.cjs.map +1 -0
  263. package/dist/signers/non-custodial/ncs-solana-signer.js +9 -8
  264. package/dist/signers/non-custodial/ncs-solana-signer.js.map +1 -0
  265. package/dist/signers/non-custodial/ncs-stellar-signer.cjs +10 -9
  266. package/dist/signers/non-custodial/ncs-stellar-signer.cjs.map +1 -0
  267. package/dist/signers/non-custodial/ncs-stellar-signer.js +9 -8
  268. package/dist/signers/non-custodial/ncs-stellar-signer.js.map +1 -0
  269. package/dist/signers/passkey.cjs +4 -3
  270. package/dist/signers/passkey.cjs.map +1 -0
  271. package/dist/signers/passkey.js +3 -2
  272. package/dist/signers/passkey.js.map +1 -0
  273. package/dist/signers/solana-api-key.cjs +4 -3
  274. package/dist/signers/solana-api-key.cjs.map +1 -0
  275. package/dist/signers/solana-api-key.js +3 -2
  276. package/dist/signers/solana-api-key.js.map +1 -0
  277. package/dist/signers/solana-external-wallet.cjs +5 -4
  278. package/dist/signers/solana-external-wallet.cjs.map +1 -0
  279. package/dist/signers/solana-external-wallet.js +4 -3
  280. package/dist/signers/solana-external-wallet.js.map +1 -0
  281. package/dist/signers/stellar-external-wallet.cjs +4 -3
  282. package/dist/signers/stellar-external-wallet.cjs.map +1 -0
  283. package/dist/signers/stellar-external-wallet.js +3 -2
  284. package/dist/signers/stellar-external-wallet.js.map +1 -0
  285. package/dist/signers/types.cjs +4 -3
  286. package/dist/signers/types.cjs.map +1 -0
  287. package/dist/signers/types.js +3 -2
  288. package/dist/signers/types.js.map +1 -0
  289. package/dist/utils/constants.cjs +4 -3
  290. package/dist/utils/constants.cjs.map +1 -0
  291. package/dist/utils/constants.js +3 -2
  292. package/dist/utils/constants.js.map +1 -0
  293. package/dist/utils/errors.cjs +4 -3
  294. package/dist/utils/errors.cjs.map +1 -0
  295. package/dist/utils/errors.js +3 -2
  296. package/dist/utils/errors.js.map +1 -0
  297. package/dist/utils/signer-validation.cjs +5 -4
  298. package/dist/utils/signer-validation.cjs.map +1 -0
  299. package/dist/utils/signer-validation.js +4 -3
  300. package/dist/utils/signer-validation.js.map +1 -0
  301. package/dist/wallets/__tests__/setup.cjs +4 -3
  302. package/dist/wallets/__tests__/setup.cjs.map +1 -0
  303. package/dist/wallets/__tests__/setup.js +2 -1
  304. package/dist/wallets/__tests__/setup.js.map +1 -0
  305. package/dist/wallets/__tests__/test-helpers.cjs +22 -21
  306. package/dist/wallets/__tests__/test-helpers.cjs.map +1 -0
  307. package/dist/wallets/__tests__/test-helpers.js +20 -19
  308. package/dist/wallets/__tests__/test-helpers.js.map +1 -0
  309. package/dist/wallets/evm.cjs +22 -21
  310. package/dist/wallets/evm.cjs.map +1 -0
  311. package/dist/wallets/evm.js +21 -20
  312. package/dist/wallets/evm.js.map +1 -0
  313. package/dist/wallets/solana.cjs +23 -22
  314. package/dist/wallets/solana.cjs.map +1 -0
  315. package/dist/wallets/solana.js +22 -21
  316. package/dist/wallets/solana.js.map +1 -0
  317. package/dist/wallets/stellar.cjs +22 -21
  318. package/dist/wallets/stellar.cjs.map +1 -0
  319. package/dist/wallets/stellar.js +21 -20
  320. package/dist/wallets/stellar.js.map +1 -0
  321. package/dist/wallets/types.cjs +1 -1
  322. package/dist/wallets/types.cjs.map +1 -0
  323. package/dist/wallets/types.js +1 -0
  324. package/dist/wallets/types.js.map +1 -0
  325. package/dist/wallets/wallet-factory.cjs +30 -29
  326. package/dist/wallets/wallet-factory.cjs.map +1 -0
  327. package/dist/wallets/wallet-factory.js +29 -28
  328. package/dist/wallets/wallet-factory.js.map +1 -0
  329. package/dist/wallets/wallet.cjs +21 -20
  330. package/dist/wallets/wallet.cjs.map +1 -0
  331. package/dist/wallets/wallet.js +20 -19
  332. package/dist/wallets/wallet.js.map +1 -0
  333. package/package.json +47 -50
  334. package/dist/chunk-455NK5LB.js +0 -0
  335. package/dist/chunk-47R3UV3J.cjs +0 -58
  336. package/dist/chunk-5IFDVB4Y.js +0 -0
  337. package/dist/chunk-6HXIZLEQ.cjs +0 -1
  338. package/dist/chunk-CCIGWTAO.cjs +0 -1
  339. package/dist/chunk-ECAM5KTH.cjs +0 -1
  340. package/dist/chunk-KBJA7JDT.js +0 -0
  341. package/dist/chunk-PO6S7UR3.cjs +0 -1
  342. package/dist/chunk-XPMCPXI3.cjs +0 -1
  343. package/dist/chunk-YDZRBHS3.js +0 -0
  344. package/dist/chunk-YMRXMNME.js +0 -0
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkZAX22GSIcjs = require('./chunk-ZAX22GSI.cjs');
3
+ var _chunkIZYJJUOEcjs = require('./chunk-IZYJJUOE.cjs');
4
4
 
5
5
 
6
- var _chunkWDZY4PP4cjs = require('./chunk-WDZY4PP4.cjs');
6
+ var _chunkH6BH7OK4cjs = require('./chunk-H6BH7OK4.cjs');
7
7
 
8
8
 
9
9
 
@@ -18,13 +18,13 @@ var _chunkWDZY4PP4cjs = require('./chunk-WDZY4PP4.cjs');
18
18
 
19
19
 
20
20
 
21
- var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
21
+ var _chunk4GADBBZNcjs = require('./chunk-4GADBBZN.cjs');
22
22
 
23
23
 
24
- var _chunkJREZWZ2Scjs = require('./chunk-JREZWZ2S.cjs');
24
+ var _chunkBBUEX3DGcjs = require('./chunk-BBUEX3DG.cjs');
25
25
 
26
26
 
27
- var _chunkR4AW5ADGcjs = require('./chunk-R4AW5ADG.cjs');
27
+ var _chunkNQR4AQOWcjs = require('./chunk-NQR4AQOW.cjs');
28
28
 
29
29
 
30
30
 
@@ -33,22 +33,22 @@ var _chunkR4AW5ADGcjs = require('./chunk-R4AW5ADG.cjs');
33
33
 
34
34
 
35
35
 
36
- var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
36
+ var _chunkW4VYO3P6cjs = require('./chunk-W4VYO3P6.cjs');
37
37
 
38
38
  // src/wallets/wallet.ts
39
39
  var _commonsdkbase = require('@crossmint/common-sdk-base');
40
40
  var _options, _apiClient;
41
41
  var Wallet = class {
42
42
  constructor(args, apiClient) {
43
- _chunkUO2J2ZB2cjs.__privateAdd.call(void 0, this, _options);
44
- _chunkUO2J2ZB2cjs.__privateAdd.call(void 0, this, _apiClient);
43
+ _chunkW4VYO3P6cjs.__privateAdd.call(void 0, this, _options);
44
+ _chunkW4VYO3P6cjs.__privateAdd.call(void 0, this, _apiClient);
45
45
  const { chain, address, owner, signer, options, alias } = args;
46
- _chunkUO2J2ZB2cjs.__privateSet.call(void 0, this, _apiClient, apiClient);
46
+ _chunkW4VYO3P6cjs.__privateSet.call(void 0, this, _apiClient, apiClient);
47
47
  this.chain = chain;
48
48
  this.address = address;
49
49
  this.owner = owner;
50
50
  this.signer = signer;
51
- _chunkUO2J2ZB2cjs.__privateSet.call(void 0, this, _options, options);
51
+ _chunkW4VYO3P6cjs.__privateSet.call(void 0, this, _options, options);
52
52
  this.alias = alias;
53
53
  }
54
54
  static getApiClient(wallet) {
@@ -58,10 +58,10 @@ var Wallet = class {
58
58
  return wallet.options;
59
59
  }
60
60
  get apiClient() {
61
- return _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient);
61
+ return _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient);
62
62
  }
63
63
  get options() {
64
- return _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _options);
64
+ return _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _options);
65
65
  }
66
66
  /**
67
67
  * Get the API client
@@ -69,11 +69,11 @@ var Wallet = class {
69
69
  * @experimental This API is experimental and may change in the future
70
70
  */
71
71
  experimental_apiClient() {
72
- return _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient);
72
+ return _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient);
73
73
  }
74
74
  balances(tokens) {
75
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
76
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.balances.start");
75
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
76
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.balances.start");
77
77
  const resolvedChain = this.resolveChainForEnvironment();
78
78
  let nativeToken;
79
79
  switch (this.chain) {
@@ -88,21 +88,21 @@ var Wallet = class {
88
88
  break;
89
89
  }
90
90
  const allTokens = [nativeToken, "usdc", ...tokens != null ? tokens : []];
91
- const response = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getBalance(this.address, {
91
+ const response = yield _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).getBalance(this.address, {
92
92
  chains: [resolvedChain],
93
93
  tokens: allTokens
94
94
  });
95
95
  if ("error" in response) {
96
- _chunkJREZWZ2Scjs.walletsLogger.error("wallet.balances.error", { error: response });
96
+ _chunkBBUEX3DGcjs.walletsLogger.error("wallet.balances.error", { error: response });
97
97
  throw new Error(`Failed to get balances for wallet: ${JSON.stringify(response.message)}`);
98
98
  }
99
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.balances.success");
99
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.balances.success");
100
100
  return this.transformBalanceResponse(response, nativeToken, tokens);
101
101
  });
102
102
  }
103
103
  stagingFund(amount, chain) {
104
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
105
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.stagingFund.start", {
104
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
105
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.stagingFund.start", {
106
106
  amount,
107
107
  chain: chain != null ? chain : this.chain
108
108
  });
@@ -114,12 +114,12 @@ var Wallet = class {
114
114
  chain: chain != null ? chain : this.chain
115
115
  });
116
116
  if ("error" in response) {
117
- _chunkJREZWZ2Scjs.walletsLogger.error("wallet.stagingFund.error", {
117
+ _chunkBBUEX3DGcjs.walletsLogger.error("wallet.stagingFund.error", {
118
118
  error: response
119
119
  });
120
120
  throw new Error(`Failed to fund wallet: ${JSON.stringify(response.message)}`);
121
121
  }
122
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.stagingFund.success");
122
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.stagingFund.success");
123
123
  return response;
124
124
  });
125
125
  }
@@ -141,7 +141,7 @@ var Wallet = class {
141
141
  contractAddress: chainData.contractAddress
142
142
  };
143
143
  }
144
- return _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {
144
+ return _chunkW4VYO3P6cjs.__spreadValues.call(void 0, {
145
145
  symbol: (_b = tokenData.symbol) != null ? _b : "",
146
146
  name: (_c = tokenData.name) != null ? _c : "",
147
147
  amount: (_d = tokenData.amount) != null ? _d : "0",
@@ -170,7 +170,7 @@ var Wallet = class {
170
170
  } else {
171
171
  chainSpecificField = { contractAddress: void 0 };
172
172
  }
173
- return _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, baseToken), chainSpecificField);
173
+ return _chunkW4VYO3P6cjs.__spreadValues.call(void 0, _chunkW4VYO3P6cjs.__spreadValues.call(void 0, {}, baseToken), chainSpecificField);
174
174
  };
175
175
  return {
176
176
  nativeToken: nativeTokenData != null ? transformTokenBalance(nativeTokenData) : createDefaultToken(nativeTokenSymbol),
@@ -188,8 +188,8 @@ var Wallet = class {
188
188
  * @experimental This API is experimental and may change in the future
189
189
  */
190
190
  experimental_nfts(params) {
191
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
192
- return yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).experimental_getNfts(_chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, params), {
191
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
192
+ return yield _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).experimental_getNfts(_chunkW4VYO3P6cjs.__spreadProps.call(void 0, _chunkW4VYO3P6cjs.__spreadValues.call(void 0, {}, params), {
193
193
  chain: this.chain,
194
194
  address: this.address
195
195
  }));
@@ -201,8 +201,8 @@ var Wallet = class {
201
201
  * @throws {Error} If the transactions cannot be retrieved
202
202
  */
203
203
  experimental_transactions() {
204
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
205
- const response = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getTransactions(this.walletLocator);
204
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
205
+ const response = yield _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).getTransactions(this.walletLocator);
206
206
  if ("error" in response) {
207
207
  throw new Error(`Failed to get transactions: ${JSON.stringify(response.message)}`);
208
208
  }
@@ -215,8 +215,8 @@ var Wallet = class {
215
215
  * @throws {Error} If the transaction cannot be retrieved
216
216
  */
217
217
  experimental_transaction(transactionId) {
218
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
219
- const response = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getTransaction(this.walletLocator, transactionId);
218
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
219
+ const response = yield _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).getTransaction(this.walletLocator, transactionId);
220
220
  if ("error" in response) {
221
221
  throw new Error(`Failed to get transaction: ${JSON.stringify(response.error)}`);
222
222
  }
@@ -230,7 +230,7 @@ var Wallet = class {
230
230
  * @throws {Error} If the activity cannot be retrieved
231
231
  */
232
232
  experimental_activity() {
233
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
233
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
234
234
  const resolvedChain = this.resolveChainForEnvironment();
235
235
  const response = yield this.apiClient.experimental_activity(this.walletLocator, { chain: resolvedChain });
236
236
  if ("error" in response) {
@@ -240,31 +240,31 @@ var Wallet = class {
240
240
  });
241
241
  }
242
242
  send(to, token, amount, options) {
243
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
243
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
244
244
  const resolvedChain = this.resolveChainForEnvironment();
245
245
  const recipient = toRecipientLocator(to);
246
246
  const tokenLocator = toTokenLocator(token, resolvedChain);
247
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.send.start", _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {
247
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.send.start", _chunkW4VYO3P6cjs.__spreadValues.call(void 0, {
248
248
  recipient,
249
249
  token: tokenLocator,
250
250
  amount
251
251
  }, (options == null ? void 0 : options.transactionType) != null ? { transactionType: options.transactionType } : {}));
252
252
  yield this.preAuthIfNeeded();
253
- const sendParams = _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {
253
+ const sendParams = _chunkW4VYO3P6cjs.__spreadValues.call(void 0, _chunkW4VYO3P6cjs.__spreadValues.call(void 0, {
254
254
  recipient,
255
255
  amount
256
256
  }, (options == null ? void 0 : options.experimental_signer) != null ? { signer: options.experimental_signer } : {}), (options == null ? void 0 : options.transactionType) != null ? { transactionType: options.transactionType } : {});
257
- const transactionCreationResponse = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).send(this.walletLocator, tokenLocator, sendParams);
257
+ const transactionCreationResponse = yield _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).send(this.walletLocator, tokenLocator, sendParams);
258
258
  if ("message" in transactionCreationResponse) {
259
- _chunkJREZWZ2Scjs.walletsLogger.error("wallet.send.error", {
259
+ _chunkBBUEX3DGcjs.walletsLogger.error("wallet.send.error", {
260
260
  error: transactionCreationResponse
261
261
  });
262
- throw new (0, _chunkXC2V34TScjs.TransactionNotCreatedError)(
262
+ throw new (0, _chunk4GADBBZNcjs.TransactionNotCreatedError)(
263
263
  `Failed to send token: ${JSON.stringify(transactionCreationResponse.message)}`
264
264
  );
265
265
  }
266
266
  if (options == null ? void 0 : options.experimental_prepareOnly) {
267
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.send.prepared", {
267
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.send.prepared", {
268
268
  transactionId: transactionCreationResponse.id
269
269
  });
270
270
  return {
@@ -274,7 +274,7 @@ var Wallet = class {
274
274
  };
275
275
  }
276
276
  const result = yield this.approveTransactionAndWait(transactionCreationResponse.id);
277
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.send.success", {
277
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.send.success", {
278
278
  transactionId: transactionCreationResponse.id,
279
279
  hash: result.hash
280
280
  });
@@ -293,7 +293,7 @@ var Wallet = class {
293
293
  */
294
294
  // TODO: Remove this method in the next major version
295
295
  approveTransaction(params) {
296
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
296
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
297
297
  console.warn(
298
298
  "approveTransaction is deprecated. Use approve instead. This method will be removed in the next major version."
299
299
  );
@@ -301,70 +301,71 @@ var Wallet = class {
301
301
  });
302
302
  }
303
303
  approve(params) {
304
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
305
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.approve.start", {
304
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
305
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.approve.start", {
306
306
  transactionId: params.transactionId,
307
307
  signatureId: params.signatureId
308
308
  });
309
+ yield this.preAuthIfNeeded();
309
310
  if (params.transactionId != null) {
310
311
  const result = yield this.approveTransactionAndWait(
311
312
  params.transactionId,
312
313
  params.options
313
314
  );
314
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.approve.success", {
315
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.approve.success", {
315
316
  transactionId: params.transactionId
316
317
  });
317
318
  return result;
318
319
  }
319
320
  if (params.signatureId != null) {
320
321
  const result = yield this.approveSignatureAndWait(params.signatureId, params.options);
321
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.approve.success", {
322
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.approve.success", {
322
323
  signatureId: params.signatureId
323
324
  });
324
325
  return result;
325
326
  }
326
- _chunkJREZWZ2Scjs.walletsLogger.error("wallet.approve.error", {
327
+ _chunkBBUEX3DGcjs.walletsLogger.error("wallet.approve.error", {
327
328
  error: "Either transactionId or signatureId must be provided"
328
329
  });
329
330
  throw new Error("Either transactionId or signatureId must be provided");
330
331
  });
331
332
  }
332
333
  addDelegatedSigner(params) {
333
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
334
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
334
335
  var _a, _b, _c;
335
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.addDelegatedSigner.start");
336
- const response = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).registerSigner(this.walletLocator, {
336
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.addDelegatedSigner.start");
337
+ const response = yield _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).registerSigner(this.walletLocator, {
337
338
  signer: params.signer,
338
339
  chain: this.chain === "solana" || this.chain === "stellar" ? void 0 : this.chain
339
340
  });
340
341
  if ("error" in response) {
341
- _chunkJREZWZ2Scjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
342
+ _chunkBBUEX3DGcjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
342
343
  error: response
343
344
  });
344
345
  throw new Error(`Failed to register signer: ${JSON.stringify(response.message)}`);
345
346
  }
346
347
  if (this.chain === "solana" || this.chain === "stellar") {
347
348
  if (!("transaction" in response) || response.transaction == null) {
348
- _chunkJREZWZ2Scjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
349
+ _chunkBBUEX3DGcjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
349
350
  error: "Expected transaction in response for Solana/Stellar chain"
350
351
  });
351
352
  throw new Error("Expected transaction in response for Solana/Stellar chain");
352
353
  }
353
354
  const transactionId = response.transaction.id;
354
355
  if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
355
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.addDelegatedSigner.prepared", {
356
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.addDelegatedSigner.prepared", {
356
357
  transactionId
357
358
  });
358
359
  return { transactionId };
359
360
  }
360
361
  yield this.approveTransactionAndWait(transactionId);
361
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
362
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
362
363
  transactionId
363
364
  });
364
365
  return void 0;
365
366
  }
366
367
  if (!("chains" in response)) {
367
- _chunkJREZWZ2Scjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
368
+ _chunkBBUEX3DGcjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
368
369
  error: "Expected chains in response for EVM chain"
369
370
  });
370
371
  throw new Error("Expected chains in response for EVM chain");
@@ -372,45 +373,45 @@ var Wallet = class {
372
373
  const chainResponse = (_b = response.chains) == null ? void 0 : _b[this.chain];
373
374
  if ((_c = params.options) == null ? void 0 : _c.experimental_prepareOnly) {
374
375
  const signatureId = (chainResponse == null ? void 0 : chainResponse.status) !== "success" ? chainResponse == null ? void 0 : chainResponse.id : void 0;
375
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.addDelegatedSigner.prepared", {
376
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.addDelegatedSigner.prepared", {
376
377
  signatureId
377
378
  });
378
379
  return { signatureId };
379
380
  }
380
381
  if ((chainResponse == null ? void 0 : chainResponse.status) === "awaiting-approval") {
381
382
  yield this.approveSignatureAndWait(chainResponse.id);
382
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
383
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
383
384
  signatureId: chainResponse.id
384
385
  });
385
386
  return void 0;
386
387
  }
387
388
  if ((chainResponse == null ? void 0 : chainResponse.status) === "pending") {
388
389
  yield this.waitForSignature(chainResponse.id);
389
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
390
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
390
391
  signatureId: chainResponse.id
391
392
  });
392
393
  return void 0;
393
394
  }
394
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.addDelegatedSigner.success");
395
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.addDelegatedSigner.success");
395
396
  return void 0;
396
397
  });
397
398
  }
398
399
  delegatedSigners() {
399
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
400
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
400
401
  var _a, _b, _c;
401
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.delegatedSigners.start");
402
- const walletResponse = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getWallet(this.walletLocator);
402
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.delegatedSigners.start");
403
+ const walletResponse = yield _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).getWallet(this.walletLocator);
403
404
  if ("error" in walletResponse) {
404
- _chunkJREZWZ2Scjs.walletsLogger.error("wallet.delegatedSigners.error", {
405
+ _chunkBBUEX3DGcjs.walletsLogger.error("wallet.delegatedSigners.error", {
405
406
  error: walletResponse
406
407
  });
407
- throw new (0, _chunkXC2V34TScjs.WalletNotAvailableError)(JSON.stringify(walletResponse));
408
+ throw new (0, _chunk4GADBBZNcjs.WalletNotAvailableError)(JSON.stringify(walletResponse));
408
409
  }
409
410
  if (walletResponse.type !== "smart" || walletResponse.chainType !== "evm" && walletResponse.chainType !== "solana" && walletResponse.chainType !== "stellar") {
410
- _chunkJREZWZ2Scjs.walletsLogger.error("wallet.delegatedSigners.error", {
411
+ _chunkBBUEX3DGcjs.walletsLogger.error("wallet.delegatedSigners.error", {
411
412
  error: `Wallet type ${walletResponse.type} not supported`
412
413
  });
413
- throw new (0, _chunkXC2V34TScjs.WalletTypeNotSupportedError)(`Wallet type ${walletResponse.type} not supported`);
414
+ throw new (0, _chunk4GADBBZNcjs.WalletTypeNotSupportedError)(`Wallet type ${walletResponse.type} not supported`);
414
415
  }
415
416
  const signers = (_c = (_b = (_a = walletResponse == null ? void 0 : walletResponse.config) == null ? void 0 : _a.delegatedSigners) == null ? void 0 : _b.map((signer) => {
416
417
  const colonIndex = signer.locator.indexOf(":");
@@ -419,14 +420,14 @@ var Wallet = class {
419
420
  signer: `external-wallet:${address}`
420
421
  };
421
422
  })) != null ? _c : [];
422
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.delegatedSigners.success", {
423
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.delegatedSigners.success", {
423
424
  count: signers.length
424
425
  });
425
426
  return signers;
426
427
  });
427
428
  }
428
429
  get walletLocator() {
429
- if (_chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).isServerSide) {
430
+ if (_chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).isServerSide) {
430
431
  return this.address;
431
432
  } else {
432
433
  let baseLocator;
@@ -446,8 +447,8 @@ var Wallet = class {
446
447
  }
447
448
  }
448
449
  preAuthIfNeeded() {
449
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
450
- if (this.signer instanceof _chunkZAX22GSIcjs.NonCustodialSigner) {
450
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
451
+ if (this.signer instanceof _chunkIZYJJUOEcjs.NonCustodialSigner) {
451
452
  yield this.signer.ensureAuthenticated();
452
453
  }
453
454
  });
@@ -456,21 +457,21 @@ var Wallet = class {
456
457
  return this.chain === "solana";
457
458
  }
458
459
  resolveChainForEnvironment() {
459
- const resolvedChain = _chunkWDZY4PP4cjs.validateChainForEnvironment.call(void 0, this.chain, _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).environment);
460
+ const resolvedChain = _chunkH6BH7OK4cjs.validateChainForEnvironment.call(void 0, this.chain, _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).environment);
460
461
  if (resolvedChain !== this.chain) {
461
462
  this.chain = resolvedChain;
462
463
  }
463
464
  return this.chain;
464
465
  }
465
466
  approveTransactionAndWait(transactionId, options) {
466
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
467
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
467
468
  yield this.approveTransactionInternal(transactionId, options);
468
469
  yield this.sleep(1e3);
469
470
  return yield this.waitForTransaction(transactionId);
470
471
  });
471
472
  }
472
473
  approveSignatureAndWait(signatureId, options) {
473
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
474
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
474
475
  const signatureResponse = yield this.approveSignatureInternal(signatureId, options);
475
476
  if (!("error" in signatureResponse) && signatureResponse.status === "success" && signatureResponse.outputSignature != null) {
476
477
  return {
@@ -483,14 +484,14 @@ var Wallet = class {
483
484
  });
484
485
  }
485
486
  approveSignatureInternal(signatureId, options) {
486
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
487
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
487
488
  var _a, _b;
488
489
  if (this.isSolanaWallet) {
489
490
  throw new Error("Approving signatures is only supported for EVM smart wallets");
490
491
  }
491
- const signature = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getSignature(this.walletLocator, signatureId);
492
+ const signature = yield _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).getSignature(this.walletLocator, signatureId);
492
493
  if ("error" in signature) {
493
- throw new (0, _chunkXC2V34TScjs.SignatureNotAvailableError)(JSON.stringify(signature));
494
+ throw new (0, _chunk4GADBBZNcjs.SignatureNotAvailableError)(JSON.stringify(signature));
494
495
  }
495
496
  if (this.signer.type === "api-key") {
496
497
  return signature;
@@ -505,13 +506,13 @@ var Wallet = class {
505
506
  }
506
507
  const signers = [...(_b = options == null ? void 0 : options.additionalSigners) != null ? _b : [], this.signer];
507
508
  const approvals = yield Promise.all(
508
- pendingApprovals.map((pendingApproval) => _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
509
+ pendingApprovals.map((pendingApproval) => _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
509
510
  const signer = signers.find((s) => s.locator() === pendingApproval.signer.locator);
510
511
  if (signer == null) {
511
- throw new (0, _chunkXC2V34TScjs.InvalidSignerError)(`Signer ${pendingApproval.signer} not found in pending approvals`);
512
+ throw new (0, _chunk4GADBBZNcjs.InvalidSignerError)(`Signer ${pendingApproval.signer} not found in pending approvals`);
512
513
  }
513
514
  const signature2 = yield signer.signMessage(pendingApproval.message);
514
- return _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, signature2), {
515
+ return _chunkW4VYO3P6cjs.__spreadProps.call(void 0, _chunkW4VYO3P6cjs.__spreadValues.call(void 0, {}, signature2), {
515
516
  signer: signer.locator()
516
517
  });
517
518
  }))
@@ -520,13 +521,13 @@ var Wallet = class {
520
521
  });
521
522
  }
522
523
  approveTransactionInternal(transactionId, options) {
523
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
524
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
524
525
  var _a, _b, _c, _d, _e;
525
- const transaction = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getTransaction(this.walletLocator, transactionId);
526
+ const transaction = yield _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).getTransaction(this.walletLocator, transactionId);
526
527
  if ("error" in transaction) {
527
- throw new (0, _chunkXC2V34TScjs.TransactionNotAvailableError)(JSON.stringify(transaction));
528
+ throw new (0, _chunk4GADBBZNcjs.TransactionNotAvailableError)(JSON.stringify(transaction));
528
529
  }
529
- yield (_c = (_b = (_a = _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _options)) == null ? void 0 : _a.experimental_callbacks) == null ? void 0 : _b.onTransactionStart) == null ? void 0 : _c.call(_b);
530
+ yield (_c = (_b = (_a = _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _options)) == null ? void 0 : _a.experimental_callbacks) == null ? void 0 : _b.onTransactionStart) == null ? void 0 : _c.call(_b);
530
531
  if (this.signer.type === "api-key") {
531
532
  return transaction;
532
533
  }
@@ -540,14 +541,14 @@ var Wallet = class {
540
541
  }
541
542
  const signers = [...(_e = options == null ? void 0 : options.additionalSigners) != null ? _e : [], this.signer];
542
543
  const approvals = yield Promise.all(
543
- pendingApprovals.map((pendingApproval) => _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
544
+ pendingApprovals.map((pendingApproval) => _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
544
545
  const signer = signers.find((s) => s.locator() === pendingApproval.signer.locator);
545
546
  if (signer == null) {
546
- throw new (0, _chunkXC2V34TScjs.InvalidSignerError)(`Signer ${pendingApproval.signer} not found in pending approvals`);
547
+ throw new (0, _chunk4GADBBZNcjs.InvalidSignerError)(`Signer ${pendingApproval.signer} not found in pending approvals`);
547
548
  }
548
549
  const transactionToSign = transaction.chainType === "solana" && "transaction" in transaction.onChain ? transaction.onChain.transaction : pendingApproval.message;
549
550
  const signature = yield signer.signTransaction(transactionToSign);
550
- return _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, signature), {
551
+ return _chunkW4VYO3P6cjs.__spreadProps.call(void 0, _chunkW4VYO3P6cjs.__spreadValues.call(void 0, {}, signature), {
551
552
  signer: signer.locator()
552
553
  });
553
554
  }))
@@ -556,43 +557,43 @@ var Wallet = class {
556
557
  });
557
558
  }
558
559
  executeApproveTransactionWithErrorHandling(transactionId, approvals) {
559
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
560
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.approve: submitting approval to API", { transactionId });
561
- const approvedTransaction = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).approveTransaction(this.walletLocator, transactionId, {
560
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
561
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.approve: submitting approval to API", { transactionId });
562
+ const approvedTransaction = yield _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).approveTransaction(this.walletLocator, transactionId, {
562
563
  approvals
563
564
  });
564
565
  if (approvedTransaction.error) {
565
- throw new (0, _chunkXC2V34TScjs.TransactionFailedError)(JSON.stringify(approvedTransaction));
566
+ throw new (0, _chunk4GADBBZNcjs.TransactionFailedError)(JSON.stringify(approvedTransaction));
566
567
  }
567
568
  return approvedTransaction;
568
569
  });
569
570
  }
570
571
  executeApproveSignatureWithErrorHandling(signatureId, approvals) {
571
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
572
- const approvedSignature = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).approveSignature(this.walletLocator, signatureId, {
572
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
573
+ const approvedSignature = yield _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).approveSignature(this.walletLocator, signatureId, {
573
574
  approvals
574
575
  });
575
576
  if (approvedSignature.error) {
576
- throw new (0, _chunkXC2V34TScjs.SignatureFailedError)(JSON.stringify(approvedSignature));
577
+ throw new (0, _chunk4GADBBZNcjs.SignatureFailedError)(JSON.stringify(approvedSignature));
577
578
  }
578
579
  return approvedSignature;
579
580
  });
580
581
  }
581
582
  waitForSignature(signatureId) {
582
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
583
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
583
584
  let signatureResponse = null;
584
585
  do {
585
- yield new Promise((resolve) => setTimeout(resolve, _chunkR4AW5ADGcjs.STATUS_POLLING_INTERVAL_MS));
586
- signatureResponse = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getSignature(this.walletLocator, signatureId);
586
+ yield new Promise((resolve) => setTimeout(resolve, _chunkNQR4AQOWcjs.STATUS_POLLING_INTERVAL_MS));
587
+ signatureResponse = yield _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).getSignature(this.walletLocator, signatureId);
587
588
  if ("error" in signatureResponse) {
588
- throw new (0, _chunkXC2V34TScjs.SignatureNotAvailableError)(JSON.stringify(signatureResponse));
589
+ throw new (0, _chunk4GADBBZNcjs.SignatureNotAvailableError)(JSON.stringify(signatureResponse));
589
590
  }
590
591
  } while (signatureResponse === null || signatureResponse.status === "pending");
591
592
  if (signatureResponse.status === "failed") {
592
- throw new (0, _chunkXC2V34TScjs.SigningFailedError)("Signature signing failed");
593
+ throw new (0, _chunk4GADBBZNcjs.SigningFailedError)("Signature signing failed");
593
594
  }
594
595
  if (!signatureResponse.outputSignature) {
595
- throw new (0, _chunkXC2V34TScjs.SignatureNotAvailableError)("Signature not available");
596
+ throw new (0, _chunk4GADBBZNcjs.SignatureNotAvailableError)("Signature not available");
596
597
  }
597
598
  return {
598
599
  signature: signatureResponse.outputSignature,
@@ -601,42 +602,42 @@ var Wallet = class {
601
602
  });
602
603
  }
603
604
  waitForTransaction(_0) {
604
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, arguments, function* (transactionId, timeoutMs = 6e4, {
605
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, arguments, function* (transactionId, timeoutMs = 6e4, {
605
606
  backoffMultiplier = 1.1,
606
607
  maxBackoffMs = 2e3,
607
- initialBackoffMs = _chunkR4AW5ADGcjs.STATUS_POLLING_INTERVAL_MS
608
+ initialBackoffMs = _chunkNQR4AQOWcjs.STATUS_POLLING_INTERVAL_MS
608
609
  } = {}) {
609
610
  var _a;
610
- _chunkJREZWZ2Scjs.walletsLogger.info("wallet.approve: waiting for transaction confirmation", { transactionId, timeoutMs });
611
+ _chunkBBUEX3DGcjs.walletsLogger.info("wallet.approve: waiting for transaction confirmation", { transactionId, timeoutMs });
611
612
  const startTime = Date.now();
612
613
  let transactionResponse;
613
614
  do {
614
615
  if (Date.now() - startTime > timeoutMs) {
615
- const error = new (0, _chunkXC2V34TScjs.TransactionConfirmationTimeoutError)("Transaction confirmation timeout");
616
+ const error = new (0, _chunk4GADBBZNcjs.TransactionConfirmationTimeoutError)("Transaction confirmation timeout");
616
617
  throw error;
617
618
  }
618
- transactionResponse = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getTransaction(this.walletLocator, transactionId);
619
+ transactionResponse = yield _chunkW4VYO3P6cjs.__privateGet.call(void 0, this, _apiClient).getTransaction(this.walletLocator, transactionId);
619
620
  if (transactionResponse.error) {
620
- throw new (0, _chunkXC2V34TScjs.TransactionNotAvailableError)(JSON.stringify(transactionResponse));
621
+ throw new (0, _chunk4GADBBZNcjs.TransactionNotAvailableError)(JSON.stringify(transactionResponse));
621
622
  }
622
623
  yield this.sleep(initialBackoffMs);
623
624
  initialBackoffMs = Math.min(initialBackoffMs * backoffMultiplier, maxBackoffMs);
624
625
  } while (transactionResponse.status === "pending");
625
626
  if (transactionResponse.status === "failed") {
626
- const error = new (0, _chunkXC2V34TScjs.TransactionSendingFailedError)(
627
+ const error = new (0, _chunk4GADBBZNcjs.TransactionSendingFailedError)(
627
628
  `Transaction sending failed: ${JSON.stringify(transactionResponse.error)}`
628
629
  );
629
630
  throw error;
630
631
  }
631
632
  if (transactionResponse.status === "awaiting-approval") {
632
- const error = new (0, _chunkXC2V34TScjs.TransactionAwaitingApprovalError)(
633
+ const error = new (0, _chunk4GADBBZNcjs.TransactionAwaitingApprovalError)(
633
634
  `Transaction is awaiting approval. Please submit required approvals before waiting for completion.`
634
635
  );
635
636
  throw error;
636
637
  }
637
638
  const transactionHash = transactionResponse.onChain.txId;
638
639
  if (transactionHash == null) {
639
- const error = new (0, _chunkXC2V34TScjs.TransactionHashNotFoundError)("Transaction hash not found on transaction response");
640
+ const error = new (0, _chunk4GADBBZNcjs.TransactionHashNotFoundError)("Transaction hash not found on transaction response");
640
641
  throw error;
641
642
  }
642
643
  return {
@@ -647,61 +648,61 @@ var Wallet = class {
647
648
  });
648
649
  }
649
650
  sleep(ms) {
650
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
651
+ return _chunkW4VYO3P6cjs.__async.call(void 0, this, null, function* () {
651
652
  return new Promise((resolve) => setTimeout(resolve, ms));
652
653
  });
653
654
  }
654
655
  };
655
656
  _options = new WeakMap();
656
657
  _apiClient = new WeakMap();
657
- _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
658
+ _chunkW4VYO3P6cjs.__decorateClass.call(void 0, [
658
659
  _commonsdkbase.WithLoggerContext.call(void 0, {
659
- logger: _chunkJREZWZ2Scjs.walletsLogger,
660
+ logger: _chunkBBUEX3DGcjs.walletsLogger,
660
661
  methodName: "wallet.balances",
661
662
  buildContext(thisArg) {
662
663
  return { chain: thisArg.chain, address: thisArg.address };
663
664
  }
664
665
  })
665
666
  ], Wallet.prototype, "balances", 1);
666
- _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
667
+ _chunkW4VYO3P6cjs.__decorateClass.call(void 0, [
667
668
  _commonsdkbase.WithLoggerContext.call(void 0, {
668
- logger: _chunkJREZWZ2Scjs.walletsLogger,
669
+ logger: _chunkBBUEX3DGcjs.walletsLogger,
669
670
  methodName: "wallet.stagingFund",
670
671
  buildContext(thisArg) {
671
672
  return { chain: thisArg.chain, address: thisArg.address };
672
673
  }
673
674
  })
674
675
  ], Wallet.prototype, "stagingFund", 1);
675
- _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
676
+ _chunkW4VYO3P6cjs.__decorateClass.call(void 0, [
676
677
  _commonsdkbase.WithLoggerContext.call(void 0, {
677
- logger: _chunkJREZWZ2Scjs.walletsLogger,
678
+ logger: _chunkBBUEX3DGcjs.walletsLogger,
678
679
  methodName: "wallet.send",
679
680
  buildContext(thisArg) {
680
681
  return { chain: thisArg.chain, address: thisArg.address };
681
682
  }
682
683
  })
683
684
  ], Wallet.prototype, "send", 1);
684
- _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
685
+ _chunkW4VYO3P6cjs.__decorateClass.call(void 0, [
685
686
  _commonsdkbase.WithLoggerContext.call(void 0, {
686
- logger: _chunkJREZWZ2Scjs.walletsLogger,
687
+ logger: _chunkBBUEX3DGcjs.walletsLogger,
687
688
  methodName: "wallet.approve",
688
689
  buildContext(thisArg) {
689
690
  return { chain: thisArg.chain, address: thisArg.address };
690
691
  }
691
692
  })
692
693
  ], Wallet.prototype, "approve", 1);
693
- _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
694
+ _chunkW4VYO3P6cjs.__decorateClass.call(void 0, [
694
695
  _commonsdkbase.WithLoggerContext.call(void 0, {
695
- logger: _chunkJREZWZ2Scjs.walletsLogger,
696
+ logger: _chunkBBUEX3DGcjs.walletsLogger,
696
697
  methodName: "wallet.addDelegatedSigner",
697
698
  buildContext(thisArg) {
698
699
  return { chain: thisArg.chain, address: thisArg.address };
699
700
  }
700
701
  })
701
702
  ], Wallet.prototype, "addDelegatedSigner", 1);
702
- _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
703
+ _chunkW4VYO3P6cjs.__decorateClass.call(void 0, [
703
704
  _commonsdkbase.WithLoggerContext.call(void 0, {
704
- logger: _chunkJREZWZ2Scjs.walletsLogger,
705
+ logger: _chunkBBUEX3DGcjs.walletsLogger,
705
706
  methodName: "wallet.delegatedSigners",
706
707
  buildContext(thisArg) {
707
708
  return { chain: thisArg.chain, address: thisArg.address };
@@ -739,3 +740,4 @@ function toTokenLocator(token, chain) {
739
740
 
740
741
 
741
742
  exports.Wallet = Wallet;
743
+ //# sourceMappingURL=chunk-TONAC74L.cjs.map