xrpl 4.3.0 → 4.4.0-smartescrow.0

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 (310) hide show
  1. package/build/xrpl-latest-min.js +1 -1
  2. package/build/xrpl-latest-min.js.map +1 -1
  3. package/build/xrpl-latest.js +1293 -1596
  4. package/build/xrpl-latest.js.map +1 -1
  5. package/dist/npm/Wallet/defaultFaucets.d.ts +2 -1
  6. package/dist/npm/Wallet/defaultFaucets.d.ts.map +1 -1
  7. package/dist/npm/Wallet/defaultFaucets.js +3 -0
  8. package/dist/npm/Wallet/defaultFaucets.js.map +1 -1
  9. package/dist/npm/client/index.d.ts +3 -3
  10. package/dist/npm/client/index.d.ts.map +1 -1
  11. package/dist/npm/client/index.js +10 -7
  12. package/dist/npm/client/index.js.map +1 -1
  13. package/dist/npm/client/partialPayment.d.ts.map +1 -1
  14. package/dist/npm/client/partialPayment.js +2 -2
  15. package/dist/npm/client/partialPayment.js.map +1 -1
  16. package/dist/npm/models/common/index.d.ts +1 -0
  17. package/dist/npm/models/common/index.d.ts.map +1 -1
  18. package/dist/npm/models/ledger/AccountRoot.d.ts +1 -1
  19. package/dist/npm/models/ledger/AccountRoot.d.ts.map +1 -1
  20. package/dist/npm/models/ledger/Escrow.d.ts +2 -0
  21. package/dist/npm/models/ledger/Escrow.d.ts.map +1 -1
  22. package/dist/npm/models/ledger/FeeSettings.d.ts +2 -0
  23. package/dist/npm/models/ledger/FeeSettings.d.ts.map +1 -1
  24. package/dist/npm/models/ledger/LedgerEntry.d.ts +3 -2
  25. package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
  26. package/dist/npm/models/ledger/Vault.d.ts +21 -0
  27. package/dist/npm/models/ledger/Vault.d.ts.map +1 -0
  28. package/dist/npm/models/ledger/Vault.js +3 -0
  29. package/dist/npm/models/ledger/Vault.js.map +1 -0
  30. package/dist/npm/models/ledger/index.d.ts +2 -1
  31. package/dist/npm/models/ledger/index.d.ts.map +1 -1
  32. package/dist/npm/models/ledger/index.js.map +1 -1
  33. package/dist/npm/models/methods/index.d.ts +5 -4
  34. package/dist/npm/models/methods/index.d.ts.map +1 -1
  35. package/dist/npm/models/methods/serverInfo.d.ts +6 -0
  36. package/dist/npm/models/methods/serverInfo.d.ts.map +1 -1
  37. package/dist/npm/models/methods/serverState.d.ts +6 -0
  38. package/dist/npm/models/methods/serverState.d.ts.map +1 -1
  39. package/dist/npm/models/methods/vaultInfo.d.ts +46 -0
  40. package/dist/npm/models/methods/vaultInfo.d.ts.map +1 -0
  41. package/dist/npm/models/methods/vaultInfo.js +3 -0
  42. package/dist/npm/models/methods/vaultInfo.js.map +1 -0
  43. package/dist/npm/models/transactions/AMMBid.d.ts.map +1 -1
  44. package/dist/npm/models/transactions/AMMBid.js +7 -5
  45. package/dist/npm/models/transactions/AMMBid.js.map +1 -1
  46. package/dist/npm/models/transactions/AMMClawback.d.ts.map +1 -1
  47. package/dist/npm/models/transactions/AMMClawback.js +5 -6
  48. package/dist/npm/models/transactions/AMMClawback.js.map +1 -1
  49. package/dist/npm/models/transactions/AMMDelete.d.ts.map +1 -1
  50. package/dist/npm/models/transactions/AMMDelete.js +2 -2
  51. package/dist/npm/models/transactions/AMMDelete.js.map +1 -1
  52. package/dist/npm/models/transactions/AMMDeposit.js +3 -3
  53. package/dist/npm/models/transactions/AMMDeposit.js.map +1 -1
  54. package/dist/npm/models/transactions/AMMVote.d.ts.map +1 -1
  55. package/dist/npm/models/transactions/AMMVote.js +2 -2
  56. package/dist/npm/models/transactions/AMMVote.js.map +1 -1
  57. package/dist/npm/models/transactions/AMMWithdraw.js +3 -3
  58. package/dist/npm/models/transactions/AMMWithdraw.js.map +1 -1
  59. package/dist/npm/models/transactions/MPTokenIssuanceCreate.d.ts.map +1 -1
  60. package/dist/npm/models/transactions/MPTokenIssuanceCreate.js +3 -3
  61. package/dist/npm/models/transactions/MPTokenIssuanceCreate.js.map +1 -1
  62. package/dist/npm/models/transactions/MPTokenIssuanceSet.js +4 -4
  63. package/dist/npm/models/transactions/MPTokenIssuanceSet.js.map +1 -1
  64. package/dist/npm/models/transactions/NFTokenCancelOffer.d.ts.map +1 -1
  65. package/dist/npm/models/transactions/NFTokenCancelOffer.js +1 -1
  66. package/dist/npm/models/transactions/NFTokenCancelOffer.js.map +1 -1
  67. package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
  68. package/dist/npm/models/transactions/NFTokenCreateOffer.js +6 -2
  69. package/dist/npm/models/transactions/NFTokenCreateOffer.js.map +1 -1
  70. package/dist/npm/models/transactions/checkCreate.d.ts.map +1 -1
  71. package/dist/npm/models/transactions/checkCreate.js +1 -2
  72. package/dist/npm/models/transactions/checkCreate.js.map +1 -1
  73. package/dist/npm/models/transactions/clawback.d.ts +2 -2
  74. package/dist/npm/models/transactions/clawback.d.ts.map +1 -1
  75. package/dist/npm/models/transactions/clawback.js +4 -6
  76. package/dist/npm/models/transactions/clawback.js.map +1 -1
  77. package/dist/npm/models/transactions/common.d.ts +9 -4
  78. package/dist/npm/models/transactions/common.d.ts.map +1 -1
  79. package/dist/npm/models/transactions/common.js +51 -28
  80. package/dist/npm/models/transactions/common.js.map +1 -1
  81. package/dist/npm/models/transactions/escrowCreate.d.ts +2 -0
  82. package/dist/npm/models/transactions/escrowCreate.d.ts.map +1 -1
  83. package/dist/npm/models/transactions/escrowCreate.js +4 -2
  84. package/dist/npm/models/transactions/escrowCreate.js.map +1 -1
  85. package/dist/npm/models/transactions/escrowFinish.d.ts +1 -0
  86. package/dist/npm/models/transactions/escrowFinish.d.ts.map +1 -1
  87. package/dist/npm/models/transactions/escrowFinish.js.map +1 -1
  88. package/dist/npm/models/transactions/index.d.ts +8 -2
  89. package/dist/npm/models/transactions/index.d.ts.map +1 -1
  90. package/dist/npm/models/transactions/index.js +4 -1
  91. package/dist/npm/models/transactions/index.js.map +1 -1
  92. package/dist/npm/models/transactions/oracleSet.d.ts.map +1 -1
  93. package/dist/npm/models/transactions/oracleSet.js +22 -21
  94. package/dist/npm/models/transactions/oracleSet.js.map +1 -1
  95. package/dist/npm/models/transactions/payment.d.ts +1 -0
  96. package/dist/npm/models/transactions/payment.d.ts.map +1 -1
  97. package/dist/npm/models/transactions/payment.js +6 -4
  98. package/dist/npm/models/transactions/payment.js.map +1 -1
  99. package/dist/npm/models/transactions/signerListSet.d.ts.map +1 -1
  100. package/dist/npm/models/transactions/signerListSet.js +10 -16
  101. package/dist/npm/models/transactions/signerListSet.js.map +1 -1
  102. package/dist/npm/models/transactions/transaction.d.ts +7 -1
  103. package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
  104. package/dist/npm/models/transactions/transaction.js +28 -35
  105. package/dist/npm/models/transactions/transaction.js.map +1 -1
  106. package/dist/npm/models/transactions/vaultClawback.d.ts +10 -0
  107. package/dist/npm/models/transactions/vaultClawback.d.ts.map +1 -0
  108. package/dist/npm/models/transactions/vaultClawback.js +12 -0
  109. package/dist/npm/models/transactions/vaultClawback.js.map +1 -0
  110. package/dist/npm/models/transactions/vaultCreate.d.ts +24 -0
  111. package/dist/npm/models/transactions/vaultCreate.d.ts.map +1 -0
  112. package/dist/npm/models/transactions/vaultCreate.js +51 -0
  113. package/dist/npm/models/transactions/vaultCreate.js.map +1 -0
  114. package/dist/npm/models/transactions/vaultDelete.d.ts +7 -0
  115. package/dist/npm/models/transactions/vaultDelete.d.ts.map +1 -0
  116. package/dist/npm/models/transactions/vaultDelete.js +10 -0
  117. package/dist/npm/models/transactions/vaultDelete.js.map +1 -0
  118. package/dist/npm/models/transactions/vaultDeposit.d.ts +9 -0
  119. package/dist/npm/models/transactions/vaultDeposit.d.ts.map +1 -0
  120. package/dist/npm/models/transactions/vaultDeposit.js +11 -0
  121. package/dist/npm/models/transactions/vaultDeposit.js.map +1 -0
  122. package/dist/npm/models/transactions/vaultSet.d.ts +10 -0
  123. package/dist/npm/models/transactions/vaultSet.d.ts.map +1 -0
  124. package/dist/npm/models/transactions/vaultSet.js +25 -0
  125. package/dist/npm/models/transactions/vaultSet.js.map +1 -0
  126. package/dist/npm/models/transactions/vaultWithdraw.d.ts +10 -0
  127. package/dist/npm/models/transactions/vaultWithdraw.d.ts.map +1 -0
  128. package/dist/npm/models/transactions/vaultWithdraw.js +12 -0
  129. package/dist/npm/models/transactions/vaultWithdraw.js.map +1 -0
  130. package/dist/npm/models/utils/flags.d.ts.map +1 -1
  131. package/dist/npm/models/utils/flags.js +2 -0
  132. package/dist/npm/models/utils/flags.js.map +1 -1
  133. package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -1
  134. package/dist/npm/src/Wallet/defaultFaucets.d.ts +2 -1
  135. package/dist/npm/src/Wallet/defaultFaucets.d.ts.map +1 -1
  136. package/dist/npm/src/Wallet/defaultFaucets.js +3 -0
  137. package/dist/npm/src/Wallet/defaultFaucets.js.map +1 -1
  138. package/dist/npm/src/client/index.d.ts +3 -3
  139. package/dist/npm/src/client/index.d.ts.map +1 -1
  140. package/dist/npm/src/client/index.js +10 -7
  141. package/dist/npm/src/client/index.js.map +1 -1
  142. package/dist/npm/src/client/partialPayment.d.ts.map +1 -1
  143. package/dist/npm/src/client/partialPayment.js +2 -2
  144. package/dist/npm/src/client/partialPayment.js.map +1 -1
  145. package/dist/npm/src/models/common/index.d.ts +1 -0
  146. package/dist/npm/src/models/common/index.d.ts.map +1 -1
  147. package/dist/npm/src/models/ledger/AccountRoot.d.ts +1 -1
  148. package/dist/npm/src/models/ledger/AccountRoot.d.ts.map +1 -1
  149. package/dist/npm/src/models/ledger/Escrow.d.ts +2 -0
  150. package/dist/npm/src/models/ledger/Escrow.d.ts.map +1 -1
  151. package/dist/npm/src/models/ledger/FeeSettings.d.ts +2 -0
  152. package/dist/npm/src/models/ledger/FeeSettings.d.ts.map +1 -1
  153. package/dist/npm/src/models/ledger/LedgerEntry.d.ts +3 -2
  154. package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
  155. package/dist/npm/src/models/ledger/Vault.d.ts +21 -0
  156. package/dist/npm/src/models/ledger/Vault.d.ts.map +1 -0
  157. package/dist/npm/src/models/ledger/Vault.js +3 -0
  158. package/dist/npm/src/models/ledger/Vault.js.map +1 -0
  159. package/dist/npm/src/models/ledger/index.d.ts +2 -1
  160. package/dist/npm/src/models/ledger/index.d.ts.map +1 -1
  161. package/dist/npm/src/models/ledger/index.js.map +1 -1
  162. package/dist/npm/src/models/methods/index.d.ts +5 -4
  163. package/dist/npm/src/models/methods/index.d.ts.map +1 -1
  164. package/dist/npm/src/models/methods/serverInfo.d.ts +6 -0
  165. package/dist/npm/src/models/methods/serverInfo.d.ts.map +1 -1
  166. package/dist/npm/src/models/methods/serverState.d.ts +6 -0
  167. package/dist/npm/src/models/methods/serverState.d.ts.map +1 -1
  168. package/dist/npm/src/models/methods/vaultInfo.d.ts +46 -0
  169. package/dist/npm/src/models/methods/vaultInfo.d.ts.map +1 -0
  170. package/dist/npm/src/models/methods/vaultInfo.js +3 -0
  171. package/dist/npm/src/models/methods/vaultInfo.js.map +1 -0
  172. package/dist/npm/src/models/transactions/AMMBid.d.ts.map +1 -1
  173. package/dist/npm/src/models/transactions/AMMBid.js +7 -5
  174. package/dist/npm/src/models/transactions/AMMBid.js.map +1 -1
  175. package/dist/npm/src/models/transactions/AMMClawback.d.ts.map +1 -1
  176. package/dist/npm/src/models/transactions/AMMClawback.js +5 -6
  177. package/dist/npm/src/models/transactions/AMMClawback.js.map +1 -1
  178. package/dist/npm/src/models/transactions/AMMDelete.d.ts.map +1 -1
  179. package/dist/npm/src/models/transactions/AMMDelete.js +2 -2
  180. package/dist/npm/src/models/transactions/AMMDelete.js.map +1 -1
  181. package/dist/npm/src/models/transactions/AMMDeposit.js +3 -3
  182. package/dist/npm/src/models/transactions/AMMDeposit.js.map +1 -1
  183. package/dist/npm/src/models/transactions/AMMVote.d.ts.map +1 -1
  184. package/dist/npm/src/models/transactions/AMMVote.js +2 -2
  185. package/dist/npm/src/models/transactions/AMMVote.js.map +1 -1
  186. package/dist/npm/src/models/transactions/AMMWithdraw.js +3 -3
  187. package/dist/npm/src/models/transactions/AMMWithdraw.js.map +1 -1
  188. package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.d.ts.map +1 -1
  189. package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.js +3 -3
  190. package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.js.map +1 -1
  191. package/dist/npm/src/models/transactions/MPTokenIssuanceSet.js +4 -4
  192. package/dist/npm/src/models/transactions/MPTokenIssuanceSet.js.map +1 -1
  193. package/dist/npm/src/models/transactions/NFTokenCancelOffer.d.ts.map +1 -1
  194. package/dist/npm/src/models/transactions/NFTokenCancelOffer.js +1 -1
  195. package/dist/npm/src/models/transactions/NFTokenCancelOffer.js.map +1 -1
  196. package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
  197. package/dist/npm/src/models/transactions/NFTokenCreateOffer.js +6 -2
  198. package/dist/npm/src/models/transactions/NFTokenCreateOffer.js.map +1 -1
  199. package/dist/npm/src/models/transactions/checkCreate.d.ts.map +1 -1
  200. package/dist/npm/src/models/transactions/checkCreate.js +1 -2
  201. package/dist/npm/src/models/transactions/checkCreate.js.map +1 -1
  202. package/dist/npm/src/models/transactions/clawback.d.ts +2 -2
  203. package/dist/npm/src/models/transactions/clawback.d.ts.map +1 -1
  204. package/dist/npm/src/models/transactions/clawback.js +4 -6
  205. package/dist/npm/src/models/transactions/clawback.js.map +1 -1
  206. package/dist/npm/src/models/transactions/common.d.ts +9 -4
  207. package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
  208. package/dist/npm/src/models/transactions/common.js +51 -28
  209. package/dist/npm/src/models/transactions/common.js.map +1 -1
  210. package/dist/npm/src/models/transactions/escrowCreate.d.ts +2 -0
  211. package/dist/npm/src/models/transactions/escrowCreate.d.ts.map +1 -1
  212. package/dist/npm/src/models/transactions/escrowCreate.js +4 -2
  213. package/dist/npm/src/models/transactions/escrowCreate.js.map +1 -1
  214. package/dist/npm/src/models/transactions/escrowFinish.d.ts +1 -0
  215. package/dist/npm/src/models/transactions/escrowFinish.d.ts.map +1 -1
  216. package/dist/npm/src/models/transactions/escrowFinish.js.map +1 -1
  217. package/dist/npm/src/models/transactions/index.d.ts +8 -2
  218. package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
  219. package/dist/npm/src/models/transactions/index.js +4 -1
  220. package/dist/npm/src/models/transactions/index.js.map +1 -1
  221. package/dist/npm/src/models/transactions/oracleSet.d.ts.map +1 -1
  222. package/dist/npm/src/models/transactions/oracleSet.js +22 -21
  223. package/dist/npm/src/models/transactions/oracleSet.js.map +1 -1
  224. package/dist/npm/src/models/transactions/payment.d.ts +1 -0
  225. package/dist/npm/src/models/transactions/payment.d.ts.map +1 -1
  226. package/dist/npm/src/models/transactions/payment.js +6 -4
  227. package/dist/npm/src/models/transactions/payment.js.map +1 -1
  228. package/dist/npm/src/models/transactions/signerListSet.d.ts.map +1 -1
  229. package/dist/npm/src/models/transactions/signerListSet.js +10 -16
  230. package/dist/npm/src/models/transactions/signerListSet.js.map +1 -1
  231. package/dist/npm/src/models/transactions/transaction.d.ts +7 -1
  232. package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
  233. package/dist/npm/src/models/transactions/transaction.js +28 -35
  234. package/dist/npm/src/models/transactions/transaction.js.map +1 -1
  235. package/dist/npm/src/models/transactions/vaultClawback.d.ts +10 -0
  236. package/dist/npm/src/models/transactions/vaultClawback.d.ts.map +1 -0
  237. package/dist/npm/src/models/transactions/vaultClawback.js +12 -0
  238. package/dist/npm/src/models/transactions/vaultClawback.js.map +1 -0
  239. package/dist/npm/src/models/transactions/vaultCreate.d.ts +24 -0
  240. package/dist/npm/src/models/transactions/vaultCreate.d.ts.map +1 -0
  241. package/dist/npm/src/models/transactions/vaultCreate.js +51 -0
  242. package/dist/npm/src/models/transactions/vaultCreate.js.map +1 -0
  243. package/dist/npm/src/models/transactions/vaultDelete.d.ts +7 -0
  244. package/dist/npm/src/models/transactions/vaultDelete.d.ts.map +1 -0
  245. package/dist/npm/src/models/transactions/vaultDelete.js +10 -0
  246. package/dist/npm/src/models/transactions/vaultDelete.js.map +1 -0
  247. package/dist/npm/src/models/transactions/vaultDeposit.d.ts +9 -0
  248. package/dist/npm/src/models/transactions/vaultDeposit.d.ts.map +1 -0
  249. package/dist/npm/src/models/transactions/vaultDeposit.js +11 -0
  250. package/dist/npm/src/models/transactions/vaultDeposit.js.map +1 -0
  251. package/dist/npm/src/models/transactions/vaultSet.d.ts +10 -0
  252. package/dist/npm/src/models/transactions/vaultSet.d.ts.map +1 -0
  253. package/dist/npm/src/models/transactions/vaultSet.js +25 -0
  254. package/dist/npm/src/models/transactions/vaultSet.js.map +1 -0
  255. package/dist/npm/src/models/transactions/vaultWithdraw.d.ts +10 -0
  256. package/dist/npm/src/models/transactions/vaultWithdraw.d.ts.map +1 -0
  257. package/dist/npm/src/models/transactions/vaultWithdraw.js +12 -0
  258. package/dist/npm/src/models/transactions/vaultWithdraw.js.map +1 -0
  259. package/dist/npm/src/models/utils/flags.d.ts.map +1 -1
  260. package/dist/npm/src/models/utils/flags.js +2 -0
  261. package/dist/npm/src/models/utils/flags.js.map +1 -1
  262. package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
  263. package/dist/npm/src/sugar/autofill.js +32 -11
  264. package/dist/npm/src/sugar/autofill.js.map +1 -1
  265. package/dist/npm/sugar/autofill.d.ts.map +1 -1
  266. package/dist/npm/sugar/autofill.js +32 -11
  267. package/dist/npm/sugar/autofill.js.map +1 -1
  268. package/package.json +5 -4
  269. package/src/Wallet/defaultFaucets.ts +5 -0
  270. package/src/client/index.ts +43 -38
  271. package/src/client/partialPayment.ts +1 -2
  272. package/src/models/common/index.ts +2 -0
  273. package/src/models/ledger/AccountRoot.ts +1 -1
  274. package/src/models/ledger/Escrow.ts +4 -0
  275. package/src/models/ledger/FeeSettings.ts +4 -0
  276. package/src/models/ledger/LedgerEntry.ts +3 -0
  277. package/src/models/ledger/Vault.ts +83 -0
  278. package/src/models/ledger/index.ts +3 -1
  279. package/src/models/methods/index.ts +10 -0
  280. package/src/models/methods/serverInfo.ts +9 -0
  281. package/src/models/methods/serverState.ts +10 -0
  282. package/src/models/methods/vaultInfo.ts +193 -0
  283. package/src/models/transactions/AMMBid.ts +12 -20
  284. package/src/models/transactions/AMMClawback.ts +8 -11
  285. package/src/models/transactions/AMMDelete.ts +7 -3
  286. package/src/models/transactions/AMMDeposit.ts +4 -4
  287. package/src/models/transactions/AMMVote.ts +7 -3
  288. package/src/models/transactions/AMMWithdraw.ts +4 -4
  289. package/src/models/transactions/MPTokenIssuanceCreate.ts +3 -1
  290. package/src/models/transactions/MPTokenIssuanceSet.ts +1 -1
  291. package/src/models/transactions/NFTokenCancelOffer.ts +2 -2
  292. package/src/models/transactions/NFTokenCreateOffer.ts +8 -4
  293. package/src/models/transactions/checkCreate.ts +2 -6
  294. package/src/models/transactions/clawback.ts +9 -10
  295. package/src/models/transactions/common.ts +114 -41
  296. package/src/models/transactions/escrowCreate.ts +10 -2
  297. package/src/models/transactions/escrowFinish.ts +2 -0
  298. package/src/models/transactions/index.ts +13 -2
  299. package/src/models/transactions/oracleSet.ts +32 -39
  300. package/src/models/transactions/payment.ts +13 -7
  301. package/src/models/transactions/signerListSet.ts +21 -21
  302. package/src/models/transactions/transaction.ts +46 -43
  303. package/src/models/transactions/vaultClawback.ts +55 -0
  304. package/src/models/transactions/vaultCreate.ts +142 -0
  305. package/src/models/transactions/vaultDelete.ts +32 -0
  306. package/src/models/transactions/vaultDeposit.ts +41 -0
  307. package/src/models/transactions/vaultSet.ts +71 -0
  308. package/src/models/transactions/vaultWithdraw.ts +50 -0
  309. package/src/models/utils/flags.ts +2 -0
  310. package/src/sugar/autofill.ts +44 -31
@@ -5454,6 +5454,107 @@ exports.crypto = void 0;
5454
5454
  exports.crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;
5455
5455
 
5456
5456
 
5457
+ /***/ }),
5458
+
5459
+ /***/ "../../node_modules/@noble/hashes/hmac.js":
5460
+ /*!************************************************!*\
5461
+ !*** ../../node_modules/@noble/hashes/hmac.js ***!
5462
+ \************************************************/
5463
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5464
+
5465
+ "use strict";
5466
+
5467
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
5468
+ exports.hmac = exports.HMAC = void 0;
5469
+ /**
5470
+ * HMAC: RFC2104 message authentication code.
5471
+ * @module
5472
+ */
5473
+ const utils_ts_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
5474
+ class HMAC extends utils_ts_1.Hash {
5475
+ constructor(hash, _key) {
5476
+ super();
5477
+ this.finished = false;
5478
+ this.destroyed = false;
5479
+ (0, utils_ts_1.ahash)(hash);
5480
+ const key = (0, utils_ts_1.toBytes)(_key);
5481
+ this.iHash = hash.create();
5482
+ if (typeof this.iHash.update !== 'function')
5483
+ throw new Error('Expected instance of class which extends utils.Hash');
5484
+ this.blockLen = this.iHash.blockLen;
5485
+ this.outputLen = this.iHash.outputLen;
5486
+ const blockLen = this.blockLen;
5487
+ const pad = new Uint8Array(blockLen);
5488
+ // blockLen can be bigger than outputLen
5489
+ pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);
5490
+ for (let i = 0; i < pad.length; i++)
5491
+ pad[i] ^= 0x36;
5492
+ this.iHash.update(pad);
5493
+ // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone
5494
+ this.oHash = hash.create();
5495
+ // Undo internal XOR && apply outer XOR
5496
+ for (let i = 0; i < pad.length; i++)
5497
+ pad[i] ^= 0x36 ^ 0x5c;
5498
+ this.oHash.update(pad);
5499
+ (0, utils_ts_1.clean)(pad);
5500
+ }
5501
+ update(buf) {
5502
+ (0, utils_ts_1.aexists)(this);
5503
+ this.iHash.update(buf);
5504
+ return this;
5505
+ }
5506
+ digestInto(out) {
5507
+ (0, utils_ts_1.aexists)(this);
5508
+ (0, utils_ts_1.abytes)(out, this.outputLen);
5509
+ this.finished = true;
5510
+ this.iHash.digestInto(out);
5511
+ this.oHash.update(out);
5512
+ this.oHash.digestInto(out);
5513
+ this.destroy();
5514
+ }
5515
+ digest() {
5516
+ const out = new Uint8Array(this.oHash.outputLen);
5517
+ this.digestInto(out);
5518
+ return out;
5519
+ }
5520
+ _cloneInto(to) {
5521
+ // Create new instance without calling constructor since key already in state and we don't know it.
5522
+ to || (to = Object.create(Object.getPrototypeOf(this), {}));
5523
+ const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;
5524
+ to = to;
5525
+ to.finished = finished;
5526
+ to.destroyed = destroyed;
5527
+ to.blockLen = blockLen;
5528
+ to.outputLen = outputLen;
5529
+ to.oHash = oHash._cloneInto(to.oHash);
5530
+ to.iHash = iHash._cloneInto(to.iHash);
5531
+ return to;
5532
+ }
5533
+ clone() {
5534
+ return this._cloneInto();
5535
+ }
5536
+ destroy() {
5537
+ this.destroyed = true;
5538
+ this.oHash.destroy();
5539
+ this.iHash.destroy();
5540
+ }
5541
+ }
5542
+ exports.HMAC = HMAC;
5543
+ /**
5544
+ * HMAC: RFC2104 message authentication code.
5545
+ * @param hash - function that would be used e.g. sha256
5546
+ * @param key - message key
5547
+ * @param message - message data
5548
+ * @example
5549
+ * import { hmac } from '@noble/hashes/hmac';
5550
+ * import { sha256 } from '@noble/hashes/sha2';
5551
+ * const mac1 = hmac(sha256, 'key', 'message');
5552
+ */
5553
+ const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();
5554
+ exports.hmac = hmac;
5555
+ exports.hmac.create = (hash, key) => new HMAC(hash, key);
5556
+
5557
+
5457
5558
  /***/ }),
5458
5559
 
5459
5560
  /***/ "../../node_modules/@noble/hashes/legacy.js":
@@ -5751,6 +5852,117 @@ exports.RIPEMD160 = RIPEMD160;
5751
5852
  exports.ripemd160 = (0, utils_ts_1.createHasher)(() => new RIPEMD160());
5752
5853
 
5753
5854
 
5855
+ /***/ }),
5856
+
5857
+ /***/ "../../node_modules/@noble/hashes/pbkdf2.js":
5858
+ /*!**************************************************!*\
5859
+ !*** ../../node_modules/@noble/hashes/pbkdf2.js ***!
5860
+ \**************************************************/
5861
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5862
+
5863
+ "use strict";
5864
+
5865
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
5866
+ exports.pbkdf2 = pbkdf2;
5867
+ exports.pbkdf2Async = pbkdf2Async;
5868
+ /**
5869
+ * PBKDF (RFC 2898). Can be used to create a key from password and salt.
5870
+ * @module
5871
+ */
5872
+ const hmac_ts_1 = __webpack_require__(/*! ./hmac.js */ "../../node_modules/@noble/hashes/hmac.js");
5873
+ // prettier-ignore
5874
+ const utils_ts_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
5875
+ // Common prologue and epilogue for sync/async functions
5876
+ function pbkdf2Init(hash, _password, _salt, _opts) {
5877
+ (0, utils_ts_1.ahash)(hash);
5878
+ const opts = (0, utils_ts_1.checkOpts)({ dkLen: 32, asyncTick: 10 }, _opts);
5879
+ const { c, dkLen, asyncTick } = opts;
5880
+ (0, utils_ts_1.anumber)(c);
5881
+ (0, utils_ts_1.anumber)(dkLen);
5882
+ (0, utils_ts_1.anumber)(asyncTick);
5883
+ if (c < 1)
5884
+ throw new Error('iterations (c) should be >= 1');
5885
+ const password = (0, utils_ts_1.kdfInputToBytes)(_password);
5886
+ const salt = (0, utils_ts_1.kdfInputToBytes)(_salt);
5887
+ // DK = PBKDF2(PRF, Password, Salt, c, dkLen);
5888
+ const DK = new Uint8Array(dkLen);
5889
+ // U1 = PRF(Password, Salt + INT_32_BE(i))
5890
+ const PRF = hmac_ts_1.hmac.create(hash, password);
5891
+ const PRFSalt = PRF._cloneInto().update(salt);
5892
+ return { c, dkLen, asyncTick, DK, PRF, PRFSalt };
5893
+ }
5894
+ function pbkdf2Output(PRF, PRFSalt, DK, prfW, u) {
5895
+ PRF.destroy();
5896
+ PRFSalt.destroy();
5897
+ if (prfW)
5898
+ prfW.destroy();
5899
+ (0, utils_ts_1.clean)(u);
5900
+ return DK;
5901
+ }
5902
+ /**
5903
+ * PBKDF2-HMAC: RFC 2898 key derivation function
5904
+ * @param hash - hash function that would be used e.g. sha256
5905
+ * @param password - password from which a derived key is generated
5906
+ * @param salt - cryptographic salt
5907
+ * @param opts - {c, dkLen} where c is work factor and dkLen is output message size
5908
+ * @example
5909
+ * const key = pbkdf2(sha256, 'password', 'salt', { dkLen: 32, c: Math.pow(2, 18) });
5910
+ */
5911
+ function pbkdf2(hash, password, salt, opts) {
5912
+ const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
5913
+ let prfW; // Working copy
5914
+ const arr = new Uint8Array(4);
5915
+ const view = (0, utils_ts_1.createView)(arr);
5916
+ const u = new Uint8Array(PRF.outputLen);
5917
+ // DK = T1 + T2 + ⋯ + Tdklen/hlen
5918
+ for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {
5919
+ // Ti = F(Password, Salt, c, i)
5920
+ const Ti = DK.subarray(pos, pos + PRF.outputLen);
5921
+ view.setInt32(0, ti, false);
5922
+ // F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc
5923
+ // U1 = PRF(Password, Salt + INT_32_BE(i))
5924
+ (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);
5925
+ Ti.set(u.subarray(0, Ti.length));
5926
+ for (let ui = 1; ui < c; ui++) {
5927
+ // Uc = PRF(Password, Uc−1)
5928
+ PRF._cloneInto(prfW).update(u).digestInto(u);
5929
+ for (let i = 0; i < Ti.length; i++)
5930
+ Ti[i] ^= u[i];
5931
+ }
5932
+ }
5933
+ return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
5934
+ }
5935
+ /**
5936
+ * PBKDF2-HMAC: RFC 2898 key derivation function. Async version.
5937
+ * @example
5938
+ * await pbkdf2Async(sha256, 'password', 'salt', { dkLen: 32, c: 500_000 });
5939
+ */
5940
+ async function pbkdf2Async(hash, password, salt, opts) {
5941
+ const { c, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
5942
+ let prfW; // Working copy
5943
+ const arr = new Uint8Array(4);
5944
+ const view = (0, utils_ts_1.createView)(arr);
5945
+ const u = new Uint8Array(PRF.outputLen);
5946
+ // DK = T1 + T2 + ⋯ + Tdklen/hlen
5947
+ for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {
5948
+ // Ti = F(Password, Salt, c, i)
5949
+ const Ti = DK.subarray(pos, pos + PRF.outputLen);
5950
+ view.setInt32(0, ti, false);
5951
+ // F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc
5952
+ // U1 = PRF(Password, Salt + INT_32_BE(i))
5953
+ (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);
5954
+ Ti.set(u.subarray(0, Ti.length));
5955
+ await (0, utils_ts_1.asyncLoop)(c - 1, asyncTick, () => {
5956
+ // Uc = PRF(Password, Uc−1)
5957
+ PRF._cloneInto(prfW).update(u).digestInto(u);
5958
+ for (let i = 0; i < Ti.length; i++)
5959
+ Ti[i] ^= u[i];
5960
+ });
5961
+ }
5962
+ return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
5963
+ }
5964
+
5965
+
5754
5966
  /***/ }),
5755
5967
 
5756
5968
  /***/ "../../node_modules/@noble/hashes/ripemd160.js":
@@ -6578,10 +6790,17 @@ function randomBytes(bytesLength = 32) {
6578
6790
 
6579
6791
  /*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
6580
6792
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6581
- exports.bytes = exports.stringToBytes = exports.str = exports.bytesToString = exports.hex = exports.utf8 = exports.bech32m = exports.bech32 = exports.base58check = exports.createBase58check = exports.base58xmr = exports.base58xrp = exports.base58flickr = exports.base58 = exports.base64urlnopad = exports.base64url = exports.base64nopad = exports.base64 = exports.base32crockford = exports.base32hexnopad = exports.base32hex = exports.base32nopad = exports.base32 = exports.base16 = exports.utils = exports.assertNumber = void 0;
6793
+ exports.bytes = exports.stringToBytes = exports.str = exports.bytesToString = exports.hex = exports.utf8 = exports.bech32m = exports.bech32 = exports.base58check = exports.createBase58check = exports.base58xmr = exports.base58xrp = exports.base58flickr = exports.base58 = exports.base64urlnopad = exports.base64url = exports.base64nopad = exports.base64 = exports.base32crockford = exports.base32hexnopad = exports.base32hex = exports.base32nopad = exports.base32 = exports.base16 = exports.utils = void 0;
6582
6794
  function isBytes(a) {
6583
6795
  return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');
6584
6796
  }
6797
+ /** Asserts something is Uint8Array. */
6798
+ function abytes(b, ...lengths) {
6799
+ if (!isBytes(b))
6800
+ throw new Error('Uint8Array expected');
6801
+ if (lengths.length > 0 && !lengths.includes(b.length))
6802
+ throw new Error('Uint8Array expected of length ' + lengths + ', got length=' + b.length);
6803
+ }
6585
6804
  function isArrayOf(isString, arr) {
6586
6805
  if (!Array.isArray(arr))
6587
6806
  return false;
@@ -6609,7 +6828,6 @@ function anumber(n) {
6609
6828
  if (!Number.isSafeInteger(n))
6610
6829
  throw new Error(`invalid integer: ${n}`);
6611
6830
  }
6612
- exports.assertNumber = anumber;
6613
6831
  function aArr(input) {
6614
6832
  if (!Array.isArray(input))
6615
6833
  throw new Error('array expected');
@@ -6906,41 +7124,172 @@ exports.utils = {
6906
7124
  // RFC 4648 aka RFC 3548
6907
7125
  // ---------------------
6908
7126
  /**
6909
- * base16 encoding.
7127
+ * base16 encoding from RFC 4648.
7128
+ * @example
7129
+ * ```js
7130
+ * base16.encode(Uint8Array.from([0x12, 0xab]));
7131
+ * // => '12AB'
7132
+ * ```
6910
7133
  */
6911
7134
  exports.base16 = chain(radix2(4), alphabet('0123456789ABCDEF'), join(''));
7135
+ /**
7136
+ * base32 encoding from RFC 4648. Has padding.
7137
+ * Use `base32nopad` for unpadded version.
7138
+ * Also check out `base32hex`, `base32hexnopad`, `base32crockford`.
7139
+ * @example
7140
+ * ```js
7141
+ * base32.encode(Uint8Array.from([0x12, 0xab]));
7142
+ * // => 'CKVQ===='
7143
+ * base32.decode('CKVQ====');
7144
+ * // => Uint8Array.from([0x12, 0xab])
7145
+ * ```
7146
+ */
6912
7147
  exports.base32 = chain(radix2(5), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'), padding(5), join(''));
7148
+ /**
7149
+ * base32 encoding from RFC 4648. No padding.
7150
+ * Use `base32` for padded version.
7151
+ * Also check out `base32hex`, `base32hexnopad`, `base32crockford`.
7152
+ * @example
7153
+ * ```js
7154
+ * base32nopad.encode(Uint8Array.from([0x12, 0xab]));
7155
+ * // => 'CKVQ'
7156
+ * base32nopad.decode('CKVQ');
7157
+ * // => Uint8Array.from([0x12, 0xab])
7158
+ * ```
7159
+ */
6913
7160
  exports.base32nopad = chain(radix2(5), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'), join(''));
7161
+ /**
7162
+ * base32 encoding from RFC 4648. Padded. Compared to ordinary `base32`, slightly different alphabet.
7163
+ * Use `base32hexnopad` for unpadded version.
7164
+ * @example
7165
+ * ```js
7166
+ * base32hex.encode(Uint8Array.from([0x12, 0xab]));
7167
+ * // => '2ALG===='
7168
+ * base32hex.decode('2ALG====');
7169
+ * // => Uint8Array.from([0x12, 0xab])
7170
+ * ```
7171
+ */
6914
7172
  exports.base32hex = chain(radix2(5), alphabet('0123456789ABCDEFGHIJKLMNOPQRSTUV'), padding(5), join(''));
7173
+ /**
7174
+ * base32 encoding from RFC 4648. No padding. Compared to ordinary `base32`, slightly different alphabet.
7175
+ * Use `base32hex` for padded version.
7176
+ * @example
7177
+ * ```js
7178
+ * base32hexnopad.encode(Uint8Array.from([0x12, 0xab]));
7179
+ * // => '2ALG'
7180
+ * base32hexnopad.decode('2ALG');
7181
+ * // => Uint8Array.from([0x12, 0xab])
7182
+ * ```
7183
+ */
6915
7184
  exports.base32hexnopad = chain(radix2(5), alphabet('0123456789ABCDEFGHIJKLMNOPQRSTUV'), join(''));
7185
+ /**
7186
+ * base32 encoding from RFC 4648. Doug Crockford's version.
7187
+ * https://www.crockford.com/base32.html
7188
+ * @example
7189
+ * ```js
7190
+ * base32crockford.encode(Uint8Array.from([0x12, 0xab]));
7191
+ * // => '2ANG'
7192
+ * base32crockford.decode('2ANG');
7193
+ * // => Uint8Array.from([0x12, 0xab])
7194
+ * ```
7195
+ */
6916
7196
  exports.base32crockford = chain(radix2(5), alphabet('0123456789ABCDEFGHJKMNPQRSTVWXYZ'), join(''), normalize((s) => s.toUpperCase().replace(/O/g, '0').replace(/[IL]/g, '1')));
7197
+ // Built-in base64 conversion https://caniuse.com/mdn-javascript_builtins_uint8array_frombase64
7198
+ // prettier-ignore
7199
+ const hasBase64Builtin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toBase64 === 'function' &&
7200
+ typeof Uint8Array.fromBase64 === 'function')();
7201
+ const decodeBase64Builtin = (s, isUrl) => {
7202
+ astr('base64', s);
7203
+ const re = isUrl ? /^[A-Za-z0-9=_-]+$/ : /^[A-Za-z0-9=+/]+$/;
7204
+ const alphabet = isUrl ? 'base64url' : 'base64';
7205
+ if (s.length > 0 && !re.test(s))
7206
+ throw new Error('invalid base64');
7207
+ return Uint8Array.fromBase64(s, { alphabet, lastChunkHandling: 'strict' });
7208
+ };
6917
7209
  /**
6918
- * base64 with padding. For no padding, use `base64nopad`.
7210
+ * base64 from RFC 4648. Padded.
7211
+ * Use `base64nopad` for unpadded version.
7212
+ * Also check out `base64url`, `base64urlnopad`.
7213
+ * Falls back to built-in function, when available.
6919
7214
  * @example
6920
- * const b = base64.decode('A951'); // Uint8Array.from([ 3, 222, 117 ])
6921
- * base64.encode(b); // 'A951'
7215
+ * ```js
7216
+ * base64.encode(Uint8Array.from([0x12, 0xab]));
7217
+ * // => 'Eqs='
7218
+ * base64.decode('Eqs=');
7219
+ * // => Uint8Array.from([0x12, 0xab])
7220
+ * ```
6922
7221
  */
6923
- exports.base64 = chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'), padding(6), join(''));
7222
+ // prettier-ignore
7223
+ exports.base64 = hasBase64Builtin ? {
7224
+ encode(b) { abytes(b); return b.toBase64(); },
7225
+ decode(s) { return decodeBase64Builtin(s, false); },
7226
+ } : chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'), padding(6), join(''));
6924
7227
  /**
6925
- * base64 without padding.
7228
+ * base64 from RFC 4648. No padding.
7229
+ * Use `base64` for padded version.
7230
+ * @example
7231
+ * ```js
7232
+ * base64nopad.encode(Uint8Array.from([0x12, 0xab]));
7233
+ * // => 'Eqs'
7234
+ * base64nopad.decode('Eqs');
7235
+ * // => Uint8Array.from([0x12, 0xab])
7236
+ * ```
6926
7237
  */
6927
7238
  exports.base64nopad = chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'), join(''));
6928
- exports.base64url = chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'), padding(6), join(''));
7239
+ /**
7240
+ * base64 from RFC 4648, using URL-safe alphabet. Padded.
7241
+ * Use `base64urlnopad` for unpadded version.
7242
+ * Falls back to built-in function, when available.
7243
+ * @example
7244
+ * ```js
7245
+ * base64url.encode(Uint8Array.from([0x12, 0xab]));
7246
+ * // => 'Eqs='
7247
+ * base64url.decode('Eqs=');
7248
+ * // => Uint8Array.from([0x12, 0xab])
7249
+ * ```
7250
+ */
7251
+ // prettier-ignore
7252
+ exports.base64url = hasBase64Builtin ? {
7253
+ encode(b) { abytes(b); return b.toBase64({ alphabet: 'base64url' }); },
7254
+ decode(s) { return decodeBase64Builtin(s, true); },
7255
+ } : chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'), padding(6), join(''));
7256
+ /**
7257
+ * base64 from RFC 4648, using URL-safe alphabet. No padding.
7258
+ * Use `base64url` for padded version.
7259
+ * @example
7260
+ * ```js
7261
+ * base64urlnopad.encode(Uint8Array.from([0x12, 0xab]));
7262
+ * // => 'Eqs'
7263
+ * base64urlnopad.decode('Eqs');
7264
+ * // => Uint8Array.from([0x12, 0xab])
7265
+ * ```
7266
+ */
6929
7267
  exports.base64urlnopad = chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'), join(''));
6930
7268
  // base58 code
6931
7269
  // -----------
6932
7270
  const genBase58 = /* @__NO_SIDE_EFFECTS__ */ (abc) => chain(radix(58), alphabet(abc), join(''));
6933
7271
  /**
6934
- * Base58: base64 without characters +, /, 0, O, I, l.
7272
+ * base58: base64 without ambigous characters +, /, 0, O, I, l.
6935
7273
  * Quadratic (O(n^2)) - so, can't be used on large inputs.
7274
+ * @example
7275
+ * ```js
7276
+ * base58.decode('01abcdef');
7277
+ * // => '3UhJW'
7278
+ * ```
6936
7279
  */
6937
7280
  exports.base58 = genBase58('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz');
7281
+ /**
7282
+ * base58: flickr version. Check out `base58`.
7283
+ */
6938
7284
  exports.base58flickr = genBase58('123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ');
7285
+ /**
7286
+ * base58: XRP version. Check out `base58`.
7287
+ */
6939
7288
  exports.base58xrp = genBase58('rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz');
6940
7289
  // Data len (index) -> encoded block len
6941
7290
  const XMR_BLOCK_LEN = [0, 2, 3, 5, 6, 7, 9, 10, 11];
6942
7291
  /**
6943
- * XMR version of base58.
7292
+ * base58: XMR version. Check out `base58`.
6944
7293
  * Done in 8-byte blocks (which equals 11 chars in decoding). Last (non-full) block padded with '1' to size in XMR_BLOCK_LEN.
6945
7294
  * Block encoding significantly reduces quadratic complexity of base58.
6946
7295
  */
@@ -6968,6 +7317,10 @@ exports.base58xmr = {
6968
7317
  return Uint8Array.from(res);
6969
7318
  },
6970
7319
  };
7320
+ /**
7321
+ * Method, which creates base58check encoder.
7322
+ * Requires function, calculating sha256.
7323
+ */
6971
7324
  const createBase58check = (sha256) => chain(checksum(4, (data) => sha256(sha256(data))), exports.base58);
6972
7325
  exports.createBase58check = createBase58check;
6973
7326
  /**
@@ -7071,36 +7424,60 @@ function genBech32(encoding) {
7071
7424
  };
7072
7425
  }
7073
7426
  /**
7074
- * Low-level bech32 operations. Operates on words.
7427
+ * bech32 from BIP 173. Operates on words.
7428
+ * For high-level, check out scure-btc-signer:
7429
+ * https://github.com/paulmillr/scure-btc-signer.
7075
7430
  */
7076
7431
  exports.bech32 = genBech32('bech32');
7432
+ /**
7433
+ * bech32m from BIP 350. Operates on words.
7434
+ * It was to mitigate `bech32` weaknesses.
7435
+ * For high-level, check out scure-btc-signer:
7436
+ * https://github.com/paulmillr/scure-btc-signer.
7437
+ */
7077
7438
  exports.bech32m = genBech32('bech32m');
7078
7439
  /**
7079
7440
  * UTF-8-to-byte decoder. Uses built-in TextDecoder / TextEncoder.
7080
7441
  * @example
7442
+ * ```js
7081
7443
  * const b = utf8.decode("hey"); // => new Uint8Array([ 104, 101, 121 ])
7082
7444
  * const str = utf8.encode(b); // "hey"
7445
+ * ```
7083
7446
  */
7084
7447
  exports.utf8 = {
7085
7448
  encode: (data) => new TextDecoder().decode(data),
7086
7449
  decode: (str) => new TextEncoder().encode(str),
7087
7450
  };
7451
+ // Built-in hex conversion https://caniuse.com/mdn-javascript_builtins_uint8array_fromhex
7452
+ // prettier-ignore
7453
+ const hasHexBuiltin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === 'function' &&
7454
+ typeof Uint8Array.fromHex === 'function')();
7455
+ // prettier-ignore
7456
+ const hexBuiltin = {
7457
+ encode(data) { abytes(data); return data.toHex(); },
7458
+ decode(s) { astr('hex', s); return Uint8Array.fromHex(s); },
7459
+ };
7088
7460
  /**
7089
- * hex string decoder.
7461
+ * hex string decoder. Uses built-in function, when available.
7090
7462
  * @example
7463
+ * ```js
7091
7464
  * const b = hex.decode("0102ff"); // => new Uint8Array([ 1, 2, 255 ])
7092
7465
  * const str = hex.encode(b); // "0102ff"
7466
+ * ```
7093
7467
  */
7094
- exports.hex = chain(radix2(4), alphabet('0123456789abcdef'), join(''), normalize((s) => {
7095
- if (typeof s !== 'string' || s.length % 2 !== 0)
7096
- throw new TypeError(`hex.decode: expected string, got ${typeof s} with length ${s.length}`);
7097
- return s.toLowerCase();
7098
- }));
7468
+ exports.hex = hasHexBuiltin
7469
+ ? hexBuiltin
7470
+ : chain(radix2(4), alphabet('0123456789abcdef'), join(''), normalize((s) => {
7471
+ if (typeof s !== 'string' || s.length % 2 !== 0)
7472
+ throw new TypeError(`hex.decode: expected string, got ${typeof s} with length ${s.length}`);
7473
+ return s.toLowerCase();
7474
+ }));
7099
7475
  // prettier-ignore
7100
7476
  const CODERS = {
7101
7477
  utf8: exports.utf8, hex: exports.hex, base16: exports.base16, base32: exports.base32, base64: exports.base64, base64url: exports.base64url, base58: exports.base58, base58xmr: exports.base58xmr
7102
7478
  };
7103
7479
  const coderTypeError = 'Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr';
7480
+ /** @deprecated */
7104
7481
  const bytesToString = (type, bytes) => {
7105
7482
  if (typeof type !== 'string' || !CODERS.hasOwnProperty(type))
7106
7483
  throw new TypeError(coderTypeError);
@@ -7109,7 +7486,9 @@ const bytesToString = (type, bytes) => {
7109
7486
  return CODERS[type].encode(bytes);
7110
7487
  };
7111
7488
  exports.bytesToString = bytesToString;
7489
+ /** @deprecated */
7112
7490
  exports.str = exports.bytesToString; // as in python, but for bytes only
7491
+ /** @deprecated */
7113
7492
  const stringToBytes = (type, str) => {
7114
7493
  if (!CODERS.hasOwnProperty(type))
7115
7494
  throw new TypeError(coderTypeError);
@@ -7118,6 +7497,7 @@ const stringToBytes = (type, str) => {
7118
7497
  return CODERS[type].decode(str);
7119
7498
  };
7120
7499
  exports.stringToBytes = stringToBytes;
7500
+ /** @deprecated */
7121
7501
  exports.bytes = exports.stringToBytes;
7122
7502
 
7123
7503
 
@@ -8125,1376 +8505,8 @@ exports.sha384 = exports.sha512_256 = exports.sha512_224 = exports.sha512 = expo
8125
8505
  * @module
8126
8506
  */
8127
8507
  const _md_ts_1 = __webpack_require__(/*! ./_md.js */ "../../node_modules/@scure/bip32/node_modules/@noble/hashes/_md.js");
8128
- const _u64_ts_1 = __webpack_require__(/*! ./_u64.js */ "../../node_modules/@scure/bip32/node_modules/@noble/hashes/_u64.js");
8129
- const utils_ts_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@scure/bip32/node_modules/@noble/hashes/utils.js");
8130
- // Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):
8131
- // prettier-ignore
8132
- const [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => _u64_ts_1.default.split([
8133
- '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',
8134
- '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',
8135
- '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',
8136
- '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',
8137
- '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',
8138
- '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',
8139
- '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',
8140
- '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',
8141
- '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',
8142
- '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',
8143
- '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',
8144
- '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',
8145
- '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',
8146
- '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',
8147
- '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',
8148
- '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',
8149
- '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',
8150
- '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',
8151
- '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',
8152
- '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'
8153
- ].map(n => BigInt(n))))();
8154
- // Temporary buffer, not used to store anything between runs
8155
- const SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);
8156
- const SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);
8157
- class SHA512 extends _md_ts_1.HashMD {
8158
- constructor(outputLen = 64) {
8159
- super(128, outputLen, 16, false);
8160
- // We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.
8161
- // Also looks cleaner and easier to verify with spec.
8162
- // Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):
8163
- // h -- high 32 bits, l -- low 32 bits
8164
- this.Ah = 0x6a09e667 | 0;
8165
- this.Al = 0xf3bcc908 | 0;
8166
- this.Bh = 0xbb67ae85 | 0;
8167
- this.Bl = 0x84caa73b | 0;
8168
- this.Ch = 0x3c6ef372 | 0;
8169
- this.Cl = 0xfe94f82b | 0;
8170
- this.Dh = 0xa54ff53a | 0;
8171
- this.Dl = 0x5f1d36f1 | 0;
8172
- this.Eh = 0x510e527f | 0;
8173
- this.El = 0xade682d1 | 0;
8174
- this.Fh = 0x9b05688c | 0;
8175
- this.Fl = 0x2b3e6c1f | 0;
8176
- this.Gh = 0x1f83d9ab | 0;
8177
- this.Gl = 0xfb41bd6b | 0;
8178
- this.Hh = 0x5be0cd19 | 0;
8179
- this.Hl = 0x137e2179 | 0;
8180
- }
8181
- // prettier-ignore
8182
- get() {
8183
- const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
8184
- return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];
8185
- }
8186
- // prettier-ignore
8187
- set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {
8188
- this.Ah = Ah | 0;
8189
- this.Al = Al | 0;
8190
- this.Bh = Bh | 0;
8191
- this.Bl = Bl | 0;
8192
- this.Ch = Ch | 0;
8193
- this.Cl = Cl | 0;
8194
- this.Dh = Dh | 0;
8195
- this.Dl = Dl | 0;
8196
- this.Eh = Eh | 0;
8197
- this.El = El | 0;
8198
- this.Fh = Fh | 0;
8199
- this.Fl = Fl | 0;
8200
- this.Gh = Gh | 0;
8201
- this.Gl = Gl | 0;
8202
- this.Hh = Hh | 0;
8203
- this.Hl = Hl | 0;
8204
- }
8205
- process(view, offset) {
8206
- // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array
8207
- for (let i = 0; i < 16; i++, offset += 4) {
8208
- SHA512_W_H[i] = view.getUint32(offset);
8209
- SHA512_W_L[i] = view.getUint32((offset += 4));
8210
- }
8211
- for (let i = 16; i < 80; i++) {
8212
- // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)
8213
- const W15h = SHA512_W_H[i - 15] | 0;
8214
- const W15l = SHA512_W_L[i - 15] | 0;
8215
- const s0h = _u64_ts_1.default.rotrSH(W15h, W15l, 1) ^ _u64_ts_1.default.rotrSH(W15h, W15l, 8) ^ _u64_ts_1.default.shrSH(W15h, W15l, 7);
8216
- const s0l = _u64_ts_1.default.rotrSL(W15h, W15l, 1) ^ _u64_ts_1.default.rotrSL(W15h, W15l, 8) ^ _u64_ts_1.default.shrSL(W15h, W15l, 7);
8217
- // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)
8218
- const W2h = SHA512_W_H[i - 2] | 0;
8219
- const W2l = SHA512_W_L[i - 2] | 0;
8220
- const s1h = _u64_ts_1.default.rotrSH(W2h, W2l, 19) ^ _u64_ts_1.default.rotrBH(W2h, W2l, 61) ^ _u64_ts_1.default.shrSH(W2h, W2l, 6);
8221
- const s1l = _u64_ts_1.default.rotrSL(W2h, W2l, 19) ^ _u64_ts_1.default.rotrBL(W2h, W2l, 61) ^ _u64_ts_1.default.shrSL(W2h, W2l, 6);
8222
- // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];
8223
- const SUMl = _u64_ts_1.default.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
8224
- const SUMh = _u64_ts_1.default.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
8225
- SHA512_W_H[i] = SUMh | 0;
8226
- SHA512_W_L[i] = SUMl | 0;
8227
- }
8228
- let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
8229
- // Compression function main loop, 80 rounds
8230
- for (let i = 0; i < 80; i++) {
8231
- // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)
8232
- const sigma1h = _u64_ts_1.default.rotrSH(Eh, El, 14) ^ _u64_ts_1.default.rotrSH(Eh, El, 18) ^ _u64_ts_1.default.rotrBH(Eh, El, 41);
8233
- const sigma1l = _u64_ts_1.default.rotrSL(Eh, El, 14) ^ _u64_ts_1.default.rotrSL(Eh, El, 18) ^ _u64_ts_1.default.rotrBL(Eh, El, 41);
8234
- //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
8235
- const CHIh = (Eh & Fh) ^ (~Eh & Gh);
8236
- const CHIl = (El & Fl) ^ (~El & Gl);
8237
- // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]
8238
- // prettier-ignore
8239
- const T1ll = _u64_ts_1.default.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
8240
- const T1h = _u64_ts_1.default.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
8241
- const T1l = T1ll | 0;
8242
- // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)
8243
- const sigma0h = _u64_ts_1.default.rotrSH(Ah, Al, 28) ^ _u64_ts_1.default.rotrBH(Ah, Al, 34) ^ _u64_ts_1.default.rotrBH(Ah, Al, 39);
8244
- const sigma0l = _u64_ts_1.default.rotrSL(Ah, Al, 28) ^ _u64_ts_1.default.rotrBL(Ah, Al, 34) ^ _u64_ts_1.default.rotrBL(Ah, Al, 39);
8245
- const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);
8246
- const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);
8247
- Hh = Gh | 0;
8248
- Hl = Gl | 0;
8249
- Gh = Fh | 0;
8250
- Gl = Fl | 0;
8251
- Fh = Eh | 0;
8252
- Fl = El | 0;
8253
- ({ h: Eh, l: El } = _u64_ts_1.default.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
8254
- Dh = Ch | 0;
8255
- Dl = Cl | 0;
8256
- Ch = Bh | 0;
8257
- Cl = Bl | 0;
8258
- Bh = Ah | 0;
8259
- Bl = Al | 0;
8260
- const All = _u64_ts_1.default.add3L(T1l, sigma0l, MAJl);
8261
- Ah = _u64_ts_1.default.add3H(All, T1h, sigma0h, MAJh);
8262
- Al = All | 0;
8263
- }
8264
- // Add the compressed chunk to the current hash value
8265
- ({ h: Ah, l: Al } = _u64_ts_1.default.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
8266
- ({ h: Bh, l: Bl } = _u64_ts_1.default.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
8267
- ({ h: Ch, l: Cl } = _u64_ts_1.default.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
8268
- ({ h: Dh, l: Dl } = _u64_ts_1.default.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
8269
- ({ h: Eh, l: El } = _u64_ts_1.default.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
8270
- ({ h: Fh, l: Fl } = _u64_ts_1.default.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
8271
- ({ h: Gh, l: Gl } = _u64_ts_1.default.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
8272
- ({ h: Hh, l: Hl } = _u64_ts_1.default.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
8273
- this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
8274
- }
8275
- roundClean() {
8276
- SHA512_W_H.fill(0);
8277
- SHA512_W_L.fill(0);
8278
- }
8279
- destroy() {
8280
- this.buffer.fill(0);
8281
- this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
8282
- }
8283
- }
8284
- exports.SHA512 = SHA512;
8285
- class SHA512_224 extends SHA512 {
8286
- constructor() {
8287
- super(28);
8288
- // h -- high 32 bits, l -- low 32 bits
8289
- this.Ah = 0x8c3d37c8 | 0;
8290
- this.Al = 0x19544da2 | 0;
8291
- this.Bh = 0x73e19966 | 0;
8292
- this.Bl = 0x89dcd4d6 | 0;
8293
- this.Ch = 0x1dfab7ae | 0;
8294
- this.Cl = 0x32ff9c82 | 0;
8295
- this.Dh = 0x679dd514 | 0;
8296
- this.Dl = 0x582f9fcf | 0;
8297
- this.Eh = 0x0f6d2b69 | 0;
8298
- this.El = 0x7bd44da8 | 0;
8299
- this.Fh = 0x77e36f73 | 0;
8300
- this.Fl = 0x04c48942 | 0;
8301
- this.Gh = 0x3f9d85a8 | 0;
8302
- this.Gl = 0x6a1d36c8 | 0;
8303
- this.Hh = 0x1112e6ad | 0;
8304
- this.Hl = 0x91d692a1 | 0;
8305
- }
8306
- }
8307
- exports.SHA512_224 = SHA512_224;
8308
- class SHA512_256 extends SHA512 {
8309
- constructor() {
8310
- super(32);
8311
- // h -- high 32 bits, l -- low 32 bits
8312
- this.Ah = 0x22312194 | 0;
8313
- this.Al = 0xfc2bf72c | 0;
8314
- this.Bh = 0x9f555fa3 | 0;
8315
- this.Bl = 0xc84c64c2 | 0;
8316
- this.Ch = 0x2393b86b | 0;
8317
- this.Cl = 0x6f53b151 | 0;
8318
- this.Dh = 0x96387719 | 0;
8319
- this.Dl = 0x5940eabd | 0;
8320
- this.Eh = 0x96283ee2 | 0;
8321
- this.El = 0xa88effe3 | 0;
8322
- this.Fh = 0xbe5e1e25 | 0;
8323
- this.Fl = 0x53863992 | 0;
8324
- this.Gh = 0x2b0199fc | 0;
8325
- this.Gl = 0x2c85b8aa | 0;
8326
- this.Hh = 0x0eb72ddc | 0;
8327
- this.Hl = 0x81c52ca2 | 0;
8328
- }
8329
- }
8330
- exports.SHA512_256 = SHA512_256;
8331
- class SHA384 extends SHA512 {
8332
- constructor() {
8333
- super(48);
8334
- // h -- high 32 bits, l -- low 32 bits
8335
- this.Ah = 0xcbbb9d5d | 0;
8336
- this.Al = 0xc1059ed8 | 0;
8337
- this.Bh = 0x629a292a | 0;
8338
- this.Bl = 0x367cd507 | 0;
8339
- this.Ch = 0x9159015a | 0;
8340
- this.Cl = 0x3070dd17 | 0;
8341
- this.Dh = 0x152fecd8 | 0;
8342
- this.Dl = 0xf70e5939 | 0;
8343
- this.Eh = 0x67332667 | 0;
8344
- this.El = 0xffc00b31 | 0;
8345
- this.Fh = 0x8eb44a87 | 0;
8346
- this.Fl = 0x68581511 | 0;
8347
- this.Gh = 0xdb0c2e0d | 0;
8348
- this.Gl = 0x64f98fa7 | 0;
8349
- this.Hh = 0x47b5481d | 0;
8350
- this.Hl = 0xbefa4fa4 | 0;
8351
- }
8352
- }
8353
- exports.SHA384 = SHA384;
8354
- /** SHA2-512 hash function. */
8355
- exports.sha512 = (0, utils_ts_1.wrapConstructor)(() => new SHA512());
8356
- /** SHA2-512/224 "truncated" hash function, with improved resistance to length extension attacks. */
8357
- exports.sha512_224 = (0, utils_ts_1.wrapConstructor)(() => new SHA512_224());
8358
- /** SHA2-512/256 "truncated" hash function, with improved resistance to length extension attacks. */
8359
- exports.sha512_256 = (0, utils_ts_1.wrapConstructor)(() => new SHA512_256());
8360
- /** SHA2-384 hash function. */
8361
- exports.sha384 = (0, utils_ts_1.wrapConstructor)(() => new SHA384());
8362
-
8363
-
8364
- /***/ }),
8365
-
8366
- /***/ "../../node_modules/@scure/bip32/node_modules/@noble/hashes/utils.js":
8367
- /*!***************************************************************************!*\
8368
- !*** ../../node_modules/@scure/bip32/node_modules/@noble/hashes/utils.js ***!
8369
- \***************************************************************************/
8370
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8371
-
8372
- "use strict";
8373
-
8374
- /**
8375
- * Utilities for hex, bytes, CSPRNG.
8376
- * @module
8377
- */
8378
- /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
8379
- Object.defineProperty(exports, "__esModule", ({ value: true }));
8380
- exports.Hash = exports.nextTick = exports.byteSwapIfBE = exports.isLE = void 0;
8381
- exports.isBytes = isBytes;
8382
- exports.u8 = u8;
8383
- exports.u32 = u32;
8384
- exports.createView = createView;
8385
- exports.rotr = rotr;
8386
- exports.rotl = rotl;
8387
- exports.byteSwap = byteSwap;
8388
- exports.byteSwap32 = byteSwap32;
8389
- exports.bytesToHex = bytesToHex;
8390
- exports.hexToBytes = hexToBytes;
8391
- exports.asyncLoop = asyncLoop;
8392
- exports.utf8ToBytes = utf8ToBytes;
8393
- exports.toBytes = toBytes;
8394
- exports.concatBytes = concatBytes;
8395
- exports.checkOpts = checkOpts;
8396
- exports.wrapConstructor = wrapConstructor;
8397
- exports.wrapConstructorWithOpts = wrapConstructorWithOpts;
8398
- exports.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;
8399
- exports.randomBytes = randomBytes;
8400
- // We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.
8401
- // node.js versions earlier than v19 don't declare it in global scope.
8402
- // For node.js, package.json#exports field mapping rewrites import
8403
- // from `crypto` to `cryptoNode`, which imports native module.
8404
- // Makes the utils un-importable in browsers without a bundler.
8405
- // Once node.js 18 is deprecated (2025-04-30), we can just drop the import.
8406
- const crypto_1 = __webpack_require__(/*! @noble/hashes/crypto */ "../../node_modules/@scure/bip32/node_modules/@noble/hashes/crypto.js");
8407
- const _assert_ts_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@scure/bip32/node_modules/@noble/hashes/_assert.js");
8408
- // export { isBytes } from './_assert.ts';
8409
- // We can't reuse isBytes from _assert, because somehow this causes huge perf issues
8410
- function isBytes(a) {
8411
- return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');
8412
- }
8413
- // Cast array to different type
8414
- function u8(arr) {
8415
- return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
8416
- }
8417
- function u32(arr) {
8418
- return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
8419
- }
8420
- // Cast array to view
8421
- function createView(arr) {
8422
- return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
8423
- }
8424
- /** The rotate right (circular right shift) operation for uint32 */
8425
- function rotr(word, shift) {
8426
- return (word << (32 - shift)) | (word >>> shift);
8427
- }
8428
- /** The rotate left (circular left shift) operation for uint32 */
8429
- function rotl(word, shift) {
8430
- return (word << shift) | ((word >>> (32 - shift)) >>> 0);
8431
- }
8432
- /** Is current platform little-endian? Most are. Big-Endian platform: IBM */
8433
- exports.isLE = (() => new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();
8434
- // The byte swap operation for uint32
8435
- function byteSwap(word) {
8436
- return (((word << 24) & 0xff000000) |
8437
- ((word << 8) & 0xff0000) |
8438
- ((word >>> 8) & 0xff00) |
8439
- ((word >>> 24) & 0xff));
8440
- }
8441
- /** Conditionally byte swap if on a big-endian platform */
8442
- exports.byteSwapIfBE = exports.isLE
8443
- ? (n) => n
8444
- : (n) => byteSwap(n);
8445
- /** In place byte swap for Uint32Array */
8446
- function byteSwap32(arr) {
8447
- for (let i = 0; i < arr.length; i++) {
8448
- arr[i] = byteSwap(arr[i]);
8449
- }
8450
- }
8451
- // Built-in hex conversion https://caniuse.com/mdn-javascript_builtins_uint8array_fromhex
8452
- const hasHexBuiltin =
8453
- // @ts-ignore
8454
- typeof Uint8Array.from([]).toHex === 'function' && typeof Uint8Array.fromHex === 'function';
8455
- // Array where index 0xf0 (240) is mapped to string 'f0'
8456
- const hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));
8457
- /**
8458
- * Convert byte array to hex string. Uses built-in function, when available.
8459
- * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'
8460
- */
8461
- function bytesToHex(bytes) {
8462
- (0, _assert_ts_1.abytes)(bytes);
8463
- // @ts-ignore
8464
- if (hasHexBuiltin)
8465
- return bytes.toHex();
8466
- // pre-caching improves the speed 6x
8467
- let hex = '';
8468
- for (let i = 0; i < bytes.length; i++) {
8469
- hex += hexes[bytes[i]];
8470
- }
8471
- return hex;
8472
- }
8473
- // We use optimized technique to convert hex string to byte array
8474
- const asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
8475
- function asciiToBase16(ch) {
8476
- if (ch >= asciis._0 && ch <= asciis._9)
8477
- return ch - asciis._0; // '2' => 50-48
8478
- if (ch >= asciis.A && ch <= asciis.F)
8479
- return ch - (asciis.A - 10); // 'B' => 66-(65-10)
8480
- if (ch >= asciis.a && ch <= asciis.f)
8481
- return ch - (asciis.a - 10); // 'b' => 98-(97-10)
8482
- return;
8483
- }
8484
- /**
8485
- * Convert hex string to byte array. Uses built-in function, when available.
8486
- * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])
8487
- */
8488
- function hexToBytes(hex) {
8489
- if (typeof hex !== 'string')
8490
- throw new Error('hex string expected, got ' + typeof hex);
8491
- // @ts-ignore
8492
- if (hasHexBuiltin)
8493
- return Uint8Array.fromHex(hex);
8494
- const hl = hex.length;
8495
- const al = hl / 2;
8496
- if (hl % 2)
8497
- throw new Error('hex string expected, got unpadded hex of length ' + hl);
8498
- const array = new Uint8Array(al);
8499
- for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
8500
- const n1 = asciiToBase16(hex.charCodeAt(hi));
8501
- const n2 = asciiToBase16(hex.charCodeAt(hi + 1));
8502
- if (n1 === undefined || n2 === undefined) {
8503
- const char = hex[hi] + hex[hi + 1];
8504
- throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
8505
- }
8506
- array[ai] = n1 * 16 + n2; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163
8507
- }
8508
- return array;
8509
- }
8510
- /**
8511
- * There is no setImmediate in browser and setTimeout is slow.
8512
- * Call of async fn will return Promise, which will be fullfiled only on
8513
- * next scheduler queue processing step and this is exactly what we need.
8514
- */
8515
- const nextTick = async () => { };
8516
- exports.nextTick = nextTick;
8517
- /** Returns control to thread each 'tick' ms to avoid blocking. */
8518
- async function asyncLoop(iters, tick, cb) {
8519
- let ts = Date.now();
8520
- for (let i = 0; i < iters; i++) {
8521
- cb(i);
8522
- // Date.now() is not monotonic, so in case if clock goes backwards we return return control too
8523
- const diff = Date.now() - ts;
8524
- if (diff >= 0 && diff < tick)
8525
- continue;
8526
- await (0, exports.nextTick)();
8527
- ts += diff;
8528
- }
8529
- }
8530
- /**
8531
- * Convert JS string to byte array.
8532
- * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])
8533
- */
8534
- function utf8ToBytes(str) {
8535
- if (typeof str !== 'string')
8536
- throw new Error('utf8ToBytes expected string, got ' + typeof str);
8537
- return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809
8538
- }
8539
- /**
8540
- * Normalizes (non-hex) string or Uint8Array to Uint8Array.
8541
- * Warning: when Uint8Array is passed, it would NOT get copied.
8542
- * Keep in mind for future mutable operations.
8543
- */
8544
- function toBytes(data) {
8545
- if (typeof data === 'string')
8546
- data = utf8ToBytes(data);
8547
- (0, _assert_ts_1.abytes)(data);
8548
- return data;
8549
- }
8550
- /**
8551
- * Copies several Uint8Arrays into one.
8552
- */
8553
- function concatBytes(...arrays) {
8554
- let sum = 0;
8555
- for (let i = 0; i < arrays.length; i++) {
8556
- const a = arrays[i];
8557
- (0, _assert_ts_1.abytes)(a);
8558
- sum += a.length;
8559
- }
8560
- const res = new Uint8Array(sum);
8561
- for (let i = 0, pad = 0; i < arrays.length; i++) {
8562
- const a = arrays[i];
8563
- res.set(a, pad);
8564
- pad += a.length;
8565
- }
8566
- return res;
8567
- }
8568
- /** For runtime check if class implements interface */
8569
- class Hash {
8570
- // Safe version that clones internal state
8571
- clone() {
8572
- return this._cloneInto();
8573
- }
8574
- }
8575
- exports.Hash = Hash;
8576
- function checkOpts(defaults, opts) {
8577
- if (opts !== undefined && {}.toString.call(opts) !== '[object Object]')
8578
- throw new Error('Options should be object or undefined');
8579
- const merged = Object.assign(defaults, opts);
8580
- return merged;
8581
- }
8582
- /** Wraps hash function, creating an interface on top of it */
8583
- function wrapConstructor(hashCons) {
8584
- const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
8585
- const tmp = hashCons();
8586
- hashC.outputLen = tmp.outputLen;
8587
- hashC.blockLen = tmp.blockLen;
8588
- hashC.create = () => hashCons();
8589
- return hashC;
8590
- }
8591
- function wrapConstructorWithOpts(hashCons) {
8592
- const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
8593
- const tmp = hashCons({});
8594
- hashC.outputLen = tmp.outputLen;
8595
- hashC.blockLen = tmp.blockLen;
8596
- hashC.create = (opts) => hashCons(opts);
8597
- return hashC;
8598
- }
8599
- function wrapXOFConstructorWithOpts(hashCons) {
8600
- const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
8601
- const tmp = hashCons({});
8602
- hashC.outputLen = tmp.outputLen;
8603
- hashC.blockLen = tmp.blockLen;
8604
- hashC.create = (opts) => hashCons(opts);
8605
- return hashC;
8606
- }
8607
- /** Cryptographically secure PRNG. Uses internal OS-level `crypto.getRandomValues`. */
8608
- function randomBytes(bytesLength = 32) {
8609
- if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === 'function') {
8610
- return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));
8611
- }
8612
- // Legacy Node.js compatibility
8613
- if (crypto_1.crypto && typeof crypto_1.crypto.randomBytes === 'function') {
8614
- return Uint8Array.from(crypto_1.crypto.randomBytes(bytesLength));
8615
- }
8616
- throw new Error('crypto.getRandomValues must be defined');
8617
- }
8618
-
8619
-
8620
- /***/ }),
8621
-
8622
- /***/ "../../node_modules/@scure/bip39/index.js":
8623
- /*!************************************************!*\
8624
- !*** ../../node_modules/@scure/bip39/index.js ***!
8625
- \************************************************/
8626
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8627
-
8628
- "use strict";
8629
-
8630
- /**
8631
- * Audited & minimal JS implementation of
8632
- * [BIP39 mnemonic phrases](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki).
8633
- * @module
8634
- * @example
8635
- ```js
8636
- import * as bip39 from '@scure/bip39';
8637
- import { wordlist } from '@scure/bip39/wordlists/english';
8638
- const mn = bip39.generateMnemonic(wordlist);
8639
- console.log(mn);
8640
- const ent = bip39.mnemonicToEntropy(mn, wordlist)
8641
- bip39.entropyToMnemonic(ent, wordlist);
8642
- bip39.validateMnemonic(mn, wordlist);
8643
- await bip39.mnemonicToSeed(mn, 'password');
8644
- bip39.mnemonicToSeedSync(mn, 'password');
8645
-
8646
- // Wordlists
8647
- import { wordlist as czech } from '@scure/bip39/wordlists/czech';
8648
- import { wordlist as english } from '@scure/bip39/wordlists/english';
8649
- import { wordlist as french } from '@scure/bip39/wordlists/french';
8650
- import { wordlist as italian } from '@scure/bip39/wordlists/italian';
8651
- import { wordlist as japanese } from '@scure/bip39/wordlists/japanese';
8652
- import { wordlist as korean } from '@scure/bip39/wordlists/korean';
8653
- import { wordlist as portuguese } from '@scure/bip39/wordlists/portuguese';
8654
- import { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese';
8655
- import { wordlist as spanish } from '@scure/bip39/wordlists/spanish';
8656
- import { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese';
8657
- ```
8658
- */
8659
- Object.defineProperty(exports, "__esModule", ({ value: true }));
8660
- exports.generateMnemonic = generateMnemonic;
8661
- exports.mnemonicToEntropy = mnemonicToEntropy;
8662
- exports.entropyToMnemonic = entropyToMnemonic;
8663
- exports.validateMnemonic = validateMnemonic;
8664
- exports.mnemonicToSeed = mnemonicToSeed;
8665
- exports.mnemonicToSeedSync = mnemonicToSeedSync;
8666
- /*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */
8667
- const _assert_1 = __webpack_require__(/*! @noble/hashes/_assert */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/_assert.js");
8668
- const pbkdf2_1 = __webpack_require__(/*! @noble/hashes/pbkdf2 */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/pbkdf2.js");
8669
- const sha256_1 = __webpack_require__(/*! @noble/hashes/sha256 */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/sha256.js");
8670
- const sha512_1 = __webpack_require__(/*! @noble/hashes/sha512 */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/sha512.js");
8671
- const utils_1 = __webpack_require__(/*! @noble/hashes/utils */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/utils.js");
8672
- const base_1 = __webpack_require__(/*! @scure/base */ "../../node_modules/@scure/base/lib/index.js");
8673
- // Japanese wordlist
8674
- const isJapanese = (wordlist) => wordlist[0] === '\u3042\u3044\u3053\u304f\u3057\u3093';
8675
- // Normalization replaces equivalent sequences of characters
8676
- // so that any two texts that are equivalent will be reduced
8677
- // to the same sequence of code points, called the normal form of the original text.
8678
- // https://tonsky.me/blog/unicode/#why-is-a----
8679
- function nfkd(str) {
8680
- if (typeof str !== 'string')
8681
- throw new TypeError('invalid mnemonic type: ' + typeof str);
8682
- return str.normalize('NFKD');
8683
- }
8684
- function normalize(str) {
8685
- const norm = nfkd(str);
8686
- const words = norm.split(' ');
8687
- if (![12, 15, 18, 21, 24].includes(words.length))
8688
- throw new Error('Invalid mnemonic');
8689
- return { nfkd: norm, words };
8690
- }
8691
- function aentropy(ent) {
8692
- (0, _assert_1.abytes)(ent, 16, 20, 24, 28, 32);
8693
- }
8694
- /**
8695
- * Generate x random words. Uses Cryptographically-Secure Random Number Generator.
8696
- * @param wordlist imported wordlist for specific language
8697
- * @param strength mnemonic strength 128-256 bits
8698
- * @example
8699
- * generateMnemonic(wordlist, 128)
8700
- * // 'legal winner thank year wave sausage worth useful legal winner thank yellow'
8701
- */
8702
- function generateMnemonic(wordlist, strength = 128) {
8703
- (0, _assert_1.anumber)(strength);
8704
- if (strength % 32 !== 0 || strength > 256)
8705
- throw new TypeError('Invalid entropy');
8706
- return entropyToMnemonic((0, utils_1.randomBytes)(strength / 8), wordlist);
8707
- }
8708
- const calcChecksum = (entropy) => {
8709
- // Checksum is ent.length/4 bits long
8710
- const bitsLeft = 8 - entropy.length / 4;
8711
- // Zero rightmost "bitsLeft" bits in byte
8712
- // For example: bitsLeft=4 val=10111101 -> 10110000
8713
- return new Uint8Array([((0, sha256_1.sha256)(entropy)[0] >> bitsLeft) << bitsLeft]);
8714
- };
8715
- function getCoder(wordlist) {
8716
- if (!Array.isArray(wordlist) || wordlist.length !== 2048 || typeof wordlist[0] !== 'string')
8717
- throw new Error('Wordlist: expected array of 2048 strings');
8718
- wordlist.forEach((i) => {
8719
- if (typeof i !== 'string')
8720
- throw new Error('wordlist: non-string element: ' + i);
8721
- });
8722
- return base_1.utils.chain(base_1.utils.checksum(1, calcChecksum), base_1.utils.radix2(11, true), base_1.utils.alphabet(wordlist));
8723
- }
8724
- /**
8725
- * Reversible: Converts mnemonic string to raw entropy in form of byte array.
8726
- * @param mnemonic 12-24 words
8727
- * @param wordlist imported wordlist for specific language
8728
- * @example
8729
- * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
8730
- * mnemonicToEntropy(mnem, wordlist)
8731
- * // Produces
8732
- * new Uint8Array([
8733
- * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
8734
- * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f
8735
- * ])
8736
- */
8737
- function mnemonicToEntropy(mnemonic, wordlist) {
8738
- const { words } = normalize(mnemonic);
8739
- const entropy = getCoder(wordlist).decode(words);
8740
- aentropy(entropy);
8741
- return entropy;
8742
- }
8743
- /**
8744
- * Reversible: Converts raw entropy in form of byte array to mnemonic string.
8745
- * @param entropy byte array
8746
- * @param wordlist imported wordlist for specific language
8747
- * @returns 12-24 words
8748
- * @example
8749
- * const ent = new Uint8Array([
8750
- * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
8751
- * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f
8752
- * ]);
8753
- * entropyToMnemonic(ent, wordlist);
8754
- * // 'legal winner thank year wave sausage worth useful legal winner thank yellow'
8755
- */
8756
- function entropyToMnemonic(entropy, wordlist) {
8757
- aentropy(entropy);
8758
- const words = getCoder(wordlist).encode(entropy);
8759
- return words.join(isJapanese(wordlist) ? '\u3000' : ' ');
8760
- }
8761
- /**
8762
- * Validates mnemonic for being 12-24 words contained in `wordlist`.
8763
- */
8764
- function validateMnemonic(mnemonic, wordlist) {
8765
- try {
8766
- mnemonicToEntropy(mnemonic, wordlist);
8767
- }
8768
- catch (e) {
8769
- return false;
8770
- }
8771
- return true;
8772
- }
8773
- const psalt = (passphrase) => nfkd('mnemonic' + passphrase);
8774
- /**
8775
- * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
8776
- * @param mnemonic 12-24 words
8777
- * @param passphrase string that will additionally protect the key
8778
- * @returns 64 bytes of key data
8779
- * @example
8780
- * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
8781
- * await mnemonicToSeed(mnem, 'password');
8782
- * // new Uint8Array([...64 bytes])
8783
- */
8784
- function mnemonicToSeed(mnemonic, passphrase = '') {
8785
- return (0, pbkdf2_1.pbkdf2Async)(sha512_1.sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 });
8786
- }
8787
- /**
8788
- * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
8789
- * @param mnemonic 12-24 words
8790
- * @param passphrase string that will additionally protect the key
8791
- * @returns 64 bytes of key data
8792
- * @example
8793
- * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
8794
- * mnemonicToSeedSync(mnem, 'password');
8795
- * // new Uint8Array([...64 bytes])
8796
- */
8797
- function mnemonicToSeedSync(mnemonic, passphrase = '') {
8798
- return (0, pbkdf2_1.pbkdf2)(sha512_1.sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 });
8799
- }
8800
-
8801
-
8802
- /***/ }),
8803
-
8804
- /***/ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/_assert.js":
8805
- /*!*****************************************************************************!*\
8806
- !*** ../../node_modules/@scure/bip39/node_modules/@noble/hashes/_assert.js ***!
8807
- \*****************************************************************************/
8808
- /***/ ((__unused_webpack_module, exports) => {
8809
-
8810
- "use strict";
8811
-
8812
- /**
8813
- * Internal assertion helpers.
8814
- * @module
8815
- */
8816
- Object.defineProperty(exports, "__esModule", ({ value: true }));
8817
- exports.anumber = anumber;
8818
- exports.abytes = abytes;
8819
- exports.ahash = ahash;
8820
- exports.aexists = aexists;
8821
- exports.aoutput = aoutput;
8822
- /** Asserts something is positive integer. */
8823
- function anumber(n) {
8824
- if (!Number.isSafeInteger(n) || n < 0)
8825
- throw new Error('positive integer expected, got ' + n);
8826
- }
8827
- /** Is number an Uint8Array? Copied from utils for perf. */
8828
- function isBytes(a) {
8829
- return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');
8830
- }
8831
- /** Asserts something is Uint8Array. */
8832
- function abytes(b, ...lengths) {
8833
- if (!isBytes(b))
8834
- throw new Error('Uint8Array expected');
8835
- if (lengths.length > 0 && !lengths.includes(b.length))
8836
- throw new Error('Uint8Array expected of length ' + lengths + ', got length=' + b.length);
8837
- }
8838
- /** Asserts something is hash */
8839
- function ahash(h) {
8840
- if (typeof h !== 'function' || typeof h.create !== 'function')
8841
- throw new Error('Hash should be wrapped by utils.wrapConstructor');
8842
- anumber(h.outputLen);
8843
- anumber(h.blockLen);
8844
- }
8845
- /** Asserts a hash instance has not been destroyed / finished */
8846
- function aexists(instance, checkFinished = true) {
8847
- if (instance.destroyed)
8848
- throw new Error('Hash instance has been destroyed');
8849
- if (checkFinished && instance.finished)
8850
- throw new Error('Hash#digest() has already been called');
8851
- }
8852
- /** Asserts output is properly-sized byte array */
8853
- function aoutput(out, instance) {
8854
- abytes(out);
8855
- const min = instance.outputLen;
8856
- if (out.length < min) {
8857
- throw new Error('digestInto() expects output buffer of length at least ' + min);
8858
- }
8859
- }
8860
-
8861
-
8862
- /***/ }),
8863
-
8864
- /***/ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/_md.js":
8865
- /*!*************************************************************************!*\
8866
- !*** ../../node_modules/@scure/bip39/node_modules/@noble/hashes/_md.js ***!
8867
- \*************************************************************************/
8868
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8869
-
8870
- "use strict";
8871
-
8872
- Object.defineProperty(exports, "__esModule", ({ value: true }));
8873
- exports.HashMD = void 0;
8874
- exports.setBigUint64 = setBigUint64;
8875
- exports.Chi = Chi;
8876
- exports.Maj = Maj;
8877
- /**
8878
- * Internal Merkle-Damgard hash utils.
8879
- * @module
8880
- */
8881
- const _assert_ts_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/_assert.js");
8882
- const utils_ts_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/utils.js");
8883
- /** Polyfill for Safari 14. https://caniuse.com/mdn-javascript_builtins_dataview_setbiguint64 */
8884
- function setBigUint64(view, byteOffset, value, isLE) {
8885
- if (typeof view.setBigUint64 === 'function')
8886
- return view.setBigUint64(byteOffset, value, isLE);
8887
- const _32n = BigInt(32);
8888
- const _u32_max = BigInt(0xffffffff);
8889
- const wh = Number((value >> _32n) & _u32_max);
8890
- const wl = Number(value & _u32_max);
8891
- const h = isLE ? 4 : 0;
8892
- const l = isLE ? 0 : 4;
8893
- view.setUint32(byteOffset + h, wh, isLE);
8894
- view.setUint32(byteOffset + l, wl, isLE);
8895
- }
8896
- /** Choice: a ? b : c */
8897
- function Chi(a, b, c) {
8898
- return (a & b) ^ (~a & c);
8899
- }
8900
- /** Majority function, true if any two inputs is true. */
8901
- function Maj(a, b, c) {
8902
- return (a & b) ^ (a & c) ^ (b & c);
8903
- }
8904
- /**
8905
- * Merkle-Damgard hash construction base class.
8906
- * Could be used to create MD5, RIPEMD, SHA1, SHA2.
8907
- */
8908
- class HashMD extends utils_ts_1.Hash {
8909
- constructor(blockLen, outputLen, padOffset, isLE) {
8910
- super();
8911
- this.finished = false;
8912
- this.length = 0;
8913
- this.pos = 0;
8914
- this.destroyed = false;
8915
- this.blockLen = blockLen;
8916
- this.outputLen = outputLen;
8917
- this.padOffset = padOffset;
8918
- this.isLE = isLE;
8919
- this.buffer = new Uint8Array(blockLen);
8920
- this.view = (0, utils_ts_1.createView)(this.buffer);
8921
- }
8922
- update(data) {
8923
- (0, _assert_ts_1.aexists)(this);
8924
- const { view, buffer, blockLen } = this;
8925
- data = (0, utils_ts_1.toBytes)(data);
8926
- const len = data.length;
8927
- for (let pos = 0; pos < len;) {
8928
- const take = Math.min(blockLen - this.pos, len - pos);
8929
- // Fast path: we have at least one block in input, cast it to view and process
8930
- if (take === blockLen) {
8931
- const dataView = (0, utils_ts_1.createView)(data);
8932
- for (; blockLen <= len - pos; pos += blockLen)
8933
- this.process(dataView, pos);
8934
- continue;
8935
- }
8936
- buffer.set(data.subarray(pos, pos + take), this.pos);
8937
- this.pos += take;
8938
- pos += take;
8939
- if (this.pos === blockLen) {
8940
- this.process(view, 0);
8941
- this.pos = 0;
8942
- }
8943
- }
8944
- this.length += data.length;
8945
- this.roundClean();
8946
- return this;
8947
- }
8948
- digestInto(out) {
8949
- (0, _assert_ts_1.aexists)(this);
8950
- (0, _assert_ts_1.aoutput)(out, this);
8951
- this.finished = true;
8952
- // Padding
8953
- // We can avoid allocation of buffer for padding completely if it
8954
- // was previously not allocated here. But it won't change performance.
8955
- const { buffer, view, blockLen, isLE } = this;
8956
- let { pos } = this;
8957
- // append the bit '1' to the message
8958
- buffer[pos++] = 0b10000000;
8959
- this.buffer.subarray(pos).fill(0);
8960
- // we have less than padOffset left in buffer, so we cannot put length in
8961
- // current block, need process it and pad again
8962
- if (this.padOffset > blockLen - pos) {
8963
- this.process(view, 0);
8964
- pos = 0;
8965
- }
8966
- // Pad until full block byte with zeros
8967
- for (let i = pos; i < blockLen; i++)
8968
- buffer[i] = 0;
8969
- // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that
8970
- // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.
8971
- // So we just write lowest 64 bits of that value.
8972
- setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);
8973
- this.process(view, 0);
8974
- const oview = (0, utils_ts_1.createView)(out);
8975
- const len = this.outputLen;
8976
- // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT
8977
- if (len % 4)
8978
- throw new Error('_sha2: outputLen should be aligned to 32bit');
8979
- const outLen = len / 4;
8980
- const state = this.get();
8981
- if (outLen > state.length)
8982
- throw new Error('_sha2: outputLen bigger than state');
8983
- for (let i = 0; i < outLen; i++)
8984
- oview.setUint32(4 * i, state[i], isLE);
8985
- }
8986
- digest() {
8987
- const { buffer, outputLen } = this;
8988
- this.digestInto(buffer);
8989
- const res = buffer.slice(0, outputLen);
8990
- this.destroy();
8991
- return res;
8992
- }
8993
- _cloneInto(to) {
8994
- to || (to = new this.constructor());
8995
- to.set(...this.get());
8996
- const { blockLen, buffer, length, finished, destroyed, pos } = this;
8997
- to.length = length;
8998
- to.pos = pos;
8999
- to.finished = finished;
9000
- to.destroyed = destroyed;
9001
- if (length % blockLen)
9002
- to.buffer.set(buffer);
9003
- return to;
9004
- }
9005
- }
9006
- exports.HashMD = HashMD;
9007
-
9008
-
9009
- /***/ }),
9010
-
9011
- /***/ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/_u64.js":
9012
- /*!**************************************************************************!*\
9013
- !*** ../../node_modules/@scure/bip39/node_modules/@noble/hashes/_u64.js ***!
9014
- \**************************************************************************/
9015
- /***/ ((__unused_webpack_module, exports) => {
9016
-
9017
- "use strict";
9018
-
9019
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9020
- exports.add5L = exports.add5H = exports.add4H = exports.add4L = exports.add3H = exports.add3L = exports.rotlBL = exports.rotlBH = exports.rotlSL = exports.rotlSH = exports.rotr32L = exports.rotr32H = exports.rotrBL = exports.rotrBH = exports.rotrSL = exports.rotrSH = exports.shrSL = exports.shrSH = exports.toBig = void 0;
9021
- exports.fromBig = fromBig;
9022
- exports.split = split;
9023
- exports.add = add;
9024
- /**
9025
- * Internal helpers for u64. BigUint64Array is too slow as per 2025, so we implement it using Uint32Array.
9026
- * @todo re-check https://issues.chromium.org/issues/42212588
9027
- * @module
9028
- */
9029
- const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
9030
- const _32n = /* @__PURE__ */ BigInt(32);
9031
- function fromBig(n, le = false) {
9032
- if (le)
9033
- return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };
9034
- return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
9035
- }
9036
- function split(lst, le = false) {
9037
- let Ah = new Uint32Array(lst.length);
9038
- let Al = new Uint32Array(lst.length);
9039
- for (let i = 0; i < lst.length; i++) {
9040
- const { h, l } = fromBig(lst[i], le);
9041
- [Ah[i], Al[i]] = [h, l];
9042
- }
9043
- return [Ah, Al];
9044
- }
9045
- const toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);
9046
- exports.toBig = toBig;
9047
- // for Shift in [0, 32)
9048
- const shrSH = (h, _l, s) => h >>> s;
9049
- exports.shrSH = shrSH;
9050
- const shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);
9051
- exports.shrSL = shrSL;
9052
- // Right rotate for Shift in [1, 32)
9053
- const rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));
9054
- exports.rotrSH = rotrSH;
9055
- const rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);
9056
- exports.rotrSL = rotrSL;
9057
- // Right rotate for Shift in (32, 64), NOTE: 32 is special case.
9058
- const rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));
9059
- exports.rotrBH = rotrBH;
9060
- const rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));
9061
- exports.rotrBL = rotrBL;
9062
- // Right rotate for shift===32 (just swaps l&h)
9063
- const rotr32H = (_h, l) => l;
9064
- exports.rotr32H = rotr32H;
9065
- const rotr32L = (h, _l) => h;
9066
- exports.rotr32L = rotr32L;
9067
- // Left rotate for Shift in [1, 32)
9068
- const rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));
9069
- exports.rotlSH = rotlSH;
9070
- const rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));
9071
- exports.rotlSL = rotlSL;
9072
- // Left rotate for Shift in (32, 64), NOTE: 32 is special case.
9073
- const rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));
9074
- exports.rotlBH = rotlBH;
9075
- const rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));
9076
- exports.rotlBL = rotlBL;
9077
- // JS uses 32-bit signed integers for bitwise operations which means we cannot
9078
- // simple take carry out of low bit sum by shift, we need to use division.
9079
- function add(Ah, Al, Bh, Bl) {
9080
- const l = (Al >>> 0) + (Bl >>> 0);
9081
- return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };
9082
- }
9083
- // Addition with more than 2 elements
9084
- const add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
9085
- exports.add3L = add3L;
9086
- const add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;
9087
- exports.add3H = add3H;
9088
- const add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
9089
- exports.add4L = add4L;
9090
- const add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;
9091
- exports.add4H = add4H;
9092
- const add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
9093
- exports.add5L = add5L;
9094
- const add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;
9095
- exports.add5H = add5H;
9096
- // prettier-ignore
9097
- const u64 = {
9098
- fromBig, split, toBig,
9099
- shrSH, shrSL,
9100
- rotrSH, rotrSL, rotrBH, rotrBL,
9101
- rotr32H, rotr32L,
9102
- rotlSH, rotlSL, rotlBH, rotlBL,
9103
- add, add3L, add3H, add4L, add4H, add5H, add5L,
9104
- };
9105
- exports["default"] = u64;
9106
-
9107
-
9108
- /***/ }),
9109
-
9110
- /***/ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/crypto.js":
9111
- /*!****************************************************************************!*\
9112
- !*** ../../node_modules/@scure/bip39/node_modules/@noble/hashes/crypto.js ***!
9113
- \****************************************************************************/
9114
- /***/ ((__unused_webpack_module, exports) => {
9115
-
9116
- "use strict";
9117
-
9118
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9119
- exports.crypto = void 0;
9120
- exports.crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;
9121
-
9122
-
9123
- /***/ }),
9124
-
9125
- /***/ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/hmac.js":
9126
- /*!**************************************************************************!*\
9127
- !*** ../../node_modules/@scure/bip39/node_modules/@noble/hashes/hmac.js ***!
9128
- \**************************************************************************/
9129
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9130
-
9131
- "use strict";
9132
-
9133
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9134
- exports.hmac = exports.HMAC = void 0;
9135
- /**
9136
- * HMAC: RFC2104 message authentication code.
9137
- * @module
9138
- */
9139
- const _assert_ts_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/_assert.js");
9140
- const utils_ts_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/utils.js");
9141
- class HMAC extends utils_ts_1.Hash {
9142
- constructor(hash, _key) {
9143
- super();
9144
- this.finished = false;
9145
- this.destroyed = false;
9146
- (0, _assert_ts_1.ahash)(hash);
9147
- const key = (0, utils_ts_1.toBytes)(_key);
9148
- this.iHash = hash.create();
9149
- if (typeof this.iHash.update !== 'function')
9150
- throw new Error('Expected instance of class which extends utils.Hash');
9151
- this.blockLen = this.iHash.blockLen;
9152
- this.outputLen = this.iHash.outputLen;
9153
- const blockLen = this.blockLen;
9154
- const pad = new Uint8Array(blockLen);
9155
- // blockLen can be bigger than outputLen
9156
- pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);
9157
- for (let i = 0; i < pad.length; i++)
9158
- pad[i] ^= 0x36;
9159
- this.iHash.update(pad);
9160
- // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone
9161
- this.oHash = hash.create();
9162
- // Undo internal XOR && apply outer XOR
9163
- for (let i = 0; i < pad.length; i++)
9164
- pad[i] ^= 0x36 ^ 0x5c;
9165
- this.oHash.update(pad);
9166
- pad.fill(0);
9167
- }
9168
- update(buf) {
9169
- (0, _assert_ts_1.aexists)(this);
9170
- this.iHash.update(buf);
9171
- return this;
9172
- }
9173
- digestInto(out) {
9174
- (0, _assert_ts_1.aexists)(this);
9175
- (0, _assert_ts_1.abytes)(out, this.outputLen);
9176
- this.finished = true;
9177
- this.iHash.digestInto(out);
9178
- this.oHash.update(out);
9179
- this.oHash.digestInto(out);
9180
- this.destroy();
9181
- }
9182
- digest() {
9183
- const out = new Uint8Array(this.oHash.outputLen);
9184
- this.digestInto(out);
9185
- return out;
9186
- }
9187
- _cloneInto(to) {
9188
- // Create new instance without calling constructor since key already in state and we don't know it.
9189
- to || (to = Object.create(Object.getPrototypeOf(this), {}));
9190
- const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;
9191
- to = to;
9192
- to.finished = finished;
9193
- to.destroyed = destroyed;
9194
- to.blockLen = blockLen;
9195
- to.outputLen = outputLen;
9196
- to.oHash = oHash._cloneInto(to.oHash);
9197
- to.iHash = iHash._cloneInto(to.iHash);
9198
- return to;
9199
- }
9200
- destroy() {
9201
- this.destroyed = true;
9202
- this.oHash.destroy();
9203
- this.iHash.destroy();
9204
- }
9205
- }
9206
- exports.HMAC = HMAC;
9207
- /**
9208
- * HMAC: RFC2104 message authentication code.
9209
- * @param hash - function that would be used e.g. sha256
9210
- * @param key - message key
9211
- * @param message - message data
9212
- * @example
9213
- * import { hmac } from '@noble/hashes/hmac';
9214
- * import { sha256 } from '@noble/hashes/sha2';
9215
- * const mac1 = hmac(sha256, 'key', 'message');
9216
- */
9217
- const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();
9218
- exports.hmac = hmac;
9219
- exports.hmac.create = (hash, key) => new HMAC(hash, key);
9220
-
9221
-
9222
- /***/ }),
9223
-
9224
- /***/ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/pbkdf2.js":
9225
- /*!****************************************************************************!*\
9226
- !*** ../../node_modules/@scure/bip39/node_modules/@noble/hashes/pbkdf2.js ***!
9227
- \****************************************************************************/
9228
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9229
-
9230
- "use strict";
9231
-
9232
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9233
- exports.pbkdf2 = pbkdf2;
9234
- exports.pbkdf2Async = pbkdf2Async;
9235
- /**
9236
- * PBKDF (RFC 2898). Can be used to create a key from password and salt.
9237
- * @module
9238
- */
9239
- const _assert_ts_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/_assert.js");
9240
- const hmac_ts_1 = __webpack_require__(/*! ./hmac.js */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/hmac.js");
9241
- const utils_ts_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/utils.js");
9242
- // Common prologue and epilogue for sync/async functions
9243
- function pbkdf2Init(hash, _password, _salt, _opts) {
9244
- (0, _assert_ts_1.ahash)(hash);
9245
- const opts = (0, utils_ts_1.checkOpts)({ dkLen: 32, asyncTick: 10 }, _opts);
9246
- const { c, dkLen, asyncTick } = opts;
9247
- (0, _assert_ts_1.anumber)(c);
9248
- (0, _assert_ts_1.anumber)(dkLen);
9249
- (0, _assert_ts_1.anumber)(asyncTick);
9250
- if (c < 1)
9251
- throw new Error('PBKDF2: iterations (c) should be >= 1');
9252
- const password = (0, utils_ts_1.toBytes)(_password);
9253
- const salt = (0, utils_ts_1.toBytes)(_salt);
9254
- // DK = PBKDF2(PRF, Password, Salt, c, dkLen);
9255
- const DK = new Uint8Array(dkLen);
9256
- // U1 = PRF(Password, Salt + INT_32_BE(i))
9257
- const PRF = hmac_ts_1.hmac.create(hash, password);
9258
- const PRFSalt = PRF._cloneInto().update(salt);
9259
- return { c, dkLen, asyncTick, DK, PRF, PRFSalt };
9260
- }
9261
- function pbkdf2Output(PRF, PRFSalt, DK, prfW, u) {
9262
- PRF.destroy();
9263
- PRFSalt.destroy();
9264
- if (prfW)
9265
- prfW.destroy();
9266
- u.fill(0);
9267
- return DK;
9268
- }
9269
- /**
9270
- * PBKDF2-HMAC: RFC 2898 key derivation function
9271
- * @param hash - hash function that would be used e.g. sha256
9272
- * @param password - password from which a derived key is generated
9273
- * @param salt - cryptographic salt
9274
- * @param opts - {c, dkLen} where c is work factor and dkLen is output message size
9275
- * @example
9276
- * const key = pbkdf2(sha256, 'password', 'salt', { dkLen: 32, c: 2 ** 18 });
9277
- */
9278
- function pbkdf2(hash, password, salt, opts) {
9279
- const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
9280
- let prfW; // Working copy
9281
- const arr = new Uint8Array(4);
9282
- const view = (0, utils_ts_1.createView)(arr);
9283
- const u = new Uint8Array(PRF.outputLen);
9284
- // DK = T1 + T2 + ⋯ + Tdklen/hlen
9285
- for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {
9286
- // Ti = F(Password, Salt, c, i)
9287
- const Ti = DK.subarray(pos, pos + PRF.outputLen);
9288
- view.setInt32(0, ti, false);
9289
- // F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc
9290
- // U1 = PRF(Password, Salt + INT_32_BE(i))
9291
- (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);
9292
- Ti.set(u.subarray(0, Ti.length));
9293
- for (let ui = 1; ui < c; ui++) {
9294
- // Uc = PRF(Password, Uc−1)
9295
- PRF._cloneInto(prfW).update(u).digestInto(u);
9296
- for (let i = 0; i < Ti.length; i++)
9297
- Ti[i] ^= u[i];
9298
- }
9299
- }
9300
- return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
9301
- }
9302
- /**
9303
- * PBKDF2-HMAC: RFC 2898 key derivation function. Async version.
9304
- * @example
9305
- * await pbkdf2Async(sha256, 'password', 'salt', { dkLen: 32, c: 500_000 });
9306
- */
9307
- async function pbkdf2Async(hash, password, salt, opts) {
9308
- const { c, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
9309
- let prfW; // Working copy
9310
- const arr = new Uint8Array(4);
9311
- const view = (0, utils_ts_1.createView)(arr);
9312
- const u = new Uint8Array(PRF.outputLen);
9313
- // DK = T1 + T2 + ⋯ + Tdklen/hlen
9314
- for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {
9315
- // Ti = F(Password, Salt, c, i)
9316
- const Ti = DK.subarray(pos, pos + PRF.outputLen);
9317
- view.setInt32(0, ti, false);
9318
- // F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc
9319
- // U1 = PRF(Password, Salt + INT_32_BE(i))
9320
- (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);
9321
- Ti.set(u.subarray(0, Ti.length));
9322
- await (0, utils_ts_1.asyncLoop)(c - 1, asyncTick, () => {
9323
- // Uc = PRF(Password, Uc−1)
9324
- PRF._cloneInto(prfW).update(u).digestInto(u);
9325
- for (let i = 0; i < Ti.length; i++)
9326
- Ti[i] ^= u[i];
9327
- });
9328
- }
9329
- return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
9330
- }
9331
-
9332
-
9333
- /***/ }),
9334
-
9335
- /***/ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/sha256.js":
9336
- /*!****************************************************************************!*\
9337
- !*** ../../node_modules/@scure/bip39/node_modules/@noble/hashes/sha256.js ***!
9338
- \****************************************************************************/
9339
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9340
-
9341
- "use strict";
9342
-
9343
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9344
- exports.sha224 = exports.sha256 = exports.SHA256 = void 0;
9345
- /**
9346
- * SHA2-256 a.k.a. sha256. In JS, it is the fastest hash, even faster than Blake3.
9347
- *
9348
- * To break sha256 using birthday attack, attackers need to try 2^128 hashes.
9349
- * BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per 2025.
9350
- *
9351
- * Check out [FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf).
9352
- * @module
9353
- */
9354
- const _md_ts_1 = __webpack_require__(/*! ./_md.js */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/_md.js");
9355
- const utils_ts_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/utils.js");
9356
- /** Round constants: first 32 bits of fractional parts of the cube roots of the first 64 primes 2..311). */
9357
- // prettier-ignore
9358
- const SHA256_K = /* @__PURE__ */ new Uint32Array([
9359
- 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
9360
- 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
9361
- 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
9362
- 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
9363
- 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
9364
- 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
9365
- 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
9366
- 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
9367
- ]);
9368
- /** Initial state: first 32 bits of fractional parts of the square roots of the first 8 primes 2..19. */
9369
- // prettier-ignore
9370
- const SHA256_IV = /* @__PURE__ */ new Uint32Array([
9371
- 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
9372
- ]);
9373
- /**
9374
- * Temporary buffer, not used to store anything between runs.
9375
- * Named this way because it matches specification.
9376
- */
9377
- const SHA256_W = /* @__PURE__ */ new Uint32Array(64);
9378
- class SHA256 extends _md_ts_1.HashMD {
9379
- constructor(outputLen = 32) {
9380
- super(64, outputLen, 8, false);
9381
- // We cannot use array here since array allows indexing by variable
9382
- // which means optimizer/compiler cannot use registers.
9383
- this.A = SHA256_IV[0] | 0;
9384
- this.B = SHA256_IV[1] | 0;
9385
- this.C = SHA256_IV[2] | 0;
9386
- this.D = SHA256_IV[3] | 0;
9387
- this.E = SHA256_IV[4] | 0;
9388
- this.F = SHA256_IV[5] | 0;
9389
- this.G = SHA256_IV[6] | 0;
9390
- this.H = SHA256_IV[7] | 0;
9391
- }
9392
- get() {
9393
- const { A, B, C, D, E, F, G, H } = this;
9394
- return [A, B, C, D, E, F, G, H];
9395
- }
9396
- // prettier-ignore
9397
- set(A, B, C, D, E, F, G, H) {
9398
- this.A = A | 0;
9399
- this.B = B | 0;
9400
- this.C = C | 0;
9401
- this.D = D | 0;
9402
- this.E = E | 0;
9403
- this.F = F | 0;
9404
- this.G = G | 0;
9405
- this.H = H | 0;
9406
- }
9407
- process(view, offset) {
9408
- // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array
9409
- for (let i = 0; i < 16; i++, offset += 4)
9410
- SHA256_W[i] = view.getUint32(offset, false);
9411
- for (let i = 16; i < 64; i++) {
9412
- const W15 = SHA256_W[i - 15];
9413
- const W2 = SHA256_W[i - 2];
9414
- const s0 = (0, utils_ts_1.rotr)(W15, 7) ^ (0, utils_ts_1.rotr)(W15, 18) ^ (W15 >>> 3);
9415
- const s1 = (0, utils_ts_1.rotr)(W2, 17) ^ (0, utils_ts_1.rotr)(W2, 19) ^ (W2 >>> 10);
9416
- SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;
9417
- }
9418
- // Compression function main loop, 64 rounds
9419
- let { A, B, C, D, E, F, G, H } = this;
9420
- for (let i = 0; i < 64; i++) {
9421
- const sigma1 = (0, utils_ts_1.rotr)(E, 6) ^ (0, utils_ts_1.rotr)(E, 11) ^ (0, utils_ts_1.rotr)(E, 25);
9422
- const T1 = (H + sigma1 + (0, _md_ts_1.Chi)(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
9423
- const sigma0 = (0, utils_ts_1.rotr)(A, 2) ^ (0, utils_ts_1.rotr)(A, 13) ^ (0, utils_ts_1.rotr)(A, 22);
9424
- const T2 = (sigma0 + (0, _md_ts_1.Maj)(A, B, C)) | 0;
9425
- H = G;
9426
- G = F;
9427
- F = E;
9428
- E = (D + T1) | 0;
9429
- D = C;
9430
- C = B;
9431
- B = A;
9432
- A = (T1 + T2) | 0;
9433
- }
9434
- // Add the compressed chunk to the current hash value
9435
- A = (A + this.A) | 0;
9436
- B = (B + this.B) | 0;
9437
- C = (C + this.C) | 0;
9438
- D = (D + this.D) | 0;
9439
- E = (E + this.E) | 0;
9440
- F = (F + this.F) | 0;
9441
- G = (G + this.G) | 0;
9442
- H = (H + this.H) | 0;
9443
- this.set(A, B, C, D, E, F, G, H);
9444
- }
9445
- roundClean() {
9446
- SHA256_W.fill(0);
9447
- }
9448
- destroy() {
9449
- this.set(0, 0, 0, 0, 0, 0, 0, 0);
9450
- this.buffer.fill(0);
9451
- }
9452
- }
9453
- exports.SHA256 = SHA256;
9454
- /**
9455
- * Constants taken from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf.
9456
- */
9457
- class SHA224 extends SHA256 {
9458
- constructor() {
9459
- super(28);
9460
- this.A = 0xc1059ed8 | 0;
9461
- this.B = 0x367cd507 | 0;
9462
- this.C = 0x3070dd17 | 0;
9463
- this.D = 0xf70e5939 | 0;
9464
- this.E = 0xffc00b31 | 0;
9465
- this.F = 0x68581511 | 0;
9466
- this.G = 0x64f98fa7 | 0;
9467
- this.H = 0xbefa4fa4 | 0;
9468
- }
9469
- }
9470
- /** SHA2-256 hash function */
9471
- exports.sha256 = (0, utils_ts_1.wrapConstructor)(() => new SHA256());
9472
- /** SHA2-224 hash function */
9473
- exports.sha224 = (0, utils_ts_1.wrapConstructor)(() => new SHA224());
9474
-
9475
-
9476
- /***/ }),
9477
-
9478
- /***/ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/sha512.js":
9479
- /*!****************************************************************************!*\
9480
- !*** ../../node_modules/@scure/bip39/node_modules/@noble/hashes/sha512.js ***!
9481
- \****************************************************************************/
9482
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9483
-
9484
- "use strict";
9485
-
9486
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9487
- exports.sha384 = exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.SHA384 = exports.SHA512_256 = exports.SHA512_224 = exports.SHA512 = void 0;
9488
- /**
9489
- * SHA2-512 a.k.a. sha512 and sha384. It is slower than sha256 in js because u64 operations are slow.
9490
- *
9491
- * Check out [RFC 4634](https://datatracker.ietf.org/doc/html/rfc4634) and
9492
- * [the paper on truncated SHA512/256](https://eprint.iacr.org/2010/548.pdf).
9493
- * @module
9494
- */
9495
- const _md_ts_1 = __webpack_require__(/*! ./_md.js */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/_md.js");
9496
- const _u64_ts_1 = __webpack_require__(/*! ./_u64.js */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/_u64.js");
9497
- const utils_ts_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/utils.js");
8508
+ const _u64_ts_1 = __webpack_require__(/*! ./_u64.js */ "../../node_modules/@scure/bip32/node_modules/@noble/hashes/_u64.js");
8509
+ const utils_ts_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@scure/bip32/node_modules/@noble/hashes/utils.js");
9498
8510
  // Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):
9499
8511
  // prettier-ignore
9500
8512
  const [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => _u64_ts_1.default.split([
@@ -9731,9 +8743,9 @@ exports.sha384 = (0, utils_ts_1.wrapConstructor)(() => new SHA384());
9731
8743
 
9732
8744
  /***/ }),
9733
8745
 
9734
- /***/ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/utils.js":
8746
+ /***/ "../../node_modules/@scure/bip32/node_modules/@noble/hashes/utils.js":
9735
8747
  /*!***************************************************************************!*\
9736
- !*** ../../node_modules/@scure/bip39/node_modules/@noble/hashes/utils.js ***!
8748
+ !*** ../../node_modules/@scure/bip32/node_modules/@noble/hashes/utils.js ***!
9737
8749
  \***************************************************************************/
9738
8750
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9739
8751
 
@@ -9771,8 +8783,8 @@ exports.randomBytes = randomBytes;
9771
8783
  // from `crypto` to `cryptoNode`, which imports native module.
9772
8784
  // Makes the utils un-importable in browsers without a bundler.
9773
8785
  // Once node.js 18 is deprecated (2025-04-30), we can just drop the import.
9774
- const crypto_1 = __webpack_require__(/*! @noble/hashes/crypto */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/crypto.js");
9775
- const _assert_ts_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@scure/bip39/node_modules/@noble/hashes/_assert.js");
8786
+ const crypto_1 = __webpack_require__(/*! @noble/hashes/crypto */ "../../node_modules/@scure/bip32/node_modules/@noble/hashes/crypto.js");
8787
+ const _assert_ts_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@scure/bip32/node_modules/@noble/hashes/_assert.js");
9776
8788
  // export { isBytes } from './_assert.ts';
9777
8789
  // We can't reuse isBytes from _assert, because somehow this causes huge perf issues
9778
8790
  function isBytes(a) {
@@ -9985,6 +8997,186 @@ function randomBytes(bytesLength = 32) {
9985
8997
  }
9986
8998
 
9987
8999
 
9000
+ /***/ }),
9001
+
9002
+ /***/ "../../node_modules/@scure/bip39/index.js":
9003
+ /*!************************************************!*\
9004
+ !*** ../../node_modules/@scure/bip39/index.js ***!
9005
+ \************************************************/
9006
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9007
+
9008
+ "use strict";
9009
+
9010
+ /**
9011
+ * Audited & minimal JS implementation of
9012
+ * [BIP39 mnemonic phrases](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki).
9013
+ * @module
9014
+ * @example
9015
+ ```js
9016
+ import * as bip39 from '@scure/bip39';
9017
+ import { wordlist } from '@scure/bip39/wordlists/english';
9018
+ const mn = bip39.generateMnemonic(wordlist);
9019
+ console.log(mn);
9020
+ const ent = bip39.mnemonicToEntropy(mn, wordlist)
9021
+ bip39.entropyToMnemonic(ent, wordlist);
9022
+ bip39.validateMnemonic(mn, wordlist);
9023
+ await bip39.mnemonicToSeed(mn, 'password');
9024
+ bip39.mnemonicToSeedSync(mn, 'password');
9025
+
9026
+ // Wordlists
9027
+ import { wordlist as czech } from '@scure/bip39/wordlists/czech';
9028
+ import { wordlist as english } from '@scure/bip39/wordlists/english';
9029
+ import { wordlist as french } from '@scure/bip39/wordlists/french';
9030
+ import { wordlist as italian } from '@scure/bip39/wordlists/italian';
9031
+ import { wordlist as japanese } from '@scure/bip39/wordlists/japanese';
9032
+ import { wordlist as korean } from '@scure/bip39/wordlists/korean';
9033
+ import { wordlist as portuguese } from '@scure/bip39/wordlists/portuguese';
9034
+ import { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese';
9035
+ import { wordlist as spanish } from '@scure/bip39/wordlists/spanish';
9036
+ import { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese';
9037
+ ```
9038
+ */
9039
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
9040
+ exports.generateMnemonic = generateMnemonic;
9041
+ exports.mnemonicToEntropy = mnemonicToEntropy;
9042
+ exports.entropyToMnemonic = entropyToMnemonic;
9043
+ exports.validateMnemonic = validateMnemonic;
9044
+ exports.mnemonicToSeed = mnemonicToSeed;
9045
+ exports.mnemonicToSeedSync = mnemonicToSeedSync;
9046
+ /*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */
9047
+ const pbkdf2_1 = __webpack_require__(/*! @noble/hashes/pbkdf2 */ "../../node_modules/@noble/hashes/pbkdf2.js");
9048
+ const sha2_1 = __webpack_require__(/*! @noble/hashes/sha2 */ "../../node_modules/@noble/hashes/sha2.js");
9049
+ const utils_1 = __webpack_require__(/*! @noble/hashes/utils */ "../../node_modules/@noble/hashes/utils.js");
9050
+ const base_1 = __webpack_require__(/*! @scure/base */ "../../node_modules/@scure/base/lib/index.js");
9051
+ // Japanese wordlist
9052
+ const isJapanese = (wordlist) => wordlist[0] === '\u3042\u3044\u3053\u304f\u3057\u3093';
9053
+ // Normalization replaces equivalent sequences of characters
9054
+ // so that any two texts that are equivalent will be reduced
9055
+ // to the same sequence of code points, called the normal form of the original text.
9056
+ // https://tonsky.me/blog/unicode/#why-is-a----
9057
+ function nfkd(str) {
9058
+ if (typeof str !== 'string')
9059
+ throw new TypeError('invalid mnemonic type: ' + typeof str);
9060
+ return str.normalize('NFKD');
9061
+ }
9062
+ function normalize(str) {
9063
+ const norm = nfkd(str);
9064
+ const words = norm.split(' ');
9065
+ if (![12, 15, 18, 21, 24].includes(words.length))
9066
+ throw new Error('Invalid mnemonic');
9067
+ return { nfkd: norm, words };
9068
+ }
9069
+ function aentropy(ent) {
9070
+ (0, utils_1.abytes)(ent, 16, 20, 24, 28, 32);
9071
+ }
9072
+ /**
9073
+ * Generate x random words. Uses Cryptographically-Secure Random Number Generator.
9074
+ * @param wordlist imported wordlist for specific language
9075
+ * @param strength mnemonic strength 128-256 bits
9076
+ * @example
9077
+ * generateMnemonic(wordlist, 128)
9078
+ * // 'legal winner thank year wave sausage worth useful legal winner thank yellow'
9079
+ */
9080
+ function generateMnemonic(wordlist, strength = 128) {
9081
+ (0, utils_1.anumber)(strength);
9082
+ if (strength % 32 !== 0 || strength > 256)
9083
+ throw new TypeError('Invalid entropy');
9084
+ return entropyToMnemonic((0, utils_1.randomBytes)(strength / 8), wordlist);
9085
+ }
9086
+ const calcChecksum = (entropy) => {
9087
+ // Checksum is ent.length/4 bits long
9088
+ const bitsLeft = 8 - entropy.length / 4;
9089
+ // Zero rightmost "bitsLeft" bits in byte
9090
+ // For example: bitsLeft=4 val=10111101 -> 10110000
9091
+ return new Uint8Array([((0, sha2_1.sha256)(entropy)[0] >> bitsLeft) << bitsLeft]);
9092
+ };
9093
+ function getCoder(wordlist) {
9094
+ if (!Array.isArray(wordlist) || wordlist.length !== 2048 || typeof wordlist[0] !== 'string')
9095
+ throw new Error('Wordlist: expected array of 2048 strings');
9096
+ wordlist.forEach((i) => {
9097
+ if (typeof i !== 'string')
9098
+ throw new Error('wordlist: non-string element: ' + i);
9099
+ });
9100
+ return base_1.utils.chain(base_1.utils.checksum(1, calcChecksum), base_1.utils.radix2(11, true), base_1.utils.alphabet(wordlist));
9101
+ }
9102
+ /**
9103
+ * Reversible: Converts mnemonic string to raw entropy in form of byte array.
9104
+ * @param mnemonic 12-24 words
9105
+ * @param wordlist imported wordlist for specific language
9106
+ * @example
9107
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
9108
+ * mnemonicToEntropy(mnem, wordlist)
9109
+ * // Produces
9110
+ * new Uint8Array([
9111
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
9112
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f
9113
+ * ])
9114
+ */
9115
+ function mnemonicToEntropy(mnemonic, wordlist) {
9116
+ const { words } = normalize(mnemonic);
9117
+ const entropy = getCoder(wordlist).decode(words);
9118
+ aentropy(entropy);
9119
+ return entropy;
9120
+ }
9121
+ /**
9122
+ * Reversible: Converts raw entropy in form of byte array to mnemonic string.
9123
+ * @param entropy byte array
9124
+ * @param wordlist imported wordlist for specific language
9125
+ * @returns 12-24 words
9126
+ * @example
9127
+ * const ent = new Uint8Array([
9128
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
9129
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f
9130
+ * ]);
9131
+ * entropyToMnemonic(ent, wordlist);
9132
+ * // 'legal winner thank year wave sausage worth useful legal winner thank yellow'
9133
+ */
9134
+ function entropyToMnemonic(entropy, wordlist) {
9135
+ aentropy(entropy);
9136
+ const words = getCoder(wordlist).encode(entropy);
9137
+ return words.join(isJapanese(wordlist) ? '\u3000' : ' ');
9138
+ }
9139
+ /**
9140
+ * Validates mnemonic for being 12-24 words contained in `wordlist`.
9141
+ */
9142
+ function validateMnemonic(mnemonic, wordlist) {
9143
+ try {
9144
+ mnemonicToEntropy(mnemonic, wordlist);
9145
+ }
9146
+ catch (e) {
9147
+ return false;
9148
+ }
9149
+ return true;
9150
+ }
9151
+ const psalt = (passphrase) => nfkd('mnemonic' + passphrase);
9152
+ /**
9153
+ * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
9154
+ * @param mnemonic 12-24 words
9155
+ * @param passphrase string that will additionally protect the key
9156
+ * @returns 64 bytes of key data
9157
+ * @example
9158
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
9159
+ * await mnemonicToSeed(mnem, 'password');
9160
+ * // new Uint8Array([...64 bytes])
9161
+ */
9162
+ function mnemonicToSeed(mnemonic, passphrase = '') {
9163
+ return (0, pbkdf2_1.pbkdf2Async)(sha2_1.sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 });
9164
+ }
9165
+ /**
9166
+ * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
9167
+ * @param mnemonic 12-24 words
9168
+ * @param passphrase string that will additionally protect the key
9169
+ * @returns 64 bytes of key data
9170
+ * @example
9171
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
9172
+ * mnemonicToSeedSync(mnem, 'password');
9173
+ * // new Uint8Array([...64 bytes])
9174
+ */
9175
+ function mnemonicToSeedSync(mnemonic, passphrase = '') {
9176
+ return (0, pbkdf2_1.pbkdf2)(sha2_1.sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 });
9177
+ }
9178
+
9179
+
9988
9180
  /***/ }),
9989
9181
 
9990
9182
  /***/ "../../node_modules/@scure/bip39/wordlists/english.js":
@@ -15481,7 +14673,8 @@ var __WEBPACK_AMD_DEFINE_RESULT__;;(function (globalObject) {
15481
14673
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
15482
14674
 
15483
14675
  // Node.js and other environments that support module.exports.
15484
- } else {}
14676
+ } else // removed by dead control flow
14677
+ {}
15485
14678
  })(this);
15486
14679
 
15487
14680
 
@@ -16554,7 +15747,7 @@ exports.DELEGATABLE_PERMISSIONS_WIDTH = 4; // UInt32
16554
15747
  /***/ ((module) => {
16555
15748
 
16556
15749
  "use strict";
16557
- module.exports = /*#__PURE__*/JSON.parse('{"FIELDS":[["Generic",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":0,"type":"Unknown"}],["Invalid",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":-1,"type":"Unknown"}],["ObjectEndMarker",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STObject"}],["ArrayEndMarker",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STArray"}],["taker_gets_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Amount"}],["taker_pays_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":259,"type":"Amount"}],["LedgerEntryType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt16"}],["TransactionType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt16"}],["SignerWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt16"}],["TransferFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt16"}],["TradingFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt16"}],["DiscountedFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt16"}],["Version",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt16"}],["HookStateChangeCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt16"}],["HookEmitCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt16"}],["HookExecutionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt16"}],["HookApiVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt16"}],["LedgerFixType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt16"}],["NetworkID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt32"}],["Flags",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt32"}],["SourceTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt32"}],["Sequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt32"}],["PreviousTxnLgrSeq",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt32"}],["LedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt32"}],["CloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt32"}],["ParentCloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt32"}],["SigningTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt32"}],["Expiration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt32"}],["TransferRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt32"}],["WalletSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt32"}],["OwnerCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt32"}],["DestinationTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"UInt32"}],["LastUpdateTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":15,"type":"UInt32"}],["HighQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt32"}],["HighQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt32"}],["LowQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt32"}],["LowQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt32"}],["QualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt32"}],["QualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt32"}],["StampEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt32"}],["BondAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt32"}],["LoadFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt32"}],["OfferSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt32"}],["FirstLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt32"}],["LastLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"UInt32"}],["TransactionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"UInt32"}],["OperationLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"UInt32"}],["ReferenceFeeUnits",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"UInt32"}],["ReserveBase",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"UInt32"}],["ReserveIncrement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"UInt32"}],["SetFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"UInt32"}],["ClearFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"UInt32"}],["SignerQuorum",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"UInt32"}],["CancelAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"UInt32"}],["FinishAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":37,"type":"UInt32"}],["SignerListID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":38,"type":"UInt32"}],["SettleDelay",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":39,"type":"UInt32"}],["TicketCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":40,"type":"UInt32"}],["TicketSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":41,"type":"UInt32"}],["NFTokenTaxon",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":42,"type":"UInt32"}],["MintedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":43,"type":"UInt32"}],["BurnedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":44,"type":"UInt32"}],["HookStateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":45,"type":"UInt32"}],["EmitGeneration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":46,"type":"UInt32"}],["VoteWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":48,"type":"UInt32"}],["FirstNFTokenSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":50,"type":"UInt32"}],["OracleDocumentID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":51,"type":"UInt32"}],["PermissionValue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":52,"type":"UInt32"}],["IndexNext",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt64"}],["IndexPrevious",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt64"}],["BookNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt64"}],["OwnerNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt64"}],["BaseFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt64"}],["ExchangeRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt64"}],["LowNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt64"}],["HighNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt64"}],["DestinationNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt64"}],["Cookie",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt64"}],["ServerVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt64"}],["NFTokenOfferNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt64"}],["EmitBurden",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt64"}],["HookOn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt64"}],["HookInstructionCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt64"}],["HookReturnCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt64"}],["ReferenceCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt64"}],["XChainClaimID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt64"}],["XChainAccountCreateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt64"}],["XChainAccountClaimCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt64"}],["AssetPrice",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt64"}],["MaximumAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt64"}],["OutstandingAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt64"}],["MPTAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt64"}],["IssuerNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"UInt64"}],["SubjectNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"UInt64"}],["LockedAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"UInt64"}],["EmailHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash128"}],["LedgerHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash256"}],["ParentHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash256"}],["TransactionHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash256"}],["AccountHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash256"}],["PreviousTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Hash256"}],["LedgerIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Hash256"}],["WalletLocator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Hash256"}],["RootIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Hash256"}],["AccountTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Hash256"}],["NFTokenID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Hash256"}],["EmitParentTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Hash256"}],["EmitNonce",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Hash256"}],["EmitHookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Hash256"}],["AMMID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"Hash256"}],["BookDirectory",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Hash256"}],["InvoiceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Hash256"}],["Nickname",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Hash256"}],["Amendment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Hash256"}],["Digest",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"Hash256"}],["Channel",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Hash256"}],["ConsensusHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Hash256"}],["CheckID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Hash256"}],["ValidatedHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Hash256"}],["PreviousPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Hash256"}],["NextPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Hash256"}],["NFTokenBuyOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Hash256"}],["NFTokenSellOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Hash256"}],["HookStateKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Hash256"}],["HookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Hash256"}],["HookNamespace",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"Hash256"}],["HookSetTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"Hash256"}],["DomainID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"Hash256"}],["VaultID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"Hash256"}],["ParentBatchID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"Hash256"}],["hash",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Hash256"}],["index",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Hash256"}],["Amount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Amount"}],["Balance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Amount"}],["LimitAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Amount"}],["TakerPays",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Amount"}],["TakerGets",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Amount"}],["LowLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Amount"}],["HighLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Amount"}],["Fee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Amount"}],["SendMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Amount"}],["DeliverMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Amount"}],["Amount2",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Amount"}],["BidMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Amount"}],["BidMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Amount"}],["MinimumOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Amount"}],["RippleEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Amount"}],["DeliveredAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Amount"}],["NFTokenBrokerFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Amount"}],["BaseFeeDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Amount"}],["ReserveBaseDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Amount"}],["ReserveIncrementDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Amount"}],["LPTokenOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Amount"}],["LPTokenIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Amount"}],["EPrice",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Amount"}],["Price",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Amount"}],["SignatureReward",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Amount"}],["MinAccountCreateAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Amount"}],["LPTokenBalance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Amount"}],["PublicKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Blob"}],["MessageKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Blob"}],["SigningPubKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Blob"}],["TxnSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":4,"type":"Blob"}],["URI",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Blob"}],["Signature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":6,"type":"Blob"}],["Domain",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":7,"type":"Blob"}],["FundCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"Blob"}],["RemoveCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"Blob"}],["ExpireCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"Blob"}],["CreateCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"Blob"}],["MemoType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":12,"type":"Blob"}],["MemoData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":13,"type":"Blob"}],["MemoFormat",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":14,"type":"Blob"}],["Fulfillment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"Blob"}],["Condition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":17,"type":"Blob"}],["MasterSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":18,"type":"Blob"}],["UNLModifyValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"Blob"}],["ValidatorToDisable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"Blob"}],["ValidatorToReEnable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"Blob"}],["HookStateData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"Blob"}],["HookReturnString",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"Blob"}],["HookParameterName",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":24,"type":"Blob"}],["HookParameterValue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":25,"type":"Blob"}],["DIDDocument",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":26,"type":"Blob"}],["Data",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":27,"type":"Blob"}],["AssetClass",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":28,"type":"Blob"}],["Provider",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":29,"type":"Blob"}],["MPTokenMetadata",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":30,"type":"Blob"}],["CredentialType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":31,"type":"Blob"}],["Account",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"AccountID"}],["Owner",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"AccountID"}],["Destination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"AccountID"}],["Issuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"AccountID"}],["Authorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"AccountID"}],["Unauthorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":6,"type":"AccountID"}],["RegularKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"AccountID"}],["NFTokenMinter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"AccountID"}],["EmitCallback",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"AccountID"}],["Holder",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"AccountID"}],["Delegate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":12,"type":"AccountID"}],["HookAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"AccountID"}],["OtherChainSource",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":18,"type":"AccountID"}],["OtherChainDestination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"AccountID"}],["AttestationSignerAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"AccountID"}],["AttestationRewardAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"AccountID"}],["LockingChainDoor",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"AccountID"}],["IssuingChainDoor",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"AccountID"}],["Subject",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":24,"type":"AccountID"}],["Number",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Number"}],["AssetsAvailable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Number"}],["AssetsMaximum",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Number"}],["AssetsTotal",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Number"}],["LossUnrealized",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Number"}],["TransactionMetaData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"STObject"}],["CreatedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"STObject"}],["DeletedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STObject"}],["ModifiedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STObject"}],["PreviousFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STObject"}],["FinalFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STObject"}],["NewFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STObject"}],["TemplateEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STObject"}],["Memo",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STObject"}],["SignerEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STObject"}],["NFToken",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STObject"}],["EmitDetails",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"STObject"}],["Hook",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"STObject"}],["Permission",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":15,"type":"STObject"}],["Signer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STObject"}],["Majority",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STObject"}],["DisabledValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STObject"}],["EmittedTxn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STObject"}],["HookExecution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STObject"}],["HookDefinition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STObject"}],["HookParameter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"STObject"}],["HookGrant",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STObject"}],["VoteEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"STObject"}],["AuctionSlot",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"STObject"}],["AuthAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"STObject"}],["XChainClaimProofSig",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"STObject"}],["XChainCreateAccountProofSig",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"STObject"}],["XChainClaimAttestationCollectionElement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"STObject"}],["XChainCreateAccountAttestationCollectionElement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"STObject"}],["PriceData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"STObject"}],["Credential",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"STObject"}],["RawTransaction",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"STObject"}],["BatchSigner",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"STObject"}],["Book",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"STObject"}],["Signers",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":3,"type":"STArray"}],["SignerEntries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STArray"}],["Template",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STArray"}],["Necessary",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STArray"}],["Sufficient",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STArray"}],["AffectedNodes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STArray"}],["Memos",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STArray"}],["NFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STArray"}],["Hooks",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STArray"}],["VoteSlots",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STArray"}],["AdditionalBooks",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"STArray"}],["Majorities",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STArray"}],["DisabledValidators",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"STArray"}],["HookExecutions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STArray"}],["HookParameters",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STArray"}],["HookGrants",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STArray"}],["XChainClaimAttestations",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STArray"}],["XChainCreateAccountAttestations",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STArray"}],["PriceDataSeries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STArray"}],["AuthAccounts",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"STArray"}],["AuthorizeCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"STArray"}],["UnauthorizeCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"STArray"}],["AcceptedCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"STArray"}],["Permissions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"STArray"}],["RawTransactions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"STArray"}],["BatchSigners",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":31,"type":"STArray"}],["CloseResolution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt8"}],["Method",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt8"}],["TransactionResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt8"}],["Scale",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt8"}],["AssetScale",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt8"}],["TickSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt8"}],["UNLModifyDisabling",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt8"}],["HookResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt8"}],["WasLockingChainSend",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt8"}],["WithdrawalPolicy",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt8"}],["TakerPaysCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash160"}],["TakerPaysIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash160"}],["TakerGetsCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash160"}],["TakerGetsIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash160"}],["Paths",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"PathSet"}],["Indexes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Vector256"}],["Hashes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Vector256"}],["Amendments",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Vector256"}],["NFTokenOffers",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"Vector256"}],["CredentialIDs",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Vector256"}],["MPTokenIssuanceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash192"}],["ShareMPTID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash192"}],["LockingChainIssue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Issue"}],["IssuingChainIssue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Issue"}],["Asset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Issue"}],["Asset2",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Issue"}],["XChainBridge",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"XChainBridge"}],["BaseAsset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Currency"}],["QuoteAsset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Currency"}],["Transaction",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Transaction"}],["LedgerEntry",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"LedgerEntry"}],["Validation",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Validation"}],["Metadata",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Metadata"}]],"LEDGER_ENTRY_TYPES":{"AMM":121,"AccountRoot":97,"Amendments":102,"Bridge":105,"Check":67,"Credential":129,"DID":73,"Delegate":131,"DepositPreauth":112,"DirectoryNode":100,"Escrow":117,"FeeSettings":115,"Invalid":-1,"LedgerHashes":104,"MPToken":127,"MPTokenIssuance":126,"NFTokenOffer":55,"NFTokenPage":80,"NegativeUNL":78,"Offer":111,"Oracle":128,"PayChannel":120,"PermissionedDomain":130,"RippleState":114,"SignerList":83,"Ticket":84,"Vault":132,"XChainOwnedClaimID":113,"XChainOwnedCreateAccountClaimID":116},"TRANSACTION_RESULTS":{"tecAMM_ACCOUNT":168,"tecAMM_BALANCE":163,"tecAMM_EMPTY":166,"tecAMM_FAILED":164,"tecAMM_INVALID_TOKENS":165,"tecAMM_NOT_EMPTY":167,"tecARRAY_EMPTY":190,"tecARRAY_TOO_LARGE":191,"tecBAD_CREDENTIALS":193,"tecCANT_ACCEPT_OWN_NFTOKEN_OFFER":158,"tecCLAIM":100,"tecCRYPTOCONDITION_ERROR":146,"tecDIR_FULL":121,"tecDST_TAG_NEEDED":143,"tecDUPLICATE":149,"tecEMPTY_DID":187,"tecEXPIRED":148,"tecFAILED_PROCESSING":105,"tecFROZEN":137,"tecHAS_OBLIGATIONS":151,"tecHOOK_REJECTED":153,"tecINCOMPLETE":169,"tecINSUFFICIENT_FUNDS":159,"tecINSUFFICIENT_PAYMENT":161,"tecINSUFFICIENT_RESERVE":141,"tecINSUFF_FEE":136,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecINTERNAL":144,"tecINVALID_UPDATE_TIME":188,"tecINVARIANT_FAILED":147,"tecKILLED":150,"tecLIMIT_EXCEEDED":195,"tecLOCKED":192,"tecMAX_SEQUENCE_REACHED":154,"tecNEED_MASTER_KEY":142,"tecNFTOKEN_BUY_SELL_MISMATCH":156,"tecNFTOKEN_OFFER_TYPE_MISMATCH":157,"tecNO_ALTERNATIVE_KEY":130,"tecNO_AUTH":134,"tecNO_DELEGATE_PERMISSION":198,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_ENTRY":140,"tecNO_ISSUER":133,"tecNO_LINE":135,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecNO_PERMISSION":139,"tecNO_REGULAR_KEY":131,"tecNO_SUITABLE_NFTOKEN_PAGE":155,"tecNO_TARGET":138,"tecOBJECT_NOT_FOUND":160,"tecOVERSIZE":145,"tecOWNERS":132,"tecPATH_DRY":128,"tecPATH_PARTIAL":101,"tecPRECISION_LOSS":197,"tecPSEUDO_ACCOUNT":196,"tecTOKEN_PAIR_NOT_FOUND":189,"tecTOO_SOON":152,"tecUNFUNDED":129,"tecUNFUNDED_ADD":102,"tecUNFUNDED_AMM":162,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecWRONG_ASSET":194,"tecXCHAIN_ACCOUNT_CREATE_PAST":181,"tecXCHAIN_ACCOUNT_CREATE_TOO_MANY":182,"tecXCHAIN_BAD_CLAIM_ID":172,"tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR":185,"tecXCHAIN_BAD_TRANSFER_ISSUE":170,"tecXCHAIN_CLAIM_NO_QUORUM":173,"tecXCHAIN_CREATE_ACCOUNT_DISABLED":186,"tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE":175,"tecXCHAIN_INSUFF_CREATE_AMOUNT":180,"tecXCHAIN_NO_CLAIM_ID":171,"tecXCHAIN_NO_SIGNERS_LIST":178,"tecXCHAIN_PAYMENT_FAILED":183,"tecXCHAIN_PROOF_UNKNOWN_KEY":174,"tecXCHAIN_REWARD_MISMATCH":177,"tecXCHAIN_SELF_COMMIT":184,"tecXCHAIN_SENDING_ACCOUNT_MISMATCH":179,"tecXCHAIN_WRONG_CHAIN":176,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_AUTH_MASTER":-183,"tefBAD_LEDGER":-195,"tefBAD_QUORUM":-185,"tefBAD_SIGNATURE":-186,"tefCREATED":-194,"tefEXCEPTION":-193,"tefFAILURE":-199,"tefINTERNAL":-192,"tefINVALID_LEDGER_FIX_TYPE":-178,"tefINVARIANT_FAILED":-182,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefNFTOKEN_IS_NOT_TRANSFERABLE":-179,"tefNOT_MULTI_SIGNING":-184,"tefNO_AUTH_REQUIRED":-191,"tefNO_TICKET":-180,"tefPAST_SEQ":-190,"tefTOO_BIG":-181,"tefWRONG_PRIOR":-189,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"telENV_RPC_FAILED":-383,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telLOCAL_ERROR":-399,"telNETWORK_ID_MAKES_TX_NON_CANONICAL":-384,"telNO_DST_PARTIAL":-393,"telREQUIRES_NETWORK_ID":-385,"telWRONG_NETWORK":-386,"temARRAY_EMPTY":-253,"temARRAY_TOO_LARGE":-252,"temBAD_AMM_TOKENS":-261,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_NFTOKEN_TRANSFER_FEE":-262,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_QUORUM":-271,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SIGNER":-272,"temBAD_SRC_ACCOUNT":-281,"temBAD_TICK_SIZE":-269,"temBAD_TRANSFER_FEE":-251,"temBAD_TRANSFER_RATE":-280,"temBAD_WEIGHT":-270,"temCANNOT_PREAUTH_SELF":-267,"temDISABLED":-273,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temEMPTY_DID":-254,"temINVALID":-277,"temINVALID_ACCOUNT_ID":-268,"temINVALID_COUNT":-266,"temINVALID_FLAG":-276,"temINVALID_INNER_BATCH":-250,"temMALFORMED":-299,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temSEQ_AND_TICKET":-263,"temUNCERTAIN":-265,"temUNKNOWN":-264,"temXCHAIN_BAD_PROOF":-259,"temXCHAIN_BRIDGE_BAD_ISSUES":-258,"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT":-256,"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT":-255,"temXCHAIN_BRIDGE_NONDOOR_OWNER":-257,"temXCHAIN_EQUAL_DOOR_ACCOUNTS":-260,"terADDRESS_COLLISION":-86,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terLAST":-91,"terNO_ACCOUNT":-96,"terNO_AMM":-87,"terNO_AUTH":-95,"terNO_LINE":-94,"terNO_RIPPLE":-90,"terOWNERS":-93,"terPRE_SEQ":-92,"terPRE_TICKET":-88,"terQUEUED":-89,"terRETRY":-99,"tesSUCCESS":0},"TRANSACTION_TYPES":{"AMMBid":39,"AMMClawback":31,"AMMCreate":35,"AMMDelete":40,"AMMDeposit":36,"AMMVote":38,"AMMWithdraw":37,"AccountDelete":21,"AccountSet":3,"Batch":71,"CheckCancel":18,"CheckCash":17,"CheckCreate":16,"Clawback":30,"CredentialAccept":59,"CredentialCreate":58,"CredentialDelete":60,"DIDDelete":50,"DIDSet":49,"DelegateSet":64,"DepositPreauth":19,"EnableAmendment":100,"EscrowCancel":4,"EscrowCreate":1,"EscrowFinish":2,"Invalid":-1,"LedgerStateFix":53,"MPTokenAuthorize":57,"MPTokenIssuanceCreate":54,"MPTokenIssuanceDestroy":55,"MPTokenIssuanceSet":56,"NFTokenAcceptOffer":29,"NFTokenBurn":26,"NFTokenCancelOffer":28,"NFTokenCreateOffer":27,"NFTokenMint":25,"NFTokenModify":61,"OfferCancel":8,"OfferCreate":7,"OracleDelete":52,"OracleSet":51,"Payment":0,"PaymentChannelClaim":15,"PaymentChannelCreate":13,"PaymentChannelFund":14,"PermissionedDomainDelete":63,"PermissionedDomainSet":62,"SetFee":101,"SetRegularKey":5,"SignerListSet":12,"TicketCreate":10,"TrustSet":20,"UNLModify":102,"VaultClawback":70,"VaultCreate":65,"VaultDelete":67,"VaultDeposit":68,"VaultSet":66,"VaultWithdraw":69,"XChainAccountCreateCommit":44,"XChainAddAccountCreateAttestation":46,"XChainAddClaimAttestation":45,"XChainClaim":43,"XChainCommit":42,"XChainCreateBridge":48,"XChainCreateClaimID":41,"XChainModifyBridge":47},"TYPES":{"AccountID":8,"Amount":6,"Blob":7,"Currency":26,"Done":-1,"Hash128":4,"Hash160":17,"Hash192":21,"Hash256":5,"Issue":24,"LedgerEntry":10002,"Metadata":10004,"NotPresent":0,"Number":9,"PathSet":18,"STArray":15,"STObject":14,"Transaction":10001,"UInt16":1,"UInt32":2,"UInt384":22,"UInt512":23,"UInt64":3,"UInt8":16,"UInt96":20,"Unknown":-2,"Validation":10003,"Vector256":19,"XChainBridge":25}}');
15750
+ module.exports = /*#__PURE__*/JSON.parse('{"FIELDS":[["Generic",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":0,"type":"Unknown"}],["Invalid",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":-1,"type":"Unknown"}],["ObjectEndMarker",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STObject"}],["ArrayEndMarker",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STArray"}],["taker_gets_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Amount"}],["taker_pays_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":259,"type":"Amount"}],["LedgerEntryType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt16"}],["TransactionType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt16"}],["SignerWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt16"}],["TransferFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt16"}],["TradingFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt16"}],["DiscountedFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt16"}],["Version",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt16"}],["HookStateChangeCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt16"}],["HookEmitCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt16"}],["HookExecutionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt16"}],["HookApiVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt16"}],["LedgerFixType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt16"}],["NetworkID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt32"}],["Flags",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt32"}],["SourceTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt32"}],["Sequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt32"}],["PreviousTxnLgrSeq",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt32"}],["LedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt32"}],["CloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt32"}],["ParentCloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt32"}],["SigningTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt32"}],["Expiration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt32"}],["TransferRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt32"}],["WalletSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt32"}],["OwnerCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt32"}],["DestinationTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"UInt32"}],["LastUpdateTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":15,"type":"UInt32"}],["HighQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt32"}],["HighQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt32"}],["LowQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt32"}],["LowQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt32"}],["QualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt32"}],["QualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt32"}],["StampEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt32"}],["BondAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt32"}],["LoadFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt32"}],["OfferSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt32"}],["FirstLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt32"}],["LastLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"UInt32"}],["TransactionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"UInt32"}],["OperationLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"UInt32"}],["ReferenceFeeUnits",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"UInt32"}],["ReserveBase",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"UInt32"}],["ReserveIncrement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"UInt32"}],["SetFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"UInt32"}],["ClearFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"UInt32"}],["SignerQuorum",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"UInt32"}],["CancelAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"UInt32"}],["FinishAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":37,"type":"UInt32"}],["SignerListID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":38,"type":"UInt32"}],["SettleDelay",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":39,"type":"UInt32"}],["TicketCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":40,"type":"UInt32"}],["TicketSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":41,"type":"UInt32"}],["NFTokenTaxon",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":42,"type":"UInt32"}],["MintedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":43,"type":"UInt32"}],["BurnedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":44,"type":"UInt32"}],["HookStateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":45,"type":"UInt32"}],["EmitGeneration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":46,"type":"UInt32"}],["VoteWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":48,"type":"UInt32"}],["FirstNFTokenSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":50,"type":"UInt32"}],["OracleDocumentID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":51,"type":"UInt32"}],["PermissionValue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":52,"type":"UInt32"}],["ExtensionComputeLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":53,"type":"UInt32"}],["ExtensionSizeLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":54,"type":"UInt32"}],["GasPrice",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":55,"type":"UInt32"}],["ComputationAllowance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":56,"type":"UInt32"}],["GasUsed",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":57,"type":"UInt32"}],["IndexNext",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt64"}],["IndexPrevious",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt64"}],["BookNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt64"}],["OwnerNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt64"}],["BaseFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt64"}],["ExchangeRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt64"}],["LowNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt64"}],["HighNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt64"}],["DestinationNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt64"}],["Cookie",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt64"}],["ServerVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt64"}],["NFTokenOfferNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt64"}],["EmitBurden",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt64"}],["HookOn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt64"}],["HookInstructionCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt64"}],["HookReturnCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt64"}],["ReferenceCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt64"}],["XChainClaimID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt64"}],["XChainAccountCreateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt64"}],["XChainAccountClaimCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt64"}],["AssetPrice",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt64"}],["MaximumAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt64"}],["OutstandingAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt64"}],["MPTAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt64"}],["IssuerNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"UInt64"}],["SubjectNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"UInt64"}],["EmailHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash128"}],["LedgerHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash256"}],["ParentHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash256"}],["TransactionHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash256"}],["AccountHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash256"}],["PreviousTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Hash256"}],["LedgerIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Hash256"}],["WalletLocator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Hash256"}],["RootIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Hash256"}],["AccountTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Hash256"}],["NFTokenID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Hash256"}],["EmitParentTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Hash256"}],["EmitNonce",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Hash256"}],["EmitHookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Hash256"}],["AMMID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"Hash256"}],["BookDirectory",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Hash256"}],["InvoiceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Hash256"}],["Nickname",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Hash256"}],["Amendment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Hash256"}],["Digest",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"Hash256"}],["Channel",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Hash256"}],["ConsensusHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Hash256"}],["CheckID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Hash256"}],["ValidatedHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Hash256"}],["PreviousPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Hash256"}],["NextPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Hash256"}],["NFTokenBuyOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Hash256"}],["NFTokenSellOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Hash256"}],["HookStateKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Hash256"}],["HookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Hash256"}],["HookNamespace",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"Hash256"}],["HookSetTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"Hash256"}],["DomainID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"Hash256"}],["VaultID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"Hash256"}],["ParentBatchID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"Hash256"}],["hash",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Hash256"}],["index",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Hash256"}],["Amount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Amount"}],["Balance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Amount"}],["LimitAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Amount"}],["TakerPays",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Amount"}],["TakerGets",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Amount"}],["LowLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Amount"}],["HighLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Amount"}],["Fee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Amount"}],["SendMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Amount"}],["DeliverMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Amount"}],["Amount2",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Amount"}],["BidMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Amount"}],["BidMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Amount"}],["MinimumOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Amount"}],["RippleEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Amount"}],["DeliveredAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Amount"}],["NFTokenBrokerFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Amount"}],["BaseFeeDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Amount"}],["ReserveBaseDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Amount"}],["ReserveIncrementDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Amount"}],["LPTokenOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Amount"}],["LPTokenIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Amount"}],["EPrice",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Amount"}],["Price",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Amount"}],["SignatureReward",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Amount"}],["MinAccountCreateAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Amount"}],["LPTokenBalance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Amount"}],["PublicKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Blob"}],["MessageKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Blob"}],["SigningPubKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Blob"}],["TxnSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":4,"type":"Blob"}],["URI",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Blob"}],["Signature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":6,"type":"Blob"}],["Domain",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":7,"type":"Blob"}],["FundCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"Blob"}],["RemoveCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"Blob"}],["ExpireCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"Blob"}],["CreateCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"Blob"}],["MemoType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":12,"type":"Blob"}],["MemoData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":13,"type":"Blob"}],["MemoFormat",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":14,"type":"Blob"}],["Fulfillment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"Blob"}],["Condition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":17,"type":"Blob"}],["MasterSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":18,"type":"Blob"}],["UNLModifyValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"Blob"}],["ValidatorToDisable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"Blob"}],["ValidatorToReEnable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"Blob"}],["HookStateData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"Blob"}],["HookReturnString",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"Blob"}],["HookParameterName",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":24,"type":"Blob"}],["HookParameterValue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":25,"type":"Blob"}],["DIDDocument",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":26,"type":"Blob"}],["Data",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":27,"type":"Blob"}],["AssetClass",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":28,"type":"Blob"}],["Provider",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":29,"type":"Blob"}],["MPTokenMetadata",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":30,"type":"Blob"}],["CredentialType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":31,"type":"Blob"}],["FinishFunction",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":32,"type":"Blob"}],["Account",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"AccountID"}],["Owner",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"AccountID"}],["Destination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"AccountID"}],["Issuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"AccountID"}],["Authorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"AccountID"}],["Unauthorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":6,"type":"AccountID"}],["RegularKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"AccountID"}],["NFTokenMinter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"AccountID"}],["EmitCallback",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"AccountID"}],["Holder",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"AccountID"}],["Delegate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":12,"type":"AccountID"}],["HookAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"AccountID"}],["OtherChainSource",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":18,"type":"AccountID"}],["OtherChainDestination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"AccountID"}],["AttestationSignerAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"AccountID"}],["AttestationRewardAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"AccountID"}],["LockingChainDoor",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"AccountID"}],["IssuingChainDoor",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"AccountID"}],["Subject",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":24,"type":"AccountID"}],["Number",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Number"}],["AssetsAvailable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Number"}],["AssetsMaximum",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Number"}],["AssetsTotal",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Number"}],["LossUnrealized",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Number"}],["TransactionMetaData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"STObject"}],["CreatedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"STObject"}],["DeletedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STObject"}],["ModifiedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STObject"}],["PreviousFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STObject"}],["FinalFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STObject"}],["NewFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STObject"}],["TemplateEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STObject"}],["Memo",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STObject"}],["SignerEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STObject"}],["NFToken",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STObject"}],["EmitDetails",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"STObject"}],["Hook",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"STObject"}],["Permission",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":15,"type":"STObject"}],["Signer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STObject"}],["Majority",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STObject"}],["DisabledValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STObject"}],["EmittedTxn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STObject"}],["HookExecution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STObject"}],["HookDefinition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STObject"}],["HookParameter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"STObject"}],["HookGrant",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STObject"}],["VoteEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"STObject"}],["AuctionSlot",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"STObject"}],["AuthAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"STObject"}],["XChainClaimProofSig",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"STObject"}],["XChainCreateAccountProofSig",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"STObject"}],["XChainClaimAttestationCollectionElement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"STObject"}],["XChainCreateAccountAttestationCollectionElement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"STObject"}],["PriceData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"STObject"}],["Credential",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"STObject"}],["RawTransaction",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"STObject"}],["BatchSigner",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"STObject"}],["Signers",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":3,"type":"STArray"}],["SignerEntries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STArray"}],["Template",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STArray"}],["Necessary",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STArray"}],["Sufficient",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STArray"}],["AffectedNodes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STArray"}],["Memos",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STArray"}],["NFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STArray"}],["Hooks",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STArray"}],["VoteSlots",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STArray"}],["Majorities",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STArray"}],["DisabledValidators",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"STArray"}],["HookExecutions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STArray"}],["HookParameters",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STArray"}],["HookGrants",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STArray"}],["XChainClaimAttestations",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STArray"}],["XChainCreateAccountAttestations",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STArray"}],["PriceDataSeries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STArray"}],["AuthAccounts",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"STArray"}],["AuthorizeCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"STArray"}],["UnauthorizeCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"STArray"}],["AcceptedCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"STArray"}],["Permissions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"STArray"}],["RawTransactions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"STArray"}],["BatchSigners",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":31,"type":"STArray"}],["CloseResolution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt8"}],["Method",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt8"}],["TransactionResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt8"}],["Scale",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt8"}],["AssetScale",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt8"}],["TickSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt8"}],["UNLModifyDisabling",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt8"}],["HookResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt8"}],["WasLockingChainSend",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt8"}],["WithdrawalPolicy",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt8"}],["TakerPaysCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash160"}],["TakerPaysIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash160"}],["TakerGetsCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash160"}],["TakerGetsIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash160"}],["Paths",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"PathSet"}],["Indexes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Vector256"}],["Hashes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Vector256"}],["Amendments",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Vector256"}],["NFTokenOffers",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"Vector256"}],["CredentialIDs",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Vector256"}],["MPTokenIssuanceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash192"}],["ShareMPTID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash192"}],["LockingChainIssue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Issue"}],["IssuingChainIssue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Issue"}],["Asset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Issue"}],["Asset2",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Issue"}],["XChainBridge",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"XChainBridge"}],["BaseAsset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Currency"}],["QuoteAsset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Currency"}],["Transaction",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Transaction"}],["LedgerEntry",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"LedgerEntry"}],["Validation",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Validation"}],["Metadata",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Metadata"}]],"LEDGER_ENTRY_TYPES":{"AMM":121,"AccountRoot":97,"Amendments":102,"Bridge":105,"Check":67,"Credential":129,"DID":73,"Delegate":131,"DepositPreauth":112,"DirectoryNode":100,"Escrow":117,"FeeSettings":115,"Invalid":-1,"LedgerHashes":104,"MPToken":127,"MPTokenIssuance":126,"NFTokenOffer":55,"NFTokenPage":80,"NegativeUNL":78,"Offer":111,"Oracle":128,"PayChannel":120,"PermissionedDomain":130,"RippleState":114,"SignerList":83,"Ticket":84,"Vault":132,"XChainOwnedClaimID":113,"XChainOwnedCreateAccountClaimID":116},"TRANSACTION_RESULTS":{"tecAMM_ACCOUNT":168,"tecAMM_BALANCE":163,"tecAMM_EMPTY":166,"tecAMM_FAILED":164,"tecAMM_INVALID_TOKENS":165,"tecAMM_NOT_EMPTY":167,"tecARRAY_EMPTY":190,"tecARRAY_TOO_LARGE":191,"tecBAD_CREDENTIALS":193,"tecCANT_ACCEPT_OWN_NFTOKEN_OFFER":158,"tecCLAIM":100,"tecCRYPTOCONDITION_ERROR":146,"tecDIR_FULL":121,"tecDST_TAG_NEEDED":143,"tecDUPLICATE":149,"tecEMPTY_DID":187,"tecEXPIRED":148,"tecFAILED_PROCESSING":105,"tecFROZEN":137,"tecHAS_OBLIGATIONS":151,"tecHOOK_REJECTED":153,"tecINCOMPLETE":169,"tecINSUFFICIENT_FUNDS":159,"tecINSUFFICIENT_PAYMENT":161,"tecINSUFFICIENT_RESERVE":141,"tecINSUFF_FEE":136,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecINTERNAL":144,"tecINVALID_UPDATE_TIME":188,"tecINVARIANT_FAILED":147,"tecKILLED":150,"tecLIMIT_EXCEEDED":195,"tecLOCKED":192,"tecMAX_SEQUENCE_REACHED":154,"tecNEED_MASTER_KEY":142,"tecNFTOKEN_BUY_SELL_MISMATCH":156,"tecNFTOKEN_OFFER_TYPE_MISMATCH":157,"tecNO_ALTERNATIVE_KEY":130,"tecNO_AUTH":134,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_ENTRY":140,"tecNO_ISSUER":133,"tecNO_LINE":135,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecNO_PERMISSION":139,"tecNO_REGULAR_KEY":131,"tecNO_SUITABLE_NFTOKEN_PAGE":155,"tecNO_TARGET":138,"tecOBJECT_NOT_FOUND":160,"tecOVERSIZE":145,"tecOWNERS":132,"tecPATH_DRY":128,"tecPATH_PARTIAL":101,"tecPSEUDO_ACCOUNT":196,"tecTOKEN_PAIR_NOT_FOUND":189,"tecTOO_SOON":152,"tecUNFUNDED":129,"tecUNFUNDED_ADD":102,"tecUNFUNDED_AMM":162,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecWASM_REJECTED":197,"tecWRONG_ASSET":194,"tecXCHAIN_ACCOUNT_CREATE_PAST":181,"tecXCHAIN_ACCOUNT_CREATE_TOO_MANY":182,"tecXCHAIN_BAD_CLAIM_ID":172,"tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR":185,"tecXCHAIN_BAD_TRANSFER_ISSUE":170,"tecXCHAIN_CLAIM_NO_QUORUM":173,"tecXCHAIN_CREATE_ACCOUNT_DISABLED":186,"tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE":175,"tecXCHAIN_INSUFF_CREATE_AMOUNT":180,"tecXCHAIN_NO_CLAIM_ID":171,"tecXCHAIN_NO_SIGNERS_LIST":178,"tecXCHAIN_PAYMENT_FAILED":183,"tecXCHAIN_PROOF_UNKNOWN_KEY":174,"tecXCHAIN_REWARD_MISMATCH":177,"tecXCHAIN_SELF_COMMIT":184,"tecXCHAIN_SENDING_ACCOUNT_MISMATCH":179,"tecXCHAIN_WRONG_CHAIN":176,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_AUTH_MASTER":-183,"tefBAD_LEDGER":-195,"tefBAD_QUORUM":-185,"tefBAD_SIGNATURE":-186,"tefCREATED":-194,"tefEXCEPTION":-193,"tefFAILURE":-199,"tefINTERNAL":-192,"tefINVALID_LEDGER_FIX_TYPE":-178,"tefINVARIANT_FAILED":-182,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefNFTOKEN_IS_NOT_TRANSFERABLE":-179,"tefNOT_MULTI_SIGNING":-184,"tefNO_AUTH_REQUIRED":-191,"tefNO_TICKET":-180,"tefNO_WASM":-177,"tefPAST_SEQ":-190,"tefTOO_BIG":-181,"tefWASM_FIELD_NOT_INCLUDED":-176,"tefWRONG_PRIOR":-189,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"telENV_RPC_FAILED":-383,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telLOCAL_ERROR":-399,"telNETWORK_ID_MAKES_TX_NON_CANONICAL":-384,"telNO_DST_PARTIAL":-393,"telREQUIRES_NETWORK_ID":-385,"telWRONG_NETWORK":-386,"temARRAY_EMPTY":-253,"temARRAY_TOO_LARGE":-252,"temBAD_AMM_TOKENS":-261,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_NFTOKEN_TRANSFER_FEE":-262,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_QUORUM":-271,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SIGNER":-272,"temBAD_SRC_ACCOUNT":-281,"temBAD_TICK_SIZE":-269,"temBAD_TRANSFER_FEE":-251,"temBAD_TRANSFER_RATE":-280,"temBAD_WASM":-249,"temBAD_WEIGHT":-270,"temCANNOT_PREAUTH_SELF":-267,"temDISABLED":-273,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temEMPTY_DID":-254,"temINVALID":-277,"temINVALID_ACCOUNT_ID":-268,"temINVALID_COUNT":-266,"temINVALID_FLAG":-276,"temINVALID_INNER_BATCH":-250,"temMALFORMED":-299,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temSEQ_AND_TICKET":-263,"temUNCERTAIN":-265,"temUNKNOWN":-264,"temXCHAIN_BAD_PROOF":-259,"temXCHAIN_BRIDGE_BAD_ISSUES":-258,"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT":-256,"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT":-255,"temXCHAIN_BRIDGE_NONDOOR_OWNER":-257,"temXCHAIN_EQUAL_DOOR_ACCOUNTS":-260,"terADDRESS_COLLISION":-86,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terLAST":-91,"terNO_ACCOUNT":-96,"terNO_AMM":-87,"terNO_AUTH":-95,"terNO_LINE":-94,"terNO_RIPPLE":-90,"terOWNERS":-93,"terPRE_SEQ":-92,"terPRE_TICKET":-88,"terQUEUED":-89,"terRETRY":-99,"tesSUCCESS":0},"TRANSACTION_TYPES":{"AMMBid":39,"AMMClawback":31,"AMMCreate":35,"AMMDelete":40,"AMMDeposit":36,"AMMVote":38,"AMMWithdraw":37,"AccountDelete":21,"AccountSet":3,"Batch":71,"CheckCancel":18,"CheckCash":17,"CheckCreate":16,"Clawback":30,"CredentialAccept":59,"CredentialCreate":58,"CredentialDelete":60,"DIDDelete":50,"DIDSet":49,"DelegateSet":64,"DepositPreauth":19,"EnableAmendment":100,"EscrowCancel":4,"EscrowCreate":1,"EscrowFinish":2,"Invalid":-1,"LedgerStateFix":53,"MPTokenAuthorize":57,"MPTokenIssuanceCreate":54,"MPTokenIssuanceDestroy":55,"MPTokenIssuanceSet":56,"NFTokenAcceptOffer":29,"NFTokenBurn":26,"NFTokenCancelOffer":28,"NFTokenCreateOffer":27,"NFTokenMint":25,"NFTokenModify":61,"OfferCancel":8,"OfferCreate":7,"OracleDelete":52,"OracleSet":51,"Payment":0,"PaymentChannelClaim":15,"PaymentChannelCreate":13,"PaymentChannelFund":14,"PermissionedDomainDelete":63,"PermissionedDomainSet":62,"SetFee":101,"SetRegularKey":5,"SignerListSet":12,"TicketCreate":10,"TrustSet":20,"UNLModify":102,"VaultClawback":70,"VaultCreate":65,"VaultDelete":67,"VaultDeposit":68,"VaultSet":66,"VaultWithdraw":69,"XChainAccountCreateCommit":44,"XChainAddAccountCreateAttestation":46,"XChainAddClaimAttestation":45,"XChainClaim":43,"XChainCommit":42,"XChainCreateBridge":48,"XChainCreateClaimID":41,"XChainModifyBridge":47},"TYPES":{"AccountID":8,"Amount":6,"Blob":7,"Currency":26,"Done":-1,"Hash128":4,"Hash160":17,"Hash192":21,"Hash256":5,"Issue":24,"LedgerEntry":10002,"Metadata":10004,"NotPresent":0,"Number":9,"PathSet":18,"STArray":15,"STObject":14,"Transaction":10001,"UInt16":1,"UInt32":2,"UInt384":22,"UInt512":23,"UInt64":3,"UInt8":16,"UInt96":20,"Unknown":-2,"Validation":10003,"Vector256":19,"XChainBridge":25}}');
16558
15751
 
16559
15752
  /***/ }),
16560
15753
 
@@ -16747,7 +15940,9 @@ class XrplDefinitionsBase {
16747
15940
  this.field['TransactionType'].associatedType = this.transactionType;
16748
15941
  this.field['TransactionResult'].associatedType = this.transactionResult;
16749
15942
  this.field['LedgerEntryType'].associatedType = this.ledgerEntryType;
16750
- this.field['PermissionValue'].associatedType = this.delegatablePermissions;
15943
+ if (this.field['PermissionValue']) {
15944
+ this.field['PermissionValue'].associatedType = this.delegatablePermissions;
15945
+ }
16751
15946
  }
16752
15947
  getAssociatedTypes() {
16753
15948
  return this.dataTypes;
@@ -18636,6 +17831,7 @@ Object.defineProperty(exports, "Hash192", ({ enumerable: true, get: function ()
18636
17831
  const hash_256_1 = __webpack_require__(/*! ./hash-256 */ "../../node_modules/ripple-binary-codec/dist/types/hash-256.js");
18637
17832
  Object.defineProperty(exports, "Hash256", ({ enumerable: true, get: function () { return hash_256_1.Hash256; } }));
18638
17833
  const issue_1 = __webpack_require__(/*! ./issue */ "../../node_modules/ripple-binary-codec/dist/types/issue.js");
17834
+ const st_number_1 = __webpack_require__(/*! ./st-number */ "../../node_modules/ripple-binary-codec/dist/types/st-number.js");
18639
17835
  const path_set_1 = __webpack_require__(/*! ./path-set */ "../../node_modules/ripple-binary-codec/dist/types/path-set.js");
18640
17836
  Object.defineProperty(exports, "PathSet", ({ enumerable: true, get: function () { return path_set_1.PathSet; } }));
18641
17837
  const st_array_1 = __webpack_require__(/*! ./st-array */ "../../node_modules/ripple-binary-codec/dist/types/st-array.js");
@@ -18664,6 +17860,7 @@ const coreTypes = {
18664
17860
  Hash192: hash_192_1.Hash192,
18665
17861
  Hash256: hash_256_1.Hash256,
18666
17862
  Issue: issue_1.Issue,
17863
+ Number: st_number_1.STNumber,
18667
17864
  PathSet: path_set_1.PathSet,
18668
17865
  STArray: st_array_1.STArray,
18669
17866
  STObject: st_object_1.STObject,
@@ -19062,11 +18259,13 @@ class SerializedType {
19062
18259
  }
19063
18260
  static fromParser(parser, hint) {
19064
18261
  throw new Error('fromParser not implemented');
19065
- return this.fromParser(parser, hint);
18262
+ // removed by dead control flow
18263
+ {}
19066
18264
  }
19067
18265
  static from(value) {
19068
18266
  throw new Error('from not implemented');
19069
- return this.from(value);
18267
+ // removed by dead control flow
18268
+ {}
19070
18269
  }
19071
18270
  /**
19072
18271
  * Write the bytes representation of a SerializedType to a BytesList
@@ -19207,46 +18406,264 @@ class STArray extends serialized_type_1.SerializedType {
19207
18406
  /**
19208
18407
  * Construct an STArray from an Array of JSON Objects
19209
18408
  *
19210
- * @param value STArray or Array of Objects to parse into an STArray
19211
- * @param definitions optional, types and values to use to encode/decode a transaction
19212
- * @returns An STArray object
18409
+ * @param value STArray or Array of Objects to parse into an STArray
18410
+ * @param definitions optional, types and values to use to encode/decode a transaction
18411
+ * @returns An STArray object
18412
+ */
18413
+ static from(value, definitions = enums_1.DEFAULT_DEFINITIONS) {
18414
+ if (value instanceof STArray) {
18415
+ return value;
18416
+ }
18417
+ if (isObjects(value)) {
18418
+ const bytes = [];
18419
+ value.forEach((obj) => {
18420
+ bytes.push(st_object_1.STObject.from(obj, undefined, definitions).toBytes());
18421
+ });
18422
+ bytes.push(ARRAY_END_MARKER);
18423
+ return new STArray((0, utils_1.concat)(bytes));
18424
+ }
18425
+ throw new Error('Cannot construct STArray from value given');
18426
+ }
18427
+ /**
18428
+ * Return the JSON representation of this.bytes
18429
+ *
18430
+ * @param definitions optional, types and values to use to encode/decode a transaction
18431
+ * @returns An Array of JSON objects
18432
+ */
18433
+ toJSON(definitions = enums_1.DEFAULT_DEFINITIONS) {
18434
+ const result = [];
18435
+ const arrayParser = new binary_parser_1.BinaryParser(this.toString(), definitions);
18436
+ while (!arrayParser.end()) {
18437
+ const field = arrayParser.readField();
18438
+ if (field.name === ARRAY_END_MARKER_NAME) {
18439
+ break;
18440
+ }
18441
+ const outer = {};
18442
+ outer[field.name] = st_object_1.STObject.fromParser(arrayParser).toJSON(definitions);
18443
+ result.push(outer);
18444
+ }
18445
+ return result;
18446
+ }
18447
+ }
18448
+ exports.STArray = STArray;
18449
+
18450
+
18451
+ /***/ }),
18452
+
18453
+ /***/ "../../node_modules/ripple-binary-codec/dist/types/st-number.js":
18454
+ /*!**********************************************************************!*\
18455
+ !*** ../../node_modules/ripple-binary-codec/dist/types/st-number.js ***!
18456
+ \**********************************************************************/
18457
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
18458
+
18459
+ "use strict";
18460
+
18461
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
18462
+ exports.STNumber = void 0;
18463
+ const serialized_type_1 = __webpack_require__(/*! ./serialized-type */ "../../node_modules/ripple-binary-codec/dist/types/serialized-type.js");
18464
+ const utils_1 = __webpack_require__(/*! ../utils */ "../../node_modules/ripple-binary-codec/dist/utils.js");
18465
+ /**
18466
+ * Constants for mantissa and exponent normalization per XRPL Number spec.
18467
+ * These define allowed magnitude for mantissa and exponent after normalization.
18468
+ */
18469
+ const MIN_MANTISSA = BigInt('1000000000000000');
18470
+ const MAX_MANTISSA = BigInt('9999999999999999');
18471
+ const MIN_EXPONENT = -32768;
18472
+ const MAX_EXPONENT = 32768;
18473
+ const DEFAULT_VALUE_EXPONENT = -2147483648;
18474
+ /**
18475
+ * Extract mantissa, exponent, and sign from a number string.
18476
+ *
18477
+ * @param val - The string representing the number (may be integer, decimal, or scientific notation).
18478
+ * @returns Object containing mantissa (BigInt), exponent (number), and isNegative (boolean).
18479
+ * @throws Error if the string cannot be parsed as a valid number.
18480
+ *
18481
+ * Examples:
18482
+ * '123' -> { mantissa: 123n, exponent: 0, isNegative: false }
18483
+ * '-00123.45' -> { mantissa: -12345n, exponent: -2, isNegative: true }
18484
+ * '+7.1e2' -> { mantissa: 71n, exponent: -1 + 2 = 1, isNegative: false }
18485
+ */
18486
+ function extractNumberPartsFromString(val) {
18487
+ /**
18488
+ * Regex for parsing decimal/float/scientific number strings with optional sign, integer, decimal, and exponent parts.
18489
+ *
18490
+ * Pattern: /^([-+]?)([0-9]+)(?:\.([0-9]+))?(?:[eE]([+-]?[0-9]+))?$/
18491
+ *
18492
+ * Breakdown:
18493
+ * 1. ([-+]?) - Optional '+' or '-' sign at the start.
18494
+ * 2. ([0-9]+) - Integer part: one or more digits (leading zeros allowed).
18495
+ * 3. (?:\.([0-9]+))? - Optional decimal point followed by one or more digits.
18496
+ * 4. (?:[eE]([+-]?[0-9]+))? - Optional exponent, starting with 'e' or 'E', optional sign, and digits.
18497
+ *
18498
+ * Notes:
18499
+ * - Leading zeros are accepted and normalized by code after parsing.
18500
+ * - Empty decimal ('123.') and missing integer ('.456') are NOT matched—must be fully specified.
18501
+ */
18502
+ const regex = /^([-+]?)([0-9]+)(?:\.([0-9]+))?(?:[eE]([+-]?[0-9]+))?$/;
18503
+ const match = regex.exec(val);
18504
+ if (!match)
18505
+ throw new Error(`Unable to parse number from string: ${val}`);
18506
+ const [, sign, intPart, fracPart, expPart] = match;
18507
+ // Remove leading zeros (unless the entire intPart is zeros)
18508
+ const cleanIntPart = intPart.replace(/^0+(?=\d)/, '') || '0';
18509
+ let mantissaStr = cleanIntPart;
18510
+ let exponent = 0;
18511
+ if (fracPart) {
18512
+ mantissaStr += fracPart;
18513
+ exponent -= fracPart.length;
18514
+ }
18515
+ if (expPart)
18516
+ exponent += parseInt(expPart, 10);
18517
+ let mantissa = BigInt(mantissaStr);
18518
+ if (sign === '-')
18519
+ mantissa = -mantissa;
18520
+ const isNegative = mantissa < BigInt(0);
18521
+ return { mantissa, exponent, isNegative };
18522
+ }
18523
+ /**
18524
+ * Normalize the mantissa and exponent to XRPL constraints.
18525
+ *
18526
+ * Ensures that after normalization, the mantissa is between MIN_MANTISSA and MAX_MANTISSA (unless zero).
18527
+ * Adjusts the exponent as needed by shifting the mantissa left/right (multiplying/dividing by 10).
18528
+ *
18529
+ * @param mantissa - The unnormalized mantissa (BigInt).
18530
+ * @param exponent - The unnormalized exponent (number).
18531
+ * @returns An object with normalized mantissa and exponent.
18532
+ * @throws Error if the number cannot be normalized within allowed exponent range.
18533
+ */
18534
+ function normalize(mantissa, exponent) {
18535
+ let m = mantissa < BigInt(0) ? -mantissa : mantissa;
18536
+ const isNegative = mantissa < BigInt(0);
18537
+ while (m !== BigInt(0) && m < MIN_MANTISSA && exponent > MIN_EXPONENT) {
18538
+ exponent -= 1;
18539
+ m *= BigInt(10);
18540
+ }
18541
+ while (m > MAX_MANTISSA) {
18542
+ if (exponent >= MAX_EXPONENT)
18543
+ throw new Error('Mantissa and exponent are too large');
18544
+ exponent += 1;
18545
+ m /= BigInt(10);
18546
+ }
18547
+ if (isNegative)
18548
+ m = -m;
18549
+ return { mantissa: m, exponent };
18550
+ }
18551
+ /**
18552
+ * STNumber: Encodes XRPL's "Number" type.
18553
+ *
18554
+ * - Always encoded as 12 bytes: 8-byte signed mantissa, 4-byte signed exponent, both big-endian.
18555
+ * - Can only be constructed from a valid number string or another STNumber instance.
18556
+ *
18557
+ * Usage:
18558
+ * STNumber.from("1.2345e5")
18559
+ * STNumber.from("-123")
18560
+ * STNumber.fromParser(parser)
18561
+ */
18562
+ class STNumber extends serialized_type_1.SerializedType {
18563
+ /**
18564
+ * Construct a STNumber from 12 bytes (8 for mantissa, 4 for exponent).
18565
+ * @param bytes - 12-byte Uint8Array
18566
+ * @throws Error if input is not a Uint8Array of length 12.
18567
+ */
18568
+ constructor(bytes) {
18569
+ const used = bytes !== null && bytes !== void 0 ? bytes : STNumber.defaultBytes;
18570
+ if (!(used instanceof Uint8Array) || used.length !== 12) {
18571
+ throw new Error(`STNumber must be constructed from a 12-byte Uint8Array, got ${used === null || used === void 0 ? void 0 : used.length}`);
18572
+ }
18573
+ super(used);
18574
+ }
18575
+ /**
18576
+ * Construct from a number string (or another STNumber).
18577
+ *
18578
+ * @param value - A string, or STNumber instance.
18579
+ * @returns STNumber instance.
18580
+ * @throws Error if not a string or STNumber.
19213
18581
  */
19214
- static from(value, definitions = enums_1.DEFAULT_DEFINITIONS) {
19215
- if (value instanceof STArray) {
18582
+ static from(value) {
18583
+ if (value instanceof STNumber) {
19216
18584
  return value;
19217
18585
  }
19218
- if (isObjects(value)) {
19219
- const bytes = [];
19220
- value.forEach((obj) => {
19221
- bytes.push(st_object_1.STObject.from(obj, undefined, definitions).toBytes());
19222
- });
19223
- bytes.push(ARRAY_END_MARKER);
19224
- return new STArray((0, utils_1.concat)(bytes));
18586
+ if (typeof value === 'string') {
18587
+ return STNumber.fromValue(value);
19225
18588
  }
19226
- throw new Error('Cannot construct STArray from value given');
18589
+ throw new Error('STNumber.from: Only string or STNumber instance is supported');
19227
18590
  }
19228
18591
  /**
19229
- * Return the JSON representation of this.bytes
18592
+ * Construct from a number string (integer, decimal, or scientific notation).
18593
+ * Handles normalization to XRPL Number constraints.
19230
18594
  *
19231
- * @param definitions optional, types and values to use to encode/decode a transaction
19232
- * @returns An Array of JSON objects
18595
+ * @param val - The number as a string (e.g. '1.23', '-123e5').
18596
+ * @returns STNumber instance
18597
+ * @throws Error if val is not a valid number string.
19233
18598
  */
19234
- toJSON(definitions = enums_1.DEFAULT_DEFINITIONS) {
19235
- const result = [];
19236
- const arrayParser = new binary_parser_1.BinaryParser(this.toString(), definitions);
19237
- while (!arrayParser.end()) {
19238
- const field = arrayParser.readField();
19239
- if (field.name === ARRAY_END_MARKER_NAME) {
19240
- break;
19241
- }
19242
- const outer = {};
19243
- outer[field.name] = st_object_1.STObject.fromParser(arrayParser).toJSON(definitions);
19244
- result.push(outer);
18599
+ static fromValue(val) {
18600
+ const { mantissa, exponent, isNegative } = extractNumberPartsFromString(val);
18601
+ let normalizedMantissa;
18602
+ let normalizedExponent;
18603
+ if (mantissa === BigInt(0) && exponent === 0 && !isNegative) {
18604
+ normalizedMantissa = BigInt(0);
18605
+ normalizedExponent = DEFAULT_VALUE_EXPONENT;
19245
18606
  }
19246
- return result;
18607
+ else {
18608
+ ;
18609
+ ({ mantissa: normalizedMantissa, exponent: normalizedExponent } =
18610
+ normalize(mantissa, exponent));
18611
+ }
18612
+ const bytes = new Uint8Array(12);
18613
+ (0, utils_1.writeInt64BE)(bytes, normalizedMantissa, 0);
18614
+ (0, utils_1.writeInt32BE)(bytes, normalizedExponent, 8);
18615
+ return new STNumber(bytes);
19247
18616
  }
19248
- }
19249
- exports.STArray = STArray;
18617
+ /**
18618
+ * Read a STNumber from a BinaryParser stream (12 bytes).
18619
+ * @param parser - BinaryParser positioned at the start of a number
18620
+ * @returns STNumber instance
18621
+ */
18622
+ static fromParser(parser) {
18623
+ return new STNumber(parser.read(12));
18624
+ }
18625
+ /**
18626
+ * Convert this STNumber to a normalized string representation.
18627
+ * The output is decimal or scientific notation, depending on exponent range.
18628
+ * Follows XRPL convention: zero is "0", other values are normalized to a canonical string.
18629
+ *
18630
+ * @returns String representation of the value
18631
+ */
18632
+ // eslint-disable-next-line complexity -- required
18633
+ toJSON() {
18634
+ const b = this.bytes;
18635
+ if (!b || b.length !== 12)
18636
+ throw new Error('STNumber internal bytes not set or wrong length');
18637
+ // Signed 64-bit mantissa
18638
+ const mantissa = (0, utils_1.readInt64BE)(b, 0);
18639
+ // Signed 32-bit exponent
18640
+ const exponent = (0, utils_1.readInt32BE)(b, 8);
18641
+ // Special zero: XRPL encodes canonical zero as mantissa=0, exponent=DEFAULT_VALUE_EXPONENT.
18642
+ if (mantissa === BigInt(0) && exponent === DEFAULT_VALUE_EXPONENT) {
18643
+ return '0';
18644
+ }
18645
+ if (exponent === 0)
18646
+ return mantissa.toString();
18647
+ // Use scientific notation for small/large exponents, decimal otherwise
18648
+ if (exponent < -25 || exponent > -5) {
18649
+ return `${mantissa}e${exponent}`;
18650
+ }
18651
+ // Decimal rendering for -25 <= exp <= -5
18652
+ const isNegative = mantissa < BigInt(0);
18653
+ const mantissaAbs = mantissa < BigInt(0) ? -mantissa : mantissa;
18654
+ const padPrefix = 27;
18655
+ const padSuffix = 23;
18656
+ const mantissaStr = mantissaAbs.toString();
18657
+ const rawValue = '0'.repeat(padPrefix) + mantissaStr + '0'.repeat(padSuffix);
18658
+ const OFFSET = exponent + 43;
18659
+ const integerPart = rawValue.slice(0, OFFSET).replace(/^0+/, '') || '0';
18660
+ const fractionPart = rawValue.slice(OFFSET).replace(/0+$/, '');
18661
+ return `${isNegative ? '-' : ''}${integerPart}${fractionPart ? '.' + fractionPart : ''}`;
18662
+ }
18663
+ }
18664
+ exports.STNumber = STNumber;
18665
+ /** 12 zero bytes, represents canonical zero. */
18666
+ STNumber.defaultBytes = new Uint8Array(12);
19250
18667
 
19251
18668
 
19252
18669
  /***/ }),
@@ -19378,13 +18795,18 @@ class STObject extends serialized_type_1.SerializedType {
19378
18795
  sorted = sorted.filter(filter);
19379
18796
  }
19380
18797
  sorted.forEach((field) => {
18798
+ var _a;
19381
18799
  const associatedValue = field.type.name === ST_OBJECT
19382
18800
  ? this.from(xAddressDecoded[field.name], undefined, definitions)
19383
18801
  : field.type.name === 'STArray'
19384
18802
  ? st_array_1.STArray.from(xAddressDecoded[field.name], definitions)
19385
18803
  : field.type.name === 'UInt64'
19386
18804
  ? uint_64_1.UInt64.from(xAddressDecoded[field.name], field.name)
19387
- : field.associatedType.from(xAddressDecoded[field.name]);
18805
+ : ((_a = field.associatedType) === null || _a === void 0 ? void 0 : _a.from)
18806
+ ? field.associatedType.from(xAddressDecoded[field.name])
18807
+ : (() => {
18808
+ throw new Error(`Type ${field.type.name} for field ${field.name} is missing associatedType.from`);
18809
+ })();
19388
18810
  if (associatedValue == undefined) {
19389
18811
  throw new TypeError(`Unable to interpret "${field.name}: ${xAddressDecoded[field.name]}".`);
19390
18812
  }
@@ -19974,7 +19396,7 @@ XChainBridge.TYPE_ORDER = [
19974
19396
  "use strict";
19975
19397
 
19976
19398
  Object.defineProperty(exports, "__esModule", ({ value: true }));
19977
- exports.compare = exports.equal = exports.readUInt32BE = exports.readUInt16BE = exports.writeUInt32BE = exports.writeUInt16BE = exports.writeUInt8 = void 0;
19399
+ exports.compare = exports.equal = exports.readInt64BE = exports.readInt32BE = exports.readUInt32BE = exports.readUInt16BE = exports.writeInt64BE = exports.writeInt32BE = exports.writeUInt32BE = exports.writeUInt16BE = exports.writeUInt8 = void 0;
19978
19400
  /**
19979
19401
  * Writes value to array at the specified offset. The value must be a valid unsigned 8-bit integer.
19980
19402
  * @param array Uint8Array to be written to
@@ -20011,6 +19433,28 @@ function writeUInt32BE(array, value, offset) {
20011
19433
  array[offset + 3] = value & 0xff;
20012
19434
  }
20013
19435
  exports.writeUInt32BE = writeUInt32BE;
19436
+ /**
19437
+ * Writes a signed 32-bit integer to a Uint8Array at the specified offset (big-endian).
19438
+ *
19439
+ * @param array - The Uint8Array to write to.
19440
+ * @param value - The signed 32-bit integer to write.
19441
+ * @param offset - The offset at which to write.
19442
+ */
19443
+ function writeInt32BE(array, value, offset) {
19444
+ new DataView(array.buffer, array.byteOffset, array.byteLength).setInt32(offset, value, false);
19445
+ }
19446
+ exports.writeInt32BE = writeInt32BE;
19447
+ /**
19448
+ * Writes a signed 64-bit integer (BigInt) to a Uint8Array at the specified offset (big-endian).
19449
+ *
19450
+ * @param array - The Uint8Array to write to.
19451
+ * @param value - The signed 64-bit integer (BigInt) to write.
19452
+ * @param offset - The offset at which to write.
19453
+ */
19454
+ function writeInt64BE(array, value, offset) {
19455
+ new DataView(array.buffer, array.byteOffset, array.byteLength).setBigInt64(offset, value, false);
19456
+ }
19457
+ exports.writeInt64BE = writeInt64BE;
20014
19458
  /**
20015
19459
  * Reads an unsigned, big-endian 16-bit integer from the array at the specified offset.
20016
19460
  * @param array Uint8Array to read
@@ -20029,6 +19473,28 @@ function readUInt32BE(array, offset) {
20029
19473
  return new DataView(array.buffer).getUint32(offset, false).toString(10);
20030
19474
  }
20031
19475
  exports.readUInt32BE = readUInt32BE;
19476
+ /**
19477
+ * Reads a signed 32-bit integer from a Uint8Array at the specified offset (big-endian).
19478
+ *
19479
+ * @param array - The Uint8Array to read from.
19480
+ * @param offset - The offset at which to start reading.
19481
+ * @returns The signed 32-bit integer.
19482
+ */
19483
+ function readInt32BE(array, offset) {
19484
+ return new DataView(array.buffer, array.byteOffset, array.byteLength).getInt32(offset, false);
19485
+ }
19486
+ exports.readInt32BE = readInt32BE;
19487
+ /**
19488
+ * Reads a signed 64-bit integer (BigInt) from a Uint8Array at the specified offset (big-endian).
19489
+ *
19490
+ * @param array - The Uint8Array to read from.
19491
+ * @param offset - The offset at which to start reading.
19492
+ * @returns The signed 64-bit integer (BigInt).
19493
+ */
19494
+ function readInt64BE(array, offset) {
19495
+ return new DataView(array.buffer, array.byteOffset, array.byteLength).getBigInt64(offset, false);
19496
+ }
19497
+ exports.readInt64BE = readInt64BE;
20032
19498
  /**
20033
19499
  * Compares two Uint8Array or ArrayBuffers
20034
19500
  * @param a first array to compare
@@ -20590,14 +20056,17 @@ var FaucetNetwork;
20590
20056
  (function (FaucetNetwork) {
20591
20057
  FaucetNetwork["Testnet"] = "faucet.altnet.rippletest.net";
20592
20058
  FaucetNetwork["Devnet"] = "faucet.devnet.rippletest.net";
20059
+ FaucetNetwork["WasmDevnet"] = "wasmfaucet.devnet.rippletest.net";
20593
20060
  })(FaucetNetwork || (exports.FaucetNetwork = FaucetNetwork = {}));
20594
20061
  exports.faucetNetworkPaths = {
20595
20062
  [FaucetNetwork.Testnet]: '/accounts',
20596
20063
  [FaucetNetwork.Devnet]: '/accounts',
20064
+ [FaucetNetwork.WasmDevnet]: '/accounts',
20597
20065
  };
20598
20066
  exports.faucetNetworkIDs = new Map([
20599
20067
  [1, FaucetNetwork.Testnet],
20600
20068
  [2, FaucetNetwork.Devnet],
20069
+ [2002, FaucetNetwork.WasmDevnet],
20601
20070
  ]);
20602
20071
  function getFaucetHost(client) {
20603
20072
  if (client.networkID == null) {
@@ -21976,18 +21445,12 @@ class Client extends eventemitter3_1.EventEmitter {
21976
21445
  if (tx.TransactionType === 'Batch') {
21977
21446
  promises.push((0, autofill_1.autofillBatchTxn)(this, tx));
21978
21447
  }
21979
- if (tx.TransactionType === 'Payment') {
21448
+ if (tx.TransactionType === 'Payment' && tx.DeliverMax != null) {
21980
21449
  (0, autofill_1.handleDeliverMax)(tx);
21981
21450
  }
21982
21451
  return Promise.all(promises).then(() => tx);
21983
21452
  });
21984
21453
  }
21985
- submit(transaction, opts) {
21986
- return __awaiter(this, void 0, void 0, function* () {
21987
- const signedTx = yield (0, sugar_1.getSignedTx)(this, transaction, opts);
21988
- return (0, sugar_1.submitRequest)(this, signedTx, opts === null || opts === void 0 ? void 0 : opts.failHard);
21989
- });
21990
- }
21991
21454
  simulate(transaction, opts) {
21992
21455
  var _a;
21993
21456
  return __awaiter(this, void 0, void 0, function* () {
@@ -21998,6 +21461,12 @@ class Client extends eventemitter3_1.EventEmitter {
21998
21461
  return this.request(request);
21999
21462
  });
22000
21463
  }
21464
+ submit(transaction, opts) {
21465
+ return __awaiter(this, void 0, void 0, function* () {
21466
+ const signedTx = yield (0, sugar_1.getSignedTx)(this, transaction, opts);
21467
+ return (0, sugar_1.submitRequest)(this, signedTx, opts === null || opts === void 0 ? void 0 : opts.failHard);
21468
+ });
21469
+ }
22001
21470
  submitAndWait(transaction, opts) {
22002
21471
  return __awaiter(this, void 0, void 0, function* () {
22003
21472
  const signedTx = yield (0, sugar_1.getSignedTx)(this, transaction, opts);
@@ -22006,6 +21475,9 @@ class Client extends eventemitter3_1.EventEmitter {
22006
21475
  throw new errors_1.ValidationError('Transaction must contain a LastLedgerSequence value for reliable submission.');
22007
21476
  }
22008
21477
  const response = yield (0, sugar_1.submitRequest)(this, signedTx, opts === null || opts === void 0 ? void 0 : opts.failHard);
21478
+ if (response.result.engine_result.startsWith('tem')) {
21479
+ throw new errors_1.XrplError(`Transaction failed, ${response.result.engine_result}: ${response.result.engine_result_message}`);
21480
+ }
22009
21481
  const txHash = utils_1.hashes.hashSignedTx(signedTx);
22010
21482
  return (0, sugar_1.waitForFinalTransactionOutcome)(this, txHash, lastLedger, response.result.engine_result);
22011
21483
  });
@@ -22155,7 +21627,7 @@ function amountsEqual(amt1, amt2) {
22155
21627
  aValue.isEqualTo(bValue));
22156
21628
  }
22157
21629
  function isPartialPayment(tx, metadata) {
22158
- var _a;
21630
+ var _a, _b;
22159
21631
  if (tx == null || metadata == null || tx.TransactionType !== 'Payment') {
22160
21632
  return false;
22161
21633
  }
@@ -22173,7 +21645,7 @@ function isPartialPayment(tx, metadata) {
22173
21645
  return false;
22174
21646
  }
22175
21647
  const delivered = meta.delivered_amount;
22176
- const amount = tx.DeliverMax;
21648
+ const amount = (_b = tx.DeliverMax) !== null && _b !== void 0 ? _b : tx.Amount;
22177
21649
  if (delivered === undefined) {
22178
21650
  return false;
22179
21651
  }
@@ -22626,13 +22098,13 @@ function validateAMMBid(tx) {
22626
22098
  if (tx.Asset == null) {
22627
22099
  throw new errors_1.ValidationError('AMMBid: missing field Asset');
22628
22100
  }
22629
- if (!(0, common_1.isCurrency)(tx.Asset)) {
22101
+ if (!(0, common_1.isIssuedCurrency)(tx.Asset)) {
22630
22102
  throw new errors_1.ValidationError('AMMBid: Asset must be a Currency');
22631
22103
  }
22632
22104
  if (tx.Asset2 == null) {
22633
22105
  throw new errors_1.ValidationError('AMMBid: missing field Asset2');
22634
22106
  }
22635
- if (!(0, common_1.isCurrency)(tx.Asset2)) {
22107
+ if (!(0, common_1.isIssuedCurrency)(tx.Asset2)) {
22636
22108
  throw new errors_1.ValidationError('AMMBid: Asset2 must be a Currency');
22637
22109
  }
22638
22110
  if (tx.BidMin != null && !(0, common_1.isAmount)(tx.BidMin)) {
@@ -22642,7 +22114,7 @@ function validateAMMBid(tx) {
22642
22114
  throw new errors_1.ValidationError('AMMBid: BidMax must be an Amount');
22643
22115
  }
22644
22116
  if (tx.AuthAccounts != null) {
22645
- if (!Array.isArray(tx.AuthAccounts)) {
22117
+ if (!(0, common_1.isArray)(tx.AuthAccounts)) {
22646
22118
  throw new errors_1.ValidationError(`AMMBid: AuthAccounts must be an AuthAccount array`);
22647
22119
  }
22648
22120
  if (tx.AuthAccounts.length > MAX_AUTH_ACCOUNTS) {
@@ -22654,8 +22126,10 @@ function validateAMMBid(tx) {
22654
22126
  exports.validateAMMBid = validateAMMBid;
22655
22127
  function validateAuthAccounts(senderAddress, authAccounts) {
22656
22128
  for (const authAccount of authAccounts) {
22657
- if (authAccount.AuthAccount == null ||
22658
- typeof authAccount.AuthAccount !== 'object') {
22129
+ if (!(0, common_1.isRecord)(authAccount)) {
22130
+ throw new errors_1.ValidationError(`AMMBid: invalid AuthAccounts`);
22131
+ }
22132
+ if (!(0, common_1.isRecord)(authAccount.AuthAccount)) {
22659
22133
  throw new errors_1.ValidationError(`AMMBid: invalid AuthAccounts`);
22660
22134
  }
22661
22135
  if (authAccount.AuthAccount.Account == null) {
@@ -22693,22 +22167,21 @@ var AMMClawbackFlags;
22693
22167
  function validateAMMClawback(tx) {
22694
22168
  (0, common_1.validateBaseTransaction)(tx);
22695
22169
  (0, common_1.validateRequiredField)(tx, 'Holder', common_1.isAccount);
22696
- (0, common_1.validateRequiredField)(tx, 'Asset', common_1.isCurrency);
22170
+ (0, common_1.validateRequiredField)(tx, 'Asset', common_1.isIssuedCurrency);
22697
22171
  const asset = tx.Asset;
22698
- const amount = tx.Amount;
22699
22172
  if (tx.Holder === asset.issuer) {
22700
22173
  throw new errors_1.ValidationError('AMMClawback: Holder and Asset.issuer must be distinct');
22701
22174
  }
22702
22175
  if (tx.Account !== asset.issuer) {
22703
22176
  throw new errors_1.ValidationError('AMMClawback: Account must be the same as Asset.issuer');
22704
22177
  }
22705
- (0, common_1.validateRequiredField)(tx, 'Asset2', common_1.isCurrency);
22706
- (0, common_1.validateOptionalField)(tx, 'Amount', common_1.isAmount);
22178
+ (0, common_1.validateRequiredField)(tx, 'Asset2', common_1.isIssuedCurrency);
22179
+ (0, common_1.validateOptionalField)(tx, 'Amount', common_1.isIssuedCurrencyAmount);
22707
22180
  if (tx.Amount != null) {
22708
- if (amount.currency !== asset.currency) {
22181
+ if (tx.Amount.currency !== asset.currency) {
22709
22182
  throw new errors_1.ValidationError('AMMClawback: Amount.currency must match Asset.currency');
22710
22183
  }
22711
- if (amount.issuer !== asset.issuer) {
22184
+ if (tx.Amount.issuer !== asset.issuer) {
22712
22185
  throw new errors_1.ValidationError('AMMClawback: Amount.issuer must match Amount.issuer');
22713
22186
  }
22714
22187
  }
@@ -22777,13 +22250,13 @@ function validateAMMDelete(tx) {
22777
22250
  if (tx.Asset == null) {
22778
22251
  throw new errors_1.ValidationError('AMMDelete: missing field Asset');
22779
22252
  }
22780
- if (!(0, common_1.isCurrency)(tx.Asset)) {
22253
+ if (!(0, common_1.isIssuedCurrency)(tx.Asset)) {
22781
22254
  throw new errors_1.ValidationError('AMMDelete: Asset must be a Currency');
22782
22255
  }
22783
22256
  if (tx.Asset2 == null) {
22784
22257
  throw new errors_1.ValidationError('AMMDelete: missing field Asset2');
22785
22258
  }
22786
- if (!(0, common_1.isCurrency)(tx.Asset2)) {
22259
+ if (!(0, common_1.isIssuedCurrency)(tx.Asset2)) {
22787
22260
  throw new errors_1.ValidationError('AMMDelete: Asset2 must be a Currency');
22788
22261
  }
22789
22262
  }
@@ -22818,13 +22291,13 @@ function validateAMMDeposit(tx) {
22818
22291
  if (tx.Asset == null) {
22819
22292
  throw new errors_1.ValidationError('AMMDeposit: missing field Asset');
22820
22293
  }
22821
- if (!(0, common_1.isCurrency)(tx.Asset)) {
22294
+ if (!(0, common_1.isIssuedCurrency)(tx.Asset)) {
22822
22295
  throw new errors_1.ValidationError('AMMDeposit: Asset must be a Currency');
22823
22296
  }
22824
22297
  if (tx.Asset2 == null) {
22825
22298
  throw new errors_1.ValidationError('AMMDeposit: missing field Asset2');
22826
22299
  }
22827
- if (!(0, common_1.isCurrency)(tx.Asset2)) {
22300
+ if (!(0, common_1.isIssuedCurrency)(tx.Asset2)) {
22828
22301
  throw new errors_1.ValidationError('AMMDeposit: Asset2 must be a Currency');
22829
22302
  }
22830
22303
  if (tx.Amount2 != null && tx.Amount == null) {
@@ -22836,7 +22309,7 @@ function validateAMMDeposit(tx) {
22836
22309
  else if (tx.LPTokenOut == null && tx.Amount == null) {
22837
22310
  throw new errors_1.ValidationError('AMMDeposit: must set at least LPTokenOut or Amount');
22838
22311
  }
22839
- if (tx.LPTokenOut != null && !(0, common_1.isIssuedCurrency)(tx.LPTokenOut)) {
22312
+ if (tx.LPTokenOut != null && !(0, common_1.isIssuedCurrencyAmount)(tx.LPTokenOut)) {
22840
22313
  throw new errors_1.ValidationError('AMMDeposit: LPTokenOut must be an IssuedCurrencyAmount');
22841
22314
  }
22842
22315
  if (tx.Amount != null && !(0, common_1.isAmount)(tx.Amount)) {
@@ -22872,13 +22345,13 @@ function validateAMMVote(tx) {
22872
22345
  if (tx.Asset == null) {
22873
22346
  throw new errors_1.ValidationError('AMMVote: missing field Asset');
22874
22347
  }
22875
- if (!(0, common_1.isCurrency)(tx.Asset)) {
22348
+ if (!(0, common_1.isIssuedCurrency)(tx.Asset)) {
22876
22349
  throw new errors_1.ValidationError('AMMVote: Asset must be a Currency');
22877
22350
  }
22878
22351
  if (tx.Asset2 == null) {
22879
22352
  throw new errors_1.ValidationError('AMMVote: missing field Asset2');
22880
22353
  }
22881
- if (!(0, common_1.isCurrency)(tx.Asset2)) {
22354
+ if (!(0, common_1.isIssuedCurrency)(tx.Asset2)) {
22882
22355
  throw new errors_1.ValidationError('AMMVote: Asset2 must be a Currency');
22883
22356
  }
22884
22357
  if (tx.TradingFee == null) {
@@ -22923,13 +22396,13 @@ function validateAMMWithdraw(tx) {
22923
22396
  if (tx.Asset == null) {
22924
22397
  throw new errors_1.ValidationError('AMMWithdraw: missing field Asset');
22925
22398
  }
22926
- if (!(0, common_1.isCurrency)(tx.Asset)) {
22399
+ if (!(0, common_1.isIssuedCurrency)(tx.Asset)) {
22927
22400
  throw new errors_1.ValidationError('AMMWithdraw: Asset must be a Currency');
22928
22401
  }
22929
22402
  if (tx.Asset2 == null) {
22930
22403
  throw new errors_1.ValidationError('AMMWithdraw: missing field Asset2');
22931
22404
  }
22932
- if (!(0, common_1.isCurrency)(tx.Asset2)) {
22405
+ if (!(0, common_1.isIssuedCurrency)(tx.Asset2)) {
22933
22406
  throw new errors_1.ValidationError('AMMWithdraw: Asset2 must be a Currency');
22934
22407
  }
22935
22408
  if (tx.Amount2 != null && tx.Amount == null) {
@@ -22938,7 +22411,7 @@ function validateAMMWithdraw(tx) {
22938
22411
  else if (tx.EPrice != null && tx.Amount == null) {
22939
22412
  throw new errors_1.ValidationError('AMMWithdraw: must set Amount with EPrice');
22940
22413
  }
22941
- if (tx.LPTokenIn != null && !(0, common_1.isIssuedCurrency)(tx.LPTokenIn)) {
22414
+ if (tx.LPTokenIn != null && !(0, common_1.isIssuedCurrencyAmount)(tx.LPTokenIn)) {
22942
22415
  throw new errors_1.ValidationError('AMMWithdraw: LPTokenIn must be an IssuedCurrencyAmount');
22943
22416
  }
22944
22417
  if (tx.Amount != null && !(0, common_1.isAmount)(tx.Amount)) {
@@ -23146,7 +22619,7 @@ var MPTokenIssuanceCreateFlags;
23146
22619
  MPTokenIssuanceCreateFlags[MPTokenIssuanceCreateFlags["tfMPTCanClawback"] = 64] = "tfMPTCanClawback";
23147
22620
  })(MPTokenIssuanceCreateFlags || (exports.MPTokenIssuanceCreateFlags = MPTokenIssuanceCreateFlags = {}));
23148
22621
  function validateMPTokenIssuanceCreate(tx) {
23149
- var _a;
22622
+ var _a, _b;
23150
22623
  (0, common_1.validateBaseTransaction)(tx);
23151
22624
  (0, common_1.validateOptionalField)(tx, 'MaximumAmount', common_1.isString);
23152
22625
  (0, common_1.validateOptionalField)(tx, 'MPTokenMetadata', common_1.isString);
@@ -23168,10 +22641,10 @@ function validateMPTokenIssuanceCreate(tx) {
23168
22641
  }
23169
22642
  }
23170
22643
  if (typeof tx.TransferFee === 'number') {
23171
- const flags = tx.Flags;
22644
+ const flags = ((_a = tx.Flags) !== null && _a !== void 0 ? _a : 0);
23172
22645
  const isTfMPTCanTransfer = typeof flags === 'number'
23173
22646
  ? (0, utils_1.isFlagEnabled)(flags, MPTokenIssuanceCreateFlags.tfMPTCanTransfer)
23174
- : (_a = flags.tfMPTCanTransfer) !== null && _a !== void 0 ? _a : false;
22647
+ : (_b = flags.tfMPTCanTransfer) !== null && _b !== void 0 ? _b : false;
23175
22648
  if (tx.TransferFee < 0 || tx.TransferFee > MAX_TRANSFER_FEE) {
23176
22649
  throw new errors_1.ValidationError(`MPTokenIssuanceCreate: TransferFee must be between 0 and ${MAX_TRANSFER_FEE}`);
23177
22650
  }
@@ -23224,17 +22697,17 @@ var MPTokenIssuanceSetFlags;
23224
22697
  MPTokenIssuanceSetFlags[MPTokenIssuanceSetFlags["tfMPTUnlock"] = 2] = "tfMPTUnlock";
23225
22698
  })(MPTokenIssuanceSetFlags || (exports.MPTokenIssuanceSetFlags = MPTokenIssuanceSetFlags = {}));
23226
22699
  function validateMPTokenIssuanceSet(tx) {
23227
- var _a, _b;
22700
+ var _a, _b, _c;
23228
22701
  (0, common_1.validateBaseTransaction)(tx);
23229
22702
  (0, common_1.validateRequiredField)(tx, 'MPTokenIssuanceID', common_1.isString);
23230
22703
  (0, common_1.validateOptionalField)(tx, 'Holder', common_1.isAccount);
23231
- const flags = tx.Flags;
22704
+ const flags = ((_a = tx.Flags) !== null && _a !== void 0 ? _a : 0);
23232
22705
  const isTfMPTLock = typeof flags === 'number'
23233
22706
  ? (0, utils_1.isFlagEnabled)(flags, MPTokenIssuanceSetFlags.tfMPTLock)
23234
- : (_a = flags.tfMPTLock) !== null && _a !== void 0 ? _a : false;
22707
+ : (_b = flags.tfMPTLock) !== null && _b !== void 0 ? _b : false;
23235
22708
  const isTfMPTUnlock = typeof flags === 'number'
23236
22709
  ? (0, utils_1.isFlagEnabled)(flags, MPTokenIssuanceSetFlags.tfMPTUnlock)
23237
- : (_b = flags.tfMPTUnlock) !== null && _b !== void 0 ? _b : false;
22710
+ : (_c = flags.tfMPTUnlock) !== null && _c !== void 0 ? _c : false;
23238
22711
  if (isTfMPTLock && isTfMPTUnlock) {
23239
22712
  throw new errors_1.ValidationError('MPTokenIssuanceSet: flag conflict');
23240
22713
  }
@@ -23317,7 +22790,7 @@ const errors_1 = __webpack_require__(/*! ../../errors */ "./dist/npm/errors.js")
23317
22790
  const common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
23318
22791
  function validateNFTokenCancelOffer(tx) {
23319
22792
  (0, common_1.validateBaseTransaction)(tx);
23320
- if (!Array.isArray(tx.NFTokenOffers)) {
22793
+ if (!(0, common_1.isArray)(tx.NFTokenOffers)) {
23321
22794
  throw new errors_1.ValidationError('NFTokenCancelOffer: missing field NFTokenOffers');
23322
22795
  }
23323
22796
  if (tx.NFTokenOffers.length < 1) {
@@ -23360,6 +22833,7 @@ function validateNFTokenBuyOfferCases(tx) {
23360
22833
  }
23361
22834
  }
23362
22835
  function validateNFTokenCreateOffer(tx) {
22836
+ var _a, _b;
23363
22837
  (0, common_1.validateBaseTransaction)(tx);
23364
22838
  if (tx.Account === tx.Owner) {
23365
22839
  throw new errors_1.ValidationError('NFTokenCreateOffer: Owner and Account must not be equal');
@@ -23375,8 +22849,11 @@ function validateNFTokenCreateOffer(tx) {
23375
22849
  if (!(0, common_1.isAmount)(tx.Amount)) {
23376
22850
  throw new errors_1.ValidationError('NFTokenCreateOffer: invalid Amount');
23377
22851
  }
23378
- if (typeof tx.Flags === 'number' &&
23379
- (0, utils_1.isFlagEnabled)(tx.Flags, NFTokenCreateOfferFlags.tfSellNFToken)) {
22852
+ const flags = ((_a = tx.Flags) !== null && _a !== void 0 ? _a : 0);
22853
+ const isTfSellNFToken = typeof flags === 'number'
22854
+ ? (0, utils_1.isFlagEnabled)(flags, NFTokenCreateOfferFlags.tfSellNFToken)
22855
+ : (_b = flags.tfSellNFToken) !== null && _b !== void 0 ? _b : false;
22856
+ if (isTfSellNFToken) {
23380
22857
  validateNFTokenSellOfferCases(tx);
23381
22858
  }
23382
22859
  else {
@@ -23931,8 +23408,7 @@ function validateCheckCreate(tx) {
23931
23408
  }
23932
23409
  (0, common_1.validateRequiredField)(tx, 'Destination', common_1.isAccount);
23933
23410
  (0, common_1.validateOptionalField)(tx, 'DestinationTag', common_1.isNumber);
23934
- if (typeof tx.SendMax !== 'string' &&
23935
- !(0, common_1.isIssuedCurrency)(tx.SendMax)) {
23411
+ if (typeof tx.SendMax !== 'string' && !(0, common_1.isIssuedCurrencyAmount)(tx.SendMax)) {
23936
23412
  throw new errors_1.ValidationError('CheckCreate: invalid SendMax');
23937
23413
  }
23938
23414
  if (tx.Expiration !== undefined && typeof tx.Expiration !== 'number') {
@@ -23961,20 +23437,18 @@ const errors_1 = __webpack_require__(/*! ../../errors */ "./dist/npm/errors.js")
23961
23437
  const common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
23962
23438
  function validateClawback(tx) {
23963
23439
  (0, common_1.validateBaseTransaction)(tx);
23440
+ (0, common_1.validateRequiredField)(tx, 'Amount', common_1.isClawbackAmount);
23964
23441
  (0, common_1.validateOptionalField)(tx, 'Holder', common_1.isAccount);
23965
- if (tx.Amount == null) {
23966
- throw new errors_1.ValidationError('Clawback: missing field Amount');
23967
- }
23968
- if (!(0, common_1.isIssuedCurrency)(tx.Amount) && !(0, common_1.isMPTAmount)(tx.Amount)) {
23442
+ if (!(0, common_1.isIssuedCurrencyAmount)(tx.Amount) && !(0, common_1.isMPTAmount)(tx.Amount)) {
23969
23443
  throw new errors_1.ValidationError('Clawback: invalid Amount');
23970
23444
  }
23971
- if ((0, common_1.isIssuedCurrency)(tx.Amount) && tx.Account === tx.Amount.issuer) {
23445
+ if ((0, common_1.isIssuedCurrencyAmount)(tx.Amount) && tx.Account === tx.Amount.issuer) {
23972
23446
  throw new errors_1.ValidationError('Clawback: invalid holder Account');
23973
23447
  }
23974
23448
  if ((0, common_1.isMPTAmount)(tx.Amount) && tx.Account === tx.Holder) {
23975
23449
  throw new errors_1.ValidationError('Clawback: invalid holder Account');
23976
23450
  }
23977
- if ((0, common_1.isIssuedCurrency)(tx.Amount) && tx.Holder) {
23451
+ if ((0, common_1.isIssuedCurrencyAmount)(tx.Amount) && tx.Holder) {
23978
23452
  throw new errors_1.ValidationError('Clawback: cannot have Holder for currency');
23979
23453
  }
23980
23454
  if ((0, common_1.isMPTAmount)(tx.Amount) && !tx.Holder) {
@@ -23995,7 +23469,7 @@ exports.validateClawback = validateClawback;
23995
23469
  "use strict";
23996
23470
 
23997
23471
  Object.defineProperty(exports, "__esModule", ({ value: true }));
23998
- exports.containsDuplicates = exports.validateCredentialsList = exports.validateCredentialType = exports.parseAmountValue = exports.validateBaseTransaction = exports.GlobalFlags = exports.validateOptionalField = exports.validateRequiredField = exports.isArray = exports.isXChainBridge = exports.isAmount = exports.isAccount = exports.isMPTAmount = exports.isAuthorizeCredential = exports.isIssuedCurrency = exports.isCurrency = exports.isNumber = exports.isString = exports.isRecord = exports.MAX_AUTHORIZED_CREDENTIALS = void 0;
23472
+ exports.containsDuplicates = exports.validateCredentialsList = exports.validateCredentialType = exports.parseAmountValue = exports.validateBaseTransaction = exports.GlobalFlags = exports.validateOptionalField = exports.validateRequiredField = exports.isArray = exports.isXChainBridge = exports.isAmount = exports.isAccount = exports.isClawbackAmount = exports.isMPTAmount = exports.isAuthorizeCredential = exports.isIssuedCurrencyAmount = exports.isIssuedCurrency = exports.isCurrency = exports.isXRPLNumber = exports.isNumber = exports.isString = exports.isRecord = exports.VAULT_DATA_MAX_BYTE_LENGTH = exports.MAX_AUTHORIZED_CREDENTIALS = void 0;
23999
23473
  const utils_1 = __webpack_require__(/*! @xrplf/isomorphic/utils */ "../../node_modules/@xrplf/isomorphic/dist/utils/browser.js");
24000
23474
  const ripple_address_codec_1 = __webpack_require__(/*! ripple-address-codec */ "../../node_modules/ripple-address-codec/dist/index.js");
24001
23475
  const ripple_binary_codec_1 = __webpack_require__(/*! ripple-binary-codec */ "../../node_modules/ripple-binary-codec/dist/index.js");
@@ -24005,15 +23479,20 @@ const MEMO_SIZE = 3;
24005
23479
  exports.MAX_AUTHORIZED_CREDENTIALS = 8;
24006
23480
  const MAX_CREDENTIAL_BYTE_LENGTH = 64;
24007
23481
  const MAX_CREDENTIAL_TYPE_LENGTH = MAX_CREDENTIAL_BYTE_LENGTH * 2;
23482
+ exports.VAULT_DATA_MAX_BYTE_LENGTH = 256;
24008
23483
  function isMemo(obj) {
24009
- if (obj.Memo == null) {
23484
+ if (!isRecord(obj)) {
24010
23485
  return false;
24011
23486
  }
24012
23487
  const memo = obj.Memo;
23488
+ if (!isRecord(memo)) {
23489
+ return false;
23490
+ }
24013
23491
  const size = Object.keys(memo).length;
24014
- const validData = memo.MemoData == null || typeof memo.MemoData === 'string';
24015
- const validFormat = memo.MemoFormat == null || typeof memo.MemoFormat === 'string';
24016
- const validType = memo.MemoType == null || typeof memo.MemoType === 'string';
23492
+ const validData = memo.MemoData == null || (isString(memo.MemoData) && (0, utils_2.isHex)(memo.MemoData));
23493
+ const validFormat = memo.MemoFormat == null ||
23494
+ (isString(memo.MemoFormat) && (0, utils_2.isHex)(memo.MemoFormat));
23495
+ const validType = memo.MemoType == null || (isString(memo.MemoType) && (0, utils_2.isHex)(memo.MemoType));
24017
23496
  return (size >= 1 &&
24018
23497
  size <= MEMO_SIZE &&
24019
23498
  validData &&
@@ -24023,15 +23502,17 @@ function isMemo(obj) {
24023
23502
  }
24024
23503
  const SIGNER_SIZE = 3;
24025
23504
  function isSigner(obj) {
24026
- const signerWrapper = obj;
24027
- if (signerWrapper.Signer == null) {
23505
+ if (!isRecord(obj)) {
23506
+ return false;
23507
+ }
23508
+ const signer = obj.Signer;
23509
+ if (!isRecord(signer)) {
24028
23510
  return false;
24029
23511
  }
24030
- const signer = signerWrapper.Signer;
24031
23512
  return (Object.keys(signer).length === SIGNER_SIZE &&
24032
- typeof signer.Account === 'string' &&
24033
- typeof signer.TxnSignature === 'string' &&
24034
- typeof signer.SigningPubKey === 'string');
23513
+ isString(signer.Account) &&
23514
+ isString(signer.TxnSignature) &&
23515
+ isString(signer.SigningPubKey));
24035
23516
  }
24036
23517
  const XRP_CURRENCY_SIZE = 1;
24037
23518
  const ISSUE_SIZE = 2;
@@ -24040,7 +23521,7 @@ const XCHAIN_BRIDGE_SIZE = 4;
24040
23521
  const MPTOKEN_SIZE = 2;
24041
23522
  const AUTHORIZE_CREDENTIAL_SIZE = 1;
24042
23523
  function isRecord(value) {
24043
- return value !== null && typeof value === 'object';
23524
+ return value !== null && typeof value === 'object' && !Array.isArray(value);
24044
23525
  }
24045
23526
  exports.isRecord = isRecord;
24046
23527
  function isString(str) {
@@ -24051,23 +23532,32 @@ function isNumber(num) {
24051
23532
  return typeof num === 'number';
24052
23533
  }
24053
23534
  exports.isNumber = isNumber;
23535
+ function isXRPLNumber(value) {
23536
+ return (typeof value === 'string' &&
23537
+ /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)?$/u.test(value.trim()));
23538
+ }
23539
+ exports.isXRPLNumber = isXRPLNumber;
24054
23540
  function isCurrency(input) {
23541
+ return isString(input) || isIssuedCurrency(input);
23542
+ }
23543
+ exports.isCurrency = isCurrency;
23544
+ function isIssuedCurrency(input) {
24055
23545
  return (isRecord(input) &&
24056
23546
  ((Object.keys(input).length === ISSUE_SIZE &&
24057
- typeof input.issuer === 'string' &&
24058
- typeof input.currency === 'string') ||
23547
+ isString(input.issuer) &&
23548
+ isString(input.currency)) ||
24059
23549
  (Object.keys(input).length === XRP_CURRENCY_SIZE &&
24060
23550
  input.currency === 'XRP')));
24061
23551
  }
24062
- exports.isCurrency = isCurrency;
24063
- function isIssuedCurrency(input) {
23552
+ exports.isIssuedCurrency = isIssuedCurrency;
23553
+ function isIssuedCurrencyAmount(input) {
24064
23554
  return (isRecord(input) &&
24065
23555
  Object.keys(input).length === ISSUED_CURRENCY_SIZE &&
24066
- typeof input.value === 'string' &&
24067
- typeof input.issuer === 'string' &&
24068
- typeof input.currency === 'string');
23556
+ isString(input.value) &&
23557
+ isString(input.issuer) &&
23558
+ isString(input.currency));
24069
23559
  }
24070
- exports.isIssuedCurrency = isIssuedCurrency;
23560
+ exports.isIssuedCurrencyAmount = isIssuedCurrencyAmount;
24071
23561
  function isAuthorizeCredential(input) {
24072
23562
  return (isRecord(input) &&
24073
23563
  isRecord(input.Credential) &&
@@ -24083,6 +23573,10 @@ function isMPTAmount(input) {
24083
23573
  typeof input.mpt_issuance_id === 'string');
24084
23574
  }
24085
23575
  exports.isMPTAmount = isMPTAmount;
23576
+ function isClawbackAmount(input) {
23577
+ return isIssuedCurrencyAmount(input) || isMPTAmount(input);
23578
+ }
23579
+ exports.isClawbackAmount = isClawbackAmount;
24086
23580
  function isAccount(account) {
24087
23581
  return (typeof account === 'string' &&
24088
23582
  ((0, ripple_address_codec_1.isValidClassicAddress)(account) || (0, ripple_address_codec_1.isValidXAddress)(account)));
@@ -24090,7 +23584,7 @@ function isAccount(account) {
24090
23584
  exports.isAccount = isAccount;
24091
23585
  function isAmount(amount) {
24092
23586
  return (typeof amount === 'string' ||
24093
- isIssuedCurrency(amount) ||
23587
+ isIssuedCurrencyAmount(amount) ||
24094
23588
  isMPTAmount(amount));
24095
23589
  }
24096
23590
  exports.isAmount = isAmount;
@@ -24098,13 +23592,13 @@ function isXChainBridge(input) {
24098
23592
  return (isRecord(input) &&
24099
23593
  Object.keys(input).length === XCHAIN_BRIDGE_SIZE &&
24100
23594
  typeof input.LockingChainDoor === 'string' &&
24101
- isCurrency(input.LockingChainIssue) &&
23595
+ isIssuedCurrency(input.LockingChainIssue) &&
24102
23596
  typeof input.IssuingChainDoor === 'string' &&
24103
- isCurrency(input.IssuingChainIssue));
23597
+ isIssuedCurrency(input.IssuingChainIssue));
24104
23598
  }
24105
23599
  exports.isXChainBridge = isXChainBridge;
24106
23600
  function isArray(input) {
24107
- return Array.isArray(input);
23601
+ return input != null && Array.isArray(input);
24108
23602
  }
24109
23603
  exports.isArray = isArray;
24110
23604
  function validateRequiredField(tx, param, checkValidity, errorOpts = {}) {
@@ -24133,6 +23627,9 @@ var GlobalFlags;
24133
23627
  GlobalFlags[GlobalFlags["tfInnerBatchTxn"] = 1073741824] = "tfInnerBatchTxn";
24134
23628
  })(GlobalFlags || (exports.GlobalFlags = GlobalFlags = {}));
24135
23629
  function validateBaseTransaction(common) {
23630
+ if (!isRecord(common)) {
23631
+ throw new errors_1.ValidationError('BaseTransaction: invalid, expected a valid object');
23632
+ }
24136
23633
  if (common.TransactionType === undefined) {
24137
23634
  throw new errors_1.ValidationError('BaseTransaction: missing field TransactionType');
24138
23635
  }
@@ -24148,12 +23645,12 @@ function validateBaseTransaction(common) {
24148
23645
  validateOptionalField(common, 'AccountTxnID', isString);
24149
23646
  validateOptionalField(common, 'LastLedgerSequence', isNumber);
24150
23647
  const memos = common.Memos;
24151
- if (memos !== undefined && !memos.every(isMemo)) {
23648
+ if (memos != null && (!isArray(memos) || !memos.every(isMemo))) {
24152
23649
  throw new errors_1.ValidationError('BaseTransaction: invalid Memos');
24153
23650
  }
24154
23651
  const signers = common.Signers;
24155
- if (signers !== undefined &&
24156
- (signers.length === 0 || !signers.every(isSigner))) {
23652
+ if (signers != null &&
23653
+ (!isArray(signers) || signers.length === 0 || !signers.every(isSigner))) {
24157
23654
  throw new errors_1.ValidationError('BaseTransaction: invalid Signers');
24158
23655
  }
24159
23656
  validateOptionalField(common, 'SourceTag', isNumber);
@@ -24203,7 +23700,7 @@ function validateCredentialsList(credentials, transactionType, isStringID, maxCr
24203
23700
  if (credentials == null) {
24204
23701
  return;
24205
23702
  }
24206
- if (!Array.isArray(credentials)) {
23703
+ if (!isArray(credentials)) {
24207
23704
  throw new errors_1.ValidationError(`${transactionType}: Credentials must be an array`);
24208
23705
  }
24209
23706
  if (credentials.length > maxCredentials) {
@@ -24444,8 +23941,10 @@ function validateEscrowCreate(tx) {
24444
23941
  if (tx.CancelAfter === undefined && tx.FinishAfter === undefined) {
24445
23942
  throw new errors_1.ValidationError('EscrowCreate: Either CancelAfter or FinishAfter must be specified');
24446
23943
  }
24447
- if (tx.FinishAfter === undefined && tx.Condition === undefined) {
24448
- throw new errors_1.ValidationError('EscrowCreate: Either Condition or FinishAfter must be specified');
23944
+ if (tx.FinishAfter === undefined &&
23945
+ tx.Condition === undefined &&
23946
+ tx.FinishFunction === undefined) {
23947
+ throw new errors_1.ValidationError('EscrowCreate: Either FinishAfter, Condition, or FinishFunction must be specified');
24449
23948
  }
24450
23949
  if (tx.CancelAfter !== undefined && typeof tx.CancelAfter !== 'number') {
24451
23950
  throw new errors_1.ValidationError('EscrowCreate: CancelAfter must be a number');
@@ -24521,7 +24020,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
24521
24020
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
24522
24021
  };
24523
24022
  Object.defineProperty(exports, "__esModule", ({ value: true }));
24524
- exports.XChainModifyBridgeFlags = exports.TrustSetFlags = exports.PaymentChannelClaimFlags = exports.PaymentFlags = exports.OfferCreateFlags = exports.validateNFTokenModify = exports.NFTokenMintFlags = exports.NFTokenCreateOfferFlags = exports.MPTokenIssuanceSetFlags = exports.MPTokenIssuanceCreateFlags = exports.MPTokenAuthorizeFlags = exports.EnableAmendmentFlags = exports.AMMWithdrawFlags = exports.AMMDepositFlags = exports.AMMClawbackFlags = exports.AccountSetTfFlags = exports.AccountSetAsfFlags = exports.validate = exports.isMPTAmount = void 0;
24023
+ exports.XChainModifyBridgeFlags = exports.VaultWithdrawalPolicy = exports.VaultCreateFlags = exports.TrustSetFlags = exports.PaymentChannelClaimFlags = exports.PaymentFlags = exports.OfferCreateFlags = exports.validateNFTokenModify = exports.NFTokenMintFlags = exports.NFTokenCreateOfferFlags = exports.MPTokenIssuanceSetFlags = exports.MPTokenIssuanceCreateFlags = exports.MPTokenAuthorizeFlags = exports.EnableAmendmentFlags = exports.AMMWithdrawFlags = exports.AMMDepositFlags = exports.AMMClawbackFlags = exports.AccountSetTfFlags = exports.AccountSetAsfFlags = exports.validate = exports.isMPTAmount = void 0;
24525
24024
  var common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
24526
24025
  Object.defineProperty(exports, "isMPTAmount", ({ enumerable: true, get: function () { return common_1.isMPTAmount; } }));
24527
24026
  var transaction_1 = __webpack_require__(/*! ./transaction */ "./dist/npm/models/transactions/transaction.js");
@@ -24558,6 +24057,9 @@ var paymentChannelClaim_1 = __webpack_require__(/*! ./paymentChannelClaim */ "./
24558
24057
  Object.defineProperty(exports, "PaymentChannelClaimFlags", ({ enumerable: true, get: function () { return paymentChannelClaim_1.PaymentChannelClaimFlags; } }));
24559
24058
  var trustSet_1 = __webpack_require__(/*! ./trustSet */ "./dist/npm/models/transactions/trustSet.js");
24560
24059
  Object.defineProperty(exports, "TrustSetFlags", ({ enumerable: true, get: function () { return trustSet_1.TrustSetFlags; } }));
24060
+ var vaultCreate_1 = __webpack_require__(/*! ./vaultCreate */ "./dist/npm/models/transactions/vaultCreate.js");
24061
+ Object.defineProperty(exports, "VaultCreateFlags", ({ enumerable: true, get: function () { return vaultCreate_1.VaultCreateFlags; } }));
24062
+ Object.defineProperty(exports, "VaultWithdrawalPolicy", ({ enumerable: true, get: function () { return vaultCreate_1.VaultWithdrawalPolicy; } }));
24561
24063
  var XChainModifyBridge_1 = __webpack_require__(/*! ./XChainModifyBridge */ "./dist/npm/models/transactions/XChainModifyBridge.js");
24562
24064
  Object.defineProperty(exports, "XChainModifyBridgeFlags", ({ enumerable: true, get: function () { return XChainModifyBridge_1.XChainModifyBridgeFlags; } }));
24563
24065
 
@@ -24706,54 +24208,55 @@ function validateOracleSet(tx) {
24706
24208
  (0, common_1.validateOptionalField)(tx, 'URI', common_1.isString);
24707
24209
  (0, common_1.validateOptionalField)(tx, 'AssetClass', common_1.isString);
24708
24210
  (0, common_1.validateRequiredField)(tx, 'PriceDataSeries', (value) => {
24709
- if (!Array.isArray(value)) {
24211
+ if (!(0, common_1.isArray)(value)) {
24710
24212
  throw new errors_1.ValidationError('OracleSet: PriceDataSeries must be an array');
24711
24213
  }
24712
24214
  if (value.length > PRICE_DATA_SERIES_MAX_LENGTH) {
24713
24215
  throw new errors_1.ValidationError(`OracleSet: PriceDataSeries must have at most ${PRICE_DATA_SERIES_MAX_LENGTH} PriceData objects`);
24714
24216
  }
24715
24217
  for (const priceData of value) {
24716
- if (typeof priceData !== 'object') {
24218
+ if (!(0, common_1.isRecord)(priceData)) {
24717
24219
  throw new errors_1.ValidationError('OracleSet: PriceDataSeries must be an array of objects');
24718
24220
  }
24719
- if (priceData.PriceData == null) {
24221
+ const priceDataInner = priceData.PriceData;
24222
+ if (!(0, common_1.isRecord)(priceDataInner)) {
24720
24223
  throw new errors_1.ValidationError('OracleSet: PriceDataSeries must have a `PriceData` object');
24721
24224
  }
24722
24225
  if (Object.keys(priceData).length !== 1) {
24723
24226
  throw new errors_1.ValidationError('OracleSet: PriceDataSeries must only have a single PriceData object');
24724
24227
  }
24725
- if (typeof priceData.PriceData.BaseAsset !== 'string') {
24228
+ if (priceDataInner.BaseAsset == null ||
24229
+ typeof priceDataInner.BaseAsset !== 'string') {
24726
24230
  throw new errors_1.ValidationError('OracleSet: PriceDataSeries must have a `BaseAsset` string');
24727
24231
  }
24728
- if (typeof priceData.PriceData.QuoteAsset !== 'string') {
24232
+ if (typeof priceDataInner.QuoteAsset !== 'string') {
24729
24233
  throw new errors_1.ValidationError('OracleSet: PriceDataSeries must have a `QuoteAsset` string');
24730
24234
  }
24731
- if ((priceData.PriceData.AssetPrice == null) !==
24732
- (priceData.PriceData.Scale == null)) {
24235
+ if ((priceDataInner.AssetPrice == null) !==
24236
+ (priceDataInner.Scale == null)) {
24733
24237
  throw new errors_1.ValidationError('OracleSet: PriceDataSeries must have both `AssetPrice` and `Scale` if any are present');
24734
24238
  }
24735
- if ('AssetPrice' in priceData.PriceData) {
24736
- if (!(0, common_1.isNumber)(priceData.PriceData.AssetPrice)) {
24737
- if (typeof priceData.PriceData.AssetPrice !== 'string') {
24239
+ if ('AssetPrice' in priceDataInner) {
24240
+ if (!(0, common_1.isNumber)(priceDataInner.AssetPrice)) {
24241
+ if (typeof priceDataInner.AssetPrice !== 'string') {
24738
24242
  throw new errors_1.ValidationError('OracleSet: Field AssetPrice must be a string or a number');
24739
24243
  }
24740
- if (!(0, utils_1.isHex)(priceData.PriceData.AssetPrice)) {
24244
+ if (!(0, utils_1.isHex)(priceDataInner.AssetPrice)) {
24741
24245
  throw new errors_1.ValidationError('OracleSet: Field AssetPrice must be a valid hex string');
24742
24246
  }
24743
- if (priceData.PriceData.AssetPrice.length <
24744
- MINIMUM_ASSET_PRICE_LENGTH ||
24745
- priceData.PriceData.AssetPrice.length > MAXIMUM_ASSET_PRICE_LENGTH) {
24247
+ if (priceDataInner.AssetPrice.length < MINIMUM_ASSET_PRICE_LENGTH ||
24248
+ priceDataInner.AssetPrice.length > MAXIMUM_ASSET_PRICE_LENGTH) {
24746
24249
  throw new errors_1.ValidationError(`OracleSet: Length of AssetPrice field must be between ${MINIMUM_ASSET_PRICE_LENGTH} and ${MAXIMUM_ASSET_PRICE_LENGTH} characters long`);
24747
24250
  }
24748
24251
  }
24749
24252
  }
24750
- if ('Scale' in priceData.PriceData &&
24751
- !(0, common_1.isNumber)(priceData.PriceData.Scale)) {
24752
- throw new errors_1.ValidationError('OracleSet: invalid field Scale');
24753
- }
24754
- if (priceData.PriceData.Scale < 0 ||
24755
- priceData.PriceData.Scale > SCALE_MAX) {
24756
- throw new errors_1.ValidationError(`OracleSet: Scale must be in range 0-${SCALE_MAX}`);
24253
+ if ('Scale' in priceDataInner) {
24254
+ if (!(0, common_1.isNumber)(priceDataInner.Scale)) {
24255
+ throw new errors_1.ValidationError('OracleSet: invalid field Scale');
24256
+ }
24257
+ if (priceDataInner.Scale < 0 || priceDataInner.Scale > SCALE_MAX) {
24258
+ throw new errors_1.ValidationError(`OracleSet: Scale must be in range 0-${SCALE_MAX}`);
24259
+ }
24757
24260
  }
24758
24261
  }
24759
24262
  return true;
@@ -24797,14 +24300,16 @@ function validatePayment(tx) {
24797
24300
  if (tx.InvoiceID !== undefined && typeof tx.InvoiceID !== 'string') {
24798
24301
  throw new errors_1.ValidationError('PaymentTransaction: InvoiceID must be a string');
24799
24302
  }
24800
- if (tx.Paths !== undefined &&
24801
- !isPaths(tx.Paths)) {
24303
+ if (tx.Paths !== undefined && !isPaths(tx.Paths)) {
24802
24304
  throw new errors_1.ValidationError('PaymentTransaction: invalid Paths');
24803
24305
  }
24804
24306
  if (tx.SendMax !== undefined && !(0, common_1.isAmount)(tx.SendMax)) {
24805
24307
  throw new errors_1.ValidationError('PaymentTransaction: invalid SendMax');
24806
24308
  }
24807
24309
  checkPartialPayment(tx);
24310
+ if (tx.DeliverMax != null) {
24311
+ throw new errors_1.ValidationError('PaymentTransaction: Cannot have DeliverMax in a submitted transaction');
24312
+ }
24808
24313
  }
24809
24314
  exports.validatePayment = validatePayment;
24810
24315
  function checkPartialPayment(tx) {
@@ -24858,11 +24363,11 @@ function isPath(path) {
24858
24363
  return true;
24859
24364
  }
24860
24365
  function isPaths(paths) {
24861
- if (!Array.isArray(paths) || paths.length === 0) {
24366
+ if (!(0, common_1.isArray)(paths) || paths.length === 0) {
24862
24367
  return false;
24863
24368
  }
24864
24369
  for (const path of paths) {
24865
- if (!Array.isArray(path) || path.length === 0) {
24370
+ if (!(0, common_1.isArray)(path) || path.length === 0) {
24866
24371
  return false;
24867
24372
  }
24868
24373
  if (!isPath(path)) {
@@ -25079,21 +24584,11 @@ const MAX_SIGNERS = 32;
25079
24584
  const HEX_WALLET_LOCATOR_REGEX = /^[0-9A-Fa-f]{64}$/u;
25080
24585
  function validateSignerListSet(tx) {
25081
24586
  (0, common_1.validateBaseTransaction)(tx);
25082
- if (tx.SignerQuorum === undefined) {
25083
- throw new errors_1.ValidationError('SignerListSet: missing field SignerQuorum');
25084
- }
25085
- if (typeof tx.SignerQuorum !== 'number') {
25086
- throw new errors_1.ValidationError('SignerListSet: invalid SignerQuorum');
25087
- }
24587
+ (0, common_1.validateRequiredField)(tx, 'SignerQuorum', common_1.isNumber);
25088
24588
  if (tx.SignerQuorum === 0) {
25089
24589
  return;
25090
24590
  }
25091
- if (tx.SignerEntries === undefined) {
25092
- throw new errors_1.ValidationError('SignerListSet: missing field SignerEntries');
25093
- }
25094
- if (!(0, common_1.isArray)(tx.SignerEntries)) {
25095
- throw new errors_1.ValidationError('SignerListSet: invalid SignerEntries');
25096
- }
24591
+ (0, common_1.validateRequiredField)(tx, 'SignerEntries', common_1.isArray);
25097
24592
  if (tx.SignerEntries.length === 0) {
25098
24593
  throw new errors_1.ValidationError('SignerListSet: need at least 1 member in SignerEntries');
25099
24594
  }
@@ -25101,10 +24596,14 @@ function validateSignerListSet(tx) {
25101
24596
  throw new errors_1.ValidationError(`SignerListSet: maximum of ${MAX_SIGNERS} members allowed in SignerEntries`);
25102
24597
  }
25103
24598
  for (const entry of tx.SignerEntries) {
25104
- const signerEntry = entry;
25105
- const { WalletLocator } = signerEntry.SignerEntry;
25106
- if (WalletLocator !== undefined &&
25107
- !HEX_WALLET_LOCATOR_REGEX.test(WalletLocator)) {
24599
+ if (!(0, common_1.isRecord)(entry) || !(0, common_1.isRecord)(entry.SignerEntry)) {
24600
+ throw new errors_1.ValidationError('SignerListSet: SignerEntries must be an array of SignerEntry objects');
24601
+ }
24602
+ const signerEntry = entry.SignerEntry;
24603
+ const { WalletLocator } = signerEntry;
24604
+ if (WalletLocator != null &&
24605
+ (!(0, common_1.isString)(WalletLocator) ||
24606
+ !HEX_WALLET_LOCATOR_REGEX.test(WalletLocator))) {
25108
24607
  throw new errors_1.ValidationError(`SignerListSet: WalletLocator in SignerEntry must be a 256-bit (32-byte) hexadecimal value`);
25109
24608
  }
25110
24609
  }
@@ -25158,7 +24657,6 @@ exports.validateTicketCreate = validateTicketCreate;
25158
24657
  Object.defineProperty(exports, "__esModule", ({ value: true }));
25159
24658
  exports.validate = void 0;
25160
24659
  const errors_1 = __webpack_require__(/*! ../../errors */ "./dist/npm/errors.js");
25161
- const utils_1 = __webpack_require__(/*! ../utils */ "./dist/npm/models/utils/index.js");
25162
24660
  const flags_1 = __webpack_require__(/*! ../utils/flags */ "./dist/npm/models/utils/flags.js");
25163
24661
  const accountDelete_1 = __webpack_require__(/*! ./accountDelete */ "./dist/npm/models/transactions/accountDelete.js");
25164
24662
  const accountSet_1 = __webpack_require__(/*! ./accountSet */ "./dist/npm/models/transactions/accountSet.js");
@@ -25209,6 +24707,12 @@ const setRegularKey_1 = __webpack_require__(/*! ./setRegularKey */ "./dist/npm/m
25209
24707
  const signerListSet_1 = __webpack_require__(/*! ./signerListSet */ "./dist/npm/models/transactions/signerListSet.js");
25210
24708
  const ticketCreate_1 = __webpack_require__(/*! ./ticketCreate */ "./dist/npm/models/transactions/ticketCreate.js");
25211
24709
  const trustSet_1 = __webpack_require__(/*! ./trustSet */ "./dist/npm/models/transactions/trustSet.js");
24710
+ const vaultClawback_1 = __webpack_require__(/*! ./vaultClawback */ "./dist/npm/models/transactions/vaultClawback.js");
24711
+ const vaultCreate_1 = __webpack_require__(/*! ./vaultCreate */ "./dist/npm/models/transactions/vaultCreate.js");
24712
+ const vaultDelete_1 = __webpack_require__(/*! ./vaultDelete */ "./dist/npm/models/transactions/vaultDelete.js");
24713
+ const vaultDeposit_1 = __webpack_require__(/*! ./vaultDeposit */ "./dist/npm/models/transactions/vaultDeposit.js");
24714
+ const vaultSet_1 = __webpack_require__(/*! ./vaultSet */ "./dist/npm/models/transactions/vaultSet.js");
24715
+ const vaultWithdraw_1 = __webpack_require__(/*! ./vaultWithdraw */ "./dist/npm/models/transactions/vaultWithdraw.js");
25212
24716
  const XChainAccountCreateCommit_1 = __webpack_require__(/*! ./XChainAccountCreateCommit */ "./dist/npm/models/transactions/XChainAccountCreateCommit.js");
25213
24717
  const XChainAddAccountCreateAttestation_1 = __webpack_require__(/*! ./XChainAddAccountCreateAttestation */ "./dist/npm/models/transactions/XChainAddAccountCreateAttestation.js");
25214
24718
  const XChainAddClaimAttestation_1 = __webpack_require__(/*! ./XChainAddClaimAttestation */ "./dist/npm/models/transactions/XChainAddClaimAttestation.js");
@@ -25219,42 +24723,12 @@ const XChainCreateClaimID_1 = __webpack_require__(/*! ./XChainCreateClaimID */ "
25219
24723
  const XChainModifyBridge_1 = __webpack_require__(/*! ./XChainModifyBridge */ "./dist/npm/models/transactions/XChainModifyBridge.js");
25220
24724
  function validate(transaction) {
25221
24725
  const tx = Object.assign({}, transaction);
25222
- if (tx.TransactionType == null) {
25223
- throw new errors_1.ValidationError('Object does not have a `TransactionType`');
25224
- }
25225
- if (typeof tx.TransactionType !== 'string') {
25226
- throw new errors_1.ValidationError("Object's `TransactionType` is not a string");
25227
- }
25228
- if (tx.Memos != null && typeof tx.Memos !== 'object') {
25229
- throw new errors_1.ValidationError('Memo must be array');
25230
- }
25231
- if (tx.Memos != null) {
25232
- ;
25233
- tx.Memos.forEach((memo) => {
25234
- if ((memo === null || memo === void 0 ? void 0 : memo.Memo) == null) {
25235
- throw new errors_1.ValidationError('Memo data must be in a `Memo` field');
25236
- }
25237
- if (memo.Memo.MemoData) {
25238
- if (!(0, utils_1.isHex)(memo.Memo.MemoData)) {
25239
- throw new errors_1.ValidationError('MemoData field must be a hex value');
25240
- }
25241
- }
25242
- if (memo.Memo.MemoType) {
25243
- if (!(0, utils_1.isHex)(memo.Memo.MemoType)) {
25244
- throw new errors_1.ValidationError('MemoType field must be a hex value');
25245
- }
25246
- }
25247
- if (memo.Memo.MemoFormat) {
25248
- if (!(0, utils_1.isHex)(memo.Memo.MemoFormat)) {
25249
- throw new errors_1.ValidationError('MemoFormat field must be a hex value');
25250
- }
25251
- }
25252
- });
25253
- }
24726
+ (0, common_1.validateBaseTransaction)(tx);
25254
24727
  Object.keys(tx).forEach((key) => {
25255
24728
  const standard_currency_code_len = 3;
25256
- if (tx[key] && (0, common_1.isIssuedCurrency)(tx[key])) {
25257
- const txCurrency = tx[key].currency;
24729
+ const value = tx[key];
24730
+ if (value && (0, common_1.isIssuedCurrencyAmount)(value)) {
24731
+ const txCurrency = value.currency;
25258
24732
  if (txCurrency.length === standard_currency_code_len &&
25259
24733
  txCurrency.toUpperCase() === 'XRP') {
25260
24734
  throw new errors_1.ValidationError(`Cannot have an issued currency with a similar standard code to XRP (received '${txCurrency}'). XRP is not an issued currency.`);
@@ -25410,6 +24884,24 @@ function validate(transaction) {
25410
24884
  case 'TrustSet':
25411
24885
  (0, trustSet_1.validateTrustSet)(tx);
25412
24886
  break;
24887
+ case 'VaultClawback':
24888
+ (0, vaultClawback_1.validateVaultClawback)(tx);
24889
+ break;
24890
+ case 'VaultCreate':
24891
+ (0, vaultCreate_1.validateVaultCreate)(tx);
24892
+ break;
24893
+ case 'VaultDelete':
24894
+ (0, vaultDelete_1.validateVaultDelete)(tx);
24895
+ break;
24896
+ case 'VaultDeposit':
24897
+ (0, vaultDeposit_1.validateVaultDeposit)(tx);
24898
+ break;
24899
+ case 'VaultSet':
24900
+ (0, vaultSet_1.validateVaultSet)(tx);
24901
+ break;
24902
+ case 'VaultWithdraw':
24903
+ (0, vaultWithdraw_1.validateVaultWithdraw)(tx);
24904
+ break;
25413
24905
  case 'XChainAccountCreateCommit':
25414
24906
  (0, XChainAccountCreateCommit_1.validateXChainAccountCreateCommit)(tx);
25415
24907
  break;
@@ -25484,6 +24976,187 @@ function validateTrustSet(tx) {
25484
24976
  exports.validateTrustSet = validateTrustSet;
25485
24977
 
25486
24978
 
24979
+ /***/ }),
24980
+
24981
+ /***/ "./dist/npm/models/transactions/vaultClawback.js":
24982
+ /*!*******************************************************!*\
24983
+ !*** ./dist/npm/models/transactions/vaultClawback.js ***!
24984
+ \*******************************************************/
24985
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
24986
+
24987
+ "use strict";
24988
+
24989
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
24990
+ exports.validateVaultClawback = void 0;
24991
+ const common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
24992
+ function validateVaultClawback(tx) {
24993
+ (0, common_1.validateBaseTransaction)(tx);
24994
+ (0, common_1.validateRequiredField)(tx, 'VaultID', common_1.isString);
24995
+ (0, common_1.validateRequiredField)(tx, 'Holder', common_1.isAccount);
24996
+ (0, common_1.validateOptionalField)(tx, 'Amount', common_1.isClawbackAmount);
24997
+ }
24998
+ exports.validateVaultClawback = validateVaultClawback;
24999
+
25000
+
25001
+ /***/ }),
25002
+
25003
+ /***/ "./dist/npm/models/transactions/vaultCreate.js":
25004
+ /*!*****************************************************!*\
25005
+ !*** ./dist/npm/models/transactions/vaultCreate.js ***!
25006
+ \*****************************************************/
25007
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
25008
+
25009
+ "use strict";
25010
+
25011
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
25012
+ exports.validateVaultCreate = exports.VaultCreateFlags = exports.VaultWithdrawalPolicy = void 0;
25013
+ const errors_1 = __webpack_require__(/*! ../../errors */ "./dist/npm/errors.js");
25014
+ const utils_1 = __webpack_require__(/*! ../utils */ "./dist/npm/models/utils/index.js");
25015
+ const common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
25016
+ const META_MAX_BYTE_LENGTH = 1024;
25017
+ var VaultWithdrawalPolicy;
25018
+ (function (VaultWithdrawalPolicy) {
25019
+ VaultWithdrawalPolicy[VaultWithdrawalPolicy["vaultStrategyFirstComeFirstServe"] = 1] = "vaultStrategyFirstComeFirstServe";
25020
+ })(VaultWithdrawalPolicy || (exports.VaultWithdrawalPolicy = VaultWithdrawalPolicy = {}));
25021
+ var VaultCreateFlags;
25022
+ (function (VaultCreateFlags) {
25023
+ VaultCreateFlags[VaultCreateFlags["tfVaultPrivate"] = 65536] = "tfVaultPrivate";
25024
+ VaultCreateFlags[VaultCreateFlags["tfVaultShareNonTransferable"] = 131072] = "tfVaultShareNonTransferable";
25025
+ })(VaultCreateFlags || (exports.VaultCreateFlags = VaultCreateFlags = {}));
25026
+ function validateVaultCreate(tx) {
25027
+ (0, common_1.validateBaseTransaction)(tx);
25028
+ (0, common_1.validateRequiredField)(tx, 'Asset', common_1.isCurrency);
25029
+ (0, common_1.validateOptionalField)(tx, 'Data', common_1.isString);
25030
+ (0, common_1.validateOptionalField)(tx, 'AssetsMaximum', common_1.isXRPLNumber);
25031
+ (0, common_1.validateOptionalField)(tx, 'MPTokenMetadata', common_1.isString);
25032
+ (0, common_1.validateOptionalField)(tx, 'WithdrawalPolicy', common_1.isNumber);
25033
+ (0, common_1.validateOptionalField)(tx, 'DomainID', common_1.isString);
25034
+ if (tx.Data !== undefined) {
25035
+ const dataHex = tx.Data;
25036
+ if (!(0, utils_1.isHex)(dataHex)) {
25037
+ throw new errors_1.ValidationError('VaultCreate: Data must be a valid hex string');
25038
+ }
25039
+ const dataByteLength = dataHex.length / 2;
25040
+ if (dataByteLength > common_1.VAULT_DATA_MAX_BYTE_LENGTH) {
25041
+ throw new errors_1.ValidationError(`VaultCreate: Data exceeds ${common_1.VAULT_DATA_MAX_BYTE_LENGTH} bytes (actual: ${dataByteLength})`);
25042
+ }
25043
+ }
25044
+ if (tx.MPTokenMetadata !== undefined) {
25045
+ const metaHex = tx.MPTokenMetadata;
25046
+ if (!(0, utils_1.isHex)(metaHex)) {
25047
+ throw new errors_1.ValidationError('VaultCreate: MPTokenMetadata must be a valid hex string');
25048
+ }
25049
+ const metaByteLength = metaHex.length / 2;
25050
+ if (metaByteLength > META_MAX_BYTE_LENGTH) {
25051
+ throw new errors_1.ValidationError(`VaultCreate: MPTokenMetadata exceeds ${META_MAX_BYTE_LENGTH} bytes (actual: ${metaByteLength})`);
25052
+ }
25053
+ }
25054
+ if (tx.DomainID !== undefined &&
25055
+ !(0, utils_1.hasFlag)(tx, VaultCreateFlags.tfVaultPrivate, 'tfVaultPrivate')) {
25056
+ throw new errors_1.ValidationError('VaultCreate: Cannot set DomainID unless tfVaultPrivate flag is set.');
25057
+ }
25058
+ }
25059
+ exports.validateVaultCreate = validateVaultCreate;
25060
+
25061
+
25062
+ /***/ }),
25063
+
25064
+ /***/ "./dist/npm/models/transactions/vaultDelete.js":
25065
+ /*!*****************************************************!*\
25066
+ !*** ./dist/npm/models/transactions/vaultDelete.js ***!
25067
+ \*****************************************************/
25068
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
25069
+
25070
+ "use strict";
25071
+
25072
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
25073
+ exports.validateVaultDelete = void 0;
25074
+ const common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
25075
+ function validateVaultDelete(tx) {
25076
+ (0, common_1.validateBaseTransaction)(tx);
25077
+ (0, common_1.validateRequiredField)(tx, 'VaultID', common_1.isString);
25078
+ }
25079
+ exports.validateVaultDelete = validateVaultDelete;
25080
+
25081
+
25082
+ /***/ }),
25083
+
25084
+ /***/ "./dist/npm/models/transactions/vaultDeposit.js":
25085
+ /*!******************************************************!*\
25086
+ !*** ./dist/npm/models/transactions/vaultDeposit.js ***!
25087
+ \******************************************************/
25088
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
25089
+
25090
+ "use strict";
25091
+
25092
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
25093
+ exports.validateVaultDeposit = void 0;
25094
+ const common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
25095
+ function validateVaultDeposit(tx) {
25096
+ (0, common_1.validateBaseTransaction)(tx);
25097
+ (0, common_1.validateRequiredField)(tx, 'VaultID', common_1.isString);
25098
+ (0, common_1.validateRequiredField)(tx, 'Amount', common_1.isAmount);
25099
+ }
25100
+ exports.validateVaultDeposit = validateVaultDeposit;
25101
+
25102
+
25103
+ /***/ }),
25104
+
25105
+ /***/ "./dist/npm/models/transactions/vaultSet.js":
25106
+ /*!**************************************************!*\
25107
+ !*** ./dist/npm/models/transactions/vaultSet.js ***!
25108
+ \**************************************************/
25109
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
25110
+
25111
+ "use strict";
25112
+
25113
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
25114
+ exports.validateVaultSet = void 0;
25115
+ const errors_1 = __webpack_require__(/*! ../../errors */ "./dist/npm/errors.js");
25116
+ const utils_1 = __webpack_require__(/*! ../utils */ "./dist/npm/models/utils/index.js");
25117
+ const common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
25118
+ function validateVaultSet(tx) {
25119
+ (0, common_1.validateBaseTransaction)(tx);
25120
+ (0, common_1.validateRequiredField)(tx, 'VaultID', common_1.isString);
25121
+ (0, common_1.validateOptionalField)(tx, 'Data', common_1.isString);
25122
+ (0, common_1.validateOptionalField)(tx, 'AssetsMaximum', common_1.isXRPLNumber);
25123
+ (0, common_1.validateOptionalField)(tx, 'DomainID', common_1.isString);
25124
+ if (tx.Data !== undefined) {
25125
+ const dataHex = tx.Data;
25126
+ if (!(0, utils_1.isHex)(dataHex)) {
25127
+ throw new errors_1.ValidationError('VaultSet: Data must be a valid hex string');
25128
+ }
25129
+ const dataByteLength = dataHex.length / 2;
25130
+ if (dataByteLength > common_1.VAULT_DATA_MAX_BYTE_LENGTH) {
25131
+ throw new errors_1.ValidationError(`VaultSet: Data exceeds ${common_1.VAULT_DATA_MAX_BYTE_LENGTH} bytes (actual: ${dataByteLength})`);
25132
+ }
25133
+ }
25134
+ }
25135
+ exports.validateVaultSet = validateVaultSet;
25136
+
25137
+
25138
+ /***/ }),
25139
+
25140
+ /***/ "./dist/npm/models/transactions/vaultWithdraw.js":
25141
+ /*!*******************************************************!*\
25142
+ !*** ./dist/npm/models/transactions/vaultWithdraw.js ***!
25143
+ \*******************************************************/
25144
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
25145
+
25146
+ "use strict";
25147
+
25148
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
25149
+ exports.validateVaultWithdraw = void 0;
25150
+ const common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
25151
+ function validateVaultWithdraw(tx) {
25152
+ (0, common_1.validateBaseTransaction)(tx);
25153
+ (0, common_1.validateRequiredField)(tx, 'VaultID', common_1.isString);
25154
+ (0, common_1.validateRequiredField)(tx, 'Amount', common_1.isAmount);
25155
+ (0, common_1.validateOptionalField)(tx, 'Destination', common_1.isAccount);
25156
+ }
25157
+ exports.validateVaultWithdraw = validateVaultWithdraw;
25158
+
25159
+
25487
25160
  /***/ }),
25488
25161
 
25489
25162
  /***/ "./dist/npm/models/utils/flags.js":
@@ -25513,6 +25186,7 @@ const offerCreate_1 = __webpack_require__(/*! ../transactions/offerCreate */ "./
25513
25186
  const payment_1 = __webpack_require__(/*! ../transactions/payment */ "./dist/npm/models/transactions/payment.js");
25514
25187
  const paymentChannelClaim_1 = __webpack_require__(/*! ../transactions/paymentChannelClaim */ "./dist/npm/models/transactions/paymentChannelClaim.js");
25515
25188
  const trustSet_1 = __webpack_require__(/*! ../transactions/trustSet */ "./dist/npm/models/transactions/trustSet.js");
25189
+ const vaultCreate_1 = __webpack_require__(/*! ../transactions/vaultCreate */ "./dist/npm/models/transactions/vaultCreate.js");
25516
25190
  const XChainModifyBridge_1 = __webpack_require__(/*! ../transactions/XChainModifyBridge */ "./dist/npm/models/transactions/XChainModifyBridge.js");
25517
25191
  const _1 = __webpack_require__(/*! . */ "./dist/npm/models/utils/index.js");
25518
25192
  function parseAccountRootFlags(flags) {
@@ -25541,6 +25215,7 @@ const txToFlag = {
25541
25215
  PaymentChannelClaim: paymentChannelClaim_1.PaymentChannelClaimFlags,
25542
25216
  Payment: payment_1.PaymentFlags,
25543
25217
  TrustSet: trustSet_1.TrustSetFlags,
25218
+ VaultCreate: vaultCreate_1.VaultCreateFlags,
25544
25219
  XChainModifyBridge: XChainModifyBridge_1.XChainModifyBridgeFlags,
25545
25220
  };
25546
25221
  function isTxToFlagKey(transactionType) {
@@ -25682,6 +25357,7 @@ const getFeeXrp_1 = __importDefault(__webpack_require__(/*! ./getFeeXrp */ "./di
25682
25357
  const LEDGER_OFFSET = 20;
25683
25358
  const RESTRICTED_NETWORKS = 1024;
25684
25359
  const REQUIRED_NETWORKID_VERSION = '1.11.0';
25360
+ const MICRO_DROPS_PER_DROP = 1000000;
25685
25361
  function isNotLaterRippledVersion(source, target) {
25686
25362
  if (source === target) {
25687
25363
  return true;
@@ -25804,18 +25480,38 @@ function fetchOwnerReserveFee(client) {
25804
25480
  return new bignumber_js_1.default(fee);
25805
25481
  });
25806
25482
  }
25483
+ function fetchGasPrice(client) {
25484
+ var _a;
25485
+ return __awaiter(this, void 0, void 0, function* () {
25486
+ const response = yield client.request({ command: 'server_state' });
25487
+ const gasPrice = (_a = response.result.state.validated_ledger) === null || _a === void 0 ? void 0 : _a.gas_price;
25488
+ if (gasPrice == null) {
25489
+ return Promise.reject(new Error('Could not fetch Owner Reserve.'));
25490
+ }
25491
+ return new bignumber_js_1.default(gasPrice);
25492
+ });
25493
+ }
25807
25494
  function calculateFeePerTransactionType(client, tx, signersCount = 0) {
25808
25495
  return __awaiter(this, void 0, void 0, function* () {
25809
25496
  const netFeeXRP = yield (0, getFeeXrp_1.default)(client);
25810
- const netFeeDrops = (0, utils_1.xrpToDrops)(netFeeXRP);
25811
- let baseFee = new bignumber_js_1.default(netFeeDrops);
25497
+ const netFeeDrops = new bignumber_js_1.default((0, utils_1.xrpToDrops)(netFeeXRP));
25498
+ let baseFee = netFeeDrops;
25812
25499
  const isSpecialTxCost = ['AccountDelete', 'AMMCreate'].includes(tx.TransactionType);
25813
- if (tx.TransactionType === 'EscrowFinish' && tx.Fulfillment != null) {
25814
- const fulfillmentBytesSize = Math.ceil(tx.Fulfillment.length / 2);
25815
- baseFee = new bignumber_js_1.default(scaleValue(netFeeDrops, 33 + fulfillmentBytesSize / 16));
25500
+ if (tx.TransactionType === 'EscrowCreate' && tx.FinishFunction != null) {
25501
+ baseFee = baseFee.plus(1000);
25816
25502
  }
25817
- else if (isSpecialTxCost) {
25818
- baseFee = yield fetchOwnerReserveFee(client);
25503
+ else if (tx.TransactionType === 'EscrowFinish') {
25504
+ if (tx.Fulfillment != null) {
25505
+ const fulfillmentBytesSize = Math.ceil(tx.Fulfillment.length / 2);
25506
+ baseFee = netFeeDrops.multipliedBy(33 + fulfillmentBytesSize / 16);
25507
+ }
25508
+ if (tx.ComputationAllowance != null) {
25509
+ const gasPrice = yield fetchGasPrice(client);
25510
+ const extraFee = gasPrice
25511
+ .multipliedBy(tx.ComputationAllowance)
25512
+ .dividedBy(MICRO_DROPS_PER_DROP);
25513
+ baseFee = baseFee.plus(extraFee);
25514
+ }
25819
25515
  }
25820
25516
  else if (tx.TransactionType === 'Batch') {
25821
25517
  const rawTxFees = yield tx.RawTransactions.reduce((acc, rawTxn) => __awaiter(this, void 0, void 0, function* () {
@@ -25825,8 +25521,11 @@ function calculateFeePerTransactionType(client, tx, signersCount = 0) {
25825
25521
  }), Promise.resolve(new bignumber_js_1.default(0)));
25826
25522
  baseFee = bignumber_js_1.default.sum(baseFee.times(2), rawTxFees);
25827
25523
  }
25524
+ else if (isSpecialTxCost) {
25525
+ baseFee = yield fetchOwnerReserveFee(client);
25526
+ }
25828
25527
  if (signersCount > 0) {
25829
- baseFee = bignumber_js_1.default.sum(baseFee, scaleValue(netFeeDrops, signersCount));
25528
+ baseFee = bignumber_js_1.default.sum(baseFee, netFeeDrops.multipliedBy(signersCount));
25830
25529
  }
25831
25530
  const maxFeeDrops = (0, utils_1.xrpToDrops)(client.maxFeeXRP);
25832
25531
  const totalFee = isSpecialTxCost
@@ -25842,9 +25541,6 @@ function getTransactionFee(client, tx, signersCount = 0) {
25842
25541
  });
25843
25542
  }
25844
25543
  exports.getTransactionFee = getTransactionFee;
25845
- function scaleValue(value, multiplier) {
25846
- return new bignumber_js_1.default(value).times(multiplier).toString();
25847
- }
25848
25544
  function setLatestValidatedLedgerSequence(client, tx) {
25849
25545
  return __awaiter(this, void 0, void 0, function* () {
25850
25546
  const ledgerSequence = yield client.getLedgerIndex();
@@ -26734,7 +26430,8 @@ class LeafNode extends node_1.Node {
26734
26430
  }
26735
26431
  addItem(tag, node) {
26736
26432
  throw new errors_1.XrplError('Cannot call addItem on a LeafNode');
26737
- this.addItem(tag, node);
26433
+ // removed by dead control flow
26434
+ {}
26738
26435
  }
26739
26436
  }
26740
26437
  exports["default"] = LeafNode;