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 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;AAAA,+DAe6B;AAmM3B,yGAjNA,+CAAwB,OAiNA;AAOxB,gGAvNA,sCAAe,OAuNA;AAIf,oGA1NA,0CAAmB,OA0NA;AAFnB,iGAvNA,uCAAgB,OAuNA;AAJhB,2FAlNA,iCAAU,OAkNA;AAQV,+FAzNA,qCAAc,OAyNA;AAPd,gGAjNA,sCAAe,OAiNA;AAIf,oGApNA,0CAAmB,OAoNA;AAFnB,iGAjNA,uCAAgB,OAiNA;AAJhB,2FA5MA,iCAAU,OA4MA;AAQV,+FAnNA,qCAAc,OAmNA;AATd,sGAzMA,4CAAqB,OAyMA;AADrB,gGAvMA,sCAAe,OAuMA;AADf,yGArMA,+CAAwB,OAqMA;AAnM1B,6DAM4B;AAC5B,qDAAkE;AAuLhE,uGAvLiB,wBAAsB,OAuLjB;AA/KxB,qCAAuE;AA2KrE,8FA3KO,sBAAa,OA2KP;AACb,8FA5KsB,sBAAa,OA4KtB;AACb,+FA7KqC,uBAAc,OA6KrC;AA5KhB,4EAAmD;AAyJjD,4BAzJK,2BAAiB,CAyJL;AAxJnB,kEAAyC;AAoMvC,uBApMK,sBAAY,CAoML;AAnMd,0EAAiD;AAqM/C,2BArMK,0BAAgB,CAqML;AApMlB,qCAaiB;AACjB,sEAA6C;AAqL3C,yBArLK,wBAAc,CAqLL;AApLhB,uCAOkB;AA0IhB,sGAhJA,+BAAqB,OAgJA;AACrB,sGAhJA,+BAAqB,OAgJA;AACrB,sGAhJA,+BAAqB,OAgJA;AAJrB,iGA3IA,0BAAgB,OA2IA;AAChB,iGA3IA,0BAAgB,OA2IA;AAIhB,iGA9IA,0BAAgB,OA8IA;AA5IlB,wFAA+D;AAmJ7D,kCAnJK,iCAAuB,CAmJL;AAlJzB,yDAA2E;AAsJzE,mGAtJO,qCAAkB,OAsJP;AADlB,mGArJ2B,qCAAkB,OAqJ3B;AApJpB,qDAKyB;AA4HvB,oGAhIA,oCAAmB,OAgIA;AACnB,oGAhIA,oCAAmB,OAgIA;AACnB,qGAhIA,qCAAoB,OAgIA;AACpB,qGAhIA,qCAAoB,OAgIA;AA9HtB,4FAAmE;AA6IjE,oCA7IK,mCAAyB,CA6IL;AA5I3B,mDAAwD;AAwHtD,2FAxHO,0BAAU,OAwHP;AADV,2FAvHmB,0BAAU,OAuHnB;AAtHZ,mDAAgD;AAoK9C,+FApKO,8BAAc,OAoKP;AA3JhB,SAAS,aAAa,CAAC,MAAc;IACnC,IAAI;QACF,IAAA,sBAAa,EAAC,MAAM,CAAC,CAAA;QACrB,OAAO,IAAI,CAAA;KACZ;IAAC,OAAO,IAAI,EAAE;QACb,OAAO,KAAK,CAAA;KACb;AACH,CAAC;AAmHC,sCAAa;AA3Gf,SAAS,MAAM,CAAC,MAAiC;IAC/C,OAAO,IAAA,4BAAS,EAAC,MAAM,CAAC,CAAA;AAC1B,CAAC;AAkIC,wBAAM;AA1HR,SAAS,gBAAgB,CAAC,MAAmB;IAC3C,OAAO,IAAA,sCAAmB,EAAC,MAAM,CAAC,CAAA;AACpC,CAAC;AA2HC,4CAAgB;AAnHlB,SAAS,qBAAqB,CAAC,MAA2B;IACxD,OAAO,IAAA,2CAAwB,EAAC,MAAM,CAAC,CAAA;AACzC,CAAC;AAkHC,sDAAqB;AAzGvB,SAAS,qBAAqB,CAAC,MAAmB,EAAE,MAAc;IAChE,OAAO,IAAA,2CAAwB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AACjD,CAAC;AAqGC,sDAAqB;AA7FvB,SAAS,MAAM,CAAC,GAAW;IACzB,OAAO,IAAA,4BAAS,EAAC,GAAG,CAAC,CAAA;AACvB,CAAC;AA0FC,wBAAM;AAhFR,SAAS,cAAc,CAAC,OAAe;IACrC,OAAO,IAAA,sCAAe,EAAC,OAAO,CAAC,IAAI,IAAA,4CAAqB,EAAC,OAAO,CAAC,CAAA;AACnE,CAAC;AAqDC,wCAAc;AAvChB,SAAS,WAAW,CAAC,QAA8B;IAEjD,OAAO,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC3C,CAAC;AAwBC,kCAAW;AAnBb,MAAM,MAAM,GAAG;IACb,YAAY,EAAZ,qBAAY;IACZ,MAAM,EAAN,eAAM;IACN,eAAe,EAAf,wBAAe;IACf,gBAAgB,EAAhB,yBAAgB;IAChB,WAAW,EAAX,oBAAW;IACX,aAAa,EAAb,sBAAa;IACb,UAAU,EAAV,mBAAU;IACV,aAAa,EAAb,sBAAa;IACb,UAAU,EAAV,mBAAU;IACV,gBAAgB,EAAhB,yBAAgB;IAChB,UAAU,EAAV,mBAAU;IACV,kBAAkB,EAAlB,2BAAkB;CACnB,CAAA;AAmBC,wBAAM"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xrpl",
3
- "version": "4.0.1-mpt-beta",
3
+ "version": "4.2.0-batch.0",
4
4
  "license": "ISC",
5
5
  "description": "A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser",
6
6
  "files": [
@@ -29,7 +29,7 @@
29
29
  "bignumber.js": "^9.0.0",
30
30
  "eventemitter3": "^5.0.1",
31
31
  "ripple-address-codec": "^5.0.0",
32
- "ripple-binary-codec": "^4.0.1-mpt-beta",
32
+ "ripple-binary-codec": "^2.3.0-batch.0",
33
33
  "ripple-keypairs": "^2.0.0"
34
34
  },
35
35
  "devDependencies": {
@@ -41,9 +41,9 @@
41
41
  "karma-jasmine": "^5.1.0",
42
42
  "karma-webpack": "^5.0.0",
43
43
  "lodash": "^4.17.4",
44
- "react": "^18.2.0",
44
+ "react": "^19.0.0",
45
45
  "run-s": "^0.0.0",
46
- "typedoc": "0.26.4",
46
+ "typedoc": "0.27.6",
47
47
  "ws": "^8.14.2"
48
48
  },
49
49
  "resolutions": {
@@ -64,7 +64,7 @@
64
64
  "test": "jest --config=jest.config.unit.js --verbose false --silent=false",
65
65
  "test:integration": "TS_NODE_PROJECT=tsconfig.build.json jest --config=jest.config.integration.js --verbose false --silent=false --runInBand",
66
66
  "test:browser": "npm run build && npm run build:browserTests && karma start ./karma.config.js",
67
- "test:watch": "jest --watch --verbose false --silent=false --runInBand ./test/**/*.test.ts --testPathIgnorePatterns=./test/integration --testPathIgnorePatterns=./test/fixtures",
67
+ "test:watch": "jest --watch --config=jest.config.unit.js --verbose false --silent=false",
68
68
  "format": "prettier --write '{src,test}/**/*.ts'",
69
69
  "lint": "eslint . --ext .ts --max-warnings 0",
70
70
  "perf": "./scripts/perf_test.sh",
@@ -88,5 +88,5 @@
88
88
  "engines": {
89
89
  "node": ">=18.0.0"
90
90
  },
91
- "gitHead": "5e8ee83815fd38df53c309e577f810fd910183bb"
91
+ "gitHead": "3c563434d49d4d656f8b62933f035082733af560"
92
92
  }
@@ -0,0 +1,222 @@
1
+ import { bytesToHex } from '@xrplf/isomorphic/utils'
2
+ import BigNumber from 'bignumber.js'
3
+ import { decodeAccountID } from 'ripple-address-codec'
4
+ import { decode, encode, encodeForSigningBatch } from 'ripple-binary-codec'
5
+ import { sign } from 'ripple-keypairs'
6
+
7
+ import { ValidationError } from '../errors'
8
+ import { Batch, Transaction, validate } from '../models'
9
+ import { BatchSigner, validateBatch } from '../models/transactions/batch'
10
+ import { hashSignedTx } from '../utils/hashes'
11
+
12
+ import { Wallet } from '.'
13
+
14
+ /**
15
+ * Sign a multi-account Batch transaction.
16
+ *
17
+ * @param wallet - Wallet instance.
18
+ * @param transaction - The Batch transaction to sign.
19
+ * @param opts - Additional options for regular key and multi-signing complexity.
20
+ * @param opts.batchAccount - The account submitting the inner Batch transaction, on behalf of which is this signature.
21
+ * @param opts.multisign - Specify true/false to use multisign or actual address (classic/x-address) to make multisign tx request.
22
+ * The actual address is only needed in the case of regular key usage.
23
+ * @throws ValidationError if the transaction is malformed.
24
+ */
25
+ // eslint-disable-next-line max-lines-per-function -- TODO: refactor
26
+ export function signMultiBatch(
27
+ wallet: Wallet,
28
+ transaction: Batch,
29
+ opts: { batchAccount?: string; multisign?: boolean | string } = {},
30
+ ): void {
31
+ const batchAccount = opts.batchAccount ?? wallet.classicAddress
32
+ let multisignAddress: boolean | string = false
33
+ if (typeof opts.multisign === 'string') {
34
+ multisignAddress = opts.multisign
35
+ } else if (opts.multisign) {
36
+ multisignAddress = wallet.classicAddress
37
+ }
38
+
39
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- needed for JS
40
+ if (transaction.TransactionType !== 'Batch') {
41
+ throw new ValidationError('Must be a Batch transaction.')
42
+ }
43
+
44
+ const involvedAccounts = transaction.RawTransactions.map(
45
+ (raw) => raw.RawTransaction.Account,
46
+ )
47
+ if (!involvedAccounts.includes(batchAccount)) {
48
+ throw new ValidationError(
49
+ 'Must be signing for an address included in the Batch.',
50
+ )
51
+ }
52
+ /*
53
+ * This will throw a more clear error for JS users if the supplied transaction has incorrect formatting
54
+ */
55
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- validate does not accept Transaction type
56
+ validate(transaction as unknown as Record<string, unknown>)
57
+ const fieldsToSign = {
58
+ flags: transaction.Flags,
59
+ txIDs: transaction.RawTransactions.map((rawTx) =>
60
+ hashSignedTx(rawTx.RawTransaction),
61
+ ),
62
+ }
63
+ let batchSigner: BatchSigner
64
+ if (multisignAddress) {
65
+ batchSigner = {
66
+ BatchSigner: {
67
+ Account: batchAccount,
68
+ Signers: [
69
+ {
70
+ Signer: {
71
+ Account: multisignAddress,
72
+ SigningPubKey: wallet.publicKey,
73
+ TxnSignature: sign(
74
+ encodeForSigningBatch(fieldsToSign),
75
+ wallet.privateKey,
76
+ ),
77
+ },
78
+ },
79
+ ],
80
+ },
81
+ }
82
+ } else {
83
+ batchSigner = {
84
+ BatchSigner: {
85
+ Account: batchAccount,
86
+ SigningPubKey: wallet.publicKey,
87
+ TxnSignature: sign(
88
+ encodeForSigningBatch(fieldsToSign),
89
+ wallet.privateKey,
90
+ ),
91
+ },
92
+ }
93
+ }
94
+
95
+ // eslint-disable-next-line no-param-reassign -- okay for signing
96
+ transaction.BatchSigners = [batchSigner]
97
+ }
98
+
99
+ /**
100
+ * Takes several transactions with BatchSigners fields (in object or blob form) and creates a
101
+ * single transaction with all BatchSigners that then gets signed and returned.
102
+ *
103
+ * @param transactions The transactions to combine `BatchSigners` values on.
104
+ * @returns A single signed Transaction which has all BatchSigners from transactions within it.
105
+ * @throws ValidationError if:
106
+ * - There were no transactions given to sign
107
+ * @category Signing
108
+ */
109
+ export function combineBatchSigners(
110
+ transactions: Array<Batch | string>,
111
+ ): string {
112
+ if (transactions.length === 0) {
113
+ throw new ValidationError('There are 0 transactions to combine.')
114
+ }
115
+
116
+ const decodedTransactions: Transaction[] = transactions.map((txOrBlob) => {
117
+ return getDecodedTransaction(txOrBlob)
118
+ })
119
+
120
+ decodedTransactions.forEach((tx) => {
121
+ if (tx.TransactionType !== 'Batch') {
122
+ throw new ValidationError('TransactionType must be `Batch`.')
123
+ }
124
+ /*
125
+ * This will throw a more clear error for JS users if any of the supplied transactions has incorrect formatting
126
+ */
127
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- validate does not accept Transaction type
128
+ validateBatch(tx as unknown as Record<string, unknown>)
129
+ if (tx.BatchSigners == null || tx.BatchSigners.length === 0) {
130
+ throw new ValidationError(
131
+ 'For combining Batch transaction signatures, all transactions must include a BatchSigners field containing an array of signatures.',
132
+ )
133
+ }
134
+
135
+ if (tx.TxnSignature != null || tx.Signers != null) {
136
+ throw new ValidationError('Batch transaction must be unsigned.')
137
+ }
138
+ })
139
+
140
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- checked above
141
+ const batchTransactions = decodedTransactions as Batch[]
142
+
143
+ validateBatchTransactionEquivalence(batchTransactions)
144
+
145
+ return encode(getTransactionWithAllBatchSigners(batchTransactions))
146
+ }
147
+
148
+ /**
149
+ * The transactions should all be equal except for the 'Signers' field.
150
+ *
151
+ * @param transactions - An array of Transactions which are expected to be equal other than 'Signers'.
152
+ * @throws ValidationError if the transactions are not equal in any field other than 'Signers'.
153
+ */
154
+ function validateBatchTransactionEquivalence(transactions: Batch[]): void {
155
+ const exampleTransaction = JSON.stringify({
156
+ flags: transactions[0].Flags,
157
+ transactionIDs: transactions[0].RawTransactions.map((rawTx) =>
158
+ hashSignedTx(rawTx.RawTransaction),
159
+ ),
160
+ })
161
+ if (
162
+ transactions.slice(1).some(
163
+ (tx) =>
164
+ JSON.stringify({
165
+ flags: tx.Flags,
166
+ transactionIDs: tx.RawTransactions.map((rawTx) =>
167
+ hashSignedTx(rawTx.RawTransaction),
168
+ ),
169
+ }) !== exampleTransaction,
170
+ )
171
+ ) {
172
+ throw new ValidationError(
173
+ 'Flags and transaction hashes are not the same for all provided transactions.',
174
+ )
175
+ }
176
+ }
177
+
178
+ function getTransactionWithAllBatchSigners(transactions: Batch[]): Batch {
179
+ // Signers must be sorted in the combined transaction - See compareSigners' documentation for more details
180
+ const sortedSigners: BatchSigner[] = transactions
181
+ .flatMap((tx) => tx.BatchSigners ?? [])
182
+ .filter((signer) => signer.BatchSigner.Account !== transactions[0].Account)
183
+ .sort(compareBatchSigners)
184
+
185
+ return { ...transactions[0], BatchSigners: sortedSigners }
186
+ }
187
+
188
+ /**
189
+ * If presented in binary form, the BatchSigners array must be sorted based on
190
+ * the numeric value of the signer addresses, with the lowest value first.
191
+ * (If submitted as JSON, the submit_multisigned method handles this automatically.)
192
+ * https://xrpl.org/multi-signing.html.
193
+ *
194
+ * @param left - A BatchSigner to compare with.
195
+ * @param right - A second BatchSigner to compare with.
196
+ * @returns 1 if left \> right, 0 if left = right, -1 if left \< right, and null if left or right are NaN.
197
+ */
198
+ function compareBatchSigners(left: BatchSigner, right: BatchSigner): number {
199
+ return addressToBigNumber(left.BatchSigner.Account).comparedTo(
200
+ addressToBigNumber(right.BatchSigner.Account),
201
+ )
202
+ }
203
+
204
+ // copied from signer.ts
205
+ // TODO: refactor
206
+ const NUM_BITS_IN_HEX = 16
207
+
208
+ function addressToBigNumber(address: string): BigNumber {
209
+ const hex = bytesToHex(decodeAccountID(address))
210
+ return new BigNumber(hex, NUM_BITS_IN_HEX)
211
+ }
212
+
213
+ function getDecodedTransaction(txOrBlob: Transaction | string): Transaction {
214
+ if (typeof txOrBlob === 'object') {
215
+ // We need this to handle X-addresses in multisigning
216
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- We are casting here to get strong typing
217
+ return decode(encode(txOrBlob)) as unknown as Transaction
218
+ }
219
+
220
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- We are casting here to get strong typing
221
+ return decode(txOrBlob) as unknown as Transaction
222
+ }
@@ -14,11 +14,13 @@ export interface FaucetWallet {
14
14
  export enum FaucetNetwork {
15
15
  Testnet = 'faucet.altnet.rippletest.net',
16
16
  Devnet = 'faucet.devnet.rippletest.net',
17
+ Batchnet = 'batch.faucet.nerdnest.xyz',
17
18
  }
18
19
 
19
20
  export const FaucetNetworkPaths: Record<string, string> = {
20
21
  [FaucetNetwork.Testnet]: '/accounts',
21
22
  [FaucetNetwork.Devnet]: '/accounts',
23
+ [FaucetNetwork.Batchnet]: '/accounts',
22
24
  }
23
25
 
24
26
  /**
@@ -36,6 +38,10 @@ export function getFaucetHost(client: Client): FaucetNetwork | undefined {
36
38
  return FaucetNetwork.Testnet
37
39
  }
38
40
 
41
+ if (connectionUrl.includes('batchnet')) {
42
+ return FaucetNetwork.Batchnet
43
+ }
44
+
39
45
  if (connectionUrl.includes('sidechain-net2')) {
40
46
  throw new XRPLFaucetError(
41
47
  'Cannot fund an account on an issuing chain. Accounts must be created via the bridge.',
@@ -24,6 +24,8 @@ import {
24
24
  import ECDSA from '../ECDSA'
25
25
  import { ValidationError } from '../errors'
26
26
  import { Transaction, validate } from '../models/transactions'
27
+ import { GlobalFlags } from '../models/transactions/common'
28
+ import { hasFlag } from '../models/utils/flags'
27
29
  import { ensureClassicAddress } from '../sugar/utils'
28
30
  import { omitBy } from '../utils/collections'
29
31
  import { hashSignedTx } from '../utils/hashes/hashLedger'
@@ -367,6 +369,7 @@ export class Wallet {
367
369
  * @param this - Wallet instance.
368
370
  * @param transaction - A transaction to be signed offline.
369
371
  * @param multisign - Specify true/false to use multisign or actual address (classic/x-address) to make multisign tx request.
372
+ * The actual address is only needed in the case of regular key usage.
370
373
  * @returns A signed transaction.
371
374
  * @throws ValidationError if the transaction is already signed or does not encode/decode to same result.
372
375
  * @throws XrplError if the issued currency being signed is XRP ignoring case.
@@ -381,7 +384,7 @@ export class Wallet {
381
384
  hash: string
382
385
  } {
383
386
  let multisignAddress: boolean | string = false
384
- if (typeof multisign === 'string' && multisign.startsWith('X')) {
387
+ if (typeof multisign === 'string') {
385
388
  multisignAddress = multisign
386
389
  } else if (multisign) {
387
390
  multisignAddress = this.classicAddress
@@ -407,12 +410,14 @@ export class Wallet {
407
410
  */
408
411
  // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- validate does not accept Transaction type
409
412
  validate(tx as unknown as Record<string, unknown>)
413
+ if (hasFlag(tx, GlobalFlags.tfInnerBatchTxn)) {
414
+ throw new ValidationError('Cannot sign a Batch inner transaction.')
415
+ }
410
416
 
411
417
  const txToSignAndEncode = { ...tx }
412
418
 
413
- txToSignAndEncode.SigningPubKey = multisignAddress ? '' : this.publicKey
414
-
415
419
  if (multisignAddress) {
420
+ txToSignAndEncode.SigningPubKey = ''
416
421
  const signer = {
417
422
  Account: multisignAddress,
418
423
  SigningPubKey: this.publicKey,
@@ -424,6 +429,7 @@ export class Wallet {
424
429
  }
425
430
  txToSignAndEncode.Signers = [{ Signer: signer }]
426
431
  } else {
432
+ txToSignAndEncode.SigningPubKey = this.publicKey
427
433
  txToSignAndEncode.TxnSignature = computeSignature(
428
434
  txToSignAndEncode,
429
435
  this.privateKey,
@@ -175,6 +175,7 @@ export default class RequestManager {
175
175
  * @param response - The response to handle.
176
176
  * @throws ResponseFormatError if the response format is invalid, RippledError if rippled returns an error.
177
177
  */
178
+ // eslint-disable-next-line complexity -- handling a response is complex
178
179
  public handleResponse(
179
180
  response: Partial<Response<APIVersion> | ErrorResponse>,
180
181
  ): void {
@@ -195,7 +196,9 @@ export default class RequestManager {
195
196
  // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- We know this must be true
196
197
  const errorResponse = response as Partial<ErrorResponse>
197
198
  const error = new RippledError(
198
- errorResponse.error_message ?? errorResponse.error,
199
+ errorResponse.error_message ??
200
+ errorResponse.error_exception ??
201
+ errorResponse.error,
199
202
  errorResponse,
200
203
  )
201
204
  this.reject(response.id, error)
@@ -349,7 +349,6 @@ export class Connection extends EventEmitter {
349
349
  try {
350
350
  this.requestManager.handleResponse(data)
351
351
  } catch (error) {
352
- // eslint-disable-next-line max-depth -- okay here
353
352
  if (error instanceof Error) {
354
353
  this.emit('error', 'badMessage', error.message, message)
355
354
  } else {
@@ -40,14 +40,19 @@ import type {
40
40
  MarkerRequest,
41
41
  MarkerResponse,
42
42
  SubmitResponse,
43
+ SimulateRequest,
43
44
  } from '../models/methods'
44
45
  import type { BookOffer, BookOfferCurrency } from '../models/methods/bookOffers'
46
+ import {
47
+ SimulateBinaryResponse,
48
+ SimulateJsonResponse,
49
+ } from '../models/methods/simulate'
45
50
  import type {
46
51
  EventTypes,
47
52
  OnEventToListenerMap,
48
53
  } from '../models/methods/subscribe'
49
54
  import type { SubmittableTransaction } from '../models/transactions'
50
- import { setTransactionFlagsToNumber } from '../models/utils/flags'
55
+ import { convertTxFlagsToNumber } from '../models/utils/flags'
51
56
  import {
52
57
  ensureClassicAddress,
53
58
  submitRequest,
@@ -62,6 +67,8 @@ import {
62
67
  setLatestValidatedLedgerSequence,
63
68
  checkAccountDeleteBlockers,
64
69
  txNeedsNetworkID,
70
+ autofillBatchTxn,
71
+ handleDeliverMax,
65
72
  } from '../sugar/autofill'
66
73
  import { formatBalances } from '../sugar/balances'
67
74
  import {
@@ -657,7 +664,6 @@ class Client extends EventEmitter<EventTypes> {
657
664
  * @throws ValidationError If Amount and DeliverMax fields are not identical in a Payment Transaction
658
665
  */
659
666
 
660
- // eslint-disable-next-line complexity -- handling Payment transaction API v2 requires more logic
661
667
  public async autofill<T extends SubmittableTransaction>(
662
668
  transaction: T,
663
669
  signersCount?: number,
@@ -665,7 +671,7 @@ class Client extends EventEmitter<EventTypes> {
665
671
  const tx = { ...transaction }
666
672
 
667
673
  setValidAddresses(tx)
668
- setTransactionFlagsToNumber(tx)
674
+ tx.Flags = convertTxFlagsToNumber(tx)
669
675
 
670
676
  const promises: Array<Promise<void>> = []
671
677
  if (tx.NetworkID == null) {
@@ -683,33 +689,11 @@ class Client extends EventEmitter<EventTypes> {
683
689
  if (tx.TransactionType === 'AccountDelete') {
684
690
  promises.push(checkAccountDeleteBlockers(this, tx))
685
691
  }
686
-
687
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- ignore type-assertions on the DeliverMax property
688
- // @ts-expect-error -- DeliverMax property exists only at the RPC level, not at the protocol level
689
- if (tx.TransactionType === 'Payment' && tx.DeliverMax != null) {
690
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- This is a valid null check for Amount
691
- if (tx.Amount == null) {
692
- // If only DeliverMax is provided, use it to populate the Amount field
693
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- ignore type-assertions on the DeliverMax property
694
- // @ts-expect-error -- DeliverMax property exists only at the RPC level, not at the protocol level
695
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- DeliverMax is a known RPC-level property
696
- tx.Amount = tx.DeliverMax
697
- }
698
-
699
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- ignore type-assertions on the DeliverMax property
700
- // @ts-expect-error -- DeliverMax property exists only at the RPC level, not at the protocol level
701
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- This is a valid null check for Amount
702
- if (tx.Amount != null && tx.Amount !== tx.DeliverMax) {
703
- return Promise.reject(
704
- new ValidationError(
705
- 'PaymentTransaction: Amount and DeliverMax fields must be identical when both are provided',
706
- ),
707
- )
708
- }
709
-
710
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- ignore type-assertions on the DeliverMax property
711
- // @ts-expect-error -- DeliverMax property exists only at the RPC level, not at the protocol level
712
- delete tx.DeliverMax
692
+ if (tx.TransactionType === 'Batch') {
693
+ promises.push(autofillBatchTxn(this, tx))
694
+ }
695
+ if (tx.TransactionType === 'Payment') {
696
+ handleDeliverMax(tx)
713
697
  }
714
698
 
715
699
  return Promise.all(promises).then(() => tx)
@@ -764,6 +748,41 @@ class Client extends EventEmitter<EventTypes> {
764
748
  return submitRequest(this, signedTx, opts?.failHard)
765
749
  }
766
750
 
751
+ /**
752
+ * Simulates an unsigned transaction.
753
+ * Steps performed on a transaction:
754
+ * 1. Autofill.
755
+ * 2. Sign & Encode.
756
+ * 3. Submit.
757
+ *
758
+ * @category Core
759
+ *
760
+ * @param transaction - A transaction to autofill, sign & encode, and submit.
761
+ * @param opts - (Optional) Options used to sign and submit a transaction.
762
+ * @param opts.binary - If true, return the metadata in a binary encoding.
763
+ *
764
+ * @returns A promise that contains SimulateResponse.
765
+ * @throws RippledError if the simulate request fails.
766
+ */
767
+
768
+ public async simulate<Binary extends boolean = false>(
769
+ transaction: SubmittableTransaction | string,
770
+ opts?: {
771
+ // If true, return the binary-encoded representation of the results.
772
+ binary?: Binary
773
+ },
774
+ ): Promise<
775
+ Binary extends true ? SimulateBinaryResponse : SimulateJsonResponse
776
+ > {
777
+ // send request
778
+ const binary = opts?.binary ?? false
779
+ const request: SimulateRequest =
780
+ typeof transaction === 'string'
781
+ ? { command: 'simulate', tx_blob: transaction, binary }
782
+ : { command: 'simulate', tx_json: transaction, binary }
783
+ return this.request(request)
784
+ }
785
+
767
786
  /**
768
787
  * Asynchronously submits a transaction and verifies that it has been included in a
769
788
  * validated ledger (or has errored/will not be included for some reason).
@@ -4,9 +4,16 @@ import { decode } from 'ripple-binary-codec'
4
4
  import type {
5
5
  TransactionEntryResponse,
6
6
  TransactionStream,
7
+ TransactionV1Stream,
7
8
  TxResponse,
8
9
  } from '..'
9
- import type { Amount, IssuedCurrency,APIVersion, DEFAULT_API_VERSION , MPTAmount } from '../models/common'
10
+ import type {
11
+ Amount,
12
+ IssuedCurrency,
13
+ APIVersion,
14
+ DEFAULT_API_VERSION,
15
+ MPTAmount,
16
+ } from '../models/common'
10
17
  import type {
11
18
  AccountTxTransaction,
12
19
  RequestResponseMap,
@@ -19,10 +26,13 @@ import { isFlagEnabled } from '../models/utils'
19
26
 
20
27
  const WARN_PARTIAL_PAYMENT_CODE = 2001
21
28
 
29
+ /* eslint-disable complexity -- check different token types */
30
+ /* eslint-disable @typescript-eslint/consistent-type-assertions -- known currency type */
22
31
  function amountsEqual(
23
32
  amt1: Amount | MPTAmount,
24
33
  amt2: Amount | MPTAmount,
25
34
  ): boolean {
35
+ // Compare XRP
26
36
  if (typeof amt1 === 'string' && typeof amt2 === 'string') {
27
37
  return amt1 === amt2
28
38
  }
@@ -31,13 +41,13 @@ function amountsEqual(
31
41
  return false
32
42
  }
33
43
 
44
+ // Compare MPTs
34
45
  if (isMPTAmount(amt1) && isMPTAmount(amt2)) {
35
46
  const aValue = new BigNumber(amt1.value)
36
47
  const bValue = new BigNumber(amt2.value)
37
48
 
38
49
  return (
39
- (amt1 as MPTAmount).mpt_issuance_id ===
40
- (amt2 as MPTAmount).mpt_issuance_id && aValue.isEqualTo(bValue)
50
+ amt1.mpt_issuance_id === amt2.mpt_issuance_id && aValue.isEqualTo(bValue)
41
51
  )
42
52
  }
43
53
 
@@ -45,6 +55,7 @@ function amountsEqual(
45
55
  return false
46
56
  }
47
57
 
58
+ // Compare issued currency (IOU)
48
59
  const aValue = new BigNumber(amt1.value)
49
60
  const bValue = new BigNumber(amt2.value)
50
61
 
@@ -54,6 +65,8 @@ function amountsEqual(
54
65
  aValue.isEqualTo(bValue)
55
66
  )
56
67
  }
68
+ /* eslint-enable complexity */
69
+ /* eslint-enable @typescript-eslint/consistent-type-assertions */
57
70
 
58
71
  function isPartialPayment(
59
72
  tx?: Transaction,
@@ -176,10 +189,10 @@ export function handlePartialPayment<
176
189
  * @param log - The method used for logging by the connection (to report the partial payment).
177
190
  */
178
191
  export function handleStreamPartialPayment(
179
- stream: TransactionStream,
192
+ stream: TransactionStream | TransactionV1Stream,
180
193
  log: (id: string, message: string) => void,
181
194
  ): void {
182
- if (isPartialPayment(stream.transaction, stream.meta)) {
195
+ if (isPartialPayment(stream.tx_json ?? stream.transaction, stream.meta)) {
183
196
  const warnings = stream.warnings ?? []
184
197
 
185
198
  const warning = {
@@ -162,6 +162,16 @@ export interface AuthAccount {
162
162
  }
163
163
  }
164
164
 
165
+ export interface AuthorizeCredential {
166
+ Credential: {
167
+ /** The issuer of the credential. */
168
+ Issuer: string
169
+
170
+ /** A hex-encoded value to identify the type of credential from the issuer. */
171
+ CredentialType: string
172
+ }
173
+ }
174
+
165
175
  export interface XChainBridge {
166
176
  LockingChainDoor: string
167
177
  LockingChainIssue: Currency
@@ -8,8 +8,9 @@
8
8
  */
9
9
  export * as LedgerEntry from './ledger'
10
10
  export {
11
- setTransactionFlagsToNumber,
12
11
  parseAccountRootFlags,
12
+ setTransactionFlagsToNumber,
13
+ convertTxFlagsToNumber,
13
14
  parseTransactionFlags,
14
15
  } from './utils/flags'
15
16
  export * from './methods'
@@ -0,0 +1,47 @@
1
+ import { GlobalFlagsInterface } from '../transactions/common'
2
+
3
+ import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
4
+
5
+ export interface CredentialFlags extends GlobalFlagsInterface {
6
+ lsfAccepted?: boolean
7
+ }
8
+
9
+ /**
10
+ *
11
+ * A Credential object describes a credential, similar to a passport, which is an issuable identity verifier
12
+ * that can be used as a prerequisite for other transactions
13
+ *
14
+ * @category Ledger Entries
15
+ */
16
+ export default interface Credential extends BaseLedgerEntry, HasPreviousTxnID {
17
+ LedgerEntryType: 'Credential'
18
+ /**
19
+ * A bit-map of boolean flags
20
+ */
21
+ Flags: number | CredentialFlags
22
+
23
+ /** The account that the credential is for. */
24
+ Subject: string
25
+
26
+ /** The issuer of the credential. */
27
+ Issuer: string
28
+
29
+ /** A hex-encoded value to identify the type of credential from the issuer. */
30
+ CredentialType: string
31
+
32
+ /** A hint indicating which page of the subject's owner directory links to this object,
33
+ * in case the directory consists of multiple pages.
34
+ */
35
+ SubjectNode: string
36
+
37
+ /** A hint indicating which page of the issuer's owner directory links to this object,
38
+ * in case the directory consists of multiple pages.
39
+ */
40
+ IssuerNode: string
41
+
42
+ /** Credential expiration. */
43
+ Expiration?: number
44
+
45
+ /** Additional data about the credential (such as a link to the VC document). */
46
+ URI?: string
47
+ }