xrpl 2.11.0 → 2.12.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 (318) hide show
  1. package/build/xrpl-latest-min.js +1 -1
  2. package/build/xrpl-latest-min.js.map +1 -1
  3. package/build/xrpl-latest.js +453 -51
  4. package/build/xrpl-latest.js.map +1 -1
  5. package/dist/npm/models/common/index.d.ts +8 -1
  6. package/dist/npm/models/common/index.d.ts.map +1 -1
  7. package/dist/npm/models/ledger/AMM.d.ts +5 -3
  8. package/dist/npm/models/ledger/AMM.d.ts.map +1 -1
  9. package/dist/npm/models/ledger/AccountRoot.d.ts +1 -0
  10. package/dist/npm/models/ledger/AccountRoot.d.ts.map +1 -1
  11. package/dist/npm/models/ledger/AccountRoot.js.map +1 -1
  12. package/dist/npm/models/ledger/Bridge.d.ts +17 -0
  13. package/dist/npm/models/ledger/Bridge.d.ts.map +1 -0
  14. package/dist/npm/models/ledger/Bridge.js +3 -0
  15. package/dist/npm/models/ledger/Bridge.js.map +1 -0
  16. package/dist/npm/models/ledger/LedgerEntry.d.ts +4 -1
  17. package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
  18. package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts +26 -0
  19. package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts.map +1 -0
  20. package/dist/npm/models/ledger/XChainOwnedClaimID.js +3 -0
  21. package/dist/npm/models/ledger/XChainOwnedClaimID.js.map +1 -0
  22. package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +23 -0
  23. package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -0
  24. package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.js +3 -0
  25. package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.js.map +1 -0
  26. package/dist/npm/models/ledger/index.d.ts +5 -1
  27. package/dist/npm/models/ledger/index.d.ts.map +1 -1
  28. package/dist/npm/models/ledger/index.js.map +1 -1
  29. package/dist/npm/models/methods/accountObjects.d.ts +3 -3
  30. package/dist/npm/models/methods/accountObjects.d.ts.map +1 -1
  31. package/dist/npm/models/methods/ammInfo.d.ts +4 -3
  32. package/dist/npm/models/methods/ammInfo.d.ts.map +1 -1
  33. package/dist/npm/models/methods/ledgerEntry.d.ts +17 -0
  34. package/dist/npm/models/methods/ledgerEntry.d.ts.map +1 -1
  35. package/dist/npm/models/methods/serverInfo.d.ts +6 -0
  36. package/dist/npm/models/methods/serverInfo.d.ts.map +1 -1
  37. package/dist/npm/models/transactions/AMMBid.d.ts +3 -3
  38. package/dist/npm/models/transactions/AMMBid.d.ts.map +1 -1
  39. package/dist/npm/models/transactions/AMMBid.js.map +1 -1
  40. package/dist/npm/models/transactions/AMMDeposit.d.ts.map +1 -1
  41. package/dist/npm/models/transactions/AMMDeposit.js.map +1 -1
  42. package/dist/npm/models/transactions/AMMWithdraw.d.ts.map +1 -1
  43. package/dist/npm/models/transactions/AMMWithdraw.js.map +1 -1
  44. package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts +11 -0
  45. package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -0
  46. package/dist/npm/models/transactions/XChainAccountCreateCommit.js +14 -0
  47. package/dist/npm/models/transactions/XChainAccountCreateCommit.js.map +1 -0
  48. package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts +18 -0
  49. package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -0
  50. package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js +20 -0
  51. package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -0
  52. package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts +17 -0
  53. package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -0
  54. package/dist/npm/models/transactions/XChainAddClaimAttestation.js +19 -0
  55. package/dist/npm/models/transactions/XChainAddClaimAttestation.js.map +1 -0
  56. package/dist/npm/models/transactions/XChainClaim.d.ts +12 -0
  57. package/dist/npm/models/transactions/XChainClaim.d.ts.map +1 -0
  58. package/dist/npm/models/transactions/XChainClaim.js +14 -0
  59. package/dist/npm/models/transactions/XChainClaim.js.map +1 -0
  60. package/dist/npm/models/transactions/XChainCommit.d.ts +11 -0
  61. package/dist/npm/models/transactions/XChainCommit.d.ts.map +1 -0
  62. package/dist/npm/models/transactions/XChainCommit.js +13 -0
  63. package/dist/npm/models/transactions/XChainCommit.js.map +1 -0
  64. package/dist/npm/models/transactions/XChainCreateBridge.d.ts +10 -0
  65. package/dist/npm/models/transactions/XChainCreateBridge.d.ts.map +1 -0
  66. package/dist/npm/models/transactions/XChainCreateBridge.js +12 -0
  67. package/dist/npm/models/transactions/XChainCreateBridge.js.map +1 -0
  68. package/dist/npm/models/transactions/XChainCreateClaimID.d.ts +10 -0
  69. package/dist/npm/models/transactions/XChainCreateClaimID.d.ts.map +1 -0
  70. package/dist/npm/models/transactions/XChainCreateClaimID.js +12 -0
  71. package/dist/npm/models/transactions/XChainCreateClaimID.js.map +1 -0
  72. package/dist/npm/models/transactions/XChainModifyBridge.d.ts +17 -0
  73. package/dist/npm/models/transactions/XChainModifyBridge.d.ts.map +1 -0
  74. package/dist/npm/models/transactions/XChainModifyBridge.js +16 -0
  75. package/dist/npm/models/transactions/XChainModifyBridge.js.map +1 -0
  76. package/dist/npm/models/transactions/accountSet.d.ts.map +1 -1
  77. package/dist/npm/models/transactions/accountSet.js.map +1 -1
  78. package/dist/npm/models/transactions/checkCash.d.ts.map +1 -1
  79. package/dist/npm/models/transactions/checkCash.js.map +1 -1
  80. package/dist/npm/models/transactions/checkCreate.d.ts.map +1 -1
  81. package/dist/npm/models/transactions/checkCreate.js.map +1 -1
  82. package/dist/npm/models/transactions/common.d.ts +6 -1
  83. package/dist/npm/models/transactions/common.d.ts.map +1 -1
  84. package/dist/npm/models/transactions/common.js +43 -38
  85. package/dist/npm/models/transactions/common.js.map +1 -1
  86. package/dist/npm/models/transactions/depositPreauth.d.ts.map +1 -1
  87. package/dist/npm/models/transactions/depositPreauth.js.map +1 -1
  88. package/dist/npm/models/transactions/escrowCancel.d.ts +1 -1
  89. package/dist/npm/models/transactions/escrowCancel.d.ts.map +1 -1
  90. package/dist/npm/models/transactions/escrowCancel.js +5 -3
  91. package/dist/npm/models/transactions/escrowCancel.js.map +1 -1
  92. package/dist/npm/models/transactions/escrowCreate.d.ts.map +1 -1
  93. package/dist/npm/models/transactions/escrowCreate.js.map +1 -1
  94. package/dist/npm/models/transactions/escrowFinish.d.ts +1 -1
  95. package/dist/npm/models/transactions/escrowFinish.d.ts.map +1 -1
  96. package/dist/npm/models/transactions/escrowFinish.js +5 -3
  97. package/dist/npm/models/transactions/escrowFinish.js.map +1 -1
  98. package/dist/npm/models/transactions/index.d.ts +9 -1
  99. package/dist/npm/models/transactions/index.d.ts.map +1 -1
  100. package/dist/npm/models/transactions/index.js +3 -1
  101. package/dist/npm/models/transactions/index.js.map +1 -1
  102. package/dist/npm/models/transactions/offerCreate.d.ts.map +1 -1
  103. package/dist/npm/models/transactions/offerCreate.js.map +1 -1
  104. package/dist/npm/models/transactions/payment.d.ts.map +1 -1
  105. package/dist/npm/models/transactions/payment.js.map +1 -1
  106. package/dist/npm/models/transactions/paymentChannelClaim.d.ts.map +1 -1
  107. package/dist/npm/models/transactions/paymentChannelClaim.js.map +1 -1
  108. package/dist/npm/models/transactions/paymentChannelCreate.d.ts.map +1 -1
  109. package/dist/npm/models/transactions/paymentChannelCreate.js.map +1 -1
  110. package/dist/npm/models/transactions/signerListSet.d.ts.map +1 -1
  111. package/dist/npm/models/transactions/signerListSet.js.map +1 -1
  112. package/dist/npm/models/transactions/transaction.d.ts +9 -1
  113. package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
  114. package/dist/npm/models/transactions/transaction.js +32 -0
  115. package/dist/npm/models/transactions/transaction.js.map +1 -1
  116. package/dist/npm/models/utils/flags.d.ts.map +1 -1
  117. package/dist/npm/models/utils/flags.js +4 -0
  118. package/dist/npm/models/utils/flags.js.map +1 -1
  119. package/dist/npm/snippets/src/bridgeTransfer.d.ts +2 -0
  120. package/dist/npm/snippets/src/bridgeTransfer.d.ts.map +1 -0
  121. package/dist/npm/snippets/src/bridgeTransfer.js +126 -0
  122. package/dist/npm/snippets/src/bridgeTransfer.js.map +1 -0
  123. package/dist/npm/src/models/common/index.d.ts +8 -1
  124. package/dist/npm/src/models/common/index.d.ts.map +1 -1
  125. package/dist/npm/src/models/ledger/AMM.d.ts +5 -3
  126. package/dist/npm/src/models/ledger/AMM.d.ts.map +1 -1
  127. package/dist/npm/src/models/ledger/AccountRoot.d.ts +1 -0
  128. package/dist/npm/src/models/ledger/AccountRoot.d.ts.map +1 -1
  129. package/dist/npm/src/models/ledger/AccountRoot.js.map +1 -1
  130. package/dist/npm/src/models/ledger/Bridge.d.ts +17 -0
  131. package/dist/npm/src/models/ledger/Bridge.d.ts.map +1 -0
  132. package/dist/npm/src/models/ledger/Bridge.js +3 -0
  133. package/dist/npm/src/models/ledger/Bridge.js.map +1 -0
  134. package/dist/npm/src/models/ledger/LedgerEntry.d.ts +4 -1
  135. package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
  136. package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts +26 -0
  137. package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts.map +1 -0
  138. package/dist/npm/src/models/ledger/XChainOwnedClaimID.js +3 -0
  139. package/dist/npm/src/models/ledger/XChainOwnedClaimID.js.map +1 -0
  140. package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +23 -0
  141. package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -0
  142. package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.js +3 -0
  143. package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.js.map +1 -0
  144. package/dist/npm/src/models/ledger/index.d.ts +5 -1
  145. package/dist/npm/src/models/ledger/index.d.ts.map +1 -1
  146. package/dist/npm/src/models/ledger/index.js.map +1 -1
  147. package/dist/npm/src/models/methods/accountObjects.d.ts +3 -3
  148. package/dist/npm/src/models/methods/accountObjects.d.ts.map +1 -1
  149. package/dist/npm/src/models/methods/ammInfo.d.ts +4 -3
  150. package/dist/npm/src/models/methods/ammInfo.d.ts.map +1 -1
  151. package/dist/npm/src/models/methods/ledgerEntry.d.ts +17 -0
  152. package/dist/npm/src/models/methods/ledgerEntry.d.ts.map +1 -1
  153. package/dist/npm/src/models/methods/serverInfo.d.ts +6 -0
  154. package/dist/npm/src/models/methods/serverInfo.d.ts.map +1 -1
  155. package/dist/npm/src/models/transactions/AMMBid.d.ts +3 -3
  156. package/dist/npm/src/models/transactions/AMMBid.d.ts.map +1 -1
  157. package/dist/npm/src/models/transactions/AMMBid.js.map +1 -1
  158. package/dist/npm/src/models/transactions/AMMDeposit.d.ts.map +1 -1
  159. package/dist/npm/src/models/transactions/AMMDeposit.js.map +1 -1
  160. package/dist/npm/src/models/transactions/AMMWithdraw.d.ts.map +1 -1
  161. package/dist/npm/src/models/transactions/AMMWithdraw.js.map +1 -1
  162. package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts +11 -0
  163. package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -0
  164. package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js +14 -0
  165. package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js.map +1 -0
  166. package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts +18 -0
  167. package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -0
  168. package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js +20 -0
  169. package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -0
  170. package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts +17 -0
  171. package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -0
  172. package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js +19 -0
  173. package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js.map +1 -0
  174. package/dist/npm/src/models/transactions/XChainClaim.d.ts +12 -0
  175. package/dist/npm/src/models/transactions/XChainClaim.d.ts.map +1 -0
  176. package/dist/npm/src/models/transactions/XChainClaim.js +14 -0
  177. package/dist/npm/src/models/transactions/XChainClaim.js.map +1 -0
  178. package/dist/npm/src/models/transactions/XChainCommit.d.ts +11 -0
  179. package/dist/npm/src/models/transactions/XChainCommit.d.ts.map +1 -0
  180. package/dist/npm/src/models/transactions/XChainCommit.js +13 -0
  181. package/dist/npm/src/models/transactions/XChainCommit.js.map +1 -0
  182. package/dist/npm/src/models/transactions/XChainCreateBridge.d.ts +10 -0
  183. package/dist/npm/src/models/transactions/XChainCreateBridge.d.ts.map +1 -0
  184. package/dist/npm/src/models/transactions/XChainCreateBridge.js +12 -0
  185. package/dist/npm/src/models/transactions/XChainCreateBridge.js.map +1 -0
  186. package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts +10 -0
  187. package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts.map +1 -0
  188. package/dist/npm/src/models/transactions/XChainCreateClaimID.js +12 -0
  189. package/dist/npm/src/models/transactions/XChainCreateClaimID.js.map +1 -0
  190. package/dist/npm/src/models/transactions/XChainModifyBridge.d.ts +17 -0
  191. package/dist/npm/src/models/transactions/XChainModifyBridge.d.ts.map +1 -0
  192. package/dist/npm/src/models/transactions/XChainModifyBridge.js +16 -0
  193. package/dist/npm/src/models/transactions/XChainModifyBridge.js.map +1 -0
  194. package/dist/npm/src/models/transactions/accountSet.d.ts.map +1 -1
  195. package/dist/npm/src/models/transactions/accountSet.js.map +1 -1
  196. package/dist/npm/src/models/transactions/checkCash.d.ts.map +1 -1
  197. package/dist/npm/src/models/transactions/checkCash.js.map +1 -1
  198. package/dist/npm/src/models/transactions/checkCreate.d.ts.map +1 -1
  199. package/dist/npm/src/models/transactions/checkCreate.js.map +1 -1
  200. package/dist/npm/src/models/transactions/common.d.ts +6 -1
  201. package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
  202. package/dist/npm/src/models/transactions/common.js +43 -38
  203. package/dist/npm/src/models/transactions/common.js.map +1 -1
  204. package/dist/npm/src/models/transactions/depositPreauth.d.ts.map +1 -1
  205. package/dist/npm/src/models/transactions/depositPreauth.js.map +1 -1
  206. package/dist/npm/src/models/transactions/escrowCancel.d.ts +1 -1
  207. package/dist/npm/src/models/transactions/escrowCancel.d.ts.map +1 -1
  208. package/dist/npm/src/models/transactions/escrowCancel.js +5 -3
  209. package/dist/npm/src/models/transactions/escrowCancel.js.map +1 -1
  210. package/dist/npm/src/models/transactions/escrowCreate.d.ts.map +1 -1
  211. package/dist/npm/src/models/transactions/escrowCreate.js.map +1 -1
  212. package/dist/npm/src/models/transactions/escrowFinish.d.ts +1 -1
  213. package/dist/npm/src/models/transactions/escrowFinish.d.ts.map +1 -1
  214. package/dist/npm/src/models/transactions/escrowFinish.js +5 -3
  215. package/dist/npm/src/models/transactions/escrowFinish.js.map +1 -1
  216. package/dist/npm/src/models/transactions/index.d.ts +9 -1
  217. package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
  218. package/dist/npm/src/models/transactions/index.js +3 -1
  219. package/dist/npm/src/models/transactions/index.js.map +1 -1
  220. package/dist/npm/src/models/transactions/offerCreate.d.ts.map +1 -1
  221. package/dist/npm/src/models/transactions/offerCreate.js.map +1 -1
  222. package/dist/npm/src/models/transactions/payment.d.ts.map +1 -1
  223. package/dist/npm/src/models/transactions/payment.js.map +1 -1
  224. package/dist/npm/src/models/transactions/paymentChannelClaim.d.ts.map +1 -1
  225. package/dist/npm/src/models/transactions/paymentChannelClaim.js.map +1 -1
  226. package/dist/npm/src/models/transactions/paymentChannelCreate.d.ts.map +1 -1
  227. package/dist/npm/src/models/transactions/paymentChannelCreate.js.map +1 -1
  228. package/dist/npm/src/models/transactions/signerListSet.d.ts.map +1 -1
  229. package/dist/npm/src/models/transactions/signerListSet.js.map +1 -1
  230. package/dist/npm/src/models/transactions/transaction.d.ts +9 -1
  231. package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
  232. package/dist/npm/src/models/transactions/transaction.js +32 -0
  233. package/dist/npm/src/models/transactions/transaction.js.map +1 -1
  234. package/dist/npm/src/models/utils/flags.d.ts.map +1 -1
  235. package/dist/npm/src/models/utils/flags.js +4 -0
  236. package/dist/npm/src/models/utils/flags.js.map +1 -1
  237. package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
  238. package/dist/npm/src/sugar/autofill.js.map +1 -1
  239. package/dist/npm/src/utils/getXChainClaimID.d.ts +3 -0
  240. package/dist/npm/src/utils/getXChainClaimID.d.ts.map +1 -0
  241. package/dist/npm/src/utils/getXChainClaimID.js +29 -0
  242. package/dist/npm/src/utils/getXChainClaimID.js.map +1 -0
  243. package/dist/npm/src/utils/index.d.ts +2 -1
  244. package/dist/npm/src/utils/index.d.ts.map +1 -1
  245. package/dist/npm/src/utils/index.js +3 -1
  246. package/dist/npm/src/utils/index.js.map +1 -1
  247. package/dist/npm/src/utils/signPaymentChannelClaim.d.ts +1 -1
  248. package/dist/npm/src/utils/signPaymentChannelClaim.d.ts.map +1 -1
  249. package/dist/npm/src/utils/signPaymentChannelClaim.js +2 -2
  250. package/dist/npm/src/utils/signPaymentChannelClaim.js.map +1 -1
  251. package/dist/npm/src/utils/verifyPaymentChannelClaim.d.ts +1 -1
  252. package/dist/npm/src/utils/verifyPaymentChannelClaim.d.ts.map +1 -1
  253. package/dist/npm/src/utils/verifyPaymentChannelClaim.js +2 -2
  254. package/dist/npm/src/utils/verifyPaymentChannelClaim.js.map +1 -1
  255. package/dist/npm/sugar/autofill.d.ts.map +1 -1
  256. package/dist/npm/sugar/autofill.js.map +1 -1
  257. package/dist/npm/utils/getXChainClaimID.d.ts +3 -0
  258. package/dist/npm/utils/getXChainClaimID.d.ts.map +1 -0
  259. package/dist/npm/utils/getXChainClaimID.js +29 -0
  260. package/dist/npm/utils/getXChainClaimID.js.map +1 -0
  261. package/dist/npm/utils/index.d.ts +2 -1
  262. package/dist/npm/utils/index.d.ts.map +1 -1
  263. package/dist/npm/utils/index.js +3 -1
  264. package/dist/npm/utils/index.js.map +1 -1
  265. package/dist/npm/utils/signPaymentChannelClaim.d.ts +1 -1
  266. package/dist/npm/utils/signPaymentChannelClaim.d.ts.map +1 -1
  267. package/dist/npm/utils/signPaymentChannelClaim.js +2 -2
  268. package/dist/npm/utils/signPaymentChannelClaim.js.map +1 -1
  269. package/dist/npm/utils/verifyPaymentChannelClaim.d.ts +1 -1
  270. package/dist/npm/utils/verifyPaymentChannelClaim.d.ts.map +1 -1
  271. package/dist/npm/utils/verifyPaymentChannelClaim.js +2 -2
  272. package/dist/npm/utils/verifyPaymentChannelClaim.js.map +1 -1
  273. package/package.json +6 -7
  274. package/src/models/common/index.ts +9 -1
  275. package/src/models/ledger/AMM.ts +11 -3
  276. package/src/models/ledger/AccountRoot.ts +6 -0
  277. package/src/models/ledger/Bridge.ts +84 -0
  278. package/src/models/ledger/LedgerEntry.ts +6 -0
  279. package/src/models/ledger/XChainOwnedClaimID.ts +89 -0
  280. package/src/models/ledger/XChainOwnedCreateAccountClaimID.ts +74 -0
  281. package/src/models/ledger/index.ts +9 -0
  282. package/src/models/methods/accountObjects.ts +12 -0
  283. package/src/models/methods/ammInfo.ts +8 -3
  284. package/src/models/methods/ledgerEntry.ts +25 -0
  285. package/src/models/methods/serverInfo.ts +21 -0
  286. package/src/models/transactions/AMMBid.ts +5 -6
  287. package/src/models/transactions/AMMDeposit.ts +0 -1
  288. package/src/models/transactions/AMMWithdraw.ts +0 -1
  289. package/src/models/transactions/XChainAccountCreateCommit.ts +69 -0
  290. package/src/models/transactions/XChainAddAccountCreateAttestation.ts +121 -0
  291. package/src/models/transactions/XChainAddClaimAttestation.ts +115 -0
  292. package/src/models/transactions/XChainClaim.ts +77 -0
  293. package/src/models/transactions/XChainCommit.ts +74 -0
  294. package/src/models/transactions/XChainCreateBridge.ts +56 -0
  295. package/src/models/transactions/XChainCreateClaimID.ts +53 -0
  296. package/src/models/transactions/XChainModifyBridge.ts +77 -0
  297. package/src/models/transactions/accountSet.ts +0 -2
  298. package/src/models/transactions/checkCash.ts +0 -1
  299. package/src/models/transactions/checkCreate.ts +0 -1
  300. package/src/models/transactions/common.ts +108 -54
  301. package/src/models/transactions/depositPreauth.ts +0 -1
  302. package/src/models/transactions/escrowCancel.ts +8 -4
  303. package/src/models/transactions/escrowCreate.ts +0 -1
  304. package/src/models/transactions/escrowFinish.ts +8 -4
  305. package/src/models/transactions/index.ts +13 -1
  306. package/src/models/transactions/offerCreate.ts +0 -1
  307. package/src/models/transactions/payment.ts +0 -1
  308. package/src/models/transactions/paymentChannelClaim.ts +0 -1
  309. package/src/models/transactions/paymentChannelCreate.ts +0 -1
  310. package/src/models/transactions/signerListSet.ts +0 -1
  311. package/src/models/transactions/transaction.ts +67 -1
  312. package/src/models/utils/flags.ts +4 -0
  313. package/src/sugar/autofill.ts +0 -2
  314. package/src/utils/getXChainClaimID.ts +64 -0
  315. package/src/utils/index.ts +2 -0
  316. package/src/utils/signPaymentChannelClaim.ts +3 -3
  317. package/src/utils/verifyPaymentChannelClaim.ts +3 -3
  318. package/dist/npm/snippets/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,121 @@
1
+ import { Amount, XChainBridge } from '../common'
2
+
3
+ import {
4
+ BaseTransaction,
5
+ isAmount,
6
+ isNumber,
7
+ isString,
8
+ isXChainBridge,
9
+ validateBaseTransaction,
10
+ validateRequiredField,
11
+ } from './common'
12
+
13
+ /**
14
+ * The XChainAddAccountCreateAttestation transaction provides an attestation
15
+ * from a witness server that a {@link XChainAccountCreateCommit} transaction
16
+ * occurred on the other chain.
17
+ *
18
+ * @category Transaction Models
19
+ */
20
+ export interface XChainAddAccountCreateAttestation extends BaseTransaction {
21
+ TransactionType: 'XChainAddAccountCreateAttestation'
22
+
23
+ /**
24
+ * The amount committed by the {@link XChainAccountCreateCommit} transaction
25
+ * on the source chain.
26
+ */
27
+ Amount: Amount
28
+
29
+ /**
30
+ * The account that should receive this signer's share of the SignatureReward.
31
+ */
32
+ AttestationRewardAccount: string
33
+
34
+ /**
35
+ * The account on the door account's signer list that is signing the transaction.
36
+ */
37
+ AttestationSignerAccount: string
38
+
39
+ /**
40
+ * The destination account for the funds on the destination chain.
41
+ */
42
+ Destination: string
43
+
44
+ /**
45
+ * The account on the source chain that submitted the {@link XChainAccountCreateCommit}
46
+ * transaction that triggered the event associated with the attestation.
47
+ */
48
+ OtherChainSource: string
49
+
50
+ /**
51
+ * The public key used to verify the signature.
52
+ */
53
+ PublicKey: string
54
+
55
+ /**
56
+ * The signature attesting to the event on the other chain.
57
+ */
58
+ Signature: string
59
+
60
+ /**
61
+ * The signature reward paid in the {@link XChainAccountCreateCommit} transaction.
62
+ */
63
+ SignatureReward: Amount
64
+
65
+ /**
66
+ * A boolean representing the chain where the event occurred.
67
+ */
68
+ WasLockingChainSend: 0 | 1
69
+
70
+ /**
71
+ * The counter that represents the order that the claims must be processed in.
72
+ */
73
+ XChainAccountCreateCount: number | string
74
+
75
+ /**
76
+ * The bridge associated with the attestation.
77
+ */
78
+ XChainBridge: XChainBridge
79
+ }
80
+
81
+ /**
82
+ * Verify the form and type of an XChainAddAccountCreateAttestation at runtime.
83
+ *
84
+ * @param tx - An XChainAddAccountCreateAttestation Transaction.
85
+ * @throws When the XChainAddAccountCreateAttestation is malformed.
86
+ */
87
+ export function validateXChainAddAccountCreateAttestation(
88
+ tx: Record<string, unknown>,
89
+ ): void {
90
+ validateBaseTransaction(tx)
91
+
92
+ validateRequiredField(tx, 'Amount', isAmount)
93
+
94
+ validateRequiredField(tx, 'AttestationRewardAccount', isString)
95
+
96
+ validateRequiredField(tx, 'AttestationSignerAccount', isString)
97
+
98
+ validateRequiredField(tx, 'Destination', isString)
99
+
100
+ validateRequiredField(tx, 'OtherChainSource', isString)
101
+
102
+ validateRequiredField(tx, 'PublicKey', isString)
103
+
104
+ validateRequiredField(tx, 'Signature', isString)
105
+
106
+ validateRequiredField(tx, 'SignatureReward', isAmount)
107
+
108
+ validateRequiredField(
109
+ tx,
110
+ 'WasLockingChainSend',
111
+ (inp) => inp === 0 || inp === 1,
112
+ )
113
+
114
+ validateRequiredField(
115
+ tx,
116
+ 'XChainAccountCreateCount',
117
+ (inp) => isNumber(inp) || isString(inp),
118
+ )
119
+
120
+ validateRequiredField(tx, 'XChainBridge', isXChainBridge)
121
+ }
@@ -0,0 +1,115 @@
1
+ import { Amount, XChainBridge } from '../common'
2
+
3
+ import {
4
+ BaseTransaction,
5
+ isAmount,
6
+ isNumber,
7
+ isString,
8
+ isXChainBridge,
9
+ validateBaseTransaction,
10
+ validateOptionalField,
11
+ validateRequiredField,
12
+ } from './common'
13
+
14
+ /**
15
+ * The XChainAddClaimAttestation transaction provides proof from a witness server,
16
+ * attesting to an {@link XChainCommit} transaction.
17
+ *
18
+ * @category Transaction Models
19
+ */
20
+ export interface XChainAddClaimAttestation extends BaseTransaction {
21
+ TransactionType: 'XChainAddClaimAttestation'
22
+
23
+ /**
24
+ * The amount committed by the {@link XChainCommit} transaction on the source chain.
25
+ */
26
+ Amount: Amount
27
+
28
+ /**
29
+ * The account that should receive this signer's share of the SignatureReward.
30
+ */
31
+ AttestationRewardAccount: string
32
+
33
+ /**
34
+ * The account on the door account's signer list that is signing the transaction.
35
+ */
36
+ AttestationSignerAccount: string
37
+
38
+ /**
39
+ * The destination account for the funds on the destination chain (taken from
40
+ * the {@link XChainCommit} transaction).
41
+ */
42
+ Destination?: string
43
+
44
+ /**
45
+ * The account on the source chain that submitted the {@link XChainCommit}
46
+ * transaction that triggered the event associated with the attestation.
47
+ */
48
+ OtherChainSource: string
49
+
50
+ /**
51
+ * The public key used to verify the attestation signature.
52
+ */
53
+ PublicKey: string
54
+
55
+ /**
56
+ * The signature attesting to the event on the other chain.
57
+ */
58
+ Signature: string
59
+
60
+ /**
61
+ * A boolean representing the chain where the event occurred.
62
+ */
63
+ WasLockingChainSend: 0 | 1
64
+
65
+ /**
66
+ * The bridge to use to transfer funds.
67
+ */
68
+ XChainBridge: XChainBridge
69
+
70
+ /**
71
+ * The XChainClaimID associated with the transfer, which was included in the
72
+ * {@link XChainCommit} transaction.
73
+ */
74
+ XChainClaimID: number | string
75
+ }
76
+
77
+ /**
78
+ * Verify the form and type of an XChainAddClaimAttestation at runtime.
79
+ *
80
+ * @param tx - An XChainAddClaimAttestation Transaction.
81
+ * @throws When the XChainAddClaimAttestation is malformed.
82
+ */
83
+ export function validateXChainAddClaimAttestation(
84
+ tx: Record<string, unknown>,
85
+ ): void {
86
+ validateBaseTransaction(tx)
87
+
88
+ validateRequiredField(tx, 'Amount', isAmount)
89
+
90
+ validateRequiredField(tx, 'AttestationRewardAccount', isString)
91
+
92
+ validateRequiredField(tx, 'AttestationSignerAccount', isString)
93
+
94
+ validateOptionalField(tx, 'Destination', isString)
95
+
96
+ validateRequiredField(tx, 'OtherChainSource', isString)
97
+
98
+ validateRequiredField(tx, 'PublicKey', isString)
99
+
100
+ validateRequiredField(tx, 'Signature', isString)
101
+
102
+ validateRequiredField(
103
+ tx,
104
+ 'WasLockingChainSend',
105
+ (inp) => inp === 0 || inp === 1,
106
+ )
107
+
108
+ validateRequiredField(tx, 'XChainBridge', isXChainBridge)
109
+
110
+ validateRequiredField(
111
+ tx,
112
+ 'XChainClaimID',
113
+ (inp) => isNumber(inp) || isString(inp),
114
+ )
115
+ }
@@ -0,0 +1,77 @@
1
+ import { Amount, XChainBridge } from '../common'
2
+
3
+ import {
4
+ BaseTransaction,
5
+ isAmount,
6
+ isNumber,
7
+ isString,
8
+ isXChainBridge,
9
+ validateBaseTransaction,
10
+ validateOptionalField,
11
+ validateRequiredField,
12
+ } from './common'
13
+
14
+ /**
15
+ * The XChainClaim transaction completes a cross-chain transfer of value. It
16
+ * allows a user to claim the value on the destination chain - the equivalent
17
+ * of the value locked on the source chain.
18
+ *
19
+ * @category Transaction Models
20
+ */
21
+ export interface XChainClaim extends BaseTransaction {
22
+ TransactionType: 'XChainClaim'
23
+
24
+ /**
25
+ * The bridge to use for the transfer.
26
+ */
27
+ XChainBridge: XChainBridge
28
+
29
+ /**
30
+ * The unique integer ID for the cross-chain transfer that was referenced in the
31
+ * corresponding {@link XChainCommit} transaction.
32
+ */
33
+ XChainClaimID: number | string
34
+
35
+ /**
36
+ * The destination account on the destination chain. It must exist or the
37
+ * transaction will fail. However, if the transaction fails in this case, the
38
+ * sequence number and collected signatures won't be destroyed, and the
39
+ * transaction can be rerun with a different destination.
40
+ */
41
+ Destination: string
42
+
43
+ /**
44
+ * An integer destination tag.
45
+ */
46
+ DestinationTag?: number
47
+
48
+ /**
49
+ * The amount to claim on the destination chain. This must match the amount
50
+ * attested to on the attestations associated with this XChainClaimID.
51
+ */
52
+ Amount: Amount
53
+ }
54
+
55
+ /**
56
+ * Verify the form and type of an XChainClaim at runtime.
57
+ *
58
+ * @param tx - An XChainClaim Transaction.
59
+ * @throws When the XChainClaim is malformed.
60
+ */
61
+ export function validateXChainClaim(tx: Record<string, unknown>): void {
62
+ validateBaseTransaction(tx)
63
+
64
+ validateRequiredField(tx, 'XChainBridge', isXChainBridge)
65
+
66
+ validateRequiredField(
67
+ tx,
68
+ 'XChainClaimID',
69
+ (inp) => isNumber(inp) || isString(inp),
70
+ )
71
+
72
+ validateRequiredField(tx, 'Destination', isString)
73
+
74
+ validateOptionalField(tx, 'DestinationTag', isNumber)
75
+
76
+ validateRequiredField(tx, 'Amount', isAmount)
77
+ }
@@ -0,0 +1,74 @@
1
+ import { Amount, XChainBridge } from '../common'
2
+
3
+ import {
4
+ BaseTransaction,
5
+ isAmount,
6
+ isNumber,
7
+ isString,
8
+ isXChainBridge,
9
+ validateBaseTransaction,
10
+ validateOptionalField,
11
+ validateRequiredField,
12
+ } from './common'
13
+
14
+ /**
15
+ * The XChainCommit is the second step in a cross-chain transfer. It puts assets
16
+ * into trust on the locking chain so that they can be wrapped on the issuing
17
+ * chain, or burns wrapped assets on the issuing chain so that they can be returned
18
+ * on the locking chain.
19
+ *
20
+ * @category Transaction Models
21
+ */
22
+ export interface XChainCommit extends BaseTransaction {
23
+ TransactionType: 'XChainCommit'
24
+
25
+ /**
26
+ * The bridge to use to transfer funds.
27
+ */
28
+ XChainBridge: XChainBridge
29
+
30
+ /**
31
+ * The unique integer ID for a cross-chain transfer. This must be acquired on
32
+ * the destination chain (via a {@link XChainCreateClaimID} transaction) and
33
+ * checked from a validated ledger before submitting this transaction. If an
34
+ * incorrect sequence number is specified, the funds will be lost.
35
+ */
36
+ XChainClaimID: number | string
37
+
38
+ /**
39
+ * The destination account on the destination chain. If this is not specified,
40
+ * the account that submitted the {@link XChainCreateClaimID} transaction on the
41
+ * destination chain will need to submit a {@link XChainClaim} transaction to
42
+ * claim the funds.
43
+ */
44
+ OtherChainDestination?: string
45
+
46
+ /**
47
+ * The asset to commit, and the quantity. This must match the door account's
48
+ * LockingChainIssue (if on the locking chain) or the door account's
49
+ * IssuingChainIssue (if on the issuing chain).
50
+ */
51
+ Amount: Amount
52
+ }
53
+
54
+ /**
55
+ * Verify the form and type of an XChainCommit at runtime.
56
+ *
57
+ * @param tx - An XChainCommit Transaction.
58
+ * @throws When the XChainCommit is malformed.
59
+ */
60
+ export function validateXChainCommit(tx: Record<string, unknown>): void {
61
+ validateBaseTransaction(tx)
62
+
63
+ validateRequiredField(tx, 'XChainBridge', isXChainBridge)
64
+
65
+ validateRequiredField(
66
+ tx,
67
+ 'XChainClaimID',
68
+ (inp) => isNumber(inp) || isString(inp),
69
+ )
70
+
71
+ validateOptionalField(tx, 'OtherChainDestination', isString)
72
+
73
+ validateRequiredField(tx, 'Amount', isAmount)
74
+ }
@@ -0,0 +1,56 @@
1
+ import { Amount, XChainBridge } from '../common'
2
+
3
+ import {
4
+ BaseTransaction,
5
+ isAmount,
6
+ isXChainBridge,
7
+ validateBaseTransaction,
8
+ validateOptionalField,
9
+ validateRequiredField,
10
+ } from './common'
11
+
12
+ /**
13
+ * The XChainCreateBridge transaction creates a new {@link Bridge} ledger object
14
+ * and defines a new cross-chain bridge entrance on the chain that the transaction
15
+ * is submitted on. It includes information about door accounts and assets for the
16
+ * bridge.
17
+ *
18
+ * @category Transaction Models
19
+ */
20
+ export interface XChainCreateBridge extends BaseTransaction {
21
+ TransactionType: 'XChainCreateBridge'
22
+
23
+ /**
24
+ * The bridge (door accounts and assets) to create.
25
+ */
26
+ XChainBridge: XChainBridge
27
+
28
+ /**
29
+ * The total amount to pay the witness servers for their signatures. This amount
30
+ * will be split among the signers.
31
+ */
32
+ SignatureReward: Amount
33
+
34
+ /**
35
+ * The minimum amount, in XRP, required for a {@link XChainAccountCreateCommit}
36
+ * transaction. If this isn't present, the {@link XChainAccountCreateCommit}
37
+ * transaction will fail. This field can only be present on XRP-XRP bridges.
38
+ */
39
+ MinAccountCreateAmount?: Amount
40
+ }
41
+
42
+ /**
43
+ * Verify the form and type of an XChainCreateBridge at runtime.
44
+ *
45
+ * @param tx - An XChainCreateBridge Transaction.
46
+ * @throws When the XChainCreateBridge is malformed.
47
+ */
48
+ export function validateXChainCreateBridge(tx: Record<string, unknown>): void {
49
+ validateBaseTransaction(tx)
50
+
51
+ validateRequiredField(tx, 'XChainBridge', isXChainBridge)
52
+
53
+ validateRequiredField(tx, 'SignatureReward', isAmount)
54
+
55
+ validateOptionalField(tx, 'MinAccountCreateAmount', isAmount)
56
+ }
@@ -0,0 +1,53 @@
1
+ import { Amount, XChainBridge } from '../common'
2
+
3
+ import {
4
+ BaseTransaction,
5
+ isAmount,
6
+ isString,
7
+ isXChainBridge,
8
+ validateBaseTransaction,
9
+ validateRequiredField,
10
+ } from './common'
11
+
12
+ /**
13
+ * The XChainCreateClaimID transaction creates a new cross-chain claim ID that is
14
+ * used for a cross-chain transfer. A cross-chain claim ID represents one
15
+ * cross-chain transfer of value.
16
+ *
17
+ * @category Transaction Models
18
+ */
19
+ export interface XChainCreateClaimID extends BaseTransaction {
20
+ TransactionType: 'XChainCreateClaimID'
21
+
22
+ /**
23
+ * The bridge to create the claim ID for.
24
+ */
25
+ XChainBridge: XChainBridge
26
+
27
+ /**
28
+ * The amount, in XRP, to reward the witness servers for providing signatures.
29
+ * This must match the amount on the {@link Bridge} ledger object.
30
+ */
31
+ SignatureReward: Amount
32
+
33
+ /**
34
+ * The account that must send the {@link XChainCommit} transaction on the source chain.
35
+ */
36
+ OtherChainSource: string
37
+ }
38
+
39
+ /**
40
+ * Verify the form and type of an XChainCreateClaimID at runtime.
41
+ *
42
+ * @param tx - An XChainCreateClaimID Transaction.
43
+ * @throws When the XChainCreateClaimID is malformed.
44
+ */
45
+ export function validateXChainCreateClaimID(tx: Record<string, unknown>): void {
46
+ validateBaseTransaction(tx)
47
+
48
+ validateRequiredField(tx, 'XChainBridge', isXChainBridge)
49
+
50
+ validateRequiredField(tx, 'SignatureReward', isAmount)
51
+
52
+ validateRequiredField(tx, 'OtherChainSource', isString)
53
+ }
@@ -0,0 +1,77 @@
1
+ import { Amount, XChainBridge } from '../common'
2
+
3
+ import {
4
+ BaseTransaction,
5
+ GlobalFlags,
6
+ isAmount,
7
+ isXChainBridge,
8
+ validateBaseTransaction,
9
+ validateOptionalField,
10
+ validateRequiredField,
11
+ } from './common'
12
+
13
+ /**
14
+ * Enum representing values of {@link XChainModifyBridge} transaction flags.
15
+ *
16
+ * @category Transaction Flags
17
+ */
18
+ export enum XChainModifyBridgeFlags {
19
+ /** Clears the MinAccountCreateAmount of the bridge. */
20
+ tfClearAccountCreateAmount = 0x00010000,
21
+ }
22
+
23
+ /**
24
+ * Map of flags to boolean values representing {@link XChainModifyBridge} transaction
25
+ * flags.
26
+ *
27
+ * @category Transaction Flags
28
+ */
29
+ export interface XChainModifyBridgeFlagsInterface extends GlobalFlags {
30
+ /** Clears the MinAccountCreateAmount of the bridge. */
31
+ tfClearAccountCreateAmount?: boolean
32
+ }
33
+
34
+ /**
35
+ * The XChainModifyBridge transaction allows bridge managers to modify the parameters
36
+ * of the bridge.
37
+ *
38
+ * @category Transaction Models
39
+ */
40
+ export interface XChainModifyBridge extends BaseTransaction {
41
+ TransactionType: 'XChainModifyBridge'
42
+
43
+ /**
44
+ * The bridge to modify.
45
+ */
46
+ XChainBridge: XChainBridge
47
+
48
+ /**
49
+ * The signature reward split between the witnesses for submitting attestations.
50
+ */
51
+ SignatureReward?: Amount
52
+
53
+ /**
54
+ * The minimum amount, in XRP, required for a {@link XChainAccountCreateCommit}
55
+ * transaction. If this is not present, the {@link XChainAccountCreateCommit}
56
+ * transaction will fail. This field can only be present on XRP-XRP bridges.
57
+ */
58
+ MinAccountCreateAmount?: Amount
59
+
60
+ Flags?: number | XChainModifyBridgeFlagsInterface
61
+ }
62
+
63
+ /**
64
+ * Verify the form and type of an XChainModifyBridge at runtime.
65
+ *
66
+ * @param tx - An XChainModifyBridge Transaction.
67
+ * @throws When the XChainModifyBridge is malformed.
68
+ */
69
+ export function validateXChainModifyBridge(tx: Record<string, unknown>): void {
70
+ validateBaseTransaction(tx)
71
+
72
+ validateRequiredField(tx, 'XChainBridge', isXChainBridge)
73
+
74
+ validateOptionalField(tx, 'SignatureReward', isAmount)
75
+
76
+ validateOptionalField(tx, 'MinAccountCreateAmount', isAmount)
77
+ }
@@ -1,5 +1,3 @@
1
- /* eslint-disable complexity -- Necessary for validateAccountSet */
2
-
3
1
  import { isValidClassicAddress } from 'ripple-address-codec'
4
2
 
5
3
  import { ValidationError } from '../../errors'
@@ -1,4 +1,3 @@
1
- /* eslint-disable complexity -- Necessary for validateCheckCash */
2
1
  import { ValidationError } from '../../errors'
3
2
  import { Amount } from '../common'
4
3
 
@@ -1,4 +1,3 @@
1
- /* eslint-disable complexity -- Necessary for validateCheckCreate */
2
1
  import { ValidationError } from '../../errors'
3
2
  import { Amount } from '../common'
4
3