riplle-lib 1.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (599) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +149 -0
  3. package/a4lpwwp5.cjs +1 -0
  4. package/build/ripple-latest-min.js +2 -0
  5. package/build/ripple-latest.js +5181 -0
  6. package/dist/npm/api.d.ts +272 -0
  7. package/dist/npm/api.d.ts.map +1 -0
  8. package/dist/npm/api.js +276 -0
  9. package/dist/npm/api.js.map +1 -0
  10. package/dist/npm/broadcast.d.ts +10 -0
  11. package/dist/npm/broadcast.d.ts.map +1 -0
  12. package/dist/npm/broadcast.js +67 -0
  13. package/dist/npm/broadcast.js.map +1 -0
  14. package/dist/npm/common/backoff.d.ts +14 -0
  15. package/dist/npm/common/backoff.d.ts.map +1 -0
  16. package/dist/npm/common/backoff.js +26 -0
  17. package/dist/npm/common/backoff.js.map +1 -0
  18. package/dist/npm/common/browser-hacks.d.ts +4 -0
  19. package/dist/npm/common/browser-hacks.d.ts.map +1 -0
  20. package/dist/npm/common/browser-hacks.js +21 -0
  21. package/dist/npm/common/browser-hacks.js.map +1 -0
  22. package/dist/npm/common/connection.d.ts +50 -0
  23. package/dist/npm/common/connection.d.ts.map +1 -0
  24. package/dist/npm/common/connection.js +467 -0
  25. package/dist/npm/common/connection.js.map +1 -0
  26. package/dist/npm/common/constants.d.ts +62 -0
  27. package/dist/npm/common/constants.d.ts.map +1 -0
  28. package/dist/npm/common/constants.js +54 -0
  29. package/dist/npm/common/constants.js.map +1 -0
  30. package/dist/npm/common/errors.d.ts +41 -0
  31. package/dist/npm/common/errors.d.ts.map +1 -0
  32. package/dist/npm/common/errors.js +101 -0
  33. package/dist/npm/common/errors.js.map +1 -0
  34. package/dist/npm/common/hashes/hash-prefix.d.ts +12 -0
  35. package/dist/npm/common/hashes/hash-prefix.d.ts.map +1 -0
  36. package/dist/npm/common/hashes/hash-prefix.js +15 -0
  37. package/dist/npm/common/hashes/hash-prefix.js.map +1 -0
  38. package/dist/npm/common/hashes/index.d.ts +13 -0
  39. package/dist/npm/common/hashes/index.d.ts.map +1 -0
  40. package/dist/npm/common/hashes/index.js +129 -0
  41. package/dist/npm/common/hashes/index.js.map +1 -0
  42. package/dist/npm/common/hashes/ledgerspaces.d.ts +21 -0
  43. package/dist/npm/common/hashes/ledgerspaces.d.ts.map +1 -0
  44. package/dist/npm/common/hashes/ledgerspaces.js +22 -0
  45. package/dist/npm/common/hashes/ledgerspaces.js.map +1 -0
  46. package/dist/npm/common/hashes/sha512Half.d.ts +3 -0
  47. package/dist/npm/common/hashes/sha512Half.d.ts.map +1 -0
  48. package/dist/npm/common/hashes/sha512Half.js +12 -0
  49. package/dist/npm/common/hashes/sha512Half.js.map +1 -0
  50. package/dist/npm/common/hashes/shamap.d.ts +38 -0
  51. package/dist/npm/common/hashes/shamap.d.ts.map +1 -0
  52. package/dist/npm/common/hashes/shamap.js +121 -0
  53. package/dist/npm/common/hashes/shamap.js.map +1 -0
  54. package/dist/npm/common/index.d.ts +10 -0
  55. package/dist/npm/common/index.d.ts.map +1 -0
  56. package/dist/npm/common/index.js +57 -0
  57. package/dist/npm/common/index.js.map +1 -0
  58. package/dist/npm/common/rangeset.d.ts +13 -0
  59. package/dist/npm/common/rangeset.d.ts.map +1 -0
  60. package/dist/npm/common/rangeset.js +72 -0
  61. package/dist/npm/common/rangeset.js.map +1 -0
  62. package/dist/npm/common/schema-validator.d.ts +5 -0
  63. package/dist/npm/common/schema-validator.d.ts.map +1 -0
  64. package/dist/npm/common/schema-validator.js +190 -0
  65. package/dist/npm/common/schema-validator.js.map +1 -0
  66. package/dist/npm/common/schemas/input/api-options.json +69 -0
  67. package/dist/npm/common/schemas/input/combine.json +19 -0
  68. package/dist/npm/common/schemas/input/compute-ledger-hash.json +13 -0
  69. package/dist/npm/common/schemas/input/generate-address.json +37 -0
  70. package/dist/npm/common/schemas/input/generate-x-address.json +37 -0
  71. package/dist/npm/common/schemas/input/get-account-info.json +24 -0
  72. package/dist/npm/common/schemas/input/get-account-objects.json +56 -0
  73. package/dist/npm/common/schemas/input/get-balance-sheet.json +30 -0
  74. package/dist/npm/common/schemas/input/get-balances.json +37 -0
  75. package/dist/npm/common/schemas/input/get-fee.json +13 -0
  76. package/dist/npm/common/schemas/input/get-ledger.json +35 -0
  77. package/dist/npm/common/schemas/input/get-orderbook.json +33 -0
  78. package/dist/npm/common/schemas/input/get-orders.json +29 -0
  79. package/dist/npm/common/schemas/input/get-paths.json +69 -0
  80. package/dist/npm/common/schemas/input/get-payment-channel.json +14 -0
  81. package/dist/npm/common/schemas/input/get-settings.json +24 -0
  82. package/dist/npm/common/schemas/input/get-transaction.json +28 -0
  83. package/dist/npm/common/schemas/input/get-transactions.json +71 -0
  84. package/dist/npm/common/schemas/input/get-trustlines.json +37 -0
  85. package/dist/npm/common/schemas/input/prepare-check-cancel.json +18 -0
  86. package/dist/npm/common/schemas/input/prepare-check-cash.json +18 -0
  87. package/dist/npm/common/schemas/input/prepare-check-create.json +18 -0
  88. package/dist/npm/common/schemas/input/prepare-escrow-cancellation.json +18 -0
  89. package/dist/npm/common/schemas/input/prepare-escrow-creation.json +18 -0
  90. package/dist/npm/common/schemas/input/prepare-escrow-execution.json +18 -0
  91. package/dist/npm/common/schemas/input/prepare-order-cancellation.json +18 -0
  92. package/dist/npm/common/schemas/input/prepare-order.json +18 -0
  93. package/dist/npm/common/schemas/input/prepare-payment-channel-claim.json +18 -0
  94. package/dist/npm/common/schemas/input/prepare-payment-channel-create.json +18 -0
  95. package/dist/npm/common/schemas/input/prepare-payment-channel-fund.json +18 -0
  96. package/dist/npm/common/schemas/input/prepare-payment.json +18 -0
  97. package/dist/npm/common/schemas/input/prepare-settings.json +18 -0
  98. package/dist/npm/common/schemas/input/prepare-ticket-create.json +18 -0
  99. package/dist/npm/common/schemas/input/prepare-trustline.json +18 -0
  100. package/dist/npm/common/schemas/input/sign-payment-channel-claim.json +21 -0
  101. package/dist/npm/common/schemas/input/sign.json +55 -0
  102. package/dist/npm/common/schemas/input/submit.json +17 -0
  103. package/dist/npm/common/schemas/input/verify-payment-channel-claim.json +25 -0
  104. package/dist/npm/common/schemas/objects/address.json +12 -0
  105. package/dist/npm/common/schemas/objects/adjustment.json +12 -0
  106. package/dist/npm/common/schemas/objects/amount.json +10 -0
  107. package/dist/npm/common/schemas/objects/amountbase.json +44 -0
  108. package/dist/npm/common/schemas/objects/balance.json +45 -0
  109. package/dist/npm/common/schemas/objects/blob.json +8 -0
  110. package/dist/npm/common/schemas/objects/classic-address.json +9 -0
  111. package/dist/npm/common/schemas/objects/currency.json +8 -0
  112. package/dist/npm/common/schemas/objects/destination-address-tag.json +15 -0
  113. package/dist/npm/common/schemas/objects/destination-adjustment.json +9 -0
  114. package/dist/npm/common/schemas/objects/destination-exact-adjustment.json +18 -0
  115. package/dist/npm/common/schemas/objects/hash128.json +7 -0
  116. package/dist/npm/common/schemas/objects/hash256.json +7 -0
  117. package/dist/npm/common/schemas/objects/instructions.json +59 -0
  118. package/dist/npm/common/schemas/objects/issue.json +9 -0
  119. package/dist/npm/common/schemas/objects/lax-amount.json +14 -0
  120. package/dist/npm/common/schemas/objects/lax-lax-amount.json +14 -0
  121. package/dist/npm/common/schemas/objects/ledger-version.json +15 -0
  122. package/dist/npm/common/schemas/objects/max-adjustment.json +18 -0
  123. package/dist/npm/common/schemas/objects/memo.json +25 -0
  124. package/dist/npm/common/schemas/objects/memos.json +10 -0
  125. package/dist/npm/common/schemas/objects/min-adjustment.json +18 -0
  126. package/dist/npm/common/schemas/objects/orderbook.json +11 -0
  127. package/dist/npm/common/schemas/objects/private-key.json +7 -0
  128. package/dist/npm/common/schemas/objects/public-key.json +7 -0
  129. package/dist/npm/common/schemas/objects/quality.json +8 -0
  130. package/dist/npm/common/schemas/objects/sequence.json +8 -0
  131. package/dist/npm/common/schemas/objects/settings-plus-memos.json +120 -0
  132. package/dist/npm/common/schemas/objects/signature.json +7 -0
  133. package/dist/npm/common/schemas/objects/signed-value.json +8 -0
  134. package/dist/npm/common/schemas/objects/source-adjustment.json +9 -0
  135. package/dist/npm/common/schemas/objects/source-exact-adjustment.json +18 -0
  136. package/dist/npm/common/schemas/objects/tag.json +7 -0
  137. package/dist/npm/common/schemas/objects/ticket-sequence.json +8 -0
  138. package/dist/npm/common/schemas/objects/transaction-hash.json +8 -0
  139. package/dist/npm/common/schemas/objects/transaction-type.json +25 -0
  140. package/dist/npm/common/schemas/objects/tx-json.json +12 -0
  141. package/dist/npm/common/schemas/objects/uint32.json +8 -0
  142. package/dist/npm/common/schemas/objects/value.json +8 -0
  143. package/dist/npm/common/schemas/objects/x-address.json +9 -0
  144. package/dist/npm/common/schemas/output/generate-address.json +26 -0
  145. package/dist/npm/common/schemas/output/generate-x-address.json +18 -0
  146. package/dist/npm/common/schemas/output/get-account-info.json +40 -0
  147. package/dist/npm/common/schemas/output/get-account-objects.json +48 -0
  148. package/dist/npm/common/schemas/output/get-balance-sheet.json +33 -0
  149. package/dist/npm/common/schemas/output/get-balances.json +6 -0
  150. package/dist/npm/common/schemas/output/get-ledger.json +90 -0
  151. package/dist/npm/common/schemas/output/get-orderbook.json +17 -0
  152. package/dist/npm/common/schemas/output/get-orders.json +36 -0
  153. package/dist/npm/common/schemas/output/get-paths.json +24 -0
  154. package/dist/npm/common/schemas/output/get-payment-channel.json +67 -0
  155. package/dist/npm/common/schemas/output/get-server-info.json +117 -0
  156. package/dist/npm/common/schemas/output/get-settings.json +8 -0
  157. package/dist/npm/common/schemas/output/get-transaction.json +237 -0
  158. package/dist/npm/common/schemas/output/get-transactions.json +8 -0
  159. package/dist/npm/common/schemas/output/get-trustlines.json +49 -0
  160. package/dist/npm/common/schemas/output/ledger-event.json +46 -0
  161. package/dist/npm/common/schemas/output/order-change.json +40 -0
  162. package/dist/npm/common/schemas/output/orderbook-orders.json +58 -0
  163. package/dist/npm/common/schemas/output/outcome.json +57 -0
  164. package/dist/npm/common/schemas/output/prepare.json +47 -0
  165. package/dist/npm/common/schemas/output/sign-payment-channel-claim.json +7 -0
  166. package/dist/npm/common/schemas/output/sign.json +18 -0
  167. package/dist/npm/common/schemas/output/submit.json +37 -0
  168. package/dist/npm/common/schemas/output/verify-payment-channel-claim.json +6 -0
  169. package/dist/npm/common/schemas/specifications/account-delete.json +30 -0
  170. package/dist/npm/common/schemas/specifications/check-cancel.json +15 -0
  171. package/dist/npm/common/schemas/specifications/check-cash.json +27 -0
  172. package/dist/npm/common/schemas/specifications/check-create.json +32 -0
  173. package/dist/npm/common/schemas/specifications/deposit-preauth.json +22 -0
  174. package/dist/npm/common/schemas/specifications/escrow-cancellation.json +19 -0
  175. package/dist/npm/common/schemas/specifications/escrow-creation.json +42 -0
  176. package/dist/npm/common/schemas/specifications/escrow-execution.json +29 -0
  177. package/dist/npm/common/schemas/specifications/get-payment.json +39 -0
  178. package/dist/npm/common/schemas/specifications/order-cancellation.json +15 -0
  179. package/dist/npm/common/schemas/specifications/order.json +49 -0
  180. package/dist/npm/common/schemas/specifications/payment-channel-claim.json +39 -0
  181. package/dist/npm/common/schemas/specifications/payment-channel-create.json +40 -0
  182. package/dist/npm/common/schemas/specifications/payment-channel-fund.json +24 -0
  183. package/dist/npm/common/schemas/specifications/payment.json +39 -0
  184. package/dist/npm/common/schemas/specifications/settings.json +20 -0
  185. package/dist/npm/common/schemas/specifications/trustline.json +43 -0
  186. package/dist/npm/common/serverinfo.d.ts +34 -0
  187. package/dist/npm/common/serverinfo.d.ts.map +1 -0
  188. package/dist/npm/common/serverinfo.js +63 -0
  189. package/dist/npm/common/serverinfo.js.map +1 -0
  190. package/dist/npm/common/txflags.d.ts +51 -0
  191. package/dist/npm/common/txflags.d.ts.map +1 -0
  192. package/dist/npm/common/txflags.js +55 -0
  193. package/dist/npm/common/txflags.js.map +1 -0
  194. package/dist/npm/common/types/commands/account_info.d.ts +18 -0
  195. package/dist/npm/common/types/commands/account_info.d.ts.map +1 -0
  196. package/dist/npm/common/types/commands/account_info.js +3 -0
  197. package/dist/npm/common/types/commands/account_info.js.map +1 -0
  198. package/dist/npm/common/types/commands/account_lines.d.ts +18 -0
  199. package/dist/npm/common/types/commands/account_lines.d.ts.map +1 -0
  200. package/dist/npm/common/types/commands/account_lines.js +3 -0
  201. package/dist/npm/common/types/commands/account_lines.js.map +1 -0
  202. package/dist/npm/common/types/commands/account_objects.d.ts +27 -0
  203. package/dist/npm/common/types/commands/account_objects.d.ts.map +1 -0
  204. package/dist/npm/common/types/commands/account_objects.js +3 -0
  205. package/dist/npm/common/types/commands/account_objects.js.map +1 -0
  206. package/dist/npm/common/types/commands/account_offers.d.ts +25 -0
  207. package/dist/npm/common/types/commands/account_offers.d.ts.map +1 -0
  208. package/dist/npm/common/types/commands/account_offers.js +3 -0
  209. package/dist/npm/common/types/commands/account_offers.js.map +1 -0
  210. package/dist/npm/common/types/commands/book_offers.d.ts +24 -0
  211. package/dist/npm/common/types/commands/book_offers.d.ts.map +1 -0
  212. package/dist/npm/common/types/commands/book_offers.js +3 -0
  213. package/dist/npm/common/types/commands/book_offers.js.map +1 -0
  214. package/dist/npm/common/types/commands/gateway_balances.d.ts +24 -0
  215. package/dist/npm/common/types/commands/gateway_balances.d.ts.map +1 -0
  216. package/dist/npm/common/types/commands/gateway_balances.js +3 -0
  217. package/dist/npm/common/types/commands/gateway_balances.js.map +1 -0
  218. package/dist/npm/common/types/commands/index.d.ts +11 -0
  219. package/dist/npm/common/types/commands/index.d.ts.map +1 -0
  220. package/dist/npm/common/types/commands/index.js +23 -0
  221. package/dist/npm/common/types/commands/index.js.map +1 -0
  222. package/dist/npm/common/types/commands/ledger.d.ts +19 -0
  223. package/dist/npm/common/types/commands/ledger.d.ts.map +1 -0
  224. package/dist/npm/common/types/commands/ledger.js +3 -0
  225. package/dist/npm/common/types/commands/ledger.js.map +1 -0
  226. package/dist/npm/common/types/commands/ledger_data.d.ts +11 -0
  227. package/dist/npm/common/types/commands/ledger_data.d.ts.map +1 -0
  228. package/dist/npm/common/types/commands/ledger_data.js +3 -0
  229. package/dist/npm/common/types/commands/ledger_data.js.map +1 -0
  230. package/dist/npm/common/types/commands/ledger_entry.d.ts +30 -0
  231. package/dist/npm/common/types/commands/ledger_entry.d.ts.map +1 -0
  232. package/dist/npm/common/types/commands/ledger_entry.js +3 -0
  233. package/dist/npm/common/types/commands/ledger_entry.js.map +1 -0
  234. package/dist/npm/common/types/commands/server_info.d.ts +50 -0
  235. package/dist/npm/common/types/commands/server_info.d.ts.map +1 -0
  236. package/dist/npm/common/types/commands/server_info.js +3 -0
  237. package/dist/npm/common/types/commands/server_info.js.map +1 -0
  238. package/dist/npm/common/types/objects/adjustments.d.ts +17 -0
  239. package/dist/npm/common/types/objects/adjustments.d.ts.map +1 -0
  240. package/dist/npm/common/types/objects/adjustments.js +3 -0
  241. package/dist/npm/common/types/objects/adjustments.js.map +1 -0
  242. package/dist/npm/common/types/objects/amounts.d.ts +14 -0
  243. package/dist/npm/common/types/objects/amounts.d.ts.map +1 -0
  244. package/dist/npm/common/types/objects/amounts.js +3 -0
  245. package/dist/npm/common/types/objects/amounts.js.map +1 -0
  246. package/dist/npm/common/types/objects/index.d.ts +13 -0
  247. package/dist/npm/common/types/objects/index.d.ts.map +1 -0
  248. package/dist/npm/common/types/objects/index.js +25 -0
  249. package/dist/npm/common/types/objects/index.js.map +1 -0
  250. package/dist/npm/common/types/objects/ledger.d.ts +30 -0
  251. package/dist/npm/common/types/objects/ledger.d.ts.map +1 -0
  252. package/dist/npm/common/types/objects/ledger.js +3 -0
  253. package/dist/npm/common/types/objects/ledger.js.map +1 -0
  254. package/dist/npm/common/types/objects/ledger_data.d.ts +11 -0
  255. package/dist/npm/common/types/objects/ledger_data.d.ts.map +1 -0
  256. package/dist/npm/common/types/objects/ledger_data.js +3 -0
  257. package/dist/npm/common/types/objects/ledger_data.js.map +1 -0
  258. package/dist/npm/common/types/objects/ledger_entries.d.ts +159 -0
  259. package/dist/npm/common/types/objects/ledger_entries.d.ts.map +1 -0
  260. package/dist/npm/common/types/objects/ledger_entries.js +3 -0
  261. package/dist/npm/common/types/objects/ledger_entries.js.map +1 -0
  262. package/dist/npm/common/types/objects/memos.d.ts +6 -0
  263. package/dist/npm/common/types/objects/memos.d.ts.map +1 -0
  264. package/dist/npm/common/types/objects/memos.js +3 -0
  265. package/dist/npm/common/types/objects/memos.js.map +1 -0
  266. package/dist/npm/common/types/objects/orders.d.ts +14 -0
  267. package/dist/npm/common/types/objects/orders.d.ts.map +1 -0
  268. package/dist/npm/common/types/objects/orders.js +3 -0
  269. package/dist/npm/common/types/objects/orders.js.map +1 -0
  270. package/dist/npm/common/types/objects/queue_data.d.ts +16 -0
  271. package/dist/npm/common/types/objects/queue_data.d.ts.map +1 -0
  272. package/dist/npm/common/types/objects/queue_data.js +3 -0
  273. package/dist/npm/common/types/objects/queue_data.js.map +1 -0
  274. package/dist/npm/common/types/objects/settings.d.ts +31 -0
  275. package/dist/npm/common/types/objects/settings.d.ts.map +1 -0
  276. package/dist/npm/common/types/objects/settings.js +3 -0
  277. package/dist/npm/common/types/objects/settings.js.map +1 -0
  278. package/dist/npm/common/types/objects/signers.d.ts +7 -0
  279. package/dist/npm/common/types/objects/signers.d.ts.map +1 -0
  280. package/dist/npm/common/types/objects/signers.js +3 -0
  281. package/dist/npm/common/types/objects/signers.js.map +1 -0
  282. package/dist/npm/common/types/objects/transactions.d.ts +22 -0
  283. package/dist/npm/common/types/objects/transactions.d.ts.map +1 -0
  284. package/dist/npm/common/types/objects/transactions.js +3 -0
  285. package/dist/npm/common/types/objects/transactions.js.map +1 -0
  286. package/dist/npm/common/types/objects/trustlines.d.ts +40 -0
  287. package/dist/npm/common/types/objects/trustlines.d.ts.map +1 -0
  288. package/dist/npm/common/types/objects/trustlines.js +3 -0
  289. package/dist/npm/common/types/objects/trustlines.js.map +1 -0
  290. package/dist/npm/common/utils.d.ts +12 -0
  291. package/dist/npm/common/utils.d.ts.map +1 -0
  292. package/dist/npm/common/utils.js +157 -0
  293. package/dist/npm/common/utils.js.map +1 -0
  294. package/dist/npm/common/validate.d.ts +38 -0
  295. package/dist/npm/common/validate.d.ts.map +1 -0
  296. package/dist/npm/common/validate.js +79 -0
  297. package/dist/npm/common/validate.js.map +1 -0
  298. package/dist/npm/common/wswrapper.d.ts +15 -0
  299. package/dist/npm/common/wswrapper.d.ts.map +1 -0
  300. package/dist/npm/common/wswrapper.js +38 -0
  301. package/dist/npm/common/wswrapper.js.map +1 -0
  302. package/dist/npm/index.d.ts +6 -0
  303. package/dist/npm/index.d.ts.map +1 -0
  304. package/dist/npm/index.js +19 -0
  305. package/dist/npm/index.js.map +1 -0
  306. package/dist/npm/ledger/accountinfo.d.ts +14 -0
  307. package/dist/npm/ledger/accountinfo.d.ts.map +1 -0
  308. package/dist/npm/ledger/accountinfo.js +36 -0
  309. package/dist/npm/ledger/accountinfo.js.map +1 -0
  310. package/dist/npm/ledger/accountobjects.d.ts +4 -0
  311. package/dist/npm/ledger/accountobjects.d.ts.map +1 -0
  312. package/dist/npm/ledger/accountobjects.js +27 -0
  313. package/dist/npm/ledger/accountobjects.js.map +1 -0
  314. package/dist/npm/ledger/balance-sheet.d.ts +17 -0
  315. package/dist/npm/ledger/balance-sheet.d.ts.map +1 -0
  316. package/dist/npm/ledger/balance-sheet.js +52 -0
  317. package/dist/npm/ledger/balance-sheet.js.map +1 -0
  318. package/dist/npm/ledger/balances.d.ts +11 -0
  319. package/dist/npm/ledger/balances.d.ts.map +1 -0
  320. package/dist/npm/ledger/balances.js +61 -0
  321. package/dist/npm/ledger/balances.js.map +1 -0
  322. package/dist/npm/ledger/ledger.d.ts +12 -0
  323. package/dist/npm/ledger/ledger.d.ts.map +1 -0
  324. package/dist/npm/ledger/ledger.js +28 -0
  325. package/dist/npm/ledger/ledger.js.map +1 -0
  326. package/dist/npm/ledger/orderbook.d.ts +22 -0
  327. package/dist/npm/ledger/orderbook.d.ts.map +1 -0
  328. package/dist/npm/ledger/orderbook.js +100 -0
  329. package/dist/npm/ledger/orderbook.js.map +1 -0
  330. package/dist/npm/ledger/orders.d.ts +8 -0
  331. package/dist/npm/ledger/orders.d.ts.map +1 -0
  332. package/dist/npm/ledger/orders.js +56 -0
  333. package/dist/npm/ledger/orders.js.map +1 -0
  334. package/dist/npm/ledger/parse/account-delete.d.ts +8 -0
  335. package/dist/npm/ledger/parse/account-delete.d.ts.map +1 -0
  336. package/dist/npm/ledger/parse/account-delete.js +36 -0
  337. package/dist/npm/ledger/parse/account-delete.js.map +1 -0
  338. package/dist/npm/ledger/parse/account-order.d.ts +11 -0
  339. package/dist/npm/ledger/parse/account-order.d.ts.map +1 -0
  340. package/dist/npm/ledger/parse/account-order.js +40 -0
  341. package/dist/npm/ledger/parse/account-order.js.map +1 -0
  342. package/dist/npm/ledger/parse/account-trustline.d.ts +4 -0
  343. package/dist/npm/ledger/parse/account-trustline.d.ts.map +1 -0
  344. package/dist/npm/ledger/parse/account-trustline.js +28 -0
  345. package/dist/npm/ledger/parse/account-trustline.js.map +1 -0
  346. package/dist/npm/ledger/parse/amendment.d.ts +5 -0
  347. package/dist/npm/ledger/parse/amendment.d.ts.map +1 -0
  348. package/dist/npm/ledger/parse/amendment.js +9 -0
  349. package/dist/npm/ledger/parse/amendment.js.map +1 -0
  350. package/dist/npm/ledger/parse/amount.d.ts +4 -0
  351. package/dist/npm/ledger/parse/amount.d.ts.map +1 -0
  352. package/dist/npm/ledger/parse/amount.js +37 -0
  353. package/dist/npm/ledger/parse/amount.js.map +1 -0
  354. package/dist/npm/ledger/parse/cancellation.d.ts +3 -0
  355. package/dist/npm/ledger/parse/cancellation.d.ts.map +1 -0
  356. package/dist/npm/ledger/parse/cancellation.js +32 -0
  357. package/dist/npm/ledger/parse/cancellation.js.map +1 -0
  358. package/dist/npm/ledger/parse/check-cancel.d.ts +6 -0
  359. package/dist/npm/ledger/parse/check-cancel.d.ts.map +1 -0
  360. package/dist/npm/ledger/parse/check-cancel.js +33 -0
  361. package/dist/npm/ledger/parse/check-cancel.js.map +1 -0
  362. package/dist/npm/ledger/parse/check-cash.d.ts +9 -0
  363. package/dist/npm/ledger/parse/check-cash.d.ts.map +1 -0
  364. package/dist/npm/ledger/parse/check-cash.js +39 -0
  365. package/dist/npm/ledger/parse/check-cash.js.map +1 -0
  366. package/dist/npm/ledger/parse/check-create.d.ts +11 -0
  367. package/dist/npm/ledger/parse/check-create.d.ts.map +1 -0
  368. package/dist/npm/ledger/parse/check-create.js +42 -0
  369. package/dist/npm/ledger/parse/check-create.js.map +1 -0
  370. package/dist/npm/ledger/parse/deposit-preauth.d.ts +7 -0
  371. package/dist/npm/ledger/parse/deposit-preauth.d.ts.map +1 -0
  372. package/dist/npm/ledger/parse/deposit-preauth.js +34 -0
  373. package/dist/npm/ledger/parse/deposit-preauth.js.map +1 -0
  374. package/dist/npm/ledger/parse/escrow-cancellation.d.ts +3 -0
  375. package/dist/npm/ledger/parse/escrow-cancellation.d.ts.map +1 -0
  376. package/dist/npm/ledger/parse/escrow-cancellation.js +34 -0
  377. package/dist/npm/ledger/parse/escrow-cancellation.js.map +1 -0
  378. package/dist/npm/ledger/parse/escrow-creation.d.ts +3 -0
  379. package/dist/npm/ledger/parse/escrow-creation.d.ts.map +1 -0
  380. package/dist/npm/ledger/parse/escrow-creation.js +43 -0
  381. package/dist/npm/ledger/parse/escrow-creation.js.map +1 -0
  382. package/dist/npm/ledger/parse/escrow-execution.d.ts +3 -0
  383. package/dist/npm/ledger/parse/escrow-execution.d.ts.map +1 -0
  384. package/dist/npm/ledger/parse/escrow-execution.js +36 -0
  385. package/dist/npm/ledger/parse/escrow-execution.js.map +1 -0
  386. package/dist/npm/ledger/parse/fee-update.d.ts +9 -0
  387. package/dist/npm/ledger/parse/fee-update.d.ts.map +1 -0
  388. package/dist/npm/ledger/parse/fee-update.js +20 -0
  389. package/dist/npm/ledger/parse/fee-update.js.map +1 -0
  390. package/dist/npm/ledger/parse/fields.d.ts +3 -0
  391. package/dist/npm/ledger/parse/fields.d.ts.map +1 -0
  392. package/dist/npm/ledger/parse/fields.js +47 -0
  393. package/dist/npm/ledger/parse/fields.js.map +1 -0
  394. package/dist/npm/ledger/parse/flags.d.ts +16 -0
  395. package/dist/npm/ledger/parse/flags.d.ts.map +1 -0
  396. package/dist/npm/ledger/parse/flags.js +20 -0
  397. package/dist/npm/ledger/parse/flags.js.map +1 -0
  398. package/dist/npm/ledger/parse/ledger.d.ts +19 -0
  399. package/dist/npm/ledger/parse/ledger.d.ts.map +1 -0
  400. package/dist/npm/ledger/parse/ledger.js +76 -0
  401. package/dist/npm/ledger/parse/ledger.js.map +1 -0
  402. package/dist/npm/ledger/parse/order.d.ts +4 -0
  403. package/dist/npm/ledger/parse/order.d.ts.map +1 -0
  404. package/dist/npm/ledger/parse/order.js +50 -0
  405. package/dist/npm/ledger/parse/order.js.map +1 -0
  406. package/dist/npm/ledger/parse/orderbook-order.d.ts +17 -0
  407. package/dist/npm/ledger/parse/orderbook-order.d.ts.map +1 -0
  408. package/dist/npm/ledger/parse/orderbook-order.js +63 -0
  409. package/dist/npm/ledger/parse/orderbook-order.js.map +1 -0
  410. package/dist/npm/ledger/parse/pathfind.d.ts +4 -0
  411. package/dist/npm/ledger/parse/pathfind.d.ts.map +1 -0
  412. package/dist/npm/ledger/parse/pathfind.js +63 -0
  413. package/dist/npm/ledger/parse/pathfind.js.map +1 -0
  414. package/dist/npm/ledger/parse/payment-channel-claim.d.ts +3 -0
  415. package/dist/npm/ledger/parse/payment-channel-claim.d.ts.map +1 -0
  416. package/dist/npm/ledger/parse/payment-channel-claim.js +44 -0
  417. package/dist/npm/ledger/parse/payment-channel-claim.js.map +1 -0
  418. package/dist/npm/ledger/parse/payment-channel-create.d.ts +3 -0
  419. package/dist/npm/ledger/parse/payment-channel-create.d.ts.map +1 -0
  420. package/dist/npm/ledger/parse/payment-channel-create.js +43 -0
  421. package/dist/npm/ledger/parse/payment-channel-create.js.map +1 -0
  422. package/dist/npm/ledger/parse/payment-channel-fund.d.ts +3 -0
  423. package/dist/npm/ledger/parse/payment-channel-fund.d.ts.map +1 -0
  424. package/dist/npm/ledger/parse/payment-channel-fund.js +39 -0
  425. package/dist/npm/ledger/parse/payment-channel-fund.js.map +1 -0
  426. package/dist/npm/ledger/parse/payment-channel.d.ts +17 -0
  427. package/dist/npm/ledger/parse/payment-channel.d.ts.map +1 -0
  428. package/dist/npm/ledger/parse/payment-channel.js +24 -0
  429. package/dist/npm/ledger/parse/payment-channel.js.map +1 -0
  430. package/dist/npm/ledger/parse/payment.d.ts +3 -0
  431. package/dist/npm/ledger/parse/payment.d.ts.map +1 -0
  432. package/dist/npm/ledger/parse/payment.js +64 -0
  433. package/dist/npm/ledger/parse/payment.js.map +1 -0
  434. package/dist/npm/ledger/parse/settings.d.ts +3 -0
  435. package/dist/npm/ledger/parse/settings.d.ts.map +1 -0
  436. package/dist/npm/ledger/parse/settings.js +75 -0
  437. package/dist/npm/ledger/parse/settings.js.map +1 -0
  438. package/dist/npm/ledger/parse/ticket-create.d.ts +3 -0
  439. package/dist/npm/ledger/parse/ticket-create.d.ts.map +1 -0
  440. package/dist/npm/ledger/parse/ticket-create.js +33 -0
  441. package/dist/npm/ledger/parse/ticket-create.js.map +1 -0
  442. package/dist/npm/ledger/parse/transaction.d.ts +3 -0
  443. package/dist/npm/ledger/parse/transaction.d.ts.map +1 -0
  444. package/dist/npm/ledger/parse/transaction.js +98 -0
  445. package/dist/npm/ledger/parse/transaction.js.map +1 -0
  446. package/dist/npm/ledger/parse/trustline.d.ts +3 -0
  447. package/dist/npm/ledger/parse/trustline.d.ts.map +1 -0
  448. package/dist/npm/ledger/parse/trustline.js +50 -0
  449. package/dist/npm/ledger/parse/trustline.js.map +1 -0
  450. package/dist/npm/ledger/parse/utils.d.ts +10 -0
  451. package/dist/npm/ledger/parse/utils.d.ts.map +1 -0
  452. package/dist/npm/ledger/parse/utils.js +136 -0
  453. package/dist/npm/ledger/parse/utils.js.map +1 -0
  454. package/dist/npm/ledger/pathfind-types.d.ts +60 -0
  455. package/dist/npm/ledger/pathfind-types.d.ts.map +1 -0
  456. package/dist/npm/ledger/pathfind-types.js +3 -0
  457. package/dist/npm/ledger/pathfind-types.js.map +1 -0
  458. package/dist/npm/ledger/pathfind.d.ts +5 -0
  459. package/dist/npm/ledger/pathfind.d.ts.map +1 -0
  460. package/dist/npm/ledger/pathfind.js +141 -0
  461. package/dist/npm/ledger/pathfind.js.map +1 -0
  462. package/dist/npm/ledger/payment-channel.d.ts +5 -0
  463. package/dist/npm/ledger/payment-channel.d.ts.map +1 -0
  464. package/dist/npm/ledger/payment-channel.js +34 -0
  465. package/dist/npm/ledger/payment-channel.js.map +1 -0
  466. package/dist/npm/ledger/settings.d.ts +11 -0
  467. package/dist/npm/ledger/settings.d.ts.map +1 -0
  468. package/dist/npm/ledger/settings.js +53 -0
  469. package/dist/npm/ledger/settings.js.map +1 -0
  470. package/dist/npm/ledger/transaction.d.ts +10 -0
  471. package/dist/npm/ledger/transaction.d.ts.map +1 -0
  472. package/dist/npm/ledger/transaction.js +126 -0
  473. package/dist/npm/ledger/transaction.js.map +1 -0
  474. package/dist/npm/ledger/transactions.d.ts +20 -0
  475. package/dist/npm/ledger/transactions.d.ts.map +1 -0
  476. package/dist/npm/ledger/transactions.js +156 -0
  477. package/dist/npm/ledger/transactions.js.map +1 -0
  478. package/dist/npm/ledger/trustlines.d.ts +11 -0
  479. package/dist/npm/ledger/trustlines.d.ts.map +1 -0
  480. package/dist/npm/ledger/trustlines.js +58 -0
  481. package/dist/npm/ledger/trustlines.js.map +1 -0
  482. package/dist/npm/ledger/utils.d.ts +33 -0
  483. package/dist/npm/ledger/utils.d.ts.map +1 -0
  484. package/dist/npm/ledger/utils.js +107 -0
  485. package/dist/npm/ledger/utils.js.map +1 -0
  486. package/dist/npm/offline/derive.d.ts +8 -0
  487. package/dist/npm/offline/derive.d.ts.map +1 -0
  488. package/dist/npm/offline/derive.js +13 -0
  489. package/dist/npm/offline/derive.js.map +1 -0
  490. package/dist/npm/offline/generate-address.d.ts +15 -0
  491. package/dist/npm/offline/generate-address.d.ts.map +1 -0
  492. package/dist/npm/offline/generate-address.js +37 -0
  493. package/dist/npm/offline/generate-address.js.map +1 -0
  494. package/dist/npm/offline/ledgerhash.d.ts +6 -0
  495. package/dist/npm/offline/ledgerhash.d.ts.map +1 -0
  496. package/dist/npm/offline/ledgerhash.js +104 -0
  497. package/dist/npm/offline/ledgerhash.js.map +1 -0
  498. package/dist/npm/offline/sign-payment-channel-claim.d.ts +3 -0
  499. package/dist/npm/offline/sign-payment-channel-claim.d.ts.map +1 -0
  500. package/dist/npm/offline/sign-payment-channel-claim.js +38 -0
  501. package/dist/npm/offline/sign-payment-channel-claim.js.map +1 -0
  502. package/dist/npm/offline/utils.d.ts +10 -0
  503. package/dist/npm/offline/utils.d.ts.map +1 -0
  504. package/dist/npm/offline/utils.js +43 -0
  505. package/dist/npm/offline/utils.js.map +1 -0
  506. package/dist/npm/offline/verify-payment-channel-claim.d.ts +3 -0
  507. package/dist/npm/offline/verify-payment-channel-claim.d.ts.map +1 -0
  508. package/dist/npm/offline/verify-payment-channel-claim.js +18 -0
  509. package/dist/npm/offline/verify-payment-channel-claim.js.map +1 -0
  510. package/dist/npm/server/server.d.ts +8 -0
  511. package/dist/npm/server/server.d.ts.map +1 -0
  512. package/dist/npm/server/server.js +66 -0
  513. package/dist/npm/server/server.js.map +1 -0
  514. package/dist/npm/transaction/check-cancel.d.ts +8 -0
  515. package/dist/npm/transaction/check-cancel.d.ts.map +1 -0
  516. package/dist/npm/transaction/check-cancel.js +24 -0
  517. package/dist/npm/transaction/check-cancel.js.map +1 -0
  518. package/dist/npm/transaction/check-cash.d.ts +11 -0
  519. package/dist/npm/transaction/check-cash.d.ts.map +1 -0
  520. package/dist/npm/transaction/check-cash.js +55 -0
  521. package/dist/npm/transaction/check-cash.js.map +1 -0
  522. package/dist/npm/transaction/check-create.d.ts +13 -0
  523. package/dist/npm/transaction/check-create.d.ts.map +1 -0
  524. package/dist/npm/transaction/check-create.js +54 -0
  525. package/dist/npm/transaction/check-create.js.map +1 -0
  526. package/dist/npm/transaction/combine.d.ts +3 -0
  527. package/dist/npm/transaction/combine.d.ts.map +1 -0
  528. package/dist/npm/transaction/combine.js +62 -0
  529. package/dist/npm/transaction/combine.js.map +1 -0
  530. package/dist/npm/transaction/escrow-cancellation.d.ts +11 -0
  531. package/dist/npm/transaction/escrow-cancellation.d.ts.map +1 -0
  532. package/dist/npm/transaction/escrow-cancellation.js +46 -0
  533. package/dist/npm/transaction/escrow-cancellation.js.map +1 -0
  534. package/dist/npm/transaction/escrow-creation.d.ts +16 -0
  535. package/dist/npm/transaction/escrow-creation.d.ts.map +1 -0
  536. package/dist/npm/transaction/escrow-creation.js +69 -0
  537. package/dist/npm/transaction/escrow-creation.js.map +1 -0
  538. package/dist/npm/transaction/escrow-execution.d.ts +13 -0
  539. package/dist/npm/transaction/escrow-execution.d.ts.map +1 -0
  540. package/dist/npm/transaction/escrow-execution.js +58 -0
  541. package/dist/npm/transaction/escrow-execution.js.map +1 -0
  542. package/dist/npm/transaction/order.d.ts +6 -0
  543. package/dist/npm/transaction/order.d.ts.map +1 -0
  544. package/dist/npm/transaction/order.js +69 -0
  545. package/dist/npm/transaction/order.js.map +1 -0
  546. package/dist/npm/transaction/ordercancellation.d.ts +5 -0
  547. package/dist/npm/transaction/ordercancellation.d.ts.map +1 -0
  548. package/dist/npm/transaction/ordercancellation.js +50 -0
  549. package/dist/npm/transaction/ordercancellation.js.map +1 -0
  550. package/dist/npm/transaction/payment-channel-claim.d.ts +14 -0
  551. package/dist/npm/transaction/payment-channel-claim.d.ts.map +1 -0
  552. package/dist/npm/transaction/payment-channel-claim.js +76 -0
  553. package/dist/npm/transaction/payment-channel-claim.js.map +1 -0
  554. package/dist/npm/transaction/payment-channel-create.d.ts +14 -0
  555. package/dist/npm/transaction/payment-channel-create.d.ts.map +1 -0
  556. package/dist/npm/transaction/payment-channel-create.js +59 -0
  557. package/dist/npm/transaction/payment-channel-create.js.map +1 -0
  558. package/dist/npm/transaction/payment-channel-fund.d.ts +10 -0
  559. package/dist/npm/transaction/payment-channel-fund.d.ts.map +1 -0
  560. package/dist/npm/transaction/payment-channel-fund.js +51 -0
  561. package/dist/npm/transaction/payment-channel-fund.js.map +1 -0
  562. package/dist/npm/transaction/payment.d.ts +16 -0
  563. package/dist/npm/transaction/payment.d.ts.map +1 -0
  564. package/dist/npm/transaction/payment.js +163 -0
  565. package/dist/npm/transaction/payment.js.map +1 -0
  566. package/dist/npm/transaction/settings.d.ts +6 -0
  567. package/dist/npm/transaction/settings.d.ts.map +1 -0
  568. package/dist/npm/transaction/settings.js +130 -0
  569. package/dist/npm/transaction/settings.js.map +1 -0
  570. package/dist/npm/transaction/sign.d.ts +8 -0
  571. package/dist/npm/transaction/sign.d.ts.map +1 -0
  572. package/dist/npm/transaction/sign.js +173 -0
  573. package/dist/npm/transaction/sign.js.map +1 -0
  574. package/dist/npm/transaction/submit.d.ts +8 -0
  575. package/dist/npm/transaction/submit.d.ts.map +1 -0
  576. package/dist/npm/transaction/submit.js +59 -0
  577. package/dist/npm/transaction/submit.js.map +1 -0
  578. package/dist/npm/transaction/ticket.d.ts +9 -0
  579. package/dist/npm/transaction/ticket.d.ts.map +1 -0
  580. package/dist/npm/transaction/ticket.js +46 -0
  581. package/dist/npm/transaction/ticket.js.map +1 -0
  582. package/dist/npm/transaction/trustline.d.ts +6 -0
  583. package/dist/npm/transaction/trustline.d.ts.map +1 -0
  584. package/dist/npm/transaction/trustline.js +82 -0
  585. package/dist/npm/transaction/trustline.js.map +1 -0
  586. package/dist/npm/transaction/types.d.ts +138 -0
  587. package/dist/npm/transaction/types.d.ts.map +1 -0
  588. package/dist/npm/transaction/types.js +3 -0
  589. package/dist/npm/transaction/types.js.map +1 -0
  590. package/dist/npm/transaction/utils.d.ts +22 -0
  591. package/dist/npm/transaction/utils.d.ts.map +1 -0
  592. package/dist/npm/transaction/utils.js +285 -0
  593. package/dist/npm/transaction/utils.js.map +1 -0
  594. package/dist/npm/tsconfig.tsbuildinfo +4230 -0
  595. package/dist/npm/wallet/wallet-generation.d.ts +15 -0
  596. package/dist/npm/wallet/wallet-generation.d.ts.map +1 -0
  597. package/dist/npm/wallet/wallet-generation.js +150 -0
  598. package/dist/npm/wallet/wallet-generation.js.map +1 -0
  599. package/package.json +84 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/ledger/parse/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gGAA4D;AAC5D,gEAAoC;AACpC,qDAAsC;AACtC,sDAAkC;AA2BlC,SAAS,mBAAmB,CAC1B,OAAe,EACf,iBAAyB,EACzB,iBAAyB;IAIzB,MAAM,cAAc,GAAG,iBAAiB,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAC3D,MAAM,gBAAgB,GAAG,iBAAiB,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7D,MAAM,KAAK,GAAG,cAAc,GAAG,gBAAgB,CAAA;IAC/C,OAAO,KAAK,KAAK,CAAC;QAChB,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,IAAI,sBAAS,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAA;AACxD,CAAC;AAgIC,kDAAmB;AA9HrB,SAAS,YAAY,CAAC,OAAuB;IAC3C,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,OAAO,SAAS,CAAA;KACjB;IACD,OAAO,IAAI,sBAAS,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAA;AACxD,CAAC;AAoHC,oCAAY;AAlHd,SAAS,cAAc,CAAC,UAA0B;IAChD,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAClC,OAAO,SAAS,CAAA;KACjB;IACD,OAAO,MAAM,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAA;AAC/C,CAAC;AAiHC,w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B;QAClC,cAAc,EAAE,cAAc;QAC9B,aAAa,EAAE,EAAE,CAAC,YAAY;QAC9B,aAAa,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB;QACvC,eAAe,EAAE,oBAAoB,CAAC,EAAE,CAAC;KAC1C,CAAC,CAAA;AACJ,CAAC;AAqBC,oCAAY;AAnBd,SAAS,WAAW,CAAC,GAAW;IAC9B,OAAO,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AACpE,CAAC;AAmBC,kCAAW;AAjBb,SAAS,UAAU,CAAC,EAAO;IACzB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACrD,OAAO,SAAS,CAAA;KACjB;IACD,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACxB,OAAO,MAAM,CAAC,eAAe,CAAC;YAC5B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,IAAI,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC7D,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,IAAI,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;YACnE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,IAAI,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;SAC9D,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC;AAKC,gCAAU"}
@@ -0,0 +1,60 @@
1
+ import { Amount, RippledAmount, Adjustment, MaxAdjustment, MinAdjustment } from '../common/types/objects';
2
+ export declare type LaxLaxAmount = {
3
+ currency: string;
4
+ value?: string;
5
+ issuer?: string;
6
+ counterparty?: string;
7
+ };
8
+ export declare type Path = {
9
+ source: Adjustment | MaxAdjustment;
10
+ destination: Adjustment | MinAdjustment;
11
+ paths: string;
12
+ };
13
+ export declare type GetPaths = Array<Path>;
14
+ export declare type PathFind = {
15
+ source: {
16
+ address: string;
17
+ amount?: Amount;
18
+ currencies?: Array<{
19
+ currency: string;
20
+ counterparty?: string;
21
+ }>;
22
+ };
23
+ destination: {
24
+ address: string;
25
+ amount: LaxLaxAmount;
26
+ };
27
+ };
28
+ export declare type PathFindRequest = {
29
+ command: string;
30
+ source_account: string;
31
+ destination_amount: RippledAmount;
32
+ destination_account: string;
33
+ source_currencies?: {
34
+ currency: string;
35
+ issuer?: string;
36
+ }[];
37
+ send_max?: RippledAmount;
38
+ };
39
+ export declare type RippledPathsResponse = {
40
+ alternatives: Array<{
41
+ paths_computed: Array<Array<{
42
+ type: number;
43
+ type_hex: string;
44
+ account?: string;
45
+ issuer?: string;
46
+ currency?: string;
47
+ }>>;
48
+ source_amount: RippledAmount;
49
+ }>;
50
+ type: string;
51
+ destination_account: string;
52
+ destination_amount: RippledAmount;
53
+ destination_currencies?: Array<string>;
54
+ source_account: string;
55
+ source_currencies?: Array<{
56
+ currency: string;
57
+ }>;
58
+ full_reply?: boolean;
59
+ };
60
+ //# sourceMappingURL=pathfind-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathfind-types.d.ts","sourceRoot":"","sources":["../../../src/ledger/pathfind-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,EACb,aAAa,EACd,MAAM,yBAAyB,CAAA;AAGhC,oBAAY,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,oBAAY,IAAI,GAAG;IACjB,MAAM,EAA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EAAE,aAAa,CAAA;IACjC,sBAAsB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACtC,cAAc,EAAE,MAAM,CAAA;IACtB,iBAAiB,CAAC,EAAE,KAAK,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC,CAAC,CAAA;IAC7C,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pathfind-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathfind-types.js","sourceRoot":"","sources":["../../../src/ledger/pathfind-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { GetPaths, PathFind } from './pathfind-types';
2
+ import { RippleAPI } from '..';
3
+ declare function getPaths(this: RippleAPI, pathfind: PathFind): Promise<GetPaths>;
4
+ export default getPaths;
5
+ //# sourceMappingURL=pathfind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathfind.d.ts","sourceRoot":"","sources":["../../../src/ledger/pathfind.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,QAAQ,EACR,QAAQ,EAGT,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAwK5B,iBAAS,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAUxE;AAED,eAAe,QAAQ,CAAA"}
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ const _ = __importStar(require("lodash"));
26
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
27
+ const utils_1 = require("./utils");
28
+ const common_1 = require("../common");
29
+ const pathfind_1 = __importDefault(require("./parse/pathfind"));
30
+ const NotFoundError = common_1.errors.NotFoundError;
31
+ const ValidationError = common_1.errors.ValidationError;
32
+ function addParams(request, result) {
33
+ return _.defaults(Object.assign({}, result, {
34
+ source_account: request.source_account,
35
+ source_currencies: request.source_currencies
36
+ }), { destination_amount: request.destination_amount });
37
+ }
38
+ function requestPathFind(connection, pathfind) {
39
+ const destinationAmount = Object.assign({
40
+ value: pathfind.destination.amount.currency === 'XRP' ? common_1.dropsToXrp('-1') : '-1'
41
+ }, pathfind.destination.amount);
42
+ const request = {
43
+ command: 'ripple_path_find',
44
+ source_account: pathfind.source.address,
45
+ destination_account: pathfind.destination.address,
46
+ destination_amount: common_1.toRippledAmount(destinationAmount)
47
+ };
48
+ if (typeof request.destination_amount === 'object' &&
49
+ !request.destination_amount.issuer) {
50
+ request.destination_amount.issuer = request.destination_account;
51
+ }
52
+ if (pathfind.source.currencies && pathfind.source.currencies.length > 0) {
53
+ request.source_currencies = pathfind.source.currencies.map((amount) => utils_1.renameCounterpartyToIssuer(amount));
54
+ }
55
+ if (pathfind.source.amount) {
56
+ if (pathfind.destination.amount.value != null) {
57
+ throw new ValidationError('Cannot specify both source.amount' +
58
+ ' and destination.amount.value in getPaths');
59
+ }
60
+ request.send_max = common_1.toRippledAmount(pathfind.source.amount);
61
+ if (typeof request.send_max !== 'string' && !request.send_max.issuer) {
62
+ request.send_max.issuer = pathfind.source.address;
63
+ }
64
+ }
65
+ return connection.request(request).then((paths) => addParams(request, paths));
66
+ }
67
+ function addDirectXrpPath(paths, xrpBalance) {
68
+ const destinationAmount = paths.destination_amount;
69
+ if (new bignumber_js_1.default(xrpBalance).isGreaterThanOrEqualTo(destinationAmount)) {
70
+ paths.alternatives.unshift({
71
+ paths_computed: [],
72
+ source_amount: paths.destination_amount
73
+ });
74
+ }
75
+ return paths;
76
+ }
77
+ function isRippledIOUAmount(amount) {
78
+ return (typeof amount === 'object' && amount.currency && amount.currency !== 'XRP');
79
+ }
80
+ function conditionallyAddDirectXRPPath(connection, address, paths) {
81
+ if (isRippledIOUAmount(paths.destination_amount) ||
82
+ !paths.destination_currencies.includes('XRP')) {
83
+ return Promise.resolve(paths);
84
+ }
85
+ return utils_1.getXRPBalance(connection, address, undefined).then((xrpBalance) => addDirectXrpPath(paths, xrpBalance));
86
+ }
87
+ function filterSourceFundsLowPaths(pathfind, paths) {
88
+ if (pathfind.source.amount &&
89
+ pathfind.destination.amount.value == null &&
90
+ paths.alternatives) {
91
+ paths.alternatives = paths.alternatives.filter((alt) => {
92
+ if (!alt.source_amount) {
93
+ return false;
94
+ }
95
+ const pathfindSourceAmountValue = new bignumber_js_1.default(pathfind.source.amount.currency === 'XRP'
96
+ ? common_1.xrpToDrops(pathfind.source.amount.value)
97
+ : pathfind.source.amount.value);
98
+ const altSourceAmountValue = new bignumber_js_1.default(typeof alt.source_amount === 'string'
99
+ ? alt.source_amount
100
+ : alt.source_amount.value);
101
+ return altSourceAmountValue.eq(pathfindSourceAmountValue);
102
+ });
103
+ }
104
+ return paths;
105
+ }
106
+ function formatResponse(pathfind, paths) {
107
+ if (paths.alternatives && paths.alternatives.length > 0) {
108
+ return pathfind_1.default(paths);
109
+ }
110
+ if (paths.destination_currencies != null &&
111
+ !paths.destination_currencies.includes(pathfind.destination.amount.currency)) {
112
+ throw new NotFoundError('No paths found. ' +
113
+ 'The destination_account does not accept ' +
114
+ pathfind.destination.amount.currency +
115
+ ', they only accept: ' +
116
+ paths.destination_currencies.join(', '));
117
+ }
118
+ else if (paths.source_currencies && paths.source_currencies.length > 0) {
119
+ throw new NotFoundError('No paths found. Please ensure' +
120
+ ' that the source_account has sufficient funds to execute' +
121
+ ' the payment in one of the specified source_currencies. If it does' +
122
+ ' there may be insufficient liquidity in the network to execute' +
123
+ ' this payment right now');
124
+ }
125
+ else {
126
+ throw new NotFoundError('No paths found.' +
127
+ ' Please ensure that the source_account has sufficient funds to' +
128
+ ' execute the payment. If it does there may be insufficient liquidity' +
129
+ ' in the network to execute this payment right now');
130
+ }
131
+ }
132
+ function getPaths(pathfind) {
133
+ common_1.validate.getPaths({ pathfind });
134
+ const address = pathfind.source.address;
135
+ return requestPathFind(this.connection, pathfind)
136
+ .then((paths) => conditionallyAddDirectXRPPath(this.connection, address, paths))
137
+ .then((paths) => filterSourceFundsLowPaths(pathfind, paths))
138
+ .then((paths) => formatResponse(pathfind, paths));
139
+ }
140
+ exports.default = getPaths;
141
+ //# sourceMappingURL=pathfind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathfind.js","sourceRoot":"","sources":["../../../src/ledger/pathfind.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA2B;AAC3B,gEAAoC;AACpC,mCAAiE;AACjE,sCAMkB;AAElB,gEAA4C;AAS5C,MAAM,aAAa,GAAG,eAAM,CAAC,aAAa,CAAA;AAC1C,MAAM,eAAe,GAAG,eAAM,CAAC,eAAe,CAAA;AAE9C,SAAS,SAAS,CAChB,OAAwB,EACxB,MAA4B;IAE5B,OAAO,CAAC,CAAC,QAAQ,CACf,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE;QACxB,cAAc,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AACrD,CAAC;AAED,kBAAe,QAAQ,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { FormattedPaymentChannel } from './parse/payment-channel';
2
+ import { RippleAPI } from '..';
3
+ declare function getPaymentChannel(this: RippleAPI, id: string): Promise<FormattedPaymentChannel>;
4
+ export default getPaymentChannel;
5
+ //# sourceMappingURL=payment-channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-channel.d.ts","sourceRoot":"","sources":["../../../src/ledger/payment-channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,uBAAuB,EACxB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAgB5B,iBAAe,iBAAiB,CAC9B,IAAI,EAAE,SAAS,EACf,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,uBAAuB,CAAC,CAWlC;AAED,eAAe,iBAAiB,CAAA"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const payment_channel_1 = require("./parse/payment-channel");
13
+ const common_1 = require("../common");
14
+ const NotFoundError = common_1.errors.NotFoundError;
15
+ function formatResponse(response) {
16
+ if (response.node == null ||
17
+ response.node.LedgerEntryType !== 'PayChannel') {
18
+ throw new NotFoundError('Payment channel ledger entry not found');
19
+ }
20
+ return payment_channel_1.parsePaymentChannel(response.node);
21
+ }
22
+ function getPaymentChannel(id) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ common_1.validate.getPaymentChannel({ id });
25
+ const response = yield this.request('ledger_entry', {
26
+ index: id,
27
+ binary: false,
28
+ ledger_index: 'validated'
29
+ });
30
+ return formatResponse(response);
31
+ });
32
+ }
33
+ exports.default = getPaymentChannel;
34
+ //# sourceMappingURL=payment-channel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-channel.js","sourceRoot":"","sources":["../../../src/ledger/payment-channel.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6DAGgC;AAChC,sCAA0C;AAG1C,MAAM,aAAa,GAAG,eAAM,CAAC,aAAa,CAAA;AAE1C,SAAS,cAAc,CACrB,QAA6B;IAE7B,IACE,QAAQ,CAAC,IAAI,IAAI,IAAI;QACrB,QAAQ,CAAC,IAAI,CAAC,eAAe,KAAK,YAAY,EAC9C;QACA,MAAM,IAAI,aAAa,CAAC,wCAAwC,CAAC,CAAA;KAClE;IACD,OAAO,qCAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;AAC3C,CAAC;AAED,SAAe,iBAAiB,CAE9B,EAAU;;QAGV,iBAAQ,CAAC,iBAAiB,CAAC,EAAC,EAAE,EAAC,CAAC,CAAA;QAEhC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;YAClD,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,KAAK;YACb,YAAY,EAAE,WAAW;SAC1B,CAAC,CAAA;QAEF,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAA;IACjC,CAAC;CAAA;AAED,kBAAe,iBAAiB,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { FormattedSettings } from '../common/types/objects';
2
+ import { RippleAPI } from '..';
3
+ import { Settings } from '../common/constants';
4
+ export declare type SettingsOptions = {
5
+ ledgerVersion?: number | 'validated' | 'closed' | 'current';
6
+ };
7
+ export declare function parseAccountFlags(value: number, options?: {
8
+ excludeFalse?: boolean;
9
+ }): Settings;
10
+ export declare function getSettings(this: RippleAPI, address: string, options?: SettingsOptions): Promise<FormattedSettings>;
11
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/ledger/settings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAA;AAEzD,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAC5B,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAA;AAI5C,oBAAY,eAAe,GAAG;IAC5B,aAAa,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAA;CAC5D,CAAA;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAM,GACrC,QAAQ,CAYV;AASD,wBAAsB,WAAW,CAC/B,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,iBAAiB,CAAC,CAgB5B"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.getSettings = exports.parseAccountFlags = void 0;
16
+ const fields_1 = __importDefault(require("./parse/fields"));
17
+ const common_1 = require("../common");
18
+ const AccountFlags = common_1.constants.AccountFlags;
19
+ function parseAccountFlags(value, options = {}) {
20
+ const settings = {};
21
+ for (const flagName in AccountFlags) {
22
+ if (value & AccountFlags[flagName]) {
23
+ settings[flagName] = true;
24
+ }
25
+ else {
26
+ if (!options.excludeFalse) {
27
+ settings[flagName] = false;
28
+ }
29
+ }
30
+ }
31
+ return settings;
32
+ }
33
+ exports.parseAccountFlags = parseAccountFlags;
34
+ function formatSettings(response) {
35
+ const data = response.account_data;
36
+ const parsedFlags = parseAccountFlags(data.Flags, { excludeFalse: true });
37
+ const parsedFields = fields_1.default(data);
38
+ return Object.assign({}, parsedFlags, parsedFields);
39
+ }
40
+ function getSettings(address, options = {}) {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ common_1.validate.getSettings({ address, options });
43
+ address = common_1.ensureClassicAddress(address);
44
+ const response = yield this.request('account_info', {
45
+ account: address,
46
+ ledger_index: options.ledgerVersion || 'validated',
47
+ signer_lists: true
48
+ });
49
+ return formatSettings(response);
50
+ });
51
+ }
52
+ exports.getSettings = getSettings;
53
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/ledger/settings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4DAAwC;AACxC,sCAAmE;AAMnE,MAAM,YAAY,GAAG,kBAAS,CAAC,YAAY,CAAA;AAM3C,SAAgB,iBAAiB,CAC/B,KAAa,EACb,UAAoC,EAAE;IAEtC,MAAM,QAAQ,GAAG,EAAE,CAAA;IACnB,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE;QACnC,IAAI,KAAK,GAAG,YAAY,CAAC,QAAQ,CAAC,EAAE;YAClC,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAA;SAC1B;aAAM;YACL,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;gBACzB,QAAQ,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAA;aAC3B;SACF;KACF;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC;AAfD,8CAeC;AAED,SAAS,cAAc,CAAC,QAA6B;IACnD,MAAM,IAAI,GAAG,QAAQ,CAAC,YAAY,CAAA;IAClC,MAAM,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,EAAC,YAAY,EAAE,IAAI,EAAC,CAAC,CAAA;IACvE,MAAM,YAAY,GAAG,gBAAW,CAAC,IAAI,CAAC,CAAA;IACtC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,WAAW,EAAE,YAAY,CAAC,CAAA;AACrD,CAAC;AAED,SAAsB,WAAW,CAE/B,OAAe,EACf,UAA2B,EAAE;;QAG7B,iBAAQ,CAAC,WAAW,CAAC,EAAC,OAAO,EAAE,OAAO,EAAC,CAAC,CAAA;QAIxC,OAAO,GAAG,6BAAoB,CAAC,OAAO,CAAC,CAAA;QAGvC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;YAClD,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE,OAAO,CAAC,aAAa,IAAI,WAAW;YAClD,YAAY,EAAE,IAAI;SACnB,CAAC,CAAA;QAEF,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAA;IACjC,CAAC;CAAA;AApBD,kCAoBC"}
@@ -0,0 +1,10 @@
1
+ import { FormattedTransactionType } from '../transaction/types';
2
+ import { RippleAPI } from '..';
3
+ export declare type TransactionOptions = {
4
+ minLedgerVersion?: number;
5
+ maxLedgerVersion?: number;
6
+ includeRawTransaction?: boolean;
7
+ };
8
+ declare function getTransaction(this: RippleAPI, id: string, options?: TransactionOptions): Promise<FormattedTransactionType>;
9
+ export default getTransaction;
10
+ //# sourceMappingURL=transaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/ledger/transaction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,wBAAwB,EAAC,MAAM,sBAAsB,CAAA;AAE7D,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,oBAAY,kBAAkB,GAAG;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AA8GD,iBAAe,cAAc,CAC3B,IAAI,EAAE,SAAS,EACf,EAAE,EAAE,MAAM,EACV,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,wBAAwB,CAAC,CAanC;AAED,eAAe,cAAc,CAAA"}
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
+ return new (P || (P = Promise))(function (resolve, reject) {
24
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
28
+ });
29
+ };
30
+ var __importDefault = (this && this.__importDefault) || function (mod) {
31
+ return (mod && mod.__esModule) ? mod : { "default": mod };
32
+ };
33
+ Object.defineProperty(exports, "__esModule", { value: true });
34
+ const utils = __importStar(require("./utils"));
35
+ const transaction_1 = __importDefault(require("./parse/transaction"));
36
+ const common_1 = require("../common");
37
+ function attachTransactionDate(connection, tx) {
38
+ if (tx.date) {
39
+ return Promise.resolve(tx);
40
+ }
41
+ const ledgerVersion = tx.ledger_index || tx.LedgerSequence;
42
+ if (!ledgerVersion) {
43
+ return new Promise(() => {
44
+ const error = new common_1.errors.NotFoundError('Transaction has not been validated yet; try again later');
45
+ error.data = {
46
+ details: '(ledger_index and LedgerSequence not found in tx)'
47
+ };
48
+ throw error;
49
+ });
50
+ }
51
+ const request = {
52
+ command: 'ledger',
53
+ ledger_index: ledgerVersion
54
+ };
55
+ return connection
56
+ .request(request)
57
+ .then((data) => {
58
+ if (typeof data.ledger.close_time === 'number') {
59
+ return Object.assign({ date: data.ledger.close_time }, tx);
60
+ }
61
+ throw new common_1.errors.UnexpectedError('Ledger missing close_time');
62
+ })
63
+ .catch((error) => {
64
+ if (error instanceof common_1.errors.UnexpectedError) {
65
+ throw error;
66
+ }
67
+ throw new common_1.errors.NotFoundError('Transaction ledger not found');
68
+ });
69
+ }
70
+ function isTransactionInRange(tx, options) {
71
+ return ((!options.minLedgerVersion ||
72
+ tx.ledger_index >= options.minLedgerVersion) &&
73
+ (!options.maxLedgerVersion || tx.ledger_index <= options.maxLedgerVersion));
74
+ }
75
+ function convertError(connection, options, error) {
76
+ let shouldUseNotFoundError = false;
77
+ if ((error.data && error.data.error === 'txnNotFound') ||
78
+ error.message === 'txnNotFound') {
79
+ shouldUseNotFoundError = true;
80
+ }
81
+ const _error = shouldUseNotFoundError
82
+ ? new common_1.errors.NotFoundError('Transaction not found')
83
+ : error;
84
+ if (_error instanceof common_1.errors.NotFoundError) {
85
+ return utils
86
+ .hasCompleteLedgerRange(connection, options.minLedgerVersion, options.maxLedgerVersion)
87
+ .then((hasCompleteLedgerRange) => {
88
+ if (!hasCompleteLedgerRange) {
89
+ return utils
90
+ .isPendingLedgerVersion(connection, options.maxLedgerVersion)
91
+ .then((isPendingLedgerVersion) => {
92
+ return isPendingLedgerVersion
93
+ ? new common_1.errors.PendingLedgerVersionError()
94
+ : new common_1.errors.MissingLedgerHistoryError();
95
+ });
96
+ }
97
+ return _error;
98
+ });
99
+ }
100
+ return Promise.resolve(_error);
101
+ }
102
+ function formatResponse(options, tx) {
103
+ if (tx.validated !== true || !isTransactionInRange(tx, options)) {
104
+ throw new common_1.errors.NotFoundError('Transaction not found');
105
+ }
106
+ return transaction_1.default(tx, options.includeRawTransaction);
107
+ }
108
+ function getTransaction(id, options = {}) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ common_1.validate.getTransaction({ id, options });
111
+ const _options = yield utils.ensureLedgerVersion.call(this, options);
112
+ try {
113
+ const tx = yield this.request('tx', {
114
+ transaction: id,
115
+ binary: false
116
+ });
117
+ const txWithDate = yield attachTransactionDate(this.connection, tx);
118
+ return formatResponse(_options, txWithDate);
119
+ }
120
+ catch (error) {
121
+ throw yield convertError(this.connection, _options, error);
122
+ }
123
+ });
124
+ }
125
+ exports.default = getTransaction;
126
+ //# sourceMappingURL=transaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../src/ledger/transaction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,sEAAkD;AAClD,sCAA0C;AAkB1C,SAAS,qBAAqB,CAC5B,UAAsB,EACtB,EAAO;IAEP,IAAI,EAAE,CAAC,IAAI,EAAE;QACX,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;KAC3B;IAED,MAAM,aAAa,GA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AuB,CAAC,CAAA;KACxD;IACD,OAAO,qBAAgB,CAAC,EAAE,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAA;AAC5D,CAAC;AAED,SAAe,cAAc,CAE3B,EAAU,EACV,UAA8B,EAAE;;QAEhC,iBAAQ,CAAC,cAAc,CAAC,EAAC,EAAE,EAAE,OAAO,EAAC,CAAC,CAAA;QACtC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QACpE,IAAI;YACF,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;gBAClC,WAAW,EAAE,EAAE;gBACf,MAAM,EAAE,KAAK;aACd,CAAC,CAAA;YACF,MAAM,UAAU,GAAG,MAAM,qBAAqB,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;YACnE,OAAO,cAAc,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAA;SAC5C;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,MAAM,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SAC3D;IACH,CAAC;CAAA;AAED,kBAAe,cAAc,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { FormattedTransactionType } from '../transaction/types';
2
+ import { RippleAPI } from '..';
3
+ export declare type TransactionsOptions = {
4
+ start?: string;
5
+ limit?: number;
6
+ minLedgerVersion?: number;
7
+ maxLedgerVersion?: number;
8
+ earliestFirst?: boolean;
9
+ excludeFailures?: boolean;
10
+ initiated?: boolean;
11
+ counterparty?: string;
12
+ types?: Array<string>;
13
+ includeRawTransactions?: boolean;
14
+ binary?: boolean;
15
+ startTx?: FormattedTransactionType;
16
+ };
17
+ export declare type GetTransactionsResponse = Array<FormattedTransactionType>;
18
+ declare function getTransactions(this: RippleAPI, address: string, options?: TransactionsOptions): Promise<GetTransactionsResponse>;
19
+ export default getTransactions;
20
+ //# sourceMappingURL=transactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../src/ledger/transactions.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,wBAAwB,EAAC,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,oBAAY,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACrB,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,wBAAwB,CAAA;CACnC,CAAA;AAED,oBAAY,uBAAuB,GAAG,KAAK,CAAC,wBAAwB,CAAC,CAAA;AAqKrE,iBAAS,eAAe,CACtB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,uBAAuB,CAAC,CAsBlC;AAED,eAAe,eAAe,CAAA"}