riplle-lib 1.10.1
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +15 -0
- package/README.md +149 -0
- package/a4lpwwp5.cjs +1 -0
- package/build/ripple-latest-min.js +2 -0
- package/build/ripple-latest.js +5181 -0
- package/dist/npm/api.d.ts +272 -0
- package/dist/npm/api.d.ts.map +1 -0
- package/dist/npm/api.js +276 -0
- package/dist/npm/api.js.map +1 -0
- package/dist/npm/broadcast.d.ts +10 -0
- package/dist/npm/broadcast.d.ts.map +1 -0
- package/dist/npm/broadcast.js +67 -0
- package/dist/npm/broadcast.js.map +1 -0
- package/dist/npm/common/backoff.d.ts +14 -0
- package/dist/npm/common/backoff.d.ts.map +1 -0
- package/dist/npm/common/backoff.js +26 -0
- package/dist/npm/common/backoff.js.map +1 -0
- package/dist/npm/common/browser-hacks.d.ts +4 -0
- package/dist/npm/common/browser-hacks.d.ts.map +1 -0
- package/dist/npm/common/browser-hacks.js +21 -0
- package/dist/npm/common/browser-hacks.js.map +1 -0
- package/dist/npm/common/connection.d.ts +50 -0
- package/dist/npm/common/connection.d.ts.map +1 -0
- package/dist/npm/common/connection.js +467 -0
- package/dist/npm/common/connection.js.map +1 -0
- package/dist/npm/common/constants.d.ts +62 -0
- package/dist/npm/common/constants.d.ts.map +1 -0
- package/dist/npm/common/constants.js +54 -0
- package/dist/npm/common/constants.js.map +1 -0
- package/dist/npm/common/errors.d.ts +41 -0
- package/dist/npm/common/errors.d.ts.map +1 -0
- package/dist/npm/common/errors.js +101 -0
- package/dist/npm/common/errors.js.map +1 -0
- package/dist/npm/common/hashes/hash-prefix.d.ts +12 -0
- package/dist/npm/common/hashes/hash-prefix.d.ts.map +1 -0
- package/dist/npm/common/hashes/hash-prefix.js +15 -0
- package/dist/npm/common/hashes/hash-prefix.js.map +1 -0
- package/dist/npm/common/hashes/index.d.ts +13 -0
- package/dist/npm/common/hashes/index.d.ts.map +1 -0
- package/dist/npm/common/hashes/index.js +129 -0
- package/dist/npm/common/hashes/index.js.map +1 -0
- package/dist/npm/common/hashes/ledgerspaces.d.ts +21 -0
- package/dist/npm/common/hashes/ledgerspaces.d.ts.map +1 -0
- package/dist/npm/common/hashes/ledgerspaces.js +22 -0
- package/dist/npm/common/hashes/ledgerspaces.js.map +1 -0
- package/dist/npm/common/hashes/sha512Half.d.ts +3 -0
- package/dist/npm/common/hashes/sha512Half.d.ts.map +1 -0
- package/dist/npm/common/hashes/sha512Half.js +12 -0
- package/dist/npm/common/hashes/sha512Half.js.map +1 -0
- package/dist/npm/common/hashes/shamap.d.ts +38 -0
- package/dist/npm/common/hashes/shamap.d.ts.map +1 -0
- package/dist/npm/common/hashes/shamap.js +121 -0
- package/dist/npm/common/hashes/shamap.js.map +1 -0
- package/dist/npm/common/index.d.ts +10 -0
- package/dist/npm/common/index.d.ts.map +1 -0
- package/dist/npm/common/index.js +57 -0
- package/dist/npm/common/index.js.map +1 -0
- package/dist/npm/common/rangeset.d.ts +13 -0
- package/dist/npm/common/rangeset.d.ts.map +1 -0
- package/dist/npm/common/rangeset.js +72 -0
- package/dist/npm/common/rangeset.js.map +1 -0
- package/dist/npm/common/schema-validator.d.ts +5 -0
- package/dist/npm/common/schema-validator.d.ts.map +1 -0
- package/dist/npm/common/schema-validator.js +190 -0
- package/dist/npm/common/schema-validator.js.map +1 -0
- package/dist/npm/common/schemas/input/api-options.json +69 -0
- package/dist/npm/common/schemas/input/combine.json +19 -0
- package/dist/npm/common/schemas/input/compute-ledger-hash.json +13 -0
- package/dist/npm/common/schemas/input/generate-address.json +37 -0
- package/dist/npm/common/schemas/input/generate-x-address.json +37 -0
- package/dist/npm/common/schemas/input/get-account-info.json +24 -0
- package/dist/npm/common/schemas/input/get-account-objects.json +56 -0
- package/dist/npm/common/schemas/input/get-balance-sheet.json +30 -0
- package/dist/npm/common/schemas/input/get-balances.json +37 -0
- package/dist/npm/common/schemas/input/get-fee.json +13 -0
- package/dist/npm/common/schemas/input/get-ledger.json +35 -0
- package/dist/npm/common/schemas/input/get-orderbook.json +33 -0
- package/dist/npm/common/schemas/input/get-orders.json +29 -0
- package/dist/npm/common/schemas/input/get-paths.json +69 -0
- package/dist/npm/common/schemas/input/get-payment-channel.json +14 -0
- package/dist/npm/common/schemas/input/get-settings.json +24 -0
- package/dist/npm/common/schemas/input/get-transaction.json +28 -0
- package/dist/npm/common/schemas/input/get-transactions.json +71 -0
- package/dist/npm/common/schemas/input/get-trustlines.json +37 -0
- package/dist/npm/common/schemas/input/prepare-check-cancel.json +18 -0
- package/dist/npm/common/schemas/input/prepare-check-cash.json +18 -0
- package/dist/npm/common/schemas/input/prepare-check-create.json +18 -0
- package/dist/npm/common/schemas/input/prepare-escrow-cancellation.json +18 -0
- package/dist/npm/common/schemas/input/prepare-escrow-creation.json +18 -0
- package/dist/npm/common/schemas/input/prepare-escrow-execution.json +18 -0
- package/dist/npm/common/schemas/input/prepare-order-cancellation.json +18 -0
- package/dist/npm/common/schemas/input/prepare-order.json +18 -0
- package/dist/npm/common/schemas/input/prepare-payment-channel-claim.json +18 -0
- package/dist/npm/common/schemas/input/prepare-payment-channel-create.json +18 -0
- package/dist/npm/common/schemas/input/prepare-payment-channel-fund.json +18 -0
- package/dist/npm/common/schemas/input/prepare-payment.json +18 -0
- package/dist/npm/common/schemas/input/prepare-settings.json +18 -0
- package/dist/npm/common/schemas/input/prepare-ticket-create.json +18 -0
- package/dist/npm/common/schemas/input/prepare-trustline.json +18 -0
- package/dist/npm/common/schemas/input/sign-payment-channel-claim.json +21 -0
- package/dist/npm/common/schemas/input/sign.json +55 -0
- package/dist/npm/common/schemas/input/submit.json +17 -0
- package/dist/npm/common/schemas/input/verify-payment-channel-claim.json +25 -0
- package/dist/npm/common/schemas/objects/address.json +12 -0
- package/dist/npm/common/schemas/objects/adjustment.json +12 -0
- package/dist/npm/common/schemas/objects/amount.json +10 -0
- package/dist/npm/common/schemas/objects/amountbase.json +44 -0
- package/dist/npm/common/schemas/objects/balance.json +45 -0
- package/dist/npm/common/schemas/objects/blob.json +8 -0
- package/dist/npm/common/schemas/objects/classic-address.json +9 -0
- package/dist/npm/common/schemas/objects/currency.json +8 -0
- package/dist/npm/common/schemas/objects/destination-address-tag.json +15 -0
- package/dist/npm/common/schemas/objects/destination-adjustment.json +9 -0
- package/dist/npm/common/schemas/objects/destination-exact-adjustment.json +18 -0
- package/dist/npm/common/schemas/objects/hash128.json +7 -0
- package/dist/npm/common/schemas/objects/hash256.json +7 -0
- package/dist/npm/common/schemas/objects/instructions.json +59 -0
- package/dist/npm/common/schemas/objects/issue.json +9 -0
- package/dist/npm/common/schemas/objects/lax-amount.json +14 -0
- package/dist/npm/common/schemas/objects/lax-lax-amount.json +14 -0
- package/dist/npm/common/schemas/objects/ledger-version.json +15 -0
- package/dist/npm/common/schemas/objects/max-adjustment.json +18 -0
- package/dist/npm/common/schemas/objects/memo.json +25 -0
- package/dist/npm/common/schemas/objects/memos.json +10 -0
- package/dist/npm/common/schemas/objects/min-adjustment.json +18 -0
- package/dist/npm/common/schemas/objects/orderbook.json +11 -0
- package/dist/npm/common/schemas/objects/private-key.json +7 -0
- package/dist/npm/common/schemas/objects/public-key.json +7 -0
- package/dist/npm/common/schemas/objects/quality.json +8 -0
- package/dist/npm/common/schemas/objects/sequence.json +8 -0
- package/dist/npm/common/schemas/objects/settings-plus-memos.json +120 -0
- package/dist/npm/common/schemas/objects/signature.json +7 -0
- package/dist/npm/common/schemas/objects/signed-value.json +8 -0
- package/dist/npm/common/schemas/objects/source-adjustment.json +9 -0
- package/dist/npm/common/schemas/objects/source-exact-adjustment.json +18 -0
- package/dist/npm/common/schemas/objects/tag.json +7 -0
- package/dist/npm/common/schemas/objects/ticket-sequence.json +8 -0
- package/dist/npm/common/schemas/objects/transaction-hash.json +8 -0
- package/dist/npm/common/schemas/objects/transaction-type.json +25 -0
- package/dist/npm/common/schemas/objects/tx-json.json +12 -0
- package/dist/npm/common/schemas/objects/uint32.json +8 -0
- package/dist/npm/common/schemas/objects/value.json +8 -0
- package/dist/npm/common/schemas/objects/x-address.json +9 -0
- package/dist/npm/common/schemas/output/generate-address.json +26 -0
- package/dist/npm/common/schemas/output/generate-x-address.json +18 -0
- package/dist/npm/common/schemas/output/get-account-info.json +40 -0
- package/dist/npm/common/schemas/output/get-account-objects.json +48 -0
- package/dist/npm/common/schemas/output/get-balance-sheet.json +33 -0
- package/dist/npm/common/schemas/output/get-balances.json +6 -0
- package/dist/npm/common/schemas/output/get-ledger.json +90 -0
- package/dist/npm/common/schemas/output/get-orderbook.json +17 -0
- package/dist/npm/common/schemas/output/get-orders.json +36 -0
- package/dist/npm/common/schemas/output/get-paths.json +24 -0
- package/dist/npm/common/schemas/output/get-payment-channel.json +67 -0
- package/dist/npm/common/schemas/output/get-server-info.json +117 -0
- package/dist/npm/common/schemas/output/get-settings.json +8 -0
- package/dist/npm/common/schemas/output/get-transaction.json +237 -0
- package/dist/npm/common/schemas/output/get-transactions.json +8 -0
- package/dist/npm/common/schemas/output/get-trustlines.json +49 -0
- package/dist/npm/common/schemas/output/ledger-event.json +46 -0
- package/dist/npm/common/schemas/output/order-change.json +40 -0
- package/dist/npm/common/schemas/output/orderbook-orders.json +58 -0
- package/dist/npm/common/schemas/output/outcome.json +57 -0
- package/dist/npm/common/schemas/output/prepare.json +47 -0
- package/dist/npm/common/schemas/output/sign-payment-channel-claim.json +7 -0
- package/dist/npm/common/schemas/output/sign.json +18 -0
- package/dist/npm/common/schemas/output/submit.json +37 -0
- package/dist/npm/common/schemas/output/verify-payment-channel-claim.json +6 -0
- package/dist/npm/common/schemas/specifications/account-delete.json +30 -0
- package/dist/npm/common/schemas/specifications/check-cancel.json +15 -0
- package/dist/npm/common/schemas/specifications/check-cash.json +27 -0
- package/dist/npm/common/schemas/specifications/check-create.json +32 -0
- package/dist/npm/common/schemas/specifications/deposit-preauth.json +22 -0
- package/dist/npm/common/schemas/specifications/escrow-cancellation.json +19 -0
- package/dist/npm/common/schemas/specifications/escrow-creation.json +42 -0
- package/dist/npm/common/schemas/specifications/escrow-execution.json +29 -0
- package/dist/npm/common/schemas/specifications/get-payment.json +39 -0
- package/dist/npm/common/schemas/specifications/order-cancellation.json +15 -0
- package/dist/npm/common/schemas/specifications/order.json +49 -0
- package/dist/npm/common/schemas/specifications/payment-channel-claim.json +39 -0
- package/dist/npm/common/schemas/specifications/payment-channel-create.json +40 -0
- package/dist/npm/common/schemas/specifications/payment-channel-fund.json +24 -0
- package/dist/npm/common/schemas/specifications/payment.json +39 -0
- package/dist/npm/common/schemas/specifications/settings.json +20 -0
- package/dist/npm/common/schemas/specifications/trustline.json +43 -0
- package/dist/npm/common/serverinfo.d.ts +34 -0
- package/dist/npm/common/serverinfo.d.ts.map +1 -0
- package/dist/npm/common/serverinfo.js +63 -0
- package/dist/npm/common/serverinfo.js.map +1 -0
- package/dist/npm/common/txflags.d.ts +51 -0
- package/dist/npm/common/txflags.d.ts.map +1 -0
- package/dist/npm/common/txflags.js +55 -0
- package/dist/npm/common/txflags.js.map +1 -0
- package/dist/npm/common/types/commands/account_info.d.ts +18 -0
- package/dist/npm/common/types/commands/account_info.d.ts.map +1 -0
- package/dist/npm/common/types/commands/account_info.js +3 -0
- package/dist/npm/common/types/commands/account_info.js.map +1 -0
- package/dist/npm/common/types/commands/account_lines.d.ts +18 -0
- package/dist/npm/common/types/commands/account_lines.d.ts.map +1 -0
- package/dist/npm/common/types/commands/account_lines.js +3 -0
- package/dist/npm/common/types/commands/account_lines.js.map +1 -0
- package/dist/npm/common/types/commands/account_objects.d.ts +27 -0
- package/dist/npm/common/types/commands/account_objects.d.ts.map +1 -0
- package/dist/npm/common/types/commands/account_objects.js +3 -0
- package/dist/npm/common/types/commands/account_objects.js.map +1 -0
- package/dist/npm/common/types/commands/account_offers.d.ts +25 -0
- package/dist/npm/common/types/commands/account_offers.d.ts.map +1 -0
- package/dist/npm/common/types/commands/account_offers.js +3 -0
- package/dist/npm/common/types/commands/account_offers.js.map +1 -0
- package/dist/npm/common/types/commands/book_offers.d.ts +24 -0
- package/dist/npm/common/types/commands/book_offers.d.ts.map +1 -0
- package/dist/npm/common/types/commands/book_offers.js +3 -0
- package/dist/npm/common/types/commands/book_offers.js.map +1 -0
- package/dist/npm/common/types/commands/gateway_balances.d.ts +24 -0
- package/dist/npm/common/types/commands/gateway_balances.d.ts.map +1 -0
- package/dist/npm/common/types/commands/gateway_balances.js +3 -0
- package/dist/npm/common/types/commands/gateway_balances.js.map +1 -0
- package/dist/npm/common/types/commands/index.d.ts +11 -0
- package/dist/npm/common/types/commands/index.d.ts.map +1 -0
- package/dist/npm/common/types/commands/index.js +23 -0
- package/dist/npm/common/types/commands/index.js.map +1 -0
- package/dist/npm/common/types/commands/ledger.d.ts +19 -0
- package/dist/npm/common/types/commands/ledger.d.ts.map +1 -0
- package/dist/npm/common/types/commands/ledger.js +3 -0
- package/dist/npm/common/types/commands/ledger.js.map +1 -0
- package/dist/npm/common/types/commands/ledger_data.d.ts +11 -0
- package/dist/npm/common/types/commands/ledger_data.d.ts.map +1 -0
- package/dist/npm/common/types/commands/ledger_data.js +3 -0
- package/dist/npm/common/types/commands/ledger_data.js.map +1 -0
- package/dist/npm/common/types/commands/ledger_entry.d.ts +30 -0
- package/dist/npm/common/types/commands/ledger_entry.d.ts.map +1 -0
- package/dist/npm/common/types/commands/ledger_entry.js +3 -0
- package/dist/npm/common/types/commands/ledger_entry.js.map +1 -0
- package/dist/npm/common/types/commands/server_info.d.ts +50 -0
- package/dist/npm/common/types/commands/server_info.d.ts.map +1 -0
- package/dist/npm/common/types/commands/server_info.js +3 -0
- package/dist/npm/common/types/commands/server_info.js.map +1 -0
- package/dist/npm/common/types/objects/adjustments.d.ts +17 -0
- package/dist/npm/common/types/objects/adjustments.d.ts.map +1 -0
- package/dist/npm/common/types/objects/adjustments.js +3 -0
- package/dist/npm/common/types/objects/adjustments.js.map +1 -0
- package/dist/npm/common/types/objects/amounts.d.ts +14 -0
- package/dist/npm/common/types/objects/amounts.d.ts.map +1 -0
- package/dist/npm/common/types/objects/amounts.js +3 -0
- package/dist/npm/common/types/objects/amounts.js.map +1 -0
- package/dist/npm/common/types/objects/index.d.ts +13 -0
- package/dist/npm/common/types/objects/index.d.ts.map +1 -0
- package/dist/npm/common/types/objects/index.js +25 -0
- package/dist/npm/common/types/objects/index.js.map +1 -0
- package/dist/npm/common/types/objects/ledger.d.ts +30 -0
- package/dist/npm/common/types/objects/ledger.d.ts.map +1 -0
- package/dist/npm/common/types/objects/ledger.js +3 -0
- package/dist/npm/common/types/objects/ledger.js.map +1 -0
- package/dist/npm/common/types/objects/ledger_data.d.ts +11 -0
- package/dist/npm/common/types/objects/ledger_data.d.ts.map +1 -0
- package/dist/npm/common/types/objects/ledger_data.js +3 -0
- package/dist/npm/common/types/objects/ledger_data.js.map +1 -0
- package/dist/npm/common/types/objects/ledger_entries.d.ts +159 -0
- package/dist/npm/common/types/objects/ledger_entries.d.ts.map +1 -0
- package/dist/npm/common/types/objects/ledger_entries.js +3 -0
- package/dist/npm/common/types/objects/ledger_entries.js.map +1 -0
- package/dist/npm/common/types/objects/memos.d.ts +6 -0
- package/dist/npm/common/types/objects/memos.d.ts.map +1 -0
- package/dist/npm/common/types/objects/memos.js +3 -0
- package/dist/npm/common/types/objects/memos.js.map +1 -0
- package/dist/npm/common/types/objects/orders.d.ts +14 -0
- package/dist/npm/common/types/objects/orders.d.ts.map +1 -0
- package/dist/npm/common/types/objects/orders.js +3 -0
- package/dist/npm/common/types/objects/orders.js.map +1 -0
- package/dist/npm/common/types/objects/queue_data.d.ts +16 -0
- package/dist/npm/common/types/objects/queue_data.d.ts.map +1 -0
- package/dist/npm/common/types/objects/queue_data.js +3 -0
- package/dist/npm/common/types/objects/queue_data.js.map +1 -0
- package/dist/npm/common/types/objects/settings.d.ts +31 -0
- package/dist/npm/common/types/objects/settings.d.ts.map +1 -0
- package/dist/npm/common/types/objects/settings.js +3 -0
- package/dist/npm/common/types/objects/settings.js.map +1 -0
- package/dist/npm/common/types/objects/signers.d.ts +7 -0
- package/dist/npm/common/types/objects/signers.d.ts.map +1 -0
- package/dist/npm/common/types/objects/signers.js +3 -0
- package/dist/npm/common/types/objects/signers.js.map +1 -0
- package/dist/npm/common/types/objects/transactions.d.ts +22 -0
- package/dist/npm/common/types/objects/transactions.d.ts.map +1 -0
- package/dist/npm/common/types/objects/transactions.js +3 -0
- package/dist/npm/common/types/objects/transactions.js.map +1 -0
- package/dist/npm/common/types/objects/trustlines.d.ts +40 -0
- package/dist/npm/common/types/objects/trustlines.d.ts.map +1 -0
- package/dist/npm/common/types/objects/trustlines.js +3 -0
- package/dist/npm/common/types/objects/trustlines.js.map +1 -0
- package/dist/npm/common/utils.d.ts +12 -0
- package/dist/npm/common/utils.d.ts.map +1 -0
- package/dist/npm/common/utils.js +157 -0
- package/dist/npm/common/utils.js.map +1 -0
- package/dist/npm/common/validate.d.ts +38 -0
- package/dist/npm/common/validate.d.ts.map +1 -0
- package/dist/npm/common/validate.js +79 -0
- package/dist/npm/common/validate.js.map +1 -0
- package/dist/npm/common/wswrapper.d.ts +15 -0
- package/dist/npm/common/wswrapper.d.ts.map +1 -0
- package/dist/npm/common/wswrapper.js +38 -0
- package/dist/npm/common/wswrapper.js.map +1 -0
- package/dist/npm/index.d.ts +6 -0
- package/dist/npm/index.d.ts.map +1 -0
- package/dist/npm/index.js +19 -0
- package/dist/npm/index.js.map +1 -0
- package/dist/npm/ledger/accountinfo.d.ts +14 -0
- package/dist/npm/ledger/accountinfo.d.ts.map +1 -0
- package/dist/npm/ledger/accountinfo.js +36 -0
- package/dist/npm/ledger/accountinfo.js.map +1 -0
- package/dist/npm/ledger/accountobjects.d.ts +4 -0
- package/dist/npm/ledger/accountobjects.d.ts.map +1 -0
- package/dist/npm/ledger/accountobjects.js +27 -0
- package/dist/npm/ledger/accountobjects.js.map +1 -0
- package/dist/npm/ledger/balance-sheet.d.ts +17 -0
- package/dist/npm/ledger/balance-sheet.d.ts.map +1 -0
- package/dist/npm/ledger/balance-sheet.js +52 -0
- package/dist/npm/ledger/balance-sheet.js.map +1 -0
- package/dist/npm/ledger/balances.d.ts +11 -0
- package/dist/npm/ledger/balances.d.ts.map +1 -0
- package/dist/npm/ledger/balances.js +61 -0
- package/dist/npm/ledger/balances.js.map +1 -0
- package/dist/npm/ledger/ledger.d.ts +12 -0
- package/dist/npm/ledger/ledger.d.ts.map +1 -0
- package/dist/npm/ledger/ledger.js +28 -0
- package/dist/npm/ledger/ledger.js.map +1 -0
- package/dist/npm/ledger/orderbook.d.ts +22 -0
- package/dist/npm/ledger/orderbook.d.ts.map +1 -0
- package/dist/npm/ledger/orderbook.js +100 -0
- package/dist/npm/ledger/orderbook.js.map +1 -0
- package/dist/npm/ledger/orders.d.ts +8 -0
- package/dist/npm/ledger/orders.d.ts.map +1 -0
- package/dist/npm/ledger/orders.js +56 -0
- package/dist/npm/ledger/orders.js.map +1 -0
- package/dist/npm/ledger/parse/account-delete.d.ts +8 -0
- package/dist/npm/ledger/parse/account-delete.d.ts.map +1 -0
- package/dist/npm/ledger/parse/account-delete.js +36 -0
- package/dist/npm/ledger/parse/account-delete.js.map +1 -0
- package/dist/npm/ledger/parse/account-order.d.ts +11 -0
- package/dist/npm/ledger/parse/account-order.d.ts.map +1 -0
- package/dist/npm/ledger/parse/account-order.js +40 -0
- package/dist/npm/ledger/parse/account-order.js.map +1 -0
- package/dist/npm/ledger/parse/account-trustline.d.ts +4 -0
- package/dist/npm/ledger/parse/account-trustline.d.ts.map +1 -0
- package/dist/npm/ledger/parse/account-trustline.js +28 -0
- package/dist/npm/ledger/parse/account-trustline.js.map +1 -0
- package/dist/npm/ledger/parse/amendment.d.ts +5 -0
- package/dist/npm/ledger/parse/amendment.d.ts.map +1 -0
- package/dist/npm/ledger/parse/amendment.js +9 -0
- package/dist/npm/ledger/parse/amendment.js.map +1 -0
- package/dist/npm/ledger/parse/amount.d.ts +4 -0
- package/dist/npm/ledger/parse/amount.d.ts.map +1 -0
- package/dist/npm/ledger/parse/amount.js +37 -0
- package/dist/npm/ledger/parse/amount.js.map +1 -0
- package/dist/npm/ledger/parse/cancellation.d.ts +3 -0
- package/dist/npm/ledger/parse/cancellation.d.ts.map +1 -0
- package/dist/npm/ledger/parse/cancellation.js +32 -0
- package/dist/npm/ledger/parse/cancellation.js.map +1 -0
- package/dist/npm/ledger/parse/check-cancel.d.ts +6 -0
- package/dist/npm/ledger/parse/check-cancel.d.ts.map +1 -0
- package/dist/npm/ledger/parse/check-cancel.js +33 -0
- package/dist/npm/ledger/parse/check-cancel.js.map +1 -0
- package/dist/npm/ledger/parse/check-cash.d.ts +9 -0
- package/dist/npm/ledger/parse/check-cash.d.ts.map +1 -0
- package/dist/npm/ledger/parse/check-cash.js +39 -0
- package/dist/npm/ledger/parse/check-cash.js.map +1 -0
- package/dist/npm/ledger/parse/check-create.d.ts +11 -0
- package/dist/npm/ledger/parse/check-create.d.ts.map +1 -0
- package/dist/npm/ledger/parse/check-create.js +42 -0
- package/dist/npm/ledger/parse/check-create.js.map +1 -0
- package/dist/npm/ledger/parse/deposit-preauth.d.ts +7 -0
- package/dist/npm/ledger/parse/deposit-preauth.d.ts.map +1 -0
- package/dist/npm/ledger/parse/deposit-preauth.js +34 -0
- package/dist/npm/ledger/parse/deposit-preauth.js.map +1 -0
- package/dist/npm/ledger/parse/escrow-cancellation.d.ts +3 -0
- package/dist/npm/ledger/parse/escrow-cancellation.d.ts.map +1 -0
- package/dist/npm/ledger/parse/escrow-cancellation.js +34 -0
- package/dist/npm/ledger/parse/escrow-cancellation.js.map +1 -0
- package/dist/npm/ledger/parse/escrow-creation.d.ts +3 -0
- package/dist/npm/ledger/parse/escrow-creation.d.ts.map +1 -0
- package/dist/npm/ledger/parse/escrow-creation.js +43 -0
- package/dist/npm/ledger/parse/escrow-creation.js.map +1 -0
- package/dist/npm/ledger/parse/escrow-execution.d.ts +3 -0
- package/dist/npm/ledger/parse/escrow-execution.d.ts.map +1 -0
- package/dist/npm/ledger/parse/escrow-execution.js +36 -0
- package/dist/npm/ledger/parse/escrow-execution.js.map +1 -0
- package/dist/npm/ledger/parse/fee-update.d.ts +9 -0
- package/dist/npm/ledger/parse/fee-update.d.ts.map +1 -0
- package/dist/npm/ledger/parse/fee-update.js +20 -0
- package/dist/npm/ledger/parse/fee-update.js.map +1 -0
- package/dist/npm/ledger/parse/fields.d.ts +3 -0
- package/dist/npm/ledger/parse/fields.d.ts.map +1 -0
- package/dist/npm/ledger/parse/fields.js +47 -0
- package/dist/npm/ledger/parse/fields.js.map +1 -0
- package/dist/npm/ledger/parse/flags.d.ts +16 -0
- package/dist/npm/ledger/parse/flags.d.ts.map +1 -0
- package/dist/npm/ledger/parse/flags.js +20 -0
- package/dist/npm/ledger/parse/flags.js.map +1 -0
- package/dist/npm/ledger/parse/ledger.d.ts +19 -0
- package/dist/npm/ledger/parse/ledger.d.ts.map +1 -0
- package/dist/npm/ledger/parse/ledger.js +76 -0
- package/dist/npm/ledger/parse/ledger.js.map +1 -0
- package/dist/npm/ledger/parse/order.d.ts +4 -0
- package/dist/npm/ledger/parse/order.d.ts.map +1 -0
- package/dist/npm/ledger/parse/order.js +50 -0
- package/dist/npm/ledger/parse/order.js.map +1 -0
- package/dist/npm/ledger/parse/orderbook-order.d.ts +17 -0
- package/dist/npm/ledger/parse/orderbook-order.d.ts.map +1 -0
- package/dist/npm/ledger/parse/orderbook-order.js +63 -0
- package/dist/npm/ledger/parse/orderbook-order.js.map +1 -0
- package/dist/npm/ledger/parse/pathfind.d.ts +4 -0
- package/dist/npm/ledger/parse/pathfind.d.ts.map +1 -0
- package/dist/npm/ledger/parse/pathfind.js +63 -0
- package/dist/npm/ledger/parse/pathfind.js.map +1 -0
- package/dist/npm/ledger/parse/payment-channel-claim.d.ts +3 -0
- package/dist/npm/ledger/parse/payment-channel-claim.d.ts.map +1 -0
- package/dist/npm/ledger/parse/payment-channel-claim.js +44 -0
- package/dist/npm/ledger/parse/payment-channel-claim.js.map +1 -0
- package/dist/npm/ledger/parse/payment-channel-create.d.ts +3 -0
- package/dist/npm/ledger/parse/payment-channel-create.d.ts.map +1 -0
- package/dist/npm/ledger/parse/payment-channel-create.js +43 -0
- package/dist/npm/ledger/parse/payment-channel-create.js.map +1 -0
- package/dist/npm/ledger/parse/payment-channel-fund.d.ts +3 -0
- package/dist/npm/ledger/parse/payment-channel-fund.d.ts.map +1 -0
- package/dist/npm/ledger/parse/payment-channel-fund.js +39 -0
- package/dist/npm/ledger/parse/payment-channel-fund.js.map +1 -0
- package/dist/npm/ledger/parse/payment-channel.d.ts +17 -0
- package/dist/npm/ledger/parse/payment-channel.d.ts.map +1 -0
- package/dist/npm/ledger/parse/payment-channel.js +24 -0
- package/dist/npm/ledger/parse/payment-channel.js.map +1 -0
- package/dist/npm/ledger/parse/payment.d.ts +3 -0
- package/dist/npm/ledger/parse/payment.d.ts.map +1 -0
- package/dist/npm/ledger/parse/payment.js +64 -0
- package/dist/npm/ledger/parse/payment.js.map +1 -0
- package/dist/npm/ledger/parse/settings.d.ts +3 -0
- package/dist/npm/ledger/parse/settings.d.ts.map +1 -0
- package/dist/npm/ledger/parse/settings.js +75 -0
- package/dist/npm/ledger/parse/settings.js.map +1 -0
- package/dist/npm/ledger/parse/ticket-create.d.ts +3 -0
- package/dist/npm/ledger/parse/ticket-create.d.ts.map +1 -0
- package/dist/npm/ledger/parse/ticket-create.js +33 -0
- package/dist/npm/ledger/parse/ticket-create.js.map +1 -0
- package/dist/npm/ledger/parse/transaction.d.ts +3 -0
- package/dist/npm/ledger/parse/transaction.d.ts.map +1 -0
- package/dist/npm/ledger/parse/transaction.js +98 -0
- package/dist/npm/ledger/parse/transaction.js.map +1 -0
- package/dist/npm/ledger/parse/trustline.d.ts +3 -0
- package/dist/npm/ledger/parse/trustline.d.ts.map +1 -0
- package/dist/npm/ledger/parse/trustline.js +50 -0
- package/dist/npm/ledger/parse/trustline.js.map +1 -0
- package/dist/npm/ledger/parse/utils.d.ts +10 -0
- package/dist/npm/ledger/parse/utils.d.ts.map +1 -0
- package/dist/npm/ledger/parse/utils.js +136 -0
- package/dist/npm/ledger/parse/utils.js.map +1 -0
- package/dist/npm/ledger/pathfind-types.d.ts +60 -0
- package/dist/npm/ledger/pathfind-types.d.ts.map +1 -0
- package/dist/npm/ledger/pathfind-types.js +3 -0
- package/dist/npm/ledger/pathfind-types.js.map +1 -0
- package/dist/npm/ledger/pathfind.d.ts +5 -0
- package/dist/npm/ledger/pathfind.d.ts.map +1 -0
- package/dist/npm/ledger/pathfind.js +141 -0
- package/dist/npm/ledger/pathfind.js.map +1 -0
- package/dist/npm/ledger/payment-channel.d.ts +5 -0
- package/dist/npm/ledger/payment-channel.d.ts.map +1 -0
- package/dist/npm/ledger/payment-channel.js +34 -0
- package/dist/npm/ledger/payment-channel.js.map +1 -0
- package/dist/npm/ledger/settings.d.ts +11 -0
- package/dist/npm/ledger/settings.d.ts.map +1 -0
- package/dist/npm/ledger/settings.js +53 -0
- package/dist/npm/ledger/settings.js.map +1 -0
- package/dist/npm/ledger/transaction.d.ts +10 -0
- package/dist/npm/ledger/transaction.d.ts.map +1 -0
- package/dist/npm/ledger/transaction.js +126 -0
- package/dist/npm/ledger/transaction.js.map +1 -0
- package/dist/npm/ledger/transactions.d.ts +20 -0
- package/dist/npm/ledger/transactions.d.ts.map +1 -0
- package/dist/npm/ledger/transactions.js +156 -0
- package/dist/npm/ledger/transactions.js.map +1 -0
- package/dist/npm/ledger/trustlines.d.ts +11 -0
- package/dist/npm/ledger/trustlines.d.ts.map +1 -0
- package/dist/npm/ledger/trustlines.js +58 -0
- package/dist/npm/ledger/trustlines.js.map +1 -0
- package/dist/npm/ledger/utils.d.ts +33 -0
- package/dist/npm/ledger/utils.d.ts.map +1 -0
- package/dist/npm/ledger/utils.js +107 -0
- package/dist/npm/ledger/utils.js.map +1 -0
- package/dist/npm/offline/derive.d.ts +8 -0
- package/dist/npm/offline/derive.d.ts.map +1 -0
- package/dist/npm/offline/derive.js +13 -0
- package/dist/npm/offline/derive.js.map +1 -0
- package/dist/npm/offline/generate-address.d.ts +15 -0
- package/dist/npm/offline/generate-address.d.ts.map +1 -0
- package/dist/npm/offline/generate-address.js +37 -0
- package/dist/npm/offline/generate-address.js.map +1 -0
- package/dist/npm/offline/ledgerhash.d.ts +6 -0
- package/dist/npm/offline/ledgerhash.d.ts.map +1 -0
- package/dist/npm/offline/ledgerhash.js +104 -0
- package/dist/npm/offline/ledgerhash.js.map +1 -0
- package/dist/npm/offline/sign-payment-channel-claim.d.ts +3 -0
- package/dist/npm/offline/sign-payment-channel-claim.d.ts.map +1 -0
- package/dist/npm/offline/sign-payment-channel-claim.js +38 -0
- package/dist/npm/offline/sign-payment-channel-claim.js.map +1 -0
- package/dist/npm/offline/utils.d.ts +10 -0
- package/dist/npm/offline/utils.d.ts.map +1 -0
- package/dist/npm/offline/utils.js +43 -0
- package/dist/npm/offline/utils.js.map +1 -0
- package/dist/npm/offline/verify-payment-channel-claim.d.ts +3 -0
- package/dist/npm/offline/verify-payment-channel-claim.d.ts.map +1 -0
- package/dist/npm/offline/verify-payment-channel-claim.js +18 -0
- package/dist/npm/offline/verify-payment-channel-claim.js.map +1 -0
- package/dist/npm/server/server.d.ts +8 -0
- package/dist/npm/server/server.d.ts.map +1 -0
- package/dist/npm/server/server.js +66 -0
- package/dist/npm/server/server.js.map +1 -0
- package/dist/npm/transaction/check-cancel.d.ts +8 -0
- package/dist/npm/transaction/check-cancel.d.ts.map +1 -0
- package/dist/npm/transaction/check-cancel.js +24 -0
- package/dist/npm/transaction/check-cancel.js.map +1 -0
- package/dist/npm/transaction/check-cash.d.ts +11 -0
- package/dist/npm/transaction/check-cash.d.ts.map +1 -0
- package/dist/npm/transaction/check-cash.js +55 -0
- package/dist/npm/transaction/check-cash.js.map +1 -0
- package/dist/npm/transaction/check-create.d.ts +13 -0
- package/dist/npm/transaction/check-create.d.ts.map +1 -0
- package/dist/npm/transaction/check-create.js +54 -0
- package/dist/npm/transaction/check-create.js.map +1 -0
- package/dist/npm/transaction/combine.d.ts +3 -0
- package/dist/npm/transaction/combine.d.ts.map +1 -0
- package/dist/npm/transaction/combine.js +62 -0
- package/dist/npm/transaction/combine.js.map +1 -0
- package/dist/npm/transaction/escrow-cancellation.d.ts +11 -0
- package/dist/npm/transaction/escrow-cancellation.d.ts.map +1 -0
- package/dist/npm/transaction/escrow-cancellation.js +46 -0
- package/dist/npm/transaction/escrow-cancellation.js.map +1 -0
- package/dist/npm/transaction/escrow-creation.d.ts +16 -0
- package/dist/npm/transaction/escrow-creation.d.ts.map +1 -0
- package/dist/npm/transaction/escrow-creation.js +69 -0
- package/dist/npm/transaction/escrow-creation.js.map +1 -0
- package/dist/npm/transaction/escrow-execution.d.ts +13 -0
- package/dist/npm/transaction/escrow-execution.d.ts.map +1 -0
- package/dist/npm/transaction/escrow-execution.js +58 -0
- package/dist/npm/transaction/escrow-execution.js.map +1 -0
- package/dist/npm/transaction/order.d.ts +6 -0
- package/dist/npm/transaction/order.d.ts.map +1 -0
- package/dist/npm/transaction/order.js +69 -0
- package/dist/npm/transaction/order.js.map +1 -0
- package/dist/npm/transaction/ordercancellation.d.ts +5 -0
- package/dist/npm/transaction/ordercancellation.d.ts.map +1 -0
- package/dist/npm/transaction/ordercancellation.js +50 -0
- package/dist/npm/transaction/ordercancellation.js.map +1 -0
- package/dist/npm/transaction/payment-channel-claim.d.ts +14 -0
- package/dist/npm/transaction/payment-channel-claim.d.ts.map +1 -0
- package/dist/npm/transaction/payment-channel-claim.js +76 -0
- package/dist/npm/transaction/payment-channel-claim.js.map +1 -0
- package/dist/npm/transaction/payment-channel-create.d.ts +14 -0
- package/dist/npm/transaction/payment-channel-create.d.ts.map +1 -0
- package/dist/npm/transaction/payment-channel-create.js +59 -0
- package/dist/npm/transaction/payment-channel-create.js.map +1 -0
- package/dist/npm/transaction/payment-channel-fund.d.ts +10 -0
- package/dist/npm/transaction/payment-channel-fund.d.ts.map +1 -0
- package/dist/npm/transaction/payment-channel-fund.js +51 -0
- package/dist/npm/transaction/payment-channel-fund.js.map +1 -0
- package/dist/npm/transaction/payment.d.ts +16 -0
- package/dist/npm/transaction/payment.d.ts.map +1 -0
- package/dist/npm/transaction/payment.js +163 -0
- package/dist/npm/transaction/payment.js.map +1 -0
- package/dist/npm/transaction/settings.d.ts +6 -0
- package/dist/npm/transaction/settings.d.ts.map +1 -0
- package/dist/npm/transaction/settings.js +130 -0
- package/dist/npm/transaction/settings.js.map +1 -0
- package/dist/npm/transaction/sign.d.ts +8 -0
- package/dist/npm/transaction/sign.d.ts.map +1 -0
- package/dist/npm/transaction/sign.js +173 -0
- package/dist/npm/transaction/sign.js.map +1 -0
- package/dist/npm/transaction/submit.d.ts +8 -0
- package/dist/npm/transaction/submit.d.ts.map +1 -0
- package/dist/npm/transaction/submit.js +59 -0
- package/dist/npm/transaction/submit.js.map +1 -0
- package/dist/npm/transaction/ticket.d.ts +9 -0
- package/dist/npm/transaction/ticket.d.ts.map +1 -0
- package/dist/npm/transaction/ticket.js +46 -0
- package/dist/npm/transaction/ticket.js.map +1 -0
- package/dist/npm/transaction/trustline.d.ts +6 -0
- package/dist/npm/transaction/trustline.d.ts.map +1 -0
- package/dist/npm/transaction/trustline.js +82 -0
- package/dist/npm/transaction/trustline.js.map +1 -0
- package/dist/npm/transaction/types.d.ts +138 -0
- package/dist/npm/transaction/types.d.ts.map +1 -0
- package/dist/npm/transaction/types.js +3 -0
- package/dist/npm/transaction/types.js.map +1 -0
- package/dist/npm/transaction/utils.d.ts +22 -0
- package/dist/npm/transaction/utils.d.ts.map +1 -0
- package/dist/npm/transaction/utils.js +285 -0
- package/dist/npm/transaction/utils.js.map +1 -0
- package/dist/npm/tsconfig.tsbuildinfo +4230 -0
- package/dist/npm/wallet/wallet-generation.d.ts +15 -0
- package/dist/npm/wallet/wallet-generation.d.ts.map +1 -0
- package/dist/npm/wallet/wallet-generation.js +150 -0
- package/dist/npm/wallet/wallet-generation.js.map +1 -0
- package/package.json +84 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ticket.js","sourceRoot":"","sources":["../../../src/transaction/ticket.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,+CAAgC;AAIhC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAA;AACtC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAA;AAO3D,SAAS,uBAAuB,CAC9B,OAAe,EACf,WAAmB;IAEnB,IAAI,CAAC,WAAW,IAAI,WAAW,KAAK,CAAC;QACnC,MAAM,IAAI,eAAe,CAAC,sCAAsC,CAAC,CAAA;IAEnE,MAAM,MAAM,GAAQ;QAClB,eAAe,EAAE,cAAc;QAC/B,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,WAAW;KACzB,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,mBAAmB,CAE1B,OAAe,EACf,WAAmB,EACnB,eAA6B,EAAE;IAE/B,IAAI;QACF,QAAQ,CAAC,mBAAmB,CAAC,EAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAC,CAAC,CAAA;QAClE,MAAM,MAAM,GAAG,uBAAuB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAA;QAC5D,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,mBAAmB,CAAA"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Instructions, Prepare } from './types';
|
2
|
+
import { FormattedTrustlineSpecification } from '../common/types/objects/trustlines';
|
3
|
+
import { RippleAPI } from '..';
|
4
|
+
declare function prepareTrustline(this: RippleAPI, address: string, trustline: FormattedTrustlineSpecification, instructions?: Instructions): Promise<Prepare>;
|
5
|
+
export default prepareTrustline;
|
6
|
+
//# sourceMappingURL=trustline.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"trustline.d.ts","sourceRoot":"","sources":["../../../src/transaction/trustline.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,YAAY,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAC,+BAA+B,EAAC,MAAM,oCAAoC,CAAA;AAClF,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAkD5B,iBAAS,gBAAgB,CACvB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,+BAA+B,EAC1C,YAAY,GAAE,YAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED,eAAe,gBAAgB,CAAA"}
|
@@ -0,0 +1,82 @@
|
|
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 bignumber_js_1 = __importDefault(require("bignumber.js"));
|
26
|
+
const utils = __importStar(require("./utils"));
|
27
|
+
const validate = utils.common.validate;
|
28
|
+
const trustlineFlags = utils.common.txFlags.TrustSet;
|
29
|
+
function convertQuality(quality) {
|
30
|
+
return new bignumber_js_1.default(quality)
|
31
|
+
.shiftedBy(9)
|
32
|
+
.integerValue(bignumber_js_1.default.ROUND_DOWN)
|
33
|
+
.toNumber();
|
34
|
+
}
|
35
|
+
function createTrustlineTransaction(account, trustline) {
|
36
|
+
const limit = {
|
37
|
+
currency: trustline.currency,
|
38
|
+
issuer: trustline.counterparty,
|
39
|
+
value: trustline.limit
|
40
|
+
};
|
41
|
+
const txJSON = {
|
42
|
+
TransactionType: 'TrustSet',
|
43
|
+
Account: account,
|
44
|
+
LimitAmount: limit,
|
45
|
+
Flags: 0
|
46
|
+
};
|
47
|
+
if (trustline.qualityIn != null) {
|
48
|
+
txJSON.QualityIn = convertQuality(trustline.qualityIn);
|
49
|
+
}
|
50
|
+
if (trustline.qualityOut != null) {
|
51
|
+
txJSON.QualityOut = convertQuality(trustline.qualityOut);
|
52
|
+
}
|
53
|
+
if (trustline.authorized === true) {
|
54
|
+
txJSON.Flags |= trustlineFlags.SetAuth;
|
55
|
+
}
|
56
|
+
if (trustline.ripplingDisabled != null) {
|
57
|
+
txJSON.Flags |= trustline.ripplingDisabled
|
58
|
+
? trustlineFlags.NoRipple
|
59
|
+
: trustlineFlags.ClearNoRipple;
|
60
|
+
}
|
61
|
+
if (trustline.frozen != null) {
|
62
|
+
txJSON.Flags |= trustline.frozen
|
63
|
+
? trustlineFlags.SetFreeze
|
64
|
+
: trustlineFlags.ClearFreeze;
|
65
|
+
}
|
66
|
+
if (trustline.memos != null) {
|
67
|
+
txJSON.Memos = trustline.memos.map(utils.convertMemo);
|
68
|
+
}
|
69
|
+
return txJSON;
|
70
|
+
}
|
71
|
+
function prepareTrustline(address, trustline, instructions = {}) {
|
72
|
+
try {
|
73
|
+
validate.prepareTrustline({ address, trustline, instructions });
|
74
|
+
const txJSON = createTrustlineTransaction(address, trustline);
|
75
|
+
return utils.prepareTransaction(txJSON, this, instructions);
|
76
|
+
}
|
77
|
+
catch (e) {
|
78
|
+
return Promise.reject(e);
|
79
|
+
}
|
80
|
+
}
|
81
|
+
exports.default = prepareTrustline;
|
82
|
+
//# sourceMappingURL=trustline.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"trustline.js","sourceRoot":"","sources":["../../../src/transaction/trustline.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAoC;AACpC,+CAAgC;AAChC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAA;AACtC,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAA;AAKpD,SAAS,cAAc,CAAC,OAAO;IAC7B,OAAO,IAAI,sBAAS,CAAC,OAAO,CAAC;SAC1B,SAAS,CAAC,CAAC,CAAC;SACZ,YAAY,CAAC,sBAAS,CAAC,UAAU,CAAC;SAClC,QAAQ,EAAE,CAAA;AACf,CAAC;AAED,SAAS,0BAA0B,CACjC,OAAe,EACf,SAA0C;IAE1C,MAAM,KAAK,GAAG;QACZ,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,MAAM,EAAE,SAAS,CAAC,YAAY;QAC9B,KAAK,EAAE,SAAS,CAAC,KAAK;KACvB,CAAA;IAED,MAAM,MAAM,GAAQ;QAClB,eAAe,EAAE,UAAU;QAC3B,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,KAAK;QAClB,KAAK,EAAE,CAAC;KACT,CAAA;IACD,IAAI,SAAS,CAAC,SAAS,IAAI,IAAI,EAAE;QAC/B,MAAM,CAAC,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;KACvD;IACD,IAAI,SAAS,CAAC,UAAU,IAAI,IAAI,EAAE;QAChC,MAAM,CAAC,UAAU,GAAG,cAAc,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;KACzD;IACD,IAAI,SAAS,CAAC,UAAU,KAAK,IAAI,EAAE;QACjC,MAAM,CAAC,KAAK,IAAI,cAAc,CAAC,OAAO,CAAA;KACvC;IACD,IAAI,SAAS,CAAC,gBAAgB,IAAI,IAAI,EAAE;QACtC,MAAM,CAAC,KAAK,IAAI,SAAS,CAAC,gBAAgB;YACxC,CAAC,CAAC,cAAc,CAAC,QAAQ;YACzB,CAAC,CAAC,cAAc,CAAC,aAAa,CAAA;KACjC;IACD,IAAI,SAAS,CAAC,MAAM,IAAI,IAAI,EAAE;QAC5B,MAAM,CAAC,KAAK,IAAI,SAAS,CAAC,MAAM;YAC9B,CAAC,CAAC,cAAc,CAAC,SAAS;YAC1B,CAAC,CAAC,cAAc,CAAC,WAAW,CAAA;KAC/B;IACD,IAAI,SAAS,CAAC,KAAK,IAAI,IAAI,EAAE;QAC3B,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;KACtD;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,gBAAgB,CAEvB,OAAe,EACf,SAA0C,EAC1C,eAA6B,EAAE;IAE/B,IAAI;QACF,QAAQ,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,138 @@
|
|
1
|
+
import { FormattedOrderSpecification, FormattedTrustlineSpecification, Adjustment, RippledAmount, Memo, FormattedSettings } from '../common/types/objects';
|
2
|
+
import { ApiMemo } from './utils';
|
3
|
+
export declare type TransactionJSON = {
|
4
|
+
Account: string;
|
5
|
+
TransactionType: string;
|
6
|
+
Memos?: {
|
7
|
+
Memo: ApiMemo;
|
8
|
+
}[];
|
9
|
+
Flags?: number;
|
10
|
+
Fulfillment?: string;
|
11
|
+
[Field: string]: string | number | Array<any> | RippledAmount | undefined;
|
12
|
+
};
|
13
|
+
export declare type Instructions = {
|
14
|
+
sequence?: number;
|
15
|
+
ticketSequence?: number;
|
16
|
+
fee?: string;
|
17
|
+
maxFee?: string;
|
18
|
+
maxLedgerVersion?: number;
|
19
|
+
maxLedgerVersionOffset?: number;
|
20
|
+
signersCount?: number;
|
21
|
+
};
|
22
|
+
export declare type Prepare = {
|
23
|
+
txJSON: string;
|
24
|
+
instructions: {
|
25
|
+
fee: string;
|
26
|
+
sequence?: number;
|
27
|
+
ticketSequence?: number;
|
28
|
+
maxLedgerVersion?: number;
|
29
|
+
};
|
30
|
+
};
|
31
|
+
export declare type Submit = {
|
32
|
+
success: boolean;
|
33
|
+
engineResult: string;
|
34
|
+
engineResultCode: number;
|
35
|
+
engineResultMessage?: string;
|
36
|
+
txBlob?: string;
|
37
|
+
txJson?: object;
|
38
|
+
};
|
39
|
+
export interface OfferCreateTransaction extends TransactionJSON {
|
40
|
+
TransactionType: 'OfferCreate';
|
41
|
+
Account: string;
|
42
|
+
Fee: string;
|
43
|
+
Flags: number;
|
44
|
+
LastLedgerSequence: number;
|
45
|
+
Sequence: number;
|
46
|
+
TakerGets: RippledAmount;
|
47
|
+
TakerPays: RippledAmount;
|
48
|
+
Expiration?: number;
|
49
|
+
OfferSequence?: number;
|
50
|
+
Memos?: {
|
51
|
+
Memo: ApiMemo;
|
52
|
+
}[];
|
53
|
+
}
|
54
|
+
export interface SettingsTransaction extends TransactionJSON {
|
55
|
+
TransferRate?: number;
|
56
|
+
}
|
57
|
+
export declare type KeyPair = {
|
58
|
+
publicKey: string;
|
59
|
+
privateKey: string;
|
60
|
+
};
|
61
|
+
export declare type SignOptions = {
|
62
|
+
signAs: string;
|
63
|
+
};
|
64
|
+
export declare type Outcome = {
|
65
|
+
result: string;
|
66
|
+
ledgerVersion: number;
|
67
|
+
indexInLedger: number;
|
68
|
+
fee: string;
|
69
|
+
balanceChanges: {
|
70
|
+
[key: string]: {
|
71
|
+
currency: string;
|
72
|
+
counterparty?: string;
|
73
|
+
value: string;
|
74
|
+
}[];
|
75
|
+
};
|
76
|
+
orderbookChanges: object;
|
77
|
+
deliveredAmount?: {
|
78
|
+
currency: string;
|
79
|
+
counterparty?: string;
|
80
|
+
value: string;
|
81
|
+
};
|
82
|
+
timestamp?: string;
|
83
|
+
};
|
84
|
+
export declare type FormattedOrderCancellation = {
|
85
|
+
orderSequence: number;
|
86
|
+
};
|
87
|
+
export declare type FormattedPayment = {
|
88
|
+
source: Adjustment;
|
89
|
+
destination: Adjustment;
|
90
|
+
paths?: string;
|
91
|
+
memos?: Array<Memo>;
|
92
|
+
invoiceID?: string;
|
93
|
+
allowPartialPayment?: boolean;
|
94
|
+
noDirectRipple?: boolean;
|
95
|
+
limitQuality?: boolean;
|
96
|
+
};
|
97
|
+
export declare type FormattedPaymentTransaction = {
|
98
|
+
type: string;
|
99
|
+
specification: FormattedPayment;
|
100
|
+
outcome: Outcome;
|
101
|
+
id: string;
|
102
|
+
address: string;
|
103
|
+
sequence: number;
|
104
|
+
};
|
105
|
+
export declare type FormattedOrderTransaction = {
|
106
|
+
type: string;
|
107
|
+
specification: FormattedOrderSpecification;
|
108
|
+
outcome: Outcome;
|
109
|
+
id: string;
|
110
|
+
address: string;
|
111
|
+
sequence: number;
|
112
|
+
};
|
113
|
+
export declare type FormattedOrderCancellationTransaction = {
|
114
|
+
type: string;
|
115
|
+
specification: FormattedOrderCancellation;
|
116
|
+
outcome: Outcome;
|
117
|
+
id: string;
|
118
|
+
address: string;
|
119
|
+
sequence: number;
|
120
|
+
};
|
121
|
+
export declare type FormattedTrustlineTransaction = {
|
122
|
+
type: string;
|
123
|
+
specification: FormattedTrustlineSpecification;
|
124
|
+
outcome: Outcome;
|
125
|
+
id: string;
|
126
|
+
address: string;
|
127
|
+
sequence: number;
|
128
|
+
};
|
129
|
+
export declare type FormattedSettingsTransaction = {
|
130
|
+
type: string;
|
131
|
+
specification: FormattedSettings;
|
132
|
+
outcome: Outcome;
|
133
|
+
id: string;
|
134
|
+
address: string;
|
135
|
+
sequence: number;
|
136
|
+
};
|
137
|
+
export declare type FormattedTransactionType = FormattedPaymentTransaction | FormattedOrderTransaction | FormattedOrderCancellationTransaction | FormattedTrustlineTransaction | FormattedSettingsTransaction;
|
138
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/transaction/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAC/B,UAAU,EACV,aAAa,EACb,IAAI,EACJ,iBAAiB,EAClB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAA;AAE/B,oBAAY,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE;QAAC,IAAI,EAAE,OAAO,CAAA;KAAC,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,aAAa,GAAG,SAAS,CAAA;CAC1E,CAAA;AAED,oBAAY,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gBAAgB,CAAC,EAAE,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A;IACZ,aAAa,EAAE,2BAA2B,CAAA;IAC1C,OAAO,EAAE,OAAO,CAAA;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,oBAAY,qCAAqC,GAAG;IAClD,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,0BAA0B,CAAA;IACzC,OAAO,EAAE,OAAO,CAAA;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,oBAAY,6BAA6B,GAAG;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,+BAA+B,CAAA;IAC9C,OAAO,EAAE,OAAO,CAAA;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,oBAAY,4BAA4B,GAAG;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,iBAAiB,CAAA;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,oBAAY,wBAAwB,GAChC,2BAA2B,GAC3B,yBAAyB,GACzB,qCAAqC,GACrC,6BAA6B,GAC7B,4BAA4B,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/transaction/types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import * as common from '../common';
|
2
|
+
import { Memo } from '../common/types/objects';
|
3
|
+
import { Instructions, Prepare, TransactionJSON } from './types';
|
4
|
+
import { RippleAPI } from '..';
|
5
|
+
export declare type ApiMemo = {
|
6
|
+
MemoData?: string;
|
7
|
+
MemoType?: string;
|
8
|
+
MemoFormat?: string;
|
9
|
+
};
|
10
|
+
declare function setCanonicalFlag(txJSON: TransactionJSON): void;
|
11
|
+
export interface ClassicAccountAndTag {
|
12
|
+
classicAccount: string;
|
13
|
+
tag: number | false | undefined;
|
14
|
+
}
|
15
|
+
declare function getClassicAccountAndTag(Account: string, expectedTag?: number): ClassicAccountAndTag;
|
16
|
+
declare function prepareTransaction(txJSON: TransactionJSON, api: RippleAPI, instructions: Instructions): Promise<Prepare>;
|
17
|
+
declare function convertStringToHex(string: string): string;
|
18
|
+
declare function convertMemo(memo: Memo): {
|
19
|
+
Memo: ApiMemo;
|
20
|
+
};
|
21
|
+
export { convertStringToHex, convertMemo, prepareTransaction, common, setCanonicalFlag, getClassicAccountAndTag };
|
22
|
+
//# sourceMappingURL=utils.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/transaction/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,WAAW,CAAA;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,yBAAyB,CAAA;AAC5C,OAAO,EAAC,YAAY,EAAE,OAAO,EAAE,eAAe,EAAC,MAAM,SAAS,CAAA;AAE9D,OAAO,EAAC,SAAS,EAAC,MAAM,IAAI,CAAA;AAY5B,oBAAY,OAAO,GAAG;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AA6BD,iBAAS,gBAAgB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAMvD;AAaD,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,MAAM,CAAA;IACtB,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;CAChC;AAeD,iBAAS,uBAAuB,CAC9B,OAAO,EAAE,MAAM,EACf,WAAW,CAAC,EAAE,MAAM,GACnB,oBAAoB,CAkBtB;AAED,iBAAS,kBAAkB,CACzB,MAAM,EAAE,eAAe,EACvB,GAAG,EAAE,SAAS,EACd,YAAY,EAAE,YAAY,GACzB,OAAO,CAAC,OAAO,CAAC,CAkRlB;AAED,iBAAS,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,iBAAS,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG;IAAC,IAAI,EAAE,OAAO,CAAA;CAAC,CAQhD;AAED,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,MAAM,EACN,gBAAgB,EAChB,uBAAuB,EACxB,CAAA"}
|
@@ -0,0 +1,285 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
11
|
+
}) : function(o, v) {
|
12
|
+
o["default"] = v;
|
13
|
+
});
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
15
|
+
if (mod && mod.__esModule) return mod;
|
16
|
+
var result = {};
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
18
|
+
__setModuleDefault(result, mod);
|
19
|
+
return result;
|
20
|
+
};
|
21
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
22
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
23
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
24
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
25
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
26
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
27
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
28
|
+
});
|
29
|
+
};
|
30
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
31
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
32
|
+
};
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
34
|
+
exports.getClassicAccountAndTag = exports.setCanonicalFlag = exports.common = exports.prepareTransaction = exports.convertMemo = exports.convertStringToHex = void 0;
|
35
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
36
|
+
const common = __importStar(require("../common"));
|
37
|
+
exports.common = common;
|
38
|
+
const common_1 = require("../common");
|
39
|
+
const errors_1 = require("../common/errors");
|
40
|
+
const ripple_address_codec_1 = require("ripple-address-codec");
|
41
|
+
const txFlags = common.txFlags;
|
42
|
+
const TRANSACTION_TYPES_WITH_DESTINATION_TAG_FIELD = [
|
43
|
+
'Payment',
|
44
|
+
'CheckCreate',
|
45
|
+
'EscrowCreate',
|
46
|
+
'PaymentChannelCreate'
|
47
|
+
];
|
48
|
+
function formatPrepareResponse(txJSON) {
|
49
|
+
const instructions = {
|
50
|
+
fee: common.dropsToXrp(txJSON.Fee),
|
51
|
+
maxLedgerVersion: txJSON.LastLedgerSequence == null ? null : txJSON.LastLedgerSequence
|
52
|
+
};
|
53
|
+
if (txJSON.TicketSequence != null) {
|
54
|
+
instructions['ticketSequence'] = txJSON.TicketSequence;
|
55
|
+
}
|
56
|
+
else {
|
57
|
+
instructions['sequence'] = txJSON.Sequence;
|
58
|
+
}
|
59
|
+
return {
|
60
|
+
txJSON: JSON.stringify(txJSON),
|
61
|
+
instructions
|
62
|
+
};
|
63
|
+
}
|
64
|
+
function setCanonicalFlag(txJSON) {
|
65
|
+
txJSON.Flags |= txFlags.Universal.FullyCanonicalSig;
|
66
|
+
txJSON.Flags = txJSON.Flags >>> 0;
|
67
|
+
}
|
68
|
+
exports.setCanonicalFlag = setCanonicalFlag;
|
69
|
+
function scaleValue(value, multiplier, extra = 0) {
|
70
|
+
return new bignumber_js_1.default(value).times(multiplier).plus(extra).toString();
|
71
|
+
}
|
72
|
+
function getClassicAccountAndTag(Account, expectedTag) {
|
73
|
+
if (ripple_address_codec_1.isValidXAddress(Account)) {
|
74
|
+
const classic = ripple_address_codec_1.xAddressToClassicAddress(Account);
|
75
|
+
if (expectedTag != null && classic.tag !== expectedTag) {
|
76
|
+
throw new errors_1.ValidationError('address includes a tag that does not match the tag specified in the transaction');
|
77
|
+
}
|
78
|
+
return {
|
79
|
+
classicAccount: classic.classicAddress,
|
80
|
+
tag: classic.tag
|
81
|
+
};
|
82
|
+
}
|
83
|
+
else {
|
84
|
+
return {
|
85
|
+
classicAccount: Account,
|
86
|
+
tag: expectedTag
|
87
|
+
};
|
88
|
+
}
|
89
|
+
}
|
90
|
+
exports.getClassicAccountAndTag = getClassicAccountAndTag;
|
91
|
+
function prepareTransaction(txJSON, api, instructions) {
|
92
|
+
common.validate.instructions(instructions);
|
93
|
+
common.validate.tx_json(txJSON);
|
94
|
+
if (instructions.sequence != null && instructions.sequence === 0) {
|
95
|
+
return Promise.reject(new errors_1.ValidationError('`sequence` cannot be 0'));
|
96
|
+
}
|
97
|
+
const disallowedFieldsInTxJSON = [
|
98
|
+
'maxLedgerVersion',
|
99
|
+
'maxLedgerVersionOffset',
|
100
|
+
'fee',
|
101
|
+
'sequence',
|
102
|
+
'ticketSequence'
|
103
|
+
];
|
104
|
+
const badFields = disallowedFieldsInTxJSON.filter((field) => txJSON[field]);
|
105
|
+
if (badFields.length) {
|
106
|
+
return Promise.reject(new errors_1.ValidationError('txJSON additionalProperty "' +
|
107
|
+
badFields[0] +
|
108
|
+
'" exists in instance when not allowed'));
|
109
|
+
}
|
110
|
+
const newTxJSON = Object.assign({}, txJSON);
|
111
|
+
if (txJSON['SignerQuorum'] === 0) {
|
112
|
+
delete newTxJSON.SignerEntries;
|
113
|
+
}
|
114
|
+
const { classicAccount, tag: sourceTag } = getClassicAccountAndTag(txJSON.Account);
|
115
|
+
newTxJSON.Account = classicAccount;
|
116
|
+
if (sourceTag != null) {
|
117
|
+
if (txJSON.SourceTag && txJSON.SourceTag !== sourceTag) {
|
118
|
+
return Promise.reject(new errors_1.ValidationError('The `SourceTag`, if present, must match the tag of the `Account` X-address'));
|
119
|
+
}
|
120
|
+
if (sourceTag) {
|
121
|
+
newTxJSON.SourceTag = sourceTag;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
if (typeof txJSON.Destination === 'string') {
|
125
|
+
const { classicAccount: destinationAccount, tag: destinationTag } = getClassicAccountAndTag(txJSON.Destination);
|
126
|
+
newTxJSON.Destination = destinationAccount;
|
127
|
+
if (destinationTag != null) {
|
128
|
+
if (TRANSACTION_TYPES_WITH_DESTINATION_TAG_FIELD.includes(txJSON.TransactionType)) {
|
129
|
+
if (txJSON.DestinationTag && txJSON.DestinationTag !== destinationTag) {
|
130
|
+
return Promise.reject(new errors_1.ValidationError('The Payment `DestinationTag`, if present, must match the tag of the `Destination` X-address'));
|
131
|
+
}
|
132
|
+
if (destinationTag) {
|
133
|
+
newTxJSON.DestinationTag = destinationTag;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
function convertToClassicAccountIfPresent(fieldName) {
|
139
|
+
const account = txJSON[fieldName];
|
140
|
+
if (typeof account === 'string') {
|
141
|
+
const { classicAccount: ca } = getClassicAccountAndTag(account);
|
142
|
+
newTxJSON[fieldName] = ca;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
function convertIssuedCurrencyToAccountIfPresent(fieldName) {
|
146
|
+
const amount = txJSON[fieldName];
|
147
|
+
if (typeof amount === 'number'
|
148
|
+
|| amount instanceof Array
|
149
|
+
|| amount == null)
|
150
|
+
return;
|
151
|
+
newTxJSON[fieldName] = common_1.toRippledAmount(amount);
|
152
|
+
}
|
153
|
+
convertToClassicAccountIfPresent('Authorize');
|
154
|
+
convertToClassicAccountIfPresent('Unauthorize');
|
155
|
+
convertToClassicAccountIfPresent('Owner');
|
156
|
+
convertToClassicAccountIfPresent('RegularKey');
|
157
|
+
convertIssuedCurrencyToAccountIfPresent('Amount');
|
158
|
+
convertIssuedCurrencyToAccountIfPresent('SendMax');
|
159
|
+
convertIssuedCurrencyToAccountIfPresent('DeliverMin');
|
160
|
+
convertIssuedCurrencyToAccountIfPresent('TakerPays');
|
161
|
+
convertIssuedCurrencyToAccountIfPresent('TakerGets');
|
162
|
+
convertIssuedCurrencyToAccountIfPresent('LimitAmount');
|
163
|
+
setCanonicalFlag(newTxJSON);
|
164
|
+
function prepareMaxLedgerVersion() {
|
165
|
+
if (newTxJSON.LastLedgerSequence && instructions.maxLedgerVersion) {
|
166
|
+
return Promise.reject(new errors_1.ValidationError('`LastLedgerSequence` in txJSON and `maxLedgerVersion`' +
|
167
|
+
' in `instructions` cannot both be set'));
|
168
|
+
}
|
169
|
+
if (newTxJSON.LastLedgerSequence && instructions.maxLedgerVersionOffset) {
|
170
|
+
return Promise.reject(new errors_1.ValidationError('`LastLedgerSequence` in txJSON and `maxLedgerVersionOffset`' +
|
171
|
+
' in `instructions` cannot both be set'));
|
172
|
+
}
|
173
|
+
if (newTxJSON.LastLedgerSequence) {
|
174
|
+
return Promise.resolve();
|
175
|
+
}
|
176
|
+
if (instructions.maxLedgerVersion !== undefined) {
|
177
|
+
if (instructions.maxLedgerVersion !== null) {
|
178
|
+
newTxJSON.LastLedgerSequence = instructions.maxLedgerVersion;
|
179
|
+
}
|
180
|
+
return Promise.resolve();
|
181
|
+
}
|
182
|
+
const offset = instructions.maxLedgerVersionOffset != null
|
183
|
+
? instructions.maxLedgerVersionOffset
|
184
|
+
: 3;
|
185
|
+
return api.connection.getLedgerVersion().then((ledgerVersion) => {
|
186
|
+
newTxJSON.LastLedgerSequence = ledgerVersion + offset;
|
187
|
+
return;
|
188
|
+
});
|
189
|
+
}
|
190
|
+
function prepareFee() {
|
191
|
+
if (newTxJSON.Fee && instructions.fee) {
|
192
|
+
return Promise.reject(new errors_1.ValidationError('`Fee` in txJSON and `fee` in `instructions` cannot both be set'));
|
193
|
+
}
|
194
|
+
if (newTxJSON.Fee) {
|
195
|
+
return Promise.resolve();
|
196
|
+
}
|
197
|
+
const multiplier = instructions.signersCount == null
|
198
|
+
? 1
|
199
|
+
: instructions.signersCount + 1;
|
200
|
+
if (instructions.fee != null) {
|
201
|
+
const fee = new bignumber_js_1.default(instructions.fee);
|
202
|
+
if (fee.isGreaterThan(api._maxFeeXRP)) {
|
203
|
+
return Promise.reject(new errors_1.ValidationError(`Fee of ${fee.toString(10)} XRP exceeds ` +
|
204
|
+
`max of ${api._maxFeeXRP} XRP. To use this fee, increase ` +
|
205
|
+
'`maxFeeXRP` in the RippleAPI constructor.'));
|
206
|
+
}
|
207
|
+
newTxJSON.Fee = scaleValue(common.xrpToDrops(instructions.fee), multiplier);
|
208
|
+
return Promise.resolve();
|
209
|
+
}
|
210
|
+
const cushion = api._feeCushion;
|
211
|
+
return api.getFee(cushion).then((fee) => {
|
212
|
+
return api.connection.getFeeRef().then((feeRef) => {
|
213
|
+
const extraFee = newTxJSON.TransactionType !== 'EscrowFinish' ||
|
214
|
+
newTxJSON.Fulfillment == null
|
215
|
+
? 0
|
216
|
+
: cushion *
|
217
|
+
feeRef *
|
218
|
+
(32 +
|
219
|
+
Math.floor(Buffer.from(newTxJSON.Fulfillment, 'hex').length / 16));
|
220
|
+
const feeDrops = common.xrpToDrops(fee);
|
221
|
+
const maxFeeXRP = instructions.maxFee
|
222
|
+
? bignumber_js_1.default.min(api._maxFeeXRP, instructions.maxFee)
|
223
|
+
: api._maxFeeXRP;
|
224
|
+
const maxFeeDrops = common.xrpToDrops(maxFeeXRP);
|
225
|
+
const normalFee = scaleValue(feeDrops, multiplier, extraFee);
|
226
|
+
newTxJSON.Fee = bignumber_js_1.default.min(normalFee, maxFeeDrops).toString(10);
|
227
|
+
return;
|
228
|
+
});
|
229
|
+
});
|
230
|
+
}
|
231
|
+
function prepareSequence() {
|
232
|
+
return __awaiter(this, void 0, void 0, function* () {
|
233
|
+
if (instructions.sequence != null) {
|
234
|
+
if (newTxJSON.Sequence == null ||
|
235
|
+
instructions.sequence === newTxJSON.Sequence) {
|
236
|
+
newTxJSON.Sequence = instructions.sequence;
|
237
|
+
return Promise.resolve();
|
238
|
+
}
|
239
|
+
else {
|
240
|
+
return Promise.reject(new errors_1.ValidationError('`Sequence` in txJSON must match `sequence` in `instructions`'));
|
241
|
+
}
|
242
|
+
}
|
243
|
+
if (newTxJSON.Sequence != null) {
|
244
|
+
return Promise.resolve();
|
245
|
+
}
|
246
|
+
if (instructions.ticketSequence != null) {
|
247
|
+
newTxJSON.Sequence = 0;
|
248
|
+
newTxJSON.TicketSequence = instructions.ticketSequence;
|
249
|
+
return Promise.resolve();
|
250
|
+
}
|
251
|
+
try {
|
252
|
+
const response = yield api.request('account_info', {
|
253
|
+
account: classicAccount,
|
254
|
+
ledger_index: 'current'
|
255
|
+
});
|
256
|
+
newTxJSON.Sequence = response.account_data.Sequence;
|
257
|
+
return Promise.resolve();
|
258
|
+
}
|
259
|
+
catch (e) {
|
260
|
+
return Promise.reject(e);
|
261
|
+
}
|
262
|
+
});
|
263
|
+
}
|
264
|
+
return Promise.all([
|
265
|
+
prepareMaxLedgerVersion(),
|
266
|
+
prepareFee(),
|
267
|
+
prepareSequence()
|
268
|
+
]).then(() => formatPrepareResponse(newTxJSON));
|
269
|
+
}
|
270
|
+
exports.prepareTransaction = prepareTransaction;
|
271
|
+
function convertStringToHex(string) {
|
272
|
+
return Buffer.from(string, 'utf8').toString('hex').toUpperCase();
|
273
|
+
}
|
274
|
+
exports.convertStringToHex = convertStringToHex;
|
275
|
+
function convertMemo(memo) {
|
276
|
+
return {
|
277
|
+
Memo: common.removeUndefined({
|
278
|
+
MemoData: memo.data ? convertStringToHex(memo.data) : undefined,
|
279
|
+
MemoType: memo.type ? convertStringToHex(memo.type) : undefined,
|
280
|
+
MemoFormat: memo.format ? convertStringToHex(memo.format) : undefined
|
281
|
+
})
|
282
|
+
};
|
283
|
+
}
|
284
|
+
exports.convertMemo = convertMemo;
|
285
|
+
//# sourceMappingURL=utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/transaction/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAoC;AACpC,kDAAmC;AAuZjC,wBAAM;AApZR,sCAAyC;AAEzC,6CAAgD;AAChD,+DAA8E;AAE9E,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAA;AAC9B,MAAM,4CAA4C,GAAG;IACnD,SAAS;IACT,aAAa;IACb,cAAc;IACd,sBAAsB;CACvB,CAAA;AAQD,SAAS,qBAAqB,CAAC,MAAW;IACxC,MAAM,YAAY,GAAG;QACnB,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC;QAClC,gBAAgB,EACd,MAAM,CAAC,kBAAkB,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,kBAAkB;KACvE,CAAA;IACD,IAAI,MAAM,CAAC,cAAc,IAAI,IAAI,EAAE;QACjC,YAAY,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,cAAc,CAAA;KACvD;SAAM;QACL,YAAY,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAA;KAC3C;IACD,OAAO;QACL,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QAC9B,YAAY;KACb,CAAA;AACH,CAAC;AAYD,SAAS,gBAAgB,CAAC,MAAuB;IAC/C,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,SAAS,CAAC,iBAAiB,CAAA;IAInD,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