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":"ledger_entries.js","sourceRoot":"","sources":["../../../../../src/common/types/objects/ledger_entries.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"memos.d.ts","sourceRoot":"","sources":["../../../../../src/common/types/objects/memos.ts"],"names":[],"mappings":"AAAA,oBAAY,IAAI,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"memos.js","sourceRoot":"","sources":["../../../../../src/common/types/objects/memos.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { Amount } from './amounts';
|
2
|
+
import { Memo } from './memos';
|
3
|
+
export declare type FormattedOrderSpecification = {
|
4
|
+
direction: string;
|
5
|
+
quantity: Amount;
|
6
|
+
totalPrice: Amount;
|
7
|
+
immediateOrCancel?: boolean;
|
8
|
+
fillOrKill?: boolean;
|
9
|
+
expirationTime?: string;
|
10
|
+
orderToReplace?: number;
|
11
|
+
memos?: Memo[];
|
12
|
+
passive?: boolean;
|
13
|
+
};
|
14
|
+
//# sourceMappingURL=orders.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"orders.d.ts","sourceRoot":"","sources":["../../../../../src/common/types/objects/orders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAA;AAChC,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAA;AAE5B,oBAAY,2BAA2B,GAAG;IACxC,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IAId,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"orders.js","sourceRoot":"","sources":["../../../../../src/common/types/objects/orders.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export interface QueueTransaction {
|
2
|
+
auth_change: boolean;
|
3
|
+
fee: string;
|
4
|
+
fee_level: string;
|
5
|
+
max_spend_drops: string;
|
6
|
+
seq: number;
|
7
|
+
}
|
8
|
+
export interface QueueData {
|
9
|
+
txn_count: number;
|
10
|
+
auth_change_queued?: boolean;
|
11
|
+
lowest_sequence?: number;
|
12
|
+
highest_sequence?: number;
|
13
|
+
max_spend_drops_total?: string;
|
14
|
+
transactions?: QueueTransaction[];
|
15
|
+
}
|
16
|
+
//# sourceMappingURL=queue_data.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queue_data.d.ts","sourceRoot":"","sources":["../../../../../src/common/types/objects/queue_data.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,CAAA;IACpB,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAClC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queue_data.js","sourceRoot":"","sources":["../../../../../src/common/types/objects/queue_data.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { Memo } from './memos';
|
2
|
+
export declare type WeightedSigner = {
|
3
|
+
address: string;
|
4
|
+
weight: number;
|
5
|
+
};
|
6
|
+
export declare type Signers = {
|
7
|
+
threshold?: number;
|
8
|
+
weights: WeightedSigner[];
|
9
|
+
};
|
10
|
+
export declare type FormattedSettings = {
|
11
|
+
defaultRipple?: boolean;
|
12
|
+
depositAuth?: boolean;
|
13
|
+
disableMasterKey?: boolean;
|
14
|
+
disallowIncomingXRP?: boolean;
|
15
|
+
domain?: string;
|
16
|
+
emailHash?: string | null;
|
17
|
+
walletLocator?: string | null;
|
18
|
+
enableTransactionIDTracking?: boolean;
|
19
|
+
globalFreeze?: boolean;
|
20
|
+
memos?: Memo[];
|
21
|
+
messageKey?: string;
|
22
|
+
noFreeze?: boolean;
|
23
|
+
passwordSpent?: boolean;
|
24
|
+
regularKey?: string;
|
25
|
+
requireAuthorization?: boolean;
|
26
|
+
requireDestinationTag?: boolean;
|
27
|
+
signers?: Signers;
|
28
|
+
transferRate?: number | null;
|
29
|
+
tickSize?: number;
|
30
|
+
};
|
31
|
+
//# sourceMappingURL=settings.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../../src/common/types/objects/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAA;AAE5B,oBAAY,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,oBAAY,OAAO,GAAG;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,cAAc,EAAE,CAAA;CAC1B,CAAA;AAED,oBAAY,iBAAiB,GAAG;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,2BAA2B,CAAC,EAAE,OAAO,CAAA;IACrC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../../src/common/types/objects/settings.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signers.d.ts","sourceRoot":"","sources":["../../../../../src/common/types/objects/signers.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE;QACX,OAAO,EAAE,MAAM,CAAA;QACf,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;CACF"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signers.js","sourceRoot":"","sources":["../../../../../src/common/types/objects/signers.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { RippledAmount } from './amounts';
|
2
|
+
import { Memo } from './memos';
|
3
|
+
export interface OfferCreateTransaction {
|
4
|
+
TransactionType: 'OfferCreate';
|
5
|
+
Account: string;
|
6
|
+
AccountTxnID?: string;
|
7
|
+
Fee: string;
|
8
|
+
Field: any;
|
9
|
+
Flags: number;
|
10
|
+
LastLedgerSequence?: number;
|
11
|
+
Sequence: number;
|
12
|
+
Signers: any[];
|
13
|
+
SigningPubKey: string;
|
14
|
+
SourceTag?: number;
|
15
|
+
TakerGets: RippledAmount;
|
16
|
+
TakerPays: RippledAmount;
|
17
|
+
TxnSignature: string;
|
18
|
+
Expiration?: number;
|
19
|
+
Memos?: Memo[];
|
20
|
+
OfferSequence?: number;
|
21
|
+
}
|
22
|
+
//# sourceMappingURL=transactions.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../../../src/common/types/objects/transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,WAAW,CAAA;AACvC,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAA;AAE5B,MAAM,WAAW,sBAAsB;IACrC,eAAe,EAAE,aAAa,CAAA;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,GAAG,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,GAAG,EAAE,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,aAAa,CAAA;IACxB,SAAS,EAAE,aAAa,CAAA;IACxB,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../../../../src/common/types/objects/transactions.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { Memo } from './memos';
|
2
|
+
export interface Trustline {
|
3
|
+
account: string;
|
4
|
+
balance: string;
|
5
|
+
currency: string;
|
6
|
+
limit: string;
|
7
|
+
limit_peer: string;
|
8
|
+
quality_in: number;
|
9
|
+
quality_out: number;
|
10
|
+
no_ripple?: boolean;
|
11
|
+
no_ripple_peer?: boolean;
|
12
|
+
freeze?: boolean;
|
13
|
+
freeze_peer?: boolean;
|
14
|
+
authorized?: boolean;
|
15
|
+
peer_authorized?: boolean;
|
16
|
+
}
|
17
|
+
export declare type FormattedTrustlineSpecification = {
|
18
|
+
currency: string;
|
19
|
+
counterparty: string;
|
20
|
+
limit: string;
|
21
|
+
qualityIn?: number;
|
22
|
+
qualityOut?: number;
|
23
|
+
ripplingDisabled?: boolean;
|
24
|
+
authorized?: boolean;
|
25
|
+
frozen?: boolean;
|
26
|
+
memos?: Memo[];
|
27
|
+
};
|
28
|
+
export declare type FormattedTrustline = {
|
29
|
+
specification: FormattedTrustlineSpecification;
|
30
|
+
counterparty: {
|
31
|
+
limit: string;
|
32
|
+
ripplingDisabled?: boolean;
|
33
|
+
frozen?: boolean;
|
34
|
+
authorized?: boolean;
|
35
|
+
};
|
36
|
+
state: {
|
37
|
+
balance: string;
|
38
|
+
};
|
39
|
+
};
|
40
|
+
//# sourceMappingURL=trustlines.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"trustlines.d.ts","sourceRoot":"","sources":["../../../../../src/common/types/objects/trustlines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAA;AAE5B,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,oBAAY,+BAA+B,GAAG;IAC5C,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;CACf,CAAA;AAED,oBAAY,kBAAkB,GAAG;IAC/B,aAAa,EAAE,+BAA+B,CAAA;IAC9C,YAAY,EAAE;QACZ,KAAK,EAAE,MAAM,CAAA;QACb,gBAAgB,CAAC,EAAE,OAAO,CAAA;QAC1B,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB,CAAA;IACD,KAAK,EAAE;QACL,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"trustlines.js","sourceRoot":"","sources":["../../../../../src/common/types/objects/trustlines.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
2
|
+
import { RippledAmount } from './types/objects';
|
3
|
+
declare function isValidSecret(secret: string): boolean;
|
4
|
+
declare function dropsToXrp(drops: BigNumber.Value): string;
|
5
|
+
declare function xrpToDrops(xrp: BigNumber.Value): string;
|
6
|
+
declare function toRippledAmount(amount: RippledAmount): RippledAmount;
|
7
|
+
declare function convertKeysFromSnakeCaseToCamelCase(obj: any): any;
|
8
|
+
declare function removeUndefined<T extends object>(obj: T): T;
|
9
|
+
declare function rippleTimeToISO8601(rippleTime: number): string;
|
10
|
+
declare function iso8601ToRippleTime(iso8601: string): number;
|
11
|
+
export { dropsToXrp, xrpToDrops, toRippledAmount, convertKeysFromSnakeCaseToCamelCase, removeUndefined, rippleTimeToISO8601, iso8601ToRippleTime, isValidSecret };
|
12
|
+
//# sourceMappingURL=utils.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/common/utils.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,cAAc,CAAA;AAEpC,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAA;AAI7C,iBAAS,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAO9C;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,GAAG,MAAM,CAuClD;AAED,iBAAS,UAAU,CAAC,GAAG,EAAE,SAAS,CAAC,KAAK,GAAG,MAAM,CAiDhD;AAED,iBAAS,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CA2B7D;AAED,iBAAS,mCAAmC,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAmB1D;AAED,iBAAS,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAEpD;AAkBD,iBAAS,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEvD;AAMD,iBAAS,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,OAAO,EACL,UAAU,EACV,UAAU,EACV,eAAe,EACf,mCAAmC,EACnC,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACd,CAAA"}
|
@@ -0,0 +1,157 @@
|
|
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
|
+
exports.isValidSecret = exports.iso8601ToRippleTime = exports.rippleTimeToISO8601 = exports.removeUndefined = exports.convertKeysFromSnakeCaseToCamelCase = exports.toRippledAmount = exports.xrpToDrops = exports.dropsToXrp = void 0;
|
26
|
+
const _ = __importStar(require("lodash"));
|
27
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
28
|
+
const ripple_keypairs_1 = require("ripple-keypairs");
|
29
|
+
const errors_1 = require("./errors");
|
30
|
+
const ripple_address_codec_1 = require("ripple-address-codec");
|
31
|
+
function isValidSecret(secret) {
|
32
|
+
try {
|
33
|
+
ripple_keypairs_1.deriveKeypair(secret);
|
34
|
+
return true;
|
35
|
+
}
|
36
|
+
catch (err) {
|
37
|
+
return false;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
exports.isValidSecret = isValidSecret;
|
41
|
+
function dropsToXrp(drops) {
|
42
|
+
if (typeof drops === 'string') {
|
43
|
+
if (!drops.match(/^-?[0-9]*\.?[0-9]*$/)) {
|
44
|
+
throw new errors_1.ValidationError(`dropsToXrp: invalid value '${drops}',` +
|
45
|
+
` should be a number matching (^-?[0-9]*\\.?[0-9]*$).`);
|
46
|
+
}
|
47
|
+
else if (drops === '.') {
|
48
|
+
throw new errors_1.ValidationError(`dropsToXrp: invalid value '${drops}',` +
|
49
|
+
` should be a BigNumber or string-encoded number.`);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
drops = new bignumber_js_1.default(drops).toString(10);
|
53
|
+
if (drops.includes('.')) {
|
54
|
+
throw new errors_1.ValidationError(`dropsToXrp: value '${drops}' has` + ` too many decimal places.`);
|
55
|
+
}
|
56
|
+
if (!drops.match(/^-?[0-9]+$/)) {
|
57
|
+
throw new errors_1.ValidationError(`dropsToXrp: failed sanity check -` +
|
58
|
+
` value '${drops}',` +
|
59
|
+
` does not match (^-?[0-9]+$).`);
|
60
|
+
}
|
61
|
+
return new bignumber_js_1.default(drops).dividedBy(1000000.0).toString(10);
|
62
|
+
}
|
63
|
+
exports.dropsToXrp = dropsToXrp;
|
64
|
+
function xrpToDrops(xrp) {
|
65
|
+
if (typeof xrp === 'string') {
|
66
|
+
if (!xrp.match(/^-?[0-9]*\.?[0-9]*$/)) {
|
67
|
+
throw new errors_1.ValidationError(`xrpToDrops: invalid value '${xrp}',` +
|
68
|
+
` should be a number matching (^-?[0-9]*\\.?[0-9]*$).`);
|
69
|
+
}
|
70
|
+
else if (xrp === '.') {
|
71
|
+
throw new errors_1.ValidationError(`xrpToDrops: invalid value '${xrp}',` +
|
72
|
+
` should be a BigNumber or string-encoded number.`);
|
73
|
+
}
|
74
|
+
}
|
75
|
+
xrp = new bignumber_js_1.default(xrp).toString(10);
|
76
|
+
if (!xrp.match(/^-?[0-9.]+$/)) {
|
77
|
+
throw new errors_1.ValidationError(`xrpToDrops: failed sanity check -` +
|
78
|
+
` value '${xrp}',` +
|
79
|
+
` does not match (^-?[0-9.]+$).`);
|
80
|
+
}
|
81
|
+
const components = xrp.split('.');
|
82
|
+
if (components.length > 2) {
|
83
|
+
throw new errors_1.ValidationError(`xrpToDrops: failed sanity check -` +
|
84
|
+
` value '${xrp}' has` +
|
85
|
+
` too many decimal points.`);
|
86
|
+
}
|
87
|
+
const fraction = components[1] || '0';
|
88
|
+
if (fraction.length > 6) {
|
89
|
+
throw new errors_1.ValidationError(`xrpToDrops: value '${xrp}' has` + ` too many decimal places.`);
|
90
|
+
}
|
91
|
+
return new bignumber_js_1.default(xrp)
|
92
|
+
.times(1000000.0)
|
93
|
+
.integerValue(bignumber_js_1.default.ROUND_FLOOR)
|
94
|
+
.toString(10);
|
95
|
+
}
|
96
|
+
exports.xrpToDrops = xrpToDrops;
|
97
|
+
function toRippledAmount(amount) {
|
98
|
+
if (typeof amount === 'string')
|
99
|
+
return amount;
|
100
|
+
if (amount.currency === 'XRP') {
|
101
|
+
return xrpToDrops(amount.value);
|
102
|
+
}
|
103
|
+
if (amount.currency === 'drops') {
|
104
|
+
return amount.value;
|
105
|
+
}
|
106
|
+
let issuer = amount.counterparty || amount.issuer;
|
107
|
+
let tag = false;
|
108
|
+
try {
|
109
|
+
({ classicAddress: issuer, tag } = ripple_address_codec_1.xAddressToClassicAddress(issuer));
|
110
|
+
}
|
111
|
+
catch (e) { }
|
112
|
+
if (tag !== false) {
|
113
|
+
throw new errors_1.ValidationError("Issuer X-address includes a tag");
|
114
|
+
}
|
115
|
+
return {
|
116
|
+
currency: amount.currency,
|
117
|
+
issuer,
|
118
|
+
value: amount.value
|
119
|
+
};
|
120
|
+
}
|
121
|
+
exports.toRippledAmount = toRippledAmount;
|
122
|
+
function convertKeysFromSnakeCaseToCamelCase(obj) {
|
123
|
+
if (typeof obj === 'object') {
|
124
|
+
const accumulator = Array.isArray(obj) ? [] : {};
|
125
|
+
let newKey;
|
126
|
+
return Object.entries(obj).reduce((result, [key, value]) => {
|
127
|
+
newKey = key;
|
128
|
+
const FINDSNAKE = /([a-zA-Z]_[a-zA-Z])/g;
|
129
|
+
if (FINDSNAKE.test(key)) {
|
130
|
+
newKey = key.replace(FINDSNAKE, (r) => r[0] + r[2].toUpperCase());
|
131
|
+
}
|
132
|
+
result[newKey] = convertKeysFromSnakeCaseToCamelCase(value);
|
133
|
+
return result;
|
134
|
+
}, accumulator);
|
135
|
+
}
|
136
|
+
return obj;
|
137
|
+
}
|
138
|
+
exports.convertKeysFromSnakeCaseToCamelCase = convertKeysFromSnakeCaseToCamelCase;
|
139
|
+
function removeUndefined(obj) {
|
140
|
+
return _.omitBy(obj, value => value == null);
|
141
|
+
}
|
142
|
+
exports.removeUndefined = removeUndefined;
|
143
|
+
function rippleToUnixTimestamp(rpepoch) {
|
144
|
+
return (rpepoch + 0x386d4380) * 1000;
|
145
|
+
}
|
146
|
+
function unixToRippleTimestamp(timestamp) {
|
147
|
+
return Math.round(timestamp / 1000) - 0x386d4380;
|
148
|
+
}
|
149
|
+
function rippleTimeToISO8601(rippleTime) {
|
150
|
+
return new Date(rippleToUnixTimestamp(rippleTime)).toISOString();
|
151
|
+
}
|
152
|
+
exports.rippleTimeToISO8601 = rippleTimeToISO8601;
|
153
|
+
function iso8601ToRippleTime(iso8601) {
|
154
|
+
return unixToRippleTimestamp(Date.parse(iso8601));
|
155
|
+
}
|
156
|
+
exports.iso8601ToRippleTime = iso8601ToRippleTime;
|
157
|
+
//# sourceMappingURL=utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/common/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA2B;AAC3B,gEAAoC;AACpC,qDAA6C;AAE7C,qCAAwC;AACxC,+DAA6D;AAE7D,SAAS,aAAa,CAAC,MAAc;IACnC,IAAI;QACF,+BAAa,CAAC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AAA;QACf,CAAC,EACD,WAAW,CACZ,CAAA;KACF;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAsCC,kFAAmC;AApCrC,SAAS,eAAe,CAAmB,GAAM;IAC/C,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,IAAI,CAAM,CAAA;AACnD,CAAC;AAmCC,0CAAe;AA7BjB,SAAS,qBAAqB,CAAC,OAAe;IAC5C,OAAO,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,IAAI,CAAA;AACtC,CAAC;AAMD,SAAS,qBAAqB,CAAC,SAAiB;IAC9C,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,UAAU,CAAA;AAClD,CAAC;AAED,SAAS,mBAAmB,CAAC,UAAkB;IAC7C,OAAO,IAAI,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;AAClE,CAAC;AAgBC,kDAAmB;AAVrB,SAAS,mBAAmB,CAAC,OAAe;IAC1C,OAAO,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;AACnD,CAAC;AASC,kDAAmB"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
export declare const getPaths: (object: any) => void;
|
2
|
+
export declare const getTransactions: (instance: any) => void;
|
3
|
+
export declare const getSettings: (instance: any) => void;
|
4
|
+
export declare const getAccountInfo: (instance: any) => void;
|
5
|
+
export declare const getTrustlines: (instance: any) => void;
|
6
|
+
export declare const getBalances: (instance: any) => void;
|
7
|
+
export declare const getBalanceSheet: (instance: any) => void;
|
8
|
+
export declare const getOrders: (instance: any) => void;
|
9
|
+
export declare const getOrderbook: (instance: any) => void;
|
10
|
+
export declare const getTransaction: (instance: any) => void;
|
11
|
+
export declare const getPaymentChannel: (instance: any) => void;
|
12
|
+
export declare const getLedger: (instance: any) => void;
|
13
|
+
export declare const preparePayment: (object: any) => void;
|
14
|
+
export declare const prepareOrder: (object: any) => void;
|
15
|
+
export declare const prepareOrderCancellation: (object: any) => void;
|
16
|
+
export declare const prepareTrustline: (object: any) => void;
|
17
|
+
export declare const prepareSettings: (object: any) => void;
|
18
|
+
export declare const prepareEscrowCreation: (object: any) => void;
|
19
|
+
export declare const prepareEscrowCancellation: (object: any) => void;
|
20
|
+
export declare const prepareEscrowExecution: (object: any) => void;
|
21
|
+
export declare const preparePaymentChannelCreate: (object: any) => void;
|
22
|
+
export declare const preparePaymentChannelFund: (object: any) => void;
|
23
|
+
export declare const preparePaymentChannelClaim: (object: any) => void;
|
24
|
+
export declare const prepareCheckCreate: (object: any) => void;
|
25
|
+
export declare const prepareCheckCash: (object: any) => void;
|
26
|
+
export declare const prepareCheckCancel: (object: any) => void;
|
27
|
+
export declare const prepareTicketCreate: (object: any) => void;
|
28
|
+
export declare const sign: (object: any) => void;
|
29
|
+
export declare const combine: (object: any) => void;
|
30
|
+
export declare const submit: (object: any) => void;
|
31
|
+
export declare const computeLedgerHash: (object: any) => void;
|
32
|
+
export declare const generateAddress: (object: any) => void;
|
33
|
+
export declare const signPaymentChannelClaim: (object: any) => void;
|
34
|
+
export declare const verifyPaymentChannelClaim: (object: any) => void;
|
35
|
+
export declare const apiOptions: (object: any) => void;
|
36
|
+
export declare const instructions: (object: any) => void;
|
37
|
+
export declare const tx_json: (object: any) => void;
|
38
|
+
//# sourceMappingURL=validate.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/common/validate.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,QAAQ,uBAAkD,CAAA;AAEvE,eAAO,MAAM,eAAe,yBAG3B,CAAA;AAED,eAAO,MAAM,WAAW,yBAAsD,CAAA;AAE9E,eAAO,MAAM,cAAc,yBAG1B,CAAA;AAED,eAAO,MAAM,aAAa,yBAGzB,CAAA;AAED,eAAO,MAAM,WAAW,yBAAsD,CAAA;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,79 @@
|
|
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
|
+
exports.tx_json = exports.instructions = exports.apiOptions = exports.verifyPaymentChannelClaim = exports.signPaymentChannelClaim = exports.generateAddress = exports.computeLedgerHash = exports.submit = exports.combine = exports.sign = exports.prepareTicketCreate = exports.prepareCheckCancel = exports.prepareCheckCash = exports.prepareCheckCreate = exports.preparePaymentChannelClaim = exports.preparePaymentChannelFund = exports.preparePaymentChannelCreate = exports.prepareEscrowExecution = exports.prepareEscrowCancellation = exports.prepareEscrowCreation = exports.prepareSettings = exports.prepareTrustline = exports.prepareOrderCancellation = exports.prepareOrder = exports.preparePayment = exports.getLedger = exports.getPaymentChannel = exports.getTransaction = exports.getOrderbook = exports.getOrders = exports.getBalanceSheet = exports.getBalances = exports.getTrustlines = exports.getAccountInfo = exports.getSettings = exports.getTransactions = exports.getPaths = void 0;
|
23
|
+
const _ = __importStar(require("lodash"));
|
24
|
+
const errors_1 = require("./errors");
|
25
|
+
const schema_validator_1 = require("./schema-validator");
|
26
|
+
function error(text) {
|
27
|
+
return new errors_1.ValidationError(text);
|
28
|
+
}
|
29
|
+
function validateLedgerRange(options) {
|
30
|
+
if (options != null &&
|
31
|
+
options.minLedgerVersion != null &&
|
32
|
+
options.maxLedgerVersion != null) {
|
33
|
+
if (Number(options.minLedgerVersion) > Number(options.maxLedgerVersion)) {
|
34
|
+
throw error('minLedgerVersion must not be greater than maxLedgerVersion');
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
function validateOptions(schema, instance) {
|
39
|
+
schema_validator_1.schemaValidate(schema, instance);
|
40
|
+
validateLedgerRange(instance.options);
|
41
|
+
}
|
42
|
+
exports.getPaths = _.partial(schema_validator_1.schemaValidate, 'getPathsParameters');
|
43
|
+
exports.getTransactions = _.partial(validateOptions, 'getTransactionsParameters');
|
44
|
+
exports.getSettings = _.partial(validateOptions, 'getSettingsParameters');
|
45
|
+
exports.getAccountInfo = _.partial(validateOptions, 'getAccountInfoParameters');
|
46
|
+
exports.getTrustlines = _.partial(validateOptions, 'getTrustlinesParameters');
|
47
|
+
exports.getBalances = _.partial(validateOptions, 'getBalancesParameters');
|
48
|
+
exports.getBalanceSheet = _.partial(validateOptions, 'getBalanceSheetParameters');
|
49
|
+
exports.getOrders = _.partial(validateOptions, 'getOrdersParameters');
|
50
|
+
exports.getOrderbook = _.partial(validateOptions, 'getOrderbookParameters');
|
51
|
+
exports.getTransaction = _.partial(validateOptions, 'getTransactionParameters');
|
52
|
+
exports.getPaymentChannel = _.partial(validateOptions, 'getPaymentChannelParameters');
|
53
|
+
exports.getLedger = _.partial(validateOptions, 'getLedgerParameters');
|
54
|
+
exports.preparePayment = _.partial(schema_validator_1.schemaValidate, 'preparePaymentParameters');
|
55
|
+
exports.prepareOrder = _.partial(schema_validator_1.schemaValidate, 'prepareOrderParameters');
|
56
|
+
exports.prepareOrderCancellation = _.partial(schema_validator_1.schemaValidate, 'prepareOrderCancellationParameters');
|
57
|
+
exports.prepareTrustline = _.partial(schema_validator_1.schemaValidate, 'prepareTrustlineParameters');
|
58
|
+
exports.prepareSettings = _.partial(schema_validator_1.schemaValidate, 'prepareSettingsParameters');
|
59
|
+
exports.prepareEscrowCreation = _.partial(schema_validator_1.schemaValidate, 'prepareEscrowCreationParameters');
|
60
|
+
exports.prepareEscrowCancellation = _.partial(schema_validator_1.schemaValidate, 'prepareEscrowCancellationParameters');
|
61
|
+
exports.prepareEscrowExecution = _.partial(schema_validator_1.schemaValidate, 'prepareEscrowExecutionParameters');
|
62
|
+
exports.preparePaymentChannelCreate = _.partial(schema_validator_1.schemaValidate, 'preparePaymentChannelCreateParameters');
|
63
|
+
exports.preparePaymentChannelFund = _.partial(schema_validator_1.schemaValidate, 'preparePaymentChannelFundParameters');
|
64
|
+
exports.preparePaymentChannelClaim = _.partial(schema_validator_1.schemaValidate, 'preparePaymentChannelClaimParameters');
|
65
|
+
exports.prepareCheckCreate = _.partial(schema_validator_1.schemaValidate, 'prepareCheckCreateParameters');
|
66
|
+
exports.prepareCheckCash = _.partial(schema_validator_1.schemaValidate, 'prepareCheckCashParameters');
|
67
|
+
exports.prepareCheckCancel = _.partial(schema_validator_1.schemaValidate, 'prepareCheckCancelParameters');
|
68
|
+
exports.prepareTicketCreate = _.partial(schema_validator_1.schemaValidate, 'prepareTicketParameters');
|
69
|
+
exports.sign = _.partial(schema_validator_1.schemaValidate, 'signParameters');
|
70
|
+
exports.combine = _.partial(schema_validator_1.schemaValidate, 'combineParameters');
|
71
|
+
exports.submit = _.partial(schema_validator_1.schemaValidate, 'submitParameters');
|
72
|
+
exports.computeLedgerHash = _.partial(schema_validator_1.schemaValidate, 'computeLedgerHashParameters');
|
73
|
+
exports.generateAddress = _.partial(schema_validator_1.schemaValidate, 'generateAddressParameters');
|
74
|
+
exports.signPaymentChannelClaim = _.partial(schema_validator_1.schemaValidate, 'signPaymentChannelClaimParameters');
|
75
|
+
exports.verifyPaymentChannelClaim = _.partial(schema_validator_1.schemaValidate, 'verifyPaymentChannelClaimParameters');
|
76
|
+
exports.apiOptions = _.partial(schema_validator_1.schemaValidate, 'api-options');
|
77
|
+
exports.instructions = _.partial(schema_validator_1.schemaValidate, 'instructions');
|
78
|
+
exports.tx_json = _.partial(schema_validator_1.schemaValidate, 'tx-json');
|
79
|
+
//# sourceMappingURL=validate.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/common/validate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA2B;AAC3B,qCAAwC;AACxC,yDAAiD;AAEjD,SAAS,KAAK,CAAC,IAAI;IACjB,OAAO,IAAI,wBAAe,CAAC,IAAI,CAAC,CAAA;AAClC,CAAC;AAED,SAAS,mBAAmB,CAAC,OAAO;IAClC,IACE,OAAO,IAAI,IAAI;QACf,OAAO,CAAC,gBAAgB,IAAI,IAAI;QAChC,OAAO,CAAC,gBAAgB,IAAI,IAAI,EAChC;QACA,IAAI,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE;YACvE,MAAM,KAAK,CAAC,4DAA4D,CAAC,CAAA;SAC1E;KACF;AACH,CAAC;AAED,SAAS,eAAe,CAAC,MAAM,EAAE,QAAQ;IACvC,iCAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAChC,mBAAmB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;AACvC,CAAC;AAEY,QAAA,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,iCAAc,EAAE,oBAAoB,CAAC,CAAA;AAE1D,QAAA,eAAe,GAAG,CAAC,CAAC,OAAO,CACtC,eAAe,EACf,2BAA2B,CAC5B,CAAA;AAEY,QAAA,WAAW,GAAG,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAAA;AAEjE,QAAA,cAAc,GAAG,CAAC,CAAC,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B,GAAG,CAAC,CAAC,OAAO,CAChD,iCAAc,EACd,qCAAqC,CACtC,CAAA;AAEY,QAAA,UAAU,GAAG,CAAC,CAAC,OAAO,CAAC,iCAAc,EAAE,aAAa,CAAC,CAAA;AAErD,QAAA,YAAY,GAAG,CAAC,CAAC,OAAO,CAAC,iCAAc,EAAE,cAAc,CAAC,CAAA;AAExD,QAAA,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,iCAAc,EAAE,SAAS,CAAC,CAAA"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { EventEmitter } from 'events';
|
3
|
+
declare class WSWrapper extends EventEmitter {
|
4
|
+
private _ws;
|
5
|
+
static CONNECTING: number;
|
6
|
+
static OPEN: number;
|
7
|
+
static CLOSING: number;
|
8
|
+
static CLOSED: number;
|
9
|
+
constructor(url: any, _protocols: any, _websocketOptions: any);
|
10
|
+
close(): void;
|
11
|
+
send(message: any): void;
|
12
|
+
get readyState(): number;
|
13
|
+
}
|
14
|
+
export = WSWrapper;
|
15
|
+
//# sourceMappingURL=wswrapper.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"wswrapper.d.ts","sourceRoot":"","sources":["../../../src/common/wswrapper.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAA;AAkBnC,cAAM,SAAU,SAAQ,YAAY;IAClC,OAAO,CAAC,GAAG,CAAW;IACtB,MAAM,CAAC,UAAU,SAAI;IACrB,MAAM,CAAC,IAAI,SAAI;IACf,MAAM,CAAC,OAAO,SAAI;IAClB,MAAM,CAAC,MAAM,SAAI;gBAEL,GAAG,KAAA,EAAE,UAAU,EAAE,GAAG,EAAE,iBAAiB,EAAE,GAAG;IAuBxD,KAAK;IAML,IAAI,CAAC,OAAO,KAAA;IAIZ,IAAI,UAAU,WAEb;CACF;AAED,SAAS,SAAS,CAAA"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
const events_1 = require("events");
|
3
|
+
class WSWrapper extends events_1.EventEmitter {
|
4
|
+
constructor(url, _protocols, _websocketOptions) {
|
5
|
+
super();
|
6
|
+
this.setMaxListeners(Infinity);
|
7
|
+
this._ws = new WebSocket(url);
|
8
|
+
this._ws.onclose = () => {
|
9
|
+
this.emit('close');
|
10
|
+
};
|
11
|
+
this._ws.onopen = () => {
|
12
|
+
this.emit('open');
|
13
|
+
};
|
14
|
+
this._ws.onerror = (error) => {
|
15
|
+
this.emit('error', error);
|
16
|
+
};
|
17
|
+
this._ws.onmessage = (message) => {
|
18
|
+
this.emit('message', message.data);
|
19
|
+
};
|
20
|
+
}
|
21
|
+
close() {
|
22
|
+
if (this.readyState === 1) {
|
23
|
+
this._ws.close();
|
24
|
+
}
|
25
|
+
}
|
26
|
+
send(message) {
|
27
|
+
this._ws.send(message);
|
28
|
+
}
|
29
|
+
get readyState() {
|
30
|
+
return this._ws.readyState;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
WSWrapper.CONNECTING = 0;
|
34
|
+
WSWrapper.OPEN = 1;
|
35
|
+
WSWrapper.CLOSING = 2;
|
36
|
+
WSWrapper.CLOSED = 3;
|
37
|
+
module.exports = WSWrapper;
|
38
|
+
//# sourceMappingURL=wswrapper.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"wswrapper.js","sourceRoot":"","sources":["../../../src/common/wswrapper.ts"],"names":[],"mappings":";AAAA,mCAAmC;AAkBnC,MAAM,SAAU,SAAQ,qBAAY;IAOlC,YAAY,GAAG,EAAE,UAAe,EAAE,iBAAsB;QACtD,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAA;QAE9B,IAAI,CAAC,GAAG,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,CAAA;QAE7B,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,GAAG,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CA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