xrpl 2.9.1 → 2.11.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 (325) hide show
  1. package/build/xrpl-latest-min.js +1 -1
  2. package/build/xrpl-latest-min.js.map +1 -1
  3. package/build/xrpl-latest.js +2680 -481
  4. package/build/xrpl-latest.js.map +1 -1
  5. package/dist/npm/Wallet/walletFromSecretNumbers.d.ts +7 -0
  6. package/dist/npm/Wallet/walletFromSecretNumbers.d.ts.map +1 -0
  7. package/dist/npm/Wallet/walletFromSecretNumbers.js +27 -0
  8. package/dist/npm/Wallet/walletFromSecretNumbers.js.map +1 -0
  9. package/dist/npm/client/index.d.ts +2 -1
  10. package/dist/npm/client/index.d.ts.map +1 -1
  11. package/dist/npm/client/index.js.map +1 -1
  12. package/dist/npm/index.d.ts +1 -0
  13. package/dist/npm/index.d.ts.map +1 -1
  14. package/dist/npm/index.js +3 -1
  15. package/dist/npm/index.js.map +1 -1
  16. package/dist/npm/models/common/index.d.ts +5 -0
  17. package/dist/npm/models/common/index.d.ts.map +1 -1
  18. package/dist/npm/models/ledger/AMM.d.ts +27 -0
  19. package/dist/npm/models/ledger/AMM.d.ts.map +1 -0
  20. package/dist/npm/models/ledger/AMM.js +3 -0
  21. package/dist/npm/models/ledger/AMM.js.map +1 -0
  22. package/dist/npm/models/ledger/AccountRoot.d.ts +5 -1
  23. package/dist/npm/models/ledger/AccountRoot.d.ts.map +1 -1
  24. package/dist/npm/models/ledger/AccountRoot.js +2 -0
  25. package/dist/npm/models/ledger/AccountRoot.js.map +1 -1
  26. package/dist/npm/models/ledger/LedgerEntry.d.ts +2 -1
  27. package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
  28. package/dist/npm/models/methods/accountInfo.d.ts +1 -0
  29. package/dist/npm/models/methods/accountInfo.d.ts.map +1 -1
  30. package/dist/npm/models/methods/ammInfo.d.ts +39 -0
  31. package/dist/npm/models/methods/ammInfo.d.ts.map +1 -0
  32. package/dist/npm/models/methods/ammInfo.js +3 -0
  33. package/dist/npm/models/methods/ammInfo.js.map +1 -0
  34. package/dist/npm/models/methods/index.d.ts +4 -3
  35. package/dist/npm/models/methods/index.d.ts.map +1 -1
  36. package/dist/npm/models/methods/ledgerEntry.d.ts +10 -0
  37. package/dist/npm/models/methods/ledgerEntry.d.ts.map +1 -1
  38. package/dist/npm/models/transactions/AMMBid.d.ts +12 -0
  39. package/dist/npm/models/transactions/AMMBid.d.ts.map +1 -0
  40. package/dist/npm/models/transactions/AMMBid.js +56 -0
  41. package/dist/npm/models/transactions/AMMBid.js.map +1 -0
  42. package/dist/npm/models/transactions/AMMCreate.d.ts +11 -0
  43. package/dist/npm/models/transactions/AMMCreate.d.ts.map +1 -0
  44. package/dist/npm/models/transactions/AMMCreate.js +32 -0
  45. package/dist/npm/models/transactions/AMMCreate.js.map +1 -0
  46. package/dist/npm/models/transactions/AMMDelete.d.ts +9 -0
  47. package/dist/npm/models/transactions/AMMDelete.d.ts.map +1 -0
  48. package/dist/npm/models/transactions/AMMDelete.js +22 -0
  49. package/dist/npm/models/transactions/AMMDelete.js.map +1 -0
  50. package/dist/npm/models/transactions/AMMDeposit.d.ts +27 -0
  51. package/dist/npm/models/transactions/AMMDeposit.d.ts.map +1 -0
  52. package/dist/npm/models/transactions/AMMDeposit.js +51 -0
  53. package/dist/npm/models/transactions/AMMDeposit.js.map +1 -0
  54. package/dist/npm/models/transactions/AMMVote.d.ts +10 -0
  55. package/dist/npm/models/transactions/AMMVote.d.ts.map +1 -0
  56. package/dist/npm/models/transactions/AMMVote.js +32 -0
  57. package/dist/npm/models/transactions/AMMVote.js.map +1 -0
  58. package/dist/npm/models/transactions/AMMWithdraw.d.ts +31 -0
  59. package/dist/npm/models/transactions/AMMWithdraw.d.ts.map +1 -0
  60. package/dist/npm/models/transactions/AMMWithdraw.js +50 -0
  61. package/dist/npm/models/transactions/AMMWithdraw.js.map +1 -0
  62. package/dist/npm/models/transactions/accountSet.d.ts +2 -1
  63. package/dist/npm/models/transactions/accountSet.d.ts.map +1 -1
  64. package/dist/npm/models/transactions/accountSet.js +1 -0
  65. package/dist/npm/models/transactions/accountSet.js.map +1 -1
  66. package/dist/npm/models/transactions/clawback.d.ts +9 -0
  67. package/dist/npm/models/transactions/clawback.d.ts.map +1 -0
  68. package/dist/npm/models/transactions/clawback.js +19 -0
  69. package/dist/npm/models/transactions/clawback.js.map +1 -0
  70. package/dist/npm/models/transactions/common.d.ts +2 -1
  71. package/dist/npm/models/transactions/common.d.ts.map +1 -1
  72. package/dist/npm/models/transactions/common.js +12 -1
  73. package/dist/npm/models/transactions/common.js.map +1 -1
  74. package/dist/npm/models/transactions/index.d.ts +7 -0
  75. package/dist/npm/models/transactions/index.d.ts.map +1 -1
  76. package/dist/npm/models/transactions/index.js +5 -1
  77. package/dist/npm/models/transactions/index.js.map +1 -1
  78. package/dist/npm/models/transactions/transaction.d.ts +8 -1
  79. package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
  80. package/dist/npm/models/transactions/transaction.js +28 -0
  81. package/dist/npm/models/transactions/transaction.js.map +1 -1
  82. package/dist/npm/models/utils/flags.d.ts.map +1 -1
  83. package/dist/npm/models/utils/flags.js +17 -23
  84. package/dist/npm/models/utils/flags.js.map +1 -1
  85. package/dist/npm/models/utils/index.js +1 -1
  86. package/dist/npm/models/utils/index.js.map +1 -1
  87. package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -1
  88. package/dist/npm/src/Wallet/walletFromSecretNumbers.d.ts +7 -0
  89. package/dist/npm/src/Wallet/walletFromSecretNumbers.d.ts.map +1 -0
  90. package/dist/npm/src/Wallet/walletFromSecretNumbers.js +27 -0
  91. package/dist/npm/src/Wallet/walletFromSecretNumbers.js.map +1 -0
  92. package/dist/npm/src/client/index.d.ts +2 -1
  93. package/dist/npm/src/client/index.d.ts.map +1 -1
  94. package/dist/npm/src/client/index.js.map +1 -1
  95. package/dist/npm/src/index.d.ts +1 -0
  96. package/dist/npm/src/index.d.ts.map +1 -1
  97. package/dist/npm/src/index.js +3 -1
  98. package/dist/npm/src/index.js.map +1 -1
  99. package/dist/npm/src/models/common/index.d.ts +5 -0
  100. package/dist/npm/src/models/common/index.d.ts.map +1 -1
  101. package/dist/npm/src/models/ledger/AMM.d.ts +27 -0
  102. package/dist/npm/src/models/ledger/AMM.d.ts.map +1 -0
  103. package/dist/npm/src/models/ledger/AMM.js +3 -0
  104. package/dist/npm/src/models/ledger/AMM.js.map +1 -0
  105. package/dist/npm/src/models/ledger/AccountRoot.d.ts +5 -1
  106. package/dist/npm/src/models/ledger/AccountRoot.d.ts.map +1 -1
  107. package/dist/npm/src/models/ledger/AccountRoot.js +2 -0
  108. package/dist/npm/src/models/ledger/AccountRoot.js.map +1 -1
  109. package/dist/npm/src/models/ledger/LedgerEntry.d.ts +2 -1
  110. package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
  111. package/dist/npm/src/models/methods/accountInfo.d.ts +1 -0
  112. package/dist/npm/src/models/methods/accountInfo.d.ts.map +1 -1
  113. package/dist/npm/src/models/methods/ammInfo.d.ts +39 -0
  114. package/dist/npm/src/models/methods/ammInfo.d.ts.map +1 -0
  115. package/dist/npm/src/models/methods/ammInfo.js +3 -0
  116. package/dist/npm/src/models/methods/ammInfo.js.map +1 -0
  117. package/dist/npm/src/models/methods/index.d.ts +4 -3
  118. package/dist/npm/src/models/methods/index.d.ts.map +1 -1
  119. package/dist/npm/src/models/methods/ledgerEntry.d.ts +10 -0
  120. package/dist/npm/src/models/methods/ledgerEntry.d.ts.map +1 -1
  121. package/dist/npm/src/models/transactions/AMMBid.d.ts +12 -0
  122. package/dist/npm/src/models/transactions/AMMBid.d.ts.map +1 -0
  123. package/dist/npm/src/models/transactions/AMMBid.js +56 -0
  124. package/dist/npm/src/models/transactions/AMMBid.js.map +1 -0
  125. package/dist/npm/src/models/transactions/AMMCreate.d.ts +11 -0
  126. package/dist/npm/src/models/transactions/AMMCreate.d.ts.map +1 -0
  127. package/dist/npm/src/models/transactions/AMMCreate.js +32 -0
  128. package/dist/npm/src/models/transactions/AMMCreate.js.map +1 -0
  129. package/dist/npm/src/models/transactions/AMMDelete.d.ts +9 -0
  130. package/dist/npm/src/models/transactions/AMMDelete.d.ts.map +1 -0
  131. package/dist/npm/src/models/transactions/AMMDelete.js +22 -0
  132. package/dist/npm/src/models/transactions/AMMDelete.js.map +1 -0
  133. package/dist/npm/src/models/transactions/AMMDeposit.d.ts +27 -0
  134. package/dist/npm/src/models/transactions/AMMDeposit.d.ts.map +1 -0
  135. package/dist/npm/src/models/transactions/AMMDeposit.js +51 -0
  136. package/dist/npm/src/models/transactions/AMMDeposit.js.map +1 -0
  137. package/dist/npm/src/models/transactions/AMMVote.d.ts +10 -0
  138. package/dist/npm/src/models/transactions/AMMVote.d.ts.map +1 -0
  139. package/dist/npm/src/models/transactions/AMMVote.js +32 -0
  140. package/dist/npm/src/models/transactions/AMMVote.js.map +1 -0
  141. package/dist/npm/src/models/transactions/AMMWithdraw.d.ts +31 -0
  142. package/dist/npm/src/models/transactions/AMMWithdraw.d.ts.map +1 -0
  143. package/dist/npm/src/models/transactions/AMMWithdraw.js +50 -0
  144. package/dist/npm/src/models/transactions/AMMWithdraw.js.map +1 -0
  145. package/dist/npm/src/models/transactions/accountSet.d.ts +2 -1
  146. package/dist/npm/src/models/transactions/accountSet.d.ts.map +1 -1
  147. package/dist/npm/src/models/transactions/accountSet.js +1 -0
  148. package/dist/npm/src/models/transactions/accountSet.js.map +1 -1
  149. package/dist/npm/src/models/transactions/clawback.d.ts +9 -0
  150. package/dist/npm/src/models/transactions/clawback.d.ts.map +1 -0
  151. package/dist/npm/src/models/transactions/clawback.js +19 -0
  152. package/dist/npm/src/models/transactions/clawback.js.map +1 -0
  153. package/dist/npm/src/models/transactions/common.d.ts +2 -1
  154. package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
  155. package/dist/npm/src/models/transactions/common.js +12 -1
  156. package/dist/npm/src/models/transactions/common.js.map +1 -1
  157. package/dist/npm/src/models/transactions/index.d.ts +7 -0
  158. package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
  159. package/dist/npm/src/models/transactions/index.js +5 -1
  160. package/dist/npm/src/models/transactions/index.js.map +1 -1
  161. package/dist/npm/src/models/transactions/transaction.d.ts +8 -1
  162. package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
  163. package/dist/npm/src/models/transactions/transaction.js +28 -0
  164. package/dist/npm/src/models/transactions/transaction.js.map +1 -1
  165. package/dist/npm/src/models/utils/flags.d.ts.map +1 -1
  166. package/dist/npm/src/models/utils/flags.js +17 -23
  167. package/dist/npm/src/models/utils/flags.js.map +1 -1
  168. package/dist/npm/src/models/utils/index.js +1 -1
  169. package/dist/npm/src/models/utils/index.js.map +1 -1
  170. package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
  171. package/dist/npm/src/sugar/autofill.js +4 -3
  172. package/dist/npm/src/sugar/autofill.js.map +1 -1
  173. package/dist/npm/sugar/autofill.d.ts.map +1 -1
  174. package/dist/npm/sugar/autofill.js +4 -3
  175. package/dist/npm/sugar/autofill.js.map +1 -1
  176. package/package.json +8 -6
  177. package/src/ECDSA.ts +6 -0
  178. package/src/Wallet/defaultFaucets.ts +82 -0
  179. package/src/Wallet/fundWallet.ts +344 -0
  180. package/src/Wallet/index.ts +504 -0
  181. package/src/Wallet/rfc1751.ts +190 -0
  182. package/src/Wallet/rfc1751Words.json +243 -0
  183. package/src/Wallet/signer.ts +173 -0
  184. package/src/Wallet/walletFromSecretNumbers.ts +37 -0
  185. package/src/client/BroadcastClient.ts +84 -0
  186. package/src/client/ConnectionManager.ts +40 -0
  187. package/src/client/ExponentialBackoff.ts +71 -0
  188. package/src/client/RequestManager.ts +194 -0
  189. package/src/client/WSWrapper.ts +106 -0
  190. package/src/client/connection.ts +593 -0
  191. package/src/client/index.ts +712 -0
  192. package/src/client/partialPayment.ts +153 -0
  193. package/src/errors.ts +161 -0
  194. package/src/index.ts +20 -0
  195. package/src/models/common/index.ts +149 -0
  196. package/src/models/index.ts +16 -0
  197. package/src/models/ledger/AMM.ts +78 -0
  198. package/src/models/ledger/AccountRoot.ts +217 -0
  199. package/src/models/ledger/Amendments.ts +45 -0
  200. package/src/models/ledger/BaseLedgerEntry.ts +3 -0
  201. package/src/models/ledger/Check.ts +70 -0
  202. package/src/models/ledger/DepositPreauth.ts +35 -0
  203. package/src/models/ledger/DirectoryNode.ts +46 -0
  204. package/src/models/ledger/Escrow.ts +74 -0
  205. package/src/models/ledger/FeeSettings.ts +52 -0
  206. package/src/models/ledger/Ledger.ts +65 -0
  207. package/src/models/ledger/LedgerEntry.ts +34 -0
  208. package/src/models/ledger/LedgerHashes.ts +24 -0
  209. package/src/models/ledger/NFTokenOffer.ts +16 -0
  210. package/src/models/ledger/NFTokenPage.ts +20 -0
  211. package/src/models/ledger/NegativeUNL.ts +34 -0
  212. package/src/models/ledger/Offer.ts +52 -0
  213. package/src/models/ledger/PayChannel.ts +107 -0
  214. package/src/models/ledger/RippleState.ts +88 -0
  215. package/src/models/ledger/SignerList.ts +56 -0
  216. package/src/models/ledger/Ticket.ts +36 -0
  217. package/src/models/ledger/index.ts +58 -0
  218. package/src/models/methods/accountChannels.ts +93 -0
  219. package/src/models/methods/accountCurrencies.ts +45 -0
  220. package/src/models/methods/accountInfo.ts +182 -0
  221. package/src/models/methods/accountLines.ts +137 -0
  222. package/src/models/methods/accountNFTs.ts +72 -0
  223. package/src/models/methods/accountObjects.ts +120 -0
  224. package/src/models/methods/accountOffers.ts +100 -0
  225. package/src/models/methods/accountTx.ts +109 -0
  226. package/src/models/methods/ammInfo.ts +145 -0
  227. package/src/models/methods/baseMethod.ts +58 -0
  228. package/src/models/methods/bookOffers.ts +96 -0
  229. package/src/models/methods/channelVerify.ts +41 -0
  230. package/src/models/methods/depositAuthorized.ts +56 -0
  231. package/src/models/methods/fee.ts +91 -0
  232. package/src/models/methods/gatewayBalances.ts +85 -0
  233. package/src/models/methods/index.ts +391 -0
  234. package/src/models/methods/ledger.ts +125 -0
  235. package/src/models/methods/ledgerClosed.ts +32 -0
  236. package/src/models/methods/ledgerCurrent.ts +31 -0
  237. package/src/models/methods/ledgerData.ts +78 -0
  238. package/src/models/methods/ledgerEntry.ts +177 -0
  239. package/src/models/methods/manifest.ts +54 -0
  240. package/src/models/methods/nftBuyOffers.ts +37 -0
  241. package/src/models/methods/nftHistory.ts +113 -0
  242. package/src/models/methods/nftInfo.ts +25 -0
  243. package/src/models/methods/nftSellOffers.ts +37 -0
  244. package/src/models/methods/norippleCheck.ts +82 -0
  245. package/src/models/methods/pathFind.ts +116 -0
  246. package/src/models/methods/ping.ts +21 -0
  247. package/src/models/methods/random.ts +23 -0
  248. package/src/models/methods/ripplePathFind.ts +81 -0
  249. package/src/models/methods/serverInfo.ts +257 -0
  250. package/src/models/methods/serverState.ts +77 -0
  251. package/src/models/methods/submit.ts +94 -0
  252. package/src/models/methods/submitMultisigned.ts +51 -0
  253. package/src/models/methods/subscribe.ts +435 -0
  254. package/src/models/methods/transactionEntry.ts +47 -0
  255. package/src/models/methods/tx.ts +69 -0
  256. package/src/models/methods/unsubscribe.ts +49 -0
  257. package/src/models/transactions/AMMBid.ts +140 -0
  258. package/src/models/transactions/AMMCreate.ts +80 -0
  259. package/src/models/transactions/AMMDelete.ts +55 -0
  260. package/src/models/transactions/AMMDeposit.ts +130 -0
  261. package/src/models/transactions/AMMVote.ts +71 -0
  262. package/src/models/transactions/AMMWithdraw.ts +126 -0
  263. package/src/models/transactions/NFTokenAcceptOffer.ts +104 -0
  264. package/src/models/transactions/NFTokenBurn.ts +48 -0
  265. package/src/models/transactions/NFTokenCancelOffer.ts +45 -0
  266. package/src/models/transactions/NFTokenCreateOffer.ts +145 -0
  267. package/src/models/transactions/NFTokenMint.ts +123 -0
  268. package/src/models/transactions/UNLModify.ts +20 -0
  269. package/src/models/transactions/accountDelete.ts +50 -0
  270. package/src/models/transactions/accountSet.ts +228 -0
  271. package/src/models/transactions/checkCancel.ts +34 -0
  272. package/src/models/transactions/checkCash.ts +73 -0
  273. package/src/models/transactions/checkCreate.ts +90 -0
  274. package/src/models/transactions/clawback.ts +49 -0
  275. package/src/models/transactions/common.ts +295 -0
  276. package/src/models/transactions/depositPreauth.ts +68 -0
  277. package/src/models/transactions/enableAmendment.ts +26 -0
  278. package/src/models/transactions/escrowCancel.ts +45 -0
  279. package/src/models/transactions/escrowCreate.ts +100 -0
  280. package/src/models/transactions/escrowFinish.ts +63 -0
  281. package/src/models/transactions/index.ts +66 -0
  282. package/src/models/transactions/metadata.ts +69 -0
  283. package/src/models/transactions/offerCancel.ts +37 -0
  284. package/src/models/transactions/offerCreate.ts +144 -0
  285. package/src/models/transactions/payment.ts +278 -0
  286. package/src/models/transactions/paymentChannelClaim.ts +165 -0
  287. package/src/models/transactions/paymentChannelCreate.ts +116 -0
  288. package/src/models/transactions/paymentChannelFund.ts +65 -0
  289. package/src/models/transactions/setFee.ts +48 -0
  290. package/src/models/transactions/setRegularKey.ts +33 -0
  291. package/src/models/transactions/signerListSet.ts +89 -0
  292. package/src/models/transactions/ticketCreate.ts +50 -0
  293. package/src/models/transactions/transaction.ts +303 -0
  294. package/src/models/transactions/trustSet.ts +146 -0
  295. package/src/models/utils/flags.ts +98 -0
  296. package/src/models/utils/index.ts +37 -0
  297. package/src/sugar/autofill.ts +373 -0
  298. package/src/sugar/balances.ts +123 -0
  299. package/src/sugar/getFeeXrp.ts +45 -0
  300. package/src/sugar/getLedgerIndex.ts +15 -0
  301. package/src/sugar/getOrderbook.ts +152 -0
  302. package/src/sugar/index.ts +11 -0
  303. package/src/sugar/submit.ts +305 -0
  304. package/src/sugar/utils.ts +29 -0
  305. package/src/utils/derive.ts +23 -0
  306. package/src/utils/getBalanceChanges.ts +186 -0
  307. package/src/utils/getNFTokenID.ts +97 -0
  308. package/src/utils/hashes/HashPrefix.ts +40 -0
  309. package/src/utils/hashes/README.md +65 -0
  310. package/src/utils/hashes/SHAMap/InnerNode.ts +124 -0
  311. package/src/utils/hashes/SHAMap/LeafNode.ts +69 -0
  312. package/src/utils/hashes/SHAMap/index.ts +41 -0
  313. package/src/utils/hashes/SHAMap/node.ts +14 -0
  314. package/src/utils/hashes/hashLedger.ts +236 -0
  315. package/src/utils/hashes/index.ts +187 -0
  316. package/src/utils/hashes/ledgerSpaces.ts +34 -0
  317. package/src/utils/hashes/sha512Half.ts +19 -0
  318. package/src/utils/index.ts +223 -0
  319. package/src/utils/parseNFTokenID.ts +84 -0
  320. package/src/utils/quality.ts +169 -0
  321. package/src/utils/signPaymentChannelClaim.ts +27 -0
  322. package/src/utils/stringConversion.ts +27 -0
  323. package/src/utils/timeConversion.ts +53 -0
  324. package/src/utils/verifyPaymentChannelClaim.ts +30 -0
  325. package/src/utils/xrpConversion.ts +104 -0
@@ -0,0 +1,182 @@
1
+ import { AccountRoot, SignerList } from '../ledger'
2
+
3
+ import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
4
+
5
+ /**
6
+ * The `account_info` command retrieves information about an account, its
7
+ * activity, and its XRP balance. All information retrieved is relative to a
8
+ * particular version of the ledger. Returns an {@link AccountInfoResponse}.
9
+ *
10
+ * @category Requests
11
+ */
12
+ export interface AccountInfoRequest extends BaseRequest, LookupByLedgerRequest {
13
+ command: 'account_info'
14
+ /** A unique identifier for the account, most commonly the account's address. */
15
+ account: string
16
+ /**
17
+ * Whether to get info about this account's queued transactions. Can only be
18
+ * used when querying for the data from the current open ledger. Not available
19
+ * from servers in Reporting Mode.
20
+ */
21
+ queue?: boolean
22
+ /**
23
+ * Request SignerList objects associated with this account.
24
+ */
25
+ signer_lists?: boolean
26
+ /**
27
+ * If true, then the account field only accepts a public key or XRP Ledger
28
+ * address. Otherwise, account can be a secret or passphrase (not
29
+ * recommended). The default is false.
30
+ */
31
+ strict?: boolean
32
+ }
33
+
34
+ export interface AccountQueueTransaction {
35
+ /**
36
+ * Whether this transaction changes this address's ways of authorizing
37
+ * transactions.
38
+ */
39
+ auth_change: boolean
40
+ /** The Transaction Cost of this transaction, in drops of XRP. */
41
+ fee: string
42
+ /**
43
+ * The transaction cost of this transaction, relative to the minimum cost for
44
+ * this type of transaction, in fee levels.
45
+ */
46
+ fee_level: string
47
+ /** The maximum amount of XRP, in drops, this transaction could send or destroy. */
48
+ max_spend_drops: string
49
+ /** The Sequence Number of this transaction. */
50
+ seq: number
51
+ }
52
+
53
+ export interface AccountQueueData {
54
+ /** Number of queued transactions from this address. */
55
+ txn_count: number
56
+ /**
57
+ * Whether a transaction in the queue changes this address's ways of
58
+ * authorizing transactions. If true, this address can queue no further
59
+ * transactions until that transaction has been executed or dropped from the
60
+ * queue.
61
+ */
62
+ auth_change_queued?: boolean
63
+ /** The lowest Sequence Number among transactions queued by this address. */
64
+ lowest_sequence?: number
65
+ /** The highest Sequence Number among transactions queued by this address. */
66
+ highest_sequence?: number
67
+ /**
68
+ * Integer amount of drops of XRP that could be debited from this address if
69
+ * every transaction in the queue consumes the maximum amount of XRP possible.
70
+ */
71
+ max_spend_drops_total?: string
72
+ /** Information about each queued transaction from this address. */
73
+ transactions?: AccountQueueTransaction[]
74
+ }
75
+
76
+ export interface AccountInfoAccountFlags {
77
+ /**
78
+ * Enable rippling on this address's trust lines by default. Required for issuing addresses; discouraged for others.
79
+ */
80
+ defaultRipple: boolean
81
+ /**
82
+ * This account can only receive funds from transactions it sends, and from preauthorized accounts.
83
+ * (It has DepositAuth enabled.)
84
+ */
85
+ depositAuth: boolean
86
+ /**
87
+ * Disallows use of the master key to sign transactions for this account.
88
+ */
89
+ disableMasterKey: boolean
90
+ /**
91
+ * Disallow incoming Checks from other accounts.
92
+ */
93
+ disallowIncomingCheck?: boolean
94
+ /**
95
+ * Disallow incoming NFTOffers from other accounts. Part of the DisallowIncoming amendment.
96
+ */
97
+ disallowIncomingNFTokenOffer?: boolean
98
+ /**
99
+ * Disallow incoming PayChannels from other accounts. Part of the DisallowIncoming amendment.
100
+ */
101
+ disallowIncomingPayChan?: boolean
102
+ /**
103
+ * Disallow incoming Trustlines from other accounts. Part of the DisallowIncoming amendment.
104
+ */
105
+ disallowIncomingTrustline?: boolean
106
+ /**
107
+ * Client applications should not send XRP to this account. Not enforced by rippled.
108
+ */
109
+ disallowIncomingXRP: boolean
110
+ /**
111
+ * All assets issued by this address are frozen.
112
+ */
113
+ globalFreeze: boolean
114
+ /**
115
+ * This address cannot freeze trust lines connected to it. Once enabled, cannot be disabled.
116
+ */
117
+ noFreeze: boolean
118
+ /**
119
+ * The account has used its free SetRegularKey transaction.
120
+ */
121
+ passwordSpent: boolean
122
+ /**
123
+ * This account must individually approve other users for those users to hold this account's issued currencies.
124
+ */
125
+ requireAuthorization: boolean
126
+ /**
127
+ * Requires incoming payments to specify a Destination Tag.
128
+ */
129
+ requireDestinationTag: boolean
130
+ /**
131
+ * This address can claw back issued IOUs. Once enabled, cannot be disabled.
132
+ */
133
+ allowTrustLineClawback: boolean
134
+ }
135
+
136
+ /**
137
+ * Response expected from an {@link AccountInfoRequest}.
138
+ *
139
+ * @category Responses
140
+ */
141
+ export interface AccountInfoResponse extends BaseResponse {
142
+ result: {
143
+ /**
144
+ * The AccountRoot ledger object with this account's information, as stored
145
+ * in the ledger.
146
+ * If requested, also includes Array of SignerList ledger objects
147
+ * associated with this account for Multi-Signing. Since an account can own
148
+ * at most one SignerList, this array must have exactly one member if it is
149
+ * present.
150
+ */
151
+ account_data: AccountRoot & { signer_lists?: SignerList[] }
152
+
153
+ /**
154
+ * A map of account flags parsed out. This will only be available for rippled nodes 1.11.0 and higher.
155
+ */
156
+ account_flags?: AccountInfoAccountFlags
157
+ /**
158
+ * The ledger index of the current in-progress ledger, which was used when
159
+ * retrieving this information.
160
+ */
161
+ ledger_current_index?: number
162
+ /**
163
+ * The ledger index of the ledger version used when retrieving this
164
+ * information. The information does not contain any changes from ledger
165
+ * versions newer than this one.
166
+ */
167
+ ledger_index?: number
168
+ /**
169
+ * Information about queued transactions sent by this account. This
170
+ * information describes the state of the local rippled server, which may be
171
+ * different from other servers in the peer-to-peer XRP Ledger network. Some
172
+ * fields may be omitted because the values are calculated "lazily" by the
173
+ * queuing mechanism.
174
+ */
175
+ queue_data?: AccountQueueData
176
+ /**
177
+ * True if this data is from a validated ledger version; if omitted or set
178
+ * to false, this data is not final.
179
+ */
180
+ validated?: boolean
181
+ }
182
+ }
@@ -0,0 +1,137 @@
1
+ import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
2
+
3
+ export interface AccountLinesTrustline {
4
+ /** The unique Address of the counterparty to this trust line. */
5
+ account: string
6
+ /**
7
+ * Representation of the numeric balance currently held against this line. A
8
+ * positive balance means that the perspective account holds value; a negative
9
+ * Balance means that the perspective account owes value.
10
+ */
11
+ balance: string
12
+ /** A Currency Code identifying what currency this trust line can hold. */
13
+ currency: string
14
+ /**
15
+ * The maximum amount of the given currency that this account is willing to
16
+ * owe the peer account.
17
+ */
18
+ limit: string
19
+ /**
20
+ * The maximum amount of currency that the issuer account is willing to owe
21
+ * the perspective account.
22
+ */
23
+ limit_peer: string
24
+ /**
25
+ * Rate at which the account values incoming balances on this trust line, as
26
+ * a ratio of this value per 1 billion units. (For example, a value of 500
27
+ * million represents a 0.5:1 ratio.) As a special case, 0 is treated as a
28
+ * 1:1 ratio.
29
+ */
30
+ quality_in: number
31
+ /**
32
+ * Rate at which the account values outgoing balances on this trust line, as
33
+ * a ratio of this value per 1 billion units. (For example, a value of 500
34
+ * million represents a 0.5:1 ratio.) As a special case, 0 is treated as a 1:1
35
+ * ratio.
36
+ */
37
+ quality_out: number
38
+ /**
39
+ * If true, this account has enabled the No Ripple flag for this trust line.
40
+ * If present and false, this account has disabled the No Ripple flag, but,
41
+ * because the account also has the Default Ripple flag enabled, that is not
42
+ * considered the default state. If omitted, the account has the No Ripple
43
+ * flag disabled for this trust line and Default Ripple disabled.
44
+ */
45
+ no_ripple?: boolean
46
+ /**
47
+ * If true, the peer account has enabled the No Ripple flag for this trust
48
+ * line. If present and false, this account has disabled the No Ripple flag,
49
+ * but, because the account also has the Default Ripple flag enabled, that is
50
+ * not considered the default state. If omitted, the account has the No Ripple
51
+ * flag disabled for this trust line and Default Ripple disabled.
52
+ */
53
+ no_ripple_peer?: boolean
54
+ /** If true, this account has authorized this trust line. The default is false. */
55
+ authorized?: boolean
56
+ /** If true, the peer account has authorized this trust line. The default is false. */
57
+ peer_authorized?: boolean
58
+ /** If true, this account has frozen this trust line. The default is false. */
59
+ freeze?: boolean
60
+ /**
61
+ * If true, the peer account has frozen this trust line. The default is
62
+ * false.
63
+ */
64
+ freeze_peer?: boolean
65
+ }
66
+
67
+ /**
68
+ * The account_lines method returns information about an account's trust lines,
69
+ * including balances in all non-XRP currencies and assets. All information
70
+ * retrieved is relative to a particular version of the ledger. Expects an
71
+ * {@link AccountLinesResponse}.
72
+ *
73
+ * @category Requests
74
+ */
75
+ export interface AccountLinesRequest
76
+ extends BaseRequest,
77
+ LookupByLedgerRequest {
78
+ command: 'account_lines'
79
+ /** A unique identifier for the account, most commonly the account's Address. */
80
+ account: string
81
+ /**
82
+ * The Address of a second account. If provided, show only lines of trust
83
+ * connecting the two accounts.
84
+ */
85
+ peer?: string
86
+ /**
87
+ * Limit the number of trust lines to retrieve. The server is not required to
88
+ * honor this value. Must be within the inclusive range 10 to 400.
89
+ */
90
+ limit?: number
91
+ /**
92
+ * Value from a previous paginated response. Resume retrieving data where
93
+ * that response left off.
94
+ */
95
+ marker?: unknown
96
+ }
97
+
98
+ /**
99
+ * Response expected from an {@link AccountLinesRequest}.
100
+ *
101
+ * @category Responses
102
+ */
103
+ export interface AccountLinesResponse extends BaseResponse {
104
+ result: {
105
+ /**
106
+ * Unique Address of the account this request corresponds to. This is the
107
+ * "perspective account" for purpose of the trust lines.
108
+ */
109
+ account: string
110
+ /**
111
+ * Array of trust line objects. If the number of trust lines is large, only
112
+ * returns up to the limit at a time.
113
+ */
114
+ lines: AccountLinesTrustline[]
115
+ /**
116
+ * The ledger index of the current open ledger, which was used when
117
+ * retrieving this information.
118
+ */
119
+ ledger_current_index?: number
120
+ /**
121
+ * The ledger index of the ledger version that was used when retrieving
122
+ * this data.
123
+ */
124
+ ledger_index?: number
125
+ /**
126
+ * The identifying hash the ledger version that was used when retrieving
127
+ * this data.
128
+ */
129
+ ledger_hash?: string
130
+ /**
131
+ * Server-defined value indicating the response is paginated. Pass this to
132
+ * the next call to resume where this call left off. Omitted when there are
133
+ * No additional pages after this one.
134
+ */
135
+ marker?: unknown
136
+ }
137
+ }
@@ -0,0 +1,72 @@
1
+ import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
2
+
3
+ /**
4
+ * The `account_nfts` method retrieves all of the NFTs currently owned by the
5
+ * specified account.
6
+ *
7
+ * @category Requests
8
+ */
9
+ export interface AccountNFTsRequest extends BaseRequest, LookupByLedgerRequest {
10
+ command: 'account_nfts'
11
+ /**
12
+ * The unique identifier of an account, typically the account's address. The
13
+ * request returns NFTs owned by this account.
14
+ */
15
+ account: string
16
+ /**
17
+ * Limit the number of NFTokens to retrieve.
18
+ */
19
+ limit?: number
20
+ /**
21
+ * Value from a previous paginated response. Resume retrieving data where
22
+ * that response left off.
23
+ */
24
+ marker?: unknown
25
+ }
26
+
27
+ /**
28
+ * One NFToken that might be returned from an {@link AccountNFTsRequest}.
29
+ *
30
+ * @category Responses
31
+ */
32
+ export interface AccountNFToken {
33
+ Flags: number
34
+ Issuer: string
35
+ NFTokenID: string
36
+ NFTokenTaxon: number
37
+ URI?: string
38
+ nft_serial: number
39
+ }
40
+
41
+ /**
42
+ * Response expected from an {@link AccountNFTsRequest}.
43
+ *
44
+ * @category Responses
45
+ */
46
+ export interface AccountNFTsResponse extends BaseResponse {
47
+ result: {
48
+ /**
49
+ * The account requested.
50
+ */
51
+ account: string
52
+ /**
53
+ * A list of NFTs owned by the specified account.
54
+ */
55
+ account_nfts: AccountNFToken[]
56
+ /**
57
+ * The ledger index of the current open ledger, which was used when
58
+ * retrieving this information.
59
+ */
60
+ ledger_current_index: number
61
+ /** If true, this data comes from a validated ledger. */
62
+ validated: boolean
63
+ /**
64
+ * Server-defined value indicating the response is paginated. Pass this to
65
+ * the next call to resume where this call left off. Omitted when there are
66
+ * No additional pages after this one.
67
+ */
68
+ marker?: unknown
69
+ /** The limit that was used to fulfill this request. */
70
+ limit?: number
71
+ }
72
+ }
@@ -0,0 +1,120 @@
1
+ import {
2
+ Check,
3
+ DepositPreauth,
4
+ Escrow,
5
+ Offer,
6
+ PayChannel,
7
+ RippleState,
8
+ SignerList,
9
+ Ticket,
10
+ } from '../ledger'
11
+
12
+ import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
13
+
14
+ export type AccountObjectType =
15
+ | 'check'
16
+ | 'deposit_preauth'
17
+ | 'escrow'
18
+ | 'nft_offer'
19
+ | 'offer'
20
+ | 'payment_channel'
21
+ | 'signer_list'
22
+ | 'state'
23
+ | 'ticket'
24
+
25
+ /**
26
+ * The account_objects command returns the raw ledger format for all objects
27
+ * owned by an account. For a higher-level view of an account's trust lines and
28
+ * balances, see the account_lines method instead. Expects a response in the
29
+ * form of an {@link AccountObjectsResponse}.
30
+ *
31
+ * @category Requests
32
+ */
33
+ export interface AccountObjectsRequest
34
+ extends BaseRequest,
35
+ LookupByLedgerRequest {
36
+ command: 'account_objects'
37
+ /** A unique identifier for the account, most commonly the account's address. */
38
+ account: string
39
+ /**
40
+ * If included, filter results to include only this type of ledger object.
41
+ * The valid types are: Check , DepositPreauth, Escrow, Offer, PayChannel,
42
+ * SignerList, Ticket, and RippleState (trust line).
43
+ */
44
+ type?: AccountObjectType
45
+ /**
46
+ * If true, the response only includes objects that would block this account
47
+ * from being deleted. The default is false.
48
+ */
49
+ deletion_blockers_only?: boolean
50
+ /**
51
+ * The maximum number of objects to include in the results. Must be within
52
+ * the inclusive range 10 to 400 on non-admin connections. The default is 200.
53
+ */
54
+ limit?: number
55
+ /**
56
+ * Value from a previous paginated response. Resume retrieving data where
57
+ * that response left off.
58
+ */
59
+ marker?: unknown
60
+ }
61
+
62
+ /**
63
+ * Account Objects can be a Check, a DepositPreauth, an Escrow, an Offer, a
64
+ * PayChannel, a SignerList, a Ticket, or a RippleState.
65
+ */
66
+ export type AccountObject =
67
+ | Check
68
+ | DepositPreauth
69
+ | Escrow
70
+ | Offer
71
+ | PayChannel
72
+ | SignerList
73
+ | RippleState
74
+ | Ticket
75
+
76
+ /**
77
+ * Response expected from an {@link AccountObjectsRequest}.
78
+ *
79
+ * @category Responses
80
+ */
81
+ export interface AccountObjectsResponse extends BaseResponse {
82
+ result: {
83
+ /** Unique Address of the account this request corresponds to. */
84
+ account: string
85
+ /**
86
+ * Array of objects owned by this account. Each object is in its raw
87
+ * ledger format.
88
+ */
89
+ account_objects: AccountObject[]
90
+ /**
91
+ * The identifying hash of the ledger that was used to generate this
92
+ * response.
93
+ */
94
+ ledger_hash?: string
95
+ /**
96
+ * The ledger index of the ledger version that was used to generate this
97
+ * response.
98
+ */
99
+ ledger_index?: number
100
+ /**
101
+ * The ledger index of the current in-progress ledger version, which was
102
+ * used to generate this response.
103
+ */
104
+ ledger_current_index?: number
105
+ /** The limit that was used in this request, if any. */
106
+ limit?: number
107
+ /**
108
+ * Server-defined value indicating the response is paginated. Pass this to
109
+ * the next call to resume where this call left off. Omitted when there are
110
+ * no additional pages after this one.
111
+ */
112
+ marker?: string
113
+ /**
114
+ * If included and set to true, the information in this response comes from
115
+ * a validated ledger version. Otherwise, the information is subject to
116
+ * change.
117
+ */
118
+ validated?: boolean
119
+ }
120
+ }
@@ -0,0 +1,100 @@
1
+ import { Amount } from '../common'
2
+
3
+ import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
4
+
5
+ /**
6
+ * The account_offers method retrieves a list of offers made by a given account
7
+ * that are outstanding as of a particular ledger version. Expects a response in
8
+ * the form of a {@link AccountOffersResponse}.
9
+ *
10
+ * @category Requests
11
+ */
12
+ export interface AccountOffersRequest
13
+ extends BaseRequest,
14
+ LookupByLedgerRequest {
15
+ command: 'account_offers'
16
+ /** A unique identifier for the account, most commonly the account's Address. */
17
+ account: string
18
+ /**
19
+ * Limit the number of transactions to retrieve. The server is not required
20
+ * to honor this value. Must be within the inclusive range 10 to 400.
21
+ */
22
+ limit?: number
23
+ /**
24
+ * Value from a previous paginated response. Resume retrieving data where
25
+ * that response left off.
26
+ */
27
+ marker?: unknown
28
+ /**
29
+ * If true, then the account field only accepts a public key or XRP Ledger
30
+ * address. Otherwise, account can be a secret or passphrase (not
31
+ * recommended). The default is false.
32
+ */
33
+ strict?: boolean
34
+ }
35
+
36
+ export interface AccountOffer {
37
+ /** Options set for this offer entry as bit-flags. */
38
+ flags: number
39
+ /** Sequence number of the transaction that created this entry. */
40
+ seq: number
41
+ /**
42
+ * The amount the account placing this Offer receives.
43
+ */
44
+ taker_gets: Amount
45
+ /**
46
+ * The amount the account placing this Offer pays.
47
+ */
48
+ taker_pays: Amount
49
+ /**
50
+ * The exchange rate of the Offer, as the ratio of the original taker_pays
51
+ * divided by the original taker_gets. When executing offers, the offer with
52
+ * the most favorable (lowest) quality is consumed first; offers with the same
53
+ * quality are executed from oldest to newest.
54
+ */
55
+ quality: string
56
+ /**
57
+ * A time after which this offer is considered unfunded, as the number of
58
+ * seconds since the Ripple Epoch. See also: Offer Expiration.
59
+ */
60
+ expiration?: number
61
+ }
62
+
63
+ /**
64
+ * Response expected from an {@link AccountOffersRequest}.
65
+ *
66
+ * @category Responses
67
+ */
68
+ export interface AccountOffersResponse extends BaseResponse {
69
+ result: {
70
+ /** Unique Address identifying the account that made the offers. */
71
+ account: string
72
+ /**
73
+ * Array of objects, where each object represents an offer made by this
74
+ * account that is outstanding as of the requested ledger version. If the
75
+ * number of offers is large, only returns up to limit at a time.
76
+ */
77
+ offers?: AccountOffer[]
78
+ /**
79
+ * The ledger index of the current in-progress ledger version, which was
80
+ * used when retrieving this data.
81
+ */
82
+ ledger_current_index?: number
83
+ /**
84
+ * The ledger index of the ledger version that was used when retrieving
85
+ * this data, as requested.
86
+ */
87
+ ledger_index?: number
88
+ /**
89
+ * The identifying hash of the ledger version that was used when retrieving
90
+ * this data.
91
+ */
92
+ ledger_hash?: string
93
+ /**
94
+ * Server-defined value indicating the response is paginated. Pass this to
95
+ * the next call to resume where this call left off. Omitted when there are
96
+ * no pages of information after this one.
97
+ */
98
+ marker?: unknown
99
+ }
100
+ }