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,62 @@
|
|
1
|
+
declare const AccountFlags: {
|
2
|
+
passwordSpent: number;
|
3
|
+
requireDestinationTag: number;
|
4
|
+
requireAuthorization: number;
|
5
|
+
depositAuth: number;
|
6
|
+
disallowIncomingXRP: number;
|
7
|
+
disableMasterKey: number;
|
8
|
+
noFreeze: number;
|
9
|
+
globalFreeze: number;
|
10
|
+
defaultRipple: number;
|
11
|
+
};
|
12
|
+
export interface Settings {
|
13
|
+
passwordSpent?: boolean;
|
14
|
+
requireDestinationTag?: boolean;
|
15
|
+
requireAuthorization?: boolean;
|
16
|
+
depositAuth?: boolean;
|
17
|
+
disallowIncomingXRP?: boolean;
|
18
|
+
disableMasterKey?: boolean;
|
19
|
+
noFreeze?: boolean;
|
20
|
+
globalFreeze?: boolean;
|
21
|
+
defaultRipple?: boolean;
|
22
|
+
}
|
23
|
+
declare const AccountSetFlags: {
|
24
|
+
requireDestinationTag: number;
|
25
|
+
requireAuthorization: number;
|
26
|
+
depositAuth: number;
|
27
|
+
disallowIncomingXRP: number;
|
28
|
+
disableMasterKey: number;
|
29
|
+
enableTransactionIDTracking: number;
|
30
|
+
noFreeze: number;
|
31
|
+
globalFreeze: number;
|
32
|
+
defaultRipple: number;
|
33
|
+
};
|
34
|
+
declare const AccountFields: {
|
35
|
+
EmailHash: {
|
36
|
+
name: string;
|
37
|
+
encoding: string;
|
38
|
+
length: number;
|
39
|
+
defaults: string;
|
40
|
+
};
|
41
|
+
WalletLocator: {
|
42
|
+
name: string;
|
43
|
+
};
|
44
|
+
MessageKey: {
|
45
|
+
name: string;
|
46
|
+
};
|
47
|
+
Domain: {
|
48
|
+
name: string;
|
49
|
+
encoding: string;
|
50
|
+
};
|
51
|
+
TransferRate: {
|
52
|
+
name: string;
|
53
|
+
defaults: number;
|
54
|
+
shift: number;
|
55
|
+
};
|
56
|
+
TickSize: {
|
57
|
+
name: string;
|
58
|
+
defaults: number;
|
59
|
+
};
|
60
|
+
};
|
61
|
+
export { AccountFields, AccountSetFlags, AccountFlags };
|
62
|
+
//# sourceMappingURL=constants.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/common/constants.ts"],"names":[],"mappings":"AAgDA,QAAA,MAAM,YAAY;;;;;;;;;;CAUjB,CAAA;AAED,MAAM,WAAW,QAAQ;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,QAAA,MAAM,eAAe;;;;;;;;;;CAUpB,CAAA;AAED,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;CAYlB,CAAA;AAED,OAAO,EAAC,aAAa,EAAE,eAAe,EAAE,YAAY,EAAC,CAAA"}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.AccountFlags = exports.AccountSetFlags = exports.AccountFields = void 0;
|
4
|
+
const txflags_1 = require("./txflags");
|
5
|
+
const accountRootFlags = {
|
6
|
+
DefaultRipple: 0x00800000,
|
7
|
+
DepositAuth: 0x01000000,
|
8
|
+
DisableMaster: 0x00100000,
|
9
|
+
DisallowXRP: 0x00080000,
|
10
|
+
GlobalFreeze: 0x00400000,
|
11
|
+
NoFreeze: 0x00200000,
|
12
|
+
PasswordSpent: 0x00010000,
|
13
|
+
RequireAuth: 0x00040000,
|
14
|
+
RequireDestTag: 0x00020000
|
15
|
+
};
|
16
|
+
const AccountFlags = {
|
17
|
+
passwordSpent: accountRootFlags.PasswordSpent,
|
18
|
+
requireDestinationTag: accountRootFlags.RequireDestTag,
|
19
|
+
requireAuthorization: accountRootFlags.RequireAuth,
|
20
|
+
depositAuth: accountRootFlags.DepositAuth,
|
21
|
+
disallowIncomingXRP: accountRootFlags.DisallowXRP,
|
22
|
+
disableMasterKey: accountRootFlags.DisableMaster,
|
23
|
+
noFreeze: accountRootFlags.NoFreeze,
|
24
|
+
globalFreeze: accountRootFlags.GlobalFreeze,
|
25
|
+
defaultRipple: accountRootFlags.DefaultRipple
|
26
|
+
};
|
27
|
+
exports.AccountFlags = AccountFlags;
|
28
|
+
const AccountSetFlags = {
|
29
|
+
requireDestinationTag: txflags_1.txFlagIndices.AccountSet.asfRequireDest,
|
30
|
+
requireAuthorization: txflags_1.txFlagIndices.AccountSet.asfRequireAuth,
|
31
|
+
depositAuth: txflags_1.txFlagIndices.AccountSet.asfDepositAuth,
|
32
|
+
disallowIncomingXRP: txflags_1.txFlagIndices.AccountSet.asfDisallowXRP,
|
33
|
+
disableMasterKey: txflags_1.txFlagIndices.AccountSet.asfDisableMaster,
|
34
|
+
enableTransactionIDTracking: txflags_1.txFlagIndices.AccountSet.asfAccountTxnID,
|
35
|
+
noFreeze: txflags_1.txFlagIndices.AccountSet.asfNoFreeze,
|
36
|
+
globalFreeze: txflags_1.txFlagIndices.AccountSet.asfGlobalFreeze,
|
37
|
+
defaultRipple: txflags_1.txFlagIndices.AccountSet.asfDefaultRipple
|
38
|
+
};
|
39
|
+
exports.AccountSetFlags = AccountSetFlags;
|
40
|
+
const AccountFields = {
|
41
|
+
EmailHash: {
|
42
|
+
name: 'emailHash',
|
43
|
+
encoding: 'hex',
|
44
|
+
length: 32,
|
45
|
+
defaults: '00000000000000000000000000000000'
|
46
|
+
},
|
47
|
+
WalletLocator: { name: 'walletLocator' },
|
48
|
+
MessageKey: { name: 'messageKey' },
|
49
|
+
Domain: { name: 'domain', encoding: 'hex' },
|
50
|
+
TransferRate: { name: 'transferRate', defaults: 0, shift: 9 },
|
51
|
+
TickSize: { name: 'tickSize', defaults: 0 }
|
52
|
+
};
|
53
|
+
exports.AccountFields = AccountFields;
|
54
|
+
//# source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C,UAAU,CAAC,eAAe;IACtD,aAAa,EAAE,uBAAa,CAAC,UAAU,CAAC,gBAAgB;CACzD,CAAA;AAgBsB,0CAAe;AAdtC,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE;QACT,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,kCAAkC;KAC7C;IACD,aAAa,EAAE,EAAC,IAAI,EAAE,eAAe,EAAC;IACtC,UAAU,EAAE,EAAC,IAAI,EAAE,YAAY,EAAC;IAChC,MAAM,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAC;IACzC,YAAY,EAAE,EAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAC;IAC3D,QAAQ,EAAE,EAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,EAAC;CAC1C,CAAA;AAEO,sCAAa"}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
declare class RippleError extends Error {
|
2
|
+
name: string;
|
3
|
+
message: string;
|
4
|
+
data?: any;
|
5
|
+
constructor(message?: string, data?: any);
|
6
|
+
toString(): string;
|
7
|
+
inspect(): string;
|
8
|
+
}
|
9
|
+
declare class RippledError extends RippleError {
|
10
|
+
}
|
11
|
+
declare class UnexpectedError extends RippleError {
|
12
|
+
}
|
13
|
+
declare class LedgerVersionError extends RippleError {
|
14
|
+
}
|
15
|
+
declare class ConnectionError extends RippleError {
|
16
|
+
}
|
17
|
+
declare class NotConnectedError extends ConnectionError {
|
18
|
+
}
|
19
|
+
declare class DisconnectedError extends ConnectionError {
|
20
|
+
}
|
21
|
+
declare class RippledNotInitializedError extends ConnectionError {
|
22
|
+
}
|
23
|
+
declare class TimeoutError extends ConnectionError {
|
24
|
+
}
|
25
|
+
declare class ResponseFormatError extends ConnectionError {
|
26
|
+
}
|
27
|
+
declare class ValidationError extends RippleError {
|
28
|
+
}
|
29
|
+
declare class XRPLFaucetError extends RippleError {
|
30
|
+
}
|
31
|
+
declare class NotFoundError extends RippleError {
|
32
|
+
constructor(message?: string);
|
33
|
+
}
|
34
|
+
declare class MissingLedgerHistoryError extends RippleError {
|
35
|
+
constructor(message?: string);
|
36
|
+
}
|
37
|
+
declare class PendingLedgerVersionError extends RippleError {
|
38
|
+
constructor(message?: string);
|
39
|
+
}
|
40
|
+
export { RippleError, UnexpectedError, ConnectionError, RippledError, NotConnectedError, DisconnectedError, RippledNotInitializedError, TimeoutError, ResponseFormatError, ValidationError, NotFoundError, PendingLedgerVersionError, MissingLedgerHistoryError, LedgerVersionError, XRPLFaucetError };
|
41
|
+
//# sourceMappingURL=errors.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/common/errors.ts"],"names":[],"mappings":"AAGA,cAAM,WAAY,SAAQ,KAAK;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,GAAG,CAAA;gBAEE,OAAO,SAAK,EAAE,IAAI,CAAC,EAAE,GAAG;IAWpC,QAAQ;IAYR,OAAO;CAGR;AAED,cAAM,YAAa,SAAQ,WAAW;CAAG;AAEzC,cAAM,eAAgB,SAAQ,WAAW;CAAG;AAE5C,cAAM,kBAAmB,SAAQ,WAAW;CAAG;AAE/C,cAAM,eAAgB,SAAQ,WAAW;CAAG;AAE5C,cAAM,iBAAkB,SAAQ,eAAe;CAAG;AAElD,cAAM,iBAAkB,SAAQ,eAAe;CAAG;AAElD,cAAM,0BAA2B,SAAQ,eAAe;CAAG;AAE3D,cAAM,YAAa,SAAQ,eAAe;CAAG;AAE7C,cAAM,mBAAoB,SAAQ,eAAe;CAAG;AAEpD,cAAM,eAAgB,SAAQ,WAAW;CAAG;AAE5C,cAAM,eAAgB,SAAQ,WAAW;CAAG;AAE5C,cAAM,aAAc,SAAQ,WAAW;gBACzB,OAAO,SAAc;CAGlC;AAED,cAAM,yBAA0B,SAAQ,WAAW;gBACrC,OAAO,CAAC,EAAE,MAAM;CAG7B;AAED,cAAM,yBAA0B,SAAQ,WAAW;gBACrC,OAAO,CAAC,EAAE,MAAM;CAO7B;AAED,OAAO,EACL,WAAW,EACX,eAAe,EACf,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,yBAAyB,EACzB,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EAChB,CAAA"}
|
@@ -0,0 +1,101 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
11
|
+
}) : function(o, v) {
|
12
|
+
o["default"] = v;
|
13
|
+
});
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
15
|
+
if (mod && mod.__esModule) return mod;
|
16
|
+
var result = {};
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
18
|
+
__setModuleDefault(result, mod);
|
19
|
+
return result;
|
20
|
+
};
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
22
|
+
exports.XRPLFaucetError = exports.LedgerVersionError = exports.MissingLedgerHistoryError = exports.PendingLedgerVersionError = exports.NotFoundError = exports.ValidationError = exports.ResponseFormatError = exports.TimeoutError = exports.RippledNotInitializedError = exports.DisconnectedError = exports.NotConnectedError = exports.RippledError = exports.ConnectionError = exports.UnexpectedError = exports.RippleError = void 0;
|
23
|
+
const util_1 = require("util");
|
24
|
+
const browserHacks = __importStar(require("./browser-hacks"));
|
25
|
+
class RippleError extends Error {
|
26
|
+
constructor(message = '', data) {
|
27
|
+
super(message);
|
28
|
+
this.name = browserHacks.getConstructorName(this);
|
29
|
+
this.message = message;
|
30
|
+
this.data = data;
|
31
|
+
if (Error.captureStackTrace) {
|
32
|
+
Error.captureStackTrace(this, this.constructor);
|
33
|
+
}
|
34
|
+
}
|
35
|
+
toString() {
|
36
|
+
let result = '[' + this.name + '(' + this.message;
|
37
|
+
if (this.data) {
|
38
|
+
result += ', ' + util_1.inspect(this.data);
|
39
|
+
}
|
40
|
+
result += ')]';
|
41
|
+
return result;
|
42
|
+
}
|
43
|
+
inspect() {
|
44
|
+
return this.toString();
|
45
|
+
}
|
46
|
+
}
|
47
|
+
exports.RippleError = RippleError;
|
48
|
+
class RippledError extends RippleError {
|
49
|
+
}
|
50
|
+
exports.RippledError = RippledError;
|
51
|
+
class UnexpectedError extends RippleError {
|
52
|
+
}
|
53
|
+
exports.UnexpectedError = UnexpectedError;
|
54
|
+
class LedgerVersionError extends RippleError {
|
55
|
+
}
|
56
|
+
exports.LedgerVersionError = LedgerVersionError;
|
57
|
+
class ConnectionError extends RippleError {
|
58
|
+
}
|
59
|
+
exports.ConnectionError = ConnectionError;
|
60
|
+
class NotConnectedError extends ConnectionError {
|
61
|
+
}
|
62
|
+
exports.NotConnectedError = NotConnectedError;
|
63
|
+
class DisconnectedError extends ConnectionError {
|
64
|
+
}
|
65
|
+
exports.DisconnectedError = DisconnectedError;
|
66
|
+
class RippledNotInitializedError extends ConnectionError {
|
67
|
+
}
|
68
|
+
exports.RippledNotInitializedError = RippledNotInitializedError;
|
69
|
+
class TimeoutError extends ConnectionError {
|
70
|
+
}
|
71
|
+
exports.TimeoutError = TimeoutError;
|
72
|
+
class ResponseFormatError extends ConnectionError {
|
73
|
+
}
|
74
|
+
exports.ResponseFormatError = ResponseFormatError;
|
75
|
+
class ValidationError extends RippleError {
|
76
|
+
}
|
77
|
+
exports.ValidationError = ValidationError;
|
78
|
+
class XRPLFaucetError extends RippleError {
|
79
|
+
}
|
80
|
+
exports.XRPLFaucetError = XRPLFaucetError;
|
81
|
+
class NotFoundError extends RippleError {
|
82
|
+
constructor(message = 'Not found') {
|
83
|
+
super(message);
|
84
|
+
}
|
85
|
+
}
|
86
|
+
exports.NotFoundError = NotFoundError;
|
87
|
+
class MissingLedgerHistoryError extends RippleError {
|
88
|
+
constructor(message) {
|
89
|
+
super(message || 'Server is missing ledger history in the specified range');
|
90
|
+
}
|
91
|
+
}
|
92
|
+
exports.MissingLedgerHistoryError = MissingLedgerHistoryError;
|
93
|
+
class PendingLedgerVersionError extends RippleError {
|
94
|
+
constructor(message) {
|
95
|
+
super(message ||
|
96
|
+
"maxLedgerVersion is greater than server's most recent" +
|
97
|
+
' validated ledger');
|
98
|
+
}
|
99
|
+
}
|
100
|
+
exports.PendingLedgerVersionError = PendingLedgerVersionError;
|
101
|
+
//# sourceMappingURL=errors.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/common/errors.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA4B;AAC5B,8DAA+C;AAE/C,MAAM,WAAY,SAAQ,KAAK;IAK7B,YAAY,OAAO,GAAG,EAAE,EAAE,IAAU;QAClC,KAAK,CAAC,OAAO,CAAC,CAAA;QAEd,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAA;QACjD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,KAAK,CAAC,iBAAiB,EAAE;YAC3B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;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D,CAAC,CAAA;IAC7E,CAAC;CACF;AAyBC,8DAAyB;AAvB3B,MAAM,yBAA0B,SAAQ,WAAW;IACjD,YAAY,OAAgB;QAC1B,KAAK,CACH,OAAO;YACL,uDAAuD;gBACrD,mBAAmB,CACxB,CAAA;IACH,CAAC;CACF;AAcC,8DAAyB"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
declare enum HashPrefix {
|
2
|
+
TRANSACTION_ID = 1415073280,
|
3
|
+
TRANSACTION_NODE = 1397638144,
|
4
|
+
INNER_NODE = 1296649728,
|
5
|
+
LEAF_NODE = 1296846336,
|
6
|
+
TRANSACTION_SIGN = 1398036480,
|
7
|
+
TRANSACTION_SIGN_TESTNET = 1937012736,
|
8
|
+
TRANSACTION_MULTISIGN = 1397576704,
|
9
|
+
LEDGER = 1280791040
|
10
|
+
}
|
11
|
+
export default HashPrefix;
|
12
|
+
//# sourceMappingURL=hash-prefix.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hash-prefix.d.ts","sourceRoot":"","sources":["../../../../src/common/hashes/hash-prefix.ts"],"names":[],"mappings":"AAaA,aAAK,UAAU;IAEb,cAAc,aAAa;IAG3B,gBAAgB,aAAa;IAG7B,UAAU,aAAa;IAGvB,SAAS,aAAa;IAGtB,gBAAgB,aAAa;IAG7B,wBAAwB,aAAa;IAGrC,qBAAqB,aAAa;IAGlC,MAAM,aAAa;CACpB;AAED,eAAe,UAAU,CAAA"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
var HashPrefix;
|
4
|
+
(function (HashPrefix) {
|
5
|
+
HashPrefix[HashPrefix["TRANSACTION_ID"] = 1415073280] = "TRANSACTION_ID";
|
6
|
+
HashPrefix[HashPrefix["TRANSACTION_NODE"] = 1397638144] = "TRANSACTION_NODE";
|
7
|
+
HashPrefix[HashPrefix["INNER_NODE"] = 1296649728] = "INNER_NODE";
|
8
|
+
HashPrefix[HashPrefix["LEAF_NODE"] = 1296846336] = "LEAF_NODE";
|
9
|
+
HashPrefix[HashPrefix["TRANSACTION_SIGN"] = 1398036480] = "TRANSACTION_SIGN";
|
10
|
+
HashPrefix[HashPrefix["TRANSACTION_SIGN_TESTNET"] = 1937012736] = "TRANSACTION_SIGN_TESTNET";
|
11
|
+
HashPrefix[HashPrefix["TRANSACTION_MULTISIGN"] = 1397576704] = "TRANSACTION_MULTISIGN";
|
12
|
+
HashPrefix[HashPrefix["LEDGER"] = 1280791040] = "LEDGER";
|
13
|
+
})(HashPrefix || (HashPrefix = {}));
|
14
|
+
exports.default = HashPrefix;
|
15
|
+
//# sourceMappingURL=hash-prefix.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hash-prefix.js","sourceRoot":"","sources":["../../../../src/common/hashes/hash-prefix.ts"],"names":[],"mappings":";;AAaA,IAAK,UAwBJ;AAxBD,WAAK,UAAU;IAEb,wEAA2B,CAAA;IAG3B,4EAA6B,CAAA;IAG7B,gEAAuB,CAAA;IAGvB,8DAAsB,CAAA;IAGtB,4EAA6B,CAAA;IAG7B,4FAAqC,CAAA;IAGrC,sFAAkC,CAAA;IAGlC,wDAAmB,CAAA;AACrB,CAAC,EAxBI,UAAU,KAAV,UAAU,QAwBd;AAED,kBAAe,UAAU,CAAA"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export declare const computeBinaryTransactionHash: (txBlobHex: string) => string;
|
2
|
+
export declare const computeTransactionHash: (txJSON: any) => string;
|
3
|
+
export declare const computeBinaryTransactionSigningHash: (txBlobHex: string) => string;
|
4
|
+
export declare const computeAccountLedgerObjectID: (address: string) => string;
|
5
|
+
export declare const computeSignerListLedgerObjectID: (address: string) => string;
|
6
|
+
export declare const computeOrderID: (address: string, sequence: number) => string;
|
7
|
+
export declare const computeTrustlineHash: (address1: string, address2: string, currency: string) => string;
|
8
|
+
export declare const computeTransactionTreeHash: (transactions: any[]) => string;
|
9
|
+
export declare const computeStateTreeHash: (entries: any[]) => string;
|
10
|
+
export declare const computeLedgerHash: (ledgerHeader: any) => string;
|
11
|
+
export declare const computeEscrowHash: (address: any, sequence: any) => string;
|
12
|
+
export declare const computePaymentChannelHash: (address: any, dstAddress: any, sequence: any) => string;
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/hashes/index.ts"],"names":[],"mappings":"AA6DA,eAAO,MAAM,4BAA4B,cAAe,MAAM,KAAG,MAGhE,CAAA;AAED,eAAO,MAAM,sBAAsB,WAAY,GAAG,KAAG,MAEpD,CAAA;AAUD,eAAO,MAAM,mCAAmC,cACnC,MAAM,KAChB,MAGF,CAAA;AAeD,eAAO,MAAM,4BAA4B,YAAa,MAAM,KAAG,MAE9D,CAAA;AAeD,eAAO,MAAM,+BAA+B,YAAa,MAAM,KAAG,MAIjE,CAAA;AAeD,eAAO,MAAM,cAAc,YAAa,MAAM,YAAY,MAAM,KAAG,MAGlE,CAAA;AAED,eAAO,MAAM,oBAAoB,aACrB,MAAM,YACN,MAAM,YACN,MAAM,KACf,MAcF,CAAA;AAED,eAAO,MAAM,0BAA0B,iBAAkB,GAAG,EAAE,KAAG,MAYhE,CAAA;AAED,eAAO,MAAM,oBAAoB,YAAa,GAAG,EAAE,KAAG,MASrD,CAAA;AAGD,eAAO,MAAM,iBAAiB,yBAAmB,MAchD,CAAA;AAED,eAAO,MAAM,iBAAiB,mCAAwB,MAIrD,CAAA;AAED,eAAO,MAAM,yBAAyB,oDAInC,MAOF,CAAA"}
|
@@ -0,0 +1,129 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.computePaymentChannelHash = exports.computeEscrowHash = exports.computeLedgerHash = exports.computeStateTreeHash = exports.computeTransactionTreeHash = exports.computeTrustlineHash = exports.computeOrderID = exports.computeSignerListLedgerObjectID = exports.computeAccountLedgerObjectID = exports.computeBinaryTransactionSigningHash = exports.computeTransactionHash = exports.computeBinaryTransactionHash = void 0;
|
7
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
8
|
+
const ripple_address_codec_1 = require("ripple-address-codec");
|
9
|
+
const sha512Half_1 = __importDefault(require("./sha512Half"));
|
10
|
+
const hash_prefix_1 = __importDefault(require("./hash-prefix"));
|
11
|
+
const shamap_1 = require("./shamap");
|
12
|
+
const ripple_binary_codec_1 = require("ripple-binary-codec");
|
13
|
+
const ledgerspaces_1 = __importDefault(require("./ledgerspaces"));
|
14
|
+
const padLeftZero = (string, length) => {
|
15
|
+
return Array(length - string.length + 1).join('0') + string;
|
16
|
+
};
|
17
|
+
const intToHex = (integer, byteLength) => {
|
18
|
+
return padLeftZero(Number(integer).toString(16), byteLength * 2);
|
19
|
+
};
|
20
|
+
const bytesToHex = (bytes) => {
|
21
|
+
return Buffer.from(bytes).toString('hex');
|
22
|
+
};
|
23
|
+
const bigintToHex = (integerString, byteLength) => {
|
24
|
+
const hex = new bignumber_js_1.default(integerString).toString(16);
|
25
|
+
return padLeftZero(hex, byteLength * 2);
|
26
|
+
};
|
27
|
+
const ledgerSpaceHex = (name) => {
|
28
|
+
return intToHex(ledgerspaces_1.default[name].charCodeAt(0), 2);
|
29
|
+
};
|
30
|
+
const addressToHex = (address) => {
|
31
|
+
return Buffer.from(ripple_address_codec_1.decodeAccountID(address)).toString('hex');
|
32
|
+
};
|
33
|
+
const currencyToHex = (currency) => {
|
34
|
+
if (currency.length === 3) {
|
35
|
+
const bytes = new Array(20 + 1).join('0').split('').map(parseFloat);
|
36
|
+
bytes[12] = currency.charCodeAt(0) & 0xff;
|
37
|
+
bytes[13] = currency.charCodeAt(1) & 0xff;
|
38
|
+
bytes[14] = currency.charCodeAt(2) & 0xff;
|
39
|
+
return bytesToHex(bytes);
|
40
|
+
}
|
41
|
+
return currency;
|
42
|
+
};
|
43
|
+
const addLengthPrefix = (hex) => {
|
44
|
+
const length = hex.length / 2;
|
45
|
+
if (length <= 192) {
|
46
|
+
return bytesToHex([length]) + hex;
|
47
|
+
}
|
48
|
+
else if (length <= 12480) {
|
49
|
+
const x = length - 193;
|
50
|
+
return bytesToHex([193 + (x >>> 8), x & 0xff]) + hex;
|
51
|
+
}
|
52
|
+
else if (length <= 918744) {
|
53
|
+
const x = length - 12481;
|
54
|
+
return bytesToHex([241 + (x >>> 16), (x >>> 8) & 0xff, x & 0xff]) + hex;
|
55
|
+
}
|
56
|
+
throw new Error('Variable integer overflow.');
|
57
|
+
};
|
58
|
+
exports.computeBinaryTransactionHash = (txBlobHex) => {
|
59
|
+
const prefix = hash_prefix_1.default.TRANSACTION_ID.toString(16).toUpperCase();
|
60
|
+
return sha512Half_1.default(prefix + txBlobHex);
|
61
|
+
};
|
62
|
+
exports.computeTransactionHash = (txJSON) => {
|
63
|
+
return exports.computeBinaryTransactionHash(ripple_binary_codec_1.encode(txJSON));
|
64
|
+
};
|
65
|
+
exports.computeBinaryTransactionSigningHash = (txBlobHex) => {
|
66
|
+
const prefix = hash_prefix_1.default.TRANSACTION_SIGN.toString(16).toUpperCase();
|
67
|
+
return sha512Half_1.default(prefix + txBlobHex);
|
68
|
+
};
|
69
|
+
exports.computeAccountLedgerObjectID = (address) => {
|
70
|
+
return sha512Half_1.default(ledgerSpaceHex('account') + addressToHex(address));
|
71
|
+
};
|
72
|
+
exports.computeSignerListLedgerObjectID = (address) => {
|
73
|
+
return sha512Half_1.default(ledgerSpaceHex('signerList') + addressToHex(address) + '00000000');
|
74
|
+
};
|
75
|
+
exports.computeOrderID = (address, sequence) => {
|
76
|
+
const prefix = '00' + intToHex(ledgerspaces_1.default.offer.charCodeAt(0), 1);
|
77
|
+
return sha512Half_1.default(prefix + addressToHex(address) + intToHex(sequence, 4));
|
78
|
+
};
|
79
|
+
exports.computeTrustlineHash = (address1, address2, currency) => {
|
80
|
+
const address1Hex = addressToHex(address1);
|
81
|
+
const address2Hex = addressToHex(address2);
|
82
|
+
const swap = new bignumber_js_1.default(address1Hex, 16).isGreaterThan(new bignumber_js_1.default(address2Hex, 16));
|
83
|
+
const lowAddressHex = swap ? address2Hex : address1Hex;
|
84
|
+
const highAddressHex = swap ? address1Hex : address2Hex;
|
85
|
+
const prefix = ledgerSpaceHex('rippleState');
|
86
|
+
return sha512Half_1.default(prefix + lowAddressHex + highAddressHex + currencyToHex(currency));
|
87
|
+
};
|
88
|
+
exports.computeTransactionTreeHash = (transactions) => {
|
89
|
+
const shamap = new shamap_1.SHAMap();
|
90
|
+
transactions.forEach((txJSON) => {
|
91
|
+
const txBlobHex = ripple_binary_codec_1.encode(txJSON);
|
92
|
+
const metaHex = ripple_binary_codec_1.encode(txJSON.metaData);
|
93
|
+
const txHash = exports.computeBinaryTransactionHash(txBlobHex);
|
94
|
+
const data = addLengthPrefix(txBlobHex) + addLengthPrefix(metaHex);
|
95
|
+
shamap.addItem(txHash, data, shamap_1.NodeType.TRANSACTION_METADATA);
|
96
|
+
});
|
97
|
+
return shamap.hash;
|
98
|
+
};
|
99
|
+
exports.computeStateTreeHash = (entries) => {
|
100
|
+
const shamap = new shamap_1.SHAMap();
|
101
|
+
entries.forEach((ledgerEntry) => {
|
102
|
+
const data = ripple_binary_codec_1.encode(ledgerEntry);
|
103
|
+
shamap.addItem(ledgerEntry.index, data, shamap_1.NodeType.ACCOUNT_STATE);
|
104
|
+
});
|
105
|
+
return shamap.hash;
|
106
|
+
};
|
107
|
+
exports.computeLedgerHash = (ledgerHeader) => {
|
108
|
+
const prefix = hash_prefix_1.default.LEDGER.toString(16).toUpperCase();
|
109
|
+
return sha512Half_1.default(prefix +
|
110
|
+
intToHex(ledgerHeader.ledger_index, 4) +
|
111
|
+
bigintToHex(ledgerHeader.total_coins, 8) +
|
112
|
+
ledgerHeader.parent_hash +
|
113
|
+
ledgerHeader.transaction_hash +
|
114
|
+
ledgerHeader.account_hash +
|
115
|
+
intToHex(ledgerHeader.parent_close_time, 4) +
|
116
|
+
intToHex(ledgerHeader.close_time, 4) +
|
117
|
+
intToHex(ledgerHeader.close_time_resolution, 1) +
|
118
|
+
intToHex(ledgerHeader.close_flags, 1));
|
119
|
+
};
|
120
|
+
exports.computeEscrowHash = (address, sequence) => {
|
121
|
+
return sha512Half_1.default(ledgerSpaceHex('escrow') + addressToHex(address) + intToHex(sequence, 4));
|
122
|
+
};
|
123
|
+
exports.computePaymentChannelHash = (address, dstAddress, sequence) => {
|
124
|
+
return sha512Half_1.default(ledgerSpaceHex('paychan') +
|
125
|
+
addressToHex(address) +
|
126
|
+
addressToHex(dstAddress) +
|
127
|
+
intToHex(sequence, 4));
|
128
|
+
};
|
129
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/hashes/index.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAoC;AACpC,+DAAoD;AACpD,8DAAqC;AACrC,gEAAsC;AACtC,qCAAyC;AACzC,6DAA0C;AAC1C,kEAAyC;AAEzC,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,MAAc,EAAU,EAAE;IAC7D,OAAO,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAA;AAC7D,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAE,UAAkB,EAAU,EAAE;IAC/D,OAAO,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,UAAU,GAAG,CAAC,CAAC,CAAA;AAClE,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,KAAe,EAAU,EAAE;IAC7C,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KA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EAAU,EAAE;IACxD,MAAM,MAAM,GAAG,qBAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAA;IAC3D,OAAO,oBAAU,CACf,MAAM;QACJ,QAAQ,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,CAAC;QACtC,WAAW,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,CAAC;QACxC,YAAY,CAAC,WAAW;QACxB,YAAY,CAAC,gBAAgB;QAC7B,YAAY,CAAC,YAAY;QACzB,QAAQ,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAC3C,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC;QACpC,QAAQ,CAAC,YAAY,CAAC,qBAAqB,EAAE,CAAC,CAAC;QAC/C,QAAQ,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,CAAC,CACxC,CAAA;AACH,CAAC,CAAA;AAEY,QAAA,iBAAiB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAU,EAAE;IAC7D,OAAO,oBAAU,CACf,cAAc,CAAC,QAAQ,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CACzE,CAAA;AACH,CAAC,CAAA;AAEY,QAAA,yBAAyB,GAAG,CACvC,OAAO,EACP,UAAU,EACV,QAAQ,EACA,EAAE;IACV,OAAO,oBAAU,CACf,cAAc,CAAC,SAAS,CAAC;QACvB,YAAY,CAAC,OAAO,CAAC;QACrB,YAAY,CAAC,UAAU,CAAC;QACxB,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CACxB,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
account: string;
|
3
|
+
dirNode: string;
|
4
|
+
generatorMap: string;
|
5
|
+
rippleState: string;
|
6
|
+
offer: string;
|
7
|
+
ownerDir: string;
|
8
|
+
bookDir: string;
|
9
|
+
contract: string;
|
10
|
+
skipList: string;
|
11
|
+
escrow: string;
|
12
|
+
amendment: string;
|
13
|
+
feeSettings: string;
|
14
|
+
ticket: string;
|
15
|
+
signerList: string;
|
16
|
+
paychan: string;
|
17
|
+
check: string;
|
18
|
+
depositPreauth: string;
|
19
|
+
};
|
20
|
+
export default _default;
|
21
|
+
//# sourceMappingURL=ledgerspaces.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ledgerspaces.d.ts","sourceRoot":"","sources":["../../../../src/common/hashes/ledgerspaces.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAUA,wBAkBC"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.default = {
|
4
|
+
account: 'a',
|
5
|
+
dirNode: 'd',
|
6
|
+
generatorMap: 'g',
|
7
|
+
rippleState: 'r',
|
8
|
+
offer: 'o',
|
9
|
+
ownerDir: 'O',
|
10
|
+
bookDir: 'B',
|
11
|
+
contract: 'c',
|
12
|
+
skipList: 's',
|
13
|
+
escrow: 'u',
|
14
|
+
amendment: 'f',
|
15
|
+
feeSettings: 'e',
|
16
|
+
ticket: 'T',
|
17
|
+
signerList: 'S',
|
18
|
+
paychan: 'x',
|
19
|
+
check: 'C',
|
20
|
+
depositPreauth: 'p'
|
21
|
+
};
|
22
|
+
//# sourceMappingURL=ledgerspaces.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ledgerspaces.js","sourceRoot":"","sources":["../../../../src/common/hashes/ledgerspaces.ts"],"names":[],"mappings":";;AAUA,kBAAe;IACb,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,GAAG;IACZ,YAAY,EAAE,GAAG;IACjB,WAAW,EAAE,GAAG;IAChB,KAAK,EAAE,GAAG;IACV,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,GAAG;IACX,SAAS,EAAE,GAAG;IACd,WAAW,EAAE,GAAG;IAChB,MAAM,EAAE,GAAG;IACX,UAAU,EAAE,GAAG;IACf,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,GAAG;IACV,cAAc,EAAE,GAAG;CACpB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sha512Half.d.ts","sourceRoot":"","sources":["../../../../src/common/hashes/sha512Half.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,UAAU,QAAS,MAAM,KAAG,MAMjC,CAAA;AAED,eAAe,UAAU,CAAA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const crypto_1 = require("crypto");
|
4
|
+
const sha512Half = (hex) => {
|
5
|
+
return crypto_1.createHash('sha512')
|
6
|
+
.update(Buffer.from(hex, 'hex'))
|
7
|
+
.digest('hex')
|
8
|
+
.toUpperCase()
|
9
|
+
.slice(0, 64);
|
10
|
+
};
|
11
|
+
exports.default = sha512Half;
|
12
|
+
//# sourceMappingURL=sha512Half.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sha512Half.js","sourceRoot":"","sources":["../../../../src/common/hashes/sha512Half.ts"],"names":[],"mappings":";;AAAA,mCAAiC;AAEjC,MAAM,UAAU,GAAG,CAAC,GAAW,EAAU,EAAE;IACzC,OAAO,mBAAU,CAAC,QAAQ,CAAC;SACxB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAC/B,MAAM,CAAC,KAAK,CAAC;SACb,WAAW,EAAE;SACb,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA;AAED,kBAAe,UAAU,CAAA"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
export declare enum NodeType {
|
2
|
+
INNER = 1,
|
3
|
+
TRANSACTION_NO_METADATA = 2,
|
4
|
+
TRANSACTION_METADATA = 3,
|
5
|
+
ACCOUNT_STATE = 4
|
6
|
+
}
|
7
|
+
export declare abstract class Node {
|
8
|
+
constructor();
|
9
|
+
addItem(_tag: string, _node: Node): void;
|
10
|
+
get hash(): string | void;
|
11
|
+
}
|
12
|
+
export declare class InnerNode extends Node {
|
13
|
+
leaves: {
|
14
|
+
[slot: number]: Node;
|
15
|
+
};
|
16
|
+
type: NodeType;
|
17
|
+
depth: number;
|
18
|
+
empty: boolean;
|
19
|
+
constructor(depth?: number);
|
20
|
+
addItem(tag: string, node: Node): void;
|
21
|
+
setNode(slot: number, node: Node): void;
|
22
|
+
getNode(slot: number): Node;
|
23
|
+
get hash(): string;
|
24
|
+
}
|
25
|
+
export declare class Leaf extends Node {
|
26
|
+
tag: string;
|
27
|
+
type: NodeType;
|
28
|
+
data: string;
|
29
|
+
constructor(tag: string, data: string, type: NodeType);
|
30
|
+
get hash(): string | void;
|
31
|
+
}
|
32
|
+
export declare class SHAMap {
|
33
|
+
root: InnerNode;
|
34
|
+
constructor();
|
35
|
+
addItem(tag: string, data: string, type: NodeType): void;
|
36
|
+
get hash(): string;
|
37
|
+
}
|
38
|
+
//# sourceMappingURL=shamap.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"shamap.d.ts","sourceRoot":"","sources":["../../../../src/common/hashes/shamap.ts"],"names":[],"mappings":"AAKA,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,uBAAuB,IAAI;IAC3B,oBAAoB,IAAI;IACxB,aAAa,IAAI;CAClB;AAED,8BAAsB,IAAI;;IAQjB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI;IAK/C,IAAW,IAAI,IAAI,MAAM,GAAG,IAAI,CAE/B;CACF;AAED,qBAAa,SAAU,SAAQ,IAAI;IAC1B,MAAM,EAAE;QAAC,CAAC,IAAI,EAAE,MAAM,G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