xrpl 2.12.0 → 3.0.0-beta.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 (632) 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 +18365 -75189
  5. package/build/xrpl-latest.js.map +1 -1
  6. package/dist/npm/Wallet/authorizeChannel.d.ts +3 -0
  7. package/dist/npm/Wallet/authorizeChannel.d.ts.map +1 -0
  8. package/dist/npm/Wallet/authorizeChannel.js +14 -0
  9. package/dist/npm/Wallet/authorizeChannel.js.map +1 -0
  10. package/dist/npm/Wallet/defaultFaucets.d.ts.map +1 -1
  11. package/dist/npm/Wallet/defaultFaucets.js +1 -4
  12. package/dist/npm/Wallet/defaultFaucets.js.map +1 -1
  13. package/dist/npm/Wallet/fundWallet.d.ts +17 -3
  14. package/dist/npm/Wallet/fundWallet.d.ts.map +1 -1
  15. package/dist/npm/Wallet/fundWallet.js +53 -78
  16. package/dist/npm/Wallet/fundWallet.js.map +1 -1
  17. package/dist/npm/Wallet/index.d.ts.map +1 -1
  18. package/dist/npm/Wallet/index.js +24 -23
  19. package/dist/npm/Wallet/index.js.map +1 -1
  20. package/dist/npm/Wallet/signer.d.ts +2 -4
  21. package/dist/npm/Wallet/signer.d.ts.map +1 -1
  22. package/dist/npm/Wallet/signer.js +17 -13
  23. package/dist/npm/Wallet/signer.js.map +1 -1
  24. package/dist/npm/Wallet/walletFromSecretNumbers.js +2 -2
  25. package/dist/npm/Wallet/walletFromSecretNumbers.js.map +1 -1
  26. package/dist/npm/client/RequestManager.d.ts +3 -2
  27. package/dist/npm/client/RequestManager.d.ts.map +1 -1
  28. package/dist/npm/client/RequestManager.js +25 -1
  29. package/dist/npm/client/RequestManager.js.map +1 -1
  30. package/dist/npm/client/connection.d.ts +8 -11
  31. package/dist/npm/client/connection.d.ts.map +1 -1
  32. package/dist/npm/client/connection.js +8 -54
  33. package/dist/npm/client/connection.js.map +1 -1
  34. package/dist/npm/client/index.d.ts +56 -78
  35. package/dist/npm/client/index.d.ts.map +1 -1
  36. package/dist/npm/client/index.js +155 -42
  37. package/dist/npm/client/index.js.map +1 -1
  38. package/dist/npm/client/partialPayment.d.ts +4 -2
  39. package/dist/npm/client/partialPayment.d.ts.map +1 -1
  40. package/dist/npm/client/partialPayment.js.map +1 -1
  41. package/dist/npm/errors.d.ts.map +1 -1
  42. package/dist/npm/errors.js +1 -2
  43. package/dist/npm/errors.js.map +1 -1
  44. package/dist/npm/index.d.ts +1 -1
  45. package/dist/npm/index.d.ts.map +1 -1
  46. package/dist/npm/index.js +1 -3
  47. package/dist/npm/index.js.map +1 -1
  48. package/dist/npm/models/ledger/AMM.d.ts +2 -4
  49. package/dist/npm/models/ledger/AMM.d.ts.map +1 -1
  50. package/dist/npm/models/ledger/AccountRoot.d.ts +2 -4
  51. package/dist/npm/models/ledger/AccountRoot.d.ts.map +1 -1
  52. package/dist/npm/models/ledger/AccountRoot.js +1 -1
  53. package/dist/npm/models/ledger/AccountRoot.js.map +1 -1
  54. package/dist/npm/models/ledger/Amendments.d.ts +2 -2
  55. package/dist/npm/models/ledger/Amendments.d.ts.map +1 -1
  56. package/dist/npm/models/ledger/BaseLedgerEntry.d.ts +9 -1
  57. package/dist/npm/models/ledger/BaseLedgerEntry.d.ts.map +1 -1
  58. package/dist/npm/models/ledger/Bridge.d.ts +2 -4
  59. package/dist/npm/models/ledger/Bridge.d.ts.map +1 -1
  60. package/dist/npm/models/ledger/Check.d.ts +2 -2
  61. package/dist/npm/models/ledger/Check.d.ts.map +1 -1
  62. package/dist/npm/models/ledger/DepositPreauth.d.ts +2 -4
  63. package/dist/npm/models/ledger/DepositPreauth.d.ts.map +1 -1
  64. package/dist/npm/models/ledger/DirectoryNode.d.ts +2 -2
  65. package/dist/npm/models/ledger/DirectoryNode.d.ts.map +1 -1
  66. package/dist/npm/models/ledger/Escrow.d.ts +2 -4
  67. package/dist/npm/models/ledger/Escrow.d.ts.map +1 -1
  68. package/dist/npm/models/ledger/FeeSettings.d.ts +2 -2
  69. package/dist/npm/models/ledger/FeeSettings.d.ts.map +1 -1
  70. package/dist/npm/models/ledger/Ledger.d.ts +3 -3
  71. package/dist/npm/models/ledger/Ledger.d.ts.map +1 -1
  72. package/dist/npm/models/ledger/LedgerEntry.d.ts +2 -1
  73. package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
  74. package/dist/npm/models/ledger/LedgerHashes.d.ts +2 -2
  75. package/dist/npm/models/ledger/LedgerHashes.d.ts.map +1 -1
  76. package/dist/npm/models/ledger/NFTokenOffer.d.ts +2 -4
  77. package/dist/npm/models/ledger/NFTokenOffer.d.ts.map +1 -1
  78. package/dist/npm/models/ledger/NFTokenPage.d.ts +2 -4
  79. package/dist/npm/models/ledger/NFTokenPage.d.ts.map +1 -1
  80. package/dist/npm/models/ledger/NegativeUNL.d.ts +2 -2
  81. package/dist/npm/models/ledger/NegativeUNL.d.ts.map +1 -1
  82. package/dist/npm/models/ledger/Offer.d.ts +2 -4
  83. package/dist/npm/models/ledger/Offer.d.ts.map +1 -1
  84. package/dist/npm/models/ledger/Offer.js +1 -1
  85. package/dist/npm/models/ledger/Offer.js.map +1 -1
  86. package/dist/npm/models/ledger/PayChannel.d.ts +2 -4
  87. package/dist/npm/models/ledger/PayChannel.d.ts.map +1 -1
  88. package/dist/npm/models/ledger/RippleState.d.ts +2 -4
  89. package/dist/npm/models/ledger/RippleState.d.ts.map +1 -1
  90. package/dist/npm/models/ledger/RippleState.js +1 -1
  91. package/dist/npm/models/ledger/RippleState.js.map +1 -1
  92. package/dist/npm/models/ledger/SignerList.d.ts +2 -4
  93. package/dist/npm/models/ledger/SignerList.d.ts.map +1 -1
  94. package/dist/npm/models/ledger/SignerList.js +1 -1
  95. package/dist/npm/models/ledger/SignerList.js.map +1 -1
  96. package/dist/npm/models/ledger/Ticket.d.ts +2 -4
  97. package/dist/npm/models/ledger/Ticket.d.ts.map +1 -1
  98. package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts +2 -4
  99. package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
  100. package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +2 -4
  101. package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -1
  102. package/dist/npm/models/ledger/index.d.ts +2 -2
  103. package/dist/npm/models/ledger/index.d.ts.map +1 -1
  104. package/dist/npm/models/ledger/index.js.map +1 -1
  105. package/dist/npm/models/methods/accountObjects.d.ts +4 -3
  106. package/dist/npm/models/methods/accountObjects.d.ts.map +1 -1
  107. package/dist/npm/models/methods/index.d.ts +12 -1
  108. package/dist/npm/models/methods/index.d.ts.map +1 -1
  109. package/dist/npm/models/methods/ledger.d.ts +37 -7
  110. package/dist/npm/models/methods/ledger.d.ts.map +1 -1
  111. package/dist/npm/models/methods/ledgerData.d.ts +2 -1
  112. package/dist/npm/models/methods/ledgerData.d.ts.map +1 -1
  113. package/dist/npm/models/methods/ledgerEntry.d.ts +2 -2
  114. package/dist/npm/models/methods/ledgerEntry.d.ts.map +1 -1
  115. package/dist/npm/models/methods/subscribe.d.ts +3 -0
  116. package/dist/npm/models/methods/subscribe.d.ts.map +1 -1
  117. package/dist/npm/models/methods/tx.d.ts +3 -2
  118. package/dist/npm/models/methods/tx.d.ts.map +1 -1
  119. package/dist/npm/models/transactions/AMMDeposit.js +1 -1
  120. package/dist/npm/models/transactions/AMMDeposit.js.map +1 -1
  121. package/dist/npm/models/transactions/AMMWithdraw.js +1 -1
  122. package/dist/npm/models/transactions/AMMWithdraw.js.map +1 -1
  123. package/dist/npm/models/transactions/NFTokenAcceptOffer.d.ts +4 -0
  124. package/dist/npm/models/transactions/NFTokenAcceptOffer.d.ts.map +1 -1
  125. package/dist/npm/models/transactions/NFTokenAcceptOffer.js.map +1 -1
  126. package/dist/npm/models/transactions/NFTokenBurn.d.ts +3 -3
  127. package/dist/npm/models/transactions/NFTokenBurn.d.ts.map +1 -1
  128. package/dist/npm/models/transactions/NFTokenBurn.js +2 -4
  129. package/dist/npm/models/transactions/NFTokenBurn.js.map +1 -1
  130. package/dist/npm/models/transactions/NFTokenCancelOffer.d.ts +4 -0
  131. package/dist/npm/models/transactions/NFTokenCancelOffer.d.ts.map +1 -1
  132. package/dist/npm/models/transactions/NFTokenCancelOffer.js.map +1 -1
  133. package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts +7 -3
  134. package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
  135. package/dist/npm/models/transactions/NFTokenCreateOffer.js +3 -1
  136. package/dist/npm/models/transactions/NFTokenCreateOffer.js.map +1 -1
  137. package/dist/npm/models/transactions/NFTokenMint.d.ts +6 -2
  138. package/dist/npm/models/transactions/NFTokenMint.d.ts.map +1 -1
  139. package/dist/npm/models/transactions/NFTokenMint.js +2 -1
  140. package/dist/npm/models/transactions/NFTokenMint.js.map +1 -1
  141. package/dist/npm/models/transactions/UNLModify.d.ts +2 -1
  142. package/dist/npm/models/transactions/UNLModify.d.ts.map +1 -1
  143. package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts +2 -2
  144. package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -1
  145. package/dist/npm/models/transactions/XChainAccountCreateCommit.js +1 -2
  146. package/dist/npm/models/transactions/XChainAccountCreateCommit.js.map +1 -1
  147. package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts +5 -5
  148. package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -1
  149. package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js +4 -4
  150. package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -1
  151. package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts +5 -5
  152. package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -1
  153. package/dist/npm/models/transactions/XChainAddClaimAttestation.js +4 -4
  154. package/dist/npm/models/transactions/XChainAddClaimAttestation.js.map +1 -1
  155. package/dist/npm/models/transactions/XChainClaim.d.ts +2 -2
  156. package/dist/npm/models/transactions/XChainClaim.d.ts.map +1 -1
  157. package/dist/npm/models/transactions/XChainClaim.js +1 -1
  158. package/dist/npm/models/transactions/XChainClaim.js.map +1 -1
  159. package/dist/npm/models/transactions/XChainCommit.d.ts +2 -2
  160. package/dist/npm/models/transactions/XChainCommit.d.ts.map +1 -1
  161. package/dist/npm/models/transactions/XChainCommit.js +1 -1
  162. package/dist/npm/models/transactions/XChainCommit.js.map +1 -1
  163. package/dist/npm/models/transactions/XChainCreateClaimID.d.ts +2 -2
  164. package/dist/npm/models/transactions/XChainCreateClaimID.d.ts.map +1 -1
  165. package/dist/npm/models/transactions/XChainCreateClaimID.js +1 -1
  166. package/dist/npm/models/transactions/XChainCreateClaimID.js.map +1 -1
  167. package/dist/npm/models/transactions/XChainModifyBridge.js +1 -1
  168. package/dist/npm/models/transactions/XChainModifyBridge.js.map +1 -1
  169. package/dist/npm/models/transactions/accountDelete.d.ts +2 -2
  170. package/dist/npm/models/transactions/accountDelete.d.ts.map +1 -1
  171. package/dist/npm/models/transactions/accountDelete.js +2 -11
  172. package/dist/npm/models/transactions/accountDelete.js.map +1 -1
  173. package/dist/npm/models/transactions/accountSet.d.ts +2 -2
  174. package/dist/npm/models/transactions/accountSet.d.ts.map +1 -1
  175. package/dist/npm/models/transactions/accountSet.js +3 -7
  176. package/dist/npm/models/transactions/accountSet.js.map +1 -1
  177. package/dist/npm/models/transactions/checkCreate.d.ts +2 -2
  178. package/dist/npm/models/transactions/checkCreate.d.ts.map +1 -1
  179. package/dist/npm/models/transactions/checkCreate.js +2 -10
  180. package/dist/npm/models/transactions/checkCreate.js.map +1 -1
  181. package/dist/npm/models/transactions/common.d.ts +3 -1
  182. package/dist/npm/models/transactions/common.d.ts.map +1 -1
  183. package/dist/npm/models/transactions/common.js +7 -1
  184. package/dist/npm/models/transactions/common.js.map +1 -1
  185. package/dist/npm/models/transactions/enableAmendment.js +1 -1
  186. package/dist/npm/models/transactions/enableAmendment.js.map +1 -1
  187. package/dist/npm/models/transactions/escrowCancel.d.ts +2 -2
  188. package/dist/npm/models/transactions/escrowCancel.d.ts.map +1 -1
  189. package/dist/npm/models/transactions/escrowCancel.js +1 -6
  190. package/dist/npm/models/transactions/escrowCancel.js.map +1 -1
  191. package/dist/npm/models/transactions/escrowCreate.d.ts +2 -2
  192. package/dist/npm/models/transactions/escrowCreate.d.ts.map +1 -1
  193. package/dist/npm/models/transactions/escrowCreate.js +2 -10
  194. package/dist/npm/models/transactions/escrowCreate.js.map +1 -1
  195. package/dist/npm/models/transactions/escrowFinish.d.ts +2 -2
  196. package/dist/npm/models/transactions/escrowFinish.d.ts.map +1 -1
  197. package/dist/npm/models/transactions/escrowFinish.js +1 -6
  198. package/dist/npm/models/transactions/escrowFinish.js.map +1 -1
  199. package/dist/npm/models/transactions/index.d.ts +1 -1
  200. package/dist/npm/models/transactions/index.d.ts.map +1 -1
  201. package/dist/npm/models/transactions/index.js.map +1 -1
  202. package/dist/npm/models/transactions/metadata.d.ts +9 -1
  203. package/dist/npm/models/transactions/metadata.d.ts.map +1 -1
  204. package/dist/npm/models/transactions/metadata.js.map +1 -1
  205. package/dist/npm/models/transactions/offerCreate.js +1 -1
  206. package/dist/npm/models/transactions/offerCreate.js.map +1 -1
  207. package/dist/npm/models/transactions/payment.d.ts +7 -2
  208. package/dist/npm/models/transactions/payment.d.ts.map +1 -1
  209. package/dist/npm/models/transactions/payment.js +3 -10
  210. package/dist/npm/models/transactions/payment.js.map +1 -1
  211. package/dist/npm/models/transactions/paymentChannelClaim.js +1 -1
  212. package/dist/npm/models/transactions/paymentChannelClaim.js.map +1 -1
  213. package/dist/npm/models/transactions/paymentChannelCreate.d.ts +2 -2
  214. package/dist/npm/models/transactions/paymentChannelCreate.d.ts.map +1 -1
  215. package/dist/npm/models/transactions/paymentChannelCreate.js +2 -10
  216. package/dist/npm/models/transactions/paymentChannelCreate.js.map +1 -1
  217. package/dist/npm/models/transactions/transaction.d.ts +8 -3
  218. package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
  219. package/dist/npm/models/transactions/transaction.js.map +1 -1
  220. package/dist/npm/models/transactions/trustSet.js +1 -1
  221. package/dist/npm/models/transactions/trustSet.js.map +1 -1
  222. package/dist/npm/models/utils/flags.d.ts.map +1 -1
  223. package/dist/npm/models/utils/flags.js +17 -28
  224. package/dist/npm/models/utils/flags.js.map +1 -1
  225. package/dist/npm/snippets/src/bridgeTransfer.js +4 -3
  226. package/dist/npm/snippets/src/bridgeTransfer.js.map +1 -1
  227. package/dist/npm/snippets/src/getTransaction.js +1 -1
  228. package/dist/npm/snippets/src/getTransaction.js.map +1 -1
  229. package/dist/npm/snippets/src/paths.js +2 -3
  230. package/dist/npm/snippets/src/paths.js.map +1 -1
  231. package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -0
  232. package/dist/npm/src/Wallet/authorizeChannel.d.ts +3 -0
  233. package/dist/npm/src/Wallet/authorizeChannel.d.ts.map +1 -0
  234. package/dist/npm/src/Wallet/authorizeChannel.js +14 -0
  235. package/dist/npm/src/Wallet/authorizeChannel.js.map +1 -0
  236. package/dist/npm/src/Wallet/defaultFaucets.d.ts.map +1 -1
  237. package/dist/npm/src/Wallet/defaultFaucets.js +1 -4
  238. package/dist/npm/src/Wallet/defaultFaucets.js.map +1 -1
  239. package/dist/npm/src/Wallet/fundWallet.d.ts +17 -3
  240. package/dist/npm/src/Wallet/fundWallet.d.ts.map +1 -1
  241. package/dist/npm/src/Wallet/fundWallet.js +53 -78
  242. package/dist/npm/src/Wallet/fundWallet.js.map +1 -1
  243. package/dist/npm/src/Wallet/index.d.ts.map +1 -1
  244. package/dist/npm/src/Wallet/index.js +24 -23
  245. package/dist/npm/src/Wallet/index.js.map +1 -1
  246. package/dist/npm/src/Wallet/signer.d.ts +2 -4
  247. package/dist/npm/src/Wallet/signer.d.ts.map +1 -1
  248. package/dist/npm/src/Wallet/signer.js +17 -13
  249. package/dist/npm/src/Wallet/signer.js.map +1 -1
  250. package/dist/npm/src/Wallet/walletFromSecretNumbers.js +2 -2
  251. package/dist/npm/src/Wallet/walletFromSecretNumbers.js.map +1 -1
  252. package/dist/npm/src/client/RequestManager.d.ts +3 -2
  253. package/dist/npm/src/client/RequestManager.d.ts.map +1 -1
  254. package/dist/npm/src/client/RequestManager.js +25 -1
  255. package/dist/npm/src/client/RequestManager.js.map +1 -1
  256. package/dist/npm/src/client/connection.d.ts +8 -11
  257. package/dist/npm/src/client/connection.d.ts.map +1 -1
  258. package/dist/npm/src/client/connection.js +8 -54
  259. package/dist/npm/src/client/connection.js.map +1 -1
  260. package/dist/npm/src/client/index.d.ts +56 -78
  261. package/dist/npm/src/client/index.d.ts.map +1 -1
  262. package/dist/npm/src/client/index.js +155 -42
  263. package/dist/npm/src/client/index.js.map +1 -1
  264. package/dist/npm/src/client/partialPayment.d.ts +4 -2
  265. package/dist/npm/src/client/partialPayment.d.ts.map +1 -1
  266. package/dist/npm/src/client/partialPayment.js.map +1 -1
  267. package/dist/npm/src/errors.d.ts.map +1 -1
  268. package/dist/npm/src/errors.js +1 -2
  269. package/dist/npm/src/errors.js.map +1 -1
  270. package/dist/npm/src/index.d.ts +1 -1
  271. package/dist/npm/src/index.d.ts.map +1 -1
  272. package/dist/npm/src/index.js +1 -3
  273. package/dist/npm/src/index.js.map +1 -1
  274. package/dist/npm/src/models/ledger/AMM.d.ts +2 -4
  275. package/dist/npm/src/models/ledger/AMM.d.ts.map +1 -1
  276. package/dist/npm/src/models/ledger/AccountRoot.d.ts +2 -4
  277. package/dist/npm/src/models/ledger/AccountRoot.d.ts.map +1 -1
  278. package/dist/npm/src/models/ledger/AccountRoot.js +1 -1
  279. package/dist/npm/src/models/ledger/AccountRoot.js.map +1 -1
  280. package/dist/npm/src/models/ledger/Amendments.d.ts +2 -2
  281. package/dist/npm/src/models/ledger/Amendments.d.ts.map +1 -1
  282. package/dist/npm/src/models/ledger/BaseLedgerEntry.d.ts +9 -1
  283. package/dist/npm/src/models/ledger/BaseLedgerEntry.d.ts.map +1 -1
  284. package/dist/npm/src/models/ledger/Bridge.d.ts +2 -4
  285. package/dist/npm/src/models/ledger/Bridge.d.ts.map +1 -1
  286. package/dist/npm/src/models/ledger/Check.d.ts +2 -2
  287. package/dist/npm/src/models/ledger/Check.d.ts.map +1 -1
  288. package/dist/npm/src/models/ledger/DepositPreauth.d.ts +2 -4
  289. package/dist/npm/src/models/ledger/DepositPreauth.d.ts.map +1 -1
  290. package/dist/npm/src/models/ledger/DirectoryNode.d.ts +2 -2
  291. package/dist/npm/src/models/ledger/DirectoryNode.d.ts.map +1 -1
  292. package/dist/npm/src/models/ledger/Escrow.d.ts +2 -4
  293. package/dist/npm/src/models/ledger/Escrow.d.ts.map +1 -1
  294. package/dist/npm/src/models/ledger/FeeSettings.d.ts +2 -2
  295. package/dist/npm/src/models/ledger/FeeSettings.d.ts.map +1 -1
  296. package/dist/npm/src/models/ledger/Ledger.d.ts +3 -3
  297. package/dist/npm/src/models/ledger/Ledger.d.ts.map +1 -1
  298. package/dist/npm/src/models/ledger/LedgerEntry.d.ts +2 -1
  299. package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
  300. package/dist/npm/src/models/ledger/LedgerHashes.d.ts +2 -2
  301. package/dist/npm/src/models/ledger/LedgerHashes.d.ts.map +1 -1
  302. package/dist/npm/src/models/ledger/NFTokenOffer.d.ts +2 -4
  303. package/dist/npm/src/models/ledger/NFTokenOffer.d.ts.map +1 -1
  304. package/dist/npm/src/models/ledger/NFTokenPage.d.ts +2 -4
  305. package/dist/npm/src/models/ledger/NFTokenPage.d.ts.map +1 -1
  306. package/dist/npm/src/models/ledger/NegativeUNL.d.ts +2 -2
  307. package/dist/npm/src/models/ledger/NegativeUNL.d.ts.map +1 -1
  308. package/dist/npm/src/models/ledger/Offer.d.ts +2 -4
  309. package/dist/npm/src/models/ledger/Offer.d.ts.map +1 -1
  310. package/dist/npm/src/models/ledger/Offer.js +1 -1
  311. package/dist/npm/src/models/ledger/Offer.js.map +1 -1
  312. package/dist/npm/src/models/ledger/PayChannel.d.ts +2 -4
  313. package/dist/npm/src/models/ledger/PayChannel.d.ts.map +1 -1
  314. package/dist/npm/src/models/ledger/RippleState.d.ts +2 -4
  315. package/dist/npm/src/models/ledger/RippleState.d.ts.map +1 -1
  316. package/dist/npm/src/models/ledger/RippleState.js +1 -1
  317. package/dist/npm/src/models/ledger/RippleState.js.map +1 -1
  318. package/dist/npm/src/models/ledger/SignerList.d.ts +2 -4
  319. package/dist/npm/src/models/ledger/SignerList.d.ts.map +1 -1
  320. package/dist/npm/src/models/ledger/SignerList.js +1 -1
  321. package/dist/npm/src/models/ledger/SignerList.js.map +1 -1
  322. package/dist/npm/src/models/ledger/Ticket.d.ts +2 -4
  323. package/dist/npm/src/models/ledger/Ticket.d.ts.map +1 -1
  324. package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts +2 -4
  325. package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
  326. package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +2 -4
  327. package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -1
  328. package/dist/npm/src/models/ledger/index.d.ts +2 -2
  329. package/dist/npm/src/models/ledger/index.d.ts.map +1 -1
  330. package/dist/npm/src/models/ledger/index.js.map +1 -1
  331. package/dist/npm/src/models/methods/accountObjects.d.ts +4 -3
  332. package/dist/npm/src/models/methods/accountObjects.d.ts.map +1 -1
  333. package/dist/npm/src/models/methods/index.d.ts +12 -1
  334. package/dist/npm/src/models/methods/index.d.ts.map +1 -1
  335. package/dist/npm/src/models/methods/ledger.d.ts +37 -7
  336. package/dist/npm/src/models/methods/ledger.d.ts.map +1 -1
  337. package/dist/npm/src/models/methods/ledgerData.d.ts +2 -1
  338. package/dist/npm/src/models/methods/ledgerData.d.ts.map +1 -1
  339. package/dist/npm/src/models/methods/ledgerEntry.d.ts +2 -2
  340. package/dist/npm/src/models/methods/ledgerEntry.d.ts.map +1 -1
  341. package/dist/npm/src/models/methods/subscribe.d.ts +3 -0
  342. package/dist/npm/src/models/methods/subscribe.d.ts.map +1 -1
  343. package/dist/npm/src/models/methods/tx.d.ts +3 -2
  344. package/dist/npm/src/models/methods/tx.d.ts.map +1 -1
  345. package/dist/npm/src/models/transactions/AMMDeposit.js +1 -1
  346. package/dist/npm/src/models/transactions/AMMDeposit.js.map +1 -1
  347. package/dist/npm/src/models/transactions/AMMWithdraw.js +1 -1
  348. package/dist/npm/src/models/transactions/AMMWithdraw.js.map +1 -1
  349. package/dist/npm/src/models/transactions/NFTokenAcceptOffer.d.ts +4 -0
  350. package/dist/npm/src/models/transactions/NFTokenAcceptOffer.d.ts.map +1 -1
  351. package/dist/npm/src/models/transactions/NFTokenAcceptOffer.js.map +1 -1
  352. package/dist/npm/src/models/transactions/NFTokenBurn.d.ts +3 -3
  353. package/dist/npm/src/models/transactions/NFTokenBurn.d.ts.map +1 -1
  354. package/dist/npm/src/models/transactions/NFTokenBurn.js +2 -4
  355. package/dist/npm/src/models/transactions/NFTokenBurn.js.map +1 -1
  356. package/dist/npm/src/models/transactions/NFTokenCancelOffer.d.ts +4 -0
  357. package/dist/npm/src/models/transactions/NFTokenCancelOffer.d.ts.map +1 -1
  358. package/dist/npm/src/models/transactions/NFTokenCancelOffer.js.map +1 -1
  359. package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts +7 -3
  360. package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
  361. package/dist/npm/src/models/transactions/NFTokenCreateOffer.js +3 -1
  362. package/dist/npm/src/models/transactions/NFTokenCreateOffer.js.map +1 -1
  363. package/dist/npm/src/models/transactions/NFTokenMint.d.ts +6 -2
  364. package/dist/npm/src/models/transactions/NFTokenMint.d.ts.map +1 -1
  365. package/dist/npm/src/models/transactions/NFTokenMint.js +2 -1
  366. package/dist/npm/src/models/transactions/NFTokenMint.js.map +1 -1
  367. package/dist/npm/src/models/transactions/UNLModify.d.ts +2 -1
  368. package/dist/npm/src/models/transactions/UNLModify.d.ts.map +1 -1
  369. package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts +2 -2
  370. package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -1
  371. package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js +1 -2
  372. package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js.map +1 -1
  373. package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts +5 -5
  374. package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -1
  375. package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js +4 -4
  376. package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -1
  377. package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts +5 -5
  378. package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -1
  379. package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js +4 -4
  380. package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js.map +1 -1
  381. package/dist/npm/src/models/transactions/XChainClaim.d.ts +2 -2
  382. package/dist/npm/src/models/transactions/XChainClaim.d.ts.map +1 -1
  383. package/dist/npm/src/models/transactions/XChainClaim.js +1 -1
  384. package/dist/npm/src/models/transactions/XChainClaim.js.map +1 -1
  385. package/dist/npm/src/models/transactions/XChainCommit.d.ts +2 -2
  386. package/dist/npm/src/models/transactions/XChainCommit.d.ts.map +1 -1
  387. package/dist/npm/src/models/transactions/XChainCommit.js +1 -1
  388. package/dist/npm/src/models/transactions/XChainCommit.js.map +1 -1
  389. package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts +2 -2
  390. package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts.map +1 -1
  391. package/dist/npm/src/models/transactions/XChainCreateClaimID.js +1 -1
  392. package/dist/npm/src/models/transactions/XChainCreateClaimID.js.map +1 -1
  393. package/dist/npm/src/models/transactions/XChainModifyBridge.js +1 -1
  394. package/dist/npm/src/models/transactions/XChainModifyBridge.js.map +1 -1
  395. package/dist/npm/src/models/transactions/accountDelete.d.ts +2 -2
  396. package/dist/npm/src/models/transactions/accountDelete.d.ts.map +1 -1
  397. package/dist/npm/src/models/transactions/accountDelete.js +2 -11
  398. package/dist/npm/src/models/transactions/accountDelete.js.map +1 -1
  399. package/dist/npm/src/models/transactions/accountSet.d.ts +2 -2
  400. package/dist/npm/src/models/transactions/accountSet.d.ts.map +1 -1
  401. package/dist/npm/src/models/transactions/accountSet.js +3 -7
  402. package/dist/npm/src/models/transactions/accountSet.js.map +1 -1
  403. package/dist/npm/src/models/transactions/checkCreate.d.ts +2 -2
  404. package/dist/npm/src/models/transactions/checkCreate.d.ts.map +1 -1
  405. package/dist/npm/src/models/transactions/checkCreate.js +2 -10
  406. package/dist/npm/src/models/transactions/checkCreate.js.map +1 -1
  407. package/dist/npm/src/models/transactions/common.d.ts +3 -1
  408. package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
  409. package/dist/npm/src/models/transactions/common.js +7 -1
  410. package/dist/npm/src/models/transactions/common.js.map +1 -1
  411. package/dist/npm/src/models/transactions/enableAmendment.js +1 -1
  412. package/dist/npm/src/models/transactions/enableAmendment.js.map +1 -1
  413. package/dist/npm/src/models/transactions/escrowCancel.d.ts +2 -2
  414. package/dist/npm/src/models/transactions/escrowCancel.d.ts.map +1 -1
  415. package/dist/npm/src/models/transactions/escrowCancel.js +1 -6
  416. package/dist/npm/src/models/transactions/escrowCancel.js.map +1 -1
  417. package/dist/npm/src/models/transactions/escrowCreate.d.ts +2 -2
  418. package/dist/npm/src/models/transactions/escrowCreate.d.ts.map +1 -1
  419. package/dist/npm/src/models/transactions/escrowCreate.js +2 -10
  420. package/dist/npm/src/models/transactions/escrowCreate.js.map +1 -1
  421. package/dist/npm/src/models/transactions/escrowFinish.d.ts +2 -2
  422. package/dist/npm/src/models/transactions/escrowFinish.d.ts.map +1 -1
  423. package/dist/npm/src/models/transactions/escrowFinish.js +1 -6
  424. package/dist/npm/src/models/transactions/escrowFinish.js.map +1 -1
  425. package/dist/npm/src/models/transactions/index.d.ts +1 -1
  426. package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
  427. package/dist/npm/src/models/transactions/index.js.map +1 -1
  428. package/dist/npm/src/models/transactions/metadata.d.ts +9 -1
  429. package/dist/npm/src/models/transactions/metadata.d.ts.map +1 -1
  430. package/dist/npm/src/models/transactions/metadata.js.map +1 -1
  431. package/dist/npm/src/models/transactions/offerCreate.js +1 -1
  432. package/dist/npm/src/models/transactions/offerCreate.js.map +1 -1
  433. package/dist/npm/src/models/transactions/payment.d.ts +7 -2
  434. package/dist/npm/src/models/transactions/payment.d.ts.map +1 -1
  435. package/dist/npm/src/models/transactions/payment.js +3 -10
  436. package/dist/npm/src/models/transactions/payment.js.map +1 -1
  437. package/dist/npm/src/models/transactions/paymentChannelClaim.js +1 -1
  438. package/dist/npm/src/models/transactions/paymentChannelClaim.js.map +1 -1
  439. package/dist/npm/src/models/transactions/paymentChannelCreate.d.ts +2 -2
  440. package/dist/npm/src/models/transactions/paymentChannelCreate.d.ts.map +1 -1
  441. package/dist/npm/src/models/transactions/paymentChannelCreate.js +2 -10
  442. package/dist/npm/src/models/transactions/paymentChannelCreate.js.map +1 -1
  443. package/dist/npm/src/models/transactions/transaction.d.ts +8 -3
  444. package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
  445. package/dist/npm/src/models/transactions/transaction.js.map +1 -1
  446. package/dist/npm/src/models/transactions/trustSet.js +1 -1
  447. package/dist/npm/src/models/transactions/trustSet.js.map +1 -1
  448. package/dist/npm/src/models/utils/flags.d.ts.map +1 -1
  449. package/dist/npm/src/models/utils/flags.js +17 -28
  450. package/dist/npm/src/models/utils/flags.js.map +1 -1
  451. package/dist/npm/src/sugar/autofill.d.ts +6 -2
  452. package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
  453. package/dist/npm/src/sugar/autofill.js +9 -28
  454. package/dist/npm/src/sugar/autofill.js.map +1 -1
  455. package/dist/npm/src/sugar/balances.d.ts +2 -17
  456. package/dist/npm/src/sugar/balances.d.ts.map +1 -1
  457. package/dist/npm/src/sugar/balances.js +2 -60
  458. package/dist/npm/src/sugar/balances.js.map +1 -1
  459. package/dist/npm/src/sugar/getOrderbook.d.ts +19 -5
  460. package/dist/npm/src/sugar/getOrderbook.d.ts.map +1 -1
  461. package/dist/npm/src/sugar/getOrderbook.js +72 -53
  462. package/dist/npm/src/sugar/getOrderbook.js.map +1 -1
  463. package/dist/npm/src/sugar/index.d.ts +0 -4
  464. package/dist/npm/src/sugar/index.d.ts.map +1 -1
  465. package/dist/npm/src/sugar/index.js +0 -13
  466. package/dist/npm/src/sugar/index.js.map +1 -1
  467. package/dist/npm/src/sugar/submit.d.ts +6 -9
  468. package/dist/npm/src/sugar/submit.d.ts.map +1 -1
  469. package/dist/npm/src/sugar/submit.js +5 -22
  470. package/dist/npm/src/sugar/submit.js.map +1 -1
  471. package/dist/npm/src/utils/collections.d.ts +7 -0
  472. package/dist/npm/src/utils/collections.d.ts.map +1 -0
  473. package/dist/npm/src/utils/collections.js +22 -0
  474. package/dist/npm/src/utils/collections.js.map +1 -0
  475. package/dist/npm/src/utils/getBalanceChanges.d.ts.map +1 -1
  476. package/dist/npm/src/utils/getBalanceChanges.js +3 -4
  477. package/dist/npm/src/utils/getBalanceChanges.js.map +1 -1
  478. package/dist/npm/src/utils/getNFTokenID.d.ts.map +1 -1
  479. package/dist/npm/src/utils/getNFTokenID.js +8 -8
  480. package/dist/npm/src/utils/getNFTokenID.js.map +1 -1
  481. package/dist/npm/src/utils/hashes/SHAMap/node.js +1 -1
  482. package/dist/npm/src/utils/hashes/SHAMap/node.js.map +1 -1
  483. package/dist/npm/src/utils/hashes/hashLedger.d.ts +2 -1
  484. package/dist/npm/src/utils/hashes/hashLedger.d.ts.map +1 -1
  485. package/dist/npm/src/utils/hashes/hashLedger.js.map +1 -1
  486. package/dist/npm/src/utils/hashes/sha512Half.d.ts.map +1 -1
  487. package/dist/npm/src/utils/hashes/sha512Half.js +4 -7
  488. package/dist/npm/src/utils/hashes/sha512Half.js.map +1 -1
  489. package/dist/npm/sugar/autofill.d.ts +6 -2
  490. package/dist/npm/sugar/autofill.d.ts.map +1 -1
  491. package/dist/npm/sugar/autofill.js +9 -28
  492. package/dist/npm/sugar/autofill.js.map +1 -1
  493. package/dist/npm/sugar/balances.d.ts +2 -17
  494. package/dist/npm/sugar/balances.d.ts.map +1 -1
  495. package/dist/npm/sugar/balances.js +2 -60
  496. package/dist/npm/sugar/balances.js.map +1 -1
  497. package/dist/npm/sugar/getOrderbook.d.ts +19 -5
  498. package/dist/npm/sugar/getOrderbook.d.ts.map +1 -1
  499. package/dist/npm/sugar/getOrderbook.js +72 -53
  500. package/dist/npm/sugar/getOrderbook.js.map +1 -1
  501. package/dist/npm/sugar/index.d.ts +0 -4
  502. package/dist/npm/sugar/index.d.ts.map +1 -1
  503. package/dist/npm/sugar/index.js +0 -13
  504. package/dist/npm/sugar/index.js.map +1 -1
  505. package/dist/npm/sugar/submit.d.ts +6 -9
  506. package/dist/npm/sugar/submit.d.ts.map +1 -1
  507. package/dist/npm/sugar/submit.js +5 -22
  508. package/dist/npm/sugar/submit.js.map +1 -1
  509. package/dist/npm/utils/collections.d.ts +7 -0
  510. package/dist/npm/utils/collections.d.ts.map +1 -0
  511. package/dist/npm/utils/collections.js +22 -0
  512. package/dist/npm/utils/collections.js.map +1 -0
  513. package/dist/npm/utils/getBalanceChanges.d.ts.map +1 -1
  514. package/dist/npm/utils/getBalanceChanges.js +3 -4
  515. package/dist/npm/utils/getBalanceChanges.js.map +1 -1
  516. package/dist/npm/utils/getNFTokenID.d.ts.map +1 -1
  517. package/dist/npm/utils/getNFTokenID.js +8 -8
  518. package/dist/npm/utils/getNFTokenID.js.map +1 -1
  519. package/dist/npm/utils/hashes/SHAMap/node.js +1 -1
  520. package/dist/npm/utils/hashes/SHAMap/node.js.map +1 -1
  521. package/dist/npm/utils/hashes/hashLedger.d.ts +2 -1
  522. package/dist/npm/utils/hashes/hashLedger.d.ts.map +1 -1
  523. package/dist/npm/utils/hashes/hashLedger.js.map +1 -1
  524. package/dist/npm/utils/hashes/sha512Half.d.ts.map +1 -1
  525. package/dist/npm/utils/hashes/sha512Half.js +4 -7
  526. package/dist/npm/utils/hashes/sha512Half.js.map +1 -1
  527. package/package.json +32 -25
  528. package/src/Wallet/authorizeChannel.ts +26 -0
  529. package/src/Wallet/defaultFaucets.ts +0 -4
  530. package/src/Wallet/fundWallet.ts +151 -212
  531. package/src/Wallet/index.ts +28 -25
  532. package/src/Wallet/signer.ts +32 -43
  533. package/src/Wallet/walletFromSecretNumbers.ts +1 -1
  534. package/src/client/RequestManager.ts +40 -14
  535. package/src/client/connection.ts +20 -89
  536. package/src/client/index.ts +704 -269
  537. package/src/client/partialPayment.ts +20 -10
  538. package/src/errors.ts +1 -3
  539. package/src/index.ts +1 -3
  540. package/src/models/ledger/AMM.ts +2 -10
  541. package/src/models/ledger/AccountRoot.ts +2 -12
  542. package/src/models/ledger/Amendments.ts +4 -2
  543. package/src/models/ledger/BaseLedgerEntry.ts +25 -1
  544. package/src/models/ledger/Bridge.ts +2 -14
  545. package/src/models/ledger/Check.ts +2 -2
  546. package/src/models/ledger/DepositPreauth.ts +4 -12
  547. package/src/models/ledger/DirectoryNode.ts +4 -2
  548. package/src/models/ledger/Escrow.ts +2 -12
  549. package/src/models/ledger/FeeSettings.ts +2 -2
  550. package/src/models/ledger/Ledger.ts +10 -4
  551. package/src/models/ledger/LedgerEntry.ts +22 -1
  552. package/src/models/ledger/LedgerHashes.ts +4 -2
  553. package/src/models/ledger/NFTokenOffer.ts +2 -4
  554. package/src/models/ledger/NFTokenPage.ts +2 -4
  555. package/src/models/ledger/NegativeUNL.ts +4 -2
  556. package/src/models/ledger/Offer.ts +2 -12
  557. package/src/models/ledger/PayChannel.ts +2 -12
  558. package/src/models/ledger/RippleState.ts +2 -12
  559. package/src/models/ledger/SignerList.ts +2 -12
  560. package/src/models/ledger/Ticket.ts +2 -12
  561. package/src/models/ledger/XChainOwnedClaimID.ts +4 -12
  562. package/src/models/ledger/XChainOwnedCreateAccountClaimID.ts +3 -12
  563. package/src/models/ledger/index.ts +2 -1
  564. package/src/models/methods/accountObjects.ts +10 -44
  565. package/src/models/methods/index.ts +175 -0
  566. package/src/models/methods/ledger.ts +154 -20
  567. package/src/models/methods/ledgerData.ts +5 -1
  568. package/src/models/methods/ledgerEntry.ts +2 -2
  569. package/src/models/methods/subscribe.ts +36 -0
  570. package/src/models/methods/tx.ts +6 -3
  571. package/src/models/transactions/NFTokenAcceptOffer.ts +6 -0
  572. package/src/models/transactions/NFTokenBurn.ts +13 -9
  573. package/src/models/transactions/NFTokenCancelOffer.ts +6 -0
  574. package/src/models/transactions/NFTokenCreateOffer.ts +14 -2
  575. package/src/models/transactions/NFTokenMint.ts +17 -2
  576. package/src/models/transactions/UNLModify.ts +3 -1
  577. package/src/models/transactions/XChainAccountCreateCommit.ts +4 -4
  578. package/src/models/transactions/XChainAddAccountCreateAttestation.ts +10 -8
  579. package/src/models/transactions/XChainAddClaimAttestation.ts +10 -8
  580. package/src/models/transactions/XChainClaim.ts +4 -2
  581. package/src/models/transactions/XChainCommit.ts +4 -2
  582. package/src/models/transactions/XChainCreateClaimID.ts +4 -3
  583. package/src/models/transactions/accountDelete.ts +12 -18
  584. package/src/models/transactions/accountSet.ts +10 -11
  585. package/src/models/transactions/checkCreate.ts +8 -15
  586. package/src/models/transactions/common.ts +20 -1
  587. package/src/models/transactions/escrowCancel.ts +9 -9
  588. package/src/models/transactions/escrowCreate.ts +12 -16
  589. package/src/models/transactions/escrowFinish.ts +9 -9
  590. package/src/models/transactions/index.ts +6 -1
  591. package/src/models/transactions/metadata.ts +31 -1
  592. package/src/models/transactions/payment.ts +14 -14
  593. package/src/models/transactions/paymentChannelCreate.ts +12 -21
  594. package/src/models/transactions/transaction.ts +11 -4
  595. package/src/models/utils/flags.ts +18 -28
  596. package/src/sugar/autofill.ts +84 -88
  597. package/src/sugar/balances.ts +8 -116
  598. package/src/sugar/getOrderbook.ts +138 -61
  599. package/src/sugar/index.ts +0 -8
  600. package/src/sugar/submit.ts +114 -132
  601. package/src/utils/collections.ts +53 -0
  602. package/src/utils/getBalanceChanges.ts +2 -3
  603. package/src/utils/getNFTokenID.ts +18 -16
  604. package/src/utils/hashes/hashLedger.ts +4 -1
  605. package/src/utils/hashes/sha512Half.ts +4 -7
  606. package/dist/npm/client/BroadcastClient.d.ts +0 -7
  607. package/dist/npm/client/BroadcastClient.d.ts.map +0 -1
  608. package/dist/npm/client/BroadcastClient.js +0 -49
  609. package/dist/npm/client/BroadcastClient.js.map +0 -1
  610. package/dist/npm/client/WSWrapper.d.ts +0 -25
  611. package/dist/npm/client/WSWrapper.d.ts.map +0 -1
  612. package/dist/npm/client/WSWrapper.js +0 -44
  613. package/dist/npm/client/WSWrapper.js.map +0 -1
  614. package/dist/npm/src/client/BroadcastClient.d.ts +0 -7
  615. package/dist/npm/src/client/BroadcastClient.d.ts.map +0 -1
  616. package/dist/npm/src/client/BroadcastClient.js +0 -49
  617. package/dist/npm/src/client/BroadcastClient.js.map +0 -1
  618. package/dist/npm/src/client/WSWrapper.d.ts +0 -25
  619. package/dist/npm/src/client/WSWrapper.d.ts.map +0 -1
  620. package/dist/npm/src/client/WSWrapper.js +0 -44
  621. package/dist/npm/src/client/WSWrapper.js.map +0 -1
  622. package/dist/npm/src/sugar/getLedgerIndex.d.ts +0 -3
  623. package/dist/npm/src/sugar/getLedgerIndex.d.ts.map +0 -1
  624. package/dist/npm/src/sugar/getLedgerIndex.js +0 -22
  625. package/dist/npm/src/sugar/getLedgerIndex.js.map +0 -1
  626. package/dist/npm/sugar/getLedgerIndex.d.ts +0 -3
  627. package/dist/npm/sugar/getLedgerIndex.d.ts.map +0 -1
  628. package/dist/npm/sugar/getLedgerIndex.js +0 -22
  629. package/dist/npm/sugar/getLedgerIndex.js.map +0 -1
  630. package/src/client/BroadcastClient.ts +0 -84
  631. package/src/client/WSWrapper.ts +0 -106
  632. package/src/sugar/getLedgerIndex.ts +0 -15
@@ -2,7 +2,7 @@ import { Amount } from 'ripple-binary-codec/dist/types'
2
2
 
3
3
  import { XChainBridge } from '../common'
4
4
 
5
- import BaseLedgerEntry from './BaseLedgerEntry'
5
+ import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
6
6
 
7
7
  /**
8
8
  * An XChainOwnedClaimID object represents one cross-chain transfer of value
@@ -11,7 +11,9 @@ import BaseLedgerEntry from './BaseLedgerEntry'
11
11
  *
12
12
  * @category Ledger Entries
13
13
  */
14
- export default interface XChainOwnedClaimID extends BaseLedgerEntry {
14
+ export default interface XChainOwnedClaimID
15
+ extends BaseLedgerEntry,
16
+ HasPreviousTxnID {
15
17
  LedgerEntryType: 'XChainOwnedClaimID'
16
18
 
17
19
  /** The account that checked out this unique claim ID value. */
@@ -76,14 +78,4 @@ export default interface XChainOwnedClaimID extends BaseLedgerEntry {
76
78
  * object, in case the directory consists of multiple pages.
77
79
  */
78
80
  OwnerNode: string
79
- /**
80
- * The identifying hash of the transaction that most recently modified this
81
- * object.
82
- */
83
- PreviousTxnID: string
84
- /**
85
- * The index of the ledger that contains the transaction that most recently
86
- * modified this object.
87
- */
88
- PreviousTxnLgrSeq: number
89
81
  }
@@ -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,3 +1,4 @@
1
+ /* eslint-disable no-inline-comments -- Necessary for important note */
1
2
  /* eslint-disable max-lines -- There is a lot to export */
2
3
  import {
3
4
  AccountChannelsRequest,
@@ -71,6 +72,11 @@ import {
71
72
  LedgerQueueData,
72
73
  LedgerRequest,
73
74
  LedgerResponse,
75
+ LedgerRequestExpandedTransactionsOnly,
76
+ LedgerResponseExpanded,
77
+ LedgerRequestExpandedAccountsAndTransactions,
78
+ LedgerRequestExpandedAccountsOnly,
79
+ LedgerRequestExpandedTransactionsBinary,
74
80
  } from './ledger'
75
81
  import { LedgerClosedRequest, LedgerClosedResponse } from './ledgerClosed'
76
82
  import { LedgerCurrentRequest, LedgerCurrentResponse } from './ledgerCurrent'
@@ -253,6 +259,175 @@ type Response =
253
259
  // AMM methods
254
260
  | AMMInfoResponse
255
261
 
262
+ export type RequestResponseMap<T> = T extends AccountChannelsRequest
263
+ ? AccountChannelsResponse
264
+ : T extends AccountCurrenciesRequest
265
+ ? AccountCurrenciesResponse
266
+ : T extends AccountInfoRequest
267
+ ? AccountInfoResponse
268
+ : T extends AccountLinesRequest
269
+ ? AccountLinesResponse
270
+ : T extends AccountNFTsRequest
271
+ ? AccountNFTsResponse
272
+ : T extends AccountObjectsRequest
273
+ ? AccountObjectsResponse
274
+ : T extends AccountOffersRequest
275
+ ? AccountOffersResponse
276
+ : T extends AccountTxRequest
277
+ ? AccountTxResponse
278
+ : T extends AMMInfoRequest
279
+ ? AMMInfoResponse
280
+ : T extends GatewayBalancesRequest
281
+ ? GatewayBalancesResponse
282
+ : T extends NoRippleCheckRequest
283
+ ? NoRippleCheckResponse
284
+ : // NOTE: The order of these LedgerRequest types is important
285
+ // to get the proper type matching overrides based on parameters set
286
+ // in the request. For example LedgerRequestExpandedTransactionsBinary
287
+ // should match LedgerRequestExpandedTransactionsOnly, but not
288
+ // LedgerRequestExpandedAccountsOnly. This is because the
289
+ // LedgerRequestExpandedTransactionsBinary type is a superset of
290
+ // LedgerRequestExpandedTransactionsOnly, but not of the other.
291
+ // This is why LedgerRequestExpandedTransactionsBinary is listed
292
+ // first in the type list.
293
+ //
294
+ // Here is an example using real data:
295
+ // LedgerRequestExpandedTransactionsBinary = {
296
+ // command: 'ledger',
297
+ // ledger_index: 'validated',
298
+ // expand: true,
299
+ // transactions: true,
300
+ // binary: true,
301
+ // }
302
+ // LedgerRequestExpandedTransactionsOnly = {
303
+ // command: 'ledger',
304
+ // ledger_index: 'validated',
305
+ // expand: true,
306
+ // transactions: true,
307
+ // }
308
+ // LedgerRequestExpandedAccountsOnly = {
309
+ // command: 'ledger',
310
+ // ledger_index: 'validated',
311
+ // accounts: true,
312
+ // expand: true,
313
+ // }
314
+ // LedgerRequest = {
315
+ // command: 'ledger',
316
+ // ledger_index: 'validated',
317
+ // }
318
+ //
319
+ // The type with the most parameters set should be listed first. In this
320
+ // case LedgerRequestExpandedTransactionsBinary has the most parameters (`expand`, `transactions`, and `binary`)
321
+ // set, so it is listed first. When TypeScript tries to match the type of
322
+ // a request to a response, it will try to match the request type to the
323
+ // response type in the order they are listed. So, if we have a request
324
+ // with the following parameters:
325
+ // {
326
+ // command: 'ledger',
327
+ // ledger_index: 'validated',
328
+ // expand: true,
329
+ // transactions: true,
330
+ // binary: true,
331
+ // }
332
+ // TypeScript will first try to match the request type to
333
+ // LedgerRequestExpandedTransactionsBinary, which will succeed. It will
334
+ // then try to match the response type to LedgerResponseExpanded, which
335
+ // will also succeed. If we had listed LedgerRequestExpandedTransactionsOnly
336
+ // first, TypeScript would have tried to match the request type to
337
+ // LedgerRequestExpandedTransactionsOnly, which would have succeeded, but
338
+ // then we'd get the wrong response type, LedgerResponse, instead of
339
+ // LedgerResponseExpanded.
340
+ T extends LedgerRequestExpandedTransactionsBinary
341
+ ? LedgerResponse
342
+ : T extends LedgerRequestExpandedAccountsAndTransactions
343
+ ? LedgerResponseExpanded
344
+ : T extends LedgerRequestExpandedTransactionsOnly
345
+ ? LedgerResponseExpanded
346
+ : T extends LedgerRequestExpandedAccountsOnly
347
+ ? LedgerResponseExpanded
348
+ : T extends LedgerRequest
349
+ ? LedgerResponse
350
+ : T extends LedgerClosedRequest
351
+ ? LedgerClosedResponse
352
+ : T extends LedgerCurrentRequest
353
+ ? LedgerCurrentResponse
354
+ : T extends LedgerDataRequest
355
+ ? LedgerDataResponse
356
+ : T extends LedgerEntryRequest
357
+ ? LedgerEntryResponse
358
+ : T extends SubmitRequest
359
+ ? SubmitResponse
360
+ : T extends SubmitMultisignedRequest
361
+ ? SubmitMultisignedResponse
362
+ : T extends TransactionEntryRequest
363
+ ? TransactionEntryResponse
364
+ : T extends TxRequest
365
+ ? TxResponse
366
+ : T extends BookOffersRequest
367
+ ? BookOffersResponse
368
+ : T extends DepositAuthorizedRequest
369
+ ? DepositAuthorizedResponse
370
+ : T extends PathFindRequest
371
+ ? PathFindResponse
372
+ : T extends RipplePathFindRequest
373
+ ? RipplePathFindResponse
374
+ : T extends ChannelVerifyRequest
375
+ ? ChannelVerifyResponse
376
+ : T extends SubscribeRequest
377
+ ? SubscribeResponse
378
+ : T extends UnsubscribeRequest
379
+ ? UnsubscribeResponse
380
+ : T extends FeeRequest
381
+ ? FeeResponse
382
+ : T extends ManifestRequest
383
+ ? ManifestResponse
384
+ : T extends ServerInfoRequest
385
+ ? ServerInfoResponse
386
+ : T extends ServerStateRequest
387
+ ? ServerStateResponse
388
+ : T extends PingRequest
389
+ ? PingResponse
390
+ : T extends RandomRequest
391
+ ? RandomResponse
392
+ : T extends NFTBuyOffersRequest
393
+ ? NFTBuyOffersResponse
394
+ : T extends NFTSellOffersRequest
395
+ ? NFTSellOffersResponse
396
+ : T extends NFTInfoRequest
397
+ ? NFTInfoResponse
398
+ : T extends NFTHistoryRequest
399
+ ? NFTHistoryResponse
400
+ : Response
401
+
402
+ export type MarkerRequest = Request & {
403
+ limit?: number
404
+ marker?: unknown
405
+ }
406
+
407
+ export type MarkerResponse = Response & {
408
+ result: {
409
+ marker?: unknown
410
+ }
411
+ }
412
+
413
+ export type RequestAllResponseMap<T> = T extends AccountChannelsRequest
414
+ ? AccountChannelsResponse
415
+ : T extends AccountLinesRequest
416
+ ? AccountLinesResponse
417
+ : T extends AccountObjectsRequest
418
+ ? AccountObjectsResponse
419
+ : T extends AccountOffersRequest
420
+ ? AccountOffersResponse
421
+ : T extends AccountTxRequest
422
+ ? AccountTxResponse
423
+ : T extends LedgerDataRequest
424
+ ? LedgerDataResponse
425
+ : T extends AccountTxRequest
426
+ ? AccountTxResponse
427
+ : T extends BookOffersRequest
428
+ ? BookOffersResponse
429
+ : MarkerResponse
430
+
256
431
  export {
257
432
  // Allow users to define their own requests and responses. This is useful for releasing experimental versions
258
433
  BaseRequest,
@@ -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,116 @@ 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
73
+ }
74
+
75
+ /**
76
+ * Retrieve information about the public ledger. Expects a response in the form
77
+ * of a {@link LedgerResponseExpanded}. Will return full JSON-formatted transaction data instead of string hashes.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * const ledger: LedgerRequest = {
82
+ * "id": 14,
83
+ * "command": "ledger",
84
+ * "ledger_index": "validated",
85
+ * "full": false,
86
+ * "accounts": false,
87
+ * "transactions": false,
88
+ * "expand": true,
89
+ * "owner_funds": false
90
+ * }
91
+ * ```
92
+ *
93
+ * @category Requests
94
+ */
95
+ export interface LedgerRequestExpandedTransactionsOnly extends LedgerRequest {
96
+ expand: true
97
+ transactions: true
98
+ }
99
+
100
+ /**
101
+ * Retrieve information about the public ledger. Expects a response in the form
102
+ * of a {@link LedgerResponseExpanded}. Will return full JSON-formatted `accountState` data instead of string hashes.
103
+ *
104
+ * @example
105
+ * ```ts
106
+ * const ledger: LedgerRequest = {
107
+ * "id": 14,
108
+ * "command": "ledger",
109
+ * "ledger_index": "validated",
110
+ * "full": false,
111
+ * "accounts": true,
112
+ * "transactions": false,
113
+ * "expand": true,
114
+ * "owner_funds": false
115
+ * }
116
+ * ```
117
+ *
118
+ * @category Requests
119
+ */
120
+ export interface LedgerRequestExpandedAccountsOnly extends LedgerRequest {
121
+ expand: true
122
+ accounts: true
123
+ }
124
+
125
+ /**
126
+ * Retrieve information about the public ledger. Expects a response in the form
127
+ * of a {@link LedgerResponseExpanded}. Will return full JSON-formatted `accountState` and `transactions`
128
+ * data instead of string hashes.
129
+ *
130
+ * @example
131
+ * ```ts
132
+ * const ledger: LedgerRequest = {
133
+ * "id": 14,
134
+ * "command": "ledger",
135
+ * "ledger_index": "validated",
136
+ * "full": false,
137
+ * "accounts": true,
138
+ * "transactions": true,
139
+ * "expand": true,
140
+ * "owner_funds": false
141
+ * }
142
+ * ```
143
+ *
144
+ * @category Requests
145
+ */
146
+ export interface LedgerRequestExpandedAccountsAndTransactions
147
+ extends LedgerRequest {
148
+ expand: true
149
+ accounts: true
150
+ transactions: true
151
+ }
152
+
153
+ /**
154
+ * Retrieve information about the public ledger. Expects a response in the form
155
+ * of a {@link LedgerResponse}. Will return binary (hexadecimal string) format
156
+ * instead of JSON or string hashes for `transactions` data.
157
+ *
158
+ * @example
159
+ * ```ts
160
+ * const ledger: LedgerRequest = {
161
+ * "id": 14,
162
+ * "command": "ledger",
163
+ * "ledger_index": "validated",
164
+ * "full": false,
165
+ * "accounts": true,
166
+ * "transactions": true,
167
+ * "expand": true,
168
+ * "owner_funds": false,
169
+ * "binary": true
170
+ * }
171
+ * ```
172
+ *
173
+ * @category Requests
174
+ */
175
+ export interface LedgerRequestExpandedTransactionsBinary extends LedgerRequest {
176
+ expand: true
177
+ transactions: true
178
+ binary: true
68
179
  }
69
180
 
70
181
  /**
@@ -96,30 +207,53 @@ export interface LedgerBinary
96
207
  transactions?: string[]
97
208
  }
98
209
 
210
+ interface LedgerResponseBase {
211
+ /** Unique identifying hash of the entire ledger. */
212
+ ledger_hash: string
213
+ /** The Ledger Index of this ledger. */
214
+ ledger_index: number
215
+ /**
216
+ * If true, this is a validated ledger version. If omitted or set to false,
217
+ * this ledger's data is not final.
218
+ */
219
+ queue_data?: Array<LedgerQueueData | string>
220
+ /**
221
+ * Array of objects describing queued transactions, in the same order as
222
+ * the queue. If the request specified expand as true, members contain full
223
+ * representations of the transactions, in either JSON or binary depending
224
+ * on whether the request specified binary as true.
225
+ */
226
+ validated?: boolean
227
+ }
228
+
229
+ interface LedgerResponseResult extends LedgerResponseBase {
230
+ /** The complete header data of this {@link Ledger}. */
231
+ ledger: LedgerBinary
232
+ }
233
+
99
234
  /**
100
235
  * Response expected from a {@link LedgerRequest}.
236
+ * This is the default request response, triggered when `expand` and `binary` are both false.
101
237
  *
102
238
  * @category Responses
103
239
  */
104
240
  export interface LedgerResponse extends BaseResponse {
105
- result: {
106
- /** The complete header data of this {@link Ledger}. */
107
- ledger: Ledger | LedgerBinary
108
- /** Unique identifying hash of the entire ledger. */
109
- ledger_hash: string
110
- /** The Ledger Index of this ledger. */
111
- ledger_index: number
112
- /**
113
- * If true, this is a validated ledger version. If omitted or set to false,
114
- * this ledger's data is not final.
115
- */
116
- queue_data?: Array<LedgerQueueData | string>
117
- /**
118
- * Array of objects describing queued transactions, in the same order as
119
- * the queue. If the request specified expand as true, members contain full
120
- * representations of the transactions, in either JSON or binary depending
121
- * on whether the request specified binary as true.
122
- */
123
- validated?: boolean
124
- }
241
+ result: LedgerResponseResult
242
+ }
243
+
244
+ interface LedgerResponseExpandedResult extends LedgerResponseBase {
245
+ /** The complete header data of this {@link Ledger}. */
246
+ ledger: Ledger
247
+ }
248
+
249
+ /**
250
+ * Response expected from a {@link LedgerRequest} when the request contains `expanded` is true. See {@link LedgerRequestExpanded}.
251
+ * This response will contain full JSON-formatted data instead of string hashes.
252
+ * The response will contain either `accounts` or `transactions` or both.
253
+ * `binary` will be missing altogether.
254
+ *
255
+ * @category Responses
256
+ */
257
+ export interface LedgerResponseExpanded extends BaseResponse {
258
+ result: LedgerResponseExpandedResult
125
259
  }
@@ -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
@@ -10,6 +10,7 @@ import { OfferCreate, Transaction } from '../transactions'
10
10
  import { TransactionMetadata } from '../transactions/metadata'
11
11
 
12
12
  import type { BaseRequest, BaseResponse } from './baseMethod'
13
+ import { ManifestRequest } from './manifest'
13
14
 
14
15
  export interface SubscribeBook {
15
16
  /**
@@ -433,3 +434,38 @@ export type Stream =
433
434
  | PeerStatusStream
434
435
  | OrderBookStream
435
436
  | ConsensusStream
437
+
438
+ export type EventTypes =
439
+ | 'connected'
440
+ | 'disconnected'
441
+ | 'ledgerClosed'
442
+ | 'validationReceived'
443
+ | 'transaction'
444
+ | 'peerStatusChange'
445
+ | 'consensusPhase'
446
+ | 'manifestReceived'
447
+ | 'path_find'
448
+ | 'error'
449
+
450
+ export type OnEventToListenerMap<T extends EventTypes> = T extends 'connected'
451
+ ? () => void
452
+ : T extends 'disconnected'
453
+ ? (code: number) => void
454
+ : T extends 'ledgerClosed'
455
+ ? (ledger: LedgerStream) => void
456
+ : T extends 'validationReceived'
457
+ ? (validation: ValidationStream) => void
458
+ : T extends 'transaction'
459
+ ? (transaction: TransactionStream) => void
460
+ : T extends 'peerStatusChange'
461
+ ? (peerStatus: PeerStatusStream) => void
462
+ : T extends 'consensusPhase'
463
+ ? (consensus: ConsensusStream) => void
464
+ : T extends 'manifestReceived'
465
+ ? (manifest: ManifestRequest) => void
466
+ : T extends 'path_find'
467
+ ? (path: PathFindStream) => void
468
+ : T extends 'error'
469
+ ? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- needs to be any for overload
470
+ (...err: any[]) => void
471
+ : (...args: never[]) => void
@@ -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
 
@@ -11,6 +12,7 @@ import { BaseRequest, BaseResponse } from './baseMethod'
11
12
  */
12
13
  export interface TxRequest extends BaseRequest {
13
14
  command: 'tx'
15
+ /** The 256-bit hash of the transaction, as hex. */
14
16
  transaction: string
15
17
  /**
16
18
  * If true, return transaction data and metadata as binary serialized to
@@ -39,8 +41,9 @@ export interface TxRequest extends BaseRequest {
39
41
  *
40
42
  * @category Responses
41
43
  */
42
- export interface TxResponse<T extends BaseTransaction = Transaction>
43
- extends BaseResponse {
44
+ export interface TxResponse<
45
+ T extends BaseTransaction = Transaction | PseudoTransaction,
46
+ > extends BaseResponse {
44
47
  result: {
45
48
  /** The SHA-512 hash of the transaction. */
46
49
  hash: string
@@ -48,7 +51,7 @@ export interface TxResponse<T extends BaseTransaction = Transaction>
48
51
  ledger_index?: number
49
52
  /** Transaction metadata, which describes the results of the transaction.
50
53
  * Can be undefined if a transaction has not been validated yet. */
51
- meta?: TransactionMetadata | string
54
+ meta?: TransactionMetadata<T> | string
52
55
  /**
53
56
  * If true, this data comes from a validated ledger version; if omitted or.
54
57
  * Set to false, this data is not final.
@@ -6,6 +6,7 @@ import {
6
6
  parseAmountValue,
7
7
  validateBaseTransaction,
8
8
  } from './common'
9
+ import type { TransactionMetadataBase } from './metadata'
9
10
 
10
11
  /**
11
12
  * The NFTokenOfferAccept transaction is used to accept offers
@@ -64,6 +65,11 @@ export interface NFTokenAcceptOffer extends BaseTransaction {
64
65
  NFTokenBrokerFee?: Amount
65
66
  }
66
67
 
68
+ export interface NFTokenAcceptOfferMetadata extends TransactionMetadataBase {
69
+ // rippled 1.11.0 or later
70
+ nftoken_id?: string
71
+ }
72
+
67
73
  function validateNFTokenBrokerFee(tx: Record<string, unknown>): void {
68
74
  const value = parseAmountValue(tx.NFTokenBrokerFee)
69
75
  if (Number.isNaN(value)) {