xrpl 4.3.0 → 4.4.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 (349) 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 +1609 -1773
  4. package/build/xrpl-latest.js.map +1 -1
  5. package/dist/npm/client/index.d.ts +3 -3
  6. package/dist/npm/client/index.d.ts.map +1 -1
  7. package/dist/npm/client/index.js +10 -7
  8. package/dist/npm/client/index.js.map +1 -1
  9. package/dist/npm/client/partialPayment.d.ts.map +1 -1
  10. package/dist/npm/client/partialPayment.js +2 -2
  11. package/dist/npm/client/partialPayment.js.map +1 -1
  12. package/dist/npm/models/common/index.d.ts +17 -0
  13. package/dist/npm/models/common/index.d.ts.map +1 -1
  14. package/dist/npm/models/ledger/AccountRoot.d.ts +4 -2
  15. package/dist/npm/models/ledger/AccountRoot.d.ts.map +1 -1
  16. package/dist/npm/models/ledger/AccountRoot.js +1 -0
  17. package/dist/npm/models/ledger/AccountRoot.js.map +1 -1
  18. package/dist/npm/models/ledger/DirectoryNode.d.ts +1 -0
  19. package/dist/npm/models/ledger/DirectoryNode.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/LedgerEntry.d.ts +3 -2
  23. package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
  24. package/dist/npm/models/ledger/MPToken.d.ts +1 -0
  25. package/dist/npm/models/ledger/MPToken.d.ts.map +1 -1
  26. package/dist/npm/models/ledger/MPTokenIssuance.d.ts +1 -0
  27. package/dist/npm/models/ledger/MPTokenIssuance.d.ts.map +1 -1
  28. package/dist/npm/models/ledger/Offer.d.ts +10 -1
  29. package/dist/npm/models/ledger/Offer.d.ts.map +1 -1
  30. package/dist/npm/models/ledger/Offer.js +1 -0
  31. package/dist/npm/models/ledger/Offer.js.map +1 -1
  32. package/dist/npm/models/ledger/Vault.d.ts +21 -0
  33. package/dist/npm/models/ledger/Vault.d.ts.map +1 -0
  34. package/dist/npm/models/ledger/Vault.js +3 -0
  35. package/dist/npm/models/ledger/Vault.js.map +1 -0
  36. package/dist/npm/models/ledger/index.d.ts +2 -1
  37. package/dist/npm/models/ledger/index.d.ts.map +1 -1
  38. package/dist/npm/models/ledger/index.js.map +1 -1
  39. package/dist/npm/models/methods/bookOffers.d.ts +1 -0
  40. package/dist/npm/models/methods/bookOffers.d.ts.map +1 -1
  41. package/dist/npm/models/methods/index.d.ts +5 -4
  42. package/dist/npm/models/methods/index.d.ts.map +1 -1
  43. package/dist/npm/models/methods/pathFind.d.ts +2 -0
  44. package/dist/npm/models/methods/pathFind.d.ts.map +1 -1
  45. package/dist/npm/models/methods/ripplePathFind.d.ts +1 -0
  46. package/dist/npm/models/methods/ripplePathFind.d.ts.map +1 -1
  47. package/dist/npm/models/methods/subscribe.d.ts +4 -0
  48. package/dist/npm/models/methods/subscribe.d.ts.map +1 -1
  49. package/dist/npm/models/methods/vaultInfo.d.ts +46 -0
  50. package/dist/npm/models/methods/vaultInfo.d.ts.map +1 -0
  51. package/dist/npm/models/methods/vaultInfo.js +3 -0
  52. package/dist/npm/models/methods/vaultInfo.js.map +1 -0
  53. package/dist/npm/models/transactions/AMMBid.d.ts.map +1 -1
  54. package/dist/npm/models/transactions/AMMBid.js +7 -5
  55. package/dist/npm/models/transactions/AMMBid.js.map +1 -1
  56. package/dist/npm/models/transactions/AMMClawback.d.ts.map +1 -1
  57. package/dist/npm/models/transactions/AMMClawback.js +5 -6
  58. package/dist/npm/models/transactions/AMMClawback.js.map +1 -1
  59. package/dist/npm/models/transactions/AMMDelete.d.ts.map +1 -1
  60. package/dist/npm/models/transactions/AMMDelete.js +2 -2
  61. package/dist/npm/models/transactions/AMMDelete.js.map +1 -1
  62. package/dist/npm/models/transactions/AMMDeposit.js +3 -3
  63. package/dist/npm/models/transactions/AMMDeposit.js.map +1 -1
  64. package/dist/npm/models/transactions/AMMVote.d.ts.map +1 -1
  65. package/dist/npm/models/transactions/AMMVote.js +2 -2
  66. package/dist/npm/models/transactions/AMMVote.js.map +1 -1
  67. package/dist/npm/models/transactions/AMMWithdraw.js +3 -3
  68. package/dist/npm/models/transactions/AMMWithdraw.js.map +1 -1
  69. package/dist/npm/models/transactions/MPTokenIssuanceCreate.d.ts +1 -1
  70. package/dist/npm/models/transactions/MPTokenIssuanceCreate.d.ts.map +1 -1
  71. package/dist/npm/models/transactions/MPTokenIssuanceCreate.js +17 -8
  72. package/dist/npm/models/transactions/MPTokenIssuanceCreate.js.map +1 -1
  73. package/dist/npm/models/transactions/MPTokenIssuanceSet.js +4 -4
  74. package/dist/npm/models/transactions/MPTokenIssuanceSet.js.map +1 -1
  75. package/dist/npm/models/transactions/NFTokenCancelOffer.d.ts.map +1 -1
  76. package/dist/npm/models/transactions/NFTokenCancelOffer.js +1 -1
  77. package/dist/npm/models/transactions/NFTokenCancelOffer.js.map +1 -1
  78. package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
  79. package/dist/npm/models/transactions/NFTokenCreateOffer.js +6 -2
  80. package/dist/npm/models/transactions/NFTokenCreateOffer.js.map +1 -1
  81. package/dist/npm/models/transactions/accountSet.d.ts +2 -1
  82. package/dist/npm/models/transactions/accountSet.d.ts.map +1 -1
  83. package/dist/npm/models/transactions/accountSet.js +1 -0
  84. package/dist/npm/models/transactions/accountSet.js.map +1 -1
  85. package/dist/npm/models/transactions/checkCreate.d.ts.map +1 -1
  86. package/dist/npm/models/transactions/checkCreate.js +1 -2
  87. package/dist/npm/models/transactions/checkCreate.js.map +1 -1
  88. package/dist/npm/models/transactions/clawback.d.ts +2 -2
  89. package/dist/npm/models/transactions/clawback.d.ts.map +1 -1
  90. package/dist/npm/models/transactions/clawback.js +4 -6
  91. package/dist/npm/models/transactions/clawback.js.map +1 -1
  92. package/dist/npm/models/transactions/common.d.ts +13 -4
  93. package/dist/npm/models/transactions/common.d.ts.map +1 -1
  94. package/dist/npm/models/transactions/common.js +184 -28
  95. package/dist/npm/models/transactions/common.js.map +1 -1
  96. package/dist/npm/models/transactions/escrowCreate.d.ts +2 -1
  97. package/dist/npm/models/transactions/escrowCreate.d.ts.map +1 -1
  98. package/dist/npm/models/transactions/escrowCreate.js +1 -6
  99. package/dist/npm/models/transactions/escrowCreate.js.map +1 -1
  100. package/dist/npm/models/transactions/index.d.ts +9 -3
  101. package/dist/npm/models/transactions/index.d.ts.map +1 -1
  102. package/dist/npm/models/transactions/index.js +5 -1
  103. package/dist/npm/models/transactions/index.js.map +1 -1
  104. package/dist/npm/models/transactions/offerCreate.d.ts +4 -1
  105. package/dist/npm/models/transactions/offerCreate.d.ts.map +1 -1
  106. package/dist/npm/models/transactions/offerCreate.js +10 -0
  107. package/dist/npm/models/transactions/offerCreate.js.map +1 -1
  108. package/dist/npm/models/transactions/oracleSet.d.ts.map +1 -1
  109. package/dist/npm/models/transactions/oracleSet.js +22 -21
  110. package/dist/npm/models/transactions/oracleSet.js.map +1 -1
  111. package/dist/npm/models/transactions/payment.d.ts +2 -0
  112. package/dist/npm/models/transactions/payment.d.ts.map +1 -1
  113. package/dist/npm/models/transactions/payment.js +7 -4
  114. package/dist/npm/models/transactions/payment.js.map +1 -1
  115. package/dist/npm/models/transactions/signerListSet.d.ts.map +1 -1
  116. package/dist/npm/models/transactions/signerListSet.js +10 -16
  117. package/dist/npm/models/transactions/signerListSet.js.map +1 -1
  118. package/dist/npm/models/transactions/transaction.d.ts +7 -1
  119. package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
  120. package/dist/npm/models/transactions/transaction.js +28 -35
  121. package/dist/npm/models/transactions/transaction.js.map +1 -1
  122. package/dist/npm/models/transactions/vaultClawback.d.ts +10 -0
  123. package/dist/npm/models/transactions/vaultClawback.d.ts.map +1 -0
  124. package/dist/npm/models/transactions/vaultClawback.js +12 -0
  125. package/dist/npm/models/transactions/vaultClawback.js.map +1 -0
  126. package/dist/npm/models/transactions/vaultCreate.d.ts +24 -0
  127. package/dist/npm/models/transactions/vaultCreate.d.ts.map +1 -0
  128. package/dist/npm/models/transactions/vaultCreate.js +60 -0
  129. package/dist/npm/models/transactions/vaultCreate.js.map +1 -0
  130. package/dist/npm/models/transactions/vaultDelete.d.ts +7 -0
  131. package/dist/npm/models/transactions/vaultDelete.d.ts.map +1 -0
  132. package/dist/npm/models/transactions/vaultDelete.js +10 -0
  133. package/dist/npm/models/transactions/vaultDelete.js.map +1 -0
  134. package/dist/npm/models/transactions/vaultDeposit.d.ts +9 -0
  135. package/dist/npm/models/transactions/vaultDeposit.d.ts.map +1 -0
  136. package/dist/npm/models/transactions/vaultDeposit.js +11 -0
  137. package/dist/npm/models/transactions/vaultDeposit.js.map +1 -0
  138. package/dist/npm/models/transactions/vaultSet.d.ts +10 -0
  139. package/dist/npm/models/transactions/vaultSet.d.ts.map +1 -0
  140. package/dist/npm/models/transactions/vaultSet.js +25 -0
  141. package/dist/npm/models/transactions/vaultSet.js.map +1 -0
  142. package/dist/npm/models/transactions/vaultWithdraw.d.ts +10 -0
  143. package/dist/npm/models/transactions/vaultWithdraw.d.ts.map +1 -0
  144. package/dist/npm/models/transactions/vaultWithdraw.js +12 -0
  145. package/dist/npm/models/transactions/vaultWithdraw.js.map +1 -0
  146. package/dist/npm/models/utils/flags.d.ts.map +1 -1
  147. package/dist/npm/models/utils/flags.js +2 -0
  148. package/dist/npm/models/utils/flags.js.map +1 -1
  149. package/dist/npm/snippets/src/permissionedDEX.d.ts +2 -0
  150. package/dist/npm/snippets/src/permissionedDEX.d.ts.map +1 -0
  151. package/dist/npm/snippets/src/permissionedDEX.js +173 -0
  152. package/dist/npm/snippets/src/permissionedDEX.js.map +1 -0
  153. package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -1
  154. package/dist/npm/src/client/index.d.ts +3 -3
  155. package/dist/npm/src/client/index.d.ts.map +1 -1
  156. package/dist/npm/src/client/index.js +10 -7
  157. package/dist/npm/src/client/index.js.map +1 -1
  158. package/dist/npm/src/client/partialPayment.d.ts.map +1 -1
  159. package/dist/npm/src/client/partialPayment.js +2 -2
  160. package/dist/npm/src/client/partialPayment.js.map +1 -1
  161. package/dist/npm/src/models/common/index.d.ts +17 -0
  162. package/dist/npm/src/models/common/index.d.ts.map +1 -1
  163. package/dist/npm/src/models/ledger/AccountRoot.d.ts +4 -2
  164. package/dist/npm/src/models/ledger/AccountRoot.d.ts.map +1 -1
  165. package/dist/npm/src/models/ledger/AccountRoot.js +1 -0
  166. package/dist/npm/src/models/ledger/AccountRoot.js.map +1 -1
  167. package/dist/npm/src/models/ledger/DirectoryNode.d.ts +1 -0
  168. package/dist/npm/src/models/ledger/DirectoryNode.d.ts.map +1 -1
  169. package/dist/npm/src/models/ledger/Escrow.d.ts +2 -0
  170. package/dist/npm/src/models/ledger/Escrow.d.ts.map +1 -1
  171. package/dist/npm/src/models/ledger/LedgerEntry.d.ts +3 -2
  172. package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
  173. package/dist/npm/src/models/ledger/MPToken.d.ts +1 -0
  174. package/dist/npm/src/models/ledger/MPToken.d.ts.map +1 -1
  175. package/dist/npm/src/models/ledger/MPTokenIssuance.d.ts +1 -0
  176. package/dist/npm/src/models/ledger/MPTokenIssuance.d.ts.map +1 -1
  177. package/dist/npm/src/models/ledger/Offer.d.ts +10 -1
  178. package/dist/npm/src/models/ledger/Offer.d.ts.map +1 -1
  179. package/dist/npm/src/models/ledger/Offer.js +1 -0
  180. package/dist/npm/src/models/ledger/Offer.js.map +1 -1
  181. package/dist/npm/src/models/ledger/Vault.d.ts +21 -0
  182. package/dist/npm/src/models/ledger/Vault.d.ts.map +1 -0
  183. package/dist/npm/src/models/ledger/Vault.js +3 -0
  184. package/dist/npm/src/models/ledger/Vault.js.map +1 -0
  185. package/dist/npm/src/models/ledger/index.d.ts +2 -1
  186. package/dist/npm/src/models/ledger/index.d.ts.map +1 -1
  187. package/dist/npm/src/models/ledger/index.js.map +1 -1
  188. package/dist/npm/src/models/methods/bookOffers.d.ts +1 -0
  189. package/dist/npm/src/models/methods/bookOffers.d.ts.map +1 -1
  190. package/dist/npm/src/models/methods/index.d.ts +5 -4
  191. package/dist/npm/src/models/methods/index.d.ts.map +1 -1
  192. package/dist/npm/src/models/methods/pathFind.d.ts +2 -0
  193. package/dist/npm/src/models/methods/pathFind.d.ts.map +1 -1
  194. package/dist/npm/src/models/methods/ripplePathFind.d.ts +1 -0
  195. package/dist/npm/src/models/methods/ripplePathFind.d.ts.map +1 -1
  196. package/dist/npm/src/models/methods/subscribe.d.ts +4 -0
  197. package/dist/npm/src/models/methods/subscribe.d.ts.map +1 -1
  198. package/dist/npm/src/models/methods/vaultInfo.d.ts +46 -0
  199. package/dist/npm/src/models/methods/vaultInfo.d.ts.map +1 -0
  200. package/dist/npm/src/models/methods/vaultInfo.js +3 -0
  201. package/dist/npm/src/models/methods/vaultInfo.js.map +1 -0
  202. package/dist/npm/src/models/transactions/AMMBid.d.ts.map +1 -1
  203. package/dist/npm/src/models/transactions/AMMBid.js +7 -5
  204. package/dist/npm/src/models/transactions/AMMBid.js.map +1 -1
  205. package/dist/npm/src/models/transactions/AMMClawback.d.ts.map +1 -1
  206. package/dist/npm/src/models/transactions/AMMClawback.js +5 -6
  207. package/dist/npm/src/models/transactions/AMMClawback.js.map +1 -1
  208. package/dist/npm/src/models/transactions/AMMDelete.d.ts.map +1 -1
  209. package/dist/npm/src/models/transactions/AMMDelete.js +2 -2
  210. package/dist/npm/src/models/transactions/AMMDelete.js.map +1 -1
  211. package/dist/npm/src/models/transactions/AMMDeposit.js +3 -3
  212. package/dist/npm/src/models/transactions/AMMDeposit.js.map +1 -1
  213. package/dist/npm/src/models/transactions/AMMVote.d.ts.map +1 -1
  214. package/dist/npm/src/models/transactions/AMMVote.js +2 -2
  215. package/dist/npm/src/models/transactions/AMMVote.js.map +1 -1
  216. package/dist/npm/src/models/transactions/AMMWithdraw.js +3 -3
  217. package/dist/npm/src/models/transactions/AMMWithdraw.js.map +1 -1
  218. package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.d.ts +1 -1
  219. package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.d.ts.map +1 -1
  220. package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.js +17 -8
  221. package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.js.map +1 -1
  222. package/dist/npm/src/models/transactions/MPTokenIssuanceSet.js +4 -4
  223. package/dist/npm/src/models/transactions/MPTokenIssuanceSet.js.map +1 -1
  224. package/dist/npm/src/models/transactions/NFTokenCancelOffer.d.ts.map +1 -1
  225. package/dist/npm/src/models/transactions/NFTokenCancelOffer.js +1 -1
  226. package/dist/npm/src/models/transactions/NFTokenCancelOffer.js.map +1 -1
  227. package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
  228. package/dist/npm/src/models/transactions/NFTokenCreateOffer.js +6 -2
  229. package/dist/npm/src/models/transactions/NFTokenCreateOffer.js.map +1 -1
  230. package/dist/npm/src/models/transactions/accountSet.d.ts +2 -1
  231. package/dist/npm/src/models/transactions/accountSet.d.ts.map +1 -1
  232. package/dist/npm/src/models/transactions/accountSet.js +1 -0
  233. package/dist/npm/src/models/transactions/accountSet.js.map +1 -1
  234. package/dist/npm/src/models/transactions/checkCreate.d.ts.map +1 -1
  235. package/dist/npm/src/models/transactions/checkCreate.js +1 -2
  236. package/dist/npm/src/models/transactions/checkCreate.js.map +1 -1
  237. package/dist/npm/src/models/transactions/clawback.d.ts +2 -2
  238. package/dist/npm/src/models/transactions/clawback.d.ts.map +1 -1
  239. package/dist/npm/src/models/transactions/clawback.js +4 -6
  240. package/dist/npm/src/models/transactions/clawback.js.map +1 -1
  241. package/dist/npm/src/models/transactions/common.d.ts +13 -4
  242. package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
  243. package/dist/npm/src/models/transactions/common.js +184 -28
  244. package/dist/npm/src/models/transactions/common.js.map +1 -1
  245. package/dist/npm/src/models/transactions/escrowCreate.d.ts +2 -1
  246. package/dist/npm/src/models/transactions/escrowCreate.d.ts.map +1 -1
  247. package/dist/npm/src/models/transactions/escrowCreate.js +1 -6
  248. package/dist/npm/src/models/transactions/escrowCreate.js.map +1 -1
  249. package/dist/npm/src/models/transactions/index.d.ts +9 -3
  250. package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
  251. package/dist/npm/src/models/transactions/index.js +5 -1
  252. package/dist/npm/src/models/transactions/index.js.map +1 -1
  253. package/dist/npm/src/models/transactions/offerCreate.d.ts +4 -1
  254. package/dist/npm/src/models/transactions/offerCreate.d.ts.map +1 -1
  255. package/dist/npm/src/models/transactions/offerCreate.js +10 -0
  256. package/dist/npm/src/models/transactions/offerCreate.js.map +1 -1
  257. package/dist/npm/src/models/transactions/oracleSet.d.ts.map +1 -1
  258. package/dist/npm/src/models/transactions/oracleSet.js +22 -21
  259. package/dist/npm/src/models/transactions/oracleSet.js.map +1 -1
  260. package/dist/npm/src/models/transactions/payment.d.ts +2 -0
  261. package/dist/npm/src/models/transactions/payment.d.ts.map +1 -1
  262. package/dist/npm/src/models/transactions/payment.js +7 -4
  263. package/dist/npm/src/models/transactions/payment.js.map +1 -1
  264. package/dist/npm/src/models/transactions/signerListSet.d.ts.map +1 -1
  265. package/dist/npm/src/models/transactions/signerListSet.js +10 -16
  266. package/dist/npm/src/models/transactions/signerListSet.js.map +1 -1
  267. package/dist/npm/src/models/transactions/transaction.d.ts +7 -1
  268. package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
  269. package/dist/npm/src/models/transactions/transaction.js +28 -35
  270. package/dist/npm/src/models/transactions/transaction.js.map +1 -1
  271. package/dist/npm/src/models/transactions/vaultClawback.d.ts +10 -0
  272. package/dist/npm/src/models/transactions/vaultClawback.d.ts.map +1 -0
  273. package/dist/npm/src/models/transactions/vaultClawback.js +12 -0
  274. package/dist/npm/src/models/transactions/vaultClawback.js.map +1 -0
  275. package/dist/npm/src/models/transactions/vaultCreate.d.ts +24 -0
  276. package/dist/npm/src/models/transactions/vaultCreate.d.ts.map +1 -0
  277. package/dist/npm/src/models/transactions/vaultCreate.js +60 -0
  278. package/dist/npm/src/models/transactions/vaultCreate.js.map +1 -0
  279. package/dist/npm/src/models/transactions/vaultDelete.d.ts +7 -0
  280. package/dist/npm/src/models/transactions/vaultDelete.d.ts.map +1 -0
  281. package/dist/npm/src/models/transactions/vaultDelete.js +10 -0
  282. package/dist/npm/src/models/transactions/vaultDelete.js.map +1 -0
  283. package/dist/npm/src/models/transactions/vaultDeposit.d.ts +9 -0
  284. package/dist/npm/src/models/transactions/vaultDeposit.d.ts.map +1 -0
  285. package/dist/npm/src/models/transactions/vaultDeposit.js +11 -0
  286. package/dist/npm/src/models/transactions/vaultDeposit.js.map +1 -0
  287. package/dist/npm/src/models/transactions/vaultSet.d.ts +10 -0
  288. package/dist/npm/src/models/transactions/vaultSet.d.ts.map +1 -0
  289. package/dist/npm/src/models/transactions/vaultSet.js +25 -0
  290. package/dist/npm/src/models/transactions/vaultSet.js.map +1 -0
  291. package/dist/npm/src/models/transactions/vaultWithdraw.d.ts +10 -0
  292. package/dist/npm/src/models/transactions/vaultWithdraw.d.ts.map +1 -0
  293. package/dist/npm/src/models/transactions/vaultWithdraw.js +12 -0
  294. package/dist/npm/src/models/transactions/vaultWithdraw.js.map +1 -0
  295. package/dist/npm/src/models/utils/flags.d.ts.map +1 -1
  296. package/dist/npm/src/models/utils/flags.js +2 -0
  297. package/dist/npm/src/models/utils/flags.js.map +1 -1
  298. package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
  299. package/dist/npm/src/sugar/autofill.js.map +1 -1
  300. package/dist/npm/sugar/autofill.d.ts.map +1 -1
  301. package/dist/npm/sugar/autofill.js.map +1 -1
  302. package/package.json +6 -5
  303. package/src/client/index.ts +43 -38
  304. package/src/client/partialPayment.ts +1 -2
  305. package/src/models/common/index.ts +27 -0
  306. package/src/models/ledger/AccountRoot.ts +11 -1
  307. package/src/models/ledger/DirectoryNode.ts +3 -0
  308. package/src/models/ledger/Escrow.ts +14 -1
  309. package/src/models/ledger/LedgerEntry.ts +3 -0
  310. package/src/models/ledger/MPToken.ts +1 -0
  311. package/src/models/ledger/MPTokenIssuance.ts +1 -0
  312. package/src/models/ledger/Offer.ts +21 -0
  313. package/src/models/ledger/Vault.ts +83 -0
  314. package/src/models/ledger/index.ts +3 -1
  315. package/src/models/methods/bookOffers.ts +7 -0
  316. package/src/models/methods/index.ts +10 -0
  317. package/src/models/methods/pathFind.ts +10 -0
  318. package/src/models/methods/ripplePathFind.ts +5 -0
  319. package/src/models/methods/subscribe.ts +21 -0
  320. package/src/models/methods/vaultInfo.ts +193 -0
  321. package/src/models/transactions/AMMBid.ts +12 -20
  322. package/src/models/transactions/AMMClawback.ts +8 -11
  323. package/src/models/transactions/AMMDelete.ts +7 -3
  324. package/src/models/transactions/AMMDeposit.ts +4 -4
  325. package/src/models/transactions/AMMVote.ts +7 -3
  326. package/src/models/transactions/AMMWithdraw.ts +4 -4
  327. package/src/models/transactions/MPTokenIssuanceCreate.ts +36 -11
  328. package/src/models/transactions/MPTokenIssuanceSet.ts +1 -1
  329. package/src/models/transactions/NFTokenCancelOffer.ts +2 -2
  330. package/src/models/transactions/NFTokenCreateOffer.ts +8 -4
  331. package/src/models/transactions/accountSet.ts +2 -0
  332. package/src/models/transactions/checkCreate.ts +2 -6
  333. package/src/models/transactions/clawback.ts +9 -10
  334. package/src/models/transactions/common.ts +350 -42
  335. package/src/models/transactions/escrowCreate.ts +8 -12
  336. package/src/models/transactions/index.ts +14 -3
  337. package/src/models/transactions/offerCreate.ts +25 -0
  338. package/src/models/transactions/oracleSet.ts +32 -39
  339. package/src/models/transactions/payment.ts +25 -7
  340. package/src/models/transactions/signerListSet.ts +21 -21
  341. package/src/models/transactions/transaction.ts +46 -43
  342. package/src/models/transactions/vaultClawback.ts +55 -0
  343. package/src/models/transactions/vaultCreate.ts +166 -0
  344. package/src/models/transactions/vaultDelete.ts +32 -0
  345. package/src/models/transactions/vaultDeposit.ts +42 -0
  346. package/src/models/transactions/vaultSet.ts +71 -0
  347. package/src/models/transactions/vaultWithdraw.ts +51 -0
  348. package/src/models/utils/flags.ts +2 -0
  349. package/src/sugar/autofill.ts +5 -6
@@ -73,7 +73,7 @@ export default interface AccountRoot extends BaseLedgerEntry, HasPreviousTxnID {
73
73
  /** Total NFTokens this account's issued that have been burned. This number is always equal or less than MintedNFTokens. */
74
74
  BurnedNFTokens?: number
75
75
  /** The sequence that the account first minted an NFToken */
76
- FirstNFTSequence: number
76
+ FirstNFTokenSequence?: number
77
77
  /** Total NFTokens have been minted by and on behalf of this account. */
78
78
  MintedNFTokens?: number
79
79
  /** Another account that can mint NFTokens on behalf of this account. */
@@ -146,6 +146,11 @@ export interface AccountRootFlagsInterface {
146
146
  * This address can claw back issued IOUs. Once enabled, cannot be disabled.
147
147
  */
148
148
  lsfAllowTrustLineClawback?: boolean
149
+
150
+ /**
151
+ * Allow IOUs to be used as escrow amounts for an issuer
152
+ */
153
+ lsfAllowTrustLineLocking?: boolean
149
154
  }
150
155
 
151
156
  export enum AccountRootFlags {
@@ -210,4 +215,9 @@ export enum AccountRootFlags {
210
215
  * This address can claw back issued IOUs. Once enabled, cannot be disabled.
211
216
  */
212
217
  lsfAllowTrustLineClawback = 0x80000000,
218
+ /**
219
+ * If the issuer's account does not have the lsfAllowTrustLineLocking flag set,
220
+ * then Escrow ledger-objects cannot be created with such IOUs.
221
+ */
222
+ lsfAllowTrustLineLocking = 0x40000000,
213
223
  }
@@ -45,4 +45,7 @@ export default interface DirectoryNode
45
45
  TakerGetsCurrency?: string
46
46
  /** The issuer of the TakerGets amount from the offers in this directory. */
47
47
  TakerGetsIssuer?: string
48
+
49
+ /** The domain that the offer directory is a part of. */
50
+ DomainID?: string
48
51
  }
@@ -19,7 +19,8 @@ export default interface Escrow extends BaseLedgerEntry, HasPreviousTxnID {
19
19
  * successful.
20
20
  */
21
21
  Destination: string
22
- /** The amount of XRP, in drops, to be delivered by the held payment. */
22
+ /** The amount to be delivered by the held payment. Can represent XRP, an IOU token, or an MPT.
23
+ * Must always be a positive value. */
23
24
  Amount: string
24
25
  /**
25
26
  * A PREIMAGE-SHA-256 crypto-condition, as hexadecimal. If present, the
@@ -61,4 +62,16 @@ export default interface Escrow extends BaseLedgerEntry, HasPreviousTxnID {
61
62
  * this object, in case the directory consists of multiple pages.
62
63
  */
63
64
  DestinationNode?: string
65
+
66
+ /**
67
+ * The transfer rate or fee at which the funds are escrowed, stored at creation
68
+ * and used during settlement. Applicable to both IOUs and MPTs.
69
+ */
70
+ TransferRate?: number
71
+
72
+ /**
73
+ * The ledger index of the issuer's directory node associated with the Escrow.
74
+ * Used when the issuer is neither the source nor destination account.
75
+ */
76
+ IssuerNode?: number
64
77
  }
@@ -18,6 +18,7 @@ import PermissionedDomain from './PermissionedDomain'
18
18
  import RippleState from './RippleState'
19
19
  import SignerList from './SignerList'
20
20
  import Ticket from './Ticket'
21
+ import Vault from './Vault'
21
22
  import XChainOwnedClaimID from './XChainOwnedClaimID'
22
23
  import XChainOwnedCreateAccountClaimID from './XChainOwnedCreateAccountClaimID'
23
24
 
@@ -42,6 +43,7 @@ type LedgerEntry =
42
43
  | RippleState
43
44
  | SignerList
44
45
  | Ticket
46
+ | Vault
45
47
  | XChainOwnedClaimID
46
48
  | XChainOwnedCreateAccountClaimID
47
49
 
@@ -70,6 +72,7 @@ type LedgerEntryFilter =
70
72
  | 'signer_list'
71
73
  | 'state'
72
74
  | 'ticket'
75
+ | 'vault'
73
76
  | 'xchain_owned_create_account_claim_id'
74
77
  | 'xchain_owned_claim_id'
75
78
 
@@ -8,4 +8,5 @@ export interface MPToken extends BaseLedgerEntry, HasPreviousTxnID {
8
8
  MPTAmount?: MPTAmount
9
9
  Flags: number
10
10
  OwnerNode?: string
11
+ LockedAmount?: string
11
12
  }
@@ -10,4 +10,5 @@ export interface MPTokenIssuance extends BaseLedgerEntry, HasPreviousTxnID {
10
10
  TransferFee?: number
11
11
  MPTokenMetadata?: string
12
12
  OwnerNode?: string
13
+ LockedAmount?: string
13
14
  }
@@ -2,6 +2,19 @@ import { Amount } from '../common'
2
2
 
3
3
  import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
4
4
 
5
+ export interface Book {
6
+ Book: {
7
+ /** The ID of the offer directory that links to this offer. */
8
+ BookDirectory: string
9
+
10
+ /**
11
+ * A hint indicating which page of the offer directory links to this entry,
12
+ * in case the directory consists of multiple pages.
13
+ */
14
+ BookNode: string
15
+ }
16
+ }
17
+
5
18
  export default interface Offer extends BaseLedgerEntry, HasPreviousTxnID {
6
19
  LedgerEntryType: 'Offer'
7
20
  /** A bit-map of boolean flags enabled for this Offer. */
@@ -34,9 +47,17 @@ export default interface Offer extends BaseLedgerEntry, HasPreviousTxnID {
34
47
  OwnerNode: string
35
48
  /** The time this Offer expires, in seconds since the Ripple Epoch. */
36
49
  Expiration?: number
50
+ /** The domain that the offer must be a part of. */
51
+ DomainID?: string
52
+ /**
53
+ * An additional list of order book directories that this offer belongs to.
54
+ * Currently this field only applicable to hybrid offers.
55
+ */
56
+ AdditionalBooks?: Book[]
37
57
  }
38
58
 
39
59
  export enum OfferFlags {
40
60
  lsfPassive = 0x00010000,
41
61
  lsfSell = 0x00020000,
62
+ lsfHybrid = 0x00040000,
42
63
  }
@@ -0,0 +1,83 @@
1
+ import { Currency } from '../common'
2
+ import { Account } from '../transactions/common'
3
+
4
+ import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
5
+
6
+ /**
7
+ * The Vault object type represents a Single Asset Vault instance.
8
+ *
9
+ * @category Ledger Entries
10
+ */
11
+ export default interface Vault extends BaseLedgerEntry, HasPreviousTxnID {
12
+ LedgerEntryType: 'Vault'
13
+
14
+ /**
15
+ * Ledger object identifier.
16
+ */
17
+ LedgerIndex: string
18
+
19
+ /**
20
+ * A bit-map of boolean flags.
21
+ */
22
+ Flags: 0
23
+
24
+ /**
25
+ * The transaction sequence number that created the vault.
26
+ */
27
+ Sequence: number
28
+
29
+ /**
30
+ * Identifies the page where this item is referenced in the owner's directory.
31
+ */
32
+ OwnerNode: string
33
+
34
+ /**
35
+ * The account address of the Vault Owner.
36
+ */
37
+ Owner: string
38
+
39
+ /**
40
+ * The address of the Vaults pseudo-account.
41
+ */
42
+ Account: Account
43
+
44
+ /**
45
+ * The asset of the vault. The vault supports XRP, IOU and MPT.
46
+ */
47
+ Asset: Currency
48
+
49
+ /**
50
+ * The total value of the vault.
51
+ */
52
+ AssetsTotal: string
53
+
54
+ /**
55
+ * The asset amount that is available in the vault.
56
+ */
57
+ AssetsAvailable: string
58
+
59
+ /**
60
+ * The potential loss amount that is not yet realized expressed as the vaults asset.
61
+ */
62
+ LossUnrealized: string
63
+
64
+ /**
65
+ * The identifier of the share MPTokenIssuance object.
66
+ */
67
+ MPTokenIssuanceID: string
68
+
69
+ /**
70
+ * Indicates the withdrawal strategy used by the Vault.
71
+ */
72
+ WithdrawalPolicy: number
73
+
74
+ /**
75
+ * The maximum asset amount that can be held in the vault. Zero value 0 indicates there is no cap.
76
+ */
77
+ AssetsMaximum?: string
78
+
79
+ /**
80
+ * Arbitrary metadata about the Vault. Limited to 256 bytes.
81
+ */
82
+ Data?: string
83
+ }
@@ -31,6 +31,7 @@ import PayChannel from './PayChannel'
31
31
  import RippleState, { RippleStateFlags } from './RippleState'
32
32
  import SignerList, { SignerListFlags } from './SignerList'
33
33
  import Ticket from './Ticket'
34
+ import Vault from './Vault'
34
35
  import XChainOwnedClaimID from './XChainOwnedClaimID'
35
36
  import XChainOwnedCreateAccountClaimID from './XChainOwnedCreateAccountClaimID'
36
37
 
@@ -75,7 +76,8 @@ export {
75
76
  SignerList,
76
77
  SignerListFlags,
77
78
  Ticket,
79
+ Vault,
80
+ VoteSlot,
78
81
  XChainOwnedClaimID,
79
82
  XChainOwnedCreateAccountClaimID,
80
- VoteSlot,
81
83
  }
@@ -39,6 +39,13 @@ export interface BookOffersRequest extends BaseRequest, LookupByLedgerRequest {
39
39
  * currency amounts.
40
40
  */
41
41
  taker_pays: BookOfferCurrency
42
+ /**
43
+ * The object ID of a PermissionedDomain object. If this field is provided,
44
+ * the response will include only valid domain offers associated with that
45
+ * specific domain. If omitted, the response will include only hybrid and open
46
+ * offers for the trading pair, excluding all domain-specific offers.
47
+ */
48
+ domain?: string
42
49
  }
43
50
 
44
51
  export interface BookOffer extends Offer {
@@ -189,6 +189,7 @@ import {
189
189
  UnsubscribeRequest,
190
190
  UnsubscribeResponse,
191
191
  } from './unsubscribe'
192
+ import { VaultInfoRequest, VaultInfoResponse } from './vaultInfo'
192
193
  /**
193
194
  * @category Requests
194
195
  */
@@ -247,6 +248,8 @@ type Request =
247
248
  | AMMInfoRequest
248
249
  // Price Oracle methods
249
250
  | GetAggregatePriceRequest
251
+ // Vault methods
252
+ | VaultInfoRequest
250
253
 
251
254
  /**
252
255
  * @category Responses
@@ -306,6 +309,8 @@ type Response<Version extends APIVersion = typeof DEFAULT_API_VERSION> =
306
309
  | AMMInfoResponse
307
310
  // Price Oracle methods
308
311
  | GetAggregatePriceResponse
312
+ // Vault methods
313
+ | VaultInfoResponse
309
314
 
310
315
  export type RequestResponseMap<
311
316
  T,
@@ -464,6 +469,8 @@ export type RequestResponseMap<
464
469
  ? NFTsByIssuerResponse
465
470
  : T extends NFTHistoryRequest
466
471
  ? NFTHistoryResponse
472
+ : T extends VaultInfoRequest
473
+ ? VaultInfoResponse
467
474
  : Response<Version>
468
475
 
469
476
  export type MarkerRequest = Request & {
@@ -649,4 +656,7 @@ export {
649
656
  // AMM methods
650
657
  AMMInfoRequest,
651
658
  AMMInfoResponse,
659
+ // Vault methods
660
+ VaultInfoRequest,
661
+ VaultInfoResponse,
652
662
  }
@@ -30,6 +30,11 @@ export interface PathFindCreateRequest extends BasePathFindRequest {
30
30
  * about, or to check the overall cost to make a payment along a certain path.
31
31
  */
32
32
  paths?: Path[]
33
+ /**
34
+ * The object ID of a PermissionedDomain object. If this field is included,
35
+ * then only valid paths for this domain will be returned.
36
+ */
37
+ domain?: string
33
38
  }
34
39
 
35
40
  /** Stop sending pathfinding information. */
@@ -97,6 +102,11 @@ export interface PathFindResponse extends BaseResponse {
97
102
  * Continues to send updates each time a new ledger closes.
98
103
  */
99
104
  full_reply: boolean
105
+ /**
106
+ * The object ID of a PermissionedDomain object, if the orderbook shown is
107
+ * for a specific domain.
108
+ */
109
+ domain?: string
100
110
  /**
101
111
  * The ID provided in the WebSocket request is included again at this
102
112
  * level.
@@ -38,6 +38,11 @@ export interface RipplePathFindRequest
38
38
  * and optional issuer field, like how currency amounts are specified.
39
39
  */
40
40
  source_currencies?: SourceCurrencyAmount[]
41
+ /**
42
+ * The object ID of a PermissionedDomain object. If this field is included,
43
+ * then only valid paths for this domain will be returned.
44
+ */
45
+ domain?: string
41
46
  }
42
47
 
43
48
  export interface RipplePathFindPathOption {
@@ -39,6 +39,12 @@ export interface SubscribeBook {
39
39
  snapshot?: boolean
40
40
  /** If true, return both sides of the order book. The default is false. */
41
41
  both?: boolean
42
+ /**
43
+ * The object ID of a PermissionedDomain object. If this field is included,
44
+ * then the offers will be filtered to only show the valid domain offers for
45
+ * that domain.
46
+ */
47
+ domain?: string
42
48
  }
43
49
 
44
50
  /**
@@ -136,6 +142,11 @@ export interface LedgerStream extends BaseStream {
136
142
  * connected but has not yet obtained a ledger from the network.
137
143
  */
138
144
  validated_ledgers?: string
145
+
146
+ /**
147
+ * The network from which the ledger stream is received.
148
+ */
149
+ network_id?: number
139
150
  }
140
151
 
141
152
  /**
@@ -175,6 +186,11 @@ export interface LedgerStreamResponse {
175
186
  * connected but has not yet obtained a ledger from the network.
176
187
  */
177
188
  validated_ledgers?: string
189
+
190
+ /**
191
+ * The network from which the ledger stream is received.
192
+ */
193
+ network_id?: number
178
194
  }
179
195
 
180
196
  /**
@@ -259,6 +275,11 @@ export interface ValidationStream extends BaseStream {
259
275
  * validator is using a token, this is an ephemeral public key.
260
276
  */
261
277
  validation_public_key: string
278
+
279
+ /**
280
+ * The network from which the validations stream is received.
281
+ */
282
+ network_id?: number
262
283
  }
263
284
 
264
285
  /**
@@ -0,0 +1,193 @@
1
+ import { Currency } from '../common'
2
+
3
+ import { BaseRequest, BaseResponse } from './baseMethod'
4
+
5
+ /**
6
+ * The `vault_info` method gets information about a Vault instance.
7
+ * Returns an {@link VaultInfoResponse}.
8
+ *
9
+ * @category Requests
10
+ */
11
+ export interface VaultInfoRequest extends BaseRequest {
12
+ command: 'vault_info'
13
+
14
+ /**
15
+ * The object ID of the Vault to be returned.
16
+ */
17
+ vault_id?: string
18
+
19
+ /**
20
+ * ID of the Vault Owner account.
21
+ */
22
+ owner?: string
23
+
24
+ /**
25
+ * Sequence number of the vault entry.
26
+ */
27
+ seq?: number
28
+ }
29
+
30
+ /**
31
+ * Response expected from an {@link VaultInfoRequest}.
32
+ *
33
+ * @category Responses
34
+ */
35
+ export interface VaultInfoResponse extends BaseResponse {
36
+ result: {
37
+ vault: {
38
+ /**
39
+ * The pseudo-account ID of the vault.
40
+ */
41
+ Account: string
42
+
43
+ /**
44
+ * Object representing the asset held in the vault.
45
+ */
46
+ Asset: Currency
47
+
48
+ /**
49
+ * Amount of assets currently available for withdrawal.
50
+ */
51
+ AssetsAvailable: string
52
+
53
+ /**
54
+ * Total amount of assets in the vault.
55
+ */
56
+ AssetsTotal: string
57
+
58
+ /**
59
+ * Ledger entry type, always "Vault".
60
+ */
61
+ LedgerEntryType: 'Vault'
62
+
63
+ /**
64
+ * ID of the Vault Owner account.
65
+ */
66
+ Owner: string
67
+
68
+ /**
69
+ * Transaction ID of the last modification to this vault.
70
+ */
71
+ PreviousTxnID: string
72
+
73
+ /**
74
+ * Ledger sequence number of the last transaction modifying this vault.
75
+ */
76
+ PreviousTxnLgrSeq: number
77
+
78
+ /**
79
+ * Sequence number of the vault entry.
80
+ */
81
+ Sequence: number
82
+
83
+ /**
84
+ * Unique index of the vault ledger entry.
85
+ */
86
+ index: string
87
+
88
+ /**
89
+ * Object containing details about issued shares.
90
+ */
91
+ shares: {
92
+ /**
93
+ * The ID of the Issuer of the Share. It will always be the pseudo-account ID.
94
+ */
95
+ Issuer: string
96
+
97
+ /**
98
+ * Ledger entry type, always "MPTokenIssuance".
99
+ */
100
+ LedgerEntryType: string
101
+
102
+ /**
103
+ * Total outstanding shares issued.
104
+ */
105
+ OutstandingAmount: string
106
+
107
+ /**
108
+ * Transaction ID of the last modification to the shares issuance.
109
+ */
110
+ PreviousTxnID: string
111
+
112
+ /**
113
+ * Ledger sequence number of the last transaction modifying the shares issuance.
114
+ */
115
+ PreviousTxnLgrSeq: number
116
+
117
+ /**
118
+ * Sequence number of the shares issuance entry.
119
+ */
120
+ Sequence: number
121
+
122
+ /**
123
+ * Unique index of the shares ledger entry.
124
+ */
125
+ index: string
126
+
127
+ /**
128
+ * Identifier for the owner node of the shares.
129
+ */
130
+ OwnerNode?: string
131
+
132
+ /**
133
+ * The ID of the MPTokenIssuance object. It will always be equal to vault.ShareMPTID.
134
+ */
135
+ mpt_issuance_id?: string
136
+
137
+ /**
138
+ * The PermissionedDomain object ID associated with the shares of this Vault.
139
+ */
140
+ DomainID?: string
141
+
142
+ /**
143
+ * Bit-field flags associated with the shares issuance.
144
+ */
145
+ Flags?: number
146
+ }
147
+
148
+ /**
149
+ * Unrealized loss associated with the vault.
150
+ */
151
+ LossUnrealized?: string
152
+
153
+ /**
154
+ * Identifier for the owner node in the ledger tree.
155
+ */
156
+ OwnerNode?: string
157
+
158
+ /**
159
+ * Multi-purpose token ID associated with this vault.
160
+ */
161
+ ShareMPTID?: string
162
+
163
+ /**
164
+ * Policy defining withdrawal conditions.
165
+ */
166
+ WithdrawalPolicy?: number
167
+
168
+ /**
169
+ * Flags
170
+ */
171
+ Flags?: number
172
+ }
173
+
174
+ /**
175
+ * The identifying hash of the ledger that was used to generate this
176
+ * response.
177
+ */
178
+ ledger_hash?: string
179
+
180
+ /**
181
+ * The ledger index of the ledger version that was used to generate this
182
+ * response.
183
+ */
184
+ ledger_index?: number
185
+
186
+ /**
187
+ * If included and set to true, the information in this response comes from
188
+ * a validated ledger version. Otherwise, the information is subject to
189
+ * change.
190
+ */
191
+ validated?: boolean
192
+ }
193
+ }
@@ -4,7 +4,9 @@ import { AuthAccount, Currency, IssuedCurrencyAmount } from '../common'
4
4
  import {
5
5
  BaseTransaction,
6
6
  isAmount,
7
- isCurrency,
7
+ isArray,
8
+ isIssuedCurrency,
9
+ isRecord,
8
10
  validateBaseTransaction,
9
11
  } from './common'
10
12
 
@@ -65,7 +67,7 @@ export function validateAMMBid(tx: Record<string, unknown>): void {
65
67
  throw new ValidationError('AMMBid: missing field Asset')
66
68
  }
67
69
 
68
- if (!isCurrency(tx.Asset)) {
70
+ if (!isIssuedCurrency(tx.Asset)) {
69
71
  throw new ValidationError('AMMBid: Asset must be a Currency')
70
72
  }
71
73
 
@@ -73,7 +75,7 @@ export function validateAMMBid(tx: Record<string, unknown>): void {
73
75
  throw new ValidationError('AMMBid: missing field Asset2')
74
76
  }
75
77
 
76
- if (!isCurrency(tx.Asset2)) {
78
+ if (!isIssuedCurrency(tx.Asset2)) {
77
79
  throw new ValidationError('AMMBid: Asset2 must be a Currency')
78
80
  }
79
81
 
@@ -86,7 +88,7 @@ export function validateAMMBid(tx: Record<string, unknown>): void {
86
88
  }
87
89
 
88
90
  if (tx.AuthAccounts != null) {
89
- if (!Array.isArray(tx.AuthAccounts)) {
91
+ if (!isArray(tx.AuthAccounts)) {
90
92
  throw new ValidationError(
91
93
  `AMMBid: AuthAccounts must be an AuthAccount array`,
92
94
  )
@@ -96,37 +98,27 @@ export function validateAMMBid(tx: Record<string, unknown>): void {
96
98
  `AMMBid: AuthAccounts length must not be greater than ${MAX_AUTH_ACCOUNTS}`,
97
99
  )
98
100
  }
99
- validateAuthAccounts(
100
- tx.Account,
101
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Only used by JS
102
- tx.AuthAccounts as Array<Record<string, unknown>>,
103
- )
101
+ validateAuthAccounts(tx.Account, tx.AuthAccounts)
104
102
  }
105
103
  }
106
104
 
107
105
  function validateAuthAccounts(
108
106
  senderAddress: string,
109
- authAccounts: Array<Record<string, unknown>>,
107
+ authAccounts: unknown[],
110
108
  ): boolean {
111
109
  for (const authAccount of authAccounts) {
112
- if (
113
- authAccount.AuthAccount == null ||
114
- typeof authAccount.AuthAccount !== 'object'
115
- ) {
110
+ if (!isRecord(authAccount)) {
111
+ throw new ValidationError(`AMMBid: invalid AuthAccounts`)
112
+ }
113
+ if (!isRecord(authAccount.AuthAccount)) {
116
114
  throw new ValidationError(`AMMBid: invalid AuthAccounts`)
117
115
  }
118
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- used for null check
119
- // @ts-expect-error -- used for null check
120
116
  if (authAccount.AuthAccount.Account == null) {
121
117
  throw new ValidationError(`AMMBid: invalid AuthAccounts`)
122
118
  }
123
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- used for null check
124
- // @ts-expect-error -- used for null check
125
119
  if (typeof authAccount.AuthAccount.Account !== 'string') {
126
120
  throw new ValidationError(`AMMBid: invalid AuthAccounts`)
127
121
  }
128
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- used for null check
129
- // @ts-expect-error -- used for null check
130
122
  if (authAccount.AuthAccount.Account === senderAddress) {
131
123
  throw new ValidationError(
132
124
  `AMMBid: AuthAccounts must not include sender's address`,