xrpl 2.10.0 → 2.12.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/build/xrpl-latest-min.js +1 -1
- package/build/xrpl-latest-min.js.map +1 -1
- package/build/xrpl-latest.js +1308 -33
- package/build/xrpl-latest.js.map +1 -1
- package/dist/npm/Wallet/walletFromSecretNumbers.d.ts +7 -0
- package/dist/npm/Wallet/walletFromSecretNumbers.d.ts.map +1 -0
- package/dist/npm/Wallet/walletFromSecretNumbers.js +27 -0
- package/dist/npm/Wallet/walletFromSecretNumbers.js.map +1 -0
- package/dist/npm/client/index.d.ts +2 -1
- package/dist/npm/client/index.d.ts.map +1 -1
- package/dist/npm/client/index.js.map +1 -1
- package/dist/npm/index.d.ts +1 -0
- package/dist/npm/index.d.ts.map +1 -1
- package/dist/npm/index.js +3 -1
- package/dist/npm/index.js.map +1 -1
- package/dist/npm/models/common/index.d.ts +11 -0
- package/dist/npm/models/common/index.d.ts.map +1 -1
- package/dist/npm/models/ledger/AMM.d.ts +27 -0
- package/dist/npm/models/ledger/AMM.d.ts.map +1 -0
- package/dist/npm/models/ledger/AMM.js +3 -0
- package/dist/npm/models/ledger/AMM.js.map +1 -0
- package/dist/npm/models/ledger/AccountRoot.d.ts +2 -0
- package/dist/npm/models/ledger/AccountRoot.d.ts.map +1 -1
- package/dist/npm/models/ledger/AccountRoot.js +1 -0
- package/dist/npm/models/ledger/AccountRoot.js.map +1 -1
- package/dist/npm/models/ledger/Bridge.d.ts +17 -0
- package/dist/npm/models/ledger/Bridge.d.ts.map +1 -0
- package/dist/npm/models/ledger/Bridge.js +3 -0
- package/dist/npm/models/ledger/Bridge.js.map +1 -0
- package/dist/npm/models/ledger/LedgerEntry.d.ts +5 -1
- package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts +16 -0
- package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts.map +1 -0
- package/dist/npm/models/ledger/XChainOwnedClaimID.js +3 -0
- package/dist/npm/models/ledger/XChainOwnedClaimID.js.map +1 -0
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +14 -0
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -0
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.js +3 -0
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.js.map +1 -0
- package/dist/npm/models/ledger/index.d.ts +4 -1
- 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 +3 -3
- package/dist/npm/models/methods/accountObjects.d.ts.map +1 -1
- package/dist/npm/models/methods/ammInfo.d.ts +39 -0
- package/dist/npm/models/methods/ammInfo.d.ts.map +1 -0
- package/dist/npm/models/methods/ammInfo.js +3 -0
- package/dist/npm/models/methods/ammInfo.js.map +1 -0
- package/dist/npm/models/methods/index.d.ts +4 -3
- package/dist/npm/models/methods/index.d.ts.map +1 -1
- package/dist/npm/models/methods/ledgerEntry.d.ts +27 -0
- package/dist/npm/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMBid.d.ts +12 -0
- package/dist/npm/models/transactions/AMMBid.d.ts.map +1 -0
- package/dist/npm/models/transactions/AMMBid.js +56 -0
- package/dist/npm/models/transactions/AMMBid.js.map +1 -0
- package/dist/npm/models/transactions/AMMCreate.d.ts +11 -0
- package/dist/npm/models/transactions/AMMCreate.d.ts.map +1 -0
- package/dist/npm/models/transactions/AMMCreate.js +32 -0
- package/dist/npm/models/transactions/AMMCreate.js.map +1 -0
- package/dist/npm/models/transactions/AMMDelete.d.ts +9 -0
- package/dist/npm/models/transactions/AMMDelete.d.ts.map +1 -0
- package/dist/npm/models/transactions/AMMDelete.js +22 -0
- package/dist/npm/models/transactions/AMMDelete.js.map +1 -0
- package/dist/npm/models/transactions/AMMDeposit.d.ts +27 -0
- package/dist/npm/models/transactions/AMMDeposit.d.ts.map +1 -0
- package/dist/npm/models/transactions/AMMDeposit.js +51 -0
- package/dist/npm/models/transactions/AMMDeposit.js.map +1 -0
- package/dist/npm/models/transactions/AMMVote.d.ts +10 -0
- package/dist/npm/models/transactions/AMMVote.d.ts.map +1 -0
- package/dist/npm/models/transactions/AMMVote.js +32 -0
- package/dist/npm/models/transactions/AMMVote.js.map +1 -0
- package/dist/npm/models/transactions/AMMWithdraw.d.ts +31 -0
- package/dist/npm/models/transactions/AMMWithdraw.d.ts.map +1 -0
- package/dist/npm/models/transactions/AMMWithdraw.js +50 -0
- package/dist/npm/models/transactions/AMMWithdraw.js.map +1 -0
- package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts +11 -0
- package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainAccountCreateCommit.js +35 -0
- package/dist/npm/models/transactions/XChainAccountCreateCommit.js.map +1 -0
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts +18 -0
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js +77 -0
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -0
- package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts +17 -0
- package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainAddClaimAttestation.js +68 -0
- package/dist/npm/models/transactions/XChainAddClaimAttestation.js.map +1 -0
- package/dist/npm/models/transactions/XChainClaim.d.ts +12 -0
- package/dist/npm/models/transactions/XChainClaim.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainClaim.js +39 -0
- package/dist/npm/models/transactions/XChainClaim.js.map +1 -0
- package/dist/npm/models/transactions/XChainCommit.d.ts +11 -0
- package/dist/npm/models/transactions/XChainCommit.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainCommit.js +33 -0
- package/dist/npm/models/transactions/XChainCommit.js.map +1 -0
- package/dist/npm/models/transactions/XChainCreateBridge.d.ts +10 -0
- package/dist/npm/models/transactions/XChainCreateBridge.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainCreateBridge.js +26 -0
- package/dist/npm/models/transactions/XChainCreateBridge.js.map +1 -0
- package/dist/npm/models/transactions/XChainCreateClaimID.d.ts +10 -0
- package/dist/npm/models/transactions/XChainCreateClaimID.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainCreateClaimID.js +28 -0
- package/dist/npm/models/transactions/XChainCreateClaimID.js.map +1 -0
- package/dist/npm/models/transactions/XChainModifyBridge.d.ts +17 -0
- package/dist/npm/models/transactions/XChainModifyBridge.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainModifyBridge.js +27 -0
- package/dist/npm/models/transactions/XChainModifyBridge.js.map +1 -0
- 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 +22 -1
- package/dist/npm/models/transactions/common.js.map +1 -1
- package/dist/npm/models/transactions/index.d.ts +15 -1
- package/dist/npm/models/transactions/index.d.ts.map +1 -1
- package/dist/npm/models/transactions/index.js +7 -1
- package/dist/npm/models/transactions/index.js.map +1 -1
- package/dist/npm/models/transactions/transaction.d.ts +15 -1
- package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/models/transactions/transaction.js +56 -0
- package/dist/npm/models/transactions/transaction.js.map +1 -1
- package/dist/npm/models/utils/flags.d.ts.map +1 -1
- package/dist/npm/models/utils/flags.js +18 -21
- package/dist/npm/models/utils/flags.js.map +1 -1
- package/dist/npm/snippets/src/bridgeTransfer.d.ts +2 -0
- package/dist/npm/snippets/src/bridgeTransfer.d.ts.map +1 -0
- package/dist/npm/snippets/src/bridgeTransfer.js +124 -0
- package/dist/npm/snippets/src/bridgeTransfer.js.map +1 -0
- package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -1
- package/dist/npm/src/Wallet/walletFromSecretNumbers.d.ts +7 -0
- package/dist/npm/src/Wallet/walletFromSecretNumbers.d.ts.map +1 -0
- package/dist/npm/src/Wallet/walletFromSecretNumbers.js +27 -0
- package/dist/npm/src/Wallet/walletFromSecretNumbers.js.map +1 -0
- package/dist/npm/src/client/index.d.ts +2 -1
- package/dist/npm/src/client/index.d.ts.map +1 -1
- package/dist/npm/src/client/index.js.map +1 -1
- package/dist/npm/src/index.d.ts +1 -0
- package/dist/npm/src/index.d.ts.map +1 -1
- package/dist/npm/src/index.js +3 -1
- package/dist/npm/src/index.js.map +1 -1
- package/dist/npm/src/models/common/index.d.ts +11 -0
- package/dist/npm/src/models/common/index.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AMM.d.ts +27 -0
- package/dist/npm/src/models/ledger/AMM.d.ts.map +1 -0
- package/dist/npm/src/models/ledger/AMM.js +3 -0
- package/dist/npm/src/models/ledger/AMM.js.map +1 -0
- package/dist/npm/src/models/ledger/AccountRoot.d.ts +2 -0
- package/dist/npm/src/models/ledger/AccountRoot.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.js +1 -0
- package/dist/npm/src/models/ledger/AccountRoot.js.map +1 -1
- package/dist/npm/src/models/ledger/Bridge.d.ts +17 -0
- package/dist/npm/src/models/ledger/Bridge.d.ts.map +1 -0
- package/dist/npm/src/models/ledger/Bridge.js +3 -0
- package/dist/npm/src/models/ledger/Bridge.js.map +1 -0
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts +5 -1
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts +16 -0
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts.map +1 -0
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.js +3 -0
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.js.map +1 -0
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +14 -0
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -0
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.js +3 -0
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.js.map +1 -0
- package/dist/npm/src/models/ledger/index.d.ts +4 -1
- 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 +3 -3
- package/dist/npm/src/models/methods/accountObjects.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ammInfo.d.ts +39 -0
- package/dist/npm/src/models/methods/ammInfo.d.ts.map +1 -0
- package/dist/npm/src/models/methods/ammInfo.js +3 -0
- package/dist/npm/src/models/methods/ammInfo.js.map +1 -0
- package/dist/npm/src/models/methods/index.d.ts +4 -3
- package/dist/npm/src/models/methods/index.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ledgerEntry.d.ts +27 -0
- package/dist/npm/src/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMBid.d.ts +12 -0
- package/dist/npm/src/models/transactions/AMMBid.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/AMMBid.js +56 -0
- package/dist/npm/src/models/transactions/AMMBid.js.map +1 -0
- package/dist/npm/src/models/transactions/AMMCreate.d.ts +11 -0
- package/dist/npm/src/models/transactions/AMMCreate.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/AMMCreate.js +32 -0
- package/dist/npm/src/models/transactions/AMMCreate.js.map +1 -0
- package/dist/npm/src/models/transactions/AMMDelete.d.ts +9 -0
- package/dist/npm/src/models/transactions/AMMDelete.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/AMMDelete.js +22 -0
- package/dist/npm/src/models/transactions/AMMDelete.js.map +1 -0
- package/dist/npm/src/models/transactions/AMMDeposit.d.ts +27 -0
- package/dist/npm/src/models/transactions/AMMDeposit.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/AMMDeposit.js +51 -0
- package/dist/npm/src/models/transactions/AMMDeposit.js.map +1 -0
- package/dist/npm/src/models/transactions/AMMVote.d.ts +10 -0
- package/dist/npm/src/models/transactions/AMMVote.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/AMMVote.js +32 -0
- package/dist/npm/src/models/transactions/AMMVote.js.map +1 -0
- package/dist/npm/src/models/transactions/AMMWithdraw.d.ts +31 -0
- package/dist/npm/src/models/transactions/AMMWithdraw.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/AMMWithdraw.js +50 -0
- package/dist/npm/src/models/transactions/AMMWithdraw.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts +11 -0
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js +35 -0
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts +18 -0
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js +77 -0
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts +17 -0
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js +68 -0
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainClaim.d.ts +12 -0
- package/dist/npm/src/models/transactions/XChainClaim.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainClaim.js +39 -0
- package/dist/npm/src/models/transactions/XChainClaim.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainCommit.d.ts +11 -0
- package/dist/npm/src/models/transactions/XChainCommit.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainCommit.js +33 -0
- package/dist/npm/src/models/transactions/XChainCommit.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainCreateBridge.d.ts +10 -0
- package/dist/npm/src/models/transactions/XChainCreateBridge.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainCreateBridge.js +26 -0
- package/dist/npm/src/models/transactions/XChainCreateBridge.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts +10 -0
- package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainCreateClaimID.js +28 -0
- package/dist/npm/src/models/transactions/XChainCreateClaimID.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainModifyBridge.d.ts +17 -0
- package/dist/npm/src/models/transactions/XChainModifyBridge.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainModifyBridge.js +27 -0
- package/dist/npm/src/models/transactions/XChainModifyBridge.js.map +1 -0
- 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 +22 -1
- package/dist/npm/src/models/transactions/common.js.map +1 -1
- package/dist/npm/src/models/transactions/index.d.ts +15 -1
- package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/index.js +7 -1
- package/dist/npm/src/models/transactions/index.js.map +1 -1
- package/dist/npm/src/models/transactions/transaction.d.ts +15 -1
- package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/transaction.js +56 -0
- package/dist/npm/src/models/transactions/transaction.js.map +1 -1
- package/dist/npm/src/models/utils/flags.d.ts.map +1 -1
- package/dist/npm/src/models/utils/flags.js +18 -21
- package/dist/npm/src/models/utils/flags.js.map +1 -1
- package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/src/sugar/autofill.js +4 -3
- package/dist/npm/src/sugar/autofill.js.map +1 -1
- package/dist/npm/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/sugar/autofill.js +4 -3
- package/dist/npm/sugar/autofill.js.map +1 -1
- package/package.json +8 -6
- package/src/ECDSA.ts +6 -0
- package/src/Wallet/defaultFaucets.ts +82 -0
- package/src/Wallet/fundWallet.ts +344 -0
- package/src/Wallet/index.ts +504 -0
- package/src/Wallet/rfc1751.ts +190 -0
- package/src/Wallet/rfc1751Words.json +243 -0
- package/src/Wallet/signer.ts +173 -0
- package/src/Wallet/walletFromSecretNumbers.ts +37 -0
- package/src/client/BroadcastClient.ts +84 -0
- package/src/client/ConnectionManager.ts +40 -0
- package/src/client/ExponentialBackoff.ts +71 -0
- package/src/client/RequestManager.ts +194 -0
- package/src/client/WSWrapper.ts +106 -0
- package/src/client/connection.ts +593 -0
- package/src/client/index.ts +712 -0
- package/src/client/partialPayment.ts +153 -0
- package/src/errors.ts +161 -0
- package/src/index.ts +20 -0
- package/src/models/common/index.ts +156 -0
- package/src/models/index.ts +16 -0
- package/src/models/ledger/AMM.ts +78 -0
- package/src/models/ledger/AccountRoot.ts +217 -0
- package/src/models/ledger/Amendments.ts +45 -0
- package/src/models/ledger/BaseLedgerEntry.ts +3 -0
- package/src/models/ledger/Bridge.ts +84 -0
- package/src/models/ledger/Check.ts +70 -0
- package/src/models/ledger/DepositPreauth.ts +35 -0
- package/src/models/ledger/DirectoryNode.ts +46 -0
- package/src/models/ledger/Escrow.ts +74 -0
- package/src/models/ledger/FeeSettings.ts +52 -0
- package/src/models/ledger/Ledger.ts +65 -0
- package/src/models/ledger/LedgerEntry.ts +40 -0
- package/src/models/ledger/LedgerHashes.ts +24 -0
- package/src/models/ledger/NFTokenOffer.ts +16 -0
- package/src/models/ledger/NFTokenPage.ts +20 -0
- package/src/models/ledger/NegativeUNL.ts +34 -0
- package/src/models/ledger/Offer.ts +52 -0
- package/src/models/ledger/PayChannel.ts +107 -0
- package/src/models/ledger/RippleState.ts +88 -0
- package/src/models/ledger/SignerList.ts +56 -0
- package/src/models/ledger/Ticket.ts +36 -0
- package/src/models/ledger/XChainOwnedClaimID.ts +73 -0
- package/src/models/ledger/XChainOwnedCreateAccountClaimID.ts +60 -0
- package/src/models/ledger/index.ts +64 -0
- package/src/models/methods/accountChannels.ts +93 -0
- package/src/models/methods/accountCurrencies.ts +45 -0
- package/src/models/methods/accountInfo.ts +182 -0
- package/src/models/methods/accountLines.ts +137 -0
- package/src/models/methods/accountNFTs.ts +72 -0
- package/src/models/methods/accountObjects.ts +129 -0
- package/src/models/methods/accountOffers.ts +100 -0
- package/src/models/methods/accountTx.ts +109 -0
- package/src/models/methods/ammInfo.ts +145 -0
- package/src/models/methods/baseMethod.ts +58 -0
- package/src/models/methods/bookOffers.ts +96 -0
- package/src/models/methods/channelVerify.ts +41 -0
- package/src/models/methods/depositAuthorized.ts +56 -0
- package/src/models/methods/fee.ts +91 -0
- package/src/models/methods/gatewayBalances.ts +85 -0
- package/src/models/methods/index.ts +391 -0
- package/src/models/methods/ledger.ts +125 -0
- package/src/models/methods/ledgerClosed.ts +32 -0
- package/src/models/methods/ledgerCurrent.ts +31 -0
- package/src/models/methods/ledgerData.ts +78 -0
- package/src/models/methods/ledgerEntry.ts +202 -0
- package/src/models/methods/manifest.ts +54 -0
- package/src/models/methods/nftBuyOffers.ts +37 -0
- package/src/models/methods/nftHistory.ts +113 -0
- package/src/models/methods/nftInfo.ts +25 -0
- package/src/models/methods/nftSellOffers.ts +37 -0
- package/src/models/methods/norippleCheck.ts +82 -0
- package/src/models/methods/pathFind.ts +116 -0
- package/src/models/methods/ping.ts +21 -0
- package/src/models/methods/random.ts +23 -0
- package/src/models/methods/ripplePathFind.ts +81 -0
- package/src/models/methods/serverInfo.ts +257 -0
- package/src/models/methods/serverState.ts +77 -0
- package/src/models/methods/submit.ts +94 -0
- package/src/models/methods/submitMultisigned.ts +51 -0
- package/src/models/methods/subscribe.ts +435 -0
- package/src/models/methods/transactionEntry.ts +47 -0
- package/src/models/methods/tx.ts +69 -0
- package/src/models/methods/unsubscribe.ts +49 -0
- package/src/models/transactions/AMMBid.ts +140 -0
- package/src/models/transactions/AMMCreate.ts +80 -0
- package/src/models/transactions/AMMDelete.ts +55 -0
- package/src/models/transactions/AMMDeposit.ts +130 -0
- package/src/models/transactions/AMMVote.ts +71 -0
- package/src/models/transactions/AMMWithdraw.ts +126 -0
- package/src/models/transactions/NFTokenAcceptOffer.ts +104 -0
- package/src/models/transactions/NFTokenBurn.ts +48 -0
- package/src/models/transactions/NFTokenCancelOffer.ts +45 -0
- package/src/models/transactions/NFTokenCreateOffer.ts +145 -0
- package/src/models/transactions/NFTokenMint.ts +123 -0
- package/src/models/transactions/UNLModify.ts +20 -0
- package/src/models/transactions/XChainAccountCreateCommit.ts +107 -0
- package/src/models/transactions/XChainAddAccountCreateAttestation.ts +225 -0
- package/src/models/transactions/XChainAddClaimAttestation.ts +198 -0
- package/src/models/transactions/XChainClaim.ts +103 -0
- package/src/models/transactions/XChainCommit.ts +95 -0
- package/src/models/transactions/XChainCreateBridge.ts +78 -0
- package/src/models/transactions/XChainCreateClaimID.ts +78 -0
- package/src/models/transactions/XChainModifyBridge.ts +93 -0
- package/src/models/transactions/accountDelete.ts +50 -0
- package/src/models/transactions/accountSet.ts +228 -0
- package/src/models/transactions/checkCancel.ts +34 -0
- package/src/models/transactions/checkCash.ts +73 -0
- package/src/models/transactions/checkCreate.ts +90 -0
- package/src/models/transactions/clawback.ts +49 -0
- package/src/models/transactions/common.ts +320 -0
- package/src/models/transactions/depositPreauth.ts +68 -0
- package/src/models/transactions/enableAmendment.ts +26 -0
- package/src/models/transactions/escrowCancel.ts +45 -0
- package/src/models/transactions/escrowCreate.ts +100 -0
- package/src/models/transactions/escrowFinish.ts +63 -0
- package/src/models/transactions/index.ts +78 -0
- package/src/models/transactions/metadata.ts +69 -0
- package/src/models/transactions/offerCancel.ts +37 -0
- package/src/models/transactions/offerCreate.ts +144 -0
- package/src/models/transactions/payment.ts +278 -0
- package/src/models/transactions/paymentChannelClaim.ts +165 -0
- package/src/models/transactions/paymentChannelCreate.ts +116 -0
- package/src/models/transactions/paymentChannelFund.ts +65 -0
- package/src/models/transactions/setFee.ts +48 -0
- package/src/models/transactions/setRegularKey.ts +33 -0
- package/src/models/transactions/signerListSet.ts +89 -0
- package/src/models/transactions/ticketCreate.ts +50 -0
- package/src/models/transactions/transaction.ts +370 -0
- package/src/models/transactions/trustSet.ts +146 -0
- package/src/models/utils/flags.ts +103 -0
- package/src/models/utils/index.ts +37 -0
- package/src/sugar/autofill.ts +373 -0
- package/src/sugar/balances.ts +123 -0
- package/src/sugar/getFeeXrp.ts +45 -0
- package/src/sugar/getLedgerIndex.ts +15 -0
- package/src/sugar/getOrderbook.ts +152 -0
- package/src/sugar/index.ts +11 -0
- package/src/sugar/submit.ts +305 -0
- package/src/sugar/utils.ts +29 -0
- package/src/utils/derive.ts +23 -0
- package/src/utils/getBalanceChanges.ts +186 -0
- package/src/utils/getNFTokenID.ts +97 -0
- package/src/utils/hashes/HashPrefix.ts +40 -0
- package/src/utils/hashes/README.md +65 -0
- package/src/utils/hashes/SHAMap/InnerNode.ts +124 -0
- package/src/utils/hashes/SHAMap/LeafNode.ts +69 -0
- package/src/utils/hashes/SHAMap/index.ts +41 -0
- package/src/utils/hashes/SHAMap/node.ts +14 -0
- package/src/utils/hashes/hashLedger.ts +236 -0
- package/src/utils/hashes/index.ts +187 -0
- package/src/utils/hashes/ledgerSpaces.ts +34 -0
- package/src/utils/hashes/sha512Half.ts +19 -0
- package/src/utils/index.ts +223 -0
- package/src/utils/parseNFTokenID.ts +84 -0
- package/src/utils/quality.ts +169 -0
- package/src/utils/signPaymentChannelClaim.ts +27 -0
- package/src/utils/stringConversion.ts +27 -0
- package/src/utils/timeConversion.ts +53 -0
- package/src/utils/verifyPaymentChannelClaim.ts +30 -0
- package/src/utils/xrpConversion.ts +104 -0
@@ -0,0 +1,116 @@
|
|
1
|
+
import { Amount, Path } from '../common'
|
2
|
+
|
3
|
+
import { BaseRequest, BaseResponse } from './baseMethod'
|
4
|
+
|
5
|
+
interface BasePathFindRequest extends BaseRequest {
|
6
|
+
command: 'path_find'
|
7
|
+
subcommand: string
|
8
|
+
}
|
9
|
+
|
10
|
+
/** Start sending pathfinding information. */
|
11
|
+
export interface PathFindCreateRequest extends BasePathFindRequest {
|
12
|
+
subcommand: 'create'
|
13
|
+
/**
|
14
|
+
* Unique address of the account to find a path from. In other words, the.
|
15
|
+
* Account that would be sending a payment.
|
16
|
+
*/
|
17
|
+
source_account: string
|
18
|
+
/** Unique address of the account to find a path to. */
|
19
|
+
destination_account: string
|
20
|
+
/**
|
21
|
+
* Currency Amount that the destination account would receive in a
|
22
|
+
* transaction.
|
23
|
+
*/
|
24
|
+
destination_amount: Amount
|
25
|
+
/** Currency amount that would be spent in the transaction. */
|
26
|
+
send_max?: Amount
|
27
|
+
/**
|
28
|
+
* Array of arrays of objects, representing payment paths to check. You can
|
29
|
+
* use this to keep updated on changes to particular paths you already know
|
30
|
+
* about, or to check the overall cost to make a payment along a certain path.
|
31
|
+
*/
|
32
|
+
paths?: Path[]
|
33
|
+
}
|
34
|
+
|
35
|
+
/** Stop sending pathfinding information. */
|
36
|
+
export interface PathFindCloseRequest extends BasePathFindRequest {
|
37
|
+
subcommand: 'close'
|
38
|
+
}
|
39
|
+
|
40
|
+
/** Get the information of the currently-open pathfinding request. */
|
41
|
+
export interface PathFindStatusRequest extends BasePathFindRequest {
|
42
|
+
subcommand: 'status'
|
43
|
+
}
|
44
|
+
|
45
|
+
/**
|
46
|
+
* The `path_find` method searches for a path along which a transaction can
|
47
|
+
* possibly be made, and periodically sends updates when the path changes over
|
48
|
+
* time. For a simpler version that is supported by JSON-RPC, see the
|
49
|
+
* `ripple_path_find` method.
|
50
|
+
*
|
51
|
+
* @category Requests
|
52
|
+
*/
|
53
|
+
export type PathFindRequest =
|
54
|
+
| PathFindCreateRequest
|
55
|
+
| PathFindCloseRequest
|
56
|
+
| PathFindStatusRequest
|
57
|
+
|
58
|
+
export interface PathFindPathOption {
|
59
|
+
/** Array of arrays of objects defining payment paths. */
|
60
|
+
paths_computed: Path[]
|
61
|
+
/**
|
62
|
+
* Currency Amount that the source would have to send along this path for the.
|
63
|
+
* Destination to receive the desired amount.
|
64
|
+
*/
|
65
|
+
source_amount: Amount
|
66
|
+
/**
|
67
|
+
* Destination Amount that the destination would receive along this path.
|
68
|
+
* If the `send_max` field is set, this field will be set.
|
69
|
+
*/
|
70
|
+
destination_amount?: Amount
|
71
|
+
}
|
72
|
+
|
73
|
+
/**
|
74
|
+
* Response expected from a {@link PathFindRequest}.
|
75
|
+
*
|
76
|
+
* @category Responses
|
77
|
+
*/
|
78
|
+
export interface PathFindResponse extends BaseResponse {
|
79
|
+
result: {
|
80
|
+
/**
|
81
|
+
* Array of objects with suggested paths to take, as described below. If
|
82
|
+
* empty, then no paths were found connecting the source and destination
|
83
|
+
* accounts.
|
84
|
+
*/
|
85
|
+
alternatives: PathFindPathOption[]
|
86
|
+
/** Unique address of the account that would receive a transaction. */
|
87
|
+
destination_account: string
|
88
|
+
/** Currency amount provided in the WebSocket request. */
|
89
|
+
destination_amount: Amount
|
90
|
+
/** Unique address that would send a transaction. */
|
91
|
+
source_account: string
|
92
|
+
/**
|
93
|
+
* If false, this is the result of an incomplete search. A later reply
|
94
|
+
* may have a better path. If true, then this is the best path found. (It is
|
95
|
+
* still theoretically possible that a better path could exist, but rippled
|
96
|
+
* won't find it.) Until you close the pathfinding request, rippled.
|
97
|
+
* Continues to send updates each time a new ledger closes.
|
98
|
+
*/
|
99
|
+
full_reply: boolean
|
100
|
+
/**
|
101
|
+
* The ID provided in the WebSocket request is included again at this
|
102
|
+
* level.
|
103
|
+
*/
|
104
|
+
id?: number | string
|
105
|
+
/**
|
106
|
+
* The value true indicates this reply is in response to a path_find close
|
107
|
+
* command.
|
108
|
+
*/
|
109
|
+
closed?: true
|
110
|
+
/**
|
111
|
+
* The value true indicates this reply is in response to a `path_find`
|
112
|
+
* status command.
|
113
|
+
*/
|
114
|
+
status?: true
|
115
|
+
}
|
116
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { BaseRequest, BaseResponse } from './baseMethod'
|
2
|
+
|
3
|
+
/**
|
4
|
+
* The ping command returns an acknowledgement, so that clients can test the
|
5
|
+
* connection status and latency. Expects a response in the form of a {@link
|
6
|
+
* PingResponse}.
|
7
|
+
*
|
8
|
+
* @category Requests
|
9
|
+
*/
|
10
|
+
export interface PingRequest extends BaseRequest {
|
11
|
+
command: 'ping'
|
12
|
+
}
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Response expected from a {@link PingRequest}.
|
16
|
+
*
|
17
|
+
* @category Responses
|
18
|
+
*/
|
19
|
+
export interface PingResponse extends BaseResponse {
|
20
|
+
result: { role?: string; unlimited?: boolean }
|
21
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { BaseRequest, BaseResponse } from './baseMethod'
|
2
|
+
|
3
|
+
/**
|
4
|
+
* The random command provides a random number to be used as a source of
|
5
|
+
* entropy for random number generation by clients. Expects a response in the
|
6
|
+
* form of a {@link RandomResponse}.
|
7
|
+
*
|
8
|
+
* @category Requests
|
9
|
+
*/
|
10
|
+
export interface RandomRequest extends BaseRequest {
|
11
|
+
command: 'random'
|
12
|
+
}
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Response expected from a {@link RandomRequest}.
|
16
|
+
*
|
17
|
+
* @category Responses
|
18
|
+
*/
|
19
|
+
export interface RandomResponse extends BaseResponse {
|
20
|
+
result: {
|
21
|
+
random: string
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import { Amount, Path } from '../common'
|
2
|
+
|
3
|
+
import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
|
4
|
+
|
5
|
+
export interface SourceCurrencyAmount {
|
6
|
+
currency: string
|
7
|
+
issuer?: string
|
8
|
+
}
|
9
|
+
|
10
|
+
/**
|
11
|
+
* The `ripple_path_find` method is a simplified version of the path_find method
|
12
|
+
* that provides a single response with a payment path you can use right away.
|
13
|
+
* Expects a response in the form of a {@link RipplePathFindResponse}.
|
14
|
+
*
|
15
|
+
* @category Requests
|
16
|
+
*/
|
17
|
+
export interface RipplePathFindRequest
|
18
|
+
extends BaseRequest,
|
19
|
+
LookupByLedgerRequest {
|
20
|
+
command: 'ripple_path_find'
|
21
|
+
/** Unique address of the account that would send funds in a transaction. */
|
22
|
+
source_account: string
|
23
|
+
/** Unique address of the account that would receive funds in a transaction. */
|
24
|
+
destination_account: string
|
25
|
+
/**
|
26
|
+
* Currency Amount that the destination account would receive in a
|
27
|
+
* transaction.
|
28
|
+
*/
|
29
|
+
destination_amount: Amount
|
30
|
+
/**
|
31
|
+
* Currency Amount that would be spent in the transaction. Cannot be used
|
32
|
+
* with `source_currencies`.
|
33
|
+
*/
|
34
|
+
send_max?: Amount
|
35
|
+
/**
|
36
|
+
* Array of currencies that the source account might want to spend. Each
|
37
|
+
* entry in the array should be a JSON object with a mandatory currency field
|
38
|
+
* and optional issuer field, like how currency amounts are specified.
|
39
|
+
*/
|
40
|
+
source_currencies?: SourceCurrencyAmount[]
|
41
|
+
}
|
42
|
+
|
43
|
+
export interface RipplePathFindPathOption {
|
44
|
+
/** Array of arrays of objects defining payment paths. */
|
45
|
+
paths_computed: Path[]
|
46
|
+
/**
|
47
|
+
* Currency amount that the source would have to send along this path for the
|
48
|
+
* destination to receive the desired amount.
|
49
|
+
*/
|
50
|
+
source_amount: Amount
|
51
|
+
}
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Response expected from a {@link RipplePathFindRequest}.
|
55
|
+
*
|
56
|
+
* @category Responses
|
57
|
+
*/
|
58
|
+
export interface RipplePathFindResponse extends BaseResponse {
|
59
|
+
result: {
|
60
|
+
/**
|
61
|
+
* Array of objects with possible paths to take, as described below. If
|
62
|
+
* empty, then there are no paths connecting the source and destination
|
63
|
+
* accounts.
|
64
|
+
*/
|
65
|
+
alternatives: RipplePathFindPathOption[]
|
66
|
+
/** Unique address of the account that would receive a payment transaction. */
|
67
|
+
destination_account: string
|
68
|
+
/**
|
69
|
+
* Array of strings representing the currencies that the destination
|
70
|
+
* accepts, as 3-letter codes like "USD" or as 40-character hex like
|
71
|
+
* "015841551A748AD2C1F76FF6ECB0CCCD00000000".
|
72
|
+
*/
|
73
|
+
destination_currencies: string[]
|
74
|
+
destination_amount: Amount
|
75
|
+
full_reply?: boolean
|
76
|
+
id?: number | string
|
77
|
+
ledger_current_index?: number
|
78
|
+
source_account: string
|
79
|
+
validated: boolean
|
80
|
+
}
|
81
|
+
}
|
@@ -0,0 +1,257 @@
|
|
1
|
+
import { BaseRequest, BaseResponse } from './baseMethod'
|
2
|
+
|
3
|
+
/**
|
4
|
+
* The `server_info` command asks the server for a human-readable version of
|
5
|
+
* various information about the rippled server being queried. Expects a
|
6
|
+
* response in the form of a {@link ServerInfoResponse}.
|
7
|
+
*
|
8
|
+
* @category Requests
|
9
|
+
*/
|
10
|
+
export interface ServerInfoRequest extends BaseRequest {
|
11
|
+
command: 'server_info'
|
12
|
+
}
|
13
|
+
|
14
|
+
export type ServerState =
|
15
|
+
| 'disconnected'
|
16
|
+
| 'connected'
|
17
|
+
| 'syncing'
|
18
|
+
| 'tracking'
|
19
|
+
| 'full'
|
20
|
+
| 'validating'
|
21
|
+
| 'proposing'
|
22
|
+
|
23
|
+
export interface StateAccounting {
|
24
|
+
duration_us: string
|
25
|
+
transitions: string
|
26
|
+
}
|
27
|
+
|
28
|
+
export interface JobType {
|
29
|
+
job_type: string
|
30
|
+
per_second: number
|
31
|
+
peak_time?: number
|
32
|
+
avg_time?: number
|
33
|
+
in_progress?: number
|
34
|
+
}
|
35
|
+
|
36
|
+
// The states for validating and proposing do not exist in the field state_accounting
|
37
|
+
// See https://github.com/XRPLF/rippled/blob/develop/src/ripple/app/misc/NetworkOPs.cpp#L4545
|
38
|
+
// https://github.com/XRPLF/rippled/blob/develop/src/ripple/app/misc/NetworkOPs.h#L66
|
39
|
+
export type StateAccountingFinal = Record<
|
40
|
+
Exclude<ServerState, 'validating' | 'proposing'>,
|
41
|
+
StateAccounting
|
42
|
+
>
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Response expected from a {@link ServerInfoRequest}.
|
46
|
+
*
|
47
|
+
* @category Responses
|
48
|
+
*/
|
49
|
+
export interface ServerInfoResponse extends BaseResponse {
|
50
|
+
result: {
|
51
|
+
info: {
|
52
|
+
/**
|
53
|
+
* If true, this server is amendment blocked. If the server is not
|
54
|
+
* amendment blocked, the response omits this field.
|
55
|
+
*/
|
56
|
+
amendment_blocked?: boolean
|
57
|
+
/** The version number of the running rippled version. */
|
58
|
+
build_version: string
|
59
|
+
/**
|
60
|
+
* Information on the most recently closed ledger that has not been
|
61
|
+
* validated by consensus. If the most recently validated ledger is
|
62
|
+
* available, the response omits this field and includes
|
63
|
+
* `validated_ledger` instead. The member fields are the same as the.
|
64
|
+
* `validated_ledger` field.
|
65
|
+
*/
|
66
|
+
closed_ledger?: {
|
67
|
+
age: number
|
68
|
+
base_fee_xrp: number
|
69
|
+
hash: string
|
70
|
+
reserve_base_xrp: number
|
71
|
+
reserve_inc_xrp: number
|
72
|
+
seq: number
|
73
|
+
}
|
74
|
+
/**
|
75
|
+
* Range expression indicating the sequence numbers of the ledger
|
76
|
+
* versions the local rippled has in its database.
|
77
|
+
*/
|
78
|
+
complete_ledgers: string
|
79
|
+
/**
|
80
|
+
* On an admin request, returns the hostname of the server running the
|
81
|
+
* rippled instance; otherwise, returns a single RFC-1751 word based on
|
82
|
+
* the node public key.
|
83
|
+
*/
|
84
|
+
hostid: string
|
85
|
+
/**
|
86
|
+
* Amount of time spent waiting for I/O operations, in milliseconds. If
|
87
|
+
* this number is not very, very low, then the rippled server is probably
|
88
|
+
* having serious load issues.
|
89
|
+
*/
|
90
|
+
io_latency_ms: number
|
91
|
+
/**
|
92
|
+
* The number of times (since starting up) that this server has had over
|
93
|
+
* 250 transactions waiting to be processed at once. A large number here
|
94
|
+
* may mean that your server is unable to handle the transaction load of
|
95
|
+
* the XRP Ledger network.
|
96
|
+
*/
|
97
|
+
jq_trans_overflow: string
|
98
|
+
/**
|
99
|
+
* Information about the last time the server closed a ledger, including
|
100
|
+
* the amount of time it took to reach a consensus and the number of
|
101
|
+
* trusted validators participating.
|
102
|
+
*/
|
103
|
+
last_close: {
|
104
|
+
/**
|
105
|
+
* The amount of time it took to reach a consensus on the most recently
|
106
|
+
* validated ledger version, in seconds.
|
107
|
+
*/
|
108
|
+
converge_time_s: number
|
109
|
+
/**
|
110
|
+
* How many trusted validators the server considered (including itself,
|
111
|
+
* if configured as a validator) in the consensus process for the most
|
112
|
+
* recently validated ledger version.
|
113
|
+
*/
|
114
|
+
proposers: number
|
115
|
+
}
|
116
|
+
/**
|
117
|
+
* (Admin only) Detailed information about the current load state of the
|
118
|
+
* server.
|
119
|
+
*/
|
120
|
+
load?: {
|
121
|
+
/**
|
122
|
+
* (Admin only) Information about the rate of different types of jobs
|
123
|
+
* the server is doing and how much time it spends on each.
|
124
|
+
*/
|
125
|
+
job_types: JobType[]
|
126
|
+
/** (Admin only) The number of threads in the server's main job pool. */
|
127
|
+
threads: number
|
128
|
+
}
|
129
|
+
/**
|
130
|
+
* The load-scaled open ledger transaction cost the server is currently
|
131
|
+
* enforcing, as a multiplier on the base transaction cost. For example,
|
132
|
+
* at 1000 load factor and a reference transaction cost of 10 drops of
|
133
|
+
* XRP, the load-scaled transaction cost is 10,000 drops (0.01 XRP). The
|
134
|
+
* load factor is determined by the highest of the individual server's
|
135
|
+
* load factor, the cluster's load factor, the open ledger cost and the
|
136
|
+
* overall network's load factor.
|
137
|
+
*/
|
138
|
+
load_factor?: number
|
139
|
+
/**
|
140
|
+
* The network id of the server.
|
141
|
+
*/
|
142
|
+
network_id?: number
|
143
|
+
/**
|
144
|
+
* Current multiplier to the transaction cost based on
|
145
|
+
* load to this server.
|
146
|
+
*/
|
147
|
+
load_factor_local?: number
|
148
|
+
/**
|
149
|
+
* Current multiplier to the transaction cost being used by the rest of
|
150
|
+
* the network.
|
151
|
+
*/
|
152
|
+
load_factor_net?: number
|
153
|
+
/**
|
154
|
+
* Current multiplier to the transaction cost based on load to servers
|
155
|
+
* in this cluster.
|
156
|
+
*/
|
157
|
+
load_factor_cluster?: number
|
158
|
+
/**
|
159
|
+
* The current multiplier to the transaction cost that a transaction must
|
160
|
+
* pay to get into the open ledger.
|
161
|
+
*/
|
162
|
+
load_factor_fee_escalation?: number
|
163
|
+
/**
|
164
|
+
* The current multiplier to the transaction cost that a transaction must
|
165
|
+
* pay to get into the queue, if the queue is full.
|
166
|
+
*/
|
167
|
+
load_factor_fee_queue?: number
|
168
|
+
/**
|
169
|
+
* The load factor the server is enforcing, not including the open ledger
|
170
|
+
* cost.
|
171
|
+
*/
|
172
|
+
load_factor_server?: number
|
173
|
+
/**
|
174
|
+
* The number of peer connections which were severed.
|
175
|
+
*/
|
176
|
+
peer_disconnects?: string
|
177
|
+
/**
|
178
|
+
* The number of peer connections which were severed due to excess resource consumption.
|
179
|
+
*/
|
180
|
+
peer_disconnects_resources?: string
|
181
|
+
network_ledger?: 'waiting'
|
182
|
+
/** How many other rippled servers this one is currently connected to. */
|
183
|
+
peers: number
|
184
|
+
/**
|
185
|
+
* Public key used to verify this server for peer-to-peer communications.
|
186
|
+
* This node key pair is automatically generated by the server the first
|
187
|
+
* time it starts up. (If deleted, the server can create a new pair of
|
188
|
+
* Keys.).
|
189
|
+
*/
|
190
|
+
pubkey_node: string
|
191
|
+
/** Public key used by this node to sign ledger validations. */
|
192
|
+
pubkey_validator?: string
|
193
|
+
/**
|
194
|
+
* A string indicating to what extent the server is participating in the
|
195
|
+
* network.
|
196
|
+
*/
|
197
|
+
server_state: ServerState
|
198
|
+
/**
|
199
|
+
* The number of consecutive microseconds the server has been in the
|
200
|
+
* current state.
|
201
|
+
*/
|
202
|
+
server_state_duration_us: string
|
203
|
+
/**
|
204
|
+
* A map of various server states with information about the time the
|
205
|
+
* server spends in each. This can be useful for tracking the long-term
|
206
|
+
* health of your server's connectivity to the network.
|
207
|
+
*/
|
208
|
+
state_accounting: StateAccountingFinal
|
209
|
+
/** The current time in UTC, according to the server's clock. */
|
210
|
+
time: string
|
211
|
+
/** Number of consecutive seconds that the server has been operational. */
|
212
|
+
uptime: number
|
213
|
+
/** Information about the most recent fully-validated ledger. */
|
214
|
+
validated_ledger?: {
|
215
|
+
/** The time since the ledger was closed, in seconds. */
|
216
|
+
age: number
|
217
|
+
/**
|
218
|
+
* Base fee, in XRP. This may be represented in scientific notation.
|
219
|
+
* Such as 1e-05 for 0.00005.
|
220
|
+
*/
|
221
|
+
base_fee_xrp: number
|
222
|
+
/** Unique hash for the ledger, as hexadecimal. */
|
223
|
+
hash: string
|
224
|
+
/**
|
225
|
+
* Minimum amount of XRP (not drops) necessary for every account to.
|
226
|
+
* Keep in reserve .
|
227
|
+
*/
|
228
|
+
reserve_base_xrp: number
|
229
|
+
/**
|
230
|
+
* Amount of XRP (not drops) added to the account reserve for each
|
231
|
+
* object an account owns in the ledger.
|
232
|
+
*/
|
233
|
+
reserve_inc_xrp: number
|
234
|
+
/** The ledger index of the latest validated ledger. */
|
235
|
+
seq: number
|
236
|
+
}
|
237
|
+
/**
|
238
|
+
* Minimum number of trusted validations required to validate a ledger
|
239
|
+
* version. Some circumstances may cause the server to require more
|
240
|
+
* validations.
|
241
|
+
*/
|
242
|
+
validation_quorum: number
|
243
|
+
/**
|
244
|
+
* Either the human readable time, in UTC, when the current validator
|
245
|
+
* list will expire, the string unknown if the server has yet to load a
|
246
|
+
* published validator list or the string never if the server uses a
|
247
|
+
* static validator list.
|
248
|
+
*/
|
249
|
+
validator_list_expires?: string
|
250
|
+
validator_list?: {
|
251
|
+
count: number
|
252
|
+
expiration: 'never' | 'unknown' | string
|
253
|
+
status: 'active' | 'expired' | 'unknown'
|
254
|
+
}
|
255
|
+
}
|
256
|
+
}
|
257
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import { BaseRequest, BaseResponse } from './baseMethod'
|
2
|
+
import { JobType, ServerState, StateAccountingFinal } from './serverInfo'
|
3
|
+
|
4
|
+
/**
|
5
|
+
* The `server_state` command asks the server for various machine-readable
|
6
|
+
* information about the rippled server's current state. The response is almost
|
7
|
+
* the same as the server_info method, but uses units that are easier to process
|
8
|
+
* instead of easier to read.
|
9
|
+
*
|
10
|
+
* @category Requests
|
11
|
+
*/
|
12
|
+
export interface ServerStateRequest extends BaseRequest {
|
13
|
+
command: 'server_state'
|
14
|
+
}
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Response expected from a {@link ServerStateRequest}.
|
18
|
+
*
|
19
|
+
* @category Responses
|
20
|
+
*/
|
21
|
+
export interface ServerStateResponse extends BaseResponse {
|
22
|
+
result: {
|
23
|
+
state: {
|
24
|
+
amendment_blocked?: boolean
|
25
|
+
build_version: string
|
26
|
+
complete_ledgers: string
|
27
|
+
closed_ledger?: {
|
28
|
+
age: number
|
29
|
+
base_fee: number
|
30
|
+
hash: string
|
31
|
+
reserve_base: number
|
32
|
+
reserve_inc: number
|
33
|
+
seq: number
|
34
|
+
}
|
35
|
+
io_latency_ms: number
|
36
|
+
jq_trans_overflow: string
|
37
|
+
last_close: {
|
38
|
+
// coverage_time_s only exists for `server_info` requests. `server_state` is a "non human" api request,
|
39
|
+
// therefore the type is coverage_time
|
40
|
+
// See https://github.com/XRPLF/rippled/blob/83faf43140e27e5d6d6779eaa0ffb75c33d98029/src/ripple/app/misc/NetworkOPs.cpp#L2458
|
41
|
+
converge_time: number
|
42
|
+
proposers: number
|
43
|
+
}
|
44
|
+
load?: {
|
45
|
+
job_types: JobType[]
|
46
|
+
threads: number
|
47
|
+
}
|
48
|
+
load_base: number
|
49
|
+
load_factor: number
|
50
|
+
load_factor_fee_escalation?: number
|
51
|
+
load_factor_fee_queue?: number
|
52
|
+
load_factor_fee_reference?: number
|
53
|
+
load_factor_server?: number
|
54
|
+
peer_disconnects?: string
|
55
|
+
peer_disconnects_resources?: string
|
56
|
+
peers: number
|
57
|
+
pubkey_node: string
|
58
|
+
pubkey_validator?: string
|
59
|
+
server_state: ServerState
|
60
|
+
server_state_duration_us: string
|
61
|
+
state_accounting: StateAccountingFinal
|
62
|
+
time: string
|
63
|
+
uptime: number
|
64
|
+
validated_ledger?: {
|
65
|
+
age?: number
|
66
|
+
base_fee: number
|
67
|
+
close_time: number
|
68
|
+
hash: string
|
69
|
+
reserve_base: number
|
70
|
+
reserve_inc: number
|
71
|
+
seq: number
|
72
|
+
}
|
73
|
+
validation_quorum: number
|
74
|
+
validator_list_expires?: number
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
import { Transaction } from '../transactions'
|
2
|
+
|
3
|
+
import { BaseRequest, BaseResponse } from './baseMethod'
|
4
|
+
|
5
|
+
/**
|
6
|
+
* The submit method applies a transaction and sends it to the network to be
|
7
|
+
* confirmed and included in future ledgers. Expects a response in the form of a
|
8
|
+
* {@link SubmitResponse}.
|
9
|
+
*
|
10
|
+
* @category Requests
|
11
|
+
*/
|
12
|
+
export interface SubmitRequest extends BaseRequest {
|
13
|
+
command: 'submit'
|
14
|
+
/** The complete transaction in hex string format. */
|
15
|
+
tx_blob: string
|
16
|
+
/**
|
17
|
+
* If true, and the transaction fails locally, do not retry or relay the
|
18
|
+
* transaction to other servers. The default is false.
|
19
|
+
*/
|
20
|
+
fail_hard?: boolean
|
21
|
+
}
|
22
|
+
|
23
|
+
/**
|
24
|
+
* Response expected from a {@link SubmitRequest}.
|
25
|
+
*
|
26
|
+
* @category Responses
|
27
|
+
*/
|
28
|
+
export interface SubmitResponse extends BaseResponse {
|
29
|
+
result: {
|
30
|
+
/**
|
31
|
+
* Text result code indicating the preliminary result of the transaction,
|
32
|
+
* for example `tesSUCCESS`.
|
33
|
+
*/
|
34
|
+
engine_result: string
|
35
|
+
/** Numeric version of the result code. */
|
36
|
+
engine_result_code: number
|
37
|
+
/** Human-readable explanation of the transaction's preliminary result. */
|
38
|
+
engine_result_message: string
|
39
|
+
/** The complete transaction in hex string format. */
|
40
|
+
tx_blob: string
|
41
|
+
/** The complete transaction in JSON format. */
|
42
|
+
tx_json: Transaction & { hash?: string }
|
43
|
+
/**
|
44
|
+
* The value true indicates that the transaction was applied, queued,
|
45
|
+
* broadcast, or kept for later. The value `false` indicates that none of
|
46
|
+
* those happened, so the transaction cannot possibly succeed as long as you
|
47
|
+
* do not submit it again and have not already submitted it another time.
|
48
|
+
*/
|
49
|
+
accepted: boolean
|
50
|
+
/**
|
51
|
+
* The next Sequence Number available for the sending account after all
|
52
|
+
* pending and queued transactions.
|
53
|
+
*/
|
54
|
+
account_sequence_available: number
|
55
|
+
/**
|
56
|
+
* The next Sequence number for the sending account after all transactions
|
57
|
+
* that have been provisionally applied, but not transactions in the queue.
|
58
|
+
*/
|
59
|
+
account_sequence_next: number
|
60
|
+
/**
|
61
|
+
* The value true indicates that this transaction was applied to the open
|
62
|
+
* ledger. In this case, the transaction is likely, but not guaranteed, to
|
63
|
+
* be validated in the next ledger version.
|
64
|
+
*/
|
65
|
+
applied: boolean
|
66
|
+
/**
|
67
|
+
* The value true indicates this transaction was broadcast to peer servers
|
68
|
+
* in the peer-to-peer XRP Ledger network.
|
69
|
+
*/
|
70
|
+
broadcast: boolean
|
71
|
+
/**
|
72
|
+
* The value true indicates that the transaction was kept to be retried
|
73
|
+
* later.
|
74
|
+
*/
|
75
|
+
kept: boolean
|
76
|
+
/**
|
77
|
+
* The value true indicates the transaction was put in the Transaction
|
78
|
+
* Queue, which means it is likely to be included in a future ledger
|
79
|
+
* version.
|
80
|
+
*/
|
81
|
+
queued: boolean
|
82
|
+
/**
|
83
|
+
* The current open ledger cost before processing this transaction
|
84
|
+
* transactions with a lower cost are likely to be queued.
|
85
|
+
*/
|
86
|
+
open_ledger_cost: string
|
87
|
+
/**
|
88
|
+
* The ledger index of the newest validated ledger at the time of
|
89
|
+
* submission. This provides a lower bound on the ledger versions that the
|
90
|
+
* transaction can appear in as a result of this request.
|
91
|
+
*/
|
92
|
+
validated_ledger_index: number
|
93
|
+
}
|
94
|
+
}
|