xrpl 2.12.0 → 2.13.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 (371) hide show
  1. package/README.md +114 -5
  2. package/build/xrpl-latest-min.js +1 -1
  3. package/build/xrpl-latest-min.js.map +1 -1
  4. package/build/xrpl-latest.js +8282 -8518
  5. package/build/xrpl-latest.js.map +1 -1
  6. package/dist/npm/Wallet/defaultFaucets.d.ts.map +1 -1
  7. package/dist/npm/Wallet/defaultFaucets.js +0 -3
  8. package/dist/npm/Wallet/defaultFaucets.js.map +1 -1
  9. package/dist/npm/client/partialPayment.d.ts.map +1 -1
  10. package/dist/npm/client/partialPayment.js.map +1 -1
  11. package/dist/npm/models/ledger/AMM.d.ts +2 -4
  12. package/dist/npm/models/ledger/AMM.d.ts.map +1 -1
  13. package/dist/npm/models/ledger/AccountRoot.d.ts +2 -4
  14. package/dist/npm/models/ledger/AccountRoot.d.ts.map +1 -1
  15. package/dist/npm/models/ledger/AccountRoot.js.map +1 -1
  16. package/dist/npm/models/ledger/Amendments.d.ts +2 -2
  17. package/dist/npm/models/ledger/Amendments.d.ts.map +1 -1
  18. package/dist/npm/models/ledger/BaseLedgerEntry.d.ts +9 -1
  19. package/dist/npm/models/ledger/BaseLedgerEntry.d.ts.map +1 -1
  20. package/dist/npm/models/ledger/Bridge.d.ts +2 -4
  21. package/dist/npm/models/ledger/Bridge.d.ts.map +1 -1
  22. package/dist/npm/models/ledger/Check.d.ts +2 -2
  23. package/dist/npm/models/ledger/Check.d.ts.map +1 -1
  24. package/dist/npm/models/ledger/DepositPreauth.d.ts +2 -4
  25. package/dist/npm/models/ledger/DepositPreauth.d.ts.map +1 -1
  26. package/dist/npm/models/ledger/DirectoryNode.d.ts +2 -2
  27. package/dist/npm/models/ledger/DirectoryNode.d.ts.map +1 -1
  28. package/dist/npm/models/ledger/Escrow.d.ts +2 -4
  29. package/dist/npm/models/ledger/Escrow.d.ts.map +1 -1
  30. package/dist/npm/models/ledger/FeeSettings.d.ts +2 -2
  31. package/dist/npm/models/ledger/FeeSettings.d.ts.map +1 -1
  32. package/dist/npm/models/ledger/Ledger.d.ts +3 -3
  33. package/dist/npm/models/ledger/Ledger.d.ts.map +1 -1
  34. package/dist/npm/models/ledger/LedgerEntry.d.ts +2 -1
  35. package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
  36. package/dist/npm/models/ledger/LedgerHashes.d.ts +2 -2
  37. package/dist/npm/models/ledger/LedgerHashes.d.ts.map +1 -1
  38. package/dist/npm/models/ledger/NFTokenOffer.d.ts +2 -4
  39. package/dist/npm/models/ledger/NFTokenOffer.d.ts.map +1 -1
  40. package/dist/npm/models/ledger/NFTokenPage.d.ts +2 -4
  41. package/dist/npm/models/ledger/NFTokenPage.d.ts.map +1 -1
  42. package/dist/npm/models/ledger/NegativeUNL.d.ts +2 -2
  43. package/dist/npm/models/ledger/NegativeUNL.d.ts.map +1 -1
  44. package/dist/npm/models/ledger/Offer.d.ts +2 -4
  45. package/dist/npm/models/ledger/Offer.d.ts.map +1 -1
  46. package/dist/npm/models/ledger/Offer.js.map +1 -1
  47. package/dist/npm/models/ledger/PayChannel.d.ts +2 -4
  48. package/dist/npm/models/ledger/PayChannel.d.ts.map +1 -1
  49. package/dist/npm/models/ledger/RippleState.d.ts +2 -4
  50. package/dist/npm/models/ledger/RippleState.d.ts.map +1 -1
  51. package/dist/npm/models/ledger/RippleState.js.map +1 -1
  52. package/dist/npm/models/ledger/SignerList.d.ts +2 -4
  53. package/dist/npm/models/ledger/SignerList.d.ts.map +1 -1
  54. package/dist/npm/models/ledger/SignerList.js.map +1 -1
  55. package/dist/npm/models/ledger/Ticket.d.ts +2 -4
  56. package/dist/npm/models/ledger/Ticket.d.ts.map +1 -1
  57. package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts +2 -4
  58. package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
  59. package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +2 -4
  60. package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -1
  61. package/dist/npm/models/ledger/index.d.ts +2 -2
  62. package/dist/npm/models/ledger/index.d.ts.map +1 -1
  63. package/dist/npm/models/ledger/index.js.map +1 -1
  64. package/dist/npm/models/methods/accountObjects.d.ts +4 -3
  65. package/dist/npm/models/methods/accountObjects.d.ts.map +1 -1
  66. package/dist/npm/models/methods/ledger.d.ts +2 -0
  67. package/dist/npm/models/methods/ledger.d.ts.map +1 -1
  68. package/dist/npm/models/methods/ledgerData.d.ts +2 -1
  69. package/dist/npm/models/methods/ledgerData.d.ts.map +1 -1
  70. package/dist/npm/models/methods/ledgerEntry.d.ts +2 -2
  71. package/dist/npm/models/methods/ledgerEntry.d.ts.map +1 -1
  72. package/dist/npm/models/methods/tx.d.ts +2 -1
  73. package/dist/npm/models/methods/tx.d.ts.map +1 -1
  74. package/dist/npm/models/transactions/NFTokenBurn.d.ts +3 -3
  75. package/dist/npm/models/transactions/NFTokenBurn.d.ts.map +1 -1
  76. package/dist/npm/models/transactions/NFTokenBurn.js +2 -4
  77. package/dist/npm/models/transactions/NFTokenBurn.js.map +1 -1
  78. package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts +3 -3
  79. package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
  80. package/dist/npm/models/transactions/NFTokenCreateOffer.js +2 -0
  81. package/dist/npm/models/transactions/NFTokenCreateOffer.js.map +1 -1
  82. package/dist/npm/models/transactions/NFTokenMint.d.ts +2 -2
  83. package/dist/npm/models/transactions/NFTokenMint.d.ts.map +1 -1
  84. package/dist/npm/models/transactions/NFTokenMint.js +1 -0
  85. package/dist/npm/models/transactions/NFTokenMint.js.map +1 -1
  86. package/dist/npm/models/transactions/UNLModify.d.ts +2 -1
  87. package/dist/npm/models/transactions/UNLModify.d.ts.map +1 -1
  88. package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts +2 -2
  89. package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -1
  90. package/dist/npm/models/transactions/XChainAccountCreateCommit.js +1 -2
  91. package/dist/npm/models/transactions/XChainAccountCreateCommit.js.map +1 -1
  92. package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts +5 -5
  93. package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -1
  94. package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js +4 -4
  95. package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -1
  96. package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts +5 -5
  97. package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -1
  98. package/dist/npm/models/transactions/XChainAddClaimAttestation.js +4 -4
  99. package/dist/npm/models/transactions/XChainAddClaimAttestation.js.map +1 -1
  100. package/dist/npm/models/transactions/XChainClaim.d.ts +2 -2
  101. package/dist/npm/models/transactions/XChainClaim.d.ts.map +1 -1
  102. package/dist/npm/models/transactions/XChainClaim.js +1 -1
  103. package/dist/npm/models/transactions/XChainClaim.js.map +1 -1
  104. package/dist/npm/models/transactions/XChainCommit.d.ts +2 -2
  105. package/dist/npm/models/transactions/XChainCommit.d.ts.map +1 -1
  106. package/dist/npm/models/transactions/XChainCommit.js +1 -1
  107. package/dist/npm/models/transactions/XChainCommit.js.map +1 -1
  108. package/dist/npm/models/transactions/XChainCreateClaimID.d.ts +2 -2
  109. package/dist/npm/models/transactions/XChainCreateClaimID.d.ts.map +1 -1
  110. package/dist/npm/models/transactions/XChainCreateClaimID.js +1 -1
  111. package/dist/npm/models/transactions/XChainCreateClaimID.js.map +1 -1
  112. package/dist/npm/models/transactions/accountDelete.d.ts +2 -2
  113. package/dist/npm/models/transactions/accountDelete.d.ts.map +1 -1
  114. package/dist/npm/models/transactions/accountDelete.js +2 -11
  115. package/dist/npm/models/transactions/accountDelete.js.map +1 -1
  116. package/dist/npm/models/transactions/accountSet.d.ts +2 -2
  117. package/dist/npm/models/transactions/accountSet.d.ts.map +1 -1
  118. package/dist/npm/models/transactions/accountSet.js +1 -5
  119. package/dist/npm/models/transactions/accountSet.js.map +1 -1
  120. package/dist/npm/models/transactions/checkCreate.d.ts +2 -2
  121. package/dist/npm/models/transactions/checkCreate.d.ts.map +1 -1
  122. package/dist/npm/models/transactions/checkCreate.js +2 -10
  123. package/dist/npm/models/transactions/checkCreate.js.map +1 -1
  124. package/dist/npm/models/transactions/common.d.ts +3 -1
  125. package/dist/npm/models/transactions/common.d.ts.map +1 -1
  126. package/dist/npm/models/transactions/common.js +7 -1
  127. package/dist/npm/models/transactions/common.js.map +1 -1
  128. package/dist/npm/models/transactions/escrowCancel.d.ts +2 -2
  129. package/dist/npm/models/transactions/escrowCancel.d.ts.map +1 -1
  130. package/dist/npm/models/transactions/escrowCancel.js +1 -6
  131. package/dist/npm/models/transactions/escrowCancel.js.map +1 -1
  132. package/dist/npm/models/transactions/escrowCreate.d.ts +2 -2
  133. package/dist/npm/models/transactions/escrowCreate.d.ts.map +1 -1
  134. package/dist/npm/models/transactions/escrowCreate.js +2 -10
  135. package/dist/npm/models/transactions/escrowCreate.js.map +1 -1
  136. package/dist/npm/models/transactions/escrowFinish.d.ts +2 -2
  137. package/dist/npm/models/transactions/escrowFinish.d.ts.map +1 -1
  138. package/dist/npm/models/transactions/escrowFinish.js +1 -6
  139. package/dist/npm/models/transactions/escrowFinish.js.map +1 -1
  140. package/dist/npm/models/transactions/index.d.ts +1 -1
  141. package/dist/npm/models/transactions/index.d.ts.map +1 -1
  142. package/dist/npm/models/transactions/index.js.map +1 -1
  143. package/dist/npm/models/transactions/payment.d.ts +2 -2
  144. package/dist/npm/models/transactions/payment.d.ts.map +1 -1
  145. package/dist/npm/models/transactions/payment.js +2 -9
  146. package/dist/npm/models/transactions/payment.js.map +1 -1
  147. package/dist/npm/models/transactions/paymentChannelCreate.d.ts +2 -2
  148. package/dist/npm/models/transactions/paymentChannelCreate.d.ts.map +1 -1
  149. package/dist/npm/models/transactions/paymentChannelCreate.js +2 -10
  150. package/dist/npm/models/transactions/paymentChannelCreate.js.map +1 -1
  151. package/dist/npm/models/transactions/transaction.d.ts +4 -0
  152. package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
  153. package/dist/npm/models/transactions/transaction.js.map +1 -1
  154. package/dist/npm/models/utils/flags.d.ts.map +1 -1
  155. package/dist/npm/models/utils/flags.js +17 -28
  156. package/dist/npm/models/utils/flags.js.map +1 -1
  157. package/dist/npm/snippets/src/bridgeTransfer.js +4 -3
  158. package/dist/npm/snippets/src/bridgeTransfer.js.map +1 -1
  159. package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -0
  160. package/dist/npm/src/Wallet/defaultFaucets.d.ts.map +1 -1
  161. package/dist/npm/src/Wallet/defaultFaucets.js +0 -3
  162. package/dist/npm/src/Wallet/defaultFaucets.js.map +1 -1
  163. package/dist/npm/src/client/partialPayment.d.ts.map +1 -1
  164. package/dist/npm/src/client/partialPayment.js.map +1 -1
  165. package/dist/npm/src/models/ledger/AMM.d.ts +2 -4
  166. package/dist/npm/src/models/ledger/AMM.d.ts.map +1 -1
  167. package/dist/npm/src/models/ledger/AccountRoot.d.ts +2 -4
  168. package/dist/npm/src/models/ledger/AccountRoot.d.ts.map +1 -1
  169. package/dist/npm/src/models/ledger/AccountRoot.js.map +1 -1
  170. package/dist/npm/src/models/ledger/Amendments.d.ts +2 -2
  171. package/dist/npm/src/models/ledger/Amendments.d.ts.map +1 -1
  172. package/dist/npm/src/models/ledger/BaseLedgerEntry.d.ts +9 -1
  173. package/dist/npm/src/models/ledger/BaseLedgerEntry.d.ts.map +1 -1
  174. package/dist/npm/src/models/ledger/Bridge.d.ts +2 -4
  175. package/dist/npm/src/models/ledger/Bridge.d.ts.map +1 -1
  176. package/dist/npm/src/models/ledger/Check.d.ts +2 -2
  177. package/dist/npm/src/models/ledger/Check.d.ts.map +1 -1
  178. package/dist/npm/src/models/ledger/DepositPreauth.d.ts +2 -4
  179. package/dist/npm/src/models/ledger/DepositPreauth.d.ts.map +1 -1
  180. package/dist/npm/src/models/ledger/DirectoryNode.d.ts +2 -2
  181. package/dist/npm/src/models/ledger/DirectoryNode.d.ts.map +1 -1
  182. package/dist/npm/src/models/ledger/Escrow.d.ts +2 -4
  183. package/dist/npm/src/models/ledger/Escrow.d.ts.map +1 -1
  184. package/dist/npm/src/models/ledger/FeeSettings.d.ts +2 -2
  185. package/dist/npm/src/models/ledger/FeeSettings.d.ts.map +1 -1
  186. package/dist/npm/src/models/ledger/Ledger.d.ts +3 -3
  187. package/dist/npm/src/models/ledger/Ledger.d.ts.map +1 -1
  188. package/dist/npm/src/models/ledger/LedgerEntry.d.ts +2 -1
  189. package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
  190. package/dist/npm/src/models/ledger/LedgerHashes.d.ts +2 -2
  191. package/dist/npm/src/models/ledger/LedgerHashes.d.ts.map +1 -1
  192. package/dist/npm/src/models/ledger/NFTokenOffer.d.ts +2 -4
  193. package/dist/npm/src/models/ledger/NFTokenOffer.d.ts.map +1 -1
  194. package/dist/npm/src/models/ledger/NFTokenPage.d.ts +2 -4
  195. package/dist/npm/src/models/ledger/NFTokenPage.d.ts.map +1 -1
  196. package/dist/npm/src/models/ledger/NegativeUNL.d.ts +2 -2
  197. package/dist/npm/src/models/ledger/NegativeUNL.d.ts.map +1 -1
  198. package/dist/npm/src/models/ledger/Offer.d.ts +2 -4
  199. package/dist/npm/src/models/ledger/Offer.d.ts.map +1 -1
  200. package/dist/npm/src/models/ledger/Offer.js.map +1 -1
  201. package/dist/npm/src/models/ledger/PayChannel.d.ts +2 -4
  202. package/dist/npm/src/models/ledger/PayChannel.d.ts.map +1 -1
  203. package/dist/npm/src/models/ledger/RippleState.d.ts +2 -4
  204. package/dist/npm/src/models/ledger/RippleState.d.ts.map +1 -1
  205. package/dist/npm/src/models/ledger/RippleState.js.map +1 -1
  206. package/dist/npm/src/models/ledger/SignerList.d.ts +2 -4
  207. package/dist/npm/src/models/ledger/SignerList.d.ts.map +1 -1
  208. package/dist/npm/src/models/ledger/SignerList.js.map +1 -1
  209. package/dist/npm/src/models/ledger/Ticket.d.ts +2 -4
  210. package/dist/npm/src/models/ledger/Ticket.d.ts.map +1 -1
  211. package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts +2 -4
  212. package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
  213. package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +2 -4
  214. package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -1
  215. package/dist/npm/src/models/ledger/index.d.ts +2 -2
  216. package/dist/npm/src/models/ledger/index.d.ts.map +1 -1
  217. package/dist/npm/src/models/ledger/index.js.map +1 -1
  218. package/dist/npm/src/models/methods/accountObjects.d.ts +4 -3
  219. package/dist/npm/src/models/methods/accountObjects.d.ts.map +1 -1
  220. package/dist/npm/src/models/methods/ledger.d.ts +2 -0
  221. package/dist/npm/src/models/methods/ledger.d.ts.map +1 -1
  222. package/dist/npm/src/models/methods/ledgerData.d.ts +2 -1
  223. package/dist/npm/src/models/methods/ledgerData.d.ts.map +1 -1
  224. package/dist/npm/src/models/methods/ledgerEntry.d.ts +2 -2
  225. package/dist/npm/src/models/methods/ledgerEntry.d.ts.map +1 -1
  226. package/dist/npm/src/models/methods/tx.d.ts +2 -1
  227. package/dist/npm/src/models/methods/tx.d.ts.map +1 -1
  228. package/dist/npm/src/models/transactions/NFTokenBurn.d.ts +3 -3
  229. package/dist/npm/src/models/transactions/NFTokenBurn.d.ts.map +1 -1
  230. package/dist/npm/src/models/transactions/NFTokenBurn.js +2 -4
  231. package/dist/npm/src/models/transactions/NFTokenBurn.js.map +1 -1
  232. package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts +3 -3
  233. package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
  234. package/dist/npm/src/models/transactions/NFTokenCreateOffer.js +2 -0
  235. package/dist/npm/src/models/transactions/NFTokenCreateOffer.js.map +1 -1
  236. package/dist/npm/src/models/transactions/NFTokenMint.d.ts +2 -2
  237. package/dist/npm/src/models/transactions/NFTokenMint.d.ts.map +1 -1
  238. package/dist/npm/src/models/transactions/NFTokenMint.js +1 -0
  239. package/dist/npm/src/models/transactions/NFTokenMint.js.map +1 -1
  240. package/dist/npm/src/models/transactions/UNLModify.d.ts +2 -1
  241. package/dist/npm/src/models/transactions/UNLModify.d.ts.map +1 -1
  242. package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts +2 -2
  243. package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -1
  244. package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js +1 -2
  245. package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js.map +1 -1
  246. package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts +5 -5
  247. package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -1
  248. package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js +4 -4
  249. package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -1
  250. package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts +5 -5
  251. package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -1
  252. package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js +4 -4
  253. package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js.map +1 -1
  254. package/dist/npm/src/models/transactions/XChainClaim.d.ts +2 -2
  255. package/dist/npm/src/models/transactions/XChainClaim.d.ts.map +1 -1
  256. package/dist/npm/src/models/transactions/XChainClaim.js +1 -1
  257. package/dist/npm/src/models/transactions/XChainClaim.js.map +1 -1
  258. package/dist/npm/src/models/transactions/XChainCommit.d.ts +2 -2
  259. package/dist/npm/src/models/transactions/XChainCommit.d.ts.map +1 -1
  260. package/dist/npm/src/models/transactions/XChainCommit.js +1 -1
  261. package/dist/npm/src/models/transactions/XChainCommit.js.map +1 -1
  262. package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts +2 -2
  263. package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts.map +1 -1
  264. package/dist/npm/src/models/transactions/XChainCreateClaimID.js +1 -1
  265. package/dist/npm/src/models/transactions/XChainCreateClaimID.js.map +1 -1
  266. package/dist/npm/src/models/transactions/accountDelete.d.ts +2 -2
  267. package/dist/npm/src/models/transactions/accountDelete.d.ts.map +1 -1
  268. package/dist/npm/src/models/transactions/accountDelete.js +2 -11
  269. package/dist/npm/src/models/transactions/accountDelete.js.map +1 -1
  270. package/dist/npm/src/models/transactions/accountSet.d.ts +2 -2
  271. package/dist/npm/src/models/transactions/accountSet.d.ts.map +1 -1
  272. package/dist/npm/src/models/transactions/accountSet.js +1 -5
  273. package/dist/npm/src/models/transactions/accountSet.js.map +1 -1
  274. package/dist/npm/src/models/transactions/checkCreate.d.ts +2 -2
  275. package/dist/npm/src/models/transactions/checkCreate.d.ts.map +1 -1
  276. package/dist/npm/src/models/transactions/checkCreate.js +2 -10
  277. package/dist/npm/src/models/transactions/checkCreate.js.map +1 -1
  278. package/dist/npm/src/models/transactions/common.d.ts +3 -1
  279. package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
  280. package/dist/npm/src/models/transactions/common.js +7 -1
  281. package/dist/npm/src/models/transactions/common.js.map +1 -1
  282. package/dist/npm/src/models/transactions/escrowCancel.d.ts +2 -2
  283. package/dist/npm/src/models/transactions/escrowCancel.d.ts.map +1 -1
  284. package/dist/npm/src/models/transactions/escrowCancel.js +1 -6
  285. package/dist/npm/src/models/transactions/escrowCancel.js.map +1 -1
  286. package/dist/npm/src/models/transactions/escrowCreate.d.ts +2 -2
  287. package/dist/npm/src/models/transactions/escrowCreate.d.ts.map +1 -1
  288. package/dist/npm/src/models/transactions/escrowCreate.js +2 -10
  289. package/dist/npm/src/models/transactions/escrowCreate.js.map +1 -1
  290. package/dist/npm/src/models/transactions/escrowFinish.d.ts +2 -2
  291. package/dist/npm/src/models/transactions/escrowFinish.d.ts.map +1 -1
  292. package/dist/npm/src/models/transactions/escrowFinish.js +1 -6
  293. package/dist/npm/src/models/transactions/escrowFinish.js.map +1 -1
  294. package/dist/npm/src/models/transactions/index.d.ts +1 -1
  295. package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
  296. package/dist/npm/src/models/transactions/index.js.map +1 -1
  297. package/dist/npm/src/models/transactions/payment.d.ts +2 -2
  298. package/dist/npm/src/models/transactions/payment.d.ts.map +1 -1
  299. package/dist/npm/src/models/transactions/payment.js +2 -9
  300. package/dist/npm/src/models/transactions/payment.js.map +1 -1
  301. package/dist/npm/src/models/transactions/paymentChannelCreate.d.ts +2 -2
  302. package/dist/npm/src/models/transactions/paymentChannelCreate.d.ts.map +1 -1
  303. package/dist/npm/src/models/transactions/paymentChannelCreate.js +2 -10
  304. package/dist/npm/src/models/transactions/paymentChannelCreate.js.map +1 -1
  305. package/dist/npm/src/models/transactions/transaction.d.ts +4 -0
  306. package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
  307. package/dist/npm/src/models/transactions/transaction.js.map +1 -1
  308. package/dist/npm/src/models/utils/flags.d.ts.map +1 -1
  309. package/dist/npm/src/models/utils/flags.js +17 -28
  310. package/dist/npm/src/models/utils/flags.js.map +1 -1
  311. package/dist/npm/src/utils/hashes/hashLedger.d.ts +2 -1
  312. package/dist/npm/src/utils/hashes/hashLedger.d.ts.map +1 -1
  313. package/dist/npm/src/utils/hashes/hashLedger.js.map +1 -1
  314. package/dist/npm/utils/hashes/hashLedger.d.ts +2 -1
  315. package/dist/npm/utils/hashes/hashLedger.d.ts.map +1 -1
  316. package/dist/npm/utils/hashes/hashLedger.js.map +1 -1
  317. package/package.json +12 -3
  318. package/src/Wallet/defaultFaucets.ts +0 -4
  319. package/src/client/partialPayment.ts +6 -2
  320. package/src/models/ledger/AMM.ts +2 -10
  321. package/src/models/ledger/AccountRoot.ts +2 -12
  322. package/src/models/ledger/Amendments.ts +4 -2
  323. package/src/models/ledger/BaseLedgerEntry.ts +25 -1
  324. package/src/models/ledger/Bridge.ts +2 -14
  325. package/src/models/ledger/Check.ts +2 -2
  326. package/src/models/ledger/DepositPreauth.ts +4 -12
  327. package/src/models/ledger/DirectoryNode.ts +4 -2
  328. package/src/models/ledger/Escrow.ts +2 -12
  329. package/src/models/ledger/FeeSettings.ts +2 -2
  330. package/src/models/ledger/Ledger.ts +9 -3
  331. package/src/models/ledger/LedgerEntry.ts +22 -1
  332. package/src/models/ledger/LedgerHashes.ts +4 -2
  333. package/src/models/ledger/NFTokenOffer.ts +2 -4
  334. package/src/models/ledger/NFTokenPage.ts +2 -4
  335. package/src/models/ledger/NegativeUNL.ts +4 -2
  336. package/src/models/ledger/Offer.ts +2 -12
  337. package/src/models/ledger/PayChannel.ts +2 -12
  338. package/src/models/ledger/RippleState.ts +2 -12
  339. package/src/models/ledger/SignerList.ts +2 -12
  340. package/src/models/ledger/Ticket.ts +2 -12
  341. package/src/models/ledger/XChainOwnedClaimID.ts +4 -12
  342. package/src/models/ledger/XChainOwnedCreateAccountClaimID.ts +3 -12
  343. package/src/models/ledger/index.ts +2 -1
  344. package/src/models/methods/accountObjects.ts +10 -44
  345. package/src/models/methods/ledger.ts +5 -0
  346. package/src/models/methods/ledgerData.ts +5 -1
  347. package/src/models/methods/ledgerEntry.ts +2 -2
  348. package/src/models/methods/tx.ts +4 -2
  349. package/src/models/transactions/NFTokenBurn.ts +13 -9
  350. package/src/models/transactions/NFTokenCreateOffer.ts +8 -2
  351. package/src/models/transactions/NFTokenMint.ts +11 -2
  352. package/src/models/transactions/UNLModify.ts +3 -1
  353. package/src/models/transactions/XChainAccountCreateCommit.ts +4 -4
  354. package/src/models/transactions/XChainAddAccountCreateAttestation.ts +10 -8
  355. package/src/models/transactions/XChainAddClaimAttestation.ts +10 -8
  356. package/src/models/transactions/XChainClaim.ts +4 -2
  357. package/src/models/transactions/XChainCommit.ts +4 -2
  358. package/src/models/transactions/XChainCreateClaimID.ts +4 -3
  359. package/src/models/transactions/accountDelete.ts +12 -18
  360. package/src/models/transactions/accountSet.ts +10 -11
  361. package/src/models/transactions/checkCreate.ts +8 -15
  362. package/src/models/transactions/common.ts +20 -1
  363. package/src/models/transactions/escrowCancel.ts +9 -9
  364. package/src/models/transactions/escrowCreate.ts +12 -16
  365. package/src/models/transactions/escrowFinish.ts +9 -9
  366. package/src/models/transactions/index.ts +6 -1
  367. package/src/models/transactions/payment.ts +8 -14
  368. package/src/models/transactions/paymentChannelCreate.ts +12 -21
  369. package/src/models/transactions/transaction.ts +5 -0
  370. package/src/models/utils/flags.ts +18 -28
  371. package/src/utils/hashes/hashLedger.ts +4 -1
@@ -1,6 +1,6 @@
1
1
  import { XChainBridge } from '../common'
2
2
 
3
- import BaseLedgerEntry from './BaseLedgerEntry'
3
+ import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
4
4
 
5
5
  /**
6
6
  * The XChainOwnedCreateAccountClaimID ledger object is used to collect attestations
@@ -9,7 +9,8 @@ import BaseLedgerEntry from './BaseLedgerEntry'
9
9
  * @category Ledger Entries
10
10
  */
11
11
  export default interface XChainOwnedCreateAccountClaimID
12
- extends BaseLedgerEntry {
12
+ extends BaseLedgerEntry,
13
+ HasPreviousTxnID {
13
14
  LedgerEntryType: 'XChainOwnedCreateAccountClaimID'
14
15
 
15
16
  /** The account that owns this object. */
@@ -61,14 +62,4 @@ export default interface XChainOwnedCreateAccountClaimID
61
62
  * object, in case the directory consists of multiple pages.
62
63
  */
63
64
  OwnerNode: string
64
- /**
65
- * The identifying hash of the transaction that most recently modified this
66
- * object.
67
- */
68
- PreviousTxnID: string
69
- /**
70
- * The index of the ledger that contains the transaction that most recently
71
- * modified this object.
72
- */
73
- PreviousTxnLgrSeq: number
74
65
  }
@@ -15,7 +15,7 @@ import FeeSettings, {
15
15
  FEE_SETTINGS_ID,
16
16
  } from './FeeSettings'
17
17
  import Ledger from './Ledger'
18
- import LedgerEntry from './LedgerEntry'
18
+ import { LedgerEntry, LedgerEntryFilter } from './LedgerEntry'
19
19
  import LedgerHashes from './LedgerHashes'
20
20
  import NegativeUNL, { NEGATIVE_UNL_ID } from './NegativeUNL'
21
21
  import { NFTokenOffer } from './NFTokenOffer'
@@ -45,6 +45,7 @@ export {
45
45
  FeeSettingsPreAmendmentFields,
46
46
  FeeSettingsPostAmendmentFields,
47
47
  Ledger,
48
+ LedgerEntryFilter,
48
49
  LedgerEntry,
49
50
  LedgerHashes,
50
51
  Majority,
@@ -1,35 +1,12 @@
1
- import {
2
- AMM,
3
- Bridge,
4
- Check,
5
- DepositPreauth,
6
- Escrow,
7
- Offer,
8
- PayChannel,
9
- RippleState,
10
- SignerList,
11
- Ticket,
12
- XChainOwnedClaimID,
13
- XChainOwnedCreateAccountClaimID,
14
- } from '../ledger'
1
+ import { Amendments, FeeSettings, LedgerHashes } from '../ledger'
2
+ import { LedgerEntry, LedgerEntryFilter } from '../ledger/LedgerEntry'
15
3
 
16
4
  import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
17
5
 
18
- export type AccountObjectType =
19
- | 'amm'
20
- | 'bridge'
21
- | 'check'
22
- | 'deposit_preauth'
23
- | 'escrow'
24
- | 'nft_offer'
25
- | 'offer'
26
- | 'payment_channel'
27
- | 'signer_list'
28
- | 'state'
29
- | 'ticket'
30
- | 'xchain_owned_create_account_claim_id'
31
- | 'xchain_owned_claim_id'
32
-
6
+ export type AccountObjectType = Exclude<
7
+ LedgerEntryFilter,
8
+ 'amendments' | 'fee' | 'hashes'
9
+ >
33
10
  /**
34
11
  * The account_objects command returns the raw ledger format for all objects
35
12
  * owned by an account. For a higher-level view of an account's trust lines and
@@ -46,8 +23,6 @@ export interface AccountObjectsRequest
46
23
  account: string
47
24
  /**
48
25
  * If included, filter results to include only this type of ledger object.
49
- * The valid types are: Check , DepositPreauth, Escrow, Offer, PayChannel,
50
- * SignerList, Ticket, and RippleState (trust line).
51
26
  */
52
27
  type?: AccountObjectType
53
28
  /**
@@ -71,19 +46,10 @@ export interface AccountObjectsRequest
71
46
  * Account Objects can be a Check, a DepositPreauth, an Escrow, an Offer, a
72
47
  * PayChannel, a SignerList, a Ticket, or a RippleState.
73
48
  */
74
- export type AccountObject =
75
- | AMM
76
- | Bridge
77
- | Check
78
- | DepositPreauth
79
- | Escrow
80
- | Offer
81
- | PayChannel
82
- | SignerList
83
- | RippleState
84
- | Ticket
85
- | XChainOwnedClaimID
86
- | XChainOwnedCreateAccountClaimID
49
+ export type AccountObject = Exclude<
50
+ LedgerEntry,
51
+ Amendments | FeeSettings | LedgerHashes
52
+ >
87
53
 
88
54
  /**
89
55
  * Response expected from an {@link AccountObjectsRequest}.
@@ -1,4 +1,5 @@
1
1
  import { Ledger } from '../ledger'
2
+ import { LedgerEntryFilter } from '../ledger/LedgerEntry'
2
3
  import { Transaction, TransactionAndMetadata } from '../transactions'
3
4
  import { TransactionMetadata } from '../transactions/metadata'
4
5
 
@@ -65,6 +66,10 @@ export interface LedgerRequest extends BaseRequest, LookupByLedgerRequest {
65
66
  * array of queued transactions in the results.
66
67
  */
67
68
  queue?: boolean
69
+ /**
70
+ * If included, filter results to include only this type of ledger object.
71
+ */
72
+ type?: LedgerEntryFilter
68
73
  }
69
74
 
70
75
  /**
@@ -1,4 +1,4 @@
1
- import { LedgerEntry } from '../ledger'
1
+ import { LedgerEntry, LedgerEntryFilter } from '../ledger'
2
2
 
3
3
  import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
4
4
 
@@ -37,6 +37,10 @@ export interface LedgerDataRequest extends BaseRequest, LookupByLedgerRequest {
37
37
  * that response left off.
38
38
  */
39
39
  marker?: unknown
40
+ /**
41
+ * If included, filter results to include only this type of ledger object.
42
+ */
43
+ type?: LedgerEntryFilter
40
44
  }
41
45
 
42
46
  export type LedgerDataLabeledLedgerEntry = {
@@ -184,7 +184,7 @@ export interface LedgerEntryRequest extends BaseRequest, LookupByLedgerRequest {
184
184
  *
185
185
  * @category Responses
186
186
  */
187
- export interface LedgerEntryResponse extends BaseResponse {
187
+ export interface LedgerEntryResponse<T = LedgerEntry> extends BaseResponse {
188
188
  result: {
189
189
  /** The unique ID of this ledger object. */
190
190
  index: string
@@ -194,7 +194,7 @@ export interface LedgerEntryResponse extends BaseResponse {
194
194
  * Object containing the data of this ledger object, according to the
195
195
  * ledger format.
196
196
  */
197
- node?: LedgerEntry
197
+ node?: T
198
198
  /** The binary representation of the ledger object, as hexadecimal. */
199
199
  node_binary?: string
200
200
  validated?: boolean
@@ -1,5 +1,6 @@
1
1
  import { Transaction, TransactionMetadata } from '../transactions'
2
2
  import { BaseTransaction } from '../transactions/common'
3
+ import { PseudoTransaction } from '../transactions/transaction'
3
4
 
4
5
  import { BaseRequest, BaseResponse } from './baseMethod'
5
6
 
@@ -39,8 +40,9 @@ export interface TxRequest extends BaseRequest {
39
40
  *
40
41
  * @category Responses
41
42
  */
42
- export interface TxResponse<T extends BaseTransaction = Transaction>
43
- extends BaseResponse {
43
+ export interface TxResponse<
44
+ T extends BaseTransaction = Transaction | PseudoTransaction,
45
+ > extends BaseResponse {
44
46
  result: {
45
47
  /** The SHA-512 hash of the transaction. */
46
48
  hash: string
@@ -1,6 +1,12 @@
1
- import { ValidationError } from '../../errors'
2
-
3
- import { BaseTransaction, validateBaseTransaction } from './common'
1
+ import {
2
+ Account,
3
+ BaseTransaction,
4
+ isAccount,
5
+ isString,
6
+ validateBaseTransaction,
7
+ validateOptionalField,
8
+ validateRequiredField,
9
+ } from './common'
4
10
 
5
11
  /**
6
12
  * The NFTokenBurn transaction is used to remove an NFToken object from the
@@ -20,7 +26,7 @@ export interface NFTokenBurn extends BaseTransaction {
20
26
  * in the NFToken, either the issuer account or an account authorized by the
21
27
  * issuer, i.e. MintAccount.
22
28
  */
23
- Account: string
29
+ Account: Account
24
30
  /**
25
31
  * Identifies the NFToken object to be removed by the transaction.
26
32
  */
@@ -30,7 +36,7 @@ export interface NFTokenBurn extends BaseTransaction {
30
36
  * Account. Only used to burn tokens which have the lsfBurnable flag enabled
31
37
  * and are not owned by the signing account.
32
38
  */
33
- Owner?: string
39
+ Owner?: Account
34
40
  }
35
41
 
36
42
  /**
@@ -41,8 +47,6 @@ export interface NFTokenBurn extends BaseTransaction {
41
47
  */
42
48
  export function validateNFTokenBurn(tx: Record<string, unknown>): void {
43
49
  validateBaseTransaction(tx)
44
-
45
- if (tx.NFTokenID == null) {
46
- throw new ValidationError('NFTokenBurn: missing field NFTokenID')
47
- }
50
+ validateRequiredField(tx, 'NFTokenID', isString)
51
+ validateOptionalField(tx, 'Owner', isAccount)
48
52
  }
@@ -8,6 +8,9 @@ import {
8
8
  validateBaseTransaction,
9
9
  isAmount,
10
10
  parseAmountValue,
11
+ isAccount,
12
+ validateOptionalField,
13
+ Account,
11
14
  } from './common'
12
15
 
13
16
  /**
@@ -67,7 +70,7 @@ export interface NFTokenCreateOffer extends BaseTransaction {
67
70
  * (since an offer to sell a token one doesn't already hold
68
71
  * is meaningless).
69
72
  */
70
- Owner?: string
73
+ Owner?: Account
71
74
  /**
72
75
  * Indicates the time after which the offer will no longer
73
76
  * be valid. The value is the number of seconds since the
@@ -79,7 +82,7 @@ export interface NFTokenCreateOffer extends BaseTransaction {
79
82
  * accepted by the specified account. Attempts by other
80
83
  * accounts to accept this offer MUST fail.
81
84
  */
82
- Destination?: string
85
+ Destination?: Account
83
86
  Flags?: number | NFTokenCreateOfferFlagsInterface
84
87
  }
85
88
 
@@ -126,6 +129,9 @@ export function validateNFTokenCreateOffer(tx: Record<string, unknown>): void {
126
129
  )
127
130
  }
128
131
 
132
+ validateOptionalField(tx, 'Destination', isAccount)
133
+ validateOptionalField(tx, 'Owner', isAccount)
134
+
129
135
  if (tx.NFTokenID == null) {
130
136
  throw new ValidationError('NFTokenCreateOffer: missing field NFTokenID')
131
137
  }
@@ -1,7 +1,14 @@
1
1
  import { ValidationError } from '../../errors'
2
2
  import { isHex } from '../utils'
3
3
 
4
- import { BaseTransaction, GlobalFlags, validateBaseTransaction } from './common'
4
+ import {
5
+ Account,
6
+ BaseTransaction,
7
+ GlobalFlags,
8
+ isAccount,
9
+ validateBaseTransaction,
10
+ validateOptionalField,
11
+ } from './common'
5
12
 
6
13
  /**
7
14
  * Transaction Flags for an NFTokenMint Transaction.
@@ -68,7 +75,7 @@ export interface NFTokenMint extends BaseTransaction {
68
75
  * present, the `MintAccount` field in the `AccountRoot` of the `Issuer`
69
76
  * field must match the `Account`, otherwise the transaction will fail.
70
77
  */
71
- Issuer?: string
78
+ Issuer?: Account
72
79
  /**
73
80
  * Specifies the fee charged by the issuer for secondary sales of the Token,
74
81
  * if such sales are allowed. Valid values for this field are between 0 and
@@ -109,6 +116,8 @@ export function validateNFTokenMint(tx: Record<string, unknown>): void {
109
116
  )
110
117
  }
111
118
 
119
+ validateOptionalField(tx, 'Issuer', isAccount)
120
+
112
121
  if (typeof tx.URI === 'string' && tx.URI === '') {
113
122
  throw new ValidationError('NFTokenMint: URI must not be empty string')
114
123
  }
@@ -1,9 +1,11 @@
1
+ import { BaseTransaction } from './common'
2
+
1
3
  /**
2
4
  * Mark a change to the Negative UNL.
3
5
  *
4
6
  * @category Pseudo Transaction Models
5
7
  */
6
- export interface UNLModify {
8
+ export interface UNLModify extends BaseTransaction {
7
9
  TransactionType: 'UNLModify'
8
10
  /**
9
11
  * The ledger index where this pseudo-transaction appears.
@@ -1,5 +1,3 @@
1
- import { isString } from 'lodash'
2
-
3
1
  import { Amount, XChainBridge } from '../common'
4
2
 
5
3
  import {
@@ -8,6 +6,8 @@ import {
8
6
  isXChainBridge,
9
7
  validateBaseTransaction,
10
8
  validateRequiredField,
9
+ isAccount,
10
+ Account,
11
11
  } from './common'
12
12
 
13
13
  /**
@@ -39,7 +39,7 @@ export interface XChainAccountCreateCommit extends BaseTransaction {
39
39
  /**
40
40
  * The destination account on the destination chain.
41
41
  */
42
- Destination: string
42
+ Destination: Account
43
43
 
44
44
  /**
45
45
  * The amount, in XRP, to use for account creation. This must be greater than or
@@ -63,7 +63,7 @@ export function validateXChainAccountCreateCommit(
63
63
 
64
64
  validateRequiredField(tx, 'SignatureReward', isAmount)
65
65
 
66
- validateRequiredField(tx, 'Destination', isString)
66
+ validateRequiredField(tx, 'Destination', isAccount)
67
67
 
68
68
  validateRequiredField(tx, 'Amount', isAmount)
69
69
  }
@@ -1,7 +1,9 @@
1
1
  import { Amount, XChainBridge } from '../common'
2
2
 
3
3
  import {
4
+ Account,
4
5
  BaseTransaction,
6
+ isAccount,
5
7
  isAmount,
6
8
  isNumber,
7
9
  isString,
@@ -29,23 +31,23 @@ export interface XChainAddAccountCreateAttestation extends BaseTransaction {
29
31
  /**
30
32
  * The account that should receive this signer's share of the SignatureReward.
31
33
  */
32
- AttestationRewardAccount: string
34
+ AttestationRewardAccount: Account
33
35
 
34
36
  /**
35
37
  * The account on the door account's signer list that is signing the transaction.
36
38
  */
37
- AttestationSignerAccount: string
39
+ AttestationSignerAccount: Account
38
40
 
39
41
  /**
40
42
  * The destination account for the funds on the destination chain.
41
43
  */
42
- Destination: string
44
+ Destination: Account
43
45
 
44
46
  /**
45
47
  * The account on the source chain that submitted the {@link XChainAccountCreateCommit}
46
48
  * transaction that triggered the event associated with the attestation.
47
49
  */
48
- OtherChainSource: string
50
+ OtherChainSource: Account
49
51
 
50
52
  /**
51
53
  * The public key used to verify the signature.
@@ -91,13 +93,13 @@ export function validateXChainAddAccountCreateAttestation(
91
93
 
92
94
  validateRequiredField(tx, 'Amount', isAmount)
93
95
 
94
- validateRequiredField(tx, 'AttestationRewardAccount', isString)
96
+ validateRequiredField(tx, 'AttestationRewardAccount', isAccount)
95
97
 
96
- validateRequiredField(tx, 'AttestationSignerAccount', isString)
98
+ validateRequiredField(tx, 'AttestationSignerAccount', isAccount)
97
99
 
98
- validateRequiredField(tx, 'Destination', isString)
100
+ validateRequiredField(tx, 'Destination', isAccount)
99
101
 
100
- validateRequiredField(tx, 'OtherChainSource', isString)
102
+ validateRequiredField(tx, 'OtherChainSource', isAccount)
101
103
 
102
104
  validateRequiredField(tx, 'PublicKey', isString)
103
105
 
@@ -1,7 +1,9 @@
1
1
  import { Amount, XChainBridge } from '../common'
2
2
 
3
3
  import {
4
+ Account,
4
5
  BaseTransaction,
6
+ isAccount,
5
7
  isAmount,
6
8
  isNumber,
7
9
  isString,
@@ -28,24 +30,24 @@ export interface XChainAddClaimAttestation extends BaseTransaction {
28
30
  /**
29
31
  * The account that should receive this signer's share of the SignatureReward.
30
32
  */
31
- AttestationRewardAccount: string
33
+ AttestationRewardAccount: Account
32
34
 
33
35
  /**
34
36
  * The account on the door account's signer list that is signing the transaction.
35
37
  */
36
- AttestationSignerAccount: string
38
+ AttestationSignerAccount: Account
37
39
 
38
40
  /**
39
41
  * The destination account for the funds on the destination chain (taken from
40
42
  * the {@link XChainCommit} transaction).
41
43
  */
42
- Destination?: string
44
+ Destination?: Account
43
45
 
44
46
  /**
45
47
  * The account on the source chain that submitted the {@link XChainCommit}
46
48
  * transaction that triggered the event associated with the attestation.
47
49
  */
48
- OtherChainSource: string
50
+ OtherChainSource: Account
49
51
 
50
52
  /**
51
53
  * The public key used to verify the attestation signature.
@@ -87,13 +89,13 @@ export function validateXChainAddClaimAttestation(
87
89
 
88
90
  validateRequiredField(tx, 'Amount', isAmount)
89
91
 
90
- validateRequiredField(tx, 'AttestationRewardAccount', isString)
92
+ validateRequiredField(tx, 'AttestationRewardAccount', isAccount)
91
93
 
92
- validateRequiredField(tx, 'AttestationSignerAccount', isString)
94
+ validateRequiredField(tx, 'AttestationSignerAccount', isAccount)
93
95
 
94
- validateOptionalField(tx, 'Destination', isString)
96
+ validateOptionalField(tx, 'Destination', isAccount)
95
97
 
96
- validateRequiredField(tx, 'OtherChainSource', isString)
98
+ validateRequiredField(tx, 'OtherChainSource', isAccount)
97
99
 
98
100
  validateRequiredField(tx, 'PublicKey', isString)
99
101
 
@@ -1,7 +1,9 @@
1
1
  import { Amount, XChainBridge } from '../common'
2
2
 
3
3
  import {
4
+ Account,
4
5
  BaseTransaction,
6
+ isAccount,
5
7
  isAmount,
6
8
  isNumber,
7
9
  isString,
@@ -38,7 +40,7 @@ export interface XChainClaim extends BaseTransaction {
38
40
  * sequence number and collected signatures won't be destroyed, and the
39
41
  * transaction can be rerun with a different destination.
40
42
  */
41
- Destination: string
43
+ Destination: Account
42
44
 
43
45
  /**
44
46
  * An integer destination tag.
@@ -69,7 +71,7 @@ export function validateXChainClaim(tx: Record<string, unknown>): void {
69
71
  (inp) => isNumber(inp) || isString(inp),
70
72
  )
71
73
 
72
- validateRequiredField(tx, 'Destination', isString)
74
+ validateRequiredField(tx, 'Destination', isAccount)
73
75
 
74
76
  validateOptionalField(tx, 'DestinationTag', isNumber)
75
77
 
@@ -1,7 +1,9 @@
1
1
  import { Amount, XChainBridge } from '../common'
2
2
 
3
3
  import {
4
+ Account,
4
5
  BaseTransaction,
6
+ isAccount,
5
7
  isAmount,
6
8
  isNumber,
7
9
  isString,
@@ -41,7 +43,7 @@ export interface XChainCommit extends BaseTransaction {
41
43
  * destination chain will need to submit a {@link XChainClaim} transaction to
42
44
  * claim the funds.
43
45
  */
44
- OtherChainDestination?: string
46
+ OtherChainDestination?: Account
45
47
 
46
48
  /**
47
49
  * The asset to commit, and the quantity. This must match the door account's
@@ -68,7 +70,7 @@ export function validateXChainCommit(tx: Record<string, unknown>): void {
68
70
  (inp) => isNumber(inp) || isString(inp),
69
71
  )
70
72
 
71
- validateOptionalField(tx, 'OtherChainDestination', isString)
73
+ validateOptionalField(tx, 'OtherChainDestination', isAccount)
72
74
 
73
75
  validateRequiredField(tx, 'Amount', isAmount)
74
76
  }
@@ -1,9 +1,10 @@
1
1
  import { Amount, XChainBridge } from '../common'
2
2
 
3
3
  import {
4
+ Account,
4
5
  BaseTransaction,
6
+ isAccount,
5
7
  isAmount,
6
- isString,
7
8
  isXChainBridge,
8
9
  validateBaseTransaction,
9
10
  validateRequiredField,
@@ -33,7 +34,7 @@ export interface XChainCreateClaimID extends BaseTransaction {
33
34
  /**
34
35
  * The account that must send the {@link XChainCommit} transaction on the source chain.
35
36
  */
36
- OtherChainSource: string
37
+ OtherChainSource: Account
37
38
  }
38
39
 
39
40
  /**
@@ -49,5 +50,5 @@ export function validateXChainCreateClaimID(tx: Record<string, unknown>): void {
49
50
 
50
51
  validateRequiredField(tx, 'SignatureReward', isAmount)
51
52
 
52
- validateRequiredField(tx, 'OtherChainSource', isString)
53
+ validateRequiredField(tx, 'OtherChainSource', isAccount)
53
54
  }
@@ -1,6 +1,12 @@
1
- import { ValidationError } from '../../errors'
2
-
3
- import { BaseTransaction, validateBaseTransaction } from './common'
1
+ import {
2
+ Account,
3
+ BaseTransaction,
4
+ isAccount,
5
+ isNumber,
6
+ validateBaseTransaction,
7
+ validateOptionalField,
8
+ validateRequiredField,
9
+ } from './common'
4
10
 
5
11
  /**
6
12
  * An AccountDelete transaction deletes an account and any objects it owns in
@@ -16,7 +22,7 @@ export interface AccountDelete extends BaseTransaction {
16
22
  * sending account. Must be a funded account in the ledger, and must not be.
17
23
  * the sending account.
18
24
  */
19
- Destination: string
25
+ Destination: Account
20
26
  /**
21
27
  * Arbitrary destination tag that identifies a hosted recipient or other.
22
28
  * information for the recipient of the deleted account's leftover XRP.
@@ -33,18 +39,6 @@ export interface AccountDelete extends BaseTransaction {
33
39
  export function validateAccountDelete(tx: Record<string, unknown>): void {
34
40
  validateBaseTransaction(tx)
35
41
 
36
- if (tx.Destination === undefined) {
37
- throw new ValidationError('AccountDelete: missing field Destination')
38
- }
39
-
40
- if (typeof tx.Destination !== 'string') {
41
- throw new ValidationError('AccountDelete: invalid Destination')
42
- }
43
-
44
- if (
45
- tx.DestinationTag !== undefined &&
46
- typeof tx.DestinationTag !== 'number'
47
- ) {
48
- throw new ValidationError('AccountDelete: invalid DestinationTag')
49
- }
42
+ validateRequiredField(tx, 'Destination', isAccount)
43
+ validateOptionalField(tx, 'DestinationTag', isNumber)
50
44
  }
@@ -1,8 +1,12 @@
1
- import { isValidClassicAddress } from 'ripple-address-codec'
2
-
3
1
  import { ValidationError } from '../../errors'
4
2
 
5
- import { BaseTransaction, validateBaseTransaction } from './common'
3
+ import {
4
+ Account,
5
+ BaseTransaction,
6
+ isAccount,
7
+ validateBaseTransaction,
8
+ validateOptionalField,
9
+ } from './common'
6
10
 
7
11
  /**
8
12
  * Enum for AccountSet Flags.
@@ -155,7 +159,7 @@ export interface AccountSet extends BaseTransaction {
155
159
  * Sets an alternate account that is allowed to mint NFTokens on this
156
160
  * account's behalf using NFTokenMint's `Issuer` field.
157
161
  */
158
- NFTokenMinter?: string
162
+ NFTokenMinter?: Account
159
163
  }
160
164
 
161
165
  const MIN_TICK_SIZE = 3
@@ -167,16 +171,11 @@ const MAX_TICK_SIZE = 15
167
171
  * @param tx - An AccountSet Transaction.
168
172
  * @throws When the AccountSet is Malformed.
169
173
  */
170
- // eslint-disable-next-line max-lines-per-function, max-statements -- okay for this method, only a little over
174
+ // eslint-disable-next-line max-lines-per-function -- okay for this method, only a little over
171
175
  export function validateAccountSet(tx: Record<string, unknown>): void {
172
176
  validateBaseTransaction(tx)
173
177
 
174
- if (
175
- tx.NFTokenMinter !== undefined &&
176
- !isValidClassicAddress(String(tx.NFTokenMinter))
177
- ) {
178
- throw new ValidationError('AccountSet: invalid NFTokenMinter')
179
- }
178
+ validateOptionalField(tx, 'NFTokenMinter', isAccount)
180
179
 
181
180
  if (tx.ClearFlag !== undefined) {
182
181
  if (typeof tx.ClearFlag !== 'number') {