@bithomp/xrpl-api 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +101 -0
- package/lib/base58.d.ts +3 -0
- package/lib/base58.js +33 -0
- package/lib/client.d.ts +19 -0
- package/lib/client.js +122 -0
- package/lib/common/errors/index.d.ts +3 -0
- package/lib/common/errors/index.js +7 -0
- package/lib/common/errors/ripple_error.d.ts +9 -0
- package/lib/common/errors/ripple_error.js +28 -0
- package/lib/common/errors/utils.d.ts +2 -0
- package/lib/common/errors/utils.js +19 -0
- package/lib/common/errors/validation_error.d.ts +4 -0
- package/lib/common/errors/validation_error.js +7 -0
- package/lib/common/index.d.ts +6 -0
- package/lib/common/index.js +44 -0
- package/lib/common/sha512Half.d.ts +2 -0
- package/lib/common/sha512Half.js +12 -0
- package/lib/common/utils.d.ts +10 -0
- package/lib/common/utils.js +113 -0
- package/lib/connection.d.ts +57 -0
- package/lib/connection.js +369 -0
- package/lib/faucet.d.ts +58 -0
- package/lib/faucet.js +89 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +35 -0
- package/lib/ledger/account_info.d.ts +12 -0
- package/lib/ledger/account_info.js +78 -0
- package/lib/ledger/account_lines.d.ts +11 -0
- package/lib/ledger/account_lines.js +69 -0
- package/lib/ledger/account_nfts.d.ts +21 -0
- package/lib/ledger/account_nfts.js +185 -0
- package/lib/ledger/account_objects.d.ts +28 -0
- package/lib/ledger/account_objects.js +169 -0
- package/lib/ledger/account_offers.d.ts +8 -0
- package/lib/ledger/account_offers.js +67 -0
- package/lib/ledger/account_tx.d.ts +29 -0
- package/lib/ledger/account_tx.js +256 -0
- package/lib/ledger/book_offers.d.ts +11 -0
- package/lib/ledger/book_offers.js +90 -0
- package/lib/ledger/currency.d.ts +27 -0
- package/lib/ledger/currency.js +167 -0
- package/lib/ledger/fee.d.ts +5 -0
- package/lib/ledger/fee.js +45 -0
- package/lib/ledger/gateway_balances.d.ts +13 -0
- package/lib/ledger/gateway_balances.js +101 -0
- package/lib/ledger/index.d.ts +16 -0
- package/lib/ledger/index.js +32 -0
- package/lib/ledger/ledger.d.ts +11 -0
- package/lib/ledger/ledger.js +72 -0
- package/lib/ledger/manifest.d.ts +8 -0
- package/lib/ledger/manifest.js +56 -0
- package/lib/ledger/nft_info.d.ts +4 -0
- package/lib/ledger/nft_info.js +56 -0
- package/lib/ledger/server_info.d.ts +8 -0
- package/lib/ledger/server_info.js +54 -0
- package/lib/ledger/transaction.d.ts +37 -0
- package/lib/ledger/transaction.js +214 -0
- package/lib/ledger/vl.d.ts +10 -0
- package/lib/ledger/vl.js +92 -0
- package/lib/models/account_info.d.ts +122 -0
- package/lib/models/account_info.js +102 -0
- package/lib/models/account_lines.d.ts +24 -0
- package/lib/models/account_lines.js +2 -0
- package/lib/models/account_nfts.d.ts +19 -0
- package/lib/models/account_nfts.js +45 -0
- package/lib/models/account_object.d.ts +38 -0
- package/lib/models/account_object.js +61 -0
- package/lib/models/base_model.d.ts +14 -0
- package/lib/models/base_model.js +2 -0
- package/lib/models/book_offers.d.ts +9 -0
- package/lib/models/book_offers.js +41 -0
- package/lib/models/index.d.ts +23 -0
- package/lib/models/index.js +56 -0
- package/lib/models/ledger.d.ts +6 -0
- package/lib/models/ledger.js +20 -0
- package/lib/models/manifest.d.ts +26 -0
- package/lib/models/manifest.js +187 -0
- package/lib/models/transaction/affected_objects.d.ts +6 -0
- package/lib/models/transaction/affected_objects.js +104 -0
- package/lib/models/transaction/balance_changes.d.ts +7 -0
- package/lib/models/transaction/balance_changes.js +125 -0
- package/lib/models/transaction/channel_changes.d.ts +9 -0
- package/lib/models/transaction/channel_changes.js +57 -0
- package/lib/models/transaction/locked_balance_changes.d.ts +7 -0
- package/lib/models/transaction/locked_balance_changes.js +114 -0
- package/lib/models/transaction/nftoken_changes.d.ts +1 -0
- package/lib/models/transaction/nftoken_changes.js +163 -0
- package/lib/models/transaction/nftoken_offer_changes.d.ts +1 -0
- package/lib/models/transaction/nftoken_offer_changes.js +107 -0
- package/lib/models/transaction/orderbook_changes.d.ts +3 -0
- package/lib/models/transaction/orderbook_changes.js +136 -0
- package/lib/models/transaction/quality.d.ts +2 -0
- package/lib/models/transaction/quality.js +46 -0
- package/lib/models/transaction.d.ts +39 -0
- package/lib/models/transaction.js +45 -0
- package/lib/models/trustline.d.ts +15 -0
- package/lib/models/trustline.js +2 -0
- package/lib/models/utils.d.ts +3 -0
- package/lib/models/utils.js +19 -0
- package/lib/models/vl.d.ts +60 -0
- package/lib/models/vl.js +377 -0
- package/lib/parse/index.d.ts +3 -0
- package/lib/parse/index.js +32 -0
- package/lib/parse/ledger/account-order.d.ts +10 -0
- package/lib/parse/ledger/account-order.js +39 -0
- package/lib/parse/ledger/account-trustline.d.ts +3 -0
- package/lib/parse/ledger/account-trustline.js +27 -0
- package/lib/parse/ledger/amount.d.ts +3 -0
- package/lib/parse/ledger/amount.js +17 -0
- package/lib/parse/ledger/currency-amount.d.ts +3 -0
- package/lib/parse/ledger/currency-amount.js +13 -0
- package/lib/parse/ledger/fields.d.ts +2 -0
- package/lib/parse/ledger/fields.js +42 -0
- package/lib/parse/ledger/flags.d.ts +4 -0
- package/lib/parse/ledger/flags.js +18 -0
- package/lib/parse/ledger/index.d.ts +4 -0
- package/lib/parse/ledger/index.js +25 -0
- package/lib/parse/ledger/ledger.d.ts +2 -0
- package/lib/parse/ledger/ledger.js +61 -0
- package/lib/parse/ledger/memos.d.ts +3 -0
- package/lib/parse/ledger/memos.js +17 -0
- package/lib/parse/ledger/nftoken-flags.d.ts +5 -0
- package/lib/parse/ledger/nftoken-flags.js +8 -0
- package/lib/parse/ledger/nftoken-offer-flags.d.ts +5 -0
- package/lib/parse/ledger/nftoken-offer-flags.js +8 -0
- package/lib/parse/ledger/orderbook-order.d.ts +16 -0
- package/lib/parse/ledger/orderbook-order.js +39 -0
- package/lib/parse/ledger/pathfind.d.ts +4 -0
- package/lib/parse/ledger/pathfind.js +41 -0
- package/lib/parse/ledger/payment-channel.d.ts +16 -0
- package/lib/parse/ledger/payment-channel.js +27 -0
- package/lib/parse/ledger/ripple-amount.d.ts +3 -0
- package/lib/parse/ledger/ripple-amount.js +17 -0
- package/lib/parse/outcome/affected_objects.d.ts +6 -0
- package/lib/parse/outcome/affected_objects.js +109 -0
- package/lib/parse/outcome/balance_changes.d.ts +7 -0
- package/lib/parse/outcome/balance_changes.js +103 -0
- package/lib/parse/outcome/channel_changes.d.ts +9 -0
- package/lib/parse/outcome/channel_changes.js +53 -0
- package/lib/parse/outcome/index.d.ts +7 -0
- package/lib/parse/outcome/index.js +17 -0
- package/lib/parse/outcome/locked_balance_changes.d.ts +7 -0
- package/lib/parse/outcome/locked_balance_changes.js +92 -0
- package/lib/parse/outcome/nftoken_changes.d.ts +1 -0
- package/lib/parse/outcome/nftoken_changes.js +143 -0
- package/lib/parse/outcome/nftoken_offer_changes.d.ts +2 -0
- package/lib/parse/outcome/nftoken_offer_changes.js +107 -0
- package/lib/parse/outcome/orderbook_changes.d.ts +3 -0
- package/lib/parse/outcome/orderbook_changes.js +111 -0
- package/lib/parse/outcome/orderbook_quality.d.ts +2 -0
- package/lib/parse/outcome/orderbook_quality.js +45 -0
- package/lib/parse/outcome.d.ts +3 -0
- package/lib/parse/outcome.js +80 -0
- package/lib/parse/specification/account-delete.d.ts +3 -0
- package/lib/parse/specification/account-delete.js +42 -0
- package/lib/parse/specification/amendment.d.ts +3 -0
- package/lib/parse/specification/amendment.js +14 -0
- package/lib/parse/specification/check-cancel.d.ts +3 -0
- package/lib/parse/specification/check-cancel.js +39 -0
- package/lib/parse/specification/check-cash.d.ts +3 -0
- package/lib/parse/specification/check-cash.js +42 -0
- package/lib/parse/specification/check-create.d.ts +3 -0
- package/lib/parse/specification/check-create.js +45 -0
- package/lib/parse/specification/deposit-preauth.d.ts +3 -0
- package/lib/parse/specification/deposit-preauth.js +40 -0
- package/lib/parse/specification/escrow-cancel.d.ts +3 -0
- package/lib/parse/specification/escrow-cancel.js +40 -0
- package/lib/parse/specification/escrow-create.d.ts +3 -0
- package/lib/parse/specification/escrow-create.js +47 -0
- package/lib/parse/specification/escrow-finish.d.ts +3 -0
- package/lib/parse/specification/escrow-finish.js +42 -0
- package/lib/parse/specification/fee-update.d.ts +3 -0
- package/lib/parse/specification/fee-update.js +19 -0
- package/lib/parse/specification/nftoken-accept-offer.d.ts +3 -0
- package/lib/parse/specification/nftoken-accept-offer.js +41 -0
- package/lib/parse/specification/nftoken-burn.d.ts +3 -0
- package/lib/parse/specification/nftoken-burn.js +40 -0
- package/lib/parse/specification/nftoken-cancel-offer.d.ts +3 -0
- package/lib/parse/specification/nftoken-cancel-offer.js +39 -0
- package/lib/parse/specification/nftoken-create-offer.d.ts +3 -0
- package/lib/parse/specification/nftoken-create-offer.js +50 -0
- package/lib/parse/specification/nftoken-mint.d.ts +3 -0
- package/lib/parse/specification/nftoken-mint.js +44 -0
- package/lib/parse/specification/offer-cancel.d.ts +3 -0
- package/lib/parse/specification/offer-cancel.js +38 -0
- package/lib/parse/specification/offer-create.d.ts +3 -0
- package/lib/parse/specification/offer-create.js +53 -0
- package/lib/parse/specification/payment-channel-claim.d.ts +3 -0
- package/lib/parse/specification/payment-channel-claim.js +47 -0
- package/lib/parse/specification/payment-channel-create.d.ts +3 -0
- package/lib/parse/specification/payment-channel-create.js +47 -0
- package/lib/parse/specification/payment-channel-fund.d.ts +3 -0
- package/lib/parse/specification/payment-channel-fund.js +43 -0
- package/lib/parse/specification/payment-channel.d.ts +16 -0
- package/lib/parse/specification/payment-channel.js +27 -0
- package/lib/parse/specification/payment.d.ts +3 -0
- package/lib/parse/specification/payment.js +67 -0
- package/lib/parse/specification/settings.d.ts +2 -0
- package/lib/parse/specification/settings.js +80 -0
- package/lib/parse/specification/ticket-create.d.ts +3 -0
- package/lib/parse/specification/ticket-create.js +39 -0
- package/lib/parse/specification/trustline.d.ts +3 -0
- package/lib/parse/specification/trustline.js +57 -0
- package/lib/parse/transaction.d.ts +27 -0
- package/lib/parse/transaction.js +114 -0
- package/lib/parse/utils.d.ts +6 -0
- package/lib/parse/utils.js +38 -0
- package/lib/types/amounts.d.ts +16 -0
- package/lib/types/amounts.js +2 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +2 -0
- package/lib/v1/common/constants.d.ts +16 -0
- package/lib/v1/common/constants.js +6 -0
- package/lib/v1/common/errors/index.d.ts +3 -0
- package/lib/v1/common/errors/index.js +7 -0
- package/lib/v1/common/errors/ripple_error.d.ts +9 -0
- package/lib/v1/common/errors/ripple_error.js +28 -0
- package/lib/v1/common/errors/utils.d.ts +2 -0
- package/lib/v1/common/errors/utils.js +19 -0
- package/lib/v1/common/errors/validation_error.d.ts +4 -0
- package/lib/v1/common/errors/validation_error.js +7 -0
- package/lib/v1/common/index.d.ts +3 -0
- package/lib/v1/common/index.js +31 -0
- package/lib/v1/common/txflags.d.ts +51 -0
- package/lib/v1/common/txflags.js +55 -0
- package/lib/v1/common/types/commands/account_info.d.ts +17 -0
- package/lib/v1/common/types/commands/account_info.js +2 -0
- package/lib/v1/common/types/commands/account_lines.d.ts +17 -0
- package/lib/v1/common/types/commands/account_lines.js +2 -0
- package/lib/v1/common/types/commands/account_objects.d.ts +26 -0
- package/lib/v1/common/types/commands/account_objects.js +2 -0
- package/lib/v1/common/types/commands/account_offers.d.ts +24 -0
- package/lib/v1/common/types/commands/account_offers.js +2 -0
- package/lib/v1/common/types/commands/book_offers.d.ts +23 -0
- package/lib/v1/common/types/commands/book_offers.js +2 -0
- package/lib/v1/common/types/commands/gateway_balances.d.ts +23 -0
- package/lib/v1/common/types/commands/gateway_balances.js +2 -0
- package/lib/v1/common/types/commands/index.d.ts +10 -0
- package/lib/v1/common/types/commands/index.js +26 -0
- package/lib/v1/common/types/commands/ledger.d.ts +18 -0
- package/lib/v1/common/types/commands/ledger.js +2 -0
- package/lib/v1/common/types/commands/ledger_data.d.ts +10 -0
- package/lib/v1/common/types/commands/ledger_data.js +2 -0
- package/lib/v1/common/types/commands/ledger_entry.d.ts +29 -0
- package/lib/v1/common/types/commands/ledger_entry.js +2 -0
- package/lib/v1/common/types/commands/path_find.d.ts +33 -0
- package/lib/v1/common/types/commands/path_find.js +2 -0
- package/lib/v1/common/types/commands/server_info.d.ts +49 -0
- package/lib/v1/common/types/commands/server_info.js +2 -0
- package/lib/v1/common/types/objects/account.d.ts +6 -0
- package/lib/v1/common/types/objects/account.js +2 -0
- package/lib/v1/common/types/objects/adjustments.d.ts +16 -0
- package/lib/v1/common/types/objects/adjustments.js +2 -0
- package/lib/v1/common/types/objects/amendments.d.ts +4 -0
- package/lib/v1/common/types/objects/amendments.js +2 -0
- package/lib/v1/common/types/objects/amounts.d.ts +13 -0
- package/lib/v1/common/types/objects/amounts.js +2 -0
- package/lib/v1/common/types/objects/checks.d.ts +17 -0
- package/lib/v1/common/types/objects/checks.js +2 -0
- package/lib/v1/common/types/objects/deposits.d.ts +5 -0
- package/lib/v1/common/types/objects/deposits.js +2 -0
- package/lib/v1/common/types/objects/escrows.d.ts +21 -0
- package/lib/v1/common/types/objects/escrows.js +2 -0
- package/lib/v1/common/types/objects/fees.d.ts +7 -0
- package/lib/v1/common/types/objects/fees.js +2 -0
- package/lib/v1/common/types/objects/flags.d.ts +5 -0
- package/lib/v1/common/types/objects/flags.js +8 -0
- package/lib/v1/common/types/objects/index.d.ts +15 -0
- package/lib/v1/common/types/objects/index.js +31 -0
- package/lib/v1/common/types/objects/ledger.d.ts +45 -0
- package/lib/v1/common/types/objects/ledger.js +2 -0
- package/lib/v1/common/types/objects/ledger_data.d.ts +10 -0
- package/lib/v1/common/types/objects/ledger_data.js +2 -0
- package/lib/v1/common/types/objects/ledger_entries.d.ts +158 -0
- package/lib/v1/common/types/objects/ledger_entries.js +2 -0
- package/lib/v1/common/types/objects/memos.d.ts +12 -0
- package/lib/v1/common/types/objects/memos.js +2 -0
- package/lib/v1/common/types/objects/nftokens.d.ts +47 -0
- package/lib/v1/common/types/objects/nftokens.js +13 -0
- package/lib/v1/common/types/objects/offers.d.ts +15 -0
- package/lib/v1/common/types/objects/offers.js +2 -0
- package/lib/v1/common/types/objects/orders.d.ts +13 -0
- package/lib/v1/common/types/objects/orders.js +2 -0
- package/lib/v1/common/types/objects/path_find.d.ts +27 -0
- package/lib/v1/common/types/objects/path_find.js +2 -0
- package/lib/v1/common/types/objects/payment_channels.d.ts +25 -0
- package/lib/v1/common/types/objects/payment_channels.js +2 -0
- package/lib/v1/common/types/objects/payments.d.ts +20 -0
- package/lib/v1/common/types/objects/payments.js +2 -0
- package/lib/v1/common/types/objects/queue_data.d.ts +15 -0
- package/lib/v1/common/types/objects/queue_data.js +2 -0
- package/lib/v1/common/types/objects/settings.d.ts +34 -0
- package/lib/v1/common/types/objects/settings.js +2 -0
- package/lib/v1/common/types/objects/signers.d.ts +6 -0
- package/lib/v1/common/types/objects/signers.js +2 -0
- package/lib/v1/common/types/objects/specification.d.ts +4 -0
- package/lib/v1/common/types/objects/specification.js +2 -0
- package/lib/v1/common/types/objects/tickets.d.ts +4 -0
- package/lib/v1/common/types/objects/tickets.js +2 -0
- package/lib/v1/common/types/objects/transactions.d.ts +21 -0
- package/lib/v1/common/types/objects/transactions.js +2 -0
- package/lib/v1/common/types/objects/trustlines.d.ts +38 -0
- package/lib/v1/common/types/objects/trustlines.js +2 -0
- package/lib/v1/common/types/pathfind-types.d.ts +59 -0
- package/lib/v1/common/types/pathfind-types.js +2 -0
- package/lib/v1/common/utils.d.ts +6 -0
- package/lib/v1/common/utils.js +58 -0
- package/lib/v1/index.d.ts +2 -0
- package/lib/v1/index.js +28 -0
- package/lib/v1/ledger/index.d.ts +1 -0
- package/lib/v1/ledger/index.js +27 -0
- package/lib/v1/ledger/parse/account-delete.d.ts +7 -0
- package/lib/v1/ledger/parse/account-delete.js +42 -0
- package/lib/v1/ledger/parse/account-order.d.ts +10 -0
- package/lib/v1/ledger/parse/account-order.js +39 -0
- package/lib/v1/ledger/parse/account-trustline.d.ts +3 -0
- package/lib/v1/ledger/parse/account-trustline.js +27 -0
- package/lib/v1/ledger/parse/amendment.d.ts +5 -0
- package/lib/v1/ledger/parse/amendment.js +14 -0
- package/lib/v1/ledger/parse/amount.d.ts +3 -0
- package/lib/v1/ledger/parse/amount.js +40 -0
- package/lib/v1/ledger/parse/cancellation.d.ts +2 -0
- package/lib/v1/ledger/parse/cancellation.js +38 -0
- package/lib/v1/ledger/parse/check-cancel.d.ts +5 -0
- package/lib/v1/ledger/parse/check-cancel.js +39 -0
- package/lib/v1/ledger/parse/check-cash.d.ts +8 -0
- package/lib/v1/ledger/parse/check-cash.js +42 -0
- package/lib/v1/ledger/parse/check-create.d.ts +10 -0
- package/lib/v1/ledger/parse/check-create.js +45 -0
- package/lib/v1/ledger/parse/currency-amount.d.ts +3 -0
- package/lib/v1/ledger/parse/currency-amount.js +13 -0
- package/lib/v1/ledger/parse/deposit-preauth.d.ts +6 -0
- package/lib/v1/ledger/parse/deposit-preauth.js +40 -0
- package/lib/v1/ledger/parse/escrow-cancellation.d.ts +2 -0
- package/lib/v1/ledger/parse/escrow-cancellation.js +40 -0
- package/lib/v1/ledger/parse/escrow-creation.d.ts +2 -0
- package/lib/v1/ledger/parse/escrow-creation.js +47 -0
- package/lib/v1/ledger/parse/escrow-execution.d.ts +2 -0
- package/lib/v1/ledger/parse/escrow-execution.js +42 -0
- package/lib/v1/ledger/parse/fee-update.d.ts +8 -0
- package/lib/v1/ledger/parse/fee-update.js +19 -0
- package/lib/v1/ledger/parse/fields.d.ts +2 -0
- package/lib/v1/ledger/parse/fields.js +42 -0
- package/lib/v1/ledger/parse/flags.d.ts +15 -0
- package/lib/v1/ledger/parse/flags.js +19 -0
- package/lib/v1/ledger/parse/index.d.ts +4 -0
- package/lib/v1/ledger/parse/index.js +25 -0
- package/lib/v1/ledger/parse/ledger.d.ts +18 -0
- package/lib/v1/ledger/parse/ledger.js +77 -0
- package/lib/v1/ledger/parse/memos.d.ts +3 -0
- package/lib/v1/ledger/parse/memos.js +17 -0
- package/lib/v1/ledger/parse/order.d.ts +3 -0
- package/lib/v1/ledger/parse/order.js +53 -0
- package/lib/v1/ledger/parse/orderbook-order.d.ts +16 -0
- package/lib/v1/ledger/parse/orderbook-order.js +66 -0
- package/lib/v1/ledger/parse/pathfind.d.ts +3 -0
- package/lib/v1/ledger/parse/pathfind.js +66 -0
- package/lib/v1/ledger/parse/payment-channel-claim.d.ts +2 -0
- package/lib/v1/ledger/parse/payment-channel-claim.js +47 -0
- package/lib/v1/ledger/parse/payment-channel-create.d.ts +2 -0
- package/lib/v1/ledger/parse/payment-channel-create.js +47 -0
- package/lib/v1/ledger/parse/payment-channel-fund.d.ts +2 -0
- package/lib/v1/ledger/parse/payment-channel-fund.js +43 -0
- package/lib/v1/ledger/parse/payment-channel.d.ts +16 -0
- package/lib/v1/ledger/parse/payment-channel.js +27 -0
- package/lib/v1/ledger/parse/payment.d.ts +2 -0
- package/lib/v1/ledger/parse/payment.js +69 -0
- package/lib/v1/ledger/parse/ripple-amount.d.ts +3 -0
- package/lib/v1/ledger/parse/ripple-amount.js +40 -0
- package/lib/v1/ledger/parse/settings.d.ts +2 -0
- package/lib/v1/ledger/parse/settings.js +82 -0
- package/lib/v1/ledger/parse/ticket-create.d.ts +2 -0
- package/lib/v1/ledger/parse/ticket-create.js +39 -0
- package/lib/v1/ledger/parse/transaction.d.ts +3 -0
- package/lib/v1/ledger/parse/transaction.js +110 -0
- package/lib/v1/ledger/parse/trustline.d.ts +2 -0
- package/lib/v1/ledger/parse/trustline.js +57 -0
- package/lib/v1/ledger/parse/utils.d.ts +6 -0
- package/lib/v1/ledger/parse/utils.js +63 -0
- package/lib/v1/ledger/parse_outcome.d.ts +2 -0
- package/lib/v1/ledger/parse_outcome.js +80 -0
- package/lib/v1/ledger/pathfind-types.d.ts +59 -0
- package/lib/v1/ledger/pathfind-types.js +2 -0
- package/lib/v1/transaction/payment.d.ts +14 -0
- package/lib/v1/transaction/payment.js +130 -0
- package/lib/v1/transaction/types.d.ts +40 -0
- package/lib/v1/transaction/types.js +2 -0
- package/lib/v1/transaction/utils.d.ts +8 -0
- package/lib/v1/transaction/utils.js +38 -0
- package/lib/validator.d.ts +12 -0
- package/lib/validator.js +134 -0
- package/lib/wallet.d.ts +17 -0
- package/lib/wallet.js +140 -0
- package/package.json +62 -0
|
@@ -0,0 +1,114 @@
|
|
|
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.parseTransaction = exports.parseTransactionType = void 0;
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
const outcome_1 = require("./outcome");
|
|
9
|
+
const settings_1 = __importDefault(require("./specification/settings"));
|
|
10
|
+
const account_delete_1 = __importDefault(require("./specification/account-delete"));
|
|
11
|
+
const check_cancel_1 = __importDefault(require("./specification/check-cancel"));
|
|
12
|
+
const check_cash_1 = __importDefault(require("./specification/check-cash"));
|
|
13
|
+
const check_create_1 = __importDefault(require("./specification/check-create"));
|
|
14
|
+
const deposit_preauth_1 = __importDefault(require("./specification/deposit-preauth"));
|
|
15
|
+
const escrow_cancel_1 = __importDefault(require("./specification/escrow-cancel"));
|
|
16
|
+
const escrow_create_1 = __importDefault(require("./specification/escrow-create"));
|
|
17
|
+
const escrow_finish_1 = __importDefault(require("./specification/escrow-finish"));
|
|
18
|
+
const offer_cancel_1 = __importDefault(require("./specification/offer-cancel"));
|
|
19
|
+
const offer_create_1 = __importDefault(require("./specification/offer-create"));
|
|
20
|
+
const payment_1 = __importDefault(require("./specification/payment"));
|
|
21
|
+
const payment_channel_claim_1 = __importDefault(require("./specification/payment-channel-claim"));
|
|
22
|
+
const payment_channel_create_1 = __importDefault(require("./specification/payment-channel-create"));
|
|
23
|
+
const payment_channel_fund_1 = __importDefault(require("./specification/payment-channel-fund"));
|
|
24
|
+
const ticket_create_1 = __importDefault(require("./specification/ticket-create"));
|
|
25
|
+
const trustline_1 = __importDefault(require("./specification/trustline"));
|
|
26
|
+
const nftoken_burn_1 = __importDefault(require("./specification/nftoken-burn"));
|
|
27
|
+
const nftoken_mint_1 = __importDefault(require("./specification/nftoken-mint"));
|
|
28
|
+
const nftoken_cancel_offer_1 = __importDefault(require("./specification/nftoken-cancel-offer"));
|
|
29
|
+
const nftoken_create_offer_1 = __importDefault(require("./specification/nftoken-create-offer"));
|
|
30
|
+
const nftoken_accept_offer_1 = __importDefault(require("./specification/nftoken-accept-offer"));
|
|
31
|
+
const amendment_1 = __importDefault(require("./specification/amendment"));
|
|
32
|
+
const fee_update_1 = __importDefault(require("./specification/fee-update"));
|
|
33
|
+
const transactionTypeToType = {
|
|
34
|
+
AccountSet: "settings",
|
|
35
|
+
AccountDelete: "accountDelete",
|
|
36
|
+
CheckCancel: "checkCancel",
|
|
37
|
+
CheckCash: "checkCash",
|
|
38
|
+
CheckCreate: "checkCreate",
|
|
39
|
+
DepositPreauth: "depositPreauth",
|
|
40
|
+
EscrowCancel: "escrowCancellation",
|
|
41
|
+
EscrowCreate: "escrowCreation",
|
|
42
|
+
EscrowFinish: "escrowExecution",
|
|
43
|
+
OfferCancel: "orderCancellation",
|
|
44
|
+
OfferCreate: "order",
|
|
45
|
+
Payment: "payment",
|
|
46
|
+
PaymentChannelClaim: "paymentChannelClaim",
|
|
47
|
+
PaymentChannelCreate: "paymentChannelCreate",
|
|
48
|
+
PaymentChannelFund: "paymentChannelFund",
|
|
49
|
+
SetRegularKey: "settings",
|
|
50
|
+
SignerListSet: "settings",
|
|
51
|
+
TicketCreate: "ticketCreate",
|
|
52
|
+
TrustSet: "trustline",
|
|
53
|
+
NFTokenBurn: "nftokenBurn",
|
|
54
|
+
NFTokenMint: "nftokenMint",
|
|
55
|
+
NFTokenCancelOffer: "nftokenCancelOffer",
|
|
56
|
+
NFTokenCreateOffer: "nftokenCreateOffer",
|
|
57
|
+
NFTokenAcceptOffer: "nftokenAcceptOffer",
|
|
58
|
+
EnableAmendment: "amendment",
|
|
59
|
+
SetFee: "feeUpdate",
|
|
60
|
+
};
|
|
61
|
+
function parseTransactionType(type) {
|
|
62
|
+
return transactionTypeToType[type] || type;
|
|
63
|
+
}
|
|
64
|
+
exports.parseTransactionType = parseTransactionType;
|
|
65
|
+
const parserTypeFunc = {
|
|
66
|
+
settings: settings_1.default,
|
|
67
|
+
accountDelete: account_delete_1.default,
|
|
68
|
+
checkCancel: check_cancel_1.default,
|
|
69
|
+
checkCash: check_cash_1.default,
|
|
70
|
+
checkCreate: check_create_1.default,
|
|
71
|
+
depositPreauth: deposit_preauth_1.default,
|
|
72
|
+
escrowCancellation: escrow_cancel_1.default,
|
|
73
|
+
escrowCreation: escrow_create_1.default,
|
|
74
|
+
escrowExecution: escrow_finish_1.default,
|
|
75
|
+
orderCancellation: offer_cancel_1.default,
|
|
76
|
+
order: offer_create_1.default,
|
|
77
|
+
payment: payment_1.default,
|
|
78
|
+
paymentChannelClaim: payment_channel_claim_1.default,
|
|
79
|
+
paymentChannelCreate: payment_channel_create_1.default,
|
|
80
|
+
paymentChannelFund: payment_channel_fund_1.default,
|
|
81
|
+
ticketCreate: ticket_create_1.default,
|
|
82
|
+
trustline: trustline_1.default,
|
|
83
|
+
nftokenBurn: nftoken_burn_1.default,
|
|
84
|
+
nftokenMint: nftoken_mint_1.default,
|
|
85
|
+
nftokenCancelOffer: nftoken_cancel_offer_1.default,
|
|
86
|
+
nftokenCreateOffer: nftoken_create_offer_1.default,
|
|
87
|
+
nftokenAcceptOffer: nftoken_accept_offer_1.default,
|
|
88
|
+
amendment: amendment_1.default,
|
|
89
|
+
feeUpdate: fee_update_1.default,
|
|
90
|
+
};
|
|
91
|
+
function parseTransaction(tx, includeRawTransaction) {
|
|
92
|
+
const type = parseTransactionType(tx.TransactionType);
|
|
93
|
+
const parser = parserTypeFunc[type];
|
|
94
|
+
const specification = parser
|
|
95
|
+
? parser(tx)
|
|
96
|
+
: {
|
|
97
|
+
UNAVAILABLE: "Unrecognized transaction type.",
|
|
98
|
+
SEE_RAW_TRANSACTION: "Since this type is unrecognized, `rawTransaction` is included in this response.",
|
|
99
|
+
};
|
|
100
|
+
if (!parser) {
|
|
101
|
+
includeRawTransaction = true;
|
|
102
|
+
}
|
|
103
|
+
const outcome = (0, outcome_1.parseOutcome)(tx);
|
|
104
|
+
return (0, common_1.removeUndefined)({
|
|
105
|
+
type: type,
|
|
106
|
+
address: tx.Account,
|
|
107
|
+
sequence: tx.Sequence,
|
|
108
|
+
id: tx.hash,
|
|
109
|
+
specification: (0, common_1.removeUndefined)(specification),
|
|
110
|
+
outcome: outcome ? (0, common_1.removeUndefined)(outcome) : undefined,
|
|
111
|
+
rawTransaction: includeRawTransaction ? JSON.stringify(tx) : undefined,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
exports.parseTransaction = parseTransaction;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare function adjustQualityForXRP(quality: string, takerGetsCurrency: string, takerPaysCurrency: string): string;
|
|
2
|
+
declare function parseQuality(quality?: number | null): number | undefined;
|
|
3
|
+
declare function parseTimestamp(rippleTime?: number | null): string | undefined;
|
|
4
|
+
declare function isPartialPayment(tx: any): boolean;
|
|
5
|
+
declare function hexToString(hex: string | undefined): string | undefined;
|
|
6
|
+
export { parseQuality, hexToString, parseTimestamp, adjustQualityForXRP, isPartialPayment };
|
|
@@ -0,0 +1,38 @@
|
|
|
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.isPartialPayment = exports.adjustQualityForXRP = exports.parseTimestamp = exports.hexToString = exports.parseQuality = void 0;
|
|
7
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
8
|
+
const xrpl_1 = require("xrpl");
|
|
9
|
+
const models_1 = require("../models");
|
|
10
|
+
function adjustQualityForXRP(quality, takerGetsCurrency, takerPaysCurrency) {
|
|
11
|
+
const numeratorShift = takerPaysCurrency === "XRP" ? -6 : 0;
|
|
12
|
+
const denominatorShift = takerGetsCurrency === "XRP" ? -6 : 0;
|
|
13
|
+
const shift = numeratorShift - denominatorShift;
|
|
14
|
+
return shift === 0 ? quality : new bignumber_js_1.default(quality).shiftedBy(shift).toString();
|
|
15
|
+
}
|
|
16
|
+
exports.adjustQualityForXRP = adjustQualityForXRP;
|
|
17
|
+
function parseQuality(quality) {
|
|
18
|
+
if (typeof quality !== "number") {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return new bignumber_js_1.default(quality).shiftedBy(-9).toNumber();
|
|
22
|
+
}
|
|
23
|
+
exports.parseQuality = parseQuality;
|
|
24
|
+
function parseTimestamp(rippleTime) {
|
|
25
|
+
if (typeof rippleTime !== "number") {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
return (0, models_1.ledgerTimeToISO8601)(rippleTime);
|
|
29
|
+
}
|
|
30
|
+
exports.parseTimestamp = parseTimestamp;
|
|
31
|
+
function isPartialPayment(tx) {
|
|
32
|
+
return (tx.Flags & xrpl_1.PaymentFlags.tfPartialPayment) !== 0;
|
|
33
|
+
}
|
|
34
|
+
exports.isPartialPayment = isPartialPayment;
|
|
35
|
+
function hexToString(hex) {
|
|
36
|
+
return hex ? Buffer.from(hex, "hex").toString("utf-8") : undefined;
|
|
37
|
+
}
|
|
38
|
+
exports.hexToString = hexToString;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface IssuedCurrency {
|
|
2
|
+
currency: string;
|
|
3
|
+
issuer?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface FormattedIssuedCurrency {
|
|
6
|
+
currency: string;
|
|
7
|
+
counterparty?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IssuedCurrencyAmount extends IssuedCurrency {
|
|
10
|
+
value: string;
|
|
11
|
+
}
|
|
12
|
+
export interface FormattedIssuedCurrencyAmount extends FormattedIssuedCurrency {
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
export type Amount = IssuedCurrencyAmount | string;
|
|
16
|
+
export type FormattedAmount = FormattedIssuedCurrencyAmount | string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IssuedCurrency, FormattedIssuedCurrency, IssuedCurrencyAmount, FormattedIssuedCurrencyAmount, Amount, FormattedAmount, } from "./amounts";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const AccountFlags: {
|
|
2
|
+
passwordSpent: import("xrpl/dist/npm/models/ledger").AccountRootFlags;
|
|
3
|
+
requireDestTag: import("xrpl/dist/npm/models/ledger").AccountRootFlags;
|
|
4
|
+
requireAuth: import("xrpl/dist/npm/models/ledger").AccountRootFlags;
|
|
5
|
+
depositAuth: import("xrpl/dist/npm/models/ledger").AccountRootFlags;
|
|
6
|
+
disallowXRP: import("xrpl/dist/npm/models/ledger").AccountRootFlags;
|
|
7
|
+
disableMaster: import("xrpl/dist/npm/models/ledger").AccountRootFlags;
|
|
8
|
+
noFreeze: import("xrpl/dist/npm/models/ledger").AccountRootFlags;
|
|
9
|
+
globalFreeze: import("xrpl/dist/npm/models/ledger").AccountRootFlags;
|
|
10
|
+
defaultRipple: import("xrpl/dist/npm/models/ledger").AccountRootFlags;
|
|
11
|
+
disallowIncomingNFTokenOffer: import("xrpl/dist/npm/models/ledger").AccountRootFlags;
|
|
12
|
+
disallowIncomingCheck: import("xrpl/dist/npm/models/ledger").AccountRootFlags;
|
|
13
|
+
disallowIncomingPayChan: import("xrpl/dist/npm/models/ledger").AccountRootFlags;
|
|
14
|
+
disallowIncomingTrustline: import("xrpl/dist/npm/models/ledger").AccountRootFlags;
|
|
15
|
+
};
|
|
16
|
+
export { AccountFlags };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccountFlags = void 0;
|
|
4
|
+
const account_info_1 = require("../../models/account_info");
|
|
5
|
+
const AccountFlags = account_info_1.AccountRootFlagsKeys;
|
|
6
|
+
exports.AccountFlags = AccountFlags;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidationError = exports.RippleError = void 0;
|
|
4
|
+
const ripple_error_1 = require("./ripple_error");
|
|
5
|
+
Object.defineProperty(exports, "RippleError", { enumerable: true, get: function () { return ripple_error_1.RippleError; } });
|
|
6
|
+
const validation_error_1 = require("./validation_error");
|
|
7
|
+
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return validation_error_1.ValidationError; } });
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RippleError = void 0;
|
|
4
|
+
const util_1 = require("util");
|
|
5
|
+
const utils_1 = require("./utils");
|
|
6
|
+
class RippleError extends Error {
|
|
7
|
+
constructor(message = '', data) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = (0, utils_1.getConstructorName)(this);
|
|
10
|
+
this.message = message;
|
|
11
|
+
this.data = data;
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
toString() {
|
|
17
|
+
let result = '[' + this.name + '(' + this.message;
|
|
18
|
+
if (this.data) {
|
|
19
|
+
result += ', ' + (0, util_1.inspect)(this.data);
|
|
20
|
+
}
|
|
21
|
+
result += ')]';
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
inspect() {
|
|
25
|
+
return this.toString();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.RippleError = RippleError;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getConstructorName = void 0;
|
|
4
|
+
function getConstructorName(object) {
|
|
5
|
+
if (object.constructor.name) {
|
|
6
|
+
return object.constructor.name;
|
|
7
|
+
}
|
|
8
|
+
const constructorString = object.constructor.toString();
|
|
9
|
+
const functionConstructor = constructorString.match(/^function\s+([^(]*)/);
|
|
10
|
+
const classConstructor = constructorString.match(/^class\s([^\s]*)/);
|
|
11
|
+
if (functionConstructor) {
|
|
12
|
+
return functionConstructor[1];
|
|
13
|
+
}
|
|
14
|
+
else if (classConstructor) {
|
|
15
|
+
return classConstructor[1];
|
|
16
|
+
}
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
exports.getConstructorName = getConstructorName;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidationError = void 0;
|
|
4
|
+
const ripple_error_1 = require("./ripple_error");
|
|
5
|
+
class ValidationError extends ripple_error_1.RippleError {
|
|
6
|
+
}
|
|
7
|
+
exports.ValidationError = ValidationError;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.iso8601ToRippleTime = exports.toRippledAmount = exports.errors = void 0;
|
|
27
|
+
const errors = __importStar(require("../../common/errors"));
|
|
28
|
+
exports.errors = errors;
|
|
29
|
+
var utils_1 = require("./utils");
|
|
30
|
+
Object.defineProperty(exports, "toRippledAmount", { enumerable: true, get: function () { return utils_1.toRippledAmount; } });
|
|
31
|
+
Object.defineProperty(exports, "iso8601ToRippleTime", { enumerable: true, get: function () { return utils_1.iso8601ToRippleTime; } });
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
declare const txFlags: {
|
|
2
|
+
Universal: {
|
|
3
|
+
FullyCanonicalSig: number;
|
|
4
|
+
};
|
|
5
|
+
AccountSet: {
|
|
6
|
+
RequireDestTag: number;
|
|
7
|
+
OptionalDestTag: number;
|
|
8
|
+
RequireAuth: number;
|
|
9
|
+
OptionalAuth: number;
|
|
10
|
+
DisallowXRP: number;
|
|
11
|
+
AllowXRP: number;
|
|
12
|
+
};
|
|
13
|
+
TrustSet: {
|
|
14
|
+
SetAuth: number;
|
|
15
|
+
NoRipple: number;
|
|
16
|
+
SetNoRipple: number;
|
|
17
|
+
ClearNoRipple: number;
|
|
18
|
+
SetFreeze: number;
|
|
19
|
+
ClearFreeze: number;
|
|
20
|
+
};
|
|
21
|
+
OfferCreate: {
|
|
22
|
+
Passive: number;
|
|
23
|
+
ImmediateOrCancel: number;
|
|
24
|
+
FillOrKill: number;
|
|
25
|
+
Sell: number;
|
|
26
|
+
};
|
|
27
|
+
Payment: {
|
|
28
|
+
NoRippleDirect: number;
|
|
29
|
+
PartialPayment: number;
|
|
30
|
+
LimitQuality: number;
|
|
31
|
+
};
|
|
32
|
+
PaymentChannelClaim: {
|
|
33
|
+
Renew: number;
|
|
34
|
+
Close: number;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
declare const txFlagIndices: {
|
|
38
|
+
AccountSet: {
|
|
39
|
+
asfRequireDest: number;
|
|
40
|
+
asfRequireAuth: number;
|
|
41
|
+
asfDisallowXRP: number;
|
|
42
|
+
asfDisableMaster: number;
|
|
43
|
+
asfAccountTxnID: number;
|
|
44
|
+
asfNoFreeze: number;
|
|
45
|
+
asfGlobalFreeze: number;
|
|
46
|
+
asfDefaultRipple: number;
|
|
47
|
+
asfDepositAuth: number;
|
|
48
|
+
asfAuthorizedMinter: number;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export { txFlags, txFlagIndices };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.txFlagIndices = exports.txFlags = void 0;
|
|
4
|
+
const txFlags = {
|
|
5
|
+
Universal: {
|
|
6
|
+
FullyCanonicalSig: 0x80000000
|
|
7
|
+
},
|
|
8
|
+
AccountSet: {
|
|
9
|
+
RequireDestTag: 0x00010000,
|
|
10
|
+
OptionalDestTag: 0x00020000,
|
|
11
|
+
RequireAuth: 0x00040000,
|
|
12
|
+
OptionalAuth: 0x00080000,
|
|
13
|
+
DisallowXRP: 0x00100000,
|
|
14
|
+
AllowXRP: 0x00200000
|
|
15
|
+
},
|
|
16
|
+
TrustSet: {
|
|
17
|
+
SetAuth: 0x00010000,
|
|
18
|
+
NoRipple: 0x00020000,
|
|
19
|
+
SetNoRipple: 0x00020000,
|
|
20
|
+
ClearNoRipple: 0x00040000,
|
|
21
|
+
SetFreeze: 0x00100000,
|
|
22
|
+
ClearFreeze: 0x00200000
|
|
23
|
+
},
|
|
24
|
+
OfferCreate: {
|
|
25
|
+
Passive: 0x00010000,
|
|
26
|
+
ImmediateOrCancel: 0x00020000,
|
|
27
|
+
FillOrKill: 0x00040000,
|
|
28
|
+
Sell: 0x00080000
|
|
29
|
+
},
|
|
30
|
+
Payment: {
|
|
31
|
+
NoRippleDirect: 0x00010000,
|
|
32
|
+
PartialPayment: 0x00020000,
|
|
33
|
+
LimitQuality: 0x00040000
|
|
34
|
+
},
|
|
35
|
+
PaymentChannelClaim: {
|
|
36
|
+
Renew: 0x00010000,
|
|
37
|
+
Close: 0x00020000
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.txFlags = txFlags;
|
|
41
|
+
const txFlagIndices = {
|
|
42
|
+
AccountSet: {
|
|
43
|
+
asfRequireDest: 1,
|
|
44
|
+
asfRequireAuth: 2,
|
|
45
|
+
asfDisallowXRP: 3,
|
|
46
|
+
asfDisableMaster: 4,
|
|
47
|
+
asfAccountTxnID: 5,
|
|
48
|
+
asfNoFreeze: 6,
|
|
49
|
+
asfGlobalFreeze: 7,
|
|
50
|
+
asfDefaultRipple: 8,
|
|
51
|
+
asfDepositAuth: 9,
|
|
52
|
+
asfAuthorizedMinter: 10,
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.txFlagIndices = txFlagIndices;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AccountRootLedgerEntry, SignerListLedgerEntry, QueueData } from '../objects';
|
|
2
|
+
export interface AccountInfoRequest {
|
|
3
|
+
account: string;
|
|
4
|
+
strict?: boolean;
|
|
5
|
+
queue?: boolean;
|
|
6
|
+
ledger_hash?: string;
|
|
7
|
+
ledger_index?: number | ('validated' | 'closed' | 'current');
|
|
8
|
+
signer_lists?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface AccountInfoResponse {
|
|
11
|
+
account_data: AccountRootLedgerEntry;
|
|
12
|
+
signer_lists?: SignerListLedgerEntry[];
|
|
13
|
+
ledger_current_index?: number;
|
|
14
|
+
ledger_index?: number;
|
|
15
|
+
queue_data?: QueueData;
|
|
16
|
+
validated?: boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Trustline } from "../objects";
|
|
2
|
+
export interface AccountLinesRequest {
|
|
3
|
+
account: string;
|
|
4
|
+
ledger_hash?: string;
|
|
5
|
+
ledger_index?: number | ("validated" | "closed" | "current");
|
|
6
|
+
peer?: string;
|
|
7
|
+
limit?: number;
|
|
8
|
+
marker?: any;
|
|
9
|
+
}
|
|
10
|
+
export interface AccountLinesResponse {
|
|
11
|
+
account: string;
|
|
12
|
+
lines: Trustline[];
|
|
13
|
+
ledger_current_index?: number;
|
|
14
|
+
ledger_index?: number;
|
|
15
|
+
ledger_hash?: string;
|
|
16
|
+
marker?: any;
|
|
17
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CheckLedgerEntry, RippleStateLedgerEntry, OfferLedgerEntry, SignerListLedgerEntry, EscrowLedgerEntry, PayChannelLedgerEntry, DepositPreauthLedgerEntry } from "../objects";
|
|
2
|
+
export interface GetAccountObjectsOptions {
|
|
3
|
+
type?: string | ("check" | "escrow" | "offer" | "payment_channel" | "signer_list" | "state");
|
|
4
|
+
ledgerHash?: string;
|
|
5
|
+
ledgerIndex?: number | ("validated" | "closed" | "current");
|
|
6
|
+
limit?: number;
|
|
7
|
+
marker?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface AccountObjectsRequest {
|
|
10
|
+
account: string;
|
|
11
|
+
type?: string | ("check" | "escrow" | "offer" | "payment_channel" | "signer_list" | "state");
|
|
12
|
+
ledger_hash?: string;
|
|
13
|
+
ledger_index?: number | ("validated" | "closed" | "current");
|
|
14
|
+
limit?: number;
|
|
15
|
+
marker?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface AccountObjectsResponse {
|
|
18
|
+
account: string;
|
|
19
|
+
account_objects: Array<CheckLedgerEntry | RippleStateLedgerEntry | OfferLedgerEntry | SignerListLedgerEntry | EscrowLedgerEntry | PayChannelLedgerEntry | DepositPreauthLedgerEntry>;
|
|
20
|
+
ledger_hash?: string;
|
|
21
|
+
ledger_index?: number;
|
|
22
|
+
ledger_current_index?: number;
|
|
23
|
+
limit?: number;
|
|
24
|
+
marker?: string;
|
|
25
|
+
validated?: boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Amount } from "../objects";
|
|
2
|
+
export interface AccountOffersRequest {
|
|
3
|
+
account: string;
|
|
4
|
+
ledger_hash?: string;
|
|
5
|
+
ledger_index?: number | ("validated" | "closed" | "current");
|
|
6
|
+
limit?: number;
|
|
7
|
+
marker?: any;
|
|
8
|
+
}
|
|
9
|
+
export interface AccountOffersResponse {
|
|
10
|
+
account: string;
|
|
11
|
+
ledger_hash?: string;
|
|
12
|
+
ledger_current_index?: number;
|
|
13
|
+
ledger_index?: number;
|
|
14
|
+
marker?: any;
|
|
15
|
+
offers?: AccountOffer[];
|
|
16
|
+
}
|
|
17
|
+
export interface AccountOffer {
|
|
18
|
+
seq: number;
|
|
19
|
+
flags: number;
|
|
20
|
+
taker_gets: Amount;
|
|
21
|
+
taker_pays: Amount;
|
|
22
|
+
quality: string;
|
|
23
|
+
expiration?: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IssuedCurrency, Amount, OfferLedgerEntry } from "../objects";
|
|
2
|
+
export interface BookOffersRequest {
|
|
3
|
+
taker?: string;
|
|
4
|
+
taker_gets: IssuedCurrency;
|
|
5
|
+
taker_pays: IssuedCurrency;
|
|
6
|
+
ledger_hash?: string;
|
|
7
|
+
ledger_index?: number | ("validated" | "closed" | "current");
|
|
8
|
+
limit?: number;
|
|
9
|
+
marker?: any;
|
|
10
|
+
}
|
|
11
|
+
export interface BookOffersResponse {
|
|
12
|
+
offers: BookOffer[];
|
|
13
|
+
ledger_hash?: string;
|
|
14
|
+
ledger_current_index?: number;
|
|
15
|
+
ledger_index?: number;
|
|
16
|
+
marker?: any;
|
|
17
|
+
}
|
|
18
|
+
export interface BookOffer extends OfferLedgerEntry {
|
|
19
|
+
quality?: string;
|
|
20
|
+
owner_funds?: string;
|
|
21
|
+
taker_gets_funded?: Amount;
|
|
22
|
+
taker_pays_funded?: Amount;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FormattedIssuedCurrencyAmount } from "../objects";
|
|
2
|
+
export interface GatewayBalancesRequest {
|
|
3
|
+
account: string;
|
|
4
|
+
strict?: boolean;
|
|
5
|
+
hotwallet: string | Array<string>;
|
|
6
|
+
ledger_hash?: string;
|
|
7
|
+
ledger_index?: number | ("validated" | "closed" | "current");
|
|
8
|
+
}
|
|
9
|
+
export interface GatewayBalancesResponse {
|
|
10
|
+
account: string;
|
|
11
|
+
obligations?: {
|
|
12
|
+
[currency: string]: string;
|
|
13
|
+
};
|
|
14
|
+
balances?: {
|
|
15
|
+
[address: string]: FormattedIssuedCurrencyAmount[];
|
|
16
|
+
};
|
|
17
|
+
assets?: {
|
|
18
|
+
[address: string]: FormattedIssuedCurrencyAmount[];
|
|
19
|
+
};
|
|
20
|
+
ledger_hash?: string;
|
|
21
|
+
ledger_current_index?: number;
|
|
22
|
+
ledger_index?: number;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './account_info';
|
|
2
|
+
export * from './account_lines';
|
|
3
|
+
export * from './account_objects';
|
|
4
|
+
export * from './account_offers';
|
|
5
|
+
export * from './book_offers';
|
|
6
|
+
export * from './gateway_balances';
|
|
7
|
+
export * from './ledger';
|
|
8
|
+
export * from './ledger_data';
|
|
9
|
+
export * from './ledger_entry';
|
|
10
|
+
export * from './server_info';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./account_info"), exports);
|
|
18
|
+
__exportStar(require("./account_lines"), exports);
|
|
19
|
+
__exportStar(require("./account_objects"), exports);
|
|
20
|
+
__exportStar(require("./account_offers"), exports);
|
|
21
|
+
__exportStar(require("./book_offers"), exports);
|
|
22
|
+
__exportStar(require("./gateway_balances"), exports);
|
|
23
|
+
__exportStar(require("./ledger"), exports);
|
|
24
|
+
__exportStar(require("./ledger_data"), exports);
|
|
25
|
+
__exportStar(require("./ledger_entry"), exports);
|
|
26
|
+
__exportStar(require("./server_info"), exports);
|