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":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AAErB,cAAc,qBAAqB,CAAA;AAEnC,cAAc,+BAA+B,CAAA;AAE7C,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAA"}
|
@@ -0,0 +1,19 @@
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
10
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
11
|
+
};
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
13
|
+
__exportStar(require("./api"), exports);
|
14
|
+
__exportStar(require("./transaction/types"), exports);
|
15
|
+
__exportStar(require("./common/types/objects/ledger"), exports);
|
16
|
+
__exportStar(require("./offline/utils"), exports);
|
17
|
+
var broadcast_1 = require("./broadcast");
|
18
|
+
Object.defineProperty(exports, "RippleAPIBroadcast", { enumerable: true, get: function () { return broadcast_1.RippleAPIBroadcast; } });
|
19
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAqB;AAErB,sDAAmC;AAEnC,gEAA6C;AAE7C,kDAAgC;AAGhC,yCAA8C;AAAtC,+GAAA,kBAAkB,OAAA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { RippleAPI } from '..';
|
2
|
+
export declare type GetAccountInfoOptions = {
|
3
|
+
ledgerVersion?: number;
|
4
|
+
};
|
5
|
+
export declare type FormattedGetAccountInfoResponse = {
|
6
|
+
sequence: number;
|
7
|
+
xrpBalance: string;
|
8
|
+
ownerCount: number;
|
9
|
+
previousInitiatedTransactionID: string;
|
10
|
+
previousAffectingTransactionID: string;
|
11
|
+
previousAffectingTransactionLedgerVersion: number;
|
12
|
+
};
|
13
|
+
export default function getAccountInfo(this: RippleAPI, address: string, options?: GetAccountInfoOptions): Promise<FormattedGetAccountInfoResponse>;
|
14
|
+
//# sourceMappingURL=accountinfo.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"accountinfo.d.ts","sourceRoot":"","sources":["../../../src/ledger/accountinfo.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAG5B,oBAAY,qBAAqB,GAAG;IAClC,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,oBAAY,+BAA+B,GAAG;IAC5C,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,8BAA8B,EAAE,MAAM,CAAA;IACtC,8BAA8B,EAAE,MAAM,CAAA;IACtC,yCAAyC,EAAE,MAAM,CAAA;CAClD,CAAA;AAgBD,wBAA8B,cAAc,CAC1C,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,+BAA+B,CAAC,CAe1C"}
|
@@ -0,0 +1,36 @@
|
|
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 common_1 = require("../common");
|
13
|
+
function formatAccountInfo(response) {
|
14
|
+
const data = response.account_data;
|
15
|
+
return common_1.removeUndefined({
|
16
|
+
sequence: data.Sequence,
|
17
|
+
xrpBalance: common_1.dropsToXrp(data.Balance),
|
18
|
+
ownerCount: data.OwnerCount,
|
19
|
+
previousInitiatedTransactionID: data.AccountTxnID,
|
20
|
+
previousAffectingTransactionID: data.PreviousTxnID,
|
21
|
+
previousAffectingTransactionLedgerVersion: data.PreviousTxnLgrSeq
|
22
|
+
});
|
23
|
+
}
|
24
|
+
function getAccountInfo(address, options = {}) {
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
26
|
+
common_1.validate.getAccountInfo({ address, options });
|
27
|
+
address = common_1.ensureClassicAddress(address);
|
28
|
+
const response = yield this.request('account_info', {
|
29
|
+
account: address,
|
30
|
+
ledger_index: options.ledgerVersion || 'validated'
|
31
|
+
});
|
32
|
+
return formatAccountInfo(response);
|
33
|
+
});
|
34
|
+
}
|
35
|
+
exports.default = getAccountInfo;
|
36
|
+
//# sourceMappingURL=accountinfo.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"accountinfo.js","sourceRoot":"","sources":["../../../src/ledger/accountinfo.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAKkB;AAiBlB,SAAS,iBAAiB,CACxB,QAA6B;IAE7B,MAAM,IAAI,GAAG,QAAQ,CAAC,YAAY,CAAA;IAClC,OAAO,wBAAe,CAAC;QACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,UAAU,EAAE,mBAAU,CAAC,IAAI,CAAC,OAAO,CAAC;QACpC,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,8BAA8B,EAAE,IAAI,CAAC,YAAY;QACjD,8BAA8B,EAAE,IAAI,CAAC,aAAa;QAClD,yCAAyC,EAAE,IAAI,CAAC,iBAAiB;KAClE,CAAC,CAAA;AACJ,CAAC;AAED,SAA8B,cAAc,CAE1C,OAAe,EACf,UAAiC,EAAE;;QAGnC,iBAAQ,CAAC,cAAc,CAAC,EAAC,OAAO,EAAE,OAAO,EAAC,CAAC,CAAA;QAI3C,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;SACnD,CAAC,CAAA;QAEF,OAAO,iBAAiB,CAAC,QAAQ,CAAC,CAAA;IACpC,CAAC;CAAA;AAnBD,iCAmBC"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { RippleAPI } from '..';
|
2
|
+
import { GetAccountObjectsOptions, AccountObjectsResponse } from '../common/types/commands/account_objects';
|
3
|
+
export default function getAccountObjects(this: RippleAPI, address: string, options?: GetAccountObjectsOptions): Promise<AccountObjectsResponse>;
|
4
|
+
//# sourceMappingURL=accountobjects.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"accountobjects.d.ts","sourceRoot":"","sources":["../../../src/ledger/accountobjects.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAC5B,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,0CAA0C,CAAA;AAEjD,wBAA8B,iBAAiB,CAC7C,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,sBAAsB,CAAC,CAkBjC"}
|
@@ -0,0 +1,27 @@
|
|
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 common_1 = require("../common");
|
13
|
+
function getAccountObjects(address, options = {}) {
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
15
|
+
const response = yield this.request('account_objects', common_1.removeUndefined({
|
16
|
+
account: address,
|
17
|
+
type: options.type,
|
18
|
+
ledger_hash: options.ledgerHash,
|
19
|
+
ledger_index: options.ledgerIndex,
|
20
|
+
limit: options.limit,
|
21
|
+
marker: options.marker
|
22
|
+
}));
|
23
|
+
return response;
|
24
|
+
});
|
25
|
+
}
|
26
|
+
exports.default = getAccountObjects;
|
27
|
+
//# sourceMappingURL=accountobjects.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"accountobjects.js","sourceRoot":"","sources":["../../../src/ledger/accountobjects.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAyC;AAOzC,SAA8B,iBAAiB,CAE7C,OAAe,EACf,UAAoC,EAAE;;QAMtC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CACjC,iBAAiB,EACjB,wBAAe,CAAC;YACd,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,OAAO,CAAC,UAAU;YAC/B,YAAY,EAAE,OAAO,CAAC,WAAW;YACjC,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC,CACH,CAAA;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;CAAA;AAtBD,oCAsBC"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Amount } from '../common/types/objects';
|
2
|
+
import { RippleAPI } from '..';
|
3
|
+
export declare type BalanceSheetOptions = {
|
4
|
+
excludeAddresses?: Array<string>;
|
5
|
+
ledgerVersion?: number;
|
6
|
+
};
|
7
|
+
export declare type GetBalanceSheet = {
|
8
|
+
balances?: Array<Amount>;
|
9
|
+
assets?: Array<Amount>;
|
10
|
+
obligations?: Array<{
|
11
|
+
currency: string;
|
12
|
+
value: string;
|
13
|
+
}>;
|
14
|
+
};
|
15
|
+
declare function getBalanceSheet(this: RippleAPI, address: string, options?: BalanceSheetOptions): Promise<GetBalanceSheet>;
|
16
|
+
export default getBalanceSheet;
|
17
|
+
//# sourceMappingURL=balance-sheet.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"balance-sheet.d.ts","sourceRoot":"","sources":["../../../src/ledger/balance-sheet.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAA;AAE9C,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,oBAAY,mBAAmB,GAAG;IAChC,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAChC,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,oBAAY,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACtB,WAAW,CAAC,EAAE,KAAK,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAA;QAChB,KAAK,EAAE,MAAM,CAAA;KACd,CAAC,CAAA;CACH,CAAA;AAwCD,iBAAe,eAAe,CAC5B,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,eAAe,CAAC,CAa1B;AAED,eAAe,eAAe,CAAA"}
|
@@ -0,0 +1,52 @@
|
|
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 common_1 = require("../common");
|
13
|
+
const utils_1 = require("./utils");
|
14
|
+
function formatBalanceSheet(balanceSheet) {
|
15
|
+
const result = {};
|
16
|
+
if (balanceSheet.balances != null) {
|
17
|
+
result.balances = [];
|
18
|
+
Object.entries(balanceSheet.balances).forEach(entry => {
|
19
|
+
const [counterparty, balances] = entry;
|
20
|
+
balances.forEach((balance) => {
|
21
|
+
result.balances.push(Object.assign({ counterparty }, balance));
|
22
|
+
});
|
23
|
+
});
|
24
|
+
}
|
25
|
+
if (balanceSheet.assets != null) {
|
26
|
+
result.assets = [];
|
27
|
+
Object.entries(balanceSheet.assets).forEach(([counterparty, assets]) => {
|
28
|
+
assets.forEach((balance) => {
|
29
|
+
result.assets.push(Object.assign({ counterparty }, balance));
|
30
|
+
});
|
31
|
+
});
|
32
|
+
}
|
33
|
+
if (balanceSheet.obligations != null) {
|
34
|
+
result.obligations = Object.entries(balanceSheet.obligations).map(([currency, value]) => ({ currency, value }));
|
35
|
+
}
|
36
|
+
return result;
|
37
|
+
}
|
38
|
+
function getBalanceSheet(address, options = {}) {
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
40
|
+
common_1.validate.getBalanceSheet({ address, options });
|
41
|
+
options = yield utils_1.ensureLedgerVersion.call(this, options);
|
42
|
+
const response = yield this.request('gateway_balances', {
|
43
|
+
account: address,
|
44
|
+
strict: true,
|
45
|
+
hotwallet: options.excludeAddresses,
|
46
|
+
ledger_index: options.ledgerVersion
|
47
|
+
});
|
48
|
+
return formatBalanceSheet(response);
|
49
|
+
});
|
50
|
+
}
|
51
|
+
exports.default = getBalanceSheet;
|
52
|
+
//# sourceMappingURL=balance-sheet.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"balance-sheet.js","sourceRoot":"","sources":["../../../src/ledger/balance-sheet.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sCAAkC;AAElC,mCAA2C;AA0B3C,SAAS,kBAAkB,CAAC,YAA0B;IACpD,MAAM,MAAM,GAAoB,EAAE,CAAA;IAElC,IAAI,YAAY,CAAC,QAAQ,IAAI,IAAI,EAAE;QACjC,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAA;QACpB,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACpD,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC;YACvC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC3B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAC,YAAY,EAAC,EAAE,OAAO,CAAC,CAAC,CAAA;YAC9D,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;KACH;IACD,IAAI,YAAY,CAAC,MAAM,IAAI,IAAI,EAAE;QAC/B,MAAM,CAAC,MAAM,GAAG,EAAE,CAAA;QAClB,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,EAAE;YACrE,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBACzB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAC,YAAY,EAAC,EAAE,OAAO,CAAC,CAAC,CAAA;YAC5D,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;KACH;IACD,IAAI,YAAY,CAAC,WAAW,IAAI,IAAI,EAAE;QACpC,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,WAAsC,CAAC,CAAC,GAAG,CAC1F,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAC,QAAQ,EAAE,KAAK,EAAC,CAAC,CAC3C,CAAA;KACF;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAe,eAAe,CAE5B,OAAe,EACf,UAA+B,EAAE;;QAGjC,iBAAQ,CAAC,eAAe,CAAC,EAAC,OAAO,EAAE,OAAO,EAAC,CAAC,CAAA;QAC5C,OAAO,GAAG,MAAM,2BAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QAEvD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE;YACtD,OAAO,EAAE,OAAO;YAChB,MAAM,EAAE,IAAI;YACZ,SAAS,EAAE,OAAO,CAAC,gBAAgB;YACnC,YAAY,EAAE,OAAO,CAAC,aAAa;SACpC,CAAC,CAAA;QAEF,OAAO,kBAAkB,CAAC,QAAQ,CAAC,CAAA;IACrC,CAAC;CAAA;AAED,kBAAe,eAAe,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { GetTrustlinesOptions } from './trustlines';
|
2
|
+
import { RippleAPI } from '..';
|
3
|
+
export declare type Balance = {
|
4
|
+
value: string;
|
5
|
+
currency: string;
|
6
|
+
counterparty?: string;
|
7
|
+
};
|
8
|
+
export declare type GetBalances = Array<Balance>;
|
9
|
+
declare function getBalances(this: RippleAPI, address: string, options?: GetTrustlinesOptions): Promise<GetBalances>;
|
10
|
+
export default getBalances;
|
11
|
+
//# sourceMappingURL=balances.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"balances.d.ts","sourceRoot":"","sources":["../../../src/ledger/balances.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAA;AAEjD,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,oBAAY,OAAO,GAAG;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,oBAAY,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,CAAA;AAsCxC,iBAAS,WAAW,CAClB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,WAAW,CAAC,CAqBtB;AAED,eAAe,WAAW,CAAA"}
|
@@ -0,0 +1,61 @@
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
22
|
+
const utils = __importStar(require("./utils"));
|
23
|
+
const common_1 = require("../common");
|
24
|
+
function getTrustlineBalanceAmount(trustline) {
|
25
|
+
return {
|
26
|
+
currency: trustline.specification.currency,
|
27
|
+
counterparty: trustline.specification.counterparty,
|
28
|
+
value: trustline.state.balance
|
29
|
+
};
|
30
|
+
}
|
31
|
+
function formatBalances(options, balances) {
|
32
|
+
const result = balances.trustlines.map(getTrustlineBalanceAmount);
|
33
|
+
if (!(options.counterparty || (options.currency && options.currency !== 'XRP'))) {
|
34
|
+
const xrpBalance = {
|
35
|
+
currency: 'XRP',
|
36
|
+
value: balances.xrp
|
37
|
+
};
|
38
|
+
result.unshift(xrpBalance);
|
39
|
+
}
|
40
|
+
if (options.limit && result.length > options.limit) {
|
41
|
+
const toRemove = result.length - options.limit;
|
42
|
+
result.splice(-toRemove, toRemove);
|
43
|
+
}
|
44
|
+
return result;
|
45
|
+
}
|
46
|
+
function getLedgerVersionHelper(connection, optionValue) {
|
47
|
+
if (optionValue != null && optionValue !== null) {
|
48
|
+
return Promise.resolve(optionValue);
|
49
|
+
}
|
50
|
+
return connection.getLedgerVersion();
|
51
|
+
}
|
52
|
+
function getBalances(address, options = {}) {
|
53
|
+
common_1.validate.getTrustlines({ address, options });
|
54
|
+
address = common_1.ensureClassicAddress(address);
|
55
|
+
return Promise.all([
|
56
|
+
getLedgerVersionHelper(this.connection, options.ledgerVersion).then((ledgerVersion) => utils.getXRPBalance(this.connection, address, ledgerVersion)),
|
57
|
+
this.getTrustlines(address, options)
|
58
|
+
]).then((results) => formatBalances(options, { xrp: results[0], trustlines: results[1] }));
|
59
|
+
}
|
60
|
+
exports.default = getBalances;
|
61
|
+
//# sourceMappingURL=balances.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"balances.js","sourceRoot":"","sources":["../../../src/ledger/balances.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,sCAAwD;AAcxD,SAAS,yBAAyB,CAAC,SAA6B;IAC9D,OAAO;QACL,QAAQ,EAAE,SAAS,CAAC,aAAa,CAAC,QAAQ;QAC1C,YAAY,EAAE,SAAS,CAAC,aAAa,CAAC,YAAY;QAClD,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;KAC/B,CAAA;AACH,CAAC;AAED,SAAS,cAAc,CAAC,OAAO,EAAE,QAAQ;IACvC,MAAM,MAAM,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAA;IACjE,IACE,CAAC,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,EAC3E;QACA,MAAM,UAAU,GAAG;YACjB,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,QAAQ,CAAC,GAAG;SACpB,CAAA;QACD,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;KAC3B;IACD,IAAI,OAAO,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE;QAClD,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAA;QAC9C,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;KACnC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,sBAAsB,CAC7B,UAAsB,EACtB,WAAoB;IAEpB,IAAI,WAAW,IAAI,IAAI,IAAI,WAAW,KAAK,IAAI,EAAE;QAC/C,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;KACpC;IACD,OAAO,UAAU,CAAC,gBAAgB,EAAE,CAAA;AACtC,CAAC;AAED,SAAS,WAAW,CAElB,OAAe,EACf,UAAgC,EAAE;IAElC,iBAAQ,CAAC,aAAa,CAAC,EAAC,OAAO,EAAE,OAAO,EAAC,CAAC,CAAA;IAO1C,OAAO,GAAG,6BAAoB,CAAC,OAAO,CAAC,CAAA;IAEvC,OAAO,OAAO,CAAC,GAAG,CAAC;QACjB,sBAAsB,CACpB,IAAI,CAAC,UAAU,EACf,OAAO,CAAC,aAAa,CACtB,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,EAAE,CACvB,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,aAAa,CAAC,CAC7D;QACD,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC;KACrC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAClB,cAAc,CAAC,OAAO,EAAE,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,EAAC,CAAC,CACnE,CAAA;AACH,CAAC;AAED,kBAAe,WAAW,CAAA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { FormattedLedger } from './parse/ledger';
|
2
|
+
import { RippleAPI } from '..';
|
3
|
+
export declare type GetLedgerOptions = {
|
4
|
+
ledgerHash?: string;
|
5
|
+
ledgerVersion?: number;
|
6
|
+
includeAllData?: boolean;
|
7
|
+
includeTransactions?: boolean;
|
8
|
+
includeState?: boolean;
|
9
|
+
};
|
10
|
+
declare function getLedger(this: RippleAPI, options?: GetLedgerOptions): Promise<FormattedLedger>;
|
11
|
+
export default getLedger;
|
12
|
+
//# sourceMappingURL=ledger.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ledger.d.ts","sourceRoot":"","sources":["../../../src/ledger/ledger.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAc,MAAM,gBAAgB,CAAA;AAC3D,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,oBAAY,gBAAgB,GAAG;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,iBAAe,SAAS,CACtB,IAAI,EAAE,SAAS,EACf,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CAa1B;AAED,eAAe,SAAS,CAAA"}
|
@@ -0,0 +1,28 @@
|
|
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 common_1 = require("../common");
|
13
|
+
const ledger_1 = require("./parse/ledger");
|
14
|
+
function getLedger(options = {}) {
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
16
|
+
common_1.validate.getLedger({ options });
|
17
|
+
const response = yield this.request('ledger', {
|
18
|
+
ledger_hash: options.ledgerHash,
|
19
|
+
ledger_index: options.ledgerVersion || 'validated',
|
20
|
+
expand: options.includeAllData,
|
21
|
+
transactions: options.includeTransactions,
|
22
|
+
accounts: options.includeState
|
23
|
+
});
|
24
|
+
return ledger_1.parseLedger(response.ledger);
|
25
|
+
});
|
26
|
+
}
|
27
|
+
exports.default = getLedger;
|
28
|
+
//# sourceMappingURL=ledger.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ledger.js","sourceRoot":"","sources":["../../../src/ledger/ledger.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAkC;AAClC,2CAA2D;AAW3D,SAAe,SAAS,CAEtB,UAA4B,EAAE;;QAG9B,iBAAQ,CAAC,SAAS,CAAC,EAAC,OAAO,EAAC,CAAC,CAAA;QAE7B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;YAC5C,WAAW,EAAE,OAAO,CAAC,UAAU;YAC/B,YAAY,EAAE,OAAO,CAAC,aAAa,IAAI,WAAW;YAClD,MAAM,EAAE,OAAO,CAAC,cAAc;YAC9B,YAAY,EAAE,OAAO,CAAC,mBAAmB;YACzC,QAAQ,EAAE,OAAO,CAAC,YAAY;SAC/B,CAAC,CAAA;QAEF,OAAO,oBAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IACrC,CAAC;CAAA;AAED,kBAAe,SAAS,CAAA"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { FormattedOrderbookOrder } from './parse/orderbook-order';
|
2
|
+
import { Issue } from '../common/types/objects';
|
3
|
+
import { BookOffer } from '../common/types/commands';
|
4
|
+
import { RippleAPI } from '..';
|
5
|
+
export declare type FormattedOrderbook = {
|
6
|
+
bids: FormattedOrderbookOrder[];
|
7
|
+
asks: FormattedOrderbookOrder[];
|
8
|
+
};
|
9
|
+
export declare function formatBidsAndAsks(orderbook: OrderbookInfo, offers: BookOffer[]): {
|
10
|
+
bids: FormattedOrderbookOrder[];
|
11
|
+
asks: FormattedOrderbookOrder[];
|
12
|
+
};
|
13
|
+
export declare type GetOrderbookOptions = {
|
14
|
+
limit?: number;
|
15
|
+
ledgerVersion?: number;
|
16
|
+
};
|
17
|
+
export declare type OrderbookInfo = {
|
18
|
+
base: Issue;
|
19
|
+
counter: Issue;
|
20
|
+
};
|
21
|
+
export declare function getOrderbook(this: RippleAPI, address: string, orderbook: OrderbookInfo, options?: GetOrderbookOptions): Promise<FormattedOrderbook>;
|
22
|
+
//# sourceMappingURL=orderbook.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"orderbook.d.ts","sourceRoot":"","sources":["../../../src/ledger/orderbook.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,uBAAuB,EACxB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAA;AAC7C,OAAO,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAG5B,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,EAAE,uBAAuB,EAAE,CAAA;IAC/B,IAAI,EAAE,uBAAuB,EAAE,CAAA;CAChC,CAAA;AA6BD,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,aAAa,EACxB,MAAM,EAAE,SAAS,EAAE;;;EAsBpB;AAwBD,oBAAY,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,oBAAY,aAAa,GAAG;IAC1B,IAAI,EAAE,KAAK,CAAA;IACX,OAAO,EAAE,KAAK,CAAA;CACf,CAAA;AAED,wBAAsB,YAAY,CAChC,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,aAAa,EACxB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,kBAAkB,CAAC,CAkB7B"}
|
@@ -0,0 +1,100 @@
|
|
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
|
+
exports.getOrderbook = exports.formatBidsAndAsks = void 0;
|
35
|
+
const _ = __importStar(require("lodash"));
|
36
|
+
const utils = __importStar(require("./utils"));
|
37
|
+
const orderbook_order_1 = require("./parse/orderbook-order");
|
38
|
+
const common_1 = require("../common");
|
39
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
40
|
+
function isSameIssue(a, b) {
|
41
|
+
return a.currency === b.currency && a.counterparty === b.counterparty;
|
42
|
+
}
|
43
|
+
function directionFilter(direction, order) {
|
44
|
+
return order.specification.direction === direction;
|
45
|
+
}
|
46
|
+
function flipOrder(order) {
|
47
|
+
const specification = order.specification;
|
48
|
+
const flippedSpecification = {
|
49
|
+
quantity: specification.totalPrice,
|
50
|
+
totalPrice: specification.quantity,
|
51
|
+
direction: specification.direction === 'buy' ? 'sell' : 'buy'
|
52
|
+
};
|
53
|
+
const newSpecification = _.merge({}, specification, flippedSpecification);
|
54
|
+
return _.merge({}, order, { specification: newSpecification });
|
55
|
+
}
|
56
|
+
function alignOrder(base, order) {
|
57
|
+
const quantity = order.specification.quantity;
|
58
|
+
return isSameIssue(quantity, base) ? order : flipOrder(order);
|
59
|
+
}
|
60
|
+
function formatBidsAndAsks(orderbook, offers) {
|
61
|
+
const orders = offers
|
62
|
+
.sort((a, b) => {
|
63
|
+
return new bignumber_js_1.default(a.quality).comparedTo(b.quality);
|
64
|
+
})
|
65
|
+
.map(orderbook_order_1.parseOrderbookOrder);
|
66
|
+
const alignedOrders = orders.map(_.partial(alignOrder, orderbook.base));
|
67
|
+
const bids = alignedOrders.filter(_.partial(directionFilter, 'buy'));
|
68
|
+
const asks = alignedOrders.filter(_.partial(directionFilter, 'sell'));
|
69
|
+
return { bids, asks };
|
70
|
+
}
|
71
|
+
exports.formatBidsAndAsks = formatBidsAndAsks;
|
72
|
+
function makeRequest(api, taker, options, takerGets, takerPays) {
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
74
|
+
const orderData = utils.renameCounterpartyToIssuerInOrder({
|
75
|
+
taker_gets: takerGets,
|
76
|
+
taker_pays: takerPays
|
77
|
+
});
|
78
|
+
return api._requestAll('book_offers', {
|
79
|
+
taker_gets: orderData.taker_gets,
|
80
|
+
taker_pays: orderData.taker_pays,
|
81
|
+
ledger_index: options.ledgerVersion || 'validated',
|
82
|
+
limit: options.limit,
|
83
|
+
taker
|
84
|
+
});
|
85
|
+
});
|
86
|
+
}
|
87
|
+
function getOrderbook(address, orderbook, options = {}) {
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
89
|
+
common_1.validate.getOrderbook({ address, orderbook, options });
|
90
|
+
const [directOfferResults, reverseOfferResults] = yield Promise.all([
|
91
|
+
makeRequest(this, address, options, orderbook.base, orderbook.counter),
|
92
|
+
makeRequest(this, address, options, orderbook.counter, orderbook.base)
|
93
|
+
]);
|
94
|
+
const directOffers = _.flatMap(directOfferResults, (directOfferResult) => directOfferResult.offers);
|
95
|
+
const reverseOffers = _.flatMap(reverseOfferResults, (reverseOfferResult) => reverseOfferResult.offers);
|
96
|
+
return formatBidsAndAsks(orderbook, [...directOffers, ...reverseOffers]);
|
97
|
+
});
|
98
|
+
}
|
99
|
+
exports.getOrderbook = getOrderbook;
|
100
|
+
//# sourceMappingURL=orderbook.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"orderbook.js","sourceRoot":"","sources":["../../../src/ledger/orderbook.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA2B;AAC3B,+CAAgC;AAChC,6DAGgC;AAChC,sCAAkC;AAIlC,gEAAoC;AAOpC,SAAS,WAAW,CAAC,CAAQ,EAAE,CAAQ;IACrC,OAAO,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,YAAY,CAAA;AACvE,CAAC;AAED,SAAS,eAAe,CAAC,SAAiB,EAAE,KAA8B;IACxE,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,KAAK,SAAS,CAAA;AACpD,CAAC;AAED,SAAS,SAAS,CAAC,KAA8B;IAC/C,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAA;IACzC,MAAM,oBAAoB,GAAG;QAC3B,QAAQ,EAAE,aAAa,CAAC,UAAU;QAClC,UAAU,EAAE,aAAa,CAAC,QAAQ;QAClC,SAAS,EAAE,aAAa,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK;KAC9D,CAAA;IACD,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,aAAa,EAAE,oBAAoB,CAAC,CAAA;IACzE,OAAO,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,EAAC,aAAa,EAAE,gBAAgB,EAAC,CAAC,CAAA;AAC9D,CAAC;AAED,SAAS,UAAU,CACjB,IAAW,EACX,KAA8B;IAE9B,MAAM,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAA;IAC7C,OAAO,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAC/D,CAAC;AAED,SAAgB,iBAAiB,CAC/B,SAAwB,EACxB,MAAmB;IAYnB,MAAM,MAAM,GAAG,MAAM;SAClB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACb,OAAO,IAAI,sBAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;IACvD,CAAC,CAAC;SACD,GAAG,CAAC,qCAAmB,CAAC,CAAA;IAE3B,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;IACvE,MAAM,IAAI,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAA;IACpE,MAAM,IAAI,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAA;IACrE,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,CAAA;AACrB,CAAC;AAxBD,8CAwBC;AAID,SAAe,WAAW,CACxB,GAAc,EACd,KAAa,EACb,OAA4B,EAC5B,SAAgB,EAChB,SAAgB;;QAEhB,MAAM,SAAS,GAAG,KAAK,CAAC,iCAAiC,CAAC;YACxD,UAAU,EAAE,SAAS;YACrB,UAAU,EAAE,SAAS;SACtB,CAAC,CAAA;QACF,OAAO,GAAG,CAAC,WAAW,CAAC,aAAa,EAAE;YACpC,UAAU,EAAE,SAAS,CAAC,UAAU;YAChC,UAAU,EAAE,SAAS,CAAC,UAAU;YAChC,YAAY,EAAE,OAAO,CAAC,aAAa,IAAI,WAAW;YAClD,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,KAAK;SACN,CAAC,CAAA;IACJ,CAAC;CAAA;AAYD,SAAsB,YAAY,CAEhC,OAAe,EACf,SAAwB,EACxB,UAA+B,EAAE;;QAGjC,iBAAQ,CAAC,YAAY,CAAC,EAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAC,CAAC,CAAA;QAEpD,MAAM,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YAClE,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC;YACtE,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC;SACvE,CAAC,CAAA;QAEF,MAAM,YAAY,GAAG,CAAC,CAAC,OAAO,CAC5B,kBAAkB,EAClB,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAChD,CAAA;QACD,MAAM,aAAa,GAAG,CAAC,CAAC,OAAO,CAC7B,mBAAmB,EACnB,CAAC,kBAAkB,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAClD,CAAA;QACD,OAAO,iBAAiB,CAAC,SAAS,EAAE,CAAC,GAAG,YAAY,EAAE,GAAG,aAAa,CAAC,CAAC,CAAA;IAC1E,CAAC;CAAA;AAvBD,oCAuBC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { FormattedAccountOrder } from './parse/account-order';
|
2
|
+
import { RippleAPI } from '..';
|
3
|
+
export declare type GetOrdersOptions = {
|
4
|
+
limit?: number;
|
5
|
+
ledgerVersion?: number;
|
6
|
+
};
|
7
|
+
export default function getOrders(this: RippleAPI, address: string, options?: GetOrdersOptions): Promise<FormattedAccountOrder[]>;
|
8
|
+
//# sourceMappingURL=orders.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"orders.d.ts","sourceRoot":"","sources":["../../../src/ledger/orders.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,qBAAqB,EAAoB,MAAM,uBAAuB,CAAA;AAC9E,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAG5B,oBAAY,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAgBD,wBAA8B,SAAS,CACrC,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAWlC"}
|
@@ -0,0 +1,56 @@
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
31
|
+
const _ = __importStar(require("lodash"));
|
32
|
+
const common_1 = require("../common");
|
33
|
+
const account_order_1 = require("./parse/account-order");
|
34
|
+
function formatResponse(address, responses) {
|
35
|
+
let orders = [];
|
36
|
+
for (const response of responses) {
|
37
|
+
const offers = response.offers.map((offer) => {
|
38
|
+
return account_order_1.parseAccountOrder(address, offer);
|
39
|
+
});
|
40
|
+
orders = orders.concat(offers);
|
41
|
+
}
|
42
|
+
return _.sortBy(orders, (order) => order.properties.sequence);
|
43
|
+
}
|
44
|
+
function getOrders(address, options = {}) {
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
46
|
+
common_1.validate.getOrders({ address, options });
|
47
|
+
const responses = yield this._requestAll('account_offers', {
|
48
|
+
account: address,
|
49
|
+
ledger_index: options.ledgerVersion || (yield this.getLedgerVersion()),
|
50
|
+
limit: options.limit
|
51
|
+
});
|
52
|
+
return formatResponse(address, responses);
|
53
|
+
});
|
54
|
+
}
|
55
|
+
exports.default = getOrders;
|
56
|
+
//# sourceMappingURL=orders.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"orders.js","sourceRoot":"","sources":["../../../src/ledger/orders.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA2B;AAC3B,sCAAkC;AAClC,yDAA8E;AAS9E,SAAS,cAAc,CACrB,OAAe,EACf,SAAkC;IAElC,IAAI,MAAM,GAA4B,EAAE,CAAA;IACxC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;QAChC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YAC3C,OAAO,iCAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QAC1C,CAAC,CAAC,CAAA;QACF,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;KAC/B;IACD,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;AAC/D,CAAC;AAED,SAA8B,SAAS,CAErC,OAAe,EACf,UAA4B,EAAE;;QAG9B,iBAAQ,CAAC,SAAS,CAAC,EAAC,OAAO,EAAE,OAAO,EAAC,CAAC,CAAA;QAEtC,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE;YACzD,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE,OAAO,CAAC,aAAa,IAAI,CAAC,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtE,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAA;QAEF,OAAO,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;IAC3C,CAAC;CAAA;AAfD,4BAeC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export declare type FormattedAccountDelete = {
|
2
|
+
destination: string;
|
3
|
+
destinationTag?: number;
|
4
|
+
destinationXAddress: string;
|
5
|
+
};
|
6
|
+
declare function parseAccountDelete(tx: any): FormattedAccountDelete;
|
7
|
+
export default parseAccountDelete;
|
8
|
+
//# sourceMappingURL=account-delete.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"account-delete.d.ts","sourceRoot":"","sources":["../../../../src/ledger/parse/account-delete.ts"],"names":[],"mappings":"AAKA,oBAAY,sBAAsB,GAAG;IAGnC,WAAW,EAAE,MAAM,CAAA;IAKnB,cAAc,CAAC,EAAE,MAAM,CAAA;IAIvB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAED,iBAAS,kBAAkB,CAAC,EAAE,EAAE,GAAG,GAAG,sBAAsB,CAa3D;AAED,eAAe,kBAAkB,CAAA"}
|
@@ -0,0 +1,36 @@
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
22
|
+
const assert = __importStar(require("assert"));
|
23
|
+
const common_1 = require("../../common");
|
24
|
+
const ripple_address_codec_1 = require("ripple-address-codec");
|
25
|
+
const utils_1 = require("./utils");
|
26
|
+
function parseAccountDelete(tx) {
|
27
|
+
assert.ok(tx.TransactionType === 'AccountDelete');
|
28
|
+
return common_1.removeUndefined({
|
29
|
+
memos: utils_1.parseMemos(tx),
|
30
|
+
destination: tx.Destination,
|
31
|
+
destinationTag: tx.DestinationTag,
|
32
|
+
destinationXAddress: ripple_address_codec_1.classicAddressToXAddress(tx.Destination, tx.DestinationTag == null ? false : tx.DestinationTag, false)
|
33
|
+
});
|
34
|
+
}
|
35
|
+
exports.default = parseAccountDelete;
|
36
|
+
//# sourceMappingURL=account-delete.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"account-delete.js","sourceRoot":"","sources":["../../../../src/ledger/parse/account-delete.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,yCAA4C;AAC5C,+DAA6D;AAC7D,mCAAkC;AAiBlC,SAAS,kBAAkB,CAAC,EAAO;IACjC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,eAAe,KAAK,eAAe,CAAC,CAAA;IAEjD,OAAO,wBAAe,CAAC;QACrB,KAAK,EAAE,kBAAU,CAAC,EAAE,CAAC;QACrB,WAAW,EAAE,EAAE,CAAC,WAAW;QAC3B,cAAc,EAAE,EAAE,CAAC,cAAc;QACjC,mBAAmB,EAAE,+CAAwB,CAC3C,EAAE,CAAC,WAAW,EACd,EAAE,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,cAAc,EACrD,KAAK,CACN;KACF,CAAC,CAAA;AACJ,CAAC;AAED,kBAAe,kBAAkB,CAAA"}
|