xrpl 1.0.1-mpt-beta → 1.0.4-mpt-beta

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 (278) hide show
  1. package/build/xrpl-latest.js +528 -314
  2. package/build/xrpl-latest.js.map +1 -1
  3. package/dist/npm/Wallet/defaultFaucets.d.ts +1 -2
  4. package/dist/npm/Wallet/defaultFaucets.d.ts.map +1 -1
  5. package/dist/npm/Wallet/defaultFaucets.js +0 -5
  6. package/dist/npm/Wallet/defaultFaucets.js.map +1 -1
  7. package/dist/npm/client/RequestManager.d.ts +5 -4
  8. package/dist/npm/client/RequestManager.d.ts.map +1 -1
  9. package/dist/npm/client/RequestManager.js.map +1 -1
  10. package/dist/npm/client/connection.d.ts +2 -2
  11. package/dist/npm/client/connection.d.ts.map +1 -1
  12. package/dist/npm/client/connection.js.map +1 -1
  13. package/dist/npm/client/index.d.ts +4 -3
  14. package/dist/npm/client/index.d.ts.map +1 -1
  15. package/dist/npm/client/index.js +17 -10
  16. package/dist/npm/client/index.js.map +1 -1
  17. package/dist/npm/client/partialPayment.d.ts +2 -1
  18. package/dist/npm/client/partialPayment.d.ts.map +1 -1
  19. package/dist/npm/client/partialPayment.js +10 -3
  20. package/dist/npm/client/partialPayment.js.map +1 -1
  21. package/dist/npm/models/common/index.d.ts +13 -0
  22. package/dist/npm/models/common/index.d.ts.map +1 -1
  23. package/dist/npm/models/common/index.js +4 -0
  24. package/dist/npm/models/common/index.js.map +1 -1
  25. package/dist/npm/models/ledger/AMM.d.ts +2 -2
  26. package/dist/npm/models/ledger/AMM.d.ts.map +1 -1
  27. package/dist/npm/models/ledger/Amendments.d.ts +2 -2
  28. package/dist/npm/models/ledger/Amendments.d.ts.map +1 -1
  29. package/dist/npm/models/ledger/BaseLedgerEntry.d.ts +3 -3
  30. package/dist/npm/models/ledger/BaseLedgerEntry.d.ts.map +1 -1
  31. package/dist/npm/models/ledger/DirectoryNode.d.ts +2 -2
  32. package/dist/npm/models/ledger/DirectoryNode.d.ts.map +1 -1
  33. package/dist/npm/models/ledger/FeeSettings.d.ts +2 -2
  34. package/dist/npm/models/ledger/FeeSettings.d.ts.map +1 -1
  35. package/dist/npm/models/ledger/Ledger.d.ts +10 -2
  36. package/dist/npm/models/ledger/Ledger.d.ts.map +1 -1
  37. package/dist/npm/models/ledger/LedgerEntry.d.ts +3 -2
  38. package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
  39. package/dist/npm/models/ledger/LedgerHashes.d.ts +2 -2
  40. package/dist/npm/models/ledger/LedgerHashes.d.ts.map +1 -1
  41. package/dist/npm/models/ledger/NegativeUNL.d.ts +2 -2
  42. package/dist/npm/models/ledger/NegativeUNL.d.ts.map +1 -1
  43. package/dist/npm/models/ledger/Oracle.d.ts +12 -0
  44. package/dist/npm/models/ledger/Oracle.d.ts.map +1 -0
  45. package/dist/npm/models/ledger/Oracle.js +3 -0
  46. package/dist/npm/models/ledger/Oracle.js.map +1 -0
  47. package/dist/npm/models/ledger/RippleState.d.ts +2 -1
  48. package/dist/npm/models/ledger/RippleState.d.ts.map +1 -1
  49. package/dist/npm/models/ledger/RippleState.js +1 -0
  50. package/dist/npm/models/ledger/RippleState.js.map +1 -1
  51. package/dist/npm/models/ledger/index.d.ts +3 -2
  52. package/dist/npm/models/ledger/index.d.ts.map +1 -1
  53. package/dist/npm/models/ledger/index.js.map +1 -1
  54. package/dist/npm/models/methods/accountChannels.d.ts +1 -1
  55. package/dist/npm/models/methods/accountChannels.d.ts.map +1 -1
  56. package/dist/npm/models/methods/accountInfo.d.ts +17 -4
  57. package/dist/npm/models/methods/accountInfo.d.ts.map +1 -1
  58. package/dist/npm/models/methods/accountTx.d.ts +11 -5
  59. package/dist/npm/models/methods/accountTx.d.ts.map +1 -1
  60. package/dist/npm/models/methods/getAggregatePrice.d.ts +31 -0
  61. package/dist/npm/models/methods/getAggregatePrice.d.ts.map +1 -0
  62. package/dist/npm/models/methods/getAggregatePrice.js +3 -0
  63. package/dist/npm/models/methods/getAggregatePrice.js.map +1 -0
  64. package/dist/npm/models/methods/index.d.ts +14 -11
  65. package/dist/npm/models/methods/index.d.ts.map +1 -1
  66. package/dist/npm/models/methods/ledger.d.ts +17 -5
  67. package/dist/npm/models/methods/ledger.d.ts.map +1 -1
  68. package/dist/npm/models/methods/ledgerEntry.d.ts +5 -0
  69. package/dist/npm/models/methods/ledgerEntry.d.ts.map +1 -1
  70. package/dist/npm/models/methods/nftsByIssuer.d.ts +19 -0
  71. package/dist/npm/models/methods/nftsByIssuer.d.ts.map +1 -0
  72. package/dist/npm/models/methods/nftsByIssuer.js +3 -0
  73. package/dist/npm/models/methods/nftsByIssuer.js.map +1 -0
  74. package/dist/npm/models/methods/submitMultisigned.d.ts +16 -5
  75. package/dist/npm/models/methods/submitMultisigned.d.ts.map +1 -1
  76. package/dist/npm/models/methods/tx.d.ts +20 -8
  77. package/dist/npm/models/methods/tx.d.ts.map +1 -1
  78. package/dist/npm/models/transactions/AMMDeposit.d.ts +3 -1
  79. package/dist/npm/models/transactions/AMMDeposit.d.ts.map +1 -1
  80. package/dist/npm/models/transactions/AMMDeposit.js +1 -0
  81. package/dist/npm/models/transactions/AMMDeposit.js.map +1 -1
  82. package/dist/npm/models/transactions/index.d.ts +2 -0
  83. package/dist/npm/models/transactions/index.d.ts.map +1 -1
  84. package/dist/npm/models/transactions/index.js.map +1 -1
  85. package/dist/npm/models/transactions/metadata.d.ts +3 -0
  86. package/dist/npm/models/transactions/metadata.d.ts.map +1 -1
  87. package/dist/npm/models/transactions/metadata.js.map +1 -1
  88. package/dist/npm/models/transactions/oracleDelete.d.ts +7 -0
  89. package/dist/npm/models/transactions/oracleDelete.d.ts.map +1 -0
  90. package/dist/npm/models/transactions/oracleDelete.js +10 -0
  91. package/dist/npm/models/transactions/oracleDelete.js.map +1 -0
  92. package/dist/npm/models/transactions/oracleSet.d.ts +13 -0
  93. package/dist/npm/models/transactions/oracleSet.d.ts.map +1 -0
  94. package/dist/npm/models/transactions/oracleSet.js +59 -0
  95. package/dist/npm/models/transactions/oracleSet.js.map +1 -0
  96. package/dist/npm/models/transactions/payment.d.ts +2 -2
  97. package/dist/npm/models/transactions/payment.js +1 -1
  98. package/dist/npm/models/transactions/transaction.d.ts +3 -1
  99. package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
  100. package/dist/npm/models/transactions/transaction.js +8 -0
  101. package/dist/npm/models/transactions/transaction.js.map +1 -1
  102. package/dist/npm/snippets/src/claimPayChannel.js +1 -1
  103. package/dist/npm/snippets/src/claimPayChannel.js.map +1 -1
  104. package/dist/npm/snippets/src/sendEscrow.js +1 -1
  105. package/dist/npm/snippets/src/sendEscrow.js.map +1 -1
  106. package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -1
  107. package/dist/npm/src/Wallet/defaultFaucets.d.ts +1 -2
  108. package/dist/npm/src/Wallet/defaultFaucets.d.ts.map +1 -1
  109. package/dist/npm/src/Wallet/defaultFaucets.js +0 -5
  110. package/dist/npm/src/Wallet/defaultFaucets.js.map +1 -1
  111. package/dist/npm/src/client/RequestManager.d.ts +5 -4
  112. package/dist/npm/src/client/RequestManager.d.ts.map +1 -1
  113. package/dist/npm/src/client/RequestManager.js.map +1 -1
  114. package/dist/npm/src/client/connection.d.ts +2 -2
  115. package/dist/npm/src/client/connection.d.ts.map +1 -1
  116. package/dist/npm/src/client/connection.js.map +1 -1
  117. package/dist/npm/src/client/index.d.ts +4 -3
  118. package/dist/npm/src/client/index.d.ts.map +1 -1
  119. package/dist/npm/src/client/index.js +17 -10
  120. package/dist/npm/src/client/index.js.map +1 -1
  121. package/dist/npm/src/client/partialPayment.d.ts +2 -1
  122. package/dist/npm/src/client/partialPayment.d.ts.map +1 -1
  123. package/dist/npm/src/client/partialPayment.js +10 -3
  124. package/dist/npm/src/client/partialPayment.js.map +1 -1
  125. package/dist/npm/src/models/common/index.d.ts +13 -0
  126. package/dist/npm/src/models/common/index.d.ts.map +1 -1
  127. package/dist/npm/src/models/common/index.js +4 -0
  128. package/dist/npm/src/models/common/index.js.map +1 -1
  129. package/dist/npm/src/models/ledger/AMM.d.ts +2 -2
  130. package/dist/npm/src/models/ledger/AMM.d.ts.map +1 -1
  131. package/dist/npm/src/models/ledger/Amendments.d.ts +2 -2
  132. package/dist/npm/src/models/ledger/Amendments.d.ts.map +1 -1
  133. package/dist/npm/src/models/ledger/BaseLedgerEntry.d.ts +3 -3
  134. package/dist/npm/src/models/ledger/BaseLedgerEntry.d.ts.map +1 -1
  135. package/dist/npm/src/models/ledger/DirectoryNode.d.ts +2 -2
  136. package/dist/npm/src/models/ledger/DirectoryNode.d.ts.map +1 -1
  137. package/dist/npm/src/models/ledger/FeeSettings.d.ts +2 -2
  138. package/dist/npm/src/models/ledger/FeeSettings.d.ts.map +1 -1
  139. package/dist/npm/src/models/ledger/Ledger.d.ts +10 -2
  140. package/dist/npm/src/models/ledger/Ledger.d.ts.map +1 -1
  141. package/dist/npm/src/models/ledger/LedgerEntry.d.ts +3 -2
  142. package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
  143. package/dist/npm/src/models/ledger/LedgerHashes.d.ts +2 -2
  144. package/dist/npm/src/models/ledger/LedgerHashes.d.ts.map +1 -1
  145. package/dist/npm/src/models/ledger/NegativeUNL.d.ts +2 -2
  146. package/dist/npm/src/models/ledger/NegativeUNL.d.ts.map +1 -1
  147. package/dist/npm/src/models/ledger/Oracle.d.ts +12 -0
  148. package/dist/npm/src/models/ledger/Oracle.d.ts.map +1 -0
  149. package/dist/npm/src/models/ledger/Oracle.js +3 -0
  150. package/dist/npm/src/models/ledger/Oracle.js.map +1 -0
  151. package/dist/npm/src/models/ledger/RippleState.d.ts +2 -1
  152. package/dist/npm/src/models/ledger/RippleState.d.ts.map +1 -1
  153. package/dist/npm/src/models/ledger/RippleState.js +1 -0
  154. package/dist/npm/src/models/ledger/RippleState.js.map +1 -1
  155. package/dist/npm/src/models/ledger/index.d.ts +3 -2
  156. package/dist/npm/src/models/ledger/index.d.ts.map +1 -1
  157. package/dist/npm/src/models/ledger/index.js.map +1 -1
  158. package/dist/npm/src/models/methods/accountChannels.d.ts +1 -1
  159. package/dist/npm/src/models/methods/accountChannels.d.ts.map +1 -1
  160. package/dist/npm/src/models/methods/accountInfo.d.ts +17 -4
  161. package/dist/npm/src/models/methods/accountInfo.d.ts.map +1 -1
  162. package/dist/npm/src/models/methods/accountTx.d.ts +11 -5
  163. package/dist/npm/src/models/methods/accountTx.d.ts.map +1 -1
  164. package/dist/npm/src/models/methods/getAggregatePrice.d.ts +31 -0
  165. package/dist/npm/src/models/methods/getAggregatePrice.d.ts.map +1 -0
  166. package/dist/npm/src/models/methods/getAggregatePrice.js +3 -0
  167. package/dist/npm/src/models/methods/getAggregatePrice.js.map +1 -0
  168. package/dist/npm/src/models/methods/index.d.ts +14 -11
  169. package/dist/npm/src/models/methods/index.d.ts.map +1 -1
  170. package/dist/npm/src/models/methods/ledger.d.ts +17 -5
  171. package/dist/npm/src/models/methods/ledger.d.ts.map +1 -1
  172. package/dist/npm/src/models/methods/ledgerEntry.d.ts +5 -0
  173. package/dist/npm/src/models/methods/ledgerEntry.d.ts.map +1 -1
  174. package/dist/npm/src/models/methods/nftsByIssuer.d.ts +19 -0
  175. package/dist/npm/src/models/methods/nftsByIssuer.d.ts.map +1 -0
  176. package/dist/npm/src/models/methods/nftsByIssuer.js +3 -0
  177. package/dist/npm/src/models/methods/nftsByIssuer.js.map +1 -0
  178. package/dist/npm/src/models/methods/submitMultisigned.d.ts +16 -5
  179. package/dist/npm/src/models/methods/submitMultisigned.d.ts.map +1 -1
  180. package/dist/npm/src/models/methods/tx.d.ts +20 -8
  181. package/dist/npm/src/models/methods/tx.d.ts.map +1 -1
  182. package/dist/npm/src/models/transactions/AMMDeposit.d.ts +3 -1
  183. package/dist/npm/src/models/transactions/AMMDeposit.d.ts.map +1 -1
  184. package/dist/npm/src/models/transactions/AMMDeposit.js +1 -0
  185. package/dist/npm/src/models/transactions/AMMDeposit.js.map +1 -1
  186. package/dist/npm/src/models/transactions/index.d.ts +2 -0
  187. package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
  188. package/dist/npm/src/models/transactions/index.js.map +1 -1
  189. package/dist/npm/src/models/transactions/metadata.d.ts +3 -0
  190. package/dist/npm/src/models/transactions/metadata.d.ts.map +1 -1
  191. package/dist/npm/src/models/transactions/metadata.js.map +1 -1
  192. package/dist/npm/src/models/transactions/oracleDelete.d.ts +7 -0
  193. package/dist/npm/src/models/transactions/oracleDelete.d.ts.map +1 -0
  194. package/dist/npm/src/models/transactions/oracleDelete.js +10 -0
  195. package/dist/npm/src/models/transactions/oracleDelete.js.map +1 -0
  196. package/dist/npm/src/models/transactions/oracleSet.d.ts +13 -0
  197. package/dist/npm/src/models/transactions/oracleSet.d.ts.map +1 -0
  198. package/dist/npm/src/models/transactions/oracleSet.js +59 -0
  199. package/dist/npm/src/models/transactions/oracleSet.js.map +1 -0
  200. package/dist/npm/src/models/transactions/payment.d.ts +2 -2
  201. package/dist/npm/src/models/transactions/payment.js +1 -1
  202. package/dist/npm/src/models/transactions/transaction.d.ts +3 -1
  203. package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
  204. package/dist/npm/src/models/transactions/transaction.js +8 -0
  205. package/dist/npm/src/models/transactions/transaction.js.map +1 -1
  206. package/dist/npm/src/sugar/autofill.d.ts +1 -1
  207. package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
  208. package/dist/npm/src/sugar/autofill.js +2 -4
  209. package/dist/npm/src/sugar/autofill.js.map +1 -1
  210. package/dist/npm/src/sugar/getFeeXrp.d.ts +1 -1
  211. package/dist/npm/src/sugar/getFeeXrp.d.ts.map +1 -1
  212. package/dist/npm/src/sugar/getFeeXrp.js +3 -2
  213. package/dist/npm/src/sugar/getFeeXrp.js.map +1 -1
  214. package/dist/npm/src/sugar/submit.d.ts.map +1 -1
  215. package/dist/npm/src/sugar/submit.js.map +1 -1
  216. package/dist/npm/src/utils/hashes/hashLedger.d.ts +4 -3
  217. package/dist/npm/src/utils/hashes/hashLedger.d.ts.map +1 -1
  218. package/dist/npm/src/utils/hashes/hashLedger.js.map +1 -1
  219. package/dist/npm/src/utils/index.d.ts +2 -1
  220. package/dist/npm/src/utils/index.d.ts.map +1 -1
  221. package/dist/npm/src/utils/index.js.map +1 -1
  222. package/dist/npm/sugar/autofill.d.ts +1 -1
  223. package/dist/npm/sugar/autofill.d.ts.map +1 -1
  224. package/dist/npm/sugar/autofill.js +2 -4
  225. package/dist/npm/sugar/autofill.js.map +1 -1
  226. package/dist/npm/sugar/getFeeXrp.d.ts +1 -1
  227. package/dist/npm/sugar/getFeeXrp.d.ts.map +1 -1
  228. package/dist/npm/sugar/getFeeXrp.js +3 -2
  229. package/dist/npm/sugar/getFeeXrp.js.map +1 -1
  230. package/dist/npm/sugar/submit.d.ts.map +1 -1
  231. package/dist/npm/sugar/submit.js.map +1 -1
  232. package/dist/npm/utils/hashes/hashLedger.d.ts +4 -3
  233. package/dist/npm/utils/hashes/hashLedger.d.ts.map +1 -1
  234. package/dist/npm/utils/hashes/hashLedger.js.map +1 -1
  235. package/dist/npm/utils/index.d.ts +2 -1
  236. package/dist/npm/utils/index.d.ts.map +1 -1
  237. package/dist/npm/utils/index.js.map +1 -1
  238. package/package.json +5 -5
  239. package/src/Wallet/defaultFaucets.ts +0 -6
  240. package/src/client/RequestManager.ts +17 -12
  241. package/src/client/connection.ts +7 -5
  242. package/src/client/index.ts +79 -21
  243. package/src/client/partialPayment.ts +34 -13
  244. package/src/models/common/index.ts +41 -0
  245. package/src/models/ledger/AMM.ts +2 -2
  246. package/src/models/ledger/Amendments.ts +2 -2
  247. package/src/models/ledger/BaseLedgerEntry.ts +9 -5
  248. package/src/models/ledger/DirectoryNode.ts +2 -2
  249. package/src/models/ledger/FeeSettings.ts +4 -2
  250. package/src/models/ledger/Ledger.ts +40 -8
  251. package/src/models/ledger/LedgerEntry.ts +3 -0
  252. package/src/models/ledger/LedgerHashes.ts +2 -4
  253. package/src/models/ledger/NegativeUNL.ts +2 -2
  254. package/src/models/ledger/Oracle.ts +43 -0
  255. package/src/models/ledger/RippleState.ts +2 -0
  256. package/src/models/ledger/index.ts +4 -1
  257. package/src/models/methods/accountChannels.ts +64 -1
  258. package/src/models/methods/accountInfo.ts +58 -12
  259. package/src/models/methods/accountTx.ts +49 -8
  260. package/src/models/methods/getAggregatePrice.ts +119 -0
  261. package/src/models/methods/index.ts +63 -23
  262. package/src/models/methods/ledger.ts +41 -5
  263. package/src/models/methods/ledgerEntry.ts +16 -0
  264. package/src/models/methods/nftsByIssuer.ts +68 -0
  265. package/src/models/methods/submitMultisigned.ts +48 -16
  266. package/src/models/methods/tx.ts +74 -22
  267. package/src/models/transactions/AMMDeposit.ts +2 -0
  268. package/src/models/transactions/index.ts +2 -0
  269. package/src/models/transactions/metadata.ts +1 -0
  270. package/src/models/transactions/oracleDelete.ts +32 -0
  271. package/src/models/transactions/oracleSet.ts +176 -0
  272. package/src/models/transactions/payment.ts +2 -2
  273. package/src/models/transactions/transaction.ts +12 -0
  274. package/src/sugar/autofill.ts +4 -10
  275. package/src/sugar/getFeeXrp.ts +6 -3
  276. package/src/sugar/submit.ts +5 -3
  277. package/src/utils/hashes/hashLedger.ts +8 -5
  278. package/src/utils/index.ts +2 -1
@@ -9,7 +9,12 @@ import {
9
9
  ValidationError,
10
10
  XrplError,
11
11
  } from '../errors'
12
- import type { LedgerIndex, Balance } from '../models/common'
12
+ import {
13
+ APIVersion,
14
+ LedgerIndex,
15
+ Balance,
16
+ DEFAULT_API_VERSION,
17
+ } from '../models/common'
13
18
  import {
14
19
  Request,
15
20
  // account methods
@@ -88,8 +93,23 @@ import {
88
93
  } from './partialPayment'
89
94
 
90
95
  export interface ClientOptions extends ConnectionUserOptions {
96
+ /**
97
+ * Multiplication factor to multiply estimated fee by to provide a cushion in case the
98
+ * required fee rises during submission of a transaction. Defaults to 1.2.
99
+ *
100
+ * @category Fee
101
+ */
91
102
  feeCushion?: number
103
+ /**
104
+ * Maximum transaction cost to allow, in decimal XRP. Must be a string-encoded
105
+ * number. Defaults to '2'.
106
+ *
107
+ * @category Fee
108
+ */
92
109
  maxFeeXRP?: string
110
+ /**
111
+ * Duration to wait for a request to timeout.
112
+ */
93
113
  timeout?: number
94
114
  }
95
115
 
@@ -198,6 +218,12 @@ class Client extends EventEmitter<EventTypes> {
198
218
  */
199
219
  public buildVersion: string | undefined
200
220
 
221
+ /**
222
+ * API Version used by the server this client is connected to
223
+ *
224
+ */
225
+ public apiVersion: APIVersion = DEFAULT_API_VERSION
226
+
201
227
  /**
202
228
  * Creates a new Client with a websocket connection to a rippled server.
203
229
  *
@@ -211,7 +237,7 @@ class Client extends EventEmitter<EventTypes> {
211
237
  * const client = new Client('wss://s.altnet.rippletest.net:51233')
212
238
  * ```
213
239
  */
214
- // eslint-disable-next-line max-lines-per-function -- okay because we have to set up all the connection handlers
240
+ /* eslint-disable max-lines-per-function -- the constructor requires more lines to implement the logic */
215
241
  public constructor(server: string, options: ClientOptions = {}) {
216
242
  super()
217
243
  if (typeof server !== 'string' || !/wss?(?:\+unix)?:\/\//u.exec(server)) {
@@ -275,6 +301,7 @@ class Client extends EventEmitter<EventTypes> {
275
301
  this.emit('path_find', path)
276
302
  })
277
303
  }
304
+ /* eslint-enable max-lines-per-function */
278
305
 
279
306
  /**
280
307
  * Get the url that the client is connected to.
@@ -291,7 +318,6 @@ class Client extends EventEmitter<EventTypes> {
291
318
  * additional request body parameters.
292
319
  *
293
320
  * @category Network
294
- *
295
321
  * @param req - Request to send to the server.
296
322
  * @returns The response from the server.
297
323
  *
@@ -304,16 +330,20 @@ class Client extends EventEmitter<EventTypes> {
304
330
  * console.log(response)
305
331
  * ```
306
332
  */
307
- public async request<R extends Request, T = RequestResponseMap<R>>(
308
- req: R,
309
- ): Promise<T> {
310
- const response = await this.connection.request<R, T>({
333
+ public async request<
334
+ R extends Request,
335
+ V extends APIVersion = typeof DEFAULT_API_VERSION,
336
+ T = RequestResponseMap<R, V>,
337
+ >(req: R): Promise<T> {
338
+ const request = {
311
339
  ...req,
312
- account: req.account
313
- ? // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Must be string
314
- ensureClassicAddress(req.account as string)
315
- : undefined,
316
- })
340
+ account:
341
+ typeof req.account === 'string'
342
+ ? ensureClassicAddress(req.account)
343
+ : undefined,
344
+ api_version: req.api_version ?? this.apiVersion,
345
+ }
346
+ const response = await this.connection.request<R, T>(request)
317
347
 
318
348
  // mutates `response` to add warnings
319
349
  handlePartialPayment(req.command, response)
@@ -422,9 +452,10 @@ class Client extends EventEmitter<EventTypes> {
422
452
  * const allResponses = await client.requestAll({ command: 'transaction_data' });
423
453
  * console.log(allResponses);
424
454
  */
455
+
425
456
  public async requestAll<
426
457
  T extends MarkerRequest,
427
- U = RequestAllResponseMap<T>,
458
+ U = RequestAllResponseMap<T, APIVersion>,
428
459
  >(request: T, collect?: string): Promise<U[]> {
429
460
  /*
430
461
  * The data under collection is keyed based on the command. Fail if command
@@ -441,7 +472,6 @@ class Client extends EventEmitter<EventTypes> {
441
472
  const countTo: number = request.limit == null ? Infinity : request.limit
442
473
  let count = 0
443
474
  let marker: unknown = request.marker
444
- let lastBatchLength: number
445
475
  const results: U[] = []
446
476
  do {
447
477
  const countRemaining = clamp(countTo - count, MIN_LIMIT, MAX_LIMIT)
@@ -453,7 +483,7 @@ class Client extends EventEmitter<EventTypes> {
453
483
  // eslint-disable-next-line no-await-in-loop -- Necessary for this, it really has to wait
454
484
  const singleResponse = await this.connection.request(repeatProps)
455
485
  // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Should be true
456
- const singleResult = (singleResponse as MarkerResponse).result
486
+ const singleResult = (singleResponse as MarkerResponse<APIVersion>).result
457
487
  if (!(collectKey in singleResult)) {
458
488
  throw new XrplError(`${collectKey} not in result`)
459
489
  }
@@ -465,11 +495,8 @@ class Client extends EventEmitter<EventTypes> {
465
495
  // Make sure we handle when no data (not even an empty array) is returned.
466
496
  if (Array.isArray(collectedData)) {
467
497
  count += collectedData.length
468
- lastBatchLength = collectedData.length
469
- } else {
470
- lastBatchLength = 0
471
498
  }
472
- } while (Boolean(marker) && count < countTo && lastBatchLength !== 0)
499
+ } while (Boolean(marker) && count < countTo)
473
500
  return results
474
501
  }
475
502
 
@@ -627,7 +654,10 @@ class Client extends EventEmitter<EventTypes> {
627
654
  * @param signersCount - The expected number of signers for this transaction.
628
655
  * Only used for multisigned transactions.
629
656
  * @returns The autofilled transaction.
657
+ * @throws ValidationError If Amount and DeliverMax fields are not identical in a Payment Transaction
630
658
  */
659
+
660
+ // eslint-disable-next-line complexity -- handling Payment transaction API v2 requires more logic
631
661
  public async autofill<T extends SubmittableTransaction>(
632
662
  transaction: T,
633
663
  signersCount?: number,
@@ -635,7 +665,6 @@ class Client extends EventEmitter<EventTypes> {
635
665
  const tx = { ...transaction }
636
666
 
637
667
  setValidAddresses(tx)
638
-
639
668
  setTransactionFlagsToNumber(tx)
640
669
 
641
670
  const promises: Array<Promise<void>> = []
@@ -655,6 +684,34 @@ class Client extends EventEmitter<EventTypes> {
655
684
  promises.push(checkAccountDeleteBlockers(this, tx))
656
685
  }
657
686
 
687
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- ignore type-assertions on the DeliverMax property
688
+ // @ts-expect-error -- DeliverMax property exists only at the RPC level, not at the protocol level
689
+ if (tx.TransactionType === 'Payment' && tx.DeliverMax != null) {
690
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- This is a valid null check for Amount
691
+ if (tx.Amount == null) {
692
+ // If only DeliverMax is provided, use it to populate the Amount field
693
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- ignore type-assertions on the DeliverMax property
694
+ // @ts-expect-error -- DeliverMax property exists only at the RPC level, not at the protocol level
695
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- DeliverMax is a known RPC-level property
696
+ tx.Amount = tx.DeliverMax
697
+ }
698
+
699
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- ignore type-assertions on the DeliverMax property
700
+ // @ts-expect-error -- DeliverMax property exists only at the RPC level, not at the protocol level
701
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- This is a valid null check for Amount
702
+ if (tx.Amount != null && tx.Amount !== tx.DeliverMax) {
703
+ return Promise.reject(
704
+ new ValidationError(
705
+ 'PaymentTransaction: Amount and DeliverMax fields must be identical when both are provided',
706
+ ),
707
+ )
708
+ }
709
+
710
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- ignore type-assertions on the DeliverMax property
711
+ // @ts-expect-error -- DeliverMax property exists only at the RPC level, not at the protocol level
712
+ delete tx.DeliverMax
713
+ }
714
+
658
715
  return Promise.all(promises).then(() => tx)
659
716
  }
660
717
 
@@ -898,7 +955,7 @@ class Client extends EventEmitter<EventTypes> {
898
955
  * @param options.limit - Limit number of balances to return.
899
956
  * @returns An array of XRP/non-XRP balances for the given account.
900
957
  */
901
- // eslint-disable-next-line max-lines-per-function -- Longer definition is required for end users to see the definition.
958
+ /* eslint-disable max-lines-per-function -- getBalances requires more lines to implement logic */
902
959
  public async getBalances(
903
960
  address: string,
904
961
  options: {
@@ -946,6 +1003,7 @@ class Client extends EventEmitter<EventTypes> {
946
1003
  )
947
1004
  return balances.slice(0, options.limit)
948
1005
  }
1006
+ /* eslint-enable max-lines-per-function */
949
1007
 
950
1008
  /**
951
1009
  * Fetch orderbook (buy/sell orders) between two currency pairs. This checks both sides of the orderbook
@@ -2,13 +2,16 @@ import BigNumber from 'bignumber.js'
2
2
  import { decode } from 'ripple-binary-codec'
3
3
 
4
4
  import type {
5
- AccountTxResponse,
6
5
  TransactionEntryResponse,
7
6
  TransactionStream,
8
7
  TxResponse,
9
8
  } from '..'
10
- import type { Amount, IssuedCurrency, MPTAmount } from '../models/common'
11
- import type { RequestResponseMap } from '../models/methods'
9
+ import type { Amount, IssuedCurrency,APIVersion, DEFAULT_API_VERSION , MPTAmount } from '../models/common'
10
+ import type {
11
+ AccountTxTransaction,
12
+ RequestResponseMap,
13
+ } from '../models/methods'
14
+ import { AccountTxVersionResponseMap } from '../models/methods/accountTx'
12
15
  import { BaseRequest, BaseResponse } from '../models/methods/baseMethod'
13
16
  import { PaymentFlags, Transaction, isMPTAmount } from '../models/transactions'
14
17
  import type { TransactionMetadata } from '../models/transactions/metadata'
@@ -80,7 +83,10 @@ function isPartialPayment(
80
83
  }
81
84
 
82
85
  const delivered = meta.delivered_amount
83
- const amount = tx.Amount
86
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- DeliverMax is a valid field on Payment response
87
+ // @ts-expect-error -- DeliverMax is a valid field on Payment response
88
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- DeliverMax is a valid field on Payment response
89
+ const amount = tx.DeliverMax
84
90
 
85
91
  if (delivered === undefined) {
86
92
  return false
@@ -90,23 +96,36 @@ function isPartialPayment(
90
96
  }
91
97
 
92
98
  function txHasPartialPayment(response: TxResponse): boolean {
93
- return isPartialPayment(response.result, response.result.meta)
99
+ return isPartialPayment(response.result.tx_json, response.result.meta)
94
100
  }
95
101
 
96
102
  function txEntryHasPartialPayment(response: TransactionEntryResponse): boolean {
97
103
  return isPartialPayment(response.result.tx_json, response.result.metadata)
98
104
  }
99
105
 
100
- function accountTxHasPartialPayment(response: AccountTxResponse): boolean {
106
+ function accountTxHasPartialPayment<
107
+ Version extends APIVersion = typeof DEFAULT_API_VERSION,
108
+ >(response: AccountTxVersionResponseMap<Version>): boolean {
101
109
  const { transactions } = response.result
102
- const foo = transactions.some((tx) => isPartialPayment(tx.tx, tx.meta))
110
+ const foo = transactions.some((tx) => {
111
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- required to check API version model
112
+ if (tx.tx_json != null) {
113
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- use API v2 model
114
+ const transaction = tx as AccountTxTransaction
115
+ return isPartialPayment(transaction.tx_json, transaction.meta)
116
+ }
117
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- use API v1 model
118
+ const transaction = tx as AccountTxTransaction<1>
119
+ return isPartialPayment(transaction.tx, transaction.meta)
120
+ })
103
121
  return foo
104
122
  }
105
123
 
106
- function hasPartialPayment<R extends BaseRequest, T = RequestResponseMap<R>>(
107
- command: string,
108
- response: T,
109
- ): boolean {
124
+ function hasPartialPayment<
125
+ R extends BaseRequest,
126
+ V extends APIVersion = typeof DEFAULT_API_VERSION,
127
+ T = RequestResponseMap<R, V>,
128
+ >(command: string, response: T): boolean {
110
129
  /* eslint-disable @typescript-eslint/consistent-type-assertions -- Request type is known at runtime from command */
111
130
  switch (command) {
112
131
  case 'tx':
@@ -114,7 +133,9 @@ function hasPartialPayment<R extends BaseRequest, T = RequestResponseMap<R>>(
114
133
  case 'transaction_entry':
115
134
  return txEntryHasPartialPayment(response as TransactionEntryResponse)
116
135
  case 'account_tx':
117
- return accountTxHasPartialPayment(response as AccountTxResponse)
136
+ return accountTxHasPartialPayment(
137
+ response as AccountTxVersionResponseMap<V>,
138
+ )
118
139
  default:
119
140
  return false
120
141
  }
@@ -129,7 +150,7 @@ function hasPartialPayment<R extends BaseRequest, T = RequestResponseMap<R>>(
129
150
  */
130
151
  export function handlePartialPayment<
131
152
  R extends BaseRequest,
132
- T = RequestResponseMap<R>,
153
+ T = RequestResponseMap<R, APIVersion>,
133
154
  >(command: string, response: T): void {
134
155
  if (hasPartialPayment(command, response)) {
135
156
  // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- We are checking dynamically and safely.
@@ -1,3 +1,7 @@
1
+ export const RIPPLED_API_V1 = 1
2
+ export const RIPPLED_API_V2 = 2
3
+ export const DEFAULT_API_VERSION = RIPPLED_API_V2
4
+ export type APIVersion = typeof RIPPLED_API_V1 | typeof RIPPLED_API_V2
1
5
  export type LedgerIndex = number | ('validated' | 'closed' | 'current')
2
6
 
3
7
  export interface XRP {
@@ -109,6 +113,10 @@ export interface ResponseOnlyTxInfo {
109
113
  * The sequence number of the ledger that included this transaction.
110
114
  */
111
115
  ledger_index?: number
116
+ /**
117
+ * The hash of the ledger included this transaction.
118
+ */
119
+ ledger_hash?: string
112
120
  /**
113
121
  * @deprecated Alias for ledger_index.
114
122
  */
@@ -160,3 +168,36 @@ export interface XChainBridge {
160
168
  IssuingChainDoor: string
161
169
  IssuingChainIssue: Currency
162
170
  }
171
+
172
+ /**
173
+ * A PriceData object represents the price information for a token pair.
174
+ *
175
+ */
176
+ export interface PriceData {
177
+ PriceData: {
178
+ /**
179
+ * The primary asset in a trading pair. Any valid identifier, such as a stock symbol, bond CUSIP, or currency code is allowed.
180
+ * For example, in the BTC/USD pair, BTC is the base asset; in 912810RR9/BTC, 912810RR9 is the base asset.
181
+ */
182
+ BaseAsset: string
183
+
184
+ /**
185
+ * The quote asset in a trading pair. The quote asset denotes the price of one unit of the base asset. For example, in the
186
+ * BTC/USD pair,BTC is the base asset; in 912810RR9/BTC, 912810RR9 is the base asset.
187
+ */
188
+ QuoteAsset: string
189
+
190
+ /**
191
+ * The asset price after applying the Scale precision level. It's not included if the last update transaction didn't include
192
+ * the BaseAsset/QuoteAsset pair.
193
+ */
194
+ AssetPrice?: number | string
195
+
196
+ /**
197
+ * The scaling factor to apply to an asset price. For example, if Scale is 6 and original price is 0.155, then the scaled
198
+ * price is 155000. Valid scale ranges are 0-10. It's not included if the last update transaction didn't include the
199
+ * BaseAsset/QuoteAsset pair.
200
+ */
201
+ Scale?: number
202
+ }
203
+ }
@@ -1,6 +1,6 @@
1
1
  import { AuthAccount, Currency, IssuedCurrencyAmount } from '../common'
2
2
 
3
- import { BaseLedgerEntry, MissingPreviousTxnID } from './BaseLedgerEntry'
3
+ import { BaseLedgerEntry, HasOptionalPreviousTxnID } from './BaseLedgerEntry'
4
4
 
5
5
  export interface VoteSlot {
6
6
  VoteEntry: {
@@ -15,7 +15,7 @@ export interface VoteSlot {
15
15
  *
16
16
  * @category Ledger Entries
17
17
  */
18
- export default interface AMM extends BaseLedgerEntry, MissingPreviousTxnID {
18
+ export default interface AMM extends BaseLedgerEntry, HasOptionalPreviousTxnID {
19
19
  LedgerEntryType: 'AMM'
20
20
  /**
21
21
  * The address of the special account that holds this AMM's assets.
@@ -1,4 +1,4 @@
1
- import { BaseLedgerEntry, MissingPreviousTxnID } from './BaseLedgerEntry'
1
+ import { BaseLedgerEntry, HasOptionalPreviousTxnID } from './BaseLedgerEntry'
2
2
 
3
3
  /**
4
4
  * The unique id for the Amendments object https://xrpl.org/amendments-object.html#amendments-id-format
@@ -26,7 +26,7 @@ export interface Majority {
26
26
  */
27
27
  export default interface Amendments
28
28
  extends BaseLedgerEntry,
29
- MissingPreviousTxnID {
29
+ HasOptionalPreviousTxnID {
30
30
  LedgerEntryType: 'Amendments'
31
31
  /**
32
32
  * Array of 256-bit amendment IDs for all currently-enabled amendments. If
@@ -15,13 +15,17 @@ export interface HasPreviousTxnID {
15
15
  PreviousTxnLgrSeq: number
16
16
  }
17
17
 
18
- export interface MissingPreviousTxnID {
18
+ export interface HasOptionalPreviousTxnID {
19
19
  /**
20
- * This field is missing on this object but is present on most other returned objects.
20
+ * The identifying hash of the transaction that most recently modified this
21
+ * object. This field was added in the `fixPreviousTxnID` amendment, so it
22
+ * may not be present in every object.
21
23
  */
22
- PreviousTxnID: never
24
+ PreviousTxnID?: string
23
25
  /**
24
- * This field is missing on this object but is present on most other returned objects.
26
+ * The index of the ledger that contains the transaction that most recently
27
+ * modified this object. This field was added in the `fixPreviousTxnID`
28
+ * amendment, so it may not be present in every object.
25
29
  */
26
- PreviousTxnLgrSeq: never
30
+ PreviousTxnLgrSeq?: number
27
31
  }
@@ -1,4 +1,4 @@
1
- import { BaseLedgerEntry, MissingPreviousTxnID } from './BaseLedgerEntry'
1
+ import { BaseLedgerEntry, HasOptionalPreviousTxnID } from './BaseLedgerEntry'
2
2
 
3
3
  /**
4
4
  * The DirectoryNode object type provides a list of links to other objects in
@@ -8,7 +8,7 @@ import { BaseLedgerEntry, MissingPreviousTxnID } from './BaseLedgerEntry'
8
8
  */
9
9
  export default interface DirectoryNode
10
10
  extends BaseLedgerEntry,
11
- MissingPreviousTxnID {
11
+ HasOptionalPreviousTxnID {
12
12
  LedgerEntryType: 'DirectoryNode'
13
13
  /**
14
14
  * A bit-map of boolean flags enabled for this directory. Currently, the
@@ -1,4 +1,4 @@
1
- import { BaseLedgerEntry, MissingPreviousTxnID } from './BaseLedgerEntry'
1
+ import { BaseLedgerEntry, HasOptionalPreviousTxnID } from './BaseLedgerEntry'
2
2
 
3
3
  /**
4
4
  * The unique id for the FeeSettings object https://xrpl.org/feesettings.html#feesettings-id-format
@@ -26,7 +26,9 @@ export interface FeeSettingsPostAmendmentFields {
26
26
  ReserveIncrementDrops: string
27
27
  }
28
28
 
29
- export interface FeeSettingsBase extends BaseLedgerEntry, MissingPreviousTxnID {
29
+ export interface FeeSettingsBase
30
+ extends BaseLedgerEntry,
31
+ HasOptionalPreviousTxnID {
30
32
  LedgerEntryType: 'FeeSettings'
31
33
  /**
32
34
  * A bit-map of boolean flags for this object. No flags are defined for this type.
@@ -1,14 +1,14 @@
1
+ import { APIVersion, DEFAULT_API_VERSION, RIPPLED_API_V1 } from '../common'
1
2
  import { Transaction, TransactionMetadata } from '../transactions'
2
3
 
3
4
  import { LedgerEntry } from './LedgerEntry'
4
5
 
5
6
  /**
6
- * A ledger is a block of transactions and shared state data. It has a unique
7
- * header that describes its contents using cryptographic hashes.
7
+ * Common properties for ledger entries.
8
8
  *
9
9
  * @category Ledger Entries
10
10
  */
11
- export default interface Ledger {
11
+ interface BaseLedger {
12
12
  /** The SHA-512Half of this ledger's state tree information. */
13
13
  account_hash: string
14
14
  /** All the state information in this ledger. Admin only. */
@@ -38,11 +38,6 @@ export default interface Ledger {
38
38
  * for this ledger and all its contents.
39
39
  */
40
40
  ledger_hash: string
41
- /**
42
- * The ledger index of the ledger. Some API methods display this as a quoted
43
- * integer; some display it as a native JSON number.
44
- */
45
- ledger_index: string
46
41
  /** The approximate time at which the previous ledger was closed. */
47
42
  parent_close_time: number
48
43
  /**
@@ -63,3 +58,40 @@ export default interface Ledger {
63
58
  */
64
59
  transactions?: Array<Transaction & { metaData?: TransactionMetadata }>
65
60
  }
61
+
62
+ /**
63
+ * A ledger is a block of transactions and shared state data. It has a unique
64
+ * header that describes its contents using cryptographic hashes.
65
+ *
66
+ * @category Ledger Entries
67
+ */
68
+ export interface Ledger extends BaseLedger {
69
+ /**
70
+ * The ledger index of the ledger. Represented as a number.
71
+ */
72
+ ledger_index: number
73
+ }
74
+
75
+ /**
76
+ * A ledger is a block of transactions and shared state data. It has a unique
77
+ * header that describes its contents using cryptographic hashes. This is used
78
+ * in api_version 1.
79
+ *
80
+ * @category Ledger Entries
81
+ */
82
+ export interface LedgerV1 extends BaseLedger {
83
+ /**
84
+ * The ledger index of the ledger. Some API methods display this as a quoted
85
+ * integer; some display it as a number.
86
+ */
87
+ ledger_index: string
88
+ }
89
+
90
+ /**
91
+ * Type to map between the API version and the Ledger type.
92
+ *
93
+ * @category Responses
94
+ */
95
+ export type LedgerVersionMap<
96
+ Version extends APIVersion = typeof DEFAULT_API_VERSION,
97
+ > = Version extends typeof RIPPLED_API_V1 ? LedgerV1 : Ledger
@@ -10,6 +10,7 @@ import FeeSettings from './FeeSettings'
10
10
  import LedgerHashes from './LedgerHashes'
11
11
  import NegativeUNL from './NegativeUNL'
12
12
  import Offer from './Offer'
13
+ import Oracle from './Oracle'
13
14
  import PayChannel from './PayChannel'
14
15
  import RippleState from './RippleState'
15
16
  import SignerList from './SignerList'
@@ -30,6 +31,7 @@ type LedgerEntry =
30
31
  | LedgerHashes
31
32
  | NegativeUNL
32
33
  | Offer
34
+ | Oracle
33
35
  | PayChannel
34
36
  | RippleState
35
37
  | SignerList
@@ -52,6 +54,7 @@ type LedgerEntryFilter =
52
54
  | 'nft_offer'
53
55
  | 'nft_page'
54
56
  | 'offer'
57
+ | 'oracle'
55
58
  | 'payment_channel'
56
59
  | 'signer_list'
57
60
  | 'state'
@@ -1,4 +1,4 @@
1
- import { BaseLedgerEntry, MissingPreviousTxnID } from './BaseLedgerEntry'
1
+ import { BaseLedgerEntry } from './BaseLedgerEntry'
2
2
 
3
3
  /**
4
4
  * The LedgerHashes objects exist to make it possible to look up a previous
@@ -7,9 +7,7 @@ import { BaseLedgerEntry, MissingPreviousTxnID } from './BaseLedgerEntry'
7
7
  *
8
8
  * @category Ledger Entries
9
9
  */
10
- export default interface LedgerHashes
11
- extends BaseLedgerEntry,
12
- MissingPreviousTxnID {
10
+ export default interface LedgerHashes extends BaseLedgerEntry {
13
11
  LedgerEntryType: 'LedgerHashes'
14
12
  /** The Ledger Index of the last entry in this object's Hashes array. */
15
13
  LastLedgerSequence?: number
@@ -1,4 +1,4 @@
1
- import { BaseLedgerEntry, MissingPreviousTxnID } from './BaseLedgerEntry'
1
+ import { BaseLedgerEntry, HasOptionalPreviousTxnID } from './BaseLedgerEntry'
2
2
 
3
3
  /**
4
4
  * The unique id for the nUNL object https://xrpl.org/negativeunl.html#negativeunl-id-format
@@ -14,7 +14,7 @@ export const NEGATIVE_UNL_ID =
14
14
  */
15
15
  export default interface NegativeUNL
16
16
  extends BaseLedgerEntry,
17
- MissingPreviousTxnID {
17
+ HasOptionalPreviousTxnID {
18
18
  LedgerEntryType: 'NegativeUNL'
19
19
  /**
20
20
  * A list of trusted validators that are currently disabled.
@@ -0,0 +1,43 @@
1
+ import { PriceData } from '../common'
2
+
3
+ import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
4
+
5
+ /**
6
+ * The Oracle object type describes a single Price Oracle instance.
7
+ *
8
+ * @category Ledger Entries
9
+ */
10
+ export default interface Oracle extends BaseLedgerEntry, HasPreviousTxnID {
11
+ LedgerEntryType: 'Oracle'
12
+
13
+ /**
14
+ * The time the data was last updated, represented as a unix timestamp in seconds.
15
+ */
16
+ LastUpdateTime: number
17
+
18
+ /**
19
+ * The XRPL account with update and delete privileges for the oracle.
20
+ */
21
+ Owner: string
22
+
23
+ /**
24
+ * Describes the type of asset, such as "currency", "commodity", or "index".
25
+ */
26
+ AssetClass: string
27
+
28
+ /**
29
+ * The oracle provider, such as Chainlink, Band, or DIA.
30
+ */
31
+ Provider: string
32
+
33
+ /**
34
+ * An array of up to 10 PriceData objects.
35
+ */
36
+ PriceDataSeries: PriceData[]
37
+
38
+ /**
39
+ * A bit-map of boolean flags. No flags are defined for the Oracle object
40
+ * type, so this value is always 0.
41
+ */
42
+ Flags: 0
43
+ }
@@ -75,4 +75,6 @@ export enum RippleStateFlags {
75
75
  lsfLowFreeze = 0x00400000,
76
76
  // True, high side has set freeze flag
77
77
  lsfHighFreeze = 0x00800000,
78
+ // True, trust line to AMM. Used by client apps to identify payments via AMM.
79
+ lsfAMMNode = 0x01000000,
78
80
  }
@@ -15,13 +15,14 @@ import FeeSettings, {
15
15
  FeeSettingsPostAmendmentFields,
16
16
  FEE_SETTINGS_ID,
17
17
  } from './FeeSettings'
18
- import Ledger from './Ledger'
18
+ import { Ledger, LedgerV1 } from './Ledger'
19
19
  import { LedgerEntry, LedgerEntryFilter } from './LedgerEntry'
20
20
  import LedgerHashes from './LedgerHashes'
21
21
  import NegativeUNL, { NEGATIVE_UNL_ID } from './NegativeUNL'
22
22
  import { NFTokenOffer } from './NFTokenOffer'
23
23
  import { NFToken, NFTokenPage } from './NFTokenPage'
24
24
  import Offer, { OfferFlags } from './Offer'
25
+ import Oracle from './Oracle'
25
26
  import PayChannel from './PayChannel'
26
27
  import RippleState, { RippleStateFlags } from './RippleState'
27
28
  import SignerList, { SignerListFlags } from './SignerList'
@@ -47,6 +48,7 @@ export {
47
48
  FeeSettingsPreAmendmentFields,
48
49
  FeeSettingsPostAmendmentFields,
49
50
  Ledger,
51
+ LedgerV1,
50
52
  LedgerEntryFilter,
51
53
  LedgerEntry,
52
54
  LedgerHashes,
@@ -58,6 +60,7 @@ export {
58
60
  NFToken,
59
61
  Offer,
60
62
  OfferFlags,
63
+ Oracle,
61
64
  PayChannel,
62
65
  RippleState,
63
66
  RippleStateFlags,