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,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
11
|
+
}) : function(o, v) {
|
12
|
+
o["default"] = v;
|
13
|
+
});
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
15
|
+
if (mod && mod.__esModule) return mod;
|
16
|
+
var result = {};
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
18
|
+
__setModuleDefault(result, mod);
|
19
|
+
return result;
|
20
|
+
};
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
23
|
+
};
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
25
|
+
const common = __importStar(require("../common"));
|
26
|
+
const ripple_keypairs_1 = __importDefault(require("ripple-keypairs"));
|
27
|
+
const ripple_binary_codec_1 = __importDefault(require("ripple-binary-codec"));
|
28
|
+
const { validate, xrpToDrops } = common;
|
29
|
+
function signPaymentChannelClaim(channel, amount, privateKey) {
|
30
|
+
validate.signPaymentChannelClaim({ channel, amount, privateKey });
|
31
|
+
const signingData = ripple_binary_codec_1.default.encodeForSigningClaim({
|
32
|
+
channel: channel,
|
33
|
+
amount: xrpToDrops(amount)
|
34
|
+
});
|
35
|
+
return ripple_keypairs_1.default.sign(signingData, privateKey);
|
36
|
+
}
|
37
|
+
exports.default = signPaymentChannelClaim;
|
38
|
+
//# sourceMappingURL=sign-payment-channel-claim.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sign-payment-channel-claim.js","sourceRoot":"","sources":["../../../src/offline/sign-payment-channel-claim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAmC;AACnC,sEAAsC;AACtC,8EAAwC;AACxC,MAAM,EAAC,QAAQ,EAAE,UAAU,EAAC,GAAG,MAAM,CAAA;AAErC,SAAS,uBAAuB,CAC9B,OAAe,EACf,MAAc,EACd,UAAkB;IAElB,QAAQ,CAAC,uBAAuB,CAAC,EAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAC,CAAC,CAAA;IAE/D,MAAM,WAAW,GAAG,6BAAM,CAAC,qBAAqB,CAAC;QAC/C,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC;KAC3B,CAAC,CAAA;IACF,OAAO,yBAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;AAC/C,CAAC;AAED,kBAAe,uBAAuB,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { deriveKeypair, deriveAddress, deriveXAddress } from './derive';
|
2
|
+
import computeLedgerHeaderHash from './ledgerhash';
|
3
|
+
import signPaymentChannelClaim from './sign-payment-channel-claim';
|
4
|
+
import verifyPaymentChannelClaim from './verify-payment-channel-claim';
|
5
|
+
import { dropsToXrp, xrpToDrops, toRippledAmount, convertKeysFromSnakeCaseToCamelCase, removeUndefined, rippleTimeToISO8601, iso8601ToRippleTime, isValidSecret } from '../common/utils';
|
6
|
+
import { computeBinaryTransactionHash, computeTransactionHash, computeBinaryTransactionSigningHash, computeAccountLedgerObjectID, computeSignerListLedgerObjectID, computeOrderID, computeTrustlineHash, computeTransactionTreeHash, computeStateTreeHash, computeLedgerHash, computeEscrowHash, computePaymentChannelHash } from '../common/hashes';
|
7
|
+
import { generateAddressAPI, GenerateAddressOptions, GeneratedAddress } from '../offline/generate-address';
|
8
|
+
declare const generateAddress: (options?: GenerateAddressOptions) => GeneratedAddress;
|
9
|
+
export { computeLedgerHeaderHash, dropsToXrp, xrpToDrops, toRippledAmount, convertKeysFromSnakeCaseToCamelCase, removeUndefined, rippleTimeToISO8601, iso8601ToRippleTime, isValidSecret, computeBinaryTransactionHash, computeTransactionHash, computeBinaryTransactionSigningHash, computeAccountLedgerObjectID, computeSignerListLedgerObjectID, computeOrderID, computeTrustlineHash, computeTransactionTreeHash, computeStateTreeHash, computeLedgerHash, computeEscrowHash, computePaymentChannelHash, generateAddress, generateAddressAPI as generateXAddress, deriveKeypair, deriveAddress, deriveXAddress, signPaymentChannelClaim, verifyPaymentChannelClaim, };
|
10
|
+
//# sourceMappingURL=utils.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/offline/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACvE,OAAO,uBAAuB,MAAM,cAAc,CAAA;AAClD,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,yBAAyB,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,UAAU,EACf,UAAU,EACV,eAAe,EACf,mCAAmC,EACnC,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EAChB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACH,4BAA4B,EAC5B,sBAAsB,EACtB,mCAAmC,EACnC,4BAA4B,EAC5B,+BAA+B,EAC/B,cAAc,EACd,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EAC5B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAG1G,QAAA,MAAM,eAAe,aAAa,sBAAsB,KAAQ,gBAE/D,CAAA;AAED,OAAO,EACH,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,eAAe,EACf,mCAAmC,EACnC,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,4BAA4B,EAC5B,sBAAsB,EACtB,mCAAmC,EACnC,4BAA4B,EAC5B,+BAA+B,EAC/B,cAAc,EACd,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EACzB,eAAe,EACf,kBAAkB,IAAI,gBAAgB,EACtC,aAAa,EACb,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,yBAAyB,GAC5B,CAAA"}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.verifyPaymentChannelClaim = exports.signPaymentChannelClaim = exports.deriveXAddress = exports.deriveAddress = exports.deriveKeypair = exports.generateXAddress = exports.generateAddress = exports.computePaymentChannelHash = exports.computeEscrowHash = exports.computeLedgerHash = exports.computeStateTreeHash = exports.computeTransactionTreeHash = exports.computeTrustlineHash = exports.computeOrderID = exports.computeSignerListLedgerObjectID = exports.computeAccountLedgerObjectID = exports.computeBinaryTransactionSigningHash = exports.computeTransactionHash = exports.computeBinaryTransactionHash = exports.isValidSecret = exports.iso8601ToRippleTime = exports.rippleTimeToISO8601 = exports.removeUndefined = exports.convertKeysFromSnakeCaseToCamelCase = exports.toRippledAmount = exports.xrpToDrops = exports.dropsToXrp = exports.computeLedgerHeaderHash = void 0;
|
7
|
+
const derive_1 = require("./derive");
|
8
|
+
Object.defineProperty(exports, "deriveKeypair", { enumerable: true, get: function () { return derive_1.deriveKeypair; } });
|
9
|
+
Object.defineProperty(exports, "deriveAddress", { enumerable: true, get: function () { return derive_1.deriveAddress; } });
|
10
|
+
Object.defineProperty(exports, "deriveXAddress", { enumerable: true, get: function () { return derive_1.deriveXAddress; } });
|
11
|
+
const ledgerhash_1 = __importDefault(require("./ledgerhash"));
|
12
|
+
exports.computeLedgerHeaderHash = ledgerhash_1.default;
|
13
|
+
const sign_payment_channel_claim_1 = __importDefault(require("./sign-payment-channel-claim"));
|
14
|
+
exports.signPaymentChannelClaim = sign_payment_channel_claim_1.default;
|
15
|
+
const verify_payment_channel_claim_1 = __importDefault(require("./verify-payment-channel-claim"));
|
16
|
+
exports.verifyPaymentChannelClaim = verify_payment_channel_claim_1.default;
|
17
|
+
const utils_1 = require("../common/utils");
|
18
|
+
Object.defineProperty(exports, "dropsToXrp", { enumerable: true, get: function () { return utils_1.dropsToXrp; } });
|
19
|
+
Object.defineProperty(exports, "xrpToDrops", { enumerable: true, get: function () { return utils_1.xrpToDrops; } });
|
20
|
+
Object.defineProperty(exports, "toRippledAmount", { enumerable: true, get: function () { return utils_1.toRippledAmount; } });
|
21
|
+
Object.defineProperty(exports, "convertKeysFromSnakeCaseToCamelCase", { enumerable: true, get: function () { return utils_1.convertKeysFromSnakeCaseToCamelCase; } });
|
22
|
+
Object.defineProperty(exports, "removeUndefined", { enumerable: true, get: function () { return utils_1.removeUndefined; } });
|
23
|
+
Object.defineProperty(exports, "rippleTimeToISO8601", { enumerable: true, get: function () { return utils_1.rippleTimeToISO8601; } });
|
24
|
+
Object.defineProperty(exports, "iso8601ToRippleTime", { enumerable: true, get: function () { return utils_1.iso8601ToRippleTime; } });
|
25
|
+
Object.defineProperty(exports, "isValidSecret", { enumerable: true, get: function () { return utils_1.isValidSecret; } });
|
26
|
+
const hashes_1 = require("../common/hashes");
|
27
|
+
Object.defineProperty(exports, "computeBinaryTransactionHash", { enumerable: true, get: function () { return hashes_1.computeBinaryTransactionHash; } });
|
28
|
+
Object.defineProperty(exports, "computeTransactionHash", { enumerable: true, get: function () { return hashes_1.computeTransactionHash; } });
|
29
|
+
Object.defineProperty(exports, "computeBinaryTransactionSigningHash", { enumerable: true, get: function () { return hashes_1.computeBinaryTransactionSigningHash; } });
|
30
|
+
Object.defineProperty(exports, "computeAccountLedgerObjectID", { enumerable: true, get: function () { return hashes_1.computeAccountLedgerObjectID; } });
|
31
|
+
Object.defineProperty(exports, "computeSignerListLedgerObjectID", { enumerable: true, get: function () { return hashes_1.computeSignerListLedgerObjectID; } });
|
32
|
+
Object.defineProperty(exports, "computeOrderID", { enumerable: true, get: function () { return hashes_1.computeOrderID; } });
|
33
|
+
Object.defineProperty(exports, "computeTrustlineHash", { enumerable: true, get: function () { return hashes_1.computeTrustlineHash; } });
|
34
|
+
Object.defineProperty(exports, "computeTransactionTreeHash", { enumerable: true, get: function () { return hashes_1.computeTransactionTreeHash; } });
|
35
|
+
Object.defineProperty(exports, "computeStateTreeHash", { enumerable: true, get: function () { return hashes_1.computeStateTreeHash; } });
|
36
|
+
Object.defineProperty(exports, "computeLedgerHash", { enumerable: true, get: function () { return hashes_1.computeLedgerHash; } });
|
37
|
+
Object.defineProperty(exports, "computeEscrowHash", { enumerable: true, get: function () { return hashes_1.computeEscrowHash; } });
|
38
|
+
Object.defineProperty(exports, "computePaymentChannelHash", { enumerable: true, get: function () { return hashes_1.computePaymentChannelHash; } });
|
39
|
+
const generate_address_1 = require("../offline/generate-address");
|
40
|
+
Object.defineProperty(exports, "generateXAddress", { enumerable: true, get: function () { return generate_address_1.generateAddressAPI; } });
|
41
|
+
const generateAddress = (options = {}) => (generate_address_1.generateAddressAPI(Object.assign(Object.assign({}, options), { includeClassicAddress: true })));
|
42
|
+
exports.generateAddress = generateAddress;
|
43
|
+
//# sourceMappingURL=utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/offline/utils.ts"],"names":[],"mappings":";;;;;;AAAA,qCAAuE;AA0DnE,8FA1DK,sBAAa,OA0DL;AACb,8FA3DoB,sBAAa,OA2DpB;AACb,+FA5DmC,uBAAc,OA4DnC;AA3DlB,8DAAkD;AAkC9C,kCAlCG,oBAAuB,CAkCH;AAjC3B,8FAAkE;AA2D9D,kCA3DG,oCAAuB,CA2DH;AA1D3B,kGAAsE;AA2DlE,oCA3DG,sCAAyB,CA2DH;AA1D7B,2CAQwB;AAwBpB,2FAhCK,kBAAU,OAgCL;AACV,2FAhCA,kBAAU,OAgCA;AACV,gGAhCA,uBAAe,OAgCA;AACf,oHAhCA,2CAAmC,OAgCA;AACnC,gGAhCA,uBAAe,OAgCA;AACf,oGAhCA,2BAAmB,OAgCA;AACnB,oGAhCA,2BAAmB,OAgCA;AACnB,8FAhCA,qBAAa,OAgCA;AA9BjB,6CAayB;AAkBrB,6GA9BA,qCAA4B,OA8BA;AAC5B,uGA9BA,+BAAsB,OA8BA;AACtB,oHA9BA,4CAAmC,OA8BA;AACnC,6GA9BA,qCAA4B,OA8BA;AAC5B,gHA9BA,wCAA+B,OA8BA;AAC/B,+FA9BA,uBAAc,OA8BA;AACd,qGA9BA,6BAAoB,OA8BA;AACpB,2GA9BA,mCAA0B,OA8BA;AAC1B,qGA9BA,6BAAoB,OA8BA;AACpB,kGA9BA,0BAAiB,OA8BA;AACjB,kGA9BA,0BAAiB,OA8BA;AACjB,0GA9BA,kCAAyB,OA8BA;AA5B7B,kEAA0G;AA8BhF,iGA9BjB,qCAAkB,OA8Be;AA3B1C,MAAM,eAAe,GAAG,CAAC,UAAkC,EAAE,EAAoB,EAAE,CAAC,CAChF,qCAAkB,iCAAK,OAAO,KAAE,qBAAqB,EAAE,IAAI,IAAE,CAChE,CAAA;AAwBG,0CAAe"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"verify-payment-channel-claim.d.ts","sourceRoot":"","sources":["../../../src/offline/verify-payment-channel-claim.ts"],"names":[],"mappings":"AAIA,iBAAS,yBAAyB,CAChC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAQT;AAED,eAAe,yBAAyB,CAAA"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
const ripple_keypairs_1 = __importDefault(require("ripple-keypairs"));
|
7
|
+
const ripple_binary_codec_1 = __importDefault(require("ripple-binary-codec"));
|
8
|
+
const common_1 = require("../common");
|
9
|
+
function verifyPaymentChannelClaim(channel, amount, signature, publicKey) {
|
10
|
+
common_1.validate.verifyPaymentChannelClaim({ channel, amount, signature, publicKey });
|
11
|
+
const signingData = ripple_binary_codec_1.default.encodeForSigningClaim({
|
12
|
+
channel: channel,
|
13
|
+
amount: common_1.xrpToDrops(amount)
|
14
|
+
});
|
15
|
+
return ripple_keypairs_1.default.verify(signingData, signature, publicKey);
|
16
|
+
}
|
17
|
+
exports.default = verifyPaymentChannelClaim;
|
18
|
+
//# sourceMappingURL=verify-payment-channel-claim.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"verify-payment-channel-claim.js","sourceRoot":"","sources":["../../../src/offline/verify-payment-channel-claim.ts"],"names":[],"mappings":";;;;;AAAA,sEAAsC;AACtC,8EAAwC;AACxC,sCAA8C;AAE9C,SAAS,yBAAyB,CAChC,OAAe,EACf,MAAc,EACd,SAAiB,EACjB,SAAiB;IAEjB,iBAAQ,CAAC,yBAAyB,CAAC,EAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAC,CAAC,CAAA;IAE3E,MAAM,WAAW,GAAG,6BAAM,CAAC,qBAAqB,CAAC;QAC/C,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,mBAAU,CAAC,MAAM,CAAC;KAC3B,CAAC,CAAA;IACF,OAAO,yBAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,CAAA;AAC3D,CAAC;AAED,kBAAe,yBAAyB,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { RippleAPI } from '..';
|
2
|
+
declare function isConnected(this: RippleAPI): boolean;
|
3
|
+
declare function getLedgerVersion(this: RippleAPI): Promise<number>;
|
4
|
+
declare function connect(this: RippleAPI): Promise<void>;
|
5
|
+
declare function disconnect(this: RippleAPI): Promise<void>;
|
6
|
+
declare function formatLedgerClose(ledgerClose: any): object;
|
7
|
+
export { connect, disconnect, isConnected, getLedgerVersion, formatLedgerClose };
|
8
|
+
//# sourceMappingURL=server.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/server/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,iBAAS,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAE7C;AAED,iBAAS,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAE1D;AAED,iBAAe,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAErD;AAED,iBAAe,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAIxD;AAED,iBAAS,iBAAiB,CAAC,WAAW,EAAE,GAAG,GAAG,MAAM,CAWnD;AAED,OAAO,EAAC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,iBAAiB,EAAC,CAAA"}
|
@@ -0,0 +1,66 @@
|
|
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
|
+
exports.formatLedgerClose = exports.getLedgerVersion = exports.isConnected = exports.disconnect = exports.connect = void 0;
|
32
|
+
const common = __importStar(require("../common"));
|
33
|
+
function isConnected() {
|
34
|
+
return this.connection.isConnected();
|
35
|
+
}
|
36
|
+
exports.isConnected = isConnected;
|
37
|
+
function getLedgerVersion() {
|
38
|
+
return this.connection.getLedgerVersion();
|
39
|
+
}
|
40
|
+
exports.getLedgerVersion = getLedgerVersion;
|
41
|
+
function connect() {
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
43
|
+
return this.connection.connect();
|
44
|
+
});
|
45
|
+
}
|
46
|
+
exports.connect = connect;
|
47
|
+
function disconnect() {
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
49
|
+
yield this.connection.disconnect();
|
50
|
+
});
|
51
|
+
}
|
52
|
+
exports.disconnect = disconnect;
|
53
|
+
function formatLedgerClose(ledgerClose) {
|
54
|
+
return {
|
55
|
+
baseFeeXRP: common.dropsToXrp(ledgerClose.fee_base),
|
56
|
+
ledgerHash: ledgerClose.ledger_hash,
|
57
|
+
ledgerVersion: ledgerClose.ledger_index,
|
58
|
+
ledgerTimestamp: common.rippleTimeToISO8601(ledgerClose.ledger_time),
|
59
|
+
reserveBaseXRP: common.dropsToXrp(ledgerClose.reserve_base),
|
60
|
+
reserveIncrementXRP: common.dropsToXrp(ledgerClose.reserve_inc),
|
61
|
+
transactionCount: ledgerClose.txn_count,
|
62
|
+
validatedLedgerVersions: ledgerClose.validated_ledgers
|
63
|
+
};
|
64
|
+
}
|
65
|
+
exports.formatLedgerClose = formatLedgerClose;
|
66
|
+
//# sourceMappingURL=server.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/server/server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAmC;AAGnC,SAAS,WAAW;IAClB,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA;AACtC,CAAC;AA6B4B,kCAAW;AA3BxC,SAAS,gBAAgB;IACvB,OAAO,IAAI,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA;AAC3C,CAAC;AAyByC,4CAAgB;AAvB1D,SAAe,OAAO;;QACpB,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAA;IAClC,CAAC;CAAA;AAqBO,0BAAO;AAnBf,SAAe,UAAU;;QAGvB,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAA;IACpC,CAAC;CAAA;AAegB,gCAAU;AAb3B,SAAS,iBAAiB,CAAC,WAAgB;IACzC,OAAO;QACL,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC;QACnD,UAAU,EAAE,WAAW,CAAC,WAAW;QACnC,aAAa,EAAE,WAAW,CAAC,YAAY;QACvC,eAAe,EAAE,MAAM,CAAC,mBAAmB,CAAC,WAAW,CAAC,WAAW,CAAC;QACpE,cAAc,EAAE,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC;QAC3D,mBAAmB,EAAE,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC;QAC/D,gBAAgB,EAAE,WAAW,CAAC,SAAS;QACvC,uBAAuB,EAAE,WAAW,CAAC,iBAAiB;KACvD,CAAA;AACH,CAAC;AAE2D,8CAAiB"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { Instructions, Prepare } from './types';
|
2
|
+
import { RippleAPI } from '..';
|
3
|
+
export declare type CheckCancelParameters = {
|
4
|
+
checkID: string;
|
5
|
+
};
|
6
|
+
declare function prepareCheckCancel(this: RippleAPI, address: string, checkCancel: CheckCancelParameters, instructions?: Instructions): Promise<Prepare>;
|
7
|
+
export default prepareCheckCancel;
|
8
|
+
//# sourceMappingURL=check-cancel.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"check-cancel.d.ts","sourceRoot":"","sources":["../../../src/transaction/check-cancel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,oBAAY,qBAAqB,GAAG;IAClC,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAeD,iBAAS,kBAAkB,CACzB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,qBAAqB,EAClC,YAAY,GAAE,YAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED,eAAe,kBAAkB,CAAA"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const utils_1 = require("./utils");
|
4
|
+
const common_1 = require("../common");
|
5
|
+
function createCheckCancelTransaction(account, cancel) {
|
6
|
+
const txJSON = {
|
7
|
+
Account: account,
|
8
|
+
TransactionType: 'CheckCancel',
|
9
|
+
CheckID: cancel.checkID
|
10
|
+
};
|
11
|
+
return txJSON;
|
12
|
+
}
|
13
|
+
function prepareCheckCancel(address, checkCancel, instructions = {}) {
|
14
|
+
try {
|
15
|
+
common_1.validate.prepareCheckCancel({ address, checkCancel, instructions });
|
16
|
+
const txJSON = createCheckCancelTransaction(address, checkCancel);
|
17
|
+
return utils_1.prepareTransaction(txJSON, this, instructions);
|
18
|
+
}
|
19
|
+
catch (e) {
|
20
|
+
return Promise.reject(e);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
exports.default = prepareCheckCancel;
|
24
|
+
//# sourceMappingURL=check-cancel.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"check-cancel.js","sourceRoot":"","sources":["../../../src/transaction/check-cancel.ts"],"names":[],"mappings":";;AAAA,mCAA0C;AAC1C,sCAAkC;AAQlC,SAAS,4BAA4B,CACnC,OAAe,EACf,MAA6B;IAE7B,MAAM,MAAM,GAAG;QACb,OAAO,EAAE,OAAO;QAChB,eAAe,EAAE,aAAa;QAC9B,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,kBAAkB,CAEzB,OAAe,EACf,WAAkC,EAClC,eAA6B,EAAE;IAE/B,IAAI;QACF,iBAAQ,CAAC,kBAAkB,CAAC,EAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAC,CAAC,CAAA;QACjE,MAAM,MAAM,GAAG,4BAA4B,CAAC,OAAO,EAAE,WAAW,CAAC,CAAA;QACjE,OAAO,0BAAkB,CAAC,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,CAAA;KACtD;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;KACzB;AACH,CAAC;AAED,kBAAe,kBAAkB,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Instructions, Prepare } from './types';
|
2
|
+
import { Amount } from '../common/types/objects';
|
3
|
+
import { RippleAPI } from '..';
|
4
|
+
export declare type CheckCashParameters = {
|
5
|
+
checkID: string;
|
6
|
+
amount?: Amount;
|
7
|
+
deliverMin?: Amount;
|
8
|
+
};
|
9
|
+
declare function prepareCheckCash(this: RippleAPI, address: string, checkCash: CheckCashParameters, instructions?: Instructions): Promise<Prepare>;
|
10
|
+
export default prepareCheckCash;
|
11
|
+
//# sourceMappingURL=check-cash.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"check-cash.d.ts","sourceRoot":"","sources":["../../../src/transaction/check-cash.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,YAAY,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAA;AAC9C,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,oBAAY,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AA8BD,iBAAS,gBAAgB,CACvB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,mBAAmB,EAC9B,YAAY,GAAE,YAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED,eAAe,gBAAgB,CAAA"}
|
@@ -0,0 +1,55 @@
|
|
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 ValidationError = utils.common.errors.ValidationError;
|
24
|
+
const toRippledAmount = utils.common.toRippledAmount;
|
25
|
+
const common_1 = require("../common");
|
26
|
+
function createCheckCashTransaction(account, checkCash) {
|
27
|
+
if (checkCash.amount && checkCash.deliverMin) {
|
28
|
+
throw new ValidationError('"amount" and "deliverMin" properties on ' +
|
29
|
+
'CheckCash are mutually exclusive');
|
30
|
+
}
|
31
|
+
const txJSON = {
|
32
|
+
Account: account,
|
33
|
+
TransactionType: 'CheckCash',
|
34
|
+
CheckID: checkCash.checkID
|
35
|
+
};
|
36
|
+
if (checkCash.amount != null) {
|
37
|
+
txJSON.Amount = toRippledAmount(checkCash.amount);
|
38
|
+
}
|
39
|
+
if (checkCash.deliverMin != null) {
|
40
|
+
txJSON.DeliverMin = toRippledAmount(checkCash.deliverMin);
|
41
|
+
}
|
42
|
+
return txJSON;
|
43
|
+
}
|
44
|
+
function prepareCheckCash(address, checkCash, instructions = {}) {
|
45
|
+
try {
|
46
|
+
common_1.validate.prepareCheckCash({ address, checkCash, instructions });
|
47
|
+
const txJSON = createCheckCashTransaction(address, checkCash);
|
48
|
+
return utils.prepareTransaction(txJSON, this, instructions);
|
49
|
+
}
|
50
|
+
catch (e) {
|
51
|
+
return Promise.reject(e);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
exports.default = prepareCheckCash;
|
55
|
+
//# sourceMappingURL=check-cash.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"check-cash.js","sourceRoot":"","sources":["../../../src/transaction/check-cash.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAA;AAC3D,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,eAAe,CAAA;AACpD,sCAAkC;AAWlC,SAAS,0BAA0B,CACjC,OAAe,EACf,SAA8B;IAE9B,IAAI,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,UAAU,EAAE;QAC5C,MAAM,IAAI,eAAe,CACvB,0CAA0C;YACxC,kCAAkC,CACrC,CAAA;KACF;IAED,MAAM,MAAM,GAAQ;QAClB,OAAO,EAAE,OAAO;QAChB,eAAe,EAAE,WAAW;QAC5B,OAAO,EAAE,SAAS,CAAC,OAAO;KAC3B,CAAA;IAED,IAAI,SAAS,CAAC,MAAM,IAAI,IAAI,EAAE;QAC5B,MAAM,CAAC,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;KAClD;IAED,IAAI,SAAS,CAAC,UAAU,IAAI,IAAI,EAAE;QAChC,MAAM,CAAC,UAAU,GAAG,eAAe,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;KAC1D;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,gBAAgB,CAEvB,OAAe,EACf,SAA8B,EAC9B,eAA6B,EAAE;IAE/B,IAAI;QACF,iBAAQ,CAAC,gBAAgB,CAAC,EAAC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAC,CAAC,CAAA;QAC7D,MAAM,MAAM,GAAG,0BAA0B,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;QAC7D,OAAO,KAAK,CAAC,kBAAkB,CAAC,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,CAAA;KAC5D;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;KACzB;AACH,CAAC;AAED,kBAAe,gBAAgB,CAAA"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Instructions, Prepare } from './types';
|
2
|
+
import { Amount } from '../common/types/objects';
|
3
|
+
import { RippleAPI } from '..';
|
4
|
+
export declare type CheckCreateParameters = {
|
5
|
+
destination: string;
|
6
|
+
sendMax: Amount;
|
7
|
+
destinationTag?: number;
|
8
|
+
expiration?: string;
|
9
|
+
invoiceID?: string;
|
10
|
+
};
|
11
|
+
declare function prepareCheckCreate(this: RippleAPI, address: string, checkCreate: CheckCreateParameters, instructions?: Instructions): Promise<Prepare>;
|
12
|
+
export default prepareCheckCreate;
|
13
|
+
//# sourceMappingURL=check-create.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"check-create.d.ts","sourceRoot":"","sources":["../../../src/transaction/check-create.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,YAAY,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAA;AAC9C,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,oBAAY,qBAAqB,GAAG;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AA4BD,iBAAS,kBAAkB,CACzB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,qBAAqB,EAClC,YAAY,GAAE,YAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED,eAAe,kBAAkB,CAAA"}
|
@@ -0,0 +1,54 @@
|
|
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 toRippledAmount = utils.common.toRippledAmount;
|
24
|
+
const common_1 = require("../common");
|
25
|
+
function createCheckCreateTransaction(account, check) {
|
26
|
+
const txJSON = {
|
27
|
+
Account: account,
|
28
|
+
TransactionType: 'CheckCreate',
|
29
|
+
Destination: check.destination,
|
30
|
+
SendMax: toRippledAmount(check.sendMax)
|
31
|
+
};
|
32
|
+
if (check.destinationTag != null) {
|
33
|
+
txJSON.DestinationTag = check.destinationTag;
|
34
|
+
}
|
35
|
+
if (check.expiration != null) {
|
36
|
+
txJSON.Expiration = common_1.iso8601ToRippleTime(check.expiration);
|
37
|
+
}
|
38
|
+
if (check.invoiceID != null) {
|
39
|
+
txJSON.InvoiceID = check.invoiceID;
|
40
|
+
}
|
41
|
+
return txJSON;
|
42
|
+
}
|
43
|
+
function prepareCheckCreate(address, checkCreate, instructions = {}) {
|
44
|
+
try {
|
45
|
+
common_1.validate.prepareCheckCreate({ address, checkCreate, instructions });
|
46
|
+
const txJSON = createCheckCreateTransaction(address, checkCreate);
|
47
|
+
return utils.prepareTransaction(txJSON, this, instructions);
|
48
|
+
}
|
49
|
+
catch (e) {
|
50
|
+
return Promise.reject(e);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
exports.default = prepareCheckCreate;
|
54
|
+
//# sourceMappingURL=check-create.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"check-create.js","sourceRoot":"","sources":["../../../src/transaction/check-create.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,eAAe,CAAA;AACpD,sCAAuD;AAavD,SAAS,4BAA4B,CACnC,OAAe,EACf,KAA4B;IAE5B,MAAM,MAAM,GAAQ;QAClB,OAAO,EAAE,OAAO;QAChB,eAAe,EAAE,aAAa;QAC9B,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC;KACxC,CAAA;IAED,IAAI,KAAK,CAAC,cAAc,IAAI,IAAI,EAAE;QAChC,MAAM,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAA;KAC7C;IAED,IAAI,KAAK,CAAC,UAAU,IAAI,IAAI,EAAE;QAC5B,MAAM,CAAC,UAAU,GAAG,4BAAmB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;KAC1D;IAED,IAAI,KAAK,CAAC,SAAS,IAAI,IAAI,EAAE;QAC3B,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;KACnC;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,kBAAkB,CAEzB,OAAe,EACf,WAAkC,EAClC,eAA6B,EAAE;IAE/B,IAAI;QACF,iBAAQ,CAAC,kBAAkB,CAAC,EAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAC,CAAC,CAAA;QACjE,MAAM,MAAM,GAAG,4BAA4B,CAAC,OAAO,EAAE,WAAW,CAAC,CAAA;QACjE,OAAO,KAAK,CAAC,kBAAkB,CAAC,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,CAAA;KAC5D;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;KACzB;AACH,CAAC;AAED,kBAAe,kBAAkB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"combine.d.ts","sourceRoot":"","sources":["../../../src/transaction/combine.ts"],"names":[],"mappings":"AAoDA,iBAAS,OAAO,CAAC,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAW1D;AAED,eAAe,OAAO,CAAA"}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
11
|
+
}) : function(o, v) {
|
12
|
+
o["default"] = v;
|
13
|
+
});
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
15
|
+
if (mod && mod.__esModule) return mod;
|
16
|
+
var result = {};
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
18
|
+
__setModuleDefault(result, mod);
|
19
|
+
return result;
|
20
|
+
};
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
23
|
+
};
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
25
|
+
const _ = __importStar(require("lodash"));
|
26
|
+
const ripple_binary_codec_1 = __importDefault(require("ripple-binary-codec"));
|
27
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
28
|
+
const errors_1 = require("../common/errors");
|
29
|
+
const ripple_address_codec_1 = require("ripple-address-codec");
|
30
|
+
const common_1 = require("../common");
|
31
|
+
const hashes_1 = require("../common/hashes");
|
32
|
+
function validateTransactionEquivalence(transactions) {
|
33
|
+
const exampleTransaction = JSON.stringify(Object.assign(Object.assign({}, transactions[0]), { Signers: null }));
|
34
|
+
if (transactions.slice(1).some(tx => JSON.stringify(Object.assign(Object.assign({}, tx), { Signers: null })) !== exampleTransaction)) {
|
35
|
+
throw new errors_1.ValidationError('txJSON is not the same for all signedTransactions');
|
36
|
+
}
|
37
|
+
}
|
38
|
+
function addressToBigNumber(address) {
|
39
|
+
const hex = Buffer.from(ripple_address_codec_1.decodeAccountID(address)).toString('hex');
|
40
|
+
return new bignumber_js_1.default(hex, 16);
|
41
|
+
}
|
42
|
+
function compareSigners(a, b) {
|
43
|
+
return addressToBigNumber(a.Signer.Account).comparedTo(addressToBigNumber(b.Signer.Account));
|
44
|
+
}
|
45
|
+
function getTransactionWithAllSigners(transactions) {
|
46
|
+
const sortedSigners = _.flatMap(transactions, tx => tx.Signers)
|
47
|
+
.filter(signer => signer)
|
48
|
+
.sort(compareSigners);
|
49
|
+
return Object.assign(Object.assign({}, transactions[0]), { Signers: sortedSigners });
|
50
|
+
}
|
51
|
+
function combine(signedTransactions) {
|
52
|
+
common_1.validate.combine({ signedTransactions });
|
53
|
+
const transactions = signedTransactions.map(ripple_binary_codec_1.default.decode);
|
54
|
+
validateTransactionEquivalence(transactions);
|
55
|
+
const signedTransaction = ripple_binary_codec_1.default.encode(getTransactionWithAllSigners(transactions));
|
56
|
+
return {
|
57
|
+
signedTransaction: signedTransaction,
|
58
|
+
id: hashes_1.computeBinaryTransactionHash(signedTransaction)
|
59
|
+
};
|
60
|
+
}
|
61
|
+
exports.default = combine;
|
62
|
+
//# sourceMappingURL=combine.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"combine.js","sourceRoot":"","sources":["../../../src/transaction/combine.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA2B;AAC3B,8EAAwC;AACxC,gEAAoC;AACpC,6CAAgD;AAChD,+DAAoD;AACpD,sCAAkC;AAClC,6CAA6D;AAM5D,SAAS,8BAA8B,CAAC,YAA+B;IACtE,MAAM,kBAAkB,GAAG,IAAI,CAAC,SAAS,iCAAK,YAAY,CAAC,CAAC,CAAC,KAAE,OAAO,EAAE,IAAI,IAAE,CAAA;IAC9E,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,iCAAK,EAAE,KAAE,OAAO,EAAE,IAAI,IAAE,KAAK,kBAAkB,CAAC,EAAE;QACnG,MAAM,IAAI,wBAAe,CAAC,mDAAmD,CAAC,CAAA;KAC/E;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAO;IACjC,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,sCAAe,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IACjE,OAAO,IAAI,sBAAS,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AAC/B,CAAC;AAQD,SAAS,cAAc,CAAC,CAAC,EAAE,CAAC;IAC1B,OAAO,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,CACpD,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CACrC,CAAA;AACH,CAAC;AAED,SAAS,4BAA4B,CAAC,YAA+B;IAEnE,MAAM,aAAa,GAAG,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC;SAC5D,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC;SACxB,IAAI,CAAC,cAAc,CAAC,CAAA;IAEvB,uCAAW,YAAY,CAAC,CAAC,CAAC,KAAE,OAAO,EAAE,aAAa,IAAC;AACrD,CAAC;AASD,SAAS,OAAO,CAAC,kBAAiC;IAChD,iBAAQ,CAAC,OAAO,CAAC,EAAC,kBAAkB,EAAC,CAAC,CAAA;IAEtC,MAAM,YAAY,GAAiB,kBAAkB,CAAC,GAAG,CAAC,6BAAM,CAAC,MAAM,CAAC,CAAC;IACzE,8BAA8B,CAAC,YAAY,CAAC,CAAA;IAE5C,MAAM,iBAAiB,GAAG,6BAAM,CAAC,MAAM,CAAC,4BAA4B,CAAC,YAAY,CAAC,CAAC,CAAA;IACnF,OAAO;QACL,iBAAiB,EAAE,iBAAiB;QACpC,EAAE,EAAE,qCAA4B,CAAC,iBAAiB,CAAC;KACpD,CAAA;AACH,CAAC;AAED,kBAAe,OAAO,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Instructions, Prepare } from './types';
|
2
|
+
import { Memo } from '../common/types/objects';
|
3
|
+
import { RippleAPI } from '..';
|
4
|
+
export declare type EscrowCancellation = {
|
5
|
+
owner: string;
|
6
|
+
escrowSequence: number;
|
7
|
+
memos?: Array<Memo>;
|
8
|
+
};
|
9
|
+
declare function prepareEscrowCancellation(this: RippleAPI, address: string, escrowCancellation: EscrowCancellation, instructions?: Instructions): Promise<Prepare>;
|
10
|
+
export default prepareEscrowCancellation;
|
11
|
+
//# sourceMappingURL=escrow-cancellation.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"escrow-cancellation.d.ts","sourceRoot":"","sources":["../../../src/transaction/escrow-cancellation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAC,IAAI,EAAC,MAAM,yBAAyB,CAAA;AAC5C,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,oBAAY,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,MAAM,CAAA;IAItB,KAAK,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;CACpB,CAAA;AAkBD,iBAAS,yBAAyB,CAChC,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,GAAE,YAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAWlB;AAED,eAAe,yBAAyB,CAAA"}
|
@@ -0,0 +1,46 @@
|
|
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 validate = utils.common.validate;
|
24
|
+
function createEscrowCancellationTransaction(account, payment) {
|
25
|
+
const txJSON = {
|
26
|
+
TransactionType: 'EscrowCancel',
|
27
|
+
Account: account,
|
28
|
+
Owner: payment.owner,
|
29
|
+
OfferSequence: payment.escrowSequence
|
30
|
+
};
|
31
|
+
if (payment.memos != null) {
|
32
|
+
txJSON.Memos = payment.memos.map(utils.convertMemo);
|
33
|
+
}
|
34
|
+
return txJSON;
|
35
|
+
}
|
36
|
+
function prepareEscrowCancellation(address, escrowCancellation, instructions = {}) {
|
37
|
+
validate.prepareEscrowCancellation({
|
38
|
+
address,
|
39
|
+
escrowCancellation,
|
40
|
+
instructions
|
41
|
+
});
|
42
|
+
const txJSON = createEscrowCancellationTransaction(address, escrowCancellation);
|
43
|
+
return utils.prepareTransaction(txJSON, this, instructions);
|
44
|
+
}
|
45
|
+
exports.default = prepareEscrowCancellation;
|
46
|
+
//# sourceMappingURL=escrow-cancellation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"escrow-cancellation.js","sourceRoot":"","sources":["../../../src/transaction/escrow-cancellation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAA;AActC,SAAS,mCAAmC,CAC1C,OAAe,EACf,OAA2B;IAE3B,MAAM,MAAM,GAAQ;QAClB,eAAe,EAAE,cAAc;QAC/B,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,aAAa,EAAE,OAAO,CAAC,cAAc;KACtC,CAAA;IACD,IAAI,OAAO,CAAC,KAAK,IAAI,IAAI,EAAE;QACzB,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;KACpD;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,yBAAyB,CAEhC,OAAe,EACf,kBAAsC,EACtC,eAA6B,EAAE;IAE/B,QAAQ,CAAC,yBAAyB,CAAC;QACjC,OAAO;QACP,kBAAkB;QAClB,YAAY;KACb,CAAC,CAAA;IACF,MAAM,MAAM,GAAG,mCAAmC,CAChD,OAAO,EACP,kBAAkB,CACnB,CAAA;IACD,OAAO,KAAK,CAAC,kBAAkB,CAAC,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,CAAA;AAC7D,CAAC;AAED,kBAAe,yBAAyB,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { Instructions, Prepare } from './types';
|
2
|
+
import { Memo } from '../common/types/objects';
|
3
|
+
import { RippleAPI } from '..';
|
4
|
+
export declare type EscrowCreation = {
|
5
|
+
amount: string;
|
6
|
+
destination: string;
|
7
|
+
memos?: Array<Memo>;
|
8
|
+
condition?: string;
|
9
|
+
allowCancelAfter?: string;
|
10
|
+
allowExecuteAfter?: string;
|
11
|
+
sourceTag?: number;
|
12
|
+
destinationTag?: number;
|
13
|
+
};
|
14
|
+
declare function prepareEscrowCreation(this: RippleAPI, address: string, escrowCreation: EscrowCreation, instructions?: Instructions): Promise<Prepare>;
|
15
|
+
export default prepareEscrowCreation;
|
16
|
+
//# sourceMappingURL=escrow-creation.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"escrow-creation.d.ts","sourceRoot":"","sources":["../../../src/transaction/escrow-creation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,YAAY,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAC,IAAI,EAAC,MAAM,yBAAyB,CAAA;AAC5C,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,oBAAY,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AA4CD,iBAAS,qBAAqB,CAC5B,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,cAAc,EAC9B,YAAY,GAAE,YAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED,eAAe,qBAAqB,CAAA"}
|