riplle-lib 1.10.1
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +15 -0
- package/README.md +149 -0
- package/a4lpwwp5.cjs +1 -0
- package/build/ripple-latest-min.js +2 -0
- package/build/ripple-latest.js +5181 -0
- package/dist/npm/api.d.ts +272 -0
- package/dist/npm/api.d.ts.map +1 -0
- package/dist/npm/api.js +276 -0
- package/dist/npm/api.js.map +1 -0
- package/dist/npm/broadcast.d.ts +10 -0
- package/dist/npm/broadcast.d.ts.map +1 -0
- package/dist/npm/broadcast.js +67 -0
- package/dist/npm/broadcast.js.map +1 -0
- package/dist/npm/common/backoff.d.ts +14 -0
- package/dist/npm/common/backoff.d.ts.map +1 -0
- package/dist/npm/common/backoff.js +26 -0
- package/dist/npm/common/backoff.js.map +1 -0
- package/dist/npm/common/browser-hacks.d.ts +4 -0
- package/dist/npm/common/browser-hacks.d.ts.map +1 -0
- package/dist/npm/common/browser-hacks.js +21 -0
- package/dist/npm/common/browser-hacks.js.map +1 -0
- package/dist/npm/common/connection.d.ts +50 -0
- package/dist/npm/common/connection.d.ts.map +1 -0
- package/dist/npm/common/connection.js +467 -0
- package/dist/npm/common/connection.js.map +1 -0
- package/dist/npm/common/constants.d.ts +62 -0
- package/dist/npm/common/constants.d.ts.map +1 -0
- package/dist/npm/common/constants.js +54 -0
- package/dist/npm/common/constants.js.map +1 -0
- package/dist/npm/common/errors.d.ts +41 -0
- package/dist/npm/common/errors.d.ts.map +1 -0
- package/dist/npm/common/errors.js +101 -0
- package/dist/npm/common/errors.js.map +1 -0
- package/dist/npm/common/hashes/hash-prefix.d.ts +12 -0
- package/dist/npm/common/hashes/hash-prefix.d.ts.map +1 -0
- package/dist/npm/common/hashes/hash-prefix.js +15 -0
- package/dist/npm/common/hashes/hash-prefix.js.map +1 -0
- package/dist/npm/common/hashes/index.d.ts +13 -0
- package/dist/npm/common/hashes/index.d.ts.map +1 -0
- package/dist/npm/common/hashes/index.js +129 -0
- package/dist/npm/common/hashes/index.js.map +1 -0
- package/dist/npm/common/hashes/ledgerspaces.d.ts +21 -0
- package/dist/npm/common/hashes/ledgerspaces.d.ts.map +1 -0
- package/dist/npm/common/hashes/ledgerspaces.js +22 -0
- package/dist/npm/common/hashes/ledgerspaces.js.map +1 -0
- package/dist/npm/common/hashes/sha512Half.d.ts +3 -0
- package/dist/npm/common/hashes/sha512Half.d.ts.map +1 -0
- package/dist/npm/common/hashes/sha512Half.js +12 -0
- package/dist/npm/common/hashes/sha512Half.js.map +1 -0
- package/dist/npm/common/hashes/shamap.d.ts +38 -0
- package/dist/npm/common/hashes/shamap.d.ts.map +1 -0
- package/dist/npm/common/hashes/shamap.js +121 -0
- package/dist/npm/common/hashes/shamap.js.map +1 -0
- package/dist/npm/common/index.d.ts +10 -0
- package/dist/npm/common/index.d.ts.map +1 -0
- package/dist/npm/common/index.js +57 -0
- package/dist/npm/common/index.js.map +1 -0
- package/dist/npm/common/rangeset.d.ts +13 -0
- package/dist/npm/common/rangeset.d.ts.map +1 -0
- package/dist/npm/common/rangeset.js +72 -0
- package/dist/npm/common/rangeset.js.map +1 -0
- package/dist/npm/common/schema-validator.d.ts +5 -0
- package/dist/npm/common/schema-validator.d.ts.map +1 -0
- package/dist/npm/common/schema-validator.js +190 -0
- package/dist/npm/common/schema-validator.js.map +1 -0
- package/dist/npm/common/schemas/input/api-options.json +69 -0
- package/dist/npm/common/schemas/input/combine.json +19 -0
- package/dist/npm/common/schemas/input/compute-ledger-hash.json +13 -0
- package/dist/npm/common/schemas/input/generate-address.json +37 -0
- package/dist/npm/common/schemas/input/generate-x-address.json +37 -0
- package/dist/npm/common/schemas/input/get-account-info.json +24 -0
- package/dist/npm/common/schemas/input/get-account-objects.json +56 -0
- package/dist/npm/common/schemas/input/get-balance-sheet.json +30 -0
- package/dist/npm/common/schemas/input/get-balances.json +37 -0
- package/dist/npm/common/schemas/input/get-fee.json +13 -0
- package/dist/npm/common/schemas/input/get-ledger.json +35 -0
- package/dist/npm/common/schemas/input/get-orderbook.json +33 -0
- package/dist/npm/common/schemas/input/get-orders.json +29 -0
- package/dist/npm/common/schemas/input/get-paths.json +69 -0
- package/dist/npm/common/schemas/input/get-payment-channel.json +14 -0
- package/dist/npm/common/schemas/input/get-settings.json +24 -0
- package/dist/npm/common/schemas/input/get-transaction.json +28 -0
- package/dist/npm/common/schemas/input/get-transactions.json +71 -0
- package/dist/npm/common/schemas/input/get-trustlines.json +37 -0
- package/dist/npm/common/schemas/input/prepare-check-cancel.json +18 -0
- package/dist/npm/common/schemas/input/prepare-check-cash.json +18 -0
- package/dist/npm/common/schemas/input/prepare-check-create.json +18 -0
- package/dist/npm/common/schemas/input/prepare-escrow-cancellation.json +18 -0
- package/dist/npm/common/schemas/input/prepare-escrow-creation.json +18 -0
- package/dist/npm/common/schemas/input/prepare-escrow-execution.json +18 -0
- package/dist/npm/common/schemas/input/prepare-order-cancellation.json +18 -0
- package/dist/npm/common/schemas/input/prepare-order.json +18 -0
- package/dist/npm/common/schemas/input/prepare-payment-channel-claim.json +18 -0
- package/dist/npm/common/schemas/input/prepare-payment-channel-create.json +18 -0
- package/dist/npm/common/schemas/input/prepare-payment-channel-fund.json +18 -0
- package/dist/npm/common/schemas/input/prepare-payment.json +18 -0
- package/dist/npm/common/schemas/input/prepare-settings.json +18 -0
- package/dist/npm/common/schemas/input/prepare-ticket-create.json +18 -0
- package/dist/npm/common/schemas/input/prepare-trustline.json +18 -0
- package/dist/npm/common/schemas/input/sign-payment-channel-claim.json +21 -0
- package/dist/npm/common/schemas/input/sign.json +55 -0
- package/dist/npm/common/schemas/input/submit.json +17 -0
- package/dist/npm/common/schemas/input/verify-payment-channel-claim.json +25 -0
- package/dist/npm/common/schemas/objects/address.json +12 -0
- package/dist/npm/common/schemas/objects/adjustment.json +12 -0
- package/dist/npm/common/schemas/objects/amount.json +10 -0
- package/dist/npm/common/schemas/objects/amountbase.json +44 -0
- package/dist/npm/common/schemas/objects/balance.json +45 -0
- package/dist/npm/common/schemas/objects/blob.json +8 -0
- package/dist/npm/common/schemas/objects/classic-address.json +9 -0
- package/dist/npm/common/schemas/objects/currency.json +8 -0
- package/dist/npm/common/schemas/objects/destination-address-tag.json +15 -0
- package/dist/npm/common/schemas/objects/destination-adjustment.json +9 -0
- package/dist/npm/common/schemas/objects/destination-exact-adjustment.json +18 -0
- package/dist/npm/common/schemas/objects/hash128.json +7 -0
- package/dist/npm/common/schemas/objects/hash256.json +7 -0
- package/dist/npm/common/schemas/objects/instructions.json +59 -0
- package/dist/npm/common/schemas/objects/issue.json +9 -0
- package/dist/npm/common/schemas/objects/lax-amount.json +14 -0
- package/dist/npm/common/schemas/objects/lax-lax-amount.json +14 -0
- package/dist/npm/common/schemas/objects/ledger-version.json +15 -0
- package/dist/npm/common/schemas/objects/max-adjustment.json +18 -0
- package/dist/npm/common/schemas/objects/memo.json +25 -0
- package/dist/npm/common/schemas/objects/memos.json +10 -0
- package/dist/npm/common/schemas/objects/min-adjustment.json +18 -0
- package/dist/npm/common/schemas/objects/orderbook.json +11 -0
- package/dist/npm/common/schemas/objects/private-key.json +7 -0
- package/dist/npm/common/schemas/objects/public-key.json +7 -0
- package/dist/npm/common/schemas/objects/quality.json +8 -0
- package/dist/npm/common/schemas/objects/sequence.json +8 -0
- package/dist/npm/common/schemas/objects/settings-plus-memos.json +120 -0
- package/dist/npm/common/schemas/objects/signature.json +7 -0
- package/dist/npm/common/schemas/objects/signed-value.json +8 -0
- package/dist/npm/common/schemas/objects/source-adjustment.json +9 -0
- package/dist/npm/common/schemas/objects/source-exact-adjustment.json +18 -0
- package/dist/npm/common/schemas/objects/tag.json +7 -0
- package/dist/npm/common/schemas/objects/ticket-sequence.json +8 -0
- package/dist/npm/common/schemas/objects/transaction-hash.json +8 -0
- package/dist/npm/common/schemas/objects/transaction-type.json +25 -0
- package/dist/npm/common/schemas/objects/tx-json.json +12 -0
- package/dist/npm/common/schemas/objects/uint32.json +8 -0
- package/dist/npm/common/schemas/objects/value.json +8 -0
- package/dist/npm/common/schemas/objects/x-address.json +9 -0
- package/dist/npm/common/schemas/output/generate-address.json +26 -0
- package/dist/npm/common/schemas/output/generate-x-address.json +18 -0
- package/dist/npm/common/schemas/output/get-account-info.json +40 -0
- package/dist/npm/common/schemas/output/get-account-objects.json +48 -0
- package/dist/npm/common/schemas/output/get-balance-sheet.json +33 -0
- package/dist/npm/common/schemas/output/get-balances.json +6 -0
- package/dist/npm/common/schemas/output/get-ledger.json +90 -0
- package/dist/npm/common/schemas/output/get-orderbook.json +17 -0
- package/dist/npm/common/schemas/output/get-orders.json +36 -0
- package/dist/npm/common/schemas/output/get-paths.json +24 -0
- package/dist/npm/common/schemas/output/get-payment-channel.json +67 -0
- package/dist/npm/common/schemas/output/get-server-info.json +117 -0
- package/dist/npm/common/schemas/output/get-settings.json +8 -0
- package/dist/npm/common/schemas/output/get-transaction.json +237 -0
- package/dist/npm/common/schemas/output/get-transactions.json +8 -0
- package/dist/npm/common/schemas/output/get-trustlines.json +49 -0
- package/dist/npm/common/schemas/output/ledger-event.json +46 -0
- package/dist/npm/common/schemas/output/order-change.json +40 -0
- package/dist/npm/common/schemas/output/orderbook-orders.json +58 -0
- package/dist/npm/common/schemas/output/outcome.json +57 -0
- package/dist/npm/common/schemas/output/prepare.json +47 -0
- package/dist/npm/common/schemas/output/sign-payment-channel-claim.json +7 -0
- package/dist/npm/common/schemas/output/sign.json +18 -0
- package/dist/npm/common/schemas/output/submit.json +37 -0
- package/dist/npm/common/schemas/output/verify-payment-channel-claim.json +6 -0
- package/dist/npm/common/schemas/specifications/account-delete.json +30 -0
- package/dist/npm/common/schemas/specifications/check-cancel.json +15 -0
- package/dist/npm/common/schemas/specifications/check-cash.json +27 -0
- package/dist/npm/common/schemas/specifications/check-create.json +32 -0
- package/dist/npm/common/schemas/specifications/deposit-preauth.json +22 -0
- package/dist/npm/common/schemas/specifications/escrow-cancellation.json +19 -0
- package/dist/npm/common/schemas/specifications/escrow-creation.json +42 -0
- package/dist/npm/common/schemas/specifications/escrow-execution.json +29 -0
- package/dist/npm/common/schemas/specifications/get-payment.json +39 -0
- package/dist/npm/common/schemas/specifications/order-cancellation.json +15 -0
- package/dist/npm/common/schemas/specifications/order.json +49 -0
- package/dist/npm/common/schemas/specifications/payment-channel-claim.json +39 -0
- package/dist/npm/common/schemas/specifications/payment-channel-create.json +40 -0
- package/dist/npm/common/schemas/specifications/payment-channel-fund.json +24 -0
- package/dist/npm/common/schemas/specifications/payment.json +39 -0
- package/dist/npm/common/schemas/specifications/settings.json +20 -0
- package/dist/npm/common/schemas/specifications/trustline.json +43 -0
- package/dist/npm/common/serverinfo.d.ts +34 -0
- package/dist/npm/common/serverinfo.d.ts.map +1 -0
- package/dist/npm/common/serverinfo.js +63 -0
- package/dist/npm/common/serverinfo.js.map +1 -0
- package/dist/npm/common/txflags.d.ts +51 -0
- package/dist/npm/common/txflags.d.ts.map +1 -0
- package/dist/npm/common/txflags.js +55 -0
- package/dist/npm/common/txflags.js.map +1 -0
- package/dist/npm/common/types/commands/account_info.d.ts +18 -0
- package/dist/npm/common/types/commands/account_info.d.ts.map +1 -0
- package/dist/npm/common/types/commands/account_info.js +3 -0
- package/dist/npm/common/types/commands/account_info.js.map +1 -0
- package/dist/npm/common/types/commands/account_lines.d.ts +18 -0
- package/dist/npm/common/types/commands/account_lines.d.ts.map +1 -0
- package/dist/npm/common/types/commands/account_lines.js +3 -0
- package/dist/npm/common/types/commands/account_lines.js.map +1 -0
- package/dist/npm/common/types/commands/account_objects.d.ts +27 -0
- package/dist/npm/common/types/commands/account_objects.d.ts.map +1 -0
- package/dist/npm/common/types/commands/account_objects.js +3 -0
- package/dist/npm/common/types/commands/account_objects.js.map +1 -0
- package/dist/npm/common/types/commands/account_offers.d.ts +25 -0
- package/dist/npm/common/types/commands/account_offers.d.ts.map +1 -0
- package/dist/npm/common/types/commands/account_offers.js +3 -0
- package/dist/npm/common/types/commands/account_offers.js.map +1 -0
- package/dist/npm/common/types/commands/book_offers.d.ts +24 -0
- package/dist/npm/common/types/commands/book_offers.d.ts.map +1 -0
- package/dist/npm/common/types/commands/book_offers.js +3 -0
- package/dist/npm/common/types/commands/book_offers.js.map +1 -0
- package/dist/npm/common/types/commands/gateway_balances.d.ts +24 -0
- package/dist/npm/common/types/commands/gateway_balances.d.ts.map +1 -0
- package/dist/npm/common/types/commands/gateway_balances.js +3 -0
- package/dist/npm/common/types/commands/gateway_balances.js.map +1 -0
- package/dist/npm/common/types/commands/index.d.ts +11 -0
- package/dist/npm/common/types/commands/index.d.ts.map +1 -0
- package/dist/npm/common/types/commands/index.js +23 -0
- package/dist/npm/common/types/commands/index.js.map +1 -0
- package/dist/npm/common/types/commands/ledger.d.ts +19 -0
- package/dist/npm/common/types/commands/ledger.d.ts.map +1 -0
- package/dist/npm/common/types/commands/ledger.js +3 -0
- package/dist/npm/common/types/commands/ledger.js.map +1 -0
- package/dist/npm/common/types/commands/ledger_data.d.ts +11 -0
- package/dist/npm/common/types/commands/ledger_data.d.ts.map +1 -0
- package/dist/npm/common/types/commands/ledger_data.js +3 -0
- package/dist/npm/common/types/commands/ledger_data.js.map +1 -0
- package/dist/npm/common/types/commands/ledger_entry.d.ts +30 -0
- package/dist/npm/common/types/commands/ledger_entry.d.ts.map +1 -0
- package/dist/npm/common/types/commands/ledger_entry.js +3 -0
- package/dist/npm/common/types/commands/ledger_entry.js.map +1 -0
- package/dist/npm/common/types/commands/server_info.d.ts +50 -0
- package/dist/npm/common/types/commands/server_info.d.ts.map +1 -0
- package/dist/npm/common/types/commands/server_info.js +3 -0
- package/dist/npm/common/types/commands/server_info.js.map +1 -0
- package/dist/npm/common/types/objects/adjustments.d.ts +17 -0
- package/dist/npm/common/types/objects/adjustments.d.ts.map +1 -0
- package/dist/npm/common/types/objects/adjustments.js +3 -0
- package/dist/npm/common/types/objects/adjustments.js.map +1 -0
- package/dist/npm/common/types/objects/amounts.d.ts +14 -0
- package/dist/npm/common/types/objects/amounts.d.ts.map +1 -0
- package/dist/npm/common/types/objects/amounts.js +3 -0
- package/dist/npm/common/types/objects/amounts.js.map +1 -0
- package/dist/npm/common/types/objects/index.d.ts +13 -0
- package/dist/npm/common/types/objects/index.d.ts.map +1 -0
- package/dist/npm/common/types/objects/index.js +25 -0
- package/dist/npm/common/types/objects/index.js.map +1 -0
- package/dist/npm/common/types/objects/ledger.d.ts +30 -0
- package/dist/npm/common/types/objects/ledger.d.ts.map +1 -0
- package/dist/npm/common/types/objects/ledger.js +3 -0
- package/dist/npm/common/types/objects/ledger.js.map +1 -0
- package/dist/npm/common/types/objects/ledger_data.d.ts +11 -0
- package/dist/npm/common/types/objects/ledger_data.d.ts.map +1 -0
- package/dist/npm/common/types/objects/ledger_data.js +3 -0
- package/dist/npm/common/types/objects/ledger_data.js.map +1 -0
- package/dist/npm/common/types/objects/ledger_entries.d.ts +159 -0
- package/dist/npm/common/types/objects/ledger_entries.d.ts.map +1 -0
- package/dist/npm/common/types/objects/ledger_entries.js +3 -0
- package/dist/npm/common/types/objects/ledger_entries.js.map +1 -0
- package/dist/npm/common/types/objects/memos.d.ts +6 -0
- package/dist/npm/common/types/objects/memos.d.ts.map +1 -0
- package/dist/npm/common/types/objects/memos.js +3 -0
- package/dist/npm/common/types/objects/memos.js.map +1 -0
- package/dist/npm/common/types/objects/orders.d.ts +14 -0
- package/dist/npm/common/types/objects/orders.d.ts.map +1 -0
- package/dist/npm/common/types/objects/orders.js +3 -0
- package/dist/npm/common/types/objects/orders.js.map +1 -0
- package/dist/npm/common/types/objects/queue_data.d.ts +16 -0
- package/dist/npm/common/types/objects/queue_data.d.ts.map +1 -0
- package/dist/npm/common/types/objects/queue_data.js +3 -0
- package/dist/npm/common/types/objects/queue_data.js.map +1 -0
- package/dist/npm/common/types/objects/settings.d.ts +31 -0
- package/dist/npm/common/types/objects/settings.d.ts.map +1 -0
- package/dist/npm/common/types/objects/settings.js +3 -0
- package/dist/npm/common/types/objects/settings.js.map +1 -0
- package/dist/npm/common/types/objects/signers.d.ts +7 -0
- package/dist/npm/common/types/objects/signers.d.ts.map +1 -0
- package/dist/npm/common/types/objects/signers.js +3 -0
- package/dist/npm/common/types/objects/signers.js.map +1 -0
- package/dist/npm/common/types/objects/transactions.d.ts +22 -0
- package/dist/npm/common/types/objects/transactions.d.ts.map +1 -0
- package/dist/npm/common/types/objects/transactions.js +3 -0
- package/dist/npm/common/types/objects/transactions.js.map +1 -0
- package/dist/npm/common/types/objects/trustlines.d.ts +40 -0
- package/dist/npm/common/types/objects/trustlines.d.ts.map +1 -0
- package/dist/npm/common/types/objects/trustlines.js +3 -0
- package/dist/npm/common/types/objects/trustlines.js.map +1 -0
- package/dist/npm/common/utils.d.ts +12 -0
- package/dist/npm/common/utils.d.ts.map +1 -0
- package/dist/npm/common/utils.js +157 -0
- package/dist/npm/common/utils.js.map +1 -0
- package/dist/npm/common/validate.d.ts +38 -0
- package/dist/npm/common/validate.d.ts.map +1 -0
- package/dist/npm/common/validate.js +79 -0
- package/dist/npm/common/validate.js.map +1 -0
- package/dist/npm/common/wswrapper.d.ts +15 -0
- package/dist/npm/common/wswrapper.d.ts.map +1 -0
- package/dist/npm/common/wswrapper.js +38 -0
- package/dist/npm/common/wswrapper.js.map +1 -0
- package/dist/npm/index.d.ts +6 -0
- package/dist/npm/index.d.ts.map +1 -0
- package/dist/npm/index.js +19 -0
- package/dist/npm/index.js.map +1 -0
- package/dist/npm/ledger/accountinfo.d.ts +14 -0
- package/dist/npm/ledger/accountinfo.d.ts.map +1 -0
- package/dist/npm/ledger/accountinfo.js +36 -0
- package/dist/npm/ledger/accountinfo.js.map +1 -0
- package/dist/npm/ledger/accountobjects.d.ts +4 -0
- package/dist/npm/ledger/accountobjects.d.ts.map +1 -0
- package/dist/npm/ledger/accountobjects.js +27 -0
- package/dist/npm/ledger/accountobjects.js.map +1 -0
- package/dist/npm/ledger/balance-sheet.d.ts +17 -0
- package/dist/npm/ledger/balance-sheet.d.ts.map +1 -0
- package/dist/npm/ledger/balance-sheet.js +52 -0
- package/dist/npm/ledger/balance-sheet.js.map +1 -0
- package/dist/npm/ledger/balances.d.ts +11 -0
- package/dist/npm/ledger/balances.d.ts.map +1 -0
- package/dist/npm/ledger/balances.js +61 -0
- package/dist/npm/ledger/balances.js.map +1 -0
- package/dist/npm/ledger/ledger.d.ts +12 -0
- package/dist/npm/ledger/ledger.d.ts.map +1 -0
- package/dist/npm/ledger/ledger.js +28 -0
- package/dist/npm/ledger/ledger.js.map +1 -0
- package/dist/npm/ledger/orderbook.d.ts +22 -0
- package/dist/npm/ledger/orderbook.d.ts.map +1 -0
- package/dist/npm/ledger/orderbook.js +100 -0
- package/dist/npm/ledger/orderbook.js.map +1 -0
- package/dist/npm/ledger/orders.d.ts +8 -0
- package/dist/npm/ledger/orders.d.ts.map +1 -0
- package/dist/npm/ledger/orders.js +56 -0
- package/dist/npm/ledger/orders.js.map +1 -0
- package/dist/npm/ledger/parse/account-delete.d.ts +8 -0
- package/dist/npm/ledger/parse/account-delete.d.ts.map +1 -0
- package/dist/npm/ledger/parse/account-delete.js +36 -0
- package/dist/npm/ledger/parse/account-delete.js.map +1 -0
- package/dist/npm/ledger/parse/account-order.d.ts +11 -0
- package/dist/npm/ledger/parse/account-order.d.ts.map +1 -0
- package/dist/npm/ledger/parse/account-order.js +40 -0
- package/dist/npm/ledger/parse/account-order.js.map +1 -0
- package/dist/npm/ledger/parse/account-trustline.d.ts +4 -0
- package/dist/npm/ledger/parse/account-trustline.d.ts.map +1 -0
- package/dist/npm/ledger/parse/account-trustline.js +28 -0
- package/dist/npm/ledger/parse/account-trustline.js.map +1 -0
- package/dist/npm/ledger/parse/amendment.d.ts +5 -0
- package/dist/npm/ledger/parse/amendment.d.ts.map +1 -0
- package/dist/npm/ledger/parse/amendment.js +9 -0
- package/dist/npm/ledger/parse/amendment.js.map +1 -0
- package/dist/npm/ledger/parse/amount.d.ts +4 -0
- package/dist/npm/ledger/parse/amount.d.ts.map +1 -0
- package/dist/npm/ledger/parse/amount.js +37 -0
- package/dist/npm/ledger/parse/amount.js.map +1 -0
- package/dist/npm/ledger/parse/cancellation.d.ts +3 -0
- package/dist/npm/ledger/parse/cancellation.d.ts.map +1 -0
- package/dist/npm/ledger/parse/cancellation.js +32 -0
- package/dist/npm/ledger/parse/cancellation.js.map +1 -0
- package/dist/npm/ledger/parse/check-cancel.d.ts +6 -0
- package/dist/npm/ledger/parse/check-cancel.d.ts.map +1 -0
- package/dist/npm/ledger/parse/check-cancel.js +33 -0
- package/dist/npm/ledger/parse/check-cancel.js.map +1 -0
- package/dist/npm/ledger/parse/check-cash.d.ts +9 -0
- package/dist/npm/ledger/parse/check-cash.d.ts.map +1 -0
- package/dist/npm/ledger/parse/check-cash.js +39 -0
- package/dist/npm/ledger/parse/check-cash.js.map +1 -0
- package/dist/npm/ledger/parse/check-create.d.ts +11 -0
- package/dist/npm/ledger/parse/check-create.d.ts.map +1 -0
- package/dist/npm/ledger/parse/check-create.js +42 -0
- package/dist/npm/ledger/parse/check-create.js.map +1 -0
- package/dist/npm/ledger/parse/deposit-preauth.d.ts +7 -0
- package/dist/npm/ledger/parse/deposit-preauth.d.ts.map +1 -0
- package/dist/npm/ledger/parse/deposit-preauth.js +34 -0
- package/dist/npm/ledger/parse/deposit-preauth.js.map +1 -0
- package/dist/npm/ledger/parse/escrow-cancellation.d.ts +3 -0
- package/dist/npm/ledger/parse/escrow-cancellation.d.ts.map +1 -0
- package/dist/npm/ledger/parse/escrow-cancellation.js +34 -0
- package/dist/npm/ledger/parse/escrow-cancellation.js.map +1 -0
- package/dist/npm/ledger/parse/escrow-creation.d.ts +3 -0
- package/dist/npm/ledger/parse/escrow-creation.d.ts.map +1 -0
- package/dist/npm/ledger/parse/escrow-creation.js +43 -0
- package/dist/npm/ledger/parse/escrow-creation.js.map +1 -0
- package/dist/npm/ledger/parse/escrow-execution.d.ts +3 -0
- package/dist/npm/ledger/parse/escrow-execution.d.ts.map +1 -0
- package/dist/npm/ledger/parse/escrow-execution.js +36 -0
- package/dist/npm/ledger/parse/escrow-execution.js.map +1 -0
- package/dist/npm/ledger/parse/fee-update.d.ts +9 -0
- package/dist/npm/ledger/parse/fee-update.d.ts.map +1 -0
- package/dist/npm/ledger/parse/fee-update.js +20 -0
- package/dist/npm/ledger/parse/fee-update.js.map +1 -0
- package/dist/npm/ledger/parse/fields.d.ts +3 -0
- package/dist/npm/ledger/parse/fields.d.ts.map +1 -0
- package/dist/npm/ledger/parse/fields.js +47 -0
- package/dist/npm/ledger/parse/fields.js.map +1 -0
- package/dist/npm/ledger/parse/flags.d.ts +16 -0
- package/dist/npm/ledger/parse/flags.d.ts.map +1 -0
- package/dist/npm/ledger/parse/flags.js +20 -0
- package/dist/npm/ledger/parse/flags.js.map +1 -0
- package/dist/npm/ledger/parse/ledger.d.ts +19 -0
- package/dist/npm/ledger/parse/ledger.d.ts.map +1 -0
- package/dist/npm/ledger/parse/ledger.js +76 -0
- package/dist/npm/ledger/parse/ledger.js.map +1 -0
- package/dist/npm/ledger/parse/order.d.ts +4 -0
- package/dist/npm/ledger/parse/order.d.ts.map +1 -0
- package/dist/npm/ledger/parse/order.js +50 -0
- package/dist/npm/ledger/parse/order.js.map +1 -0
- package/dist/npm/ledger/parse/orderbook-order.d.ts +17 -0
- package/dist/npm/ledger/parse/orderbook-order.d.ts.map +1 -0
- package/dist/npm/ledger/parse/orderbook-order.js +63 -0
- package/dist/npm/ledger/parse/orderbook-order.js.map +1 -0
- package/dist/npm/ledger/parse/pathfind.d.ts +4 -0
- package/dist/npm/ledger/parse/pathfind.d.ts.map +1 -0
- package/dist/npm/ledger/parse/pathfind.js +63 -0
- package/dist/npm/ledger/parse/pathfind.js.map +1 -0
- package/dist/npm/ledger/parse/payment-channel-claim.d.ts +3 -0
- package/dist/npm/ledger/parse/payment-channel-claim.d.ts.map +1 -0
- package/dist/npm/ledger/parse/payment-channel-claim.js +44 -0
- package/dist/npm/ledger/parse/payment-channel-claim.js.map +1 -0
- package/dist/npm/ledger/parse/payment-channel-create.d.ts +3 -0
- package/dist/npm/ledger/parse/payment-channel-create.d.ts.map +1 -0
- package/dist/npm/ledger/parse/payment-channel-create.js +43 -0
- package/dist/npm/ledger/parse/payment-channel-create.js.map +1 -0
- package/dist/npm/ledger/parse/payment-channel-fund.d.ts +3 -0
- package/dist/npm/ledger/parse/payment-channel-fund.d.ts.map +1 -0
- package/dist/npm/ledger/parse/payment-channel-fund.js +39 -0
- package/dist/npm/ledger/parse/payment-channel-fund.js.map +1 -0
- package/dist/npm/ledger/parse/payment-channel.d.ts +17 -0
- package/dist/npm/ledger/parse/payment-channel.d.ts.map +1 -0
- package/dist/npm/ledger/parse/payment-channel.js +24 -0
- package/dist/npm/ledger/parse/payment-channel.js.map +1 -0
- package/dist/npm/ledger/parse/payment.d.ts +3 -0
- package/dist/npm/ledger/parse/payment.d.ts.map +1 -0
- package/dist/npm/ledger/parse/payment.js +64 -0
- package/dist/npm/ledger/parse/payment.js.map +1 -0
- package/dist/npm/ledger/parse/settings.d.ts +3 -0
- package/dist/npm/ledger/parse/settings.d.ts.map +1 -0
- package/dist/npm/ledger/parse/settings.js +75 -0
- package/dist/npm/ledger/parse/settings.js.map +1 -0
- package/dist/npm/ledger/parse/ticket-create.d.ts +3 -0
- package/dist/npm/ledger/parse/ticket-create.d.ts.map +1 -0
- package/dist/npm/ledger/parse/ticket-create.js +33 -0
- package/dist/npm/ledger/parse/ticket-create.js.map +1 -0
- package/dist/npm/ledger/parse/transaction.d.ts +3 -0
- package/dist/npm/ledger/parse/transaction.d.ts.map +1 -0
- package/dist/npm/ledger/parse/transaction.js +98 -0
- package/dist/npm/ledger/parse/transaction.js.map +1 -0
- package/dist/npm/ledger/parse/trustline.d.ts +3 -0
- package/dist/npm/ledger/parse/trustline.d.ts.map +1 -0
- package/dist/npm/ledger/parse/trustline.js +50 -0
- package/dist/npm/ledger/parse/trustline.js.map +1 -0
- package/dist/npm/ledger/parse/utils.d.ts +10 -0
- package/dist/npm/ledger/parse/utils.d.ts.map +1 -0
- package/dist/npm/ledger/parse/utils.js +136 -0
- package/dist/npm/ledger/parse/utils.js.map +1 -0
- package/dist/npm/ledger/pathfind-types.d.ts +60 -0
- package/dist/npm/ledger/pathfind-types.d.ts.map +1 -0
- package/dist/npm/ledger/pathfind-types.js +3 -0
- package/dist/npm/ledger/pathfind-types.js.map +1 -0
- package/dist/npm/ledger/pathfind.d.ts +5 -0
- package/dist/npm/ledger/pathfind.d.ts.map +1 -0
- package/dist/npm/ledger/pathfind.js +141 -0
- package/dist/npm/ledger/pathfind.js.map +1 -0
- package/dist/npm/ledger/payment-channel.d.ts +5 -0
- package/dist/npm/ledger/payment-channel.d.ts.map +1 -0
- package/dist/npm/ledger/payment-channel.js +34 -0
- package/dist/npm/ledger/payment-channel.js.map +1 -0
- package/dist/npm/ledger/settings.d.ts +11 -0
- package/dist/npm/ledger/settings.d.ts.map +1 -0
- package/dist/npm/ledger/settings.js +53 -0
- package/dist/npm/ledger/settings.js.map +1 -0
- package/dist/npm/ledger/transaction.d.ts +10 -0
- package/dist/npm/ledger/transaction.d.ts.map +1 -0
- package/dist/npm/ledger/transaction.js +126 -0
- package/dist/npm/ledger/transaction.js.map +1 -0
- package/dist/npm/ledger/transactions.d.ts +20 -0
- package/dist/npm/ledger/transactions.d.ts.map +1 -0
- package/dist/npm/ledger/transactions.js +156 -0
- package/dist/npm/ledger/transactions.js.map +1 -0
- package/dist/npm/ledger/trustlines.d.ts +11 -0
- package/dist/npm/ledger/trustlines.d.ts.map +1 -0
- package/dist/npm/ledger/trustlines.js +58 -0
- package/dist/npm/ledger/trustlines.js.map +1 -0
- package/dist/npm/ledger/utils.d.ts +33 -0
- package/dist/npm/ledger/utils.d.ts.map +1 -0
- package/dist/npm/ledger/utils.js +107 -0
- package/dist/npm/ledger/utils.js.map +1 -0
- package/dist/npm/offline/derive.d.ts +8 -0
- package/dist/npm/offline/derive.d.ts.map +1 -0
- package/dist/npm/offline/derive.js +13 -0
- package/dist/npm/offline/derive.js.map +1 -0
- package/dist/npm/offline/generate-address.d.ts +15 -0
- package/dist/npm/offline/generate-address.d.ts.map +1 -0
- package/dist/npm/offline/generate-address.js +37 -0
- package/dist/npm/offline/generate-address.js.map +1 -0
- package/dist/npm/offline/ledgerhash.d.ts +6 -0
- package/dist/npm/offline/ledgerhash.d.ts.map +1 -0
- package/dist/npm/offline/ledgerhash.js +104 -0
- package/dist/npm/offline/ledgerhash.js.map +1 -0
- package/dist/npm/offline/sign-payment-channel-claim.d.ts +3 -0
- package/dist/npm/offline/sign-payment-channel-claim.d.ts.map +1 -0
- package/dist/npm/offline/sign-payment-channel-claim.js +38 -0
- package/dist/npm/offline/sign-payment-channel-claim.js.map +1 -0
- package/dist/npm/offline/utils.d.ts +10 -0
- package/dist/npm/offline/utils.d.ts.map +1 -0
- package/dist/npm/offline/utils.js +43 -0
- package/dist/npm/offline/utils.js.map +1 -0
- package/dist/npm/offline/verify-payment-channel-claim.d.ts +3 -0
- package/dist/npm/offline/verify-payment-channel-claim.d.ts.map +1 -0
- package/dist/npm/offline/verify-payment-channel-claim.js +18 -0
- package/dist/npm/offline/verify-payment-channel-claim.js.map +1 -0
- package/dist/npm/server/server.d.ts +8 -0
- package/dist/npm/server/server.d.ts.map +1 -0
- package/dist/npm/server/server.js +66 -0
- package/dist/npm/server/server.js.map +1 -0
- package/dist/npm/transaction/check-cancel.d.ts +8 -0
- package/dist/npm/transaction/check-cancel.d.ts.map +1 -0
- package/dist/npm/transaction/check-cancel.js +24 -0
- package/dist/npm/transaction/check-cancel.js.map +1 -0
- package/dist/npm/transaction/check-cash.d.ts +11 -0
- package/dist/npm/transaction/check-cash.d.ts.map +1 -0
- package/dist/npm/transaction/check-cash.js +55 -0
- package/dist/npm/transaction/check-cash.js.map +1 -0
- package/dist/npm/transaction/check-create.d.ts +13 -0
- package/dist/npm/transaction/check-create.d.ts.map +1 -0
- package/dist/npm/transaction/check-create.js +54 -0
- package/dist/npm/transaction/check-create.js.map +1 -0
- package/dist/npm/transaction/combine.d.ts +3 -0
- package/dist/npm/transaction/combine.d.ts.map +1 -0
- package/dist/npm/transaction/combine.js +62 -0
- package/dist/npm/transaction/combine.js.map +1 -0
- package/dist/npm/transaction/escrow-cancellation.d.ts +11 -0
- package/dist/npm/transaction/escrow-cancellation.d.ts.map +1 -0
- package/dist/npm/transaction/escrow-cancellation.js +46 -0
- package/dist/npm/transaction/escrow-cancellation.js.map +1 -0
- package/dist/npm/transaction/escrow-creation.d.ts +16 -0
- package/dist/npm/transaction/escrow-creation.d.ts.map +1 -0
- package/dist/npm/transaction/escrow-creation.js +69 -0
- package/dist/npm/transaction/escrow-creation.js.map +1 -0
- package/dist/npm/transaction/escrow-execution.d.ts +13 -0
- package/dist/npm/transaction/escrow-execution.d.ts.map +1 -0
- package/dist/npm/transaction/escrow-execution.js +58 -0
- package/dist/npm/transaction/escrow-execution.js.map +1 -0
- package/dist/npm/transaction/order.d.ts +6 -0
- package/dist/npm/transaction/order.d.ts.map +1 -0
- package/dist/npm/transaction/order.js +69 -0
- package/dist/npm/transaction/order.js.map +1 -0
- package/dist/npm/transaction/ordercancellation.d.ts +5 -0
- package/dist/npm/transaction/ordercancellation.d.ts.map +1 -0
- package/dist/npm/transaction/ordercancellation.js +50 -0
- package/dist/npm/transaction/ordercancellation.js.map +1 -0
- package/dist/npm/transaction/payment-channel-claim.d.ts +14 -0
- package/dist/npm/transaction/payment-channel-claim.d.ts.map +1 -0
- package/dist/npm/transaction/payment-channel-claim.js +76 -0
- package/dist/npm/transaction/payment-channel-claim.js.map +1 -0
- package/dist/npm/transaction/payment-channel-create.d.ts +14 -0
- package/dist/npm/transaction/payment-channel-create.d.ts.map +1 -0
- package/dist/npm/transaction/payment-channel-create.js +59 -0
- package/dist/npm/transaction/payment-channel-create.js.map +1 -0
- package/dist/npm/transaction/payment-channel-fund.d.ts +10 -0
- package/dist/npm/transaction/payment-channel-fund.d.ts.map +1 -0
- package/dist/npm/transaction/payment-channel-fund.js +51 -0
- package/dist/npm/transaction/payment-channel-fund.js.map +1 -0
- package/dist/npm/transaction/payment.d.ts +16 -0
- package/dist/npm/transaction/payment.d.ts.map +1 -0
- package/dist/npm/transaction/payment.js +163 -0
- package/dist/npm/transaction/payment.js.map +1 -0
- package/dist/npm/transaction/settings.d.ts +6 -0
- package/dist/npm/transaction/settings.d.ts.map +1 -0
- package/dist/npm/transaction/settings.js +130 -0
- package/dist/npm/transaction/settings.js.map +1 -0
- package/dist/npm/transaction/sign.d.ts +8 -0
- package/dist/npm/transaction/sign.d.ts.map +1 -0
- package/dist/npm/transaction/sign.js +173 -0
- package/dist/npm/transaction/sign.js.map +1 -0
- package/dist/npm/transaction/submit.d.ts +8 -0
- package/dist/npm/transaction/submit.d.ts.map +1 -0
- package/dist/npm/transaction/submit.js +59 -0
- package/dist/npm/transaction/submit.js.map +1 -0
- package/dist/npm/transaction/ticket.d.ts +9 -0
- package/dist/npm/transaction/ticket.d.ts.map +1 -0
- package/dist/npm/transaction/ticket.js +46 -0
- package/dist/npm/transaction/ticket.js.map +1 -0
- package/dist/npm/transaction/trustline.d.ts +6 -0
- package/dist/npm/transaction/trustline.d.ts.map +1 -0
- package/dist/npm/transaction/trustline.js +82 -0
- package/dist/npm/transaction/trustline.js.map +1 -0
- package/dist/npm/transaction/types.d.ts +138 -0
- package/dist/npm/transaction/types.d.ts.map +1 -0
- package/dist/npm/transaction/types.js +3 -0
- package/dist/npm/transaction/types.js.map +1 -0
- package/dist/npm/transaction/utils.d.ts +22 -0
- package/dist/npm/transaction/utils.d.ts.map +1 -0
- package/dist/npm/transaction/utils.js +285 -0
- package/dist/npm/transaction/utils.js.map +1 -0
- package/dist/npm/tsconfig.tsbuildinfo +4230 -0
- package/dist/npm/wallet/wallet-generation.d.ts +15 -0
- package/dist/npm/wallet/wallet-generation.d.ts.map +1 -0
- package/dist/npm/wallet/wallet-generation.js +150 -0
- package/dist/npm/wallet/wallet-generation.js.map +1 -0
- package/package.json +84 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/ledger/parse/utils.ts"],"names":[],"mappings":";;;;;;;;;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AS,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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AAC,CAAA;IACF,IAAI,EAAE,MAAM,CAAA;IACZ,mBAAmB,EAAE,MAAM,CAAA;IAC3B,kBAAkB,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 @@
|
|
1
|
+
{"version":3,"file":"pathfind-types.js","sourceRoot":"","sources":["../../../src/ledger/pathfind-types.ts"],"names":[],"mappings":""}
|
@@ -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,EAAE,OAAO,CAAC,cAAc;QACtC,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;KAC7C,CAAC,EACF,EAAC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,EAAC,CACjD,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CACtB,UAAsB,EACtB,QAAkB;IAElB,MAAM,iBAAiB,GAAW,MAAM,CAAC,MAAM,CAC7C;QAEE,KAAK,EACH,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,mBAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;KAC3E,EACD,QAAQ,CAAC,WAAW,CAAC,MAAM,CAC5B,CAAA;IACD,MAAM,OAAO,GAAoB;QAC/B,OAAO,EAAE,kBAAkB;QAC3B,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO;QACvC,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAAC,OAAO;QACjD,kBAAkB,EAAE,wBAAe,CAAC,iBAAiB,CAAC;KACvD,CAAA;IACD,IACE,OAAO,OAAO,CAAC,kBAAkB,KAAK,QAAQ;QAC9C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AQ,CAAkB,QAAkB;IACnD,iBAAQ,CAAC,QAAQ,CAAC,EAAC,QAAQ,EAAC,CAAC,CAAA;IAE7B,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAA;IACvC,OAAO,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC;SAC9C,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CACd,6BAA6B,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,CAC/D;SACA,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,yBAAyB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;SAC3D,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAA;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,GAAG,EAAE,CAAC,YAAY,IAAI,EAAE,CAAC,cAAc,CAAA;IAE1D,IAAI,CAAC,aAAa,EAAE;QAClB,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE;YACtB,MAAM,KAAK,GAAG,IAAI,eAAM,CAAC,aAAa,CACpC,yDAAyD,CAC1D,CAAA;YACD,KAAK,CAAC,IAAI,GAAG;gBACX,OAAO,EAAE,mDAAmD;aAC7D,CAAA;YACD,MAAM,KAAK,CAAA;QACb,CAAC,CAAC,CAAA;KACH;IAED,MAAM,OAAO,GAAG;QACd,OAAO,EAAE,QAAQ;QACjB,YAAY,EAAE,aAAa;KAC5B,CAAA;IAED,OAAO,UAAU;SACd,OAAO,CAAC,OAAO,CAAC;SAChB,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QACb,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,KAAK,QAAQ,EAAE;YAC9C,OAAO,MAAM,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAC,EAAE,EAAE,CAAC,CAAA;SACzD;QACD,MAAM,IAAI,eAAM,CAAC,eAA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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"}
|