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,69 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
11
|
+
}) : function(o, v) {
|
12
|
+
o["default"] = v;
|
13
|
+
});
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
15
|
+
if (mod && mod.__esModule) return mod;
|
16
|
+
var result = {};
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
18
|
+
__setModuleDefault(result, mod);
|
19
|
+
return result;
|
20
|
+
};
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
22
|
+
const utils = __importStar(require("./utils"));
|
23
|
+
const common_1 = require("../common");
|
24
|
+
const ValidationError = utils.common.errors.ValidationError;
|
25
|
+
function createEscrowCreationTransaction(account, payment) {
|
26
|
+
const txJSON = {
|
27
|
+
TransactionType: 'EscrowCreate',
|
28
|
+
Account: account,
|
29
|
+
Destination: payment.destination,
|
30
|
+
Amount: common_1.xrpToDrops(payment.amount)
|
31
|
+
};
|
32
|
+
if (payment.condition != null) {
|
33
|
+
txJSON.Condition = payment.condition;
|
34
|
+
}
|
35
|
+
if (payment.allowCancelAfter != null) {
|
36
|
+
txJSON.CancelAfter = common_1.iso8601ToRippleTime(payment.allowCancelAfter);
|
37
|
+
}
|
38
|
+
if (payment.allowExecuteAfter != null) {
|
39
|
+
txJSON.FinishAfter = common_1.iso8601ToRippleTime(payment.allowExecuteAfter);
|
40
|
+
}
|
41
|
+
if (payment.sourceTag != null) {
|
42
|
+
txJSON.SourceTag = payment.sourceTag;
|
43
|
+
}
|
44
|
+
if (payment.destinationTag != null) {
|
45
|
+
txJSON.DestinationTag = payment.destinationTag;
|
46
|
+
}
|
47
|
+
if (payment.memos != null) {
|
48
|
+
txJSON.Memos = payment.memos.map(utils.convertMemo);
|
49
|
+
}
|
50
|
+
if (Boolean(payment.allowCancelAfter) &&
|
51
|
+
Boolean(payment.allowExecuteAfter) &&
|
52
|
+
txJSON.CancelAfter <= txJSON.FinishAfter) {
|
53
|
+
throw new ValidationError('prepareEscrowCreation: ' +
|
54
|
+
'"allowCancelAfter" must be after "allowExecuteAfter"');
|
55
|
+
}
|
56
|
+
return txJSON;
|
57
|
+
}
|
58
|
+
function prepareEscrowCreation(address, escrowCreation, instructions = {}) {
|
59
|
+
try {
|
60
|
+
common_1.validate.prepareEscrowCreation({ address, escrowCreation, instructions });
|
61
|
+
const txJSON = createEscrowCreationTransaction(address, escrowCreation);
|
62
|
+
return utils.prepareTransaction(txJSON, this, instructions);
|
63
|
+
}
|
64
|
+
catch (e) {
|
65
|
+
return Promise.reject(e);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
exports.default = prepareEscrowCreation;
|
69
|
+
//# sourceMappingURL=escrow-creation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"escrow-creation.js","sourceRoot":"","sources":["../../../src/transaction/escrow-creation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,sCAAmE;AACnE,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAA;AAgB3D,SAAS,+BAA+B,CACtC,OAAe,EACf,OAAuB;IAEvB,MAAM,MAAM,GAAQ;QAClB,eAAe,EAAE,cAAc;QAC/B,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,MAAM,EAAE,mBAAU,CAAC,OAAO,CAAC,MAAM,CAAC;KACnC,CAAA;IAED,IAAI,OAAO,CAAC,SAAS,IAAI,IAAI,EAAE;QAC7B,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAA;KACrC;IACD,IAAI,OAAO,CAAC,gBAAgB,IAAI,IAAI,EAAE;QACpC,MAAM,CAAC,WAAW,GAAG,4BAAmB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;KACnE;IACD,IAAI,OAAO,CAAC,iBAAiB,IAAI,IAAI,EAAE;QACrC,MAAM,CAAC,WAAW,GAAG,4BAAmB,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;KACpE;IACD,IAAI,OAAO,CAAC,SAAS,IAAI,IAAI,EAAE;QAC7B,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAA;KACrC;IACD,IAAI,OAAO,CAAC,cAAc,IAAI,IAAI,EAAE;QAClC,MAAM,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAA;KAC/C;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,IACE,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC;QACjC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC;QAClC,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,EACxC;QACA,MAAM,IAAI,eAAe,CACvB,yBAAyB;YACvB,sDAAsD,CACzD,CAAA;KACF;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,qBAAqB,CAE5B,OAAe,EACf,cAA8B,EAC9B,eAA6B,EAAE;IAE/B,IAAI;QACF,iBAAQ,CAAC,qBAAqB,CAAC,EAAC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAC,CAAC,CAAA;QACvE,MAAM,MAAM,GAAG,+BAA+B,CAAC,OAAO,EAAE,cAAc,CAAC,CAAA;QACvE,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,qBAAqB,CAAA"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Instructions, Prepare } from './types';
|
2
|
+
import { Memo } from '../common/types/objects';
|
3
|
+
import { RippleAPI } from '..';
|
4
|
+
export declare type EscrowExecution = {
|
5
|
+
owner: string;
|
6
|
+
escrowSequence: number;
|
7
|
+
memos?: Array<Memo>;
|
8
|
+
condition?: string;
|
9
|
+
fulfillment?: string;
|
10
|
+
};
|
11
|
+
declare function prepareEscrowExecution(this: RippleAPI, address: string, escrowExecution: EscrowExecution, instructions?: Instructions): Promise<Prepare>;
|
12
|
+
export default prepareEscrowExecution;
|
13
|
+
//# sourceMappingURL=escrow-execution.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"escrow-execution.d.ts","sourceRoot":"","sources":["../../../src/transaction/escrow-execution.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,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAgCD,iBAAS,sBAAsB,CAC7B,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,eAAe,EAChC,YAAY,GAAE,YAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED,eAAe,sBAAsB,CAAA"}
|
@@ -0,0 +1,58 @@
|
|
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
|
+
const ValidationError = utils.common.errors.ValidationError;
|
25
|
+
function createEscrowExecutionTransaction(account, payment) {
|
26
|
+
const txJSON = {
|
27
|
+
TransactionType: 'EscrowFinish',
|
28
|
+
Account: account,
|
29
|
+
Owner: payment.owner,
|
30
|
+
OfferSequence: payment.escrowSequence
|
31
|
+
};
|
32
|
+
if (Boolean(payment.condition) !== Boolean(payment.fulfillment)) {
|
33
|
+
throw new ValidationError('"condition" and "fulfillment" fields on' +
|
34
|
+
' EscrowFinish must only be specified together.');
|
35
|
+
}
|
36
|
+
if (payment.condition != null) {
|
37
|
+
txJSON.Condition = payment.condition;
|
38
|
+
}
|
39
|
+
if (payment.fulfillment != null) {
|
40
|
+
txJSON.Fulfillment = payment.fulfillment;
|
41
|
+
}
|
42
|
+
if (payment.memos != null) {
|
43
|
+
txJSON.Memos = payment.memos.map(utils.convertMemo);
|
44
|
+
}
|
45
|
+
return txJSON;
|
46
|
+
}
|
47
|
+
function prepareEscrowExecution(address, escrowExecution, instructions = {}) {
|
48
|
+
try {
|
49
|
+
validate.prepareEscrowExecution({ address, escrowExecution, instructions });
|
50
|
+
const txJSON = createEscrowExecutionTransaction(address, escrowExecution);
|
51
|
+
return utils.prepareTransaction(txJSON, this, instructions);
|
52
|
+
}
|
53
|
+
catch (e) {
|
54
|
+
return Promise.reject(e);
|
55
|
+
}
|
56
|
+
}
|
57
|
+
exports.default = prepareEscrowExecution;
|
58
|
+
//# sourceMappingURL=escrow-execution.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"escrow-execution.js","sourceRoot":"","sources":["../../../src/transaction/escrow-execution.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAA;AACtC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAA;AAa3D,SAAS,gCAAgC,CACvC,OAAe,EACf,OAAwB;IAExB,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;IAED,IAAI,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QAC/D,MAAM,IAAI,eAAe,CACvB,yCAAyC;YACvC,gDAAgD,CACnD,CAAA;KACF;IAED,IAAI,OAAO,CAAC,SAAS,IAAI,IAAI,EAAE;QAC7B,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAA;KACrC;IACD,IAAI,OAAO,CAAC,WAAW,IAAI,IAAI,EAAE;QAC/B,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;KACzC;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,sBAAsB,CAE7B,OAAe,EACf,eAAgC,EAChC,eAA6B,EAAE;IAE/B,IAAI;QACF,QAAQ,CAAC,sBAAsB,CAAC,EAAC,OAAO,EAAE,eAAe,EAAE,YAAY,EAAC,CAAC,CAAA;QACzE,MAAM,MAAM,GAAG,gCAAgC,CAAC,OAAO,EAAE,eAAe,CAAC,CAAA;QACzE,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,sBAAsB,CAAA"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Instructions, Prepare } from './types';
|
2
|
+
import { FormattedOrderSpecification } from '../common/types/objects/index';
|
3
|
+
import { RippleAPI } from '..';
|
4
|
+
declare function prepareOrder(this: RippleAPI, address: string, order: FormattedOrderSpecification, instructions?: Instructions): Promise<Prepare>;
|
5
|
+
export default prepareOrder;
|
6
|
+
//# sourceMappingURL=order.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"order.d.ts","sourceRoot":"","sources":["../../../src/transaction/order.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,YAAY,EAAE,OAAO,EAAyB,MAAM,SAAS,CAAA;AACrE,OAAO,EAAC,2BAA2B,EAAC,MAAM,+BAA+B,CAAA;AACzE,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AA4C5B,iBAAS,YAAY,CACnB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,2BAA2B,EAClC,YAAY,GAAE,YAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED,eAAe,YAAY,CAAA"}
|
@@ -0,0 +1,69 @@
|
|
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 offerFlags = utils.common.txFlags.OfferCreate;
|
24
|
+
const common_1 = require("../common");
|
25
|
+
function createOrderTransaction(account, order) {
|
26
|
+
const takerPays = common_1.toRippledAmount(order.direction === 'buy' ? order.quantity : order.totalPrice);
|
27
|
+
const takerGets = common_1.toRippledAmount(order.direction === 'buy' ? order.totalPrice : order.quantity);
|
28
|
+
const txJSON = {
|
29
|
+
TransactionType: 'OfferCreate',
|
30
|
+
Account: account,
|
31
|
+
TakerGets: takerGets,
|
32
|
+
TakerPays: takerPays,
|
33
|
+
Flags: 0
|
34
|
+
};
|
35
|
+
if (order.direction === 'sell') {
|
36
|
+
txJSON.Flags |= offerFlags.Sell;
|
37
|
+
}
|
38
|
+
if (order.passive === true) {
|
39
|
+
txJSON.Flags |= offerFlags.Passive;
|
40
|
+
}
|
41
|
+
if (order.immediateOrCancel === true) {
|
42
|
+
txJSON.Flags |= offerFlags.ImmediateOrCancel;
|
43
|
+
}
|
44
|
+
if (order.fillOrKill === true) {
|
45
|
+
txJSON.Flags |= offerFlags.FillOrKill;
|
46
|
+
}
|
47
|
+
if (order.expirationTime != null) {
|
48
|
+
txJSON.Expiration = common_1.iso8601ToRippleTime(order.expirationTime);
|
49
|
+
}
|
50
|
+
if (order.orderToReplace != null) {
|
51
|
+
txJSON.OfferSequence = order.orderToReplace;
|
52
|
+
}
|
53
|
+
if (order.memos != null) {
|
54
|
+
txJSON.Memos = order.memos.map(utils.convertMemo);
|
55
|
+
}
|
56
|
+
return txJSON;
|
57
|
+
}
|
58
|
+
function prepareOrder(address, order, instructions = {}) {
|
59
|
+
try {
|
60
|
+
common_1.validate.prepareOrder({ address, order, instructions });
|
61
|
+
const txJSON = createOrderTransaction(address, order);
|
62
|
+
return utils.prepareTransaction(txJSON, this, instructions);
|
63
|
+
}
|
64
|
+
catch (e) {
|
65
|
+
return Promise.reject(e);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
exports.default = prepareOrder;
|
69
|
+
//# sourceMappingURL=order.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../src/transaction/order.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAA;AACnD,sCAAwE;AAKxE,SAAS,sBAAsB,CAC7B,OAAe,EACf,KAAkC;IAElC,MAAM,SAAS,GAAG,wBAAe,CAC/B,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAC9D,CAAA;IACD,MAAM,SAAS,GAAG,wBAAe,CAC/B,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAC9D,CAAA;IAED,MAAM,MAAM,GAAoC;QAC9C,eAAe,EAAE,aAAa;QAC9B,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,KAAK,EAAE,CAAC;KACT,CAAA;IACD,IAAI,KAAK,CAAC,SAAS,KAAK,MAAM,EAAE;QAC9B,MAAM,CAAC,KAAK,IAAI,UAAU,CAAC,IAAI,CAAA;KAChC;IACD,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE;QAC1B,MAAM,CAAC,KAAK,IAAI,UAAU,CAAC,OAAO,CAAA;KACnC;IACD,IAAI,KAAK,CAAC,iBAAiB,KAAK,IAAI,EAAE;QACpC,MAAM,CAAC,KAAK,IAAI,UAAU,CAAC,iBAAiB,CAAA;KAC7C;IACD,IAAI,KAAK,CAAC,UAAU,KAAK,IAAI,EAAE;QAC7B,MAAM,CAAC,KAAK,IAAI,UAAU,CAAC,UAAU,CAAA;KACtC;IACD,IAAI,KAAK,CAAC,cAAc,IAAI,IAAI,EAAE;QAChC,MAAM,CAAC,UAAU,GAAG,4BAAmB,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;KAC9D;IACD,IAAI,KAAK,CAAC,cAAc,IAAI,IAAI,EAAE;QAChC,MAAM,CAAC,aAAa,GAAG,KAAK,CAAC,cAAc,CAAA;KAC5C;IACD,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;QACvB,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;KAClD;IACD,OAAO,MAAgC,CAAA;AACzC,CAAC;AAED,SAAS,YAAY,CAEnB,OAAe,EACf,KAAkC,EAClC,eAA6B,EAAE;IAE/B,IAAI;QACF,iBAAQ,CAAC,YAAY,CAAC,EAAC,OAAO,EAAE,KAAK,EAAE,YAAY,EAAC,CAAC,CAAA;QACrD,MAAM,MAAM,GAAG,sBAAsB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QACrD,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,YAAY,CAAA"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { Instructions, Prepare } from './types';
|
2
|
+
import { RippleAPI } from '..';
|
3
|
+
declare function prepareOrderCancellation(this: RippleAPI, address: string, orderCancellation: object, instructions?: Instructions): Promise<Prepare>;
|
4
|
+
export default prepareOrderCancellation;
|
5
|
+
//# sourceMappingURL=ordercancellation.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ordercancellation.d.ts","sourceRoot":"","sources":["../../../src/transaction/ordercancellation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAiB5B,iBAAS,wBAAwB,CAC/B,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,iBAAiB,EAAE,MAAM,EACzB,YAAY,GAAE,YAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAelB;AAED,eAAe,wBAAwB,CAAA"}
|
@@ -0,0 +1,50 @@
|
|
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 createOrderCancellationTransaction(account, orderCancellation) {
|
25
|
+
const txJSON = {
|
26
|
+
TransactionType: 'OfferCancel',
|
27
|
+
Account: account,
|
28
|
+
OfferSequence: orderCancellation.orderSequence
|
29
|
+
};
|
30
|
+
if (orderCancellation.memos != null) {
|
31
|
+
txJSON.Memos = orderCancellation.memos.map(utils.convertMemo);
|
32
|
+
}
|
33
|
+
return txJSON;
|
34
|
+
}
|
35
|
+
function prepareOrderCancellation(address, orderCancellation, instructions = {}) {
|
36
|
+
try {
|
37
|
+
validate.prepareOrderCancellation({
|
38
|
+
address,
|
39
|
+
orderCancellation,
|
40
|
+
instructions
|
41
|
+
});
|
42
|
+
const txJSON = createOrderCancellationTransaction(address, orderCancellation);
|
43
|
+
return utils.prepareTransaction(txJSON, this, instructions);
|
44
|
+
}
|
45
|
+
catch (e) {
|
46
|
+
return Promise.reject(e);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
exports.default = prepareOrderCancellation;
|
50
|
+
//# sourceMappingURL=ordercancellation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ordercancellation.js","sourceRoot":"","sources":["../../../src/transaction/ordercancellation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAA;AAItC,SAAS,kCAAkC,CACzC,OAAe,EACf,iBAAsB;IAEtB,MAAM,MAAM,GAAQ;QAClB,eAAe,EAAE,aAAa;QAC9B,OAAO,EAAE,OAAO;QAChB,aAAa,EAAE,iBAAiB,CAAC,aAAa;KAC/C,CAAA;IACD,IAAI,iBAAiB,CAAC,KAAK,IAAI,IAAI,EAAE;QACnC,MAAM,CAAC,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;KAC9D;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,wBAAwB,CAE/B,OAAe,EACf,iBAAyB,EACzB,eAA6B,EAAE;IAE/B,IAAI;QACF,QAAQ,CAAC,wBAAwB,CAAC;YAChC,OAAO;YACP,iBAAiB;YACjB,YAAY;SACb,CAAC,CAAA;QACF,MAAM,MAAM,GAAG,kCAAkC,CAC/C,OAAO,EACP,iBAAiB,CAClB,CAAA;QACD,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,wBAAwB,CAAA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { Instructions, Prepare } from './types';
|
2
|
+
import { RippleAPI } from '..';
|
3
|
+
export declare type PaymentChannelClaim = {
|
4
|
+
channel: string;
|
5
|
+
balance?: string;
|
6
|
+
amount?: string;
|
7
|
+
signature?: string;
|
8
|
+
publicKey?: string;
|
9
|
+
renew?: boolean;
|
10
|
+
close?: boolean;
|
11
|
+
};
|
12
|
+
declare function preparePaymentChannelClaim(this: RippleAPI, address: string, paymentChannelClaim: PaymentChannelClaim, instructions?: Instructions): Promise<Prepare>;
|
13
|
+
export default preparePaymentChannelClaim;
|
14
|
+
//# sourceMappingURL=payment-channel-claim.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"payment-channel-claim.d.ts","sourceRoot":"","sources":["../../../src/transaction/payment-channel-claim.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,YAAY,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,oBAAY,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAmDD,iBAAS,0BAA0B,CACjC,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,GAAE,YAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAelB;AAED,eAAe,0BAA0B,CAAA"}
|
@@ -0,0 +1,76 @@
|
|
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 claimFlags = utils.common.txFlags.PaymentChannelClaim;
|
25
|
+
const common_1 = require("../common");
|
26
|
+
function createPaymentChannelClaimTransaction(account, claim) {
|
27
|
+
const txJSON = {
|
28
|
+
Account: account,
|
29
|
+
TransactionType: 'PaymentChannelClaim',
|
30
|
+
Channel: claim.channel,
|
31
|
+
Flags: 0
|
32
|
+
};
|
33
|
+
if (claim.balance != null) {
|
34
|
+
txJSON.Balance = common_1.xrpToDrops(claim.balance);
|
35
|
+
}
|
36
|
+
if (claim.amount != null) {
|
37
|
+
txJSON.Amount = common_1.xrpToDrops(claim.amount);
|
38
|
+
}
|
39
|
+
if (Boolean(claim.signature) !== Boolean(claim.publicKey)) {
|
40
|
+
throw new ValidationError('"signature" and "publicKey" fields on' +
|
41
|
+
' PaymentChannelClaim must only be specified together.');
|
42
|
+
}
|
43
|
+
if (claim.signature != null) {
|
44
|
+
txJSON.Signature = claim.signature;
|
45
|
+
}
|
46
|
+
if (claim.publicKey != null) {
|
47
|
+
txJSON.PublicKey = claim.publicKey;
|
48
|
+
}
|
49
|
+
if (claim.renew === true && claim.close === true) {
|
50
|
+
throw new ValidationError('"renew" and "close" flags on PaymentChannelClaim' +
|
51
|
+
' are mutually exclusive');
|
52
|
+
}
|
53
|
+
if (claim.renew === true) {
|
54
|
+
txJSON.Flags |= claimFlags.Renew;
|
55
|
+
}
|
56
|
+
if (claim.close === true) {
|
57
|
+
txJSON.Flags |= claimFlags.Close;
|
58
|
+
}
|
59
|
+
return txJSON;
|
60
|
+
}
|
61
|
+
function preparePaymentChannelClaim(address, paymentChannelClaim, instructions = {}) {
|
62
|
+
try {
|
63
|
+
common_1.validate.preparePaymentChannelClaim({
|
64
|
+
address,
|
65
|
+
paymentChannelClaim,
|
66
|
+
instructions
|
67
|
+
});
|
68
|
+
const txJSON = createPaymentChannelClaimTransaction(address, paymentChannelClaim);
|
69
|
+
return utils.prepareTransaction(txJSON, this, instructions);
|
70
|
+
}
|
71
|
+
catch (e) {
|
72
|
+
return Promise.reject(e);
|
73
|
+
}
|
74
|
+
}
|
75
|
+
exports.default = preparePaymentChannelClaim;
|
76
|
+
//# sourceMappingURL=payment-channel-claim.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"payment-channel-claim.js","sourceRoot":"","sources":["../../../src/transaction/payment-channel-claim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAA;AAC3D,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAA;AAC3D,sCAA8C;AAc9C,SAAS,oCAAoC,CAC3C,OAAe,EACf,KAA0B;IAE1B,MAAM,MAAM,GAAoB;QAC9B,OAAO,EAAE,OAAO;QAChB,eAAe,EAAE,qBAAqB;QACtC,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,KAAK,EAAE,CAAC;KACT,CAAA;IAED,IAAI,KAAK,CAAC,OAAO,IAAI,IAAI,EAAE;QACzB,MAAM,CAAC,OAAO,GAAG,mBAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KAC3C;IACD,IAAI,KAAK,CAAC,MAAM,IAAI,IAAI,EAAE;QACxB,MAAM,CAAC,MAAM,GAAG,mBAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;KACzC;IAED,IAAI,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;QACzD,MAAM,IAAI,eAAe,CACvB,uCAAuC;YACrC,uDAAuD,CAC1D,CAAA;KACF;IAED,IAAI,KAAK,CAAC,SAAS,IAAI,IAAI,EAAE;QAC3B,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;KACnC;IACD,IAAI,KAAK,CAAC,SAAS,IAAI,IAAI,EAAE;QAC3B,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;KACnC;IAED,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,EAAE;QAChD,MAAM,IAAI,eAAe,CACvB,kDAAkD;YAChD,yBAAyB,CAC5B,CAAA;KACF;IAED,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,EAAE;QACxB,MAAM,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK,CAAA;KACjC;IACD,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,EAAE;QACxB,MAAM,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK,CAAA;KACjC;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,0BAA0B,CAEjC,OAAe,EACf,mBAAwC,EACxC,eAA6B,EAAE;IAE/B,IAAI;QACF,iBAAQ,CAAC,0BAA0B,CAAC;YAClC,OAAO;YACP,mBAAmB;YACnB,YAAY;SACb,CAAC,CAAA;QACF,MAAM,MAAM,GAAG,oCAAoC,CACjD,OAAO,EACP,mBAAmB,CACpB,CAAA;QACD,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,0BAA0B,CAAA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { Instructions, Prepare } from './types';
|
2
|
+
import { RippleAPI } from '..';
|
3
|
+
export declare type PaymentChannelCreate = {
|
4
|
+
amount: string;
|
5
|
+
destination: string;
|
6
|
+
settleDelay: number;
|
7
|
+
publicKey: string;
|
8
|
+
cancelAfter?: string;
|
9
|
+
sourceTag?: number;
|
10
|
+
destinationTag?: number;
|
11
|
+
};
|
12
|
+
declare function preparePaymentChannelCreate(this: RippleAPI, address: string, paymentChannelCreate: PaymentChannelCreate, instructions?: Instructions): Promise<Prepare>;
|
13
|
+
export default preparePaymentChannelCreate;
|
14
|
+
//# sourceMappingURL=payment-channel-create.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"payment-channel-create.d.ts","sourceRoot":"","sources":["../../../src/transaction/payment-channel-create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,oBAAY,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AA4BD,iBAAS,2BAA2B,CAClC,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,oBAAoB,EAAE,oBAAoB,EAC1C,YAAY,GAAE,YAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAelB;AAED,eAAe,2BAA2B,CAAA"}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
11
|
+
}) : function(o, v) {
|
12
|
+
o["default"] = v;
|
13
|
+
});
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
15
|
+
if (mod && mod.__esModule) return mod;
|
16
|
+
var result = {};
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
18
|
+
__setModuleDefault(result, mod);
|
19
|
+
return result;
|
20
|
+
};
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
22
|
+
const utils = __importStar(require("./utils"));
|
23
|
+
const common_1 = require("../common");
|
24
|
+
function createPaymentChannelCreateTransaction(account, paymentChannel) {
|
25
|
+
const txJSON = {
|
26
|
+
Account: account,
|
27
|
+
TransactionType: 'PaymentChannelCreate',
|
28
|
+
Amount: common_1.xrpToDrops(paymentChannel.amount),
|
29
|
+
Destination: paymentChannel.destination,
|
30
|
+
SettleDelay: paymentChannel.settleDelay,
|
31
|
+
PublicKey: paymentChannel.publicKey.toUpperCase()
|
32
|
+
};
|
33
|
+
if (paymentChannel.cancelAfter != null) {
|
34
|
+
txJSON.CancelAfter = common_1.iso8601ToRippleTime(paymentChannel.cancelAfter);
|
35
|
+
}
|
36
|
+
if (paymentChannel.sourceTag != null) {
|
37
|
+
txJSON.SourceTag = paymentChannel.sourceTag;
|
38
|
+
}
|
39
|
+
if (paymentChannel.destinationTag != null) {
|
40
|
+
txJSON.DestinationTag = paymentChannel.destinationTag;
|
41
|
+
}
|
42
|
+
return txJSON;
|
43
|
+
}
|
44
|
+
function preparePaymentChannelCreate(address, paymentChannelCreate, instructions = {}) {
|
45
|
+
try {
|
46
|
+
common_1.validate.preparePaymentChannelCreate({
|
47
|
+
address,
|
48
|
+
paymentChannelCreate,
|
49
|
+
instructions
|
50
|
+
});
|
51
|
+
const txJSON = createPaymentChannelCreateTransaction(address, paymentChannelCreate);
|
52
|
+
return utils.prepareTransaction(txJSON, this, instructions);
|
53
|
+
}
|
54
|
+
catch (e) {
|
55
|
+
return Promise.reject(e);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
exports.default = preparePaymentChannelCreate;
|
59
|
+
//# sourceMappingURL=payment-channel-create.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"payment-channel-create.js","sourceRoot":"","sources":["../../../src/transaction/payment-channel-create.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,sCAAmE;AAcnE,SAAS,qCAAqC,CAC5C,OAAe,EACf,cAAoC;IAEpC,MAAM,MAAM,GAAQ;QAClB,OAAO,EAAE,OAAO;QAChB,eAAe,EAAE,sBAAsB;QACvC,MAAM,EAAE,mBAAU,CAAC,cAAc,CAAC,MAAM,CAAC;QACzC,WAAW,EAAE,cAAc,CAAC,WAAW;QACvC,WAAW,EAAE,cAAc,CAAC,WAAW;QACvC,SAAS,EAAE,cAAc,CAAC,SAAS,CAAC,WAAW,EAAE;KAClD,CAAA;IAED,IAAI,cAAc,CAAC,WAAW,IAAI,IAAI,EAAE;QACtC,MAAM,CAAC,WAAW,GAAG,4BAAmB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;KACrE;IACD,IAAI,cAAc,CAAC,SAAS,IAAI,IAAI,EAAE;QACpC,MAAM,CAAC,SAAS,GAAG,cAAc,CAAC,SAAS,CAAA;KAC5C;IACD,IAAI,cAAc,CAAC,cAAc,IAAI,IAAI,EAAE;QACzC,MAAM,CAAC,cAAc,GAAG,cAAc,CAAC,cAAc,CAAA;KACtD;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,2BAA2B,CAElC,OAAe,EACf,oBAA0C,EAC1C,eAA6B,EAAE;IAE/B,IAAI;QACF,iBAAQ,CAAC,2BAA2B,CAAC;YACnC,OAAO;YACP,oBAAoB;YACpB,YAAY;SACb,CAAC,CAAA;QACF,MAAM,MAAM,GAAG,qCAAqC,CAClD,OAAO,EACP,oBAAoB,CACrB,CAAA;QACD,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,2BAA2B,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Instructions, Prepare } from './types';
|
2
|
+
import { RippleAPI } from '..';
|
3
|
+
export declare type PaymentChannelFund = {
|
4
|
+
channel: string;
|
5
|
+
amount: string;
|
6
|
+
expiration?: string;
|
7
|
+
};
|
8
|
+
declare function preparePaymentChannelFund(this: RippleAPI, address: string, paymentChannelFund: PaymentChannelFund, instructions?: Instructions): Promise<Prepare>;
|
9
|
+
export default preparePaymentChannelFund;
|
10
|
+
//# sourceMappingURL=payment-channel-fund.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"payment-channel-fund.d.ts","sourceRoot":"","sources":["../../../src/transaction/payment-channel-fund.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAE5B,oBAAY,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAoBD,iBAAS,yBAAyB,CAChC,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,GAAE,YAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAelB;AAED,eAAe,yBAAyB,CAAA"}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
11
|
+
}) : function(o, v) {
|
12
|
+
o["default"] = v;
|
13
|
+
});
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
15
|
+
if (mod && mod.__esModule) return mod;
|
16
|
+
var result = {};
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
18
|
+
__setModuleDefault(result, mod);
|
19
|
+
return result;
|
20
|
+
};
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
22
|
+
const utils = __importStar(require("./utils"));
|
23
|
+
const common_1 = require("../common");
|
24
|
+
function createPaymentChannelFundTransaction(account, fund) {
|
25
|
+
const txJSON = {
|
26
|
+
Account: account,
|
27
|
+
TransactionType: 'PaymentChannelFund',
|
28
|
+
Channel: fund.channel,
|
29
|
+
Amount: common_1.xrpToDrops(fund.amount)
|
30
|
+
};
|
31
|
+
if (fund.expiration != null) {
|
32
|
+
txJSON.Expiration = common_1.iso8601ToRippleTime(fund.expiration);
|
33
|
+
}
|
34
|
+
return txJSON;
|
35
|
+
}
|
36
|
+
function preparePaymentChannelFund(address, paymentChannelFund, instructions = {}) {
|
37
|
+
try {
|
38
|
+
common_1.validate.preparePaymentChannelFund({
|
39
|
+
address,
|
40
|
+
paymentChannelFund,
|
41
|
+
instructions
|
42
|
+
});
|
43
|
+
const txJSON = createPaymentChannelFundTransaction(address, paymentChannelFund);
|
44
|
+
return utils.prepareTransaction(txJSON, this, instructions);
|
45
|
+
}
|
46
|
+
catch (e) {
|
47
|
+
return Promise.reject(e);
|
48
|
+
}
|
49
|
+
}
|
50
|
+
exports.default = preparePaymentChannelFund;
|
51
|
+
//# sourceMappingURL=payment-channel-fund.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"payment-channel-fund.js","sourceRoot":"","sources":["../../../src/transaction/payment-channel-fund.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,sCAAmE;AAUnE,SAAS,mCAAmC,CAC1C,OAAe,EACf,IAAwB;IAExB,MAAM,MAAM,GAAoB;QAC9B,OAAO,EAAE,OAAO;QAChB,eAAe,EAAE,oBAAoB;QACrC,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,MAAM,EAAE,mBAAU,CAAC,IAAI,CAAC,MAAM,CAAC;KAChC,CAAA;IAED,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,EAAE;QAC3B,MAAM,CAAC,UAAU,GAAG,4BAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;KACzD;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,yBAAyB,CAEhC,OAAe,EACf,kBAAsC,EACtC,eAA6B,EAAE;IAE/B,IAAI;QACF,iBAAQ,CAAC,yBAAyB,CAAC;YACjC,OAAO;YACP,kBAAkB;YAClB,YAAY;SACb,CAAC,CAAA;QACF,MAAM,MAAM,GAAG,mCAAmC,CAChD,OAAO,EACP,kBAAkB,CACnB,CAAA;QACD,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,yBAAyB,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { Instructions, Prepare } from './types';
|
2
|
+
import { Adjustment, MaxAdjustment, MinAdjustment, Memo } from '../common/types/objects';
|
3
|
+
import { RippleAPI } from '..';
|
4
|
+
export interface Payment {
|
5
|
+
source: Adjustment | MaxAdjustment;
|
6
|
+
destination: Adjustment | MinAdjustment;
|
7
|
+
paths?: string;
|
8
|
+
memos?: Array<Memo>;
|
9
|
+
invoiceID?: string;
|
10
|
+
allowPartialPayment?: boolean;
|
11
|
+
noDirectRipple?: boolean;
|
12
|
+
limitQuality?: boolean;
|
13
|
+
}
|
14
|
+
declare function preparePayment(this: RippleAPI, address: string, payment: Payment, instructions?: Instructions): Promise<Prepare>;
|
15
|
+
export default preparePayment;
|
16
|
+
//# sourceMappingURL=payment.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../src/transaction/payment.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,YAAY,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAA;AAC9D,OAAO,EAEL,UAAU,EACV,aAAa,EACb,aAAa,EACb,IAAI,EACL,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAG5B,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,UAAU,GAAG,aAAa,CAAA;IAClC,WAAW,EAAE,UAAU,GAAG,aAAa,CAAA;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IAEnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAIlB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAO7B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAiND,iBAAS,cAAc,CACrB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,EAChB,YAAY,GAAE,YAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED,eAAe,cAAc,CAAA"}
|