xrpl 2.12.0 → 3.0.0-beta.0
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/README.md +114 -5
- package/build/xrpl-latest-min.js +1 -1
- package/build/xrpl-latest-min.js.map +1 -1
- package/build/xrpl-latest.js +18365 -75189
- package/build/xrpl-latest.js.map +1 -1
- package/dist/npm/Wallet/authorizeChannel.d.ts +3 -0
- package/dist/npm/Wallet/authorizeChannel.d.ts.map +1 -0
- package/dist/npm/Wallet/authorizeChannel.js +14 -0
- package/dist/npm/Wallet/authorizeChannel.js.map +1 -0
- package/dist/npm/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/Wallet/defaultFaucets.js +1 -4
- package/dist/npm/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/Wallet/fundWallet.d.ts +17 -3
- package/dist/npm/Wallet/fundWallet.d.ts.map +1 -1
- package/dist/npm/Wallet/fundWallet.js +53 -78
- package/dist/npm/Wallet/fundWallet.js.map +1 -1
- package/dist/npm/Wallet/index.d.ts.map +1 -1
- package/dist/npm/Wallet/index.js +24 -23
- package/dist/npm/Wallet/index.js.map +1 -1
- package/dist/npm/Wallet/signer.d.ts +2 -4
- package/dist/npm/Wallet/signer.d.ts.map +1 -1
- package/dist/npm/Wallet/signer.js +17 -13
- package/dist/npm/Wallet/signer.js.map +1 -1
- package/dist/npm/Wallet/walletFromSecretNumbers.js +2 -2
- package/dist/npm/Wallet/walletFromSecretNumbers.js.map +1 -1
- package/dist/npm/client/RequestManager.d.ts +3 -2
- package/dist/npm/client/RequestManager.d.ts.map +1 -1
- package/dist/npm/client/RequestManager.js +25 -1
- package/dist/npm/client/RequestManager.js.map +1 -1
- package/dist/npm/client/connection.d.ts +8 -11
- package/dist/npm/client/connection.d.ts.map +1 -1
- package/dist/npm/client/connection.js +8 -54
- package/dist/npm/client/connection.js.map +1 -1
- package/dist/npm/client/index.d.ts +56 -78
- package/dist/npm/client/index.d.ts.map +1 -1
- package/dist/npm/client/index.js +155 -42
- package/dist/npm/client/index.js.map +1 -1
- package/dist/npm/client/partialPayment.d.ts +4 -2
- package/dist/npm/client/partialPayment.d.ts.map +1 -1
- package/dist/npm/client/partialPayment.js.map +1 -1
- package/dist/npm/errors.d.ts.map +1 -1
- package/dist/npm/errors.js +1 -2
- package/dist/npm/errors.js.map +1 -1
- package/dist/npm/index.d.ts +1 -1
- package/dist/npm/index.d.ts.map +1 -1
- package/dist/npm/index.js +1 -3
- package/dist/npm/index.js.map +1 -1
- package/dist/npm/models/ledger/AMM.d.ts +2 -4
- package/dist/npm/models/ledger/AMM.d.ts.map +1 -1
- package/dist/npm/models/ledger/AccountRoot.d.ts +2 -4
- package/dist/npm/models/ledger/AccountRoot.d.ts.map +1 -1
- package/dist/npm/models/ledger/AccountRoot.js +1 -1
- package/dist/npm/models/ledger/AccountRoot.js.map +1 -1
- package/dist/npm/models/ledger/Amendments.d.ts +2 -2
- package/dist/npm/models/ledger/Amendments.d.ts.map +1 -1
- package/dist/npm/models/ledger/BaseLedgerEntry.d.ts +9 -1
- package/dist/npm/models/ledger/BaseLedgerEntry.d.ts.map +1 -1
- package/dist/npm/models/ledger/Bridge.d.ts +2 -4
- package/dist/npm/models/ledger/Bridge.d.ts.map +1 -1
- package/dist/npm/models/ledger/Check.d.ts +2 -2
- package/dist/npm/models/ledger/Check.d.ts.map +1 -1
- package/dist/npm/models/ledger/DepositPreauth.d.ts +2 -4
- package/dist/npm/models/ledger/DepositPreauth.d.ts.map +1 -1
- package/dist/npm/models/ledger/DirectoryNode.d.ts +2 -2
- package/dist/npm/models/ledger/DirectoryNode.d.ts.map +1 -1
- package/dist/npm/models/ledger/Escrow.d.ts +2 -4
- package/dist/npm/models/ledger/Escrow.d.ts.map +1 -1
- package/dist/npm/models/ledger/FeeSettings.d.ts +2 -2
- package/dist/npm/models/ledger/FeeSettings.d.ts.map +1 -1
- package/dist/npm/models/ledger/Ledger.d.ts +3 -3
- package/dist/npm/models/ledger/Ledger.d.ts.map +1 -1
- package/dist/npm/models/ledger/LedgerEntry.d.ts +2 -1
- package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/models/ledger/LedgerHashes.d.ts +2 -2
- package/dist/npm/models/ledger/LedgerHashes.d.ts.map +1 -1
- package/dist/npm/models/ledger/NFTokenOffer.d.ts +2 -4
- package/dist/npm/models/ledger/NFTokenOffer.d.ts.map +1 -1
- package/dist/npm/models/ledger/NFTokenPage.d.ts +2 -4
- package/dist/npm/models/ledger/NFTokenPage.d.ts.map +1 -1
- package/dist/npm/models/ledger/NegativeUNL.d.ts +2 -2
- package/dist/npm/models/ledger/NegativeUNL.d.ts.map +1 -1
- package/dist/npm/models/ledger/Offer.d.ts +2 -4
- package/dist/npm/models/ledger/Offer.d.ts.map +1 -1
- package/dist/npm/models/ledger/Offer.js +1 -1
- package/dist/npm/models/ledger/Offer.js.map +1 -1
- package/dist/npm/models/ledger/PayChannel.d.ts +2 -4
- package/dist/npm/models/ledger/PayChannel.d.ts.map +1 -1
- package/dist/npm/models/ledger/RippleState.d.ts +2 -4
- package/dist/npm/models/ledger/RippleState.d.ts.map +1 -1
- package/dist/npm/models/ledger/RippleState.js +1 -1
- package/dist/npm/models/ledger/RippleState.js.map +1 -1
- package/dist/npm/models/ledger/SignerList.d.ts +2 -4
- package/dist/npm/models/ledger/SignerList.d.ts.map +1 -1
- package/dist/npm/models/ledger/SignerList.js +1 -1
- package/dist/npm/models/ledger/SignerList.js.map +1 -1
- package/dist/npm/models/ledger/Ticket.d.ts +2 -4
- package/dist/npm/models/ledger/Ticket.d.ts.map +1 -1
- package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts +2 -4
- package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +2 -4
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -1
- package/dist/npm/models/ledger/index.d.ts +2 -2
- package/dist/npm/models/ledger/index.d.ts.map +1 -1
- package/dist/npm/models/ledger/index.js.map +1 -1
- package/dist/npm/models/methods/accountObjects.d.ts +4 -3
- package/dist/npm/models/methods/accountObjects.d.ts.map +1 -1
- package/dist/npm/models/methods/index.d.ts +12 -1
- package/dist/npm/models/methods/index.d.ts.map +1 -1
- package/dist/npm/models/methods/ledger.d.ts +37 -7
- package/dist/npm/models/methods/ledger.d.ts.map +1 -1
- package/dist/npm/models/methods/ledgerData.d.ts +2 -1
- package/dist/npm/models/methods/ledgerData.d.ts.map +1 -1
- package/dist/npm/models/methods/ledgerEntry.d.ts +2 -2
- package/dist/npm/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/models/methods/subscribe.d.ts +3 -0
- package/dist/npm/models/methods/subscribe.d.ts.map +1 -1
- package/dist/npm/models/methods/tx.d.ts +3 -2
- package/dist/npm/models/methods/tx.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMDeposit.js +1 -1
- package/dist/npm/models/transactions/AMMDeposit.js.map +1 -1
- package/dist/npm/models/transactions/AMMWithdraw.js +1 -1
- package/dist/npm/models/transactions/AMMWithdraw.js.map +1 -1
- package/dist/npm/models/transactions/NFTokenAcceptOffer.d.ts +4 -0
- package/dist/npm/models/transactions/NFTokenAcceptOffer.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenAcceptOffer.js.map +1 -1
- package/dist/npm/models/transactions/NFTokenBurn.d.ts +3 -3
- package/dist/npm/models/transactions/NFTokenBurn.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenBurn.js +2 -4
- package/dist/npm/models/transactions/NFTokenBurn.js.map +1 -1
- package/dist/npm/models/transactions/NFTokenCancelOffer.d.ts +4 -0
- package/dist/npm/models/transactions/NFTokenCancelOffer.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenCancelOffer.js.map +1 -1
- package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts +7 -3
- package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenCreateOffer.js +3 -1
- package/dist/npm/models/transactions/NFTokenCreateOffer.js.map +1 -1
- package/dist/npm/models/transactions/NFTokenMint.d.ts +6 -2
- package/dist/npm/models/transactions/NFTokenMint.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenMint.js +2 -1
- package/dist/npm/models/transactions/NFTokenMint.js.map +1 -1
- package/dist/npm/models/transactions/UNLModify.d.ts +2 -1
- package/dist/npm/models/transactions/UNLModify.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts +2 -2
- package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAccountCreateCommit.js +1 -2
- package/dist/npm/models/transactions/XChainAccountCreateCommit.js.map +1 -1
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts +5 -5
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js +4 -4
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -1
- package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts +5 -5
- package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAddClaimAttestation.js +4 -4
- package/dist/npm/models/transactions/XChainAddClaimAttestation.js.map +1 -1
- package/dist/npm/models/transactions/XChainClaim.d.ts +2 -2
- package/dist/npm/models/transactions/XChainClaim.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainClaim.js +1 -1
- package/dist/npm/models/transactions/XChainClaim.js.map +1 -1
- package/dist/npm/models/transactions/XChainCommit.d.ts +2 -2
- package/dist/npm/models/transactions/XChainCommit.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainCommit.js +1 -1
- package/dist/npm/models/transactions/XChainCommit.js.map +1 -1
- package/dist/npm/models/transactions/XChainCreateClaimID.d.ts +2 -2
- package/dist/npm/models/transactions/XChainCreateClaimID.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainCreateClaimID.js +1 -1
- package/dist/npm/models/transactions/XChainCreateClaimID.js.map +1 -1
- package/dist/npm/models/transactions/XChainModifyBridge.js +1 -1
- package/dist/npm/models/transactions/XChainModifyBridge.js.map +1 -1
- package/dist/npm/models/transactions/accountDelete.d.ts +2 -2
- package/dist/npm/models/transactions/accountDelete.d.ts.map +1 -1
- package/dist/npm/models/transactions/accountDelete.js +2 -11
- package/dist/npm/models/transactions/accountDelete.js.map +1 -1
- package/dist/npm/models/transactions/accountSet.d.ts +2 -2
- package/dist/npm/models/transactions/accountSet.d.ts.map +1 -1
- package/dist/npm/models/transactions/accountSet.js +3 -7
- package/dist/npm/models/transactions/accountSet.js.map +1 -1
- package/dist/npm/models/transactions/checkCreate.d.ts +2 -2
- package/dist/npm/models/transactions/checkCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/checkCreate.js +2 -10
- package/dist/npm/models/transactions/checkCreate.js.map +1 -1
- package/dist/npm/models/transactions/common.d.ts +3 -1
- package/dist/npm/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/models/transactions/common.js +7 -1
- package/dist/npm/models/transactions/common.js.map +1 -1
- package/dist/npm/models/transactions/enableAmendment.js +1 -1
- package/dist/npm/models/transactions/enableAmendment.js.map +1 -1
- package/dist/npm/models/transactions/escrowCancel.d.ts +2 -2
- package/dist/npm/models/transactions/escrowCancel.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowCancel.js +1 -6
- package/dist/npm/models/transactions/escrowCancel.js.map +1 -1
- package/dist/npm/models/transactions/escrowCreate.d.ts +2 -2
- package/dist/npm/models/transactions/escrowCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowCreate.js +2 -10
- package/dist/npm/models/transactions/escrowCreate.js.map +1 -1
- package/dist/npm/models/transactions/escrowFinish.d.ts +2 -2
- package/dist/npm/models/transactions/escrowFinish.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowFinish.js +1 -6
- package/dist/npm/models/transactions/escrowFinish.js.map +1 -1
- package/dist/npm/models/transactions/index.d.ts +1 -1
- package/dist/npm/models/transactions/index.d.ts.map +1 -1
- package/dist/npm/models/transactions/index.js.map +1 -1
- package/dist/npm/models/transactions/metadata.d.ts +9 -1
- package/dist/npm/models/transactions/metadata.d.ts.map +1 -1
- package/dist/npm/models/transactions/metadata.js.map +1 -1
- package/dist/npm/models/transactions/offerCreate.js +1 -1
- package/dist/npm/models/transactions/offerCreate.js.map +1 -1
- package/dist/npm/models/transactions/payment.d.ts +7 -2
- package/dist/npm/models/transactions/payment.d.ts.map +1 -1
- package/dist/npm/models/transactions/payment.js +3 -10
- package/dist/npm/models/transactions/payment.js.map +1 -1
- package/dist/npm/models/transactions/paymentChannelClaim.js +1 -1
- package/dist/npm/models/transactions/paymentChannelClaim.js.map +1 -1
- package/dist/npm/models/transactions/paymentChannelCreate.d.ts +2 -2
- package/dist/npm/models/transactions/paymentChannelCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/paymentChannelCreate.js +2 -10
- package/dist/npm/models/transactions/paymentChannelCreate.js.map +1 -1
- package/dist/npm/models/transactions/transaction.d.ts +8 -3
- package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/models/transactions/transaction.js.map +1 -1
- package/dist/npm/models/transactions/trustSet.js +1 -1
- package/dist/npm/models/transactions/trustSet.js.map +1 -1
- package/dist/npm/models/utils/flags.d.ts.map +1 -1
- package/dist/npm/models/utils/flags.js +17 -28
- package/dist/npm/models/utils/flags.js.map +1 -1
- package/dist/npm/snippets/src/bridgeTransfer.js +4 -3
- package/dist/npm/snippets/src/bridgeTransfer.js.map +1 -1
- package/dist/npm/snippets/src/getTransaction.js +1 -1
- package/dist/npm/snippets/src/getTransaction.js.map +1 -1
- package/dist/npm/snippets/src/paths.js +2 -3
- package/dist/npm/snippets/src/paths.js.map +1 -1
- package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -0
- package/dist/npm/src/Wallet/authorizeChannel.d.ts +3 -0
- package/dist/npm/src/Wallet/authorizeChannel.d.ts.map +1 -0
- package/dist/npm/src/Wallet/authorizeChannel.js +14 -0
- package/dist/npm/src/Wallet/authorizeChannel.js.map +1 -0
- package/dist/npm/src/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/src/Wallet/defaultFaucets.js +1 -4
- package/dist/npm/src/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/src/Wallet/fundWallet.d.ts +17 -3
- package/dist/npm/src/Wallet/fundWallet.d.ts.map +1 -1
- package/dist/npm/src/Wallet/fundWallet.js +53 -78
- package/dist/npm/src/Wallet/fundWallet.js.map +1 -1
- package/dist/npm/src/Wallet/index.d.ts.map +1 -1
- package/dist/npm/src/Wallet/index.js +24 -23
- package/dist/npm/src/Wallet/index.js.map +1 -1
- package/dist/npm/src/Wallet/signer.d.ts +2 -4
- package/dist/npm/src/Wallet/signer.d.ts.map +1 -1
- package/dist/npm/src/Wallet/signer.js +17 -13
- package/dist/npm/src/Wallet/signer.js.map +1 -1
- package/dist/npm/src/Wallet/walletFromSecretNumbers.js +2 -2
- package/dist/npm/src/Wallet/walletFromSecretNumbers.js.map +1 -1
- package/dist/npm/src/client/RequestManager.d.ts +3 -2
- package/dist/npm/src/client/RequestManager.d.ts.map +1 -1
- package/dist/npm/src/client/RequestManager.js +25 -1
- package/dist/npm/src/client/RequestManager.js.map +1 -1
- package/dist/npm/src/client/connection.d.ts +8 -11
- package/dist/npm/src/client/connection.d.ts.map +1 -1
- package/dist/npm/src/client/connection.js +8 -54
- package/dist/npm/src/client/connection.js.map +1 -1
- package/dist/npm/src/client/index.d.ts +56 -78
- package/dist/npm/src/client/index.d.ts.map +1 -1
- package/dist/npm/src/client/index.js +155 -42
- package/dist/npm/src/client/index.js.map +1 -1
- package/dist/npm/src/client/partialPayment.d.ts +4 -2
- package/dist/npm/src/client/partialPayment.d.ts.map +1 -1
- package/dist/npm/src/client/partialPayment.js.map +1 -1
- package/dist/npm/src/errors.d.ts.map +1 -1
- package/dist/npm/src/errors.js +1 -2
- package/dist/npm/src/errors.js.map +1 -1
- package/dist/npm/src/index.d.ts +1 -1
- package/dist/npm/src/index.d.ts.map +1 -1
- package/dist/npm/src/index.js +1 -3
- package/dist/npm/src/index.js.map +1 -1
- package/dist/npm/src/models/ledger/AMM.d.ts +2 -4
- package/dist/npm/src/models/ledger/AMM.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.d.ts +2 -4
- package/dist/npm/src/models/ledger/AccountRoot.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.js +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.js.map +1 -1
- package/dist/npm/src/models/ledger/Amendments.d.ts +2 -2
- package/dist/npm/src/models/ledger/Amendments.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/BaseLedgerEntry.d.ts +9 -1
- package/dist/npm/src/models/ledger/BaseLedgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Bridge.d.ts +2 -4
- package/dist/npm/src/models/ledger/Bridge.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Check.d.ts +2 -2
- package/dist/npm/src/models/ledger/Check.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/DepositPreauth.d.ts +2 -4
- package/dist/npm/src/models/ledger/DepositPreauth.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/DirectoryNode.d.ts +2 -2
- package/dist/npm/src/models/ledger/DirectoryNode.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Escrow.d.ts +2 -4
- package/dist/npm/src/models/ledger/Escrow.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/FeeSettings.d.ts +2 -2
- package/dist/npm/src/models/ledger/FeeSettings.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Ledger.d.ts +3 -3
- package/dist/npm/src/models/ledger/Ledger.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts +2 -1
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/LedgerHashes.d.ts +2 -2
- package/dist/npm/src/models/ledger/LedgerHashes.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/NFTokenOffer.d.ts +2 -4
- package/dist/npm/src/models/ledger/NFTokenOffer.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/NFTokenPage.d.ts +2 -4
- package/dist/npm/src/models/ledger/NFTokenPage.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/NegativeUNL.d.ts +2 -2
- package/dist/npm/src/models/ledger/NegativeUNL.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Offer.d.ts +2 -4
- package/dist/npm/src/models/ledger/Offer.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Offer.js +1 -1
- package/dist/npm/src/models/ledger/Offer.js.map +1 -1
- package/dist/npm/src/models/ledger/PayChannel.d.ts +2 -4
- package/dist/npm/src/models/ledger/PayChannel.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/RippleState.d.ts +2 -4
- package/dist/npm/src/models/ledger/RippleState.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/RippleState.js +1 -1
- package/dist/npm/src/models/ledger/RippleState.js.map +1 -1
- package/dist/npm/src/models/ledger/SignerList.d.ts +2 -4
- package/dist/npm/src/models/ledger/SignerList.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/SignerList.js +1 -1
- package/dist/npm/src/models/ledger/SignerList.js.map +1 -1
- package/dist/npm/src/models/ledger/Ticket.d.ts +2 -4
- package/dist/npm/src/models/ledger/Ticket.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts +2 -4
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +2 -4
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/index.d.ts +2 -2
- package/dist/npm/src/models/ledger/index.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/index.js.map +1 -1
- package/dist/npm/src/models/methods/accountObjects.d.ts +4 -3
- package/dist/npm/src/models/methods/accountObjects.d.ts.map +1 -1
- package/dist/npm/src/models/methods/index.d.ts +12 -1
- package/dist/npm/src/models/methods/index.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ledger.d.ts +37 -7
- package/dist/npm/src/models/methods/ledger.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ledgerData.d.ts +2 -1
- package/dist/npm/src/models/methods/ledgerData.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ledgerEntry.d.ts +2 -2
- package/dist/npm/src/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/methods/subscribe.d.ts +3 -0
- package/dist/npm/src/models/methods/subscribe.d.ts.map +1 -1
- package/dist/npm/src/models/methods/tx.d.ts +3 -2
- package/dist/npm/src/models/methods/tx.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMDeposit.js +1 -1
- package/dist/npm/src/models/transactions/AMMDeposit.js.map +1 -1
- package/dist/npm/src/models/transactions/AMMWithdraw.js +1 -1
- package/dist/npm/src/models/transactions/AMMWithdraw.js.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenAcceptOffer.d.ts +4 -0
- package/dist/npm/src/models/transactions/NFTokenAcceptOffer.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenAcceptOffer.js.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenBurn.d.ts +3 -3
- package/dist/npm/src/models/transactions/NFTokenBurn.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenBurn.js +2 -4
- package/dist/npm/src/models/transactions/NFTokenBurn.js.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenCancelOffer.d.ts +4 -0
- package/dist/npm/src/models/transactions/NFTokenCancelOffer.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenCancelOffer.js.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts +7 -3
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.js +3 -1
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.js.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenMint.d.ts +6 -2
- package/dist/npm/src/models/transactions/NFTokenMint.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenMint.js +2 -1
- package/dist/npm/src/models/transactions/NFTokenMint.js.map +1 -1
- package/dist/npm/src/models/transactions/UNLModify.d.ts +2 -1
- package/dist/npm/src/models/transactions/UNLModify.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts +2 -2
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js +1 -2
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts +5 -5
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js +4 -4
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts +5 -5
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js +4 -4
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainClaim.d.ts +2 -2
- package/dist/npm/src/models/transactions/XChainClaim.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainClaim.js +1 -1
- package/dist/npm/src/models/transactions/XChainClaim.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainCommit.d.ts +2 -2
- package/dist/npm/src/models/transactions/XChainCommit.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainCommit.js +1 -1
- package/dist/npm/src/models/transactions/XChainCommit.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts +2 -2
- package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainCreateClaimID.js +1 -1
- package/dist/npm/src/models/transactions/XChainCreateClaimID.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainModifyBridge.js +1 -1
- package/dist/npm/src/models/transactions/XChainModifyBridge.js.map +1 -1
- package/dist/npm/src/models/transactions/accountDelete.d.ts +2 -2
- package/dist/npm/src/models/transactions/accountDelete.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/accountDelete.js +2 -11
- package/dist/npm/src/models/transactions/accountDelete.js.map +1 -1
- package/dist/npm/src/models/transactions/accountSet.d.ts +2 -2
- package/dist/npm/src/models/transactions/accountSet.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/accountSet.js +3 -7
- package/dist/npm/src/models/transactions/accountSet.js.map +1 -1
- package/dist/npm/src/models/transactions/checkCreate.d.ts +2 -2
- package/dist/npm/src/models/transactions/checkCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/checkCreate.js +2 -10
- package/dist/npm/src/models/transactions/checkCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/common.d.ts +3 -1
- package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/common.js +7 -1
- package/dist/npm/src/models/transactions/common.js.map +1 -1
- package/dist/npm/src/models/transactions/enableAmendment.js +1 -1
- package/dist/npm/src/models/transactions/enableAmendment.js.map +1 -1
- package/dist/npm/src/models/transactions/escrowCancel.d.ts +2 -2
- package/dist/npm/src/models/transactions/escrowCancel.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowCancel.js +1 -6
- package/dist/npm/src/models/transactions/escrowCancel.js.map +1 -1
- package/dist/npm/src/models/transactions/escrowCreate.d.ts +2 -2
- package/dist/npm/src/models/transactions/escrowCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowCreate.js +2 -10
- package/dist/npm/src/models/transactions/escrowCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/escrowFinish.d.ts +2 -2
- package/dist/npm/src/models/transactions/escrowFinish.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowFinish.js +1 -6
- package/dist/npm/src/models/transactions/escrowFinish.js.map +1 -1
- package/dist/npm/src/models/transactions/index.d.ts +1 -1
- package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/index.js.map +1 -1
- package/dist/npm/src/models/transactions/metadata.d.ts +9 -1
- package/dist/npm/src/models/transactions/metadata.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/metadata.js.map +1 -1
- package/dist/npm/src/models/transactions/offerCreate.js +1 -1
- package/dist/npm/src/models/transactions/offerCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/payment.d.ts +7 -2
- package/dist/npm/src/models/transactions/payment.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/payment.js +3 -10
- package/dist/npm/src/models/transactions/payment.js.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelClaim.js +1 -1
- package/dist/npm/src/models/transactions/paymentChannelClaim.js.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelCreate.d.ts +2 -2
- package/dist/npm/src/models/transactions/paymentChannelCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelCreate.js +2 -10
- package/dist/npm/src/models/transactions/paymentChannelCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/transaction.d.ts +8 -3
- package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/transaction.js.map +1 -1
- package/dist/npm/src/models/transactions/trustSet.js +1 -1
- package/dist/npm/src/models/transactions/trustSet.js.map +1 -1
- package/dist/npm/src/models/utils/flags.d.ts.map +1 -1
- package/dist/npm/src/models/utils/flags.js +17 -28
- package/dist/npm/src/models/utils/flags.js.map +1 -1
- package/dist/npm/src/sugar/autofill.d.ts +6 -2
- package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/src/sugar/autofill.js +9 -28
- package/dist/npm/src/sugar/autofill.js.map +1 -1
- package/dist/npm/src/sugar/balances.d.ts +2 -17
- package/dist/npm/src/sugar/balances.d.ts.map +1 -1
- package/dist/npm/src/sugar/balances.js +2 -60
- package/dist/npm/src/sugar/balances.js.map +1 -1
- package/dist/npm/src/sugar/getOrderbook.d.ts +19 -5
- package/dist/npm/src/sugar/getOrderbook.d.ts.map +1 -1
- package/dist/npm/src/sugar/getOrderbook.js +72 -53
- package/dist/npm/src/sugar/getOrderbook.js.map +1 -1
- package/dist/npm/src/sugar/index.d.ts +0 -4
- package/dist/npm/src/sugar/index.d.ts.map +1 -1
- package/dist/npm/src/sugar/index.js +0 -13
- package/dist/npm/src/sugar/index.js.map +1 -1
- package/dist/npm/src/sugar/submit.d.ts +6 -9
- package/dist/npm/src/sugar/submit.d.ts.map +1 -1
- package/dist/npm/src/sugar/submit.js +5 -22
- package/dist/npm/src/sugar/submit.js.map +1 -1
- package/dist/npm/src/utils/collections.d.ts +7 -0
- package/dist/npm/src/utils/collections.d.ts.map +1 -0
- package/dist/npm/src/utils/collections.js +22 -0
- package/dist/npm/src/utils/collections.js.map +1 -0
- package/dist/npm/src/utils/getBalanceChanges.d.ts.map +1 -1
- package/dist/npm/src/utils/getBalanceChanges.js +3 -4
- package/dist/npm/src/utils/getBalanceChanges.js.map +1 -1
- package/dist/npm/src/utils/getNFTokenID.d.ts.map +1 -1
- package/dist/npm/src/utils/getNFTokenID.js +8 -8
- package/dist/npm/src/utils/getNFTokenID.js.map +1 -1
- package/dist/npm/src/utils/hashes/SHAMap/node.js +1 -1
- package/dist/npm/src/utils/hashes/SHAMap/node.js.map +1 -1
- package/dist/npm/src/utils/hashes/hashLedger.d.ts +2 -1
- package/dist/npm/src/utils/hashes/hashLedger.d.ts.map +1 -1
- package/dist/npm/src/utils/hashes/hashLedger.js.map +1 -1
- package/dist/npm/src/utils/hashes/sha512Half.d.ts.map +1 -1
- package/dist/npm/src/utils/hashes/sha512Half.js +4 -7
- package/dist/npm/src/utils/hashes/sha512Half.js.map +1 -1
- package/dist/npm/sugar/autofill.d.ts +6 -2
- package/dist/npm/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/sugar/autofill.js +9 -28
- package/dist/npm/sugar/autofill.js.map +1 -1
- package/dist/npm/sugar/balances.d.ts +2 -17
- package/dist/npm/sugar/balances.d.ts.map +1 -1
- package/dist/npm/sugar/balances.js +2 -60
- package/dist/npm/sugar/balances.js.map +1 -1
- package/dist/npm/sugar/getOrderbook.d.ts +19 -5
- package/dist/npm/sugar/getOrderbook.d.ts.map +1 -1
- package/dist/npm/sugar/getOrderbook.js +72 -53
- package/dist/npm/sugar/getOrderbook.js.map +1 -1
- package/dist/npm/sugar/index.d.ts +0 -4
- package/dist/npm/sugar/index.d.ts.map +1 -1
- package/dist/npm/sugar/index.js +0 -13
- package/dist/npm/sugar/index.js.map +1 -1
- package/dist/npm/sugar/submit.d.ts +6 -9
- package/dist/npm/sugar/submit.d.ts.map +1 -1
- package/dist/npm/sugar/submit.js +5 -22
- package/dist/npm/sugar/submit.js.map +1 -1
- package/dist/npm/utils/collections.d.ts +7 -0
- package/dist/npm/utils/collections.d.ts.map +1 -0
- package/dist/npm/utils/collections.js +22 -0
- package/dist/npm/utils/collections.js.map +1 -0
- package/dist/npm/utils/getBalanceChanges.d.ts.map +1 -1
- package/dist/npm/utils/getBalanceChanges.js +3 -4
- package/dist/npm/utils/getBalanceChanges.js.map +1 -1
- package/dist/npm/utils/getNFTokenID.d.ts.map +1 -1
- package/dist/npm/utils/getNFTokenID.js +8 -8
- package/dist/npm/utils/getNFTokenID.js.map +1 -1
- package/dist/npm/utils/hashes/SHAMap/node.js +1 -1
- package/dist/npm/utils/hashes/SHAMap/node.js.map +1 -1
- package/dist/npm/utils/hashes/hashLedger.d.ts +2 -1
- package/dist/npm/utils/hashes/hashLedger.d.ts.map +1 -1
- package/dist/npm/utils/hashes/hashLedger.js.map +1 -1
- package/dist/npm/utils/hashes/sha512Half.d.ts.map +1 -1
- package/dist/npm/utils/hashes/sha512Half.js +4 -7
- package/dist/npm/utils/hashes/sha512Half.js.map +1 -1
- package/package.json +32 -25
- package/src/Wallet/authorizeChannel.ts +26 -0
- package/src/Wallet/defaultFaucets.ts +0 -4
- package/src/Wallet/fundWallet.ts +151 -212
- package/src/Wallet/index.ts +28 -25
- package/src/Wallet/signer.ts +32 -43
- package/src/Wallet/walletFromSecretNumbers.ts +1 -1
- package/src/client/RequestManager.ts +40 -14
- package/src/client/connection.ts +20 -89
- package/src/client/index.ts +704 -269
- package/src/client/partialPayment.ts +20 -10
- package/src/errors.ts +1 -3
- package/src/index.ts +1 -3
- package/src/models/ledger/AMM.ts +2 -10
- package/src/models/ledger/AccountRoot.ts +2 -12
- package/src/models/ledger/Amendments.ts +4 -2
- package/src/models/ledger/BaseLedgerEntry.ts +25 -1
- package/src/models/ledger/Bridge.ts +2 -14
- package/src/models/ledger/Check.ts +2 -2
- package/src/models/ledger/DepositPreauth.ts +4 -12
- package/src/models/ledger/DirectoryNode.ts +4 -2
- package/src/models/ledger/Escrow.ts +2 -12
- package/src/models/ledger/FeeSettings.ts +2 -2
- package/src/models/ledger/Ledger.ts +10 -4
- package/src/models/ledger/LedgerEntry.ts +22 -1
- package/src/models/ledger/LedgerHashes.ts +4 -2
- package/src/models/ledger/NFTokenOffer.ts +2 -4
- package/src/models/ledger/NFTokenPage.ts +2 -4
- package/src/models/ledger/NegativeUNL.ts +4 -2
- package/src/models/ledger/Offer.ts +2 -12
- package/src/models/ledger/PayChannel.ts +2 -12
- package/src/models/ledger/RippleState.ts +2 -12
- package/src/models/ledger/SignerList.ts +2 -12
- package/src/models/ledger/Ticket.ts +2 -12
- package/src/models/ledger/XChainOwnedClaimID.ts +4 -12
- package/src/models/ledger/XChainOwnedCreateAccountClaimID.ts +3 -12
- package/src/models/ledger/index.ts +2 -1
- package/src/models/methods/accountObjects.ts +10 -44
- package/src/models/methods/index.ts +175 -0
- package/src/models/methods/ledger.ts +154 -20
- package/src/models/methods/ledgerData.ts +5 -1
- package/src/models/methods/ledgerEntry.ts +2 -2
- package/src/models/methods/subscribe.ts +36 -0
- package/src/models/methods/tx.ts +6 -3
- package/src/models/transactions/NFTokenAcceptOffer.ts +6 -0
- package/src/models/transactions/NFTokenBurn.ts +13 -9
- package/src/models/transactions/NFTokenCancelOffer.ts +6 -0
- package/src/models/transactions/NFTokenCreateOffer.ts +14 -2
- package/src/models/transactions/NFTokenMint.ts +17 -2
- package/src/models/transactions/UNLModify.ts +3 -1
- package/src/models/transactions/XChainAccountCreateCommit.ts +4 -4
- package/src/models/transactions/XChainAddAccountCreateAttestation.ts +10 -8
- package/src/models/transactions/XChainAddClaimAttestation.ts +10 -8
- package/src/models/transactions/XChainClaim.ts +4 -2
- package/src/models/transactions/XChainCommit.ts +4 -2
- package/src/models/transactions/XChainCreateClaimID.ts +4 -3
- package/src/models/transactions/accountDelete.ts +12 -18
- package/src/models/transactions/accountSet.ts +10 -11
- package/src/models/transactions/checkCreate.ts +8 -15
- package/src/models/transactions/common.ts +20 -1
- package/src/models/transactions/escrowCancel.ts +9 -9
- package/src/models/transactions/escrowCreate.ts +12 -16
- package/src/models/transactions/escrowFinish.ts +9 -9
- package/src/models/transactions/index.ts +6 -1
- package/src/models/transactions/metadata.ts +31 -1
- package/src/models/transactions/payment.ts +14 -14
- package/src/models/transactions/paymentChannelCreate.ts +12 -21
- package/src/models/transactions/transaction.ts +11 -4
- package/src/models/utils/flags.ts +18 -28
- package/src/sugar/autofill.ts +84 -88
- package/src/sugar/balances.ts +8 -116
- package/src/sugar/getOrderbook.ts +138 -61
- package/src/sugar/index.ts +0 -8
- package/src/sugar/submit.ts +114 -132
- package/src/utils/collections.ts +53 -0
- package/src/utils/getBalanceChanges.ts +2 -3
- package/src/utils/getNFTokenID.ts +18 -16
- package/src/utils/hashes/hashLedger.ts +4 -1
- package/src/utils/hashes/sha512Half.ts +4 -7
- package/dist/npm/client/BroadcastClient.d.ts +0 -7
- package/dist/npm/client/BroadcastClient.d.ts.map +0 -1
- package/dist/npm/client/BroadcastClient.js +0 -49
- package/dist/npm/client/BroadcastClient.js.map +0 -1
- package/dist/npm/client/WSWrapper.d.ts +0 -25
- package/dist/npm/client/WSWrapper.d.ts.map +0 -1
- package/dist/npm/client/WSWrapper.js +0 -44
- package/dist/npm/client/WSWrapper.js.map +0 -1
- package/dist/npm/src/client/BroadcastClient.d.ts +0 -7
- package/dist/npm/src/client/BroadcastClient.d.ts.map +0 -1
- package/dist/npm/src/client/BroadcastClient.js +0 -49
- package/dist/npm/src/client/BroadcastClient.js.map +0 -1
- package/dist/npm/src/client/WSWrapper.d.ts +0 -25
- package/dist/npm/src/client/WSWrapper.d.ts.map +0 -1
- package/dist/npm/src/client/WSWrapper.js +0 -44
- package/dist/npm/src/client/WSWrapper.js.map +0 -1
- package/dist/npm/src/sugar/getLedgerIndex.d.ts +0 -3
- package/dist/npm/src/sugar/getLedgerIndex.d.ts.map +0 -1
- package/dist/npm/src/sugar/getLedgerIndex.js +0 -22
- package/dist/npm/src/sugar/getLedgerIndex.js.map +0 -1
- package/dist/npm/sugar/getLedgerIndex.d.ts +0 -3
- package/dist/npm/sugar/getLedgerIndex.d.ts.map +0 -1
- package/dist/npm/sugar/getLedgerIndex.js +0 -22
- package/dist/npm/sugar/getLedgerIndex.js.map +0 -1
- package/src/client/BroadcastClient.ts +0 -84
- package/src/client/WSWrapper.ts +0 -106
- package/src/sugar/getLedgerIndex.ts +0 -15
@@ -2,7 +2,7 @@ import { Amount } from 'ripple-binary-codec/dist/types'
|
|
2
2
|
|
3
3
|
import { XChainBridge } from '../common'
|
4
4
|
|
5
|
-
import BaseLedgerEntry from './BaseLedgerEntry'
|
5
|
+
import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
|
6
6
|
|
7
7
|
/**
|
8
8
|
* An XChainOwnedClaimID object represents one cross-chain transfer of value
|
@@ -11,7 +11,9 @@ import BaseLedgerEntry from './BaseLedgerEntry'
|
|
11
11
|
*
|
12
12
|
* @category Ledger Entries
|
13
13
|
*/
|
14
|
-
export default interface XChainOwnedClaimID
|
14
|
+
export default interface XChainOwnedClaimID
|
15
|
+
extends BaseLedgerEntry,
|
16
|
+
HasPreviousTxnID {
|
15
17
|
LedgerEntryType: 'XChainOwnedClaimID'
|
16
18
|
|
17
19
|
/** The account that checked out this unique claim ID value. */
|
@@ -76,14 +78,4 @@ export default interface XChainOwnedClaimID extends BaseLedgerEntry {
|
|
76
78
|
* object, in case the directory consists of multiple pages.
|
77
79
|
*/
|
78
80
|
OwnerNode: string
|
79
|
-
/**
|
80
|
-
* The identifying hash of the transaction that most recently modified this
|
81
|
-
* object.
|
82
|
-
*/
|
83
|
-
PreviousTxnID: string
|
84
|
-
/**
|
85
|
-
* The index of the ledger that contains the transaction that most recently
|
86
|
-
* modified this object.
|
87
|
-
*/
|
88
|
-
PreviousTxnLgrSeq: number
|
89
81
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { XChainBridge } from '../common'
|
2
2
|
|
3
|
-
import BaseLedgerEntry from './BaseLedgerEntry'
|
3
|
+
import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
|
4
4
|
|
5
5
|
/**
|
6
6
|
* The XChainOwnedCreateAccountClaimID ledger object is used to collect attestations
|
@@ -9,7 +9,8 @@ import BaseLedgerEntry from './BaseLedgerEntry'
|
|
9
9
|
* @category Ledger Entries
|
10
10
|
*/
|
11
11
|
export default interface XChainOwnedCreateAccountClaimID
|
12
|
-
extends BaseLedgerEntry
|
12
|
+
extends BaseLedgerEntry,
|
13
|
+
HasPreviousTxnID {
|
13
14
|
LedgerEntryType: 'XChainOwnedCreateAccountClaimID'
|
14
15
|
|
15
16
|
/** The account that owns this object. */
|
@@ -61,14 +62,4 @@ export default interface XChainOwnedCreateAccountClaimID
|
|
61
62
|
* object, in case the directory consists of multiple pages.
|
62
63
|
*/
|
63
64
|
OwnerNode: string
|
64
|
-
/**
|
65
|
-
* The identifying hash of the transaction that most recently modified this
|
66
|
-
* object.
|
67
|
-
*/
|
68
|
-
PreviousTxnID: string
|
69
|
-
/**
|
70
|
-
* The index of the ledger that contains the transaction that most recently
|
71
|
-
* modified this object.
|
72
|
-
*/
|
73
|
-
PreviousTxnLgrSeq: number
|
74
65
|
}
|
@@ -15,7 +15,7 @@ import FeeSettings, {
|
|
15
15
|
FEE_SETTINGS_ID,
|
16
16
|
} from './FeeSettings'
|
17
17
|
import Ledger from './Ledger'
|
18
|
-
import LedgerEntry from './LedgerEntry'
|
18
|
+
import { LedgerEntry, LedgerEntryFilter } from './LedgerEntry'
|
19
19
|
import LedgerHashes from './LedgerHashes'
|
20
20
|
import NegativeUNL, { NEGATIVE_UNL_ID } from './NegativeUNL'
|
21
21
|
import { NFTokenOffer } from './NFTokenOffer'
|
@@ -45,6 +45,7 @@ export {
|
|
45
45
|
FeeSettingsPreAmendmentFields,
|
46
46
|
FeeSettingsPostAmendmentFields,
|
47
47
|
Ledger,
|
48
|
+
LedgerEntryFilter,
|
48
49
|
LedgerEntry,
|
49
50
|
LedgerHashes,
|
50
51
|
Majority,
|
@@ -1,35 +1,12 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
Bridge,
|
4
|
-
Check,
|
5
|
-
DepositPreauth,
|
6
|
-
Escrow,
|
7
|
-
Offer,
|
8
|
-
PayChannel,
|
9
|
-
RippleState,
|
10
|
-
SignerList,
|
11
|
-
Ticket,
|
12
|
-
XChainOwnedClaimID,
|
13
|
-
XChainOwnedCreateAccountClaimID,
|
14
|
-
} from '../ledger'
|
1
|
+
import { Amendments, FeeSettings, LedgerHashes } from '../ledger'
|
2
|
+
import { LedgerEntry, LedgerEntryFilter } from '../ledger/LedgerEntry'
|
15
3
|
|
16
4
|
import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
|
17
5
|
|
18
|
-
export type AccountObjectType =
|
19
|
-
|
20
|
-
| '
|
21
|
-
|
22
|
-
| 'deposit_preauth'
|
23
|
-
| 'escrow'
|
24
|
-
| 'nft_offer'
|
25
|
-
| 'offer'
|
26
|
-
| 'payment_channel'
|
27
|
-
| 'signer_list'
|
28
|
-
| 'state'
|
29
|
-
| 'ticket'
|
30
|
-
| 'xchain_owned_create_account_claim_id'
|
31
|
-
| 'xchain_owned_claim_id'
|
32
|
-
|
6
|
+
export type AccountObjectType = Exclude<
|
7
|
+
LedgerEntryFilter,
|
8
|
+
'amendments' | 'fee' | 'hashes'
|
9
|
+
>
|
33
10
|
/**
|
34
11
|
* The account_objects command returns the raw ledger format for all objects
|
35
12
|
* owned by an account. For a higher-level view of an account's trust lines and
|
@@ -46,8 +23,6 @@ export interface AccountObjectsRequest
|
|
46
23
|
account: string
|
47
24
|
/**
|
48
25
|
* If included, filter results to include only this type of ledger object.
|
49
|
-
* The valid types are: Check , DepositPreauth, Escrow, Offer, PayChannel,
|
50
|
-
* SignerList, Ticket, and RippleState (trust line).
|
51
26
|
*/
|
52
27
|
type?: AccountObjectType
|
53
28
|
/**
|
@@ -71,19 +46,10 @@ export interface AccountObjectsRequest
|
|
71
46
|
* Account Objects can be a Check, a DepositPreauth, an Escrow, an Offer, a
|
72
47
|
* PayChannel, a SignerList, a Ticket, or a RippleState.
|
73
48
|
*/
|
74
|
-
export type AccountObject =
|
75
|
-
|
76
|
-
|
|
77
|
-
|
78
|
-
| DepositPreauth
|
79
|
-
| Escrow
|
80
|
-
| Offer
|
81
|
-
| PayChannel
|
82
|
-
| SignerList
|
83
|
-
| RippleState
|
84
|
-
| Ticket
|
85
|
-
| XChainOwnedClaimID
|
86
|
-
| XChainOwnedCreateAccountClaimID
|
49
|
+
export type AccountObject = Exclude<
|
50
|
+
LedgerEntry,
|
51
|
+
Amendments | FeeSettings | LedgerHashes
|
52
|
+
>
|
87
53
|
|
88
54
|
/**
|
89
55
|
* Response expected from an {@link AccountObjectsRequest}.
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/* eslint-disable no-inline-comments -- Necessary for important note */
|
1
2
|
/* eslint-disable max-lines -- There is a lot to export */
|
2
3
|
import {
|
3
4
|
AccountChannelsRequest,
|
@@ -71,6 +72,11 @@ import {
|
|
71
72
|
LedgerQueueData,
|
72
73
|
LedgerRequest,
|
73
74
|
LedgerResponse,
|
75
|
+
LedgerRequestExpandedTransactionsOnly,
|
76
|
+
LedgerResponseExpanded,
|
77
|
+
LedgerRequestExpandedAccountsAndTransactions,
|
78
|
+
LedgerRequestExpandedAccountsOnly,
|
79
|
+
LedgerRequestExpandedTransactionsBinary,
|
74
80
|
} from './ledger'
|
75
81
|
import { LedgerClosedRequest, LedgerClosedResponse } from './ledgerClosed'
|
76
82
|
import { LedgerCurrentRequest, LedgerCurrentResponse } from './ledgerCurrent'
|
@@ -253,6 +259,175 @@ type Response =
|
|
253
259
|
// AMM methods
|
254
260
|
| AMMInfoResponse
|
255
261
|
|
262
|
+
export type RequestResponseMap<T> = T extends AccountChannelsRequest
|
263
|
+
? AccountChannelsResponse
|
264
|
+
: T extends AccountCurrenciesRequest
|
265
|
+
? AccountCurrenciesResponse
|
266
|
+
: T extends AccountInfoRequest
|
267
|
+
? AccountInfoResponse
|
268
|
+
: T extends AccountLinesRequest
|
269
|
+
? AccountLinesResponse
|
270
|
+
: T extends AccountNFTsRequest
|
271
|
+
? AccountNFTsResponse
|
272
|
+
: T extends AccountObjectsRequest
|
273
|
+
? AccountObjectsResponse
|
274
|
+
: T extends AccountOffersRequest
|
275
|
+
? AccountOffersResponse
|
276
|
+
: T extends AccountTxRequest
|
277
|
+
? AccountTxResponse
|
278
|
+
: T extends AMMInfoRequest
|
279
|
+
? AMMInfoResponse
|
280
|
+
: T extends GatewayBalancesRequest
|
281
|
+
? GatewayBalancesResponse
|
282
|
+
: T extends NoRippleCheckRequest
|
283
|
+
? NoRippleCheckResponse
|
284
|
+
: // NOTE: The order of these LedgerRequest types is important
|
285
|
+
// to get the proper type matching overrides based on parameters set
|
286
|
+
// in the request. For example LedgerRequestExpandedTransactionsBinary
|
287
|
+
// should match LedgerRequestExpandedTransactionsOnly, but not
|
288
|
+
// LedgerRequestExpandedAccountsOnly. This is because the
|
289
|
+
// LedgerRequestExpandedTransactionsBinary type is a superset of
|
290
|
+
// LedgerRequestExpandedTransactionsOnly, but not of the other.
|
291
|
+
// This is why LedgerRequestExpandedTransactionsBinary is listed
|
292
|
+
// first in the type list.
|
293
|
+
//
|
294
|
+
// Here is an example using real data:
|
295
|
+
// LedgerRequestExpandedTransactionsBinary = {
|
296
|
+
// command: 'ledger',
|
297
|
+
// ledger_index: 'validated',
|
298
|
+
// expand: true,
|
299
|
+
// transactions: true,
|
300
|
+
// binary: true,
|
301
|
+
// }
|
302
|
+
// LedgerRequestExpandedTransactionsOnly = {
|
303
|
+
// command: 'ledger',
|
304
|
+
// ledger_index: 'validated',
|
305
|
+
// expand: true,
|
306
|
+
// transactions: true,
|
307
|
+
// }
|
308
|
+
// LedgerRequestExpandedAccountsOnly = {
|
309
|
+
// command: 'ledger',
|
310
|
+
// ledger_index: 'validated',
|
311
|
+
// accounts: true,
|
312
|
+
// expand: true,
|
313
|
+
// }
|
314
|
+
// LedgerRequest = {
|
315
|
+
// command: 'ledger',
|
316
|
+
// ledger_index: 'validated',
|
317
|
+
// }
|
318
|
+
//
|
319
|
+
// The type with the most parameters set should be listed first. In this
|
320
|
+
// case LedgerRequestExpandedTransactionsBinary has the most parameters (`expand`, `transactions`, and `binary`)
|
321
|
+
// set, so it is listed first. When TypeScript tries to match the type of
|
322
|
+
// a request to a response, it will try to match the request type to the
|
323
|
+
// response type in the order they are listed. So, if we have a request
|
324
|
+
// with the following parameters:
|
325
|
+
// {
|
326
|
+
// command: 'ledger',
|
327
|
+
// ledger_index: 'validated',
|
328
|
+
// expand: true,
|
329
|
+
// transactions: true,
|
330
|
+
// binary: true,
|
331
|
+
// }
|
332
|
+
// TypeScript will first try to match the request type to
|
333
|
+
// LedgerRequestExpandedTransactionsBinary, which will succeed. It will
|
334
|
+
// then try to match the response type to LedgerResponseExpanded, which
|
335
|
+
// will also succeed. If we had listed LedgerRequestExpandedTransactionsOnly
|
336
|
+
// first, TypeScript would have tried to match the request type to
|
337
|
+
// LedgerRequestExpandedTransactionsOnly, which would have succeeded, but
|
338
|
+
// then we'd get the wrong response type, LedgerResponse, instead of
|
339
|
+
// LedgerResponseExpanded.
|
340
|
+
T extends LedgerRequestExpandedTransactionsBinary
|
341
|
+
? LedgerResponse
|
342
|
+
: T extends LedgerRequestExpandedAccountsAndTransactions
|
343
|
+
? LedgerResponseExpanded
|
344
|
+
: T extends LedgerRequestExpandedTransactionsOnly
|
345
|
+
? LedgerResponseExpanded
|
346
|
+
: T extends LedgerRequestExpandedAccountsOnly
|
347
|
+
? LedgerResponseExpanded
|
348
|
+
: T extends LedgerRequest
|
349
|
+
? LedgerResponse
|
350
|
+
: T extends LedgerClosedRequest
|
351
|
+
? LedgerClosedResponse
|
352
|
+
: T extends LedgerCurrentRequest
|
353
|
+
? LedgerCurrentResponse
|
354
|
+
: T extends LedgerDataRequest
|
355
|
+
? LedgerDataResponse
|
356
|
+
: T extends LedgerEntryRequest
|
357
|
+
? LedgerEntryResponse
|
358
|
+
: T extends SubmitRequest
|
359
|
+
? SubmitResponse
|
360
|
+
: T extends SubmitMultisignedRequest
|
361
|
+
? SubmitMultisignedResponse
|
362
|
+
: T extends TransactionEntryRequest
|
363
|
+
? TransactionEntryResponse
|
364
|
+
: T extends TxRequest
|
365
|
+
? TxResponse
|
366
|
+
: T extends BookOffersRequest
|
367
|
+
? BookOffersResponse
|
368
|
+
: T extends DepositAuthorizedRequest
|
369
|
+
? DepositAuthorizedResponse
|
370
|
+
: T extends PathFindRequest
|
371
|
+
? PathFindResponse
|
372
|
+
: T extends RipplePathFindRequest
|
373
|
+
? RipplePathFindResponse
|
374
|
+
: T extends ChannelVerifyRequest
|
375
|
+
? ChannelVerifyResponse
|
376
|
+
: T extends SubscribeRequest
|
377
|
+
? SubscribeResponse
|
378
|
+
: T extends UnsubscribeRequest
|
379
|
+
? UnsubscribeResponse
|
380
|
+
: T extends FeeRequest
|
381
|
+
? FeeResponse
|
382
|
+
: T extends ManifestRequest
|
383
|
+
? ManifestResponse
|
384
|
+
: T extends ServerInfoRequest
|
385
|
+
? ServerInfoResponse
|
386
|
+
: T extends ServerStateRequest
|
387
|
+
? ServerStateResponse
|
388
|
+
: T extends PingRequest
|
389
|
+
? PingResponse
|
390
|
+
: T extends RandomRequest
|
391
|
+
? RandomResponse
|
392
|
+
: T extends NFTBuyOffersRequest
|
393
|
+
? NFTBuyOffersResponse
|
394
|
+
: T extends NFTSellOffersRequest
|
395
|
+
? NFTSellOffersResponse
|
396
|
+
: T extends NFTInfoRequest
|
397
|
+
? NFTInfoResponse
|
398
|
+
: T extends NFTHistoryRequest
|
399
|
+
? NFTHistoryResponse
|
400
|
+
: Response
|
401
|
+
|
402
|
+
export type MarkerRequest = Request & {
|
403
|
+
limit?: number
|
404
|
+
marker?: unknown
|
405
|
+
}
|
406
|
+
|
407
|
+
export type MarkerResponse = Response & {
|
408
|
+
result: {
|
409
|
+
marker?: unknown
|
410
|
+
}
|
411
|
+
}
|
412
|
+
|
413
|
+
export type RequestAllResponseMap<T> = T extends AccountChannelsRequest
|
414
|
+
? AccountChannelsResponse
|
415
|
+
: T extends AccountLinesRequest
|
416
|
+
? AccountLinesResponse
|
417
|
+
: T extends AccountObjectsRequest
|
418
|
+
? AccountObjectsResponse
|
419
|
+
: T extends AccountOffersRequest
|
420
|
+
? AccountOffersResponse
|
421
|
+
: T extends AccountTxRequest
|
422
|
+
? AccountTxResponse
|
423
|
+
: T extends LedgerDataRequest
|
424
|
+
? LedgerDataResponse
|
425
|
+
: T extends AccountTxRequest
|
426
|
+
? AccountTxResponse
|
427
|
+
: T extends BookOffersRequest
|
428
|
+
? BookOffersResponse
|
429
|
+
: MarkerResponse
|
430
|
+
|
256
431
|
export {
|
257
432
|
// Allow users to define their own requests and responses. This is useful for releasing experimental versions
|
258
433
|
BaseRequest,
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Ledger } from '../ledger'
|
2
|
+
import { LedgerEntryFilter } from '../ledger/LedgerEntry'
|
2
3
|
import { Transaction, TransactionAndMetadata } from '../transactions'
|
3
4
|
import { TransactionMetadata } from '../transactions/metadata'
|
4
5
|
|
@@ -65,6 +66,116 @@ export interface LedgerRequest extends BaseRequest, LookupByLedgerRequest {
|
|
65
66
|
* array of queued transactions in the results.
|
66
67
|
*/
|
67
68
|
queue?: boolean
|
69
|
+
/**
|
70
|
+
* If included, filter results to include only this type of ledger object.
|
71
|
+
*/
|
72
|
+
type?: LedgerEntryFilter
|
73
|
+
}
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Retrieve information about the public ledger. Expects a response in the form
|
77
|
+
* of a {@link LedgerResponseExpanded}. Will return full JSON-formatted transaction data instead of string hashes.
|
78
|
+
*
|
79
|
+
* @example
|
80
|
+
* ```ts
|
81
|
+
* const ledger: LedgerRequest = {
|
82
|
+
* "id": 14,
|
83
|
+
* "command": "ledger",
|
84
|
+
* "ledger_index": "validated",
|
85
|
+
* "full": false,
|
86
|
+
* "accounts": false,
|
87
|
+
* "transactions": false,
|
88
|
+
* "expand": true,
|
89
|
+
* "owner_funds": false
|
90
|
+
* }
|
91
|
+
* ```
|
92
|
+
*
|
93
|
+
* @category Requests
|
94
|
+
*/
|
95
|
+
export interface LedgerRequestExpandedTransactionsOnly extends LedgerRequest {
|
96
|
+
expand: true
|
97
|
+
transactions: true
|
98
|
+
}
|
99
|
+
|
100
|
+
/**
|
101
|
+
* Retrieve information about the public ledger. Expects a response in the form
|
102
|
+
* of a {@link LedgerResponseExpanded}. Will return full JSON-formatted `accountState` data instead of string hashes.
|
103
|
+
*
|
104
|
+
* @example
|
105
|
+
* ```ts
|
106
|
+
* const ledger: LedgerRequest = {
|
107
|
+
* "id": 14,
|
108
|
+
* "command": "ledger",
|
109
|
+
* "ledger_index": "validated",
|
110
|
+
* "full": false,
|
111
|
+
* "accounts": true,
|
112
|
+
* "transactions": false,
|
113
|
+
* "expand": true,
|
114
|
+
* "owner_funds": false
|
115
|
+
* }
|
116
|
+
* ```
|
117
|
+
*
|
118
|
+
* @category Requests
|
119
|
+
*/
|
120
|
+
export interface LedgerRequestExpandedAccountsOnly extends LedgerRequest {
|
121
|
+
expand: true
|
122
|
+
accounts: true
|
123
|
+
}
|
124
|
+
|
125
|
+
/**
|
126
|
+
* Retrieve information about the public ledger. Expects a response in the form
|
127
|
+
* of a {@link LedgerResponseExpanded}. Will return full JSON-formatted `accountState` and `transactions`
|
128
|
+
* data instead of string hashes.
|
129
|
+
*
|
130
|
+
* @example
|
131
|
+
* ```ts
|
132
|
+
* const ledger: LedgerRequest = {
|
133
|
+
* "id": 14,
|
134
|
+
* "command": "ledger",
|
135
|
+
* "ledger_index": "validated",
|
136
|
+
* "full": false,
|
137
|
+
* "accounts": true,
|
138
|
+
* "transactions": true,
|
139
|
+
* "expand": true,
|
140
|
+
* "owner_funds": false
|
141
|
+
* }
|
142
|
+
* ```
|
143
|
+
*
|
144
|
+
* @category Requests
|
145
|
+
*/
|
146
|
+
export interface LedgerRequestExpandedAccountsAndTransactions
|
147
|
+
extends LedgerRequest {
|
148
|
+
expand: true
|
149
|
+
accounts: true
|
150
|
+
transactions: true
|
151
|
+
}
|
152
|
+
|
153
|
+
/**
|
154
|
+
* Retrieve information about the public ledger. Expects a response in the form
|
155
|
+
* of a {@link LedgerResponse}. Will return binary (hexadecimal string) format
|
156
|
+
* instead of JSON or string hashes for `transactions` data.
|
157
|
+
*
|
158
|
+
* @example
|
159
|
+
* ```ts
|
160
|
+
* const ledger: LedgerRequest = {
|
161
|
+
* "id": 14,
|
162
|
+
* "command": "ledger",
|
163
|
+
* "ledger_index": "validated",
|
164
|
+
* "full": false,
|
165
|
+
* "accounts": true,
|
166
|
+
* "transactions": true,
|
167
|
+
* "expand": true,
|
168
|
+
* "owner_funds": false,
|
169
|
+
* "binary": true
|
170
|
+
* }
|
171
|
+
* ```
|
172
|
+
*
|
173
|
+
* @category Requests
|
174
|
+
*/
|
175
|
+
export interface LedgerRequestExpandedTransactionsBinary extends LedgerRequest {
|
176
|
+
expand: true
|
177
|
+
transactions: true
|
178
|
+
binary: true
|
68
179
|
}
|
69
180
|
|
70
181
|
/**
|
@@ -96,30 +207,53 @@ export interface LedgerBinary
|
|
96
207
|
transactions?: string[]
|
97
208
|
}
|
98
209
|
|
210
|
+
interface LedgerResponseBase {
|
211
|
+
/** Unique identifying hash of the entire ledger. */
|
212
|
+
ledger_hash: string
|
213
|
+
/** The Ledger Index of this ledger. */
|
214
|
+
ledger_index: number
|
215
|
+
/**
|
216
|
+
* If true, this is a validated ledger version. If omitted or set to false,
|
217
|
+
* this ledger's data is not final.
|
218
|
+
*/
|
219
|
+
queue_data?: Array<LedgerQueueData | string>
|
220
|
+
/**
|
221
|
+
* Array of objects describing queued transactions, in the same order as
|
222
|
+
* the queue. If the request specified expand as true, members contain full
|
223
|
+
* representations of the transactions, in either JSON or binary depending
|
224
|
+
* on whether the request specified binary as true.
|
225
|
+
*/
|
226
|
+
validated?: boolean
|
227
|
+
}
|
228
|
+
|
229
|
+
interface LedgerResponseResult extends LedgerResponseBase {
|
230
|
+
/** The complete header data of this {@link Ledger}. */
|
231
|
+
ledger: LedgerBinary
|
232
|
+
}
|
233
|
+
|
99
234
|
/**
|
100
235
|
* Response expected from a {@link LedgerRequest}.
|
236
|
+
* This is the default request response, triggered when `expand` and `binary` are both false.
|
101
237
|
*
|
102
238
|
* @category Responses
|
103
239
|
*/
|
104
240
|
export interface LedgerResponse extends BaseResponse {
|
105
|
-
result:
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
validated?: boolean
|
124
|
-
}
|
241
|
+
result: LedgerResponseResult
|
242
|
+
}
|
243
|
+
|
244
|
+
interface LedgerResponseExpandedResult extends LedgerResponseBase {
|
245
|
+
/** The complete header data of this {@link Ledger}. */
|
246
|
+
ledger: Ledger
|
247
|
+
}
|
248
|
+
|
249
|
+
/**
|
250
|
+
* Response expected from a {@link LedgerRequest} when the request contains `expanded` is true. See {@link LedgerRequestExpanded}.
|
251
|
+
* This response will contain full JSON-formatted data instead of string hashes.
|
252
|
+
* The response will contain either `accounts` or `transactions` or both.
|
253
|
+
* `binary` will be missing altogether.
|
254
|
+
*
|
255
|
+
* @category Responses
|
256
|
+
*/
|
257
|
+
export interface LedgerResponseExpanded extends BaseResponse {
|
258
|
+
result: LedgerResponseExpandedResult
|
125
259
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { LedgerEntry } from '../ledger'
|
1
|
+
import { LedgerEntry, LedgerEntryFilter } from '../ledger'
|
2
2
|
|
3
3
|
import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
|
4
4
|
|
@@ -37,6 +37,10 @@ export interface LedgerDataRequest extends BaseRequest, LookupByLedgerRequest {
|
|
37
37
|
* that response left off.
|
38
38
|
*/
|
39
39
|
marker?: unknown
|
40
|
+
/**
|
41
|
+
* If included, filter results to include only this type of ledger object.
|
42
|
+
*/
|
43
|
+
type?: LedgerEntryFilter
|
40
44
|
}
|
41
45
|
|
42
46
|
export type LedgerDataLabeledLedgerEntry = {
|
@@ -184,7 +184,7 @@ export interface LedgerEntryRequest extends BaseRequest, LookupByLedgerRequest {
|
|
184
184
|
*
|
185
185
|
* @category Responses
|
186
186
|
*/
|
187
|
-
export interface LedgerEntryResponse extends BaseResponse {
|
187
|
+
export interface LedgerEntryResponse<T = LedgerEntry> extends BaseResponse {
|
188
188
|
result: {
|
189
189
|
/** The unique ID of this ledger object. */
|
190
190
|
index: string
|
@@ -194,7 +194,7 @@ export interface LedgerEntryResponse extends BaseResponse {
|
|
194
194
|
* Object containing the data of this ledger object, according to the
|
195
195
|
* ledger format.
|
196
196
|
*/
|
197
|
-
node?:
|
197
|
+
node?: T
|
198
198
|
/** The binary representation of the ledger object, as hexadecimal. */
|
199
199
|
node_binary?: string
|
200
200
|
validated?: boolean
|
@@ -10,6 +10,7 @@ import { OfferCreate, Transaction } from '../transactions'
|
|
10
10
|
import { TransactionMetadata } from '../transactions/metadata'
|
11
11
|
|
12
12
|
import type { BaseRequest, BaseResponse } from './baseMethod'
|
13
|
+
import { ManifestRequest } from './manifest'
|
13
14
|
|
14
15
|
export interface SubscribeBook {
|
15
16
|
/**
|
@@ -433,3 +434,38 @@ export type Stream =
|
|
433
434
|
| PeerStatusStream
|
434
435
|
| OrderBookStream
|
435
436
|
| ConsensusStream
|
437
|
+
|
438
|
+
export type EventTypes =
|
439
|
+
| 'connected'
|
440
|
+
| 'disconnected'
|
441
|
+
| 'ledgerClosed'
|
442
|
+
| 'validationReceived'
|
443
|
+
| 'transaction'
|
444
|
+
| 'peerStatusChange'
|
445
|
+
| 'consensusPhase'
|
446
|
+
| 'manifestReceived'
|
447
|
+
| 'path_find'
|
448
|
+
| 'error'
|
449
|
+
|
450
|
+
export type OnEventToListenerMap<T extends EventTypes> = T extends 'connected'
|
451
|
+
? () => void
|
452
|
+
: T extends 'disconnected'
|
453
|
+
? (code: number) => void
|
454
|
+
: T extends 'ledgerClosed'
|
455
|
+
? (ledger: LedgerStream) => void
|
456
|
+
: T extends 'validationReceived'
|
457
|
+
? (validation: ValidationStream) => void
|
458
|
+
: T extends 'transaction'
|
459
|
+
? (transaction: TransactionStream) => void
|
460
|
+
: T extends 'peerStatusChange'
|
461
|
+
? (peerStatus: PeerStatusStream) => void
|
462
|
+
: T extends 'consensusPhase'
|
463
|
+
? (consensus: ConsensusStream) => void
|
464
|
+
: T extends 'manifestReceived'
|
465
|
+
? (manifest: ManifestRequest) => void
|
466
|
+
: T extends 'path_find'
|
467
|
+
? (path: PathFindStream) => void
|
468
|
+
: T extends 'error'
|
469
|
+
? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- needs to be any for overload
|
470
|
+
(...err: any[]) => void
|
471
|
+
: (...args: never[]) => void
|
package/src/models/methods/tx.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Transaction, TransactionMetadata } from '../transactions'
|
2
2
|
import { BaseTransaction } from '../transactions/common'
|
3
|
+
import { PseudoTransaction } from '../transactions/transaction'
|
3
4
|
|
4
5
|
import { BaseRequest, BaseResponse } from './baseMethod'
|
5
6
|
|
@@ -11,6 +12,7 @@ import { BaseRequest, BaseResponse } from './baseMethod'
|
|
11
12
|
*/
|
12
13
|
export interface TxRequest extends BaseRequest {
|
13
14
|
command: 'tx'
|
15
|
+
/** The 256-bit hash of the transaction, as hex. */
|
14
16
|
transaction: string
|
15
17
|
/**
|
16
18
|
* If true, return transaction data and metadata as binary serialized to
|
@@ -39,8 +41,9 @@ export interface TxRequest extends BaseRequest {
|
|
39
41
|
*
|
40
42
|
* @category Responses
|
41
43
|
*/
|
42
|
-
export interface TxResponse<
|
43
|
-
extends
|
44
|
+
export interface TxResponse<
|
45
|
+
T extends BaseTransaction = Transaction | PseudoTransaction,
|
46
|
+
> extends BaseResponse {
|
44
47
|
result: {
|
45
48
|
/** The SHA-512 hash of the transaction. */
|
46
49
|
hash: string
|
@@ -48,7 +51,7 @@ export interface TxResponse<T extends BaseTransaction = Transaction>
|
|
48
51
|
ledger_index?: number
|
49
52
|
/** Transaction metadata, which describes the results of the transaction.
|
50
53
|
* Can be undefined if a transaction has not been validated yet. */
|
51
|
-
meta?: TransactionMetadata | string
|
54
|
+
meta?: TransactionMetadata<T> | string
|
52
55
|
/**
|
53
56
|
* If true, this data comes from a validated ledger version; if omitted or.
|
54
57
|
* Set to false, this data is not final.
|
@@ -6,6 +6,7 @@ import {
|
|
6
6
|
parseAmountValue,
|
7
7
|
validateBaseTransaction,
|
8
8
|
} from './common'
|
9
|
+
import type { TransactionMetadataBase } from './metadata'
|
9
10
|
|
10
11
|
/**
|
11
12
|
* The NFTokenOfferAccept transaction is used to accept offers
|
@@ -64,6 +65,11 @@ export interface NFTokenAcceptOffer extends BaseTransaction {
|
|
64
65
|
NFTokenBrokerFee?: Amount
|
65
66
|
}
|
66
67
|
|
68
|
+
export interface NFTokenAcceptOfferMetadata extends TransactionMetadataBase {
|
69
|
+
// rippled 1.11.0 or later
|
70
|
+
nftoken_id?: string
|
71
|
+
}
|
72
|
+
|
67
73
|
function validateNFTokenBrokerFee(tx: Record<string, unknown>): void {
|
68
74
|
const value = parseAmountValue(tx.NFTokenBrokerFee)
|
69
75
|
if (Number.isNaN(value)) {
|