xrpl 4.0.1-mpt-beta → 4.2.0-batch.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 (479) hide show
  1. package/README.md +1 -1
  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 +2986 -824
  5. package/build/xrpl-latest.js.map +1 -1
  6. package/dist/npm/Wallet/batchSigner.d.ts +8 -0
  7. package/dist/npm/Wallet/batchSigner.d.ts.map +1 -0
  8. package/dist/npm/Wallet/batchSigner.js +124 -0
  9. package/dist/npm/Wallet/batchSigner.js.map +1 -0
  10. package/dist/npm/Wallet/defaultFaucets.d.ts +2 -1
  11. package/dist/npm/Wallet/defaultFaucets.d.ts.map +1 -1
  12. package/dist/npm/Wallet/defaultFaucets.js +5 -0
  13. package/dist/npm/Wallet/defaultFaucets.js.map +1 -1
  14. package/dist/npm/Wallet/index.d.ts.map +1 -1
  15. package/dist/npm/Wallet/index.js +8 -2
  16. package/dist/npm/Wallet/index.js.map +1 -1
  17. package/dist/npm/client/RequestManager.d.ts.map +1 -1
  18. package/dist/npm/client/RequestManager.js +3 -3
  19. package/dist/npm/client/RequestManager.js.map +1 -1
  20. package/dist/npm/client/connection.d.ts.map +1 -1
  21. package/dist/npm/client/connection.js.map +1 -1
  22. package/dist/npm/client/index.d.ts +4 -0
  23. package/dist/npm/client/index.d.ts.map +1 -1
  24. package/dist/npm/client/index.js +16 -9
  25. package/dist/npm/client/index.js.map +1 -1
  26. package/dist/npm/client/partialPayment.d.ts +2 -2
  27. package/dist/npm/client/partialPayment.d.ts.map +1 -1
  28. package/dist/npm/client/partialPayment.js +4 -5
  29. package/dist/npm/client/partialPayment.js.map +1 -1
  30. package/dist/npm/models/common/index.d.ts +6 -0
  31. package/dist/npm/models/common/index.d.ts.map +1 -1
  32. package/dist/npm/models/index.d.ts +1 -1
  33. package/dist/npm/models/index.d.ts.map +1 -1
  34. package/dist/npm/models/index.js +3 -2
  35. package/dist/npm/models/index.js.map +1 -1
  36. package/dist/npm/models/ledger/Credential.d.ts +17 -0
  37. package/dist/npm/models/ledger/Credential.d.ts.map +1 -0
  38. package/dist/npm/models/ledger/Credential.js +3 -0
  39. package/dist/npm/models/ledger/Credential.js.map +1 -0
  40. package/dist/npm/models/ledger/DepositPreauth.d.ts +3 -1
  41. package/dist/npm/models/ledger/DepositPreauth.d.ts.map +1 -1
  42. package/dist/npm/models/ledger/Ledger.d.ts +1 -0
  43. package/dist/npm/models/ledger/Ledger.d.ts.map +1 -1
  44. package/dist/npm/models/ledger/LedgerEntry.d.ts +4 -2
  45. package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
  46. package/dist/npm/models/ledger/MPToken.d.ts +1 -2
  47. package/dist/npm/models/ledger/MPToken.d.ts.map +1 -1
  48. package/dist/npm/models/ledger/MPTokenIssuance.d.ts +0 -1
  49. package/dist/npm/models/ledger/MPTokenIssuance.d.ts.map +1 -1
  50. package/dist/npm/models/ledger/PermissionedDomain.d.ts +11 -0
  51. package/dist/npm/models/ledger/PermissionedDomain.d.ts.map +1 -0
  52. package/dist/npm/models/ledger/PermissionedDomain.js +3 -0
  53. package/dist/npm/models/ledger/PermissionedDomain.js.map +1 -0
  54. package/dist/npm/models/ledger/RippleState.d.ts +3 -1
  55. package/dist/npm/models/ledger/RippleState.d.ts.map +1 -1
  56. package/dist/npm/models/ledger/RippleState.js +2 -0
  57. package/dist/npm/models/ledger/RippleState.js.map +1 -1
  58. package/dist/npm/models/ledger/index.d.ts +4 -3
  59. package/dist/npm/models/ledger/index.d.ts.map +1 -1
  60. package/dist/npm/models/ledger/index.js.map +1 -1
  61. package/dist/npm/models/methods/baseMethod.d.ts +1 -0
  62. package/dist/npm/models/methods/baseMethod.d.ts.map +1 -1
  63. package/dist/npm/models/methods/depositAuthorized.d.ts +2 -0
  64. package/dist/npm/models/methods/depositAuthorized.d.ts.map +1 -1
  65. package/dist/npm/models/methods/index.d.ts +6 -5
  66. package/dist/npm/models/methods/index.d.ts.map +1 -1
  67. package/dist/npm/models/methods/ledger.d.ts +2 -2
  68. package/dist/npm/models/methods/ledger.d.ts.map +1 -1
  69. package/dist/npm/models/methods/ledgerEntry.d.ts +7 -0
  70. package/dist/npm/models/methods/ledgerEntry.d.ts.map +1 -1
  71. package/dist/npm/models/methods/serverState.d.ts +1 -0
  72. package/dist/npm/models/methods/serverState.d.ts.map +1 -1
  73. package/dist/npm/models/methods/simulate.d.ts +42 -0
  74. package/dist/npm/models/methods/simulate.d.ts.map +1 -0
  75. package/dist/npm/models/methods/simulate.js +3 -0
  76. package/dist/npm/models/methods/simulate.js.map +1 -0
  77. package/dist/npm/models/methods/subscribe.d.ts +7 -3
  78. package/dist/npm/models/methods/subscribe.d.ts.map +1 -1
  79. package/dist/npm/models/transactions/AMMClawback.d.ts +17 -0
  80. package/dist/npm/models/transactions/AMMClawback.d.ts.map +1 -0
  81. package/dist/npm/models/transactions/AMMClawback.js +34 -0
  82. package/dist/npm/models/transactions/AMMClawback.js.map +1 -0
  83. package/dist/npm/models/transactions/AMMDeposit.d.ts +2 -2
  84. package/dist/npm/models/transactions/AMMDeposit.d.ts.map +1 -1
  85. package/dist/npm/models/transactions/AMMWithdraw.d.ts +2 -2
  86. package/dist/npm/models/transactions/AMMWithdraw.d.ts.map +1 -1
  87. package/dist/npm/models/transactions/CredentialAccept.d.ts +9 -0
  88. package/dist/npm/models/transactions/CredentialAccept.d.ts.map +1 -0
  89. package/dist/npm/models/transactions/CredentialAccept.js +12 -0
  90. package/dist/npm/models/transactions/CredentialAccept.js.map +1 -0
  91. package/dist/npm/models/transactions/CredentialCreate.d.ts +11 -0
  92. package/dist/npm/models/transactions/CredentialCreate.d.ts.map +1 -0
  93. package/dist/npm/models/transactions/CredentialCreate.js +34 -0
  94. package/dist/npm/models/transactions/CredentialCreate.js.map +1 -0
  95. package/dist/npm/models/transactions/CredentialDelete.d.ts +10 -0
  96. package/dist/npm/models/transactions/CredentialDelete.d.ts.map +1 -0
  97. package/dist/npm/models/transactions/CredentialDelete.js +17 -0
  98. package/dist/npm/models/transactions/CredentialDelete.js.map +1 -0
  99. package/dist/npm/models/transactions/MPTokenAuthorize.d.ts +3 -3
  100. package/dist/npm/models/transactions/MPTokenAuthorize.d.ts.map +1 -1
  101. package/dist/npm/models/transactions/MPTokenAuthorize.js +1 -1
  102. package/dist/npm/models/transactions/MPTokenAuthorize.js.map +1 -1
  103. package/dist/npm/models/transactions/MPTokenIssuanceCreate.d.ts +2 -2
  104. package/dist/npm/models/transactions/MPTokenIssuanceCreate.d.ts.map +1 -1
  105. package/dist/npm/models/transactions/MPTokenIssuanceCreate.js +28 -0
  106. package/dist/npm/models/transactions/MPTokenIssuanceCreate.js.map +1 -1
  107. package/dist/npm/models/transactions/MPTokenIssuanceSet.d.ts +3 -3
  108. package/dist/npm/models/transactions/MPTokenIssuanceSet.d.ts.map +1 -1
  109. package/dist/npm/models/transactions/MPTokenIssuanceSet.js +11 -4
  110. package/dist/npm/models/transactions/MPTokenIssuanceSet.js.map +1 -1
  111. package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts +2 -2
  112. package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
  113. package/dist/npm/models/transactions/NFTokenMint.d.ts +5 -3
  114. package/dist/npm/models/transactions/NFTokenMint.d.ts.map +1 -1
  115. package/dist/npm/models/transactions/NFTokenMint.js +1 -0
  116. package/dist/npm/models/transactions/NFTokenMint.js.map +1 -1
  117. package/dist/npm/models/transactions/NFTokenModify.d.ts +9 -0
  118. package/dist/npm/models/transactions/NFTokenModify.d.ts.map +1 -0
  119. package/dist/npm/models/transactions/NFTokenModify.js +22 -0
  120. package/dist/npm/models/transactions/NFTokenModify.js.map +1 -0
  121. package/dist/npm/models/transactions/XChainModifyBridge.d.ts +2 -2
  122. package/dist/npm/models/transactions/XChainModifyBridge.d.ts.map +1 -1
  123. package/dist/npm/models/transactions/accountDelete.d.ts +1 -0
  124. package/dist/npm/models/transactions/accountDelete.d.ts.map +1 -1
  125. package/dist/npm/models/transactions/accountDelete.js +1 -0
  126. package/dist/npm/models/transactions/accountDelete.js.map +1 -1
  127. package/dist/npm/models/transactions/accountSet.d.ts +2 -2
  128. package/dist/npm/models/transactions/accountSet.d.ts.map +1 -1
  129. package/dist/npm/models/transactions/accountSet.js.map +1 -1
  130. package/dist/npm/models/transactions/batch.d.ts +39 -0
  131. package/dist/npm/models/transactions/batch.d.ts.map +1 -0
  132. package/dist/npm/models/transactions/batch.js +62 -0
  133. package/dist/npm/models/transactions/batch.js.map +1 -0
  134. package/dist/npm/models/transactions/clawback.d.ts +1 -1
  135. package/dist/npm/models/transactions/clawback.d.ts.map +1 -1
  136. package/dist/npm/models/transactions/clawback.js +6 -6
  137. package/dist/npm/models/transactions/clawback.js.map +1 -1
  138. package/dist/npm/models/transactions/common.d.ts +22 -5
  139. package/dist/npm/models/transactions/common.d.ts.map +1 -1
  140. package/dist/npm/models/transactions/common.js +113 -12
  141. package/dist/npm/models/transactions/common.js.map +1 -1
  142. package/dist/npm/models/transactions/depositPreauth.d.ts +3 -0
  143. package/dist/npm/models/transactions/depositPreauth.d.ts.map +1 -1
  144. package/dist/npm/models/transactions/depositPreauth.js +20 -7
  145. package/dist/npm/models/transactions/depositPreauth.js.map +1 -1
  146. package/dist/npm/models/transactions/escrowFinish.d.ts +1 -0
  147. package/dist/npm/models/transactions/escrowFinish.d.ts.map +1 -1
  148. package/dist/npm/models/transactions/escrowFinish.js +1 -0
  149. package/dist/npm/models/transactions/escrowFinish.js.map +1 -1
  150. package/dist/npm/models/transactions/index.d.ts +9 -1
  151. package/dist/npm/models/transactions/index.d.ts.map +1 -1
  152. package/dist/npm/models/transactions/index.js +5 -1
  153. package/dist/npm/models/transactions/index.js.map +1 -1
  154. package/dist/npm/models/transactions/metadata.d.ts +2 -1
  155. package/dist/npm/models/transactions/metadata.d.ts.map +1 -1
  156. package/dist/npm/models/transactions/offerCreate.d.ts +2 -2
  157. package/dist/npm/models/transactions/offerCreate.d.ts.map +1 -1
  158. package/dist/npm/models/transactions/payment.d.ts +5 -4
  159. package/dist/npm/models/transactions/payment.d.ts.map +1 -1
  160. package/dist/npm/models/transactions/payment.js +1 -0
  161. package/dist/npm/models/transactions/payment.js.map +1 -1
  162. package/dist/npm/models/transactions/paymentChannelClaim.d.ts +3 -2
  163. package/dist/npm/models/transactions/paymentChannelClaim.d.ts.map +1 -1
  164. package/dist/npm/models/transactions/paymentChannelClaim.js +1 -0
  165. package/dist/npm/models/transactions/paymentChannelClaim.js.map +1 -1
  166. package/dist/npm/models/transactions/permissionedDomainDelete.d.ts +7 -0
  167. package/dist/npm/models/transactions/permissionedDomainDelete.d.ts.map +1 -0
  168. package/dist/npm/models/transactions/permissionedDomainDelete.js +10 -0
  169. package/dist/npm/models/transactions/permissionedDomainDelete.js.map +1 -0
  170. package/dist/npm/models/transactions/permissionedDomainSet.d.ts +9 -0
  171. package/dist/npm/models/transactions/permissionedDomainSet.d.ts.map +1 -0
  172. package/dist/npm/models/transactions/permissionedDomainSet.js +13 -0
  173. package/dist/npm/models/transactions/permissionedDomainSet.js.map +1 -0
  174. package/dist/npm/models/transactions/transaction.d.ts +13 -5
  175. package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
  176. package/dist/npm/models/transactions/transaction.js +40 -5
  177. package/dist/npm/models/transactions/transaction.js.map +1 -1
  178. package/dist/npm/models/transactions/trustSet.d.ts +7 -3
  179. package/dist/npm/models/transactions/trustSet.d.ts.map +1 -1
  180. package/dist/npm/models/transactions/trustSet.js +2 -0
  181. package/dist/npm/models/transactions/trustSet.js.map +1 -1
  182. package/dist/npm/models/utils/flags.d.ts +2 -0
  183. package/dist/npm/models/utils/flags.d.ts.map +1 -1
  184. package/dist/npm/models/utils/flags.js +62 -29
  185. package/dist/npm/models/utils/flags.js.map +1 -1
  186. package/dist/npm/models/utils/index.d.ts +1 -0
  187. package/dist/npm/models/utils/index.d.ts.map +1 -1
  188. package/dist/npm/models/utils/index.js +2 -1
  189. package/dist/npm/models/utils/index.js.map +1 -1
  190. package/dist/npm/snippets/src/paths.js +5 -9
  191. package/dist/npm/snippets/src/paths.js.map +1 -1
  192. package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -1
  193. package/dist/npm/src/Wallet/batchSigner.d.ts +8 -0
  194. package/dist/npm/src/Wallet/batchSigner.d.ts.map +1 -0
  195. package/dist/npm/src/Wallet/batchSigner.js +124 -0
  196. package/dist/npm/src/Wallet/batchSigner.js.map +1 -0
  197. package/dist/npm/src/Wallet/defaultFaucets.d.ts +2 -1
  198. package/dist/npm/src/Wallet/defaultFaucets.d.ts.map +1 -1
  199. package/dist/npm/src/Wallet/defaultFaucets.js +5 -0
  200. package/dist/npm/src/Wallet/defaultFaucets.js.map +1 -1
  201. package/dist/npm/src/Wallet/index.d.ts.map +1 -1
  202. package/dist/npm/src/Wallet/index.js +8 -2
  203. package/dist/npm/src/Wallet/index.js.map +1 -1
  204. package/dist/npm/src/client/RequestManager.d.ts.map +1 -1
  205. package/dist/npm/src/client/RequestManager.js +3 -3
  206. package/dist/npm/src/client/RequestManager.js.map +1 -1
  207. package/dist/npm/src/client/connection.d.ts.map +1 -1
  208. package/dist/npm/src/client/connection.js.map +1 -1
  209. package/dist/npm/src/client/index.d.ts +4 -0
  210. package/dist/npm/src/client/index.d.ts.map +1 -1
  211. package/dist/npm/src/client/index.js +16 -9
  212. package/dist/npm/src/client/index.js.map +1 -1
  213. package/dist/npm/src/client/partialPayment.d.ts +2 -2
  214. package/dist/npm/src/client/partialPayment.d.ts.map +1 -1
  215. package/dist/npm/src/client/partialPayment.js +4 -5
  216. package/dist/npm/src/client/partialPayment.js.map +1 -1
  217. package/dist/npm/src/models/common/index.d.ts +6 -0
  218. package/dist/npm/src/models/common/index.d.ts.map +1 -1
  219. package/dist/npm/src/models/index.d.ts +1 -1
  220. package/dist/npm/src/models/index.d.ts.map +1 -1
  221. package/dist/npm/src/models/index.js +3 -2
  222. package/dist/npm/src/models/index.js.map +1 -1
  223. package/dist/npm/src/models/ledger/Credential.d.ts +17 -0
  224. package/dist/npm/src/models/ledger/Credential.d.ts.map +1 -0
  225. package/dist/npm/src/models/ledger/Credential.js +3 -0
  226. package/dist/npm/src/models/ledger/Credential.js.map +1 -0
  227. package/dist/npm/src/models/ledger/DepositPreauth.d.ts +3 -1
  228. package/dist/npm/src/models/ledger/DepositPreauth.d.ts.map +1 -1
  229. package/dist/npm/src/models/ledger/Ledger.d.ts +1 -0
  230. package/dist/npm/src/models/ledger/Ledger.d.ts.map +1 -1
  231. package/dist/npm/src/models/ledger/LedgerEntry.d.ts +4 -2
  232. package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
  233. package/dist/npm/src/models/ledger/MPToken.d.ts +1 -2
  234. package/dist/npm/src/models/ledger/MPToken.d.ts.map +1 -1
  235. package/dist/npm/src/models/ledger/MPTokenIssuance.d.ts +0 -1
  236. package/dist/npm/src/models/ledger/MPTokenIssuance.d.ts.map +1 -1
  237. package/dist/npm/src/models/ledger/PermissionedDomain.d.ts +11 -0
  238. package/dist/npm/src/models/ledger/PermissionedDomain.d.ts.map +1 -0
  239. package/dist/npm/src/models/ledger/PermissionedDomain.js +3 -0
  240. package/dist/npm/src/models/ledger/PermissionedDomain.js.map +1 -0
  241. package/dist/npm/src/models/ledger/RippleState.d.ts +3 -1
  242. package/dist/npm/src/models/ledger/RippleState.d.ts.map +1 -1
  243. package/dist/npm/src/models/ledger/RippleState.js +2 -0
  244. package/dist/npm/src/models/ledger/RippleState.js.map +1 -1
  245. package/dist/npm/src/models/ledger/index.d.ts +4 -3
  246. package/dist/npm/src/models/ledger/index.d.ts.map +1 -1
  247. package/dist/npm/src/models/ledger/index.js.map +1 -1
  248. package/dist/npm/src/models/methods/baseMethod.d.ts +1 -0
  249. package/dist/npm/src/models/methods/baseMethod.d.ts.map +1 -1
  250. package/dist/npm/src/models/methods/depositAuthorized.d.ts +2 -0
  251. package/dist/npm/src/models/methods/depositAuthorized.d.ts.map +1 -1
  252. package/dist/npm/src/models/methods/index.d.ts +6 -5
  253. package/dist/npm/src/models/methods/index.d.ts.map +1 -1
  254. package/dist/npm/src/models/methods/ledger.d.ts +2 -2
  255. package/dist/npm/src/models/methods/ledger.d.ts.map +1 -1
  256. package/dist/npm/src/models/methods/ledgerEntry.d.ts +7 -0
  257. package/dist/npm/src/models/methods/ledgerEntry.d.ts.map +1 -1
  258. package/dist/npm/src/models/methods/serverState.d.ts +1 -0
  259. package/dist/npm/src/models/methods/serverState.d.ts.map +1 -1
  260. package/dist/npm/src/models/methods/simulate.d.ts +42 -0
  261. package/dist/npm/src/models/methods/simulate.d.ts.map +1 -0
  262. package/dist/npm/src/models/methods/simulate.js +3 -0
  263. package/dist/npm/src/models/methods/simulate.js.map +1 -0
  264. package/dist/npm/src/models/methods/subscribe.d.ts +7 -3
  265. package/dist/npm/src/models/methods/subscribe.d.ts.map +1 -1
  266. package/dist/npm/src/models/transactions/AMMClawback.d.ts +17 -0
  267. package/dist/npm/src/models/transactions/AMMClawback.d.ts.map +1 -0
  268. package/dist/npm/src/models/transactions/AMMClawback.js +34 -0
  269. package/dist/npm/src/models/transactions/AMMClawback.js.map +1 -0
  270. package/dist/npm/src/models/transactions/AMMDeposit.d.ts +2 -2
  271. package/dist/npm/src/models/transactions/AMMDeposit.d.ts.map +1 -1
  272. package/dist/npm/src/models/transactions/AMMWithdraw.d.ts +2 -2
  273. package/dist/npm/src/models/transactions/AMMWithdraw.d.ts.map +1 -1
  274. package/dist/npm/src/models/transactions/CredentialAccept.d.ts +9 -0
  275. package/dist/npm/src/models/transactions/CredentialAccept.d.ts.map +1 -0
  276. package/dist/npm/src/models/transactions/CredentialAccept.js +12 -0
  277. package/dist/npm/src/models/transactions/CredentialAccept.js.map +1 -0
  278. package/dist/npm/src/models/transactions/CredentialCreate.d.ts +11 -0
  279. package/dist/npm/src/models/transactions/CredentialCreate.d.ts.map +1 -0
  280. package/dist/npm/src/models/transactions/CredentialCreate.js +34 -0
  281. package/dist/npm/src/models/transactions/CredentialCreate.js.map +1 -0
  282. package/dist/npm/src/models/transactions/CredentialDelete.d.ts +10 -0
  283. package/dist/npm/src/models/transactions/CredentialDelete.d.ts.map +1 -0
  284. package/dist/npm/src/models/transactions/CredentialDelete.js +17 -0
  285. package/dist/npm/src/models/transactions/CredentialDelete.js.map +1 -0
  286. package/dist/npm/src/models/transactions/MPTokenAuthorize.d.ts +3 -3
  287. package/dist/npm/src/models/transactions/MPTokenAuthorize.d.ts.map +1 -1
  288. package/dist/npm/src/models/transactions/MPTokenAuthorize.js +1 -1
  289. package/dist/npm/src/models/transactions/MPTokenAuthorize.js.map +1 -1
  290. package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.d.ts +2 -2
  291. package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.d.ts.map +1 -1
  292. package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.js +28 -0
  293. package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.js.map +1 -1
  294. package/dist/npm/src/models/transactions/MPTokenIssuanceSet.d.ts +3 -3
  295. package/dist/npm/src/models/transactions/MPTokenIssuanceSet.d.ts.map +1 -1
  296. package/dist/npm/src/models/transactions/MPTokenIssuanceSet.js +11 -4
  297. package/dist/npm/src/models/transactions/MPTokenIssuanceSet.js.map +1 -1
  298. package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts +2 -2
  299. package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
  300. package/dist/npm/src/models/transactions/NFTokenMint.d.ts +5 -3
  301. package/dist/npm/src/models/transactions/NFTokenMint.d.ts.map +1 -1
  302. package/dist/npm/src/models/transactions/NFTokenMint.js +1 -0
  303. package/dist/npm/src/models/transactions/NFTokenMint.js.map +1 -1
  304. package/dist/npm/src/models/transactions/NFTokenModify.d.ts +9 -0
  305. package/dist/npm/src/models/transactions/NFTokenModify.d.ts.map +1 -0
  306. package/dist/npm/src/models/transactions/NFTokenModify.js +22 -0
  307. package/dist/npm/src/models/transactions/NFTokenModify.js.map +1 -0
  308. package/dist/npm/src/models/transactions/XChainModifyBridge.d.ts +2 -2
  309. package/dist/npm/src/models/transactions/XChainModifyBridge.d.ts.map +1 -1
  310. package/dist/npm/src/models/transactions/accountDelete.d.ts +1 -0
  311. package/dist/npm/src/models/transactions/accountDelete.d.ts.map +1 -1
  312. package/dist/npm/src/models/transactions/accountDelete.js +1 -0
  313. package/dist/npm/src/models/transactions/accountDelete.js.map +1 -1
  314. package/dist/npm/src/models/transactions/accountSet.d.ts +2 -2
  315. package/dist/npm/src/models/transactions/accountSet.d.ts.map +1 -1
  316. package/dist/npm/src/models/transactions/accountSet.js.map +1 -1
  317. package/dist/npm/src/models/transactions/batch.d.ts +39 -0
  318. package/dist/npm/src/models/transactions/batch.d.ts.map +1 -0
  319. package/dist/npm/src/models/transactions/batch.js +62 -0
  320. package/dist/npm/src/models/transactions/batch.js.map +1 -0
  321. package/dist/npm/src/models/transactions/clawback.d.ts +1 -1
  322. package/dist/npm/src/models/transactions/clawback.d.ts.map +1 -1
  323. package/dist/npm/src/models/transactions/clawback.js +6 -6
  324. package/dist/npm/src/models/transactions/clawback.js.map +1 -1
  325. package/dist/npm/src/models/transactions/common.d.ts +22 -5
  326. package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
  327. package/dist/npm/src/models/transactions/common.js +113 -12
  328. package/dist/npm/src/models/transactions/common.js.map +1 -1
  329. package/dist/npm/src/models/transactions/depositPreauth.d.ts +3 -0
  330. package/dist/npm/src/models/transactions/depositPreauth.d.ts.map +1 -1
  331. package/dist/npm/src/models/transactions/depositPreauth.js +20 -7
  332. package/dist/npm/src/models/transactions/depositPreauth.js.map +1 -1
  333. package/dist/npm/src/models/transactions/escrowFinish.d.ts +1 -0
  334. package/dist/npm/src/models/transactions/escrowFinish.d.ts.map +1 -1
  335. package/dist/npm/src/models/transactions/escrowFinish.js +1 -0
  336. package/dist/npm/src/models/transactions/escrowFinish.js.map +1 -1
  337. package/dist/npm/src/models/transactions/index.d.ts +9 -1
  338. package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
  339. package/dist/npm/src/models/transactions/index.js +5 -1
  340. package/dist/npm/src/models/transactions/index.js.map +1 -1
  341. package/dist/npm/src/models/transactions/metadata.d.ts +2 -1
  342. package/dist/npm/src/models/transactions/metadata.d.ts.map +1 -1
  343. package/dist/npm/src/models/transactions/offerCreate.d.ts +2 -2
  344. package/dist/npm/src/models/transactions/offerCreate.d.ts.map +1 -1
  345. package/dist/npm/src/models/transactions/payment.d.ts +5 -4
  346. package/dist/npm/src/models/transactions/payment.d.ts.map +1 -1
  347. package/dist/npm/src/models/transactions/payment.js +1 -0
  348. package/dist/npm/src/models/transactions/payment.js.map +1 -1
  349. package/dist/npm/src/models/transactions/paymentChannelClaim.d.ts +3 -2
  350. package/dist/npm/src/models/transactions/paymentChannelClaim.d.ts.map +1 -1
  351. package/dist/npm/src/models/transactions/paymentChannelClaim.js +1 -0
  352. package/dist/npm/src/models/transactions/paymentChannelClaim.js.map +1 -1
  353. package/dist/npm/src/models/transactions/permissionedDomainDelete.d.ts +7 -0
  354. package/dist/npm/src/models/transactions/permissionedDomainDelete.d.ts.map +1 -0
  355. package/dist/npm/src/models/transactions/permissionedDomainDelete.js +10 -0
  356. package/dist/npm/src/models/transactions/permissionedDomainDelete.js.map +1 -0
  357. package/dist/npm/src/models/transactions/permissionedDomainSet.d.ts +9 -0
  358. package/dist/npm/src/models/transactions/permissionedDomainSet.d.ts.map +1 -0
  359. package/dist/npm/src/models/transactions/permissionedDomainSet.js +13 -0
  360. package/dist/npm/src/models/transactions/permissionedDomainSet.js.map +1 -0
  361. package/dist/npm/src/models/transactions/transaction.d.ts +13 -5
  362. package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
  363. package/dist/npm/src/models/transactions/transaction.js +40 -5
  364. package/dist/npm/src/models/transactions/transaction.js.map +1 -1
  365. package/dist/npm/src/models/transactions/trustSet.d.ts +7 -3
  366. package/dist/npm/src/models/transactions/trustSet.d.ts.map +1 -1
  367. package/dist/npm/src/models/transactions/trustSet.js +2 -0
  368. package/dist/npm/src/models/transactions/trustSet.js.map +1 -1
  369. package/dist/npm/src/models/utils/flags.d.ts +2 -0
  370. package/dist/npm/src/models/utils/flags.d.ts.map +1 -1
  371. package/dist/npm/src/models/utils/flags.js +62 -29
  372. package/dist/npm/src/models/utils/flags.js.map +1 -1
  373. package/dist/npm/src/models/utils/index.d.ts +1 -0
  374. package/dist/npm/src/models/utils/index.d.ts.map +1 -1
  375. package/dist/npm/src/models/utils/index.js +2 -1
  376. package/dist/npm/src/models/utils/index.js.map +1 -1
  377. package/dist/npm/src/sugar/autofill.d.ts +3 -1
  378. package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
  379. package/dist/npm/src/sugar/autofill.js +100 -5
  380. package/dist/npm/src/sugar/autofill.js.map +1 -1
  381. package/dist/npm/src/sugar/submit.d.ts.map +1 -1
  382. package/dist/npm/src/sugar/submit.js +7 -7
  383. package/dist/npm/src/sugar/submit.js.map +1 -1
  384. package/dist/npm/src/utils/hashes/hashLedger.d.ts.map +1 -1
  385. package/dist/npm/src/utils/hashes/hashLedger.js +4 -1
  386. package/dist/npm/src/utils/hashes/hashLedger.js.map +1 -1
  387. package/dist/npm/src/utils/index.d.ts +1 -2
  388. package/dist/npm/src/utils/index.d.ts.map +1 -1
  389. package/dist/npm/src/utils/index.js +1 -3
  390. package/dist/npm/src/utils/index.js.map +1 -1
  391. package/dist/npm/sugar/autofill.d.ts +3 -1
  392. package/dist/npm/sugar/autofill.d.ts.map +1 -1
  393. package/dist/npm/sugar/autofill.js +100 -5
  394. package/dist/npm/sugar/autofill.js.map +1 -1
  395. package/dist/npm/sugar/submit.d.ts.map +1 -1
  396. package/dist/npm/sugar/submit.js +7 -7
  397. package/dist/npm/sugar/submit.js.map +1 -1
  398. package/dist/npm/utils/hashes/hashLedger.d.ts.map +1 -1
  399. package/dist/npm/utils/hashes/hashLedger.js +4 -1
  400. package/dist/npm/utils/hashes/hashLedger.js.map +1 -1
  401. package/dist/npm/utils/index.d.ts +1 -2
  402. package/dist/npm/utils/index.d.ts.map +1 -1
  403. package/dist/npm/utils/index.js +1 -3
  404. package/dist/npm/utils/index.js.map +1 -1
  405. package/package.json +6 -6
  406. package/src/Wallet/batchSigner.ts +222 -0
  407. package/src/Wallet/defaultFaucets.ts +6 -0
  408. package/src/Wallet/index.ts +9 -3
  409. package/src/client/RequestManager.ts +4 -1
  410. package/src/client/connection.ts +0 -1
  411. package/src/client/index.ts +49 -30
  412. package/src/client/partialPayment.ts +18 -5
  413. package/src/models/common/index.ts +10 -0
  414. package/src/models/index.ts +2 -1
  415. package/src/models/ledger/Credential.ts +47 -0
  416. package/src/models/ledger/DepositPreauth.ts +6 -2
  417. package/src/models/ledger/Ledger.ts +5 -0
  418. package/src/models/ledger/LedgerEntry.ts +6 -0
  419. package/src/models/ledger/MPToken.ts +1 -2
  420. package/src/models/ledger/MPTokenIssuance.ts +0 -1
  421. package/src/models/ledger/PermissionedDomain.ts +29 -0
  422. package/src/models/ledger/RippleState.ts +4 -0
  423. package/src/models/ledger/index.ts +4 -2
  424. package/src/models/methods/baseMethod.ts +1 -0
  425. package/src/models/methods/depositAuthorized.ts +10 -0
  426. package/src/models/methods/index.ts +20 -0
  427. package/src/models/methods/ledger.ts +2 -2
  428. package/src/models/methods/ledgerEntry.ts +29 -1
  429. package/src/models/methods/serverState.ts +1 -0
  430. package/src/models/methods/simulate.ts +88 -0
  431. package/src/models/methods/subscribe.ts +34 -3
  432. package/src/models/transactions/AMMClawback.ts +120 -0
  433. package/src/models/transactions/AMMDeposit.ts +2 -2
  434. package/src/models/transactions/AMMWithdraw.ts +2 -2
  435. package/src/models/transactions/CredentialAccept.ts +44 -0
  436. package/src/models/transactions/CredentialCreate.ts +81 -0
  437. package/src/models/transactions/CredentialDelete.ts +55 -0
  438. package/src/models/transactions/MPTokenAuthorize.ts +4 -4
  439. package/src/models/transactions/MPTokenIssuanceCreate.ts +60 -12
  440. package/src/models/transactions/MPTokenIssuanceSet.ts +20 -10
  441. package/src/models/transactions/NFTokenCreateOffer.ts +2 -2
  442. package/src/models/transactions/NFTokenMint.ts +7 -2
  443. package/src/models/transactions/NFTokenModify.ts +67 -0
  444. package/src/models/transactions/XChainModifyBridge.ts +2 -2
  445. package/src/models/transactions/accountDelete.ts +16 -0
  446. package/src/models/transactions/accountSet.ts +2 -1
  447. package/src/models/transactions/batch.ts +147 -0
  448. package/src/models/transactions/clawback.ts +7 -9
  449. package/src/models/transactions/common.ts +219 -22
  450. package/src/models/transactions/depositPreauth.ts +54 -15
  451. package/src/models/transactions/escrowFinish.ts +14 -0
  452. package/src/models/transactions/index.ts +13 -1
  453. package/src/models/transactions/metadata.ts +6 -4
  454. package/src/models/transactions/offerCreate.ts +2 -2
  455. package/src/models/transactions/payment.ts +19 -4
  456. package/src/models/transactions/paymentChannelClaim.ts +22 -2
  457. package/src/models/transactions/permissionedDomainDelete.ts +28 -0
  458. package/src/models/transactions/permissionedDomainSet.ts +54 -0
  459. package/src/models/transactions/transaction.ts +78 -15
  460. package/src/models/transactions/trustSet.ts +12 -2
  461. package/src/models/utils/flags.ts +88 -33
  462. package/src/models/utils/index.ts +1 -0
  463. package/src/sugar/autofill.ts +140 -11
  464. package/src/sugar/submit.ts +3 -5
  465. package/src/utils/hashes/hashLedger.ts +5 -2
  466. package/src/utils/index.ts +0 -2
  467. package/dist/npm/snippets/src/bridgeTransfer.d.ts +0 -2
  468. package/dist/npm/snippets/src/bridgeTransfer.d.ts.map +0 -1
  469. package/dist/npm/snippets/src/bridgeTransfer.js +0 -126
  470. package/dist/npm/snippets/src/bridgeTransfer.js.map +0 -1
  471. package/dist/npm/src/utils/mptConversion.d.ts +0 -2
  472. package/dist/npm/src/utils/mptConversion.d.ts.map +0 -1
  473. package/dist/npm/src/utils/mptConversion.js +0 -31
  474. package/dist/npm/src/utils/mptConversion.js.map +0 -1
  475. package/dist/npm/utils/mptConversion.d.ts +0 -2
  476. package/dist/npm/utils/mptConversion.d.ts.map +0 -1
  477. package/dist/npm/utils/mptConversion.js +0 -31
  478. package/dist/npm/utils/mptConversion.js.map +0 -1
  479. package/src/utils/mptConversion.ts +0 -61
@@ -1,3 +1,5 @@
1
+ import { AuthorizeCredential } from '../common'
2
+
1
3
  import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
2
4
 
3
5
  /**
@@ -12,8 +14,6 @@ export default interface DepositPreauth
12
14
  LedgerEntryType: 'DepositPreauth'
13
15
  /** The account that granted the preauthorization. */
14
16
  Account: string
15
- /** The account that received the preauthorization. */
16
- Authorize: string
17
17
  /**
18
18
  * A bit-map of boolean flags. No flags are defined for DepositPreauth
19
19
  * objects, so this value is always 0.
@@ -24,4 +24,8 @@ export default interface DepositPreauth
24
24
  * object, in case the directory consists of multiple pages.
25
25
  */
26
26
  OwnerNode: string
27
+ /** The account that received the preauthorization. */
28
+ Authorize?: string
29
+ /** The credential(s) that received the preauthorization. */
30
+ AuthorizeCredentials?: AuthorizeCredential[]
27
31
  }
@@ -31,6 +31,11 @@ interface BaseLedger {
31
31
  * by which the close_time could be rounded.
32
32
  */
33
33
  close_time_resolution: number
34
+ /**
35
+ * The approximate time this ledger was closed, in date time string format.
36
+ * Always uses the UTC time zone.
37
+ */
38
+ close_time_iso: string
34
39
  /** Whether or not this ledger has been closed. */
35
40
  closed: boolean
36
41
  /**
@@ -3,6 +3,7 @@ import Amendments from './Amendments'
3
3
  import AMM from './AMM'
4
4
  import Bridge from './Bridge'
5
5
  import Check from './Check'
6
+ import Credential from './Credential'
6
7
  import DepositPreauth from './DepositPreauth'
7
8
  import DirectoryNode from './DirectoryNode'
8
9
  import Escrow from './Escrow'
@@ -12,6 +13,7 @@ import NegativeUNL from './NegativeUNL'
12
13
  import Offer from './Offer'
13
14
  import Oracle from './Oracle'
14
15
  import PayChannel from './PayChannel'
16
+ import PermissionedDomain from './PermissionedDomain'
15
17
  import RippleState from './RippleState'
16
18
  import SignerList from './SignerList'
17
19
  import Ticket from './Ticket'
@@ -24,6 +26,7 @@ type LedgerEntry =
24
26
  | AMM
25
27
  | Bridge
26
28
  | Check
29
+ | Credential
27
30
  | DepositPreauth
28
31
  | DirectoryNode
29
32
  | Escrow
@@ -33,6 +36,7 @@ type LedgerEntry =
33
36
  | Offer
34
37
  | Oracle
35
38
  | PayChannel
39
+ | PermissionedDomain
36
40
  | RippleState
37
41
  | SignerList
38
42
  | Ticket
@@ -45,6 +49,7 @@ type LedgerEntryFilter =
45
49
  | 'amm'
46
50
  | 'bridge'
47
51
  | 'check'
52
+ | 'credential'
48
53
  | 'deposit_preauth'
49
54
  | 'did'
50
55
  | 'directory'
@@ -58,6 +63,7 @@ type LedgerEntryFilter =
58
63
  | 'offer'
59
64
  | 'oracle'
60
65
  | 'payment_channel'
66
+ | 'permissioned_domain'
61
67
  | 'signer_list'
62
68
  | 'state'
63
69
  | 'ticket'
@@ -5,8 +5,7 @@ import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
5
5
  export interface MPToken extends BaseLedgerEntry, HasPreviousTxnID {
6
6
  LedgerEntryType: 'MPToken'
7
7
  MPTokenIssuanceID: string
8
- MPTAmount: MPTAmount
9
- LockedAmount?: MPTAmount
8
+ MPTAmount?: MPTAmount
10
9
  Flags: number
11
10
  OwnerNode?: string
12
11
  }
@@ -7,7 +7,6 @@ export interface MPTokenIssuance extends BaseLedgerEntry, HasPreviousTxnID {
7
7
  AssetScale?: number
8
8
  MaximumAmount?: string
9
9
  OutstandingAmount: string
10
- LockedAmount?: string
11
10
  TransferFee?: number
12
11
  MPTokenMetadata?: string
13
12
  OwnerNode?: string
@@ -0,0 +1,29 @@
1
+ import { AuthorizeCredential } from '../common'
2
+
3
+ import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
4
+
5
+ export default interface PermissionedDomain
6
+ extends BaseLedgerEntry,
7
+ HasPreviousTxnID {
8
+ /* The ledger object's type (PermissionedDomain). */
9
+ LedgerEntryType: 'PermissionedDomain'
10
+
11
+ /* The account that controls the settings of the domain. */
12
+ Owner: string
13
+
14
+ /* The credentials that are accepted by the domain.
15
+ Ownership of one of these credentials automatically
16
+ makes you a member of the domain. */
17
+ AcceptedCredentials: AuthorizeCredential[]
18
+
19
+ /* Flag values associated with this object. */
20
+ Flags: 0
21
+
22
+ /* Owner account's directory page containing the PermissionedDomain object. */
23
+ OwnerNode: string
24
+
25
+ /* The Sequence value of the PermissionedDomainSet
26
+ transaction that created this domain. Used in combination
27
+ with the Account to identify this domain. */
28
+ Sequence: number
29
+ }
@@ -77,4 +77,8 @@ export enum RippleStateFlags {
77
77
  lsfHighFreeze = 0x00800000,
78
78
  // True, trust line to AMM. Used by client apps to identify payments via AMM.
79
79
  lsfAMMNode = 0x01000000,
80
+ // True, low side has set deep freeze flag
81
+ lsfLowDeepFreeze = 0x02000000,
82
+ // True, high side has set deep freeze flag
83
+ lsfHighDeepFreeze = 0x04000000,
80
84
  }
@@ -6,6 +6,7 @@ import Amendments, { Majority, AMENDMENTS_ID } from './Amendments'
6
6
  import AMM, { VoteSlot } from './AMM'
7
7
  import Bridge from './Bridge'
8
8
  import Check from './Check'
9
+ import Credential from './Credential'
9
10
  import DepositPreauth from './DepositPreauth'
10
11
  import DID from './DID'
11
12
  import DirectoryNode from './DirectoryNode'
@@ -18,9 +19,9 @@ import FeeSettings, {
18
19
  import { Ledger, LedgerV1 } from './Ledger'
19
20
  import { LedgerEntry, LedgerEntryFilter } from './LedgerEntry'
20
21
  import LedgerHashes from './LedgerHashes'
21
- import NegativeUNL, { NEGATIVE_UNL_ID } from './NegativeUNL'
22
- import { MPTokenIssuance } from './MPTokenIssuance'
23
22
  import { MPToken } from './MPToken'
23
+ import { MPTokenIssuance } from './MPTokenIssuance'
24
+ import NegativeUNL, { NEGATIVE_UNL_ID } from './NegativeUNL'
24
25
  import { NFTokenOffer } from './NFTokenOffer'
25
26
  import { NFToken, NFTokenPage } from './NFTokenPage'
26
27
  import Offer, { OfferFlags } from './Offer'
@@ -41,6 +42,7 @@ export {
41
42
  AMM,
42
43
  Bridge,
43
44
  Check,
45
+ Credential,
44
46
  DepositPreauth,
45
47
  DirectoryNode,
46
48
  DID,
@@ -53,6 +53,7 @@ export interface ErrorResponse {
53
53
  error: string
54
54
  error_code?: string
55
55
  error_message?: string
56
+ error_exception?: string
56
57
  request: Request
57
58
  api_version?: number
58
59
  }
@@ -15,6 +15,12 @@ export interface DepositAuthorizedRequest
15
15
  source_account: string
16
16
  /** The recipient of a possible payment. */
17
17
  destination_account: string
18
+ /**
19
+ * The object IDs of Credential objects. If this field is included, then the
20
+ * credential will be taken into account when analyzing whether the sender can send
21
+ * funds to the destination.
22
+ */
23
+ credentials?: string[]
18
24
  }
19
25
 
20
26
  /**
@@ -52,5 +58,9 @@ export interface DepositAuthorizedResponse extends BaseResponse {
52
58
  source_account: string
53
59
  /** If true, the information comes from a validated ledger version. */
54
60
  validated?: boolean
61
+ /** The object IDs of `Credential` objects. If this field is included,
62
+ * then the credential will be taken into account when analyzing whether
63
+ * the sender can send funds to the destination. */
64
+ credentials?: string[]
55
65
  }
56
66
  }
@@ -148,6 +148,14 @@ import {
148
148
  StateAccountingFinal,
149
149
  } from './serverInfo'
150
150
  import { ServerStateRequest, ServerStateResponse } from './serverState'
151
+ import {
152
+ SimulateBinaryRequest,
153
+ SimulateBinaryResponse,
154
+ SimulateJsonRequest,
155
+ SimulateJsonResponse,
156
+ SimulateRequest,
157
+ SimulateResponse,
158
+ } from './simulate'
151
159
  import { SubmitRequest, SubmitResponse } from './submit'
152
160
  import {
153
161
  SubmitMultisignedRequest,
@@ -168,6 +176,7 @@ import {
168
176
  SubscribeRequest,
169
177
  SubscribeResponse,
170
178
  TransactionStream,
179
+ TransactionV1Stream,
171
180
  ValidationStream,
172
181
  } from './subscribe'
173
182
  import {
@@ -202,6 +211,7 @@ type Request =
202
211
  | LedgerDataRequest
203
212
  | LedgerEntryRequest
204
213
  // transaction methods
214
+ | SimulateRequest
205
215
  | SubmitRequest
206
216
  | SubmitMultisignedRequest
207
217
  | TransactionEntryRequest
@@ -260,6 +270,7 @@ type Response<Version extends APIVersion = typeof DEFAULT_API_VERSION> =
260
270
  | LedgerDataResponse
261
271
  | LedgerEntryResponse
262
272
  // transaction methods
273
+ | SimulateResponse
263
274
  | SubmitResponse
264
275
  | SubmitMultisignedVersionResponseMap<Version>
265
276
  | TransactionEntryResponse
@@ -397,6 +408,12 @@ export type RequestResponseMap<
397
408
  ? LedgerDataResponse
398
409
  : T extends LedgerEntryRequest
399
410
  ? LedgerEntryResponse
411
+ : T extends SimulateBinaryRequest
412
+ ? SimulateBinaryResponse
413
+ : T extends SimulateJsonRequest
414
+ ? SimulateJsonResponse
415
+ : T extends SimulateRequest
416
+ ? SimulateJsonResponse
400
417
  : T extends SubmitRequest
401
418
  ? SubmitResponse
402
419
  : T extends SubmitMultisignedRequest
@@ -543,6 +560,8 @@ export {
543
560
  LedgerEntryRequest,
544
561
  LedgerEntryResponse,
545
562
  // transaction methods with types
563
+ SimulateRequest,
564
+ SimulateResponse,
546
565
  SubmitRequest,
547
566
  SubmitResponse,
548
567
  SubmitMultisignedRequest,
@@ -583,6 +602,7 @@ export {
583
602
  LedgerStreamResponse,
584
603
  ValidationStream,
585
604
  TransactionStream,
605
+ TransactionV1Stream,
586
606
  PathFindStream,
587
607
  PeerStatusStream,
588
608
  OrderBookStream,
@@ -203,13 +203,13 @@ export interface LedgerQueueData {
203
203
  }
204
204
 
205
205
  export interface LedgerBinary
206
- extends Omit<Omit<Ledger, 'transactions'>, 'accountState'> {
206
+ extends Omit<Ledger, 'transactions' | 'accountState'> {
207
207
  accountState?: string[]
208
208
  transactions?: string[]
209
209
  }
210
210
 
211
211
  export interface LedgerBinaryV1
212
- extends Omit<Omit<LedgerV1, 'transactions'>, 'accountState'> {
212
+ extends Omit<LedgerV1, 'transactions' | 'accountState'> {
213
213
  accountState?: string[]
214
214
  transactions?: string[]
215
215
  }
@@ -51,7 +51,14 @@ export interface LedgerEntryRequest extends BaseRequest, LookupByLedgerRequest {
51
51
  issuer?: string
52
52
  }
53
53
  }
54
-
54
+ /**
55
+ * (Optional) If set to true and the queried object has been deleted,
56
+ * return its complete data prior to its deletion.
57
+ * If set to false or not provided and the queried object has been deleted,
58
+ * return objectNotFound (current behavior).
59
+ * This parameter is supported only by Clio servers
60
+ */
61
+ include_deleted?: boolean
55
62
  /**
56
63
  * If true, return the requested ledger object's contents as a hex string in
57
64
  * the XRP Ledger's binary format. Otherwise, return data in JSON format. The
@@ -76,6 +83,23 @@ export interface LedgerEntryRequest extends BaseRequest, LookupByLedgerRequest {
76
83
  /** The object ID of a Check object to retrieve. */
77
84
  check?: string
78
85
 
86
+ /* Specify the Credential to retrieve. If a string, must be the ledger entry ID of
87
+ * the entry, as hexadecimal. If an object, requires subject, issuer, and
88
+ * credential_type sub-fields.
89
+ */
90
+ credential?:
91
+ | {
92
+ /** The account that is the subject of the credential. */
93
+ subject: string
94
+
95
+ /** The account that issued the credential. */
96
+ issuer: string
97
+
98
+ /** The type of the credential, as issued. */
99
+ credentialType: string
100
+ }
101
+ | string
102
+
79
103
  /**
80
104
  * Specify a DepositPreauth object to retrieve. If a string, must be the
81
105
  * object ID of the DepositPreauth object, as hexadecimal. If an object,
@@ -220,5 +244,9 @@ export interface LedgerEntryResponse<T = LedgerEntry> extends BaseResponse {
220
244
  /** The binary representation of the ledger object, as hexadecimal. */
221
245
  node_binary?: string
222
246
  validated?: boolean
247
+ /**
248
+ * (Optional) Indicates the ledger index at which the object was deleted.
249
+ */
250
+ deleted_ledger_index?: number
223
251
  }
224
252
  }
@@ -51,6 +51,7 @@ export interface ServerStateResponse extends BaseResponse {
51
51
  load_factor_fee_queue?: number
52
52
  load_factor_fee_reference?: number
53
53
  load_factor_server?: number
54
+ network_id: number
54
55
  peer_disconnects?: string
55
56
  peer_disconnects_resources?: string
56
57
  peers: number
@@ -0,0 +1,88 @@
1
+ import {
2
+ BaseTransaction,
3
+ Transaction,
4
+ TransactionMetadata,
5
+ } from '../transactions'
6
+
7
+ import { BaseRequest, BaseResponse } from './baseMethod'
8
+
9
+ /**
10
+ * The `simulate` method simulates a transaction without submitting it to the network.
11
+ * Returns a {@link SimulateResponse}.
12
+ *
13
+ * @category Requests
14
+ */
15
+ export type SimulateRequest = BaseRequest & {
16
+ command: 'simulate'
17
+
18
+ binary?: boolean
19
+ } & (
20
+ | {
21
+ tx_blob: string
22
+ tx_json?: never
23
+ }
24
+ | {
25
+ tx_json: Transaction
26
+ tx_blob?: never
27
+ }
28
+ )
29
+
30
+ export type SimulateBinaryRequest = SimulateRequest & {
31
+ binary: true
32
+ }
33
+
34
+ export type SimulateJsonRequest = SimulateRequest & {
35
+ binary?: false
36
+ }
37
+
38
+ /**
39
+ * Response expected from an {@link SimulateRequest}.
40
+ *
41
+ * @category Responses
42
+ */
43
+ export type SimulateResponse = SimulateJsonResponse | SimulateBinaryResponse
44
+
45
+ export interface SimulateBinaryResponse extends BaseResponse {
46
+ result: {
47
+ applied: false
48
+
49
+ engine_result: string
50
+
51
+ engine_result_code: number
52
+
53
+ engine_result_message: string
54
+
55
+ tx_blob: string
56
+
57
+ meta_blob: string
58
+
59
+ /**
60
+ * The ledger index of the ledger version that was used to generate this
61
+ * response.
62
+ */
63
+ ledger_index: number
64
+ }
65
+ }
66
+
67
+ export interface SimulateJsonResponse<T extends BaseTransaction = Transaction>
68
+ extends BaseResponse {
69
+ result: {
70
+ applied: false
71
+
72
+ engine_result: string
73
+
74
+ engine_result_code: number
75
+
76
+ engine_result_message: string
77
+
78
+ /**
79
+ * The ledger index of the ledger version that was used to generate this
80
+ * response.
81
+ */
82
+ ledger_index: number
83
+
84
+ tx_json: T
85
+
86
+ meta?: TransactionMetadata<T>
87
+ }
88
+ }
@@ -4,6 +4,10 @@ import type {
4
4
  Path,
5
5
  StreamType,
6
6
  ResponseOnlyTxInfo,
7
+ APIVersion,
8
+ DEFAULT_API_VERSION,
9
+ RIPPLED_API_V1,
10
+ RIPPLED_API_V2,
7
11
  } from '../common'
8
12
  import { Offer } from '../ledger'
9
13
  import { OfferCreate, Transaction } from '../transactions'
@@ -262,9 +266,16 @@ export interface ValidationStream extends BaseStream {
262
266
  *
263
267
  * @category Streams
264
268
  */
265
- export interface TransactionStream extends BaseStream {
269
+ interface TransactionStreamBase<
270
+ Version extends APIVersion = typeof DEFAULT_API_VERSION,
271
+ > extends BaseStream {
266
272
  status: string
267
273
  type: 'transaction'
274
+ /**
275
+ * The approximate time this ledger was closed, in date time string format.
276
+ * Always uses the UTC time zone.
277
+ */
278
+ close_time_iso: string
268
279
  /** String Transaction result code. */
269
280
  engine_result: string
270
281
  /** Numeric transaction response code, if applicable. */
@@ -285,8 +296,14 @@ export interface TransactionStream extends BaseStream {
285
296
  * in detail.
286
297
  */
287
298
  meta?: TransactionMetadata
288
- /** The definition of the transaction in JSON format. */
289
- transaction: Transaction & ResponseOnlyTxInfo
299
+ /** JSON object defining the transaction. */
300
+ tx_json?: Version extends typeof RIPPLED_API_V2
301
+ ? Transaction & ResponseOnlyTxInfo
302
+ : never
303
+ /** JSON object defining the transaction in rippled API v1. */
304
+ transaction?: Version extends typeof RIPPLED_API_V1
305
+ ? Transaction & ResponseOnlyTxInfo
306
+ : never
290
307
  /**
291
308
  * If true, this transaction is included in a validated ledger and its
292
309
  * outcome is final. Responses from the transaction stream should always be
@@ -296,6 +313,20 @@ export interface TransactionStream extends BaseStream {
296
313
  warnings?: Array<{ id: number; message: string }>
297
314
  }
298
315
 
316
+ /**
317
+ * Expected response from an {@link AccountTxRequest}.
318
+ *
319
+ * @category Streams
320
+ */
321
+ export type TransactionStream = TransactionStreamBase
322
+
323
+ /**
324
+ * Expected response from an {@link AccountTxRequest} with `api_version` set to 1.
325
+ *
326
+ * @category Streams
327
+ */
328
+ export type TransactionV1Stream = TransactionStreamBase<typeof RIPPLED_API_V1>
329
+
299
330
  /**
300
331
  * The admin-only `peer_status` stream reports a large amount of information on
301
332
  * the activities of other rippled servers to which this server is connected, in
@@ -0,0 +1,120 @@
1
+ import { ValidationError } from '../../errors'
2
+ import { Currency, IssuedCurrency, IssuedCurrencyAmount } from '../common'
3
+
4
+ import {
5
+ Account,
6
+ BaseTransaction,
7
+ GlobalFlagsInterface,
8
+ isAccount,
9
+ isAmount,
10
+ isCurrency,
11
+ validateBaseTransaction,
12
+ validateOptionalField,
13
+ validateRequiredField,
14
+ } from './common'
15
+
16
+ /**
17
+ * Enum representing values for AMMClawback Transaction Flags.
18
+ *
19
+ * @category Transaction Flags
20
+ */
21
+ export enum AMMClawbackFlags {
22
+ tfClawTwoAssets = 0x00000001,
23
+ }
24
+
25
+ /**
26
+ * Map of flags to boolean values representing {@link AMMClawback} transaction
27
+ * flags.
28
+ *
29
+ * @category Transaction Flags
30
+ */
31
+ export interface AMMClawbackFlagsInterface extends GlobalFlagsInterface {
32
+ tfClawTwoAssets?: boolean
33
+ }
34
+
35
+ /**
36
+ * Claw back tokens from a holder that has deposited your issued tokens into an AMM pool.
37
+ *
38
+ * Clawback is disabled by default. To use clawback, you must send an AccountSet transaction to enable the
39
+ * Allow Trust Line Clawback setting. An issuer with any existing tokens cannot enable clawback. You can
40
+ * only enable Allow Trust Line Clawback if you have a completely empty owner directory, meaning you must
41
+ * do so before you set up any trust lines, offers, escrows, payment channels, checks, or signer lists.
42
+ * After you enable clawback, it cannot reverted: the account permanently gains the ability to claw back
43
+ * issued assets on trust lines.
44
+ */
45
+ export interface AMMClawback extends BaseTransaction {
46
+ TransactionType: 'AMMClawback'
47
+
48
+ /**
49
+ * The account holding the asset to be clawed back.
50
+ */
51
+ Holder: Account
52
+
53
+ /**
54
+ * Specifies the asset that the issuer wants to claw back from the AMM pool.
55
+ * In JSON, this is an object with currency and issuer fields. The issuer field must match with Account.
56
+ */
57
+ Asset: IssuedCurrency
58
+
59
+ /**
60
+ * Specifies the other asset in the AMM's pool. In JSON, this is an object with currency and
61
+ * issuer fields (omit issuer for XRP).
62
+ */
63
+ Asset2: Currency
64
+
65
+ /**
66
+ * The maximum amount to claw back from the AMM account. The currency and issuer subfields should match
67
+ * the Asset subfields. If this field isn't specified, or the value subfield exceeds the holder's available
68
+ * tokens in the AMM, all of the holder's tokens will be clawed back.
69
+ */
70
+ Amount?: IssuedCurrencyAmount
71
+ }
72
+
73
+ /**
74
+ * Verify the form and type of an AMMClawback at runtime.
75
+ *
76
+ * @param tx - An AMMClawback Transaction.
77
+ * @throws {ValidationError} When the transaction is malformed.
78
+ */
79
+ export function validateAMMClawback(tx: Record<string, unknown>): void {
80
+ validateBaseTransaction(tx)
81
+
82
+ validateRequiredField(tx, 'Holder', isAccount)
83
+
84
+ validateRequiredField(tx, 'Asset', isCurrency)
85
+
86
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- required
87
+ const asset = tx.Asset as IssuedCurrency
88
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- required
89
+ const amount = tx.Amount as IssuedCurrencyAmount
90
+
91
+ if (tx.Holder === asset.issuer) {
92
+ throw new ValidationError(
93
+ 'AMMClawback: Holder and Asset.issuer must be distinct',
94
+ )
95
+ }
96
+
97
+ if (tx.Account !== asset.issuer) {
98
+ throw new ValidationError(
99
+ 'AMMClawback: Account must be the same as Asset.issuer',
100
+ )
101
+ }
102
+
103
+ validateRequiredField(tx, 'Asset2', isCurrency)
104
+
105
+ validateOptionalField(tx, 'Amount', isAmount)
106
+
107
+ if (tx.Amount != null) {
108
+ if (amount.currency !== asset.currency) {
109
+ throw new ValidationError(
110
+ 'AMMClawback: Amount.currency must match Asset.currency',
111
+ )
112
+ }
113
+
114
+ if (amount.issuer !== asset.issuer) {
115
+ throw new ValidationError(
116
+ 'AMMClawback: Amount.issuer must match Amount.issuer',
117
+ )
118
+ }
119
+ }
120
+ }
@@ -3,7 +3,7 @@ import { Amount, Currency, IssuedCurrencyAmount } from '../common'
3
3
 
4
4
  import {
5
5
  BaseTransaction,
6
- GlobalFlags,
6
+ GlobalFlagsInterface,
7
7
  isAmount,
8
8
  isCurrency,
9
9
  isIssuedCurrency,
@@ -24,7 +24,7 @@ export enum AMMDepositFlags {
24
24
  tfTwoAssetIfEmpty = 0x00800000,
25
25
  }
26
26
 
27
- export interface AMMDepositFlagsInterface extends GlobalFlags {
27
+ export interface AMMDepositFlagsInterface extends GlobalFlagsInterface {
28
28
  tfLPToken?: boolean
29
29
  tfSingleAsset?: boolean
30
30
  tfTwoAsset?: boolean
@@ -3,7 +3,7 @@ import { Amount, Currency, IssuedCurrencyAmount } from '../common'
3
3
 
4
4
  import {
5
5
  BaseTransaction,
6
- GlobalFlags,
6
+ GlobalFlagsInterface,
7
7
  isAmount,
8
8
  isCurrency,
9
9
  isIssuedCurrency,
@@ -25,7 +25,7 @@ export enum AMMWithdrawFlags {
25
25
  tfLimitLPToken = 0x00400000,
26
26
  }
27
27
 
28
- export interface AMMWithdrawFlagsInterface extends GlobalFlags {
28
+ export interface AMMWithdrawFlagsInterface extends GlobalFlagsInterface {
29
29
  tfLPToken?: boolean
30
30
  tfWithdrawAll?: boolean
31
31
  tfOneAssetWithdrawAll?: boolean