xrpl 2.10.0 → 2.11.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 +728 -28
- 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 +5 -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/LedgerEntry.d.ts +2 -1
- package/dist/npm/models/ledger/LedgerEntry.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 +10 -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/common.d.ts +2 -1
- package/dist/npm/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/models/transactions/common.js +12 -1
- package/dist/npm/models/transactions/common.js.map +1 -1
- package/dist/npm/models/transactions/index.d.ts +6 -0
- package/dist/npm/models/transactions/index.d.ts.map +1 -1
- package/dist/npm/models/transactions/index.js +5 -1
- package/dist/npm/models/transactions/index.js.map +1 -1
- package/dist/npm/models/transactions/transaction.d.ts +7 -1
- package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/models/transactions/transaction.js +24 -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 +14 -21
- package/dist/npm/models/utils/flags.js.map +1 -1
- 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 +5 -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/LedgerEntry.d.ts +2 -1
- package/dist/npm/src/models/ledger/LedgerEntry.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 +10 -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/common.d.ts +2 -1
- package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/common.js +12 -1
- package/dist/npm/src/models/transactions/common.js.map +1 -1
- package/dist/npm/src/models/transactions/index.d.ts +6 -0
- package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/index.js +5 -1
- package/dist/npm/src/models/transactions/index.js.map +1 -1
- package/dist/npm/src/models/transactions/transaction.d.ts +7 -1
- package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/transaction.js +24 -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 +14 -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 +149 -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/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 +34 -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/index.ts +58 -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 +120 -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 +177 -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/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 +295 -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 +66 -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 +303 -0
- package/src/models/transactions/trustSet.ts +146 -0
- package/src/models/utils/flags.ts +98 -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,177 @@
|
|
1
|
+
import { LedgerEntry } from '../ledger'
|
2
|
+
|
3
|
+
import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
|
4
|
+
|
5
|
+
/**
|
6
|
+
* The `ledger_entry` method returns a single ledger object from the XRP Ledger
|
7
|
+
* in its raw format. Expects a response in the form of a {@link
|
8
|
+
* LedgerEntryResponse}.
|
9
|
+
*
|
10
|
+
* @example
|
11
|
+
* ```ts
|
12
|
+
* const ledgerEntry: LedgerEntryRequest = {
|
13
|
+
* command: "ledger_entry",
|
14
|
+
* ledger_index: 60102302,
|
15
|
+
* index: "7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4"
|
16
|
+
* }
|
17
|
+
* ```
|
18
|
+
*
|
19
|
+
* @category Requests
|
20
|
+
*/
|
21
|
+
export interface LedgerEntryRequest extends BaseRequest, LookupByLedgerRequest {
|
22
|
+
command: 'ledger_entry'
|
23
|
+
/**
|
24
|
+
* Retrieve an Automated Market Maker (AMM) object from the ledger.
|
25
|
+
* This is similar to amm_info method, but the ledger_entry version returns only the ledger entry as stored.
|
26
|
+
*/
|
27
|
+
amm?: {
|
28
|
+
asset: {
|
29
|
+
currency: string
|
30
|
+
issuer?: string
|
31
|
+
}
|
32
|
+
asset2: {
|
33
|
+
currency: string
|
34
|
+
issuer?: string
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
/**
|
39
|
+
* If true, return the requested ledger object's contents as a hex string in
|
40
|
+
* the XRP Ledger's binary format. Otherwise, return data in JSON format. The
|
41
|
+
* default is false.
|
42
|
+
*/
|
43
|
+
binary?: boolean
|
44
|
+
|
45
|
+
/*
|
46
|
+
* Only one of the following properties should be defined in a single request
|
47
|
+
* https://xrpl.org/ledger_entry.html.
|
48
|
+
*
|
49
|
+
* Retrieve any type of ledger object by its unique ID.
|
50
|
+
*/
|
51
|
+
index?: string
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Retrieve an AccountRoot object by its address. This is roughly equivalent
|
55
|
+
* to the an {@link AccountInfoRequest}.
|
56
|
+
*/
|
57
|
+
account_root?: string
|
58
|
+
|
59
|
+
/** The object ID of a Check object to retrieve. */
|
60
|
+
check?: string
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Specify a DepositPreauth object to retrieve. If a string, must be the
|
64
|
+
* object ID of the DepositPreauth object, as hexadecimal. If an object,
|
65
|
+
* requires owner and authorized sub-fields.
|
66
|
+
*/
|
67
|
+
deposit_preauth?:
|
68
|
+
| {
|
69
|
+
/** The account that provided the preauthorization. */
|
70
|
+
owner: string
|
71
|
+
/** The account that received the preauthorization. */
|
72
|
+
authorized: string
|
73
|
+
}
|
74
|
+
| string
|
75
|
+
|
76
|
+
/**
|
77
|
+
* The DirectoryNode to retrieve. If a string, must be the object ID of the
|
78
|
+
* directory, as hexadecimal. If an object, requires either `dir_root` o
|
79
|
+
* Owner as a sub-field, plus optionally a `sub_index` sub-field.
|
80
|
+
*/
|
81
|
+
directory?:
|
82
|
+
| {
|
83
|
+
/** If provided, jumps to a later "page" of the DirectoryNode. */
|
84
|
+
sub_index?: number
|
85
|
+
/** Unique index identifying the directory to retrieve, as a hex string. */
|
86
|
+
dir_root?: string
|
87
|
+
/** Unique address of the account associated with this directory. */
|
88
|
+
owner?: string
|
89
|
+
}
|
90
|
+
| string
|
91
|
+
|
92
|
+
/**
|
93
|
+
* The Escrow object to retrieve. If a string, must be the object ID of the
|
94
|
+
* escrow, as hexadecimal. If an object, requires owner and seq sub-fields.
|
95
|
+
*/
|
96
|
+
escrow?:
|
97
|
+
| {
|
98
|
+
/** The owner (sender) of the Escrow object. */
|
99
|
+
owner: string
|
100
|
+
/** Sequence Number of the transaction that created the Escrow object. */
|
101
|
+
seq: number
|
102
|
+
}
|
103
|
+
| string
|
104
|
+
|
105
|
+
/**
|
106
|
+
* The Offer object to retrieve. If a string, interpret as the unique object
|
107
|
+
* ID to the Offer. If an object, requires the sub-fields `account` and `seq`
|
108
|
+
* to uniquely identify the offer.
|
109
|
+
*/
|
110
|
+
offer?:
|
111
|
+
| {
|
112
|
+
/** The account that placed the offer. */
|
113
|
+
account: string
|
114
|
+
/** Sequence Number of the transaction that created the Offer object. */
|
115
|
+
seq: number
|
116
|
+
}
|
117
|
+
| string
|
118
|
+
|
119
|
+
/** The object ID of a PayChannel object to retrieve. */
|
120
|
+
payment_channel?: string
|
121
|
+
|
122
|
+
/**
|
123
|
+
* Object specifying the RippleState (trust line) object to retrieve. The
|
124
|
+
* accounts and currency sub-fields are required to uniquely specify the
|
125
|
+
* rippleState entry to retrieve.
|
126
|
+
*/
|
127
|
+
ripple_state?: {
|
128
|
+
/**
|
129
|
+
* 2-length array of account Addresses, defining the two accounts linked by
|
130
|
+
* this RippleState object.
|
131
|
+
*/
|
132
|
+
accounts: string[]
|
133
|
+
/** Currency Code of the RippleState object to retrieve. */
|
134
|
+
currency: string
|
135
|
+
}
|
136
|
+
|
137
|
+
/**
|
138
|
+
* The Ticket object to retrieve. If a string, must be the object ID of the
|
139
|
+
* Ticket, as hexadecimal. If an object, the `owner` and `ticket_sequence`
|
140
|
+
* sub-fields are required to uniquely specify the Ticket entry.
|
141
|
+
*/
|
142
|
+
ticket?:
|
143
|
+
| {
|
144
|
+
/** The owner of the Ticket object. */
|
145
|
+
owner: string
|
146
|
+
/** The Ticket Sequence number of the Ticket entry to retrieve. */
|
147
|
+
ticket_sequence: number
|
148
|
+
}
|
149
|
+
| string
|
150
|
+
|
151
|
+
/**
|
152
|
+
* Must be the object ID of the NFToken page, as hexadecimal
|
153
|
+
*/
|
154
|
+
nft_page?: string
|
155
|
+
}
|
156
|
+
|
157
|
+
/**
|
158
|
+
* Response expected from a {@link LedgerEntryRequest}.
|
159
|
+
*
|
160
|
+
* @category Responses
|
161
|
+
*/
|
162
|
+
export interface LedgerEntryResponse extends BaseResponse {
|
163
|
+
result: {
|
164
|
+
/** The unique ID of this ledger object. */
|
165
|
+
index: string
|
166
|
+
/** The ledger index of the ledger that was used when retrieving this data. */
|
167
|
+
ledger_current_index: number
|
168
|
+
/**
|
169
|
+
* Object containing the data of this ledger object, according to the
|
170
|
+
* ledger format.
|
171
|
+
*/
|
172
|
+
node?: LedgerEntry
|
173
|
+
/** The binary representation of the ledger object, as hexadecimal. */
|
174
|
+
node_binary?: string
|
175
|
+
validated?: boolean
|
176
|
+
}
|
177
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { BaseRequest, BaseResponse } from './baseMethod'
|
2
|
+
|
3
|
+
/**
|
4
|
+
* The `manifest` method reports the current "manifest" information for a given
|
5
|
+
* validator public key. The "manifest" is the public portion of that
|
6
|
+
* validator's configured token. Expects a response in the form of a {@link
|
7
|
+
* ManifestResponse}.
|
8
|
+
*
|
9
|
+
* @example
|
10
|
+
* ```ts
|
11
|
+
* const manifest: ManifestRequest = {
|
12
|
+
* "command": "manifest",
|
13
|
+
* "public_key": "nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p"
|
14
|
+
* }
|
15
|
+
* ```
|
16
|
+
*
|
17
|
+
* @category Requests
|
18
|
+
*/
|
19
|
+
export interface ManifestRequest extends BaseRequest {
|
20
|
+
command: 'manifest'
|
21
|
+
/**
|
22
|
+
* The base58-encoded public key of the validator to look up. This can be the
|
23
|
+
* master public key or ephemeral public key.
|
24
|
+
*/
|
25
|
+
public_key: string
|
26
|
+
}
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Response expected from a {@link ManifestRequest}.
|
30
|
+
*
|
31
|
+
* @category Responses
|
32
|
+
*/
|
33
|
+
export interface ManifestResponse extends BaseResponse {
|
34
|
+
result: {
|
35
|
+
/**
|
36
|
+
* The data contained in this manifest. Omitted if the server does not have
|
37
|
+
* A manifest for the public_key from the request.
|
38
|
+
*/
|
39
|
+
details?: {
|
40
|
+
domain: string
|
41
|
+
ephemeral_key: string
|
42
|
+
master_key: string
|
43
|
+
seq: number
|
44
|
+
}
|
45
|
+
/**
|
46
|
+
* The full manifest data in base64 format. This data is serialized to
|
47
|
+
* binary before being base64-encoded. Omitted if the server does not have a
|
48
|
+
* manifest for the public_key from the request.
|
49
|
+
*/
|
50
|
+
manifest?: string
|
51
|
+
/** The public_key from the request. */
|
52
|
+
requested: string
|
53
|
+
}
|
54
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { NFTOffer } from '../common'
|
2
|
+
|
3
|
+
import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
|
4
|
+
|
5
|
+
/**
|
6
|
+
* The `nft_buy_offers` method retrieves all of buy offers for the specified
|
7
|
+
* NFToken.
|
8
|
+
*
|
9
|
+
* @category Requests
|
10
|
+
*/
|
11
|
+
export interface NFTBuyOffersRequest
|
12
|
+
extends BaseRequest,
|
13
|
+
LookupByLedgerRequest {
|
14
|
+
command: 'nft_buy_offers'
|
15
|
+
/**
|
16
|
+
* The unique identifier of an NFToken. The request returns buy offers for this NFToken.
|
17
|
+
*/
|
18
|
+
nft_id: string
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Response expected from an {@link NFTBuyOffersRequest}.
|
23
|
+
*
|
24
|
+
* @category Responses
|
25
|
+
*/
|
26
|
+
export interface NFTBuyOffersResponse extends BaseResponse {
|
27
|
+
result: {
|
28
|
+
/**
|
29
|
+
* A list of buy offers for the specified NFToken.
|
30
|
+
*/
|
31
|
+
offers: NFTOffer[]
|
32
|
+
/**
|
33
|
+
* The token ID of the NFToken to which these offers pertain.
|
34
|
+
*/
|
35
|
+
nft_id: string
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,113 @@
|
|
1
|
+
import { ResponseOnlyTxInfo } from '../common'
|
2
|
+
import { Transaction, TransactionMetadata } from '../transactions'
|
3
|
+
|
4
|
+
import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
|
5
|
+
|
6
|
+
/**
|
7
|
+
* The nft_history method retrieves a list of transactions that involved the
|
8
|
+
* specified NFToken. Expects a response in the form of a {@link
|
9
|
+
* NFTHistoryResponse}.
|
10
|
+
*
|
11
|
+
* @category Requests
|
12
|
+
*/
|
13
|
+
export interface NFTHistoryRequest extends BaseRequest, LookupByLedgerRequest {
|
14
|
+
command: 'nft_history'
|
15
|
+
/**
|
16
|
+
* The unique identifier of an NFToken.
|
17
|
+
*/
|
18
|
+
nft_id: string
|
19
|
+
/**
|
20
|
+
* Use to specify the earliest ledger to include transactions from. A value
|
21
|
+
* of -1 instructs the server to use the earliest validated ledger version
|
22
|
+
* available.
|
23
|
+
*/
|
24
|
+
ledger_index_min?: number
|
25
|
+
/**
|
26
|
+
* Use to specify the most recent ledger to include transactions from. A
|
27
|
+
* value of -1 instructs the server to use the most recent validated ledger
|
28
|
+
* version available.
|
29
|
+
*/
|
30
|
+
ledger_index_max?: number
|
31
|
+
/**
|
32
|
+
* If true, return transactions as hex strings instead of JSON. The default is
|
33
|
+
* false.
|
34
|
+
*/
|
35
|
+
binary?: boolean
|
36
|
+
/**
|
37
|
+
* If true, returns values indexed with the oldest ledger first. Otherwise,
|
38
|
+
* the results are indexed with the newest ledger first.
|
39
|
+
*/
|
40
|
+
forward?: boolean
|
41
|
+
/**
|
42
|
+
* Default varies. Limit the number of transactions to retrieve. The server
|
43
|
+
* is not required to honor this value.
|
44
|
+
*/
|
45
|
+
limit?: number
|
46
|
+
/**
|
47
|
+
* Value from a previous paginated response. Resume retrieving data where
|
48
|
+
* that response left off. This value is stable even if there is a change in
|
49
|
+
* the server's range of available ledgers.
|
50
|
+
*/
|
51
|
+
marker?: unknown
|
52
|
+
}
|
53
|
+
|
54
|
+
export interface NFTHistoryTransaction {
|
55
|
+
/** The ledger index of the ledger version that included this transaction. */
|
56
|
+
ledger_index: number
|
57
|
+
/**
|
58
|
+
* If binary is True, then this is a hex string of the transaction metadata.
|
59
|
+
* Otherwise, the transaction metadata is included in JSON format.
|
60
|
+
*/
|
61
|
+
meta: string | TransactionMetadata
|
62
|
+
/** JSON object defining the transaction. */
|
63
|
+
tx?: Transaction & ResponseOnlyTxInfo
|
64
|
+
/** Unique hashed String representing the transaction. */
|
65
|
+
tx_blob?: string
|
66
|
+
/**
|
67
|
+
* Whether or not the transaction is included in a validated ledger. Any
|
68
|
+
* transaction not yet in a validated ledger is subject to change.
|
69
|
+
*/
|
70
|
+
validated: boolean
|
71
|
+
}
|
72
|
+
|
73
|
+
/**
|
74
|
+
* Expected response from an {@link NFTHistoryRequest}.
|
75
|
+
*
|
76
|
+
* @category Responses
|
77
|
+
*/
|
78
|
+
export interface NFTHistoryResponse extends BaseResponse {
|
79
|
+
result: {
|
80
|
+
/**
|
81
|
+
* The unique identifier of an NFToken.
|
82
|
+
*/
|
83
|
+
nft_id: string
|
84
|
+
/**
|
85
|
+
* The ledger index of the earliest ledger actually searched for
|
86
|
+
* transactions.
|
87
|
+
*/
|
88
|
+
ledger_index_min: number
|
89
|
+
/**
|
90
|
+
* The ledger index of the most recent ledger actually searched for
|
91
|
+
* transactions.
|
92
|
+
*/
|
93
|
+
ledger_index_max: number
|
94
|
+
/** The limit value used in the request. */
|
95
|
+
limit?: number
|
96
|
+
/**
|
97
|
+
* Server-defined value indicating the response is paginated. Pass this
|
98
|
+
* to the next call to resume where this call left off.
|
99
|
+
*/
|
100
|
+
marker?: unknown
|
101
|
+
/**
|
102
|
+
* Array of transactions matching the request's criteria, as explained
|
103
|
+
* below.
|
104
|
+
*/
|
105
|
+
transactions: NFTHistoryTransaction[]
|
106
|
+
/**
|
107
|
+
* If included and set to true, the information in this response comes from
|
108
|
+
* a validated ledger version. Otherwise, the information is subject to
|
109
|
+
* change.
|
110
|
+
*/
|
111
|
+
validated?: boolean
|
112
|
+
}
|
113
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { NFToken } from '../common'
|
2
|
+
|
3
|
+
import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
|
4
|
+
|
5
|
+
/**
|
6
|
+
* The `nft_info` method retrieves information about an NFToken.
|
7
|
+
*
|
8
|
+
* @category Requests
|
9
|
+
*/
|
10
|
+
export interface NFTInfoRequest extends BaseRequest, LookupByLedgerRequest {
|
11
|
+
command: 'nft_info'
|
12
|
+
/**
|
13
|
+
* The unique identifier of an NFToken.
|
14
|
+
*/
|
15
|
+
nft_id: string
|
16
|
+
}
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Response expected from an {@link NFTInfoResponse}.
|
20
|
+
*
|
21
|
+
* @category Responses
|
22
|
+
*/
|
23
|
+
export interface NFTInfoResponse extends BaseResponse {
|
24
|
+
result: NFToken
|
25
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { NFTOffer } from '../common'
|
2
|
+
|
3
|
+
import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
|
4
|
+
|
5
|
+
/**
|
6
|
+
* The `nft_sell_offers` method retrieves all of sell offers for the specified
|
7
|
+
* NFToken.
|
8
|
+
*
|
9
|
+
* @category Requests
|
10
|
+
*/
|
11
|
+
export interface NFTSellOffersRequest
|
12
|
+
extends BaseRequest,
|
13
|
+
LookupByLedgerRequest {
|
14
|
+
command: 'nft_sell_offers'
|
15
|
+
/**
|
16
|
+
* The unique identifier of an NFToken. The request returns sell offers for this NFToken.
|
17
|
+
*/
|
18
|
+
nft_id: string
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Response expected from an {@link NFTSellOffersRequest}.
|
23
|
+
*
|
24
|
+
* @category Responses
|
25
|
+
*/
|
26
|
+
export interface NFTSellOffersResponse extends BaseResponse {
|
27
|
+
result: {
|
28
|
+
/**
|
29
|
+
* A list of sell offers for the specified NFToken.
|
30
|
+
*/
|
31
|
+
offers: NFTOffer[]
|
32
|
+
/**
|
33
|
+
* The token ID of the NFToken to which these offers pertain.
|
34
|
+
*/
|
35
|
+
nft_id: string
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
import { LedgerIndex, ResponseOnlyTxInfo } from '../common'
|
2
|
+
import { Transaction } from '../transactions'
|
3
|
+
|
4
|
+
import { BaseRequest, BaseResponse } from './baseMethod'
|
5
|
+
|
6
|
+
/**
|
7
|
+
* The `noripple_check` command provides a quick way to check the status of th
|
8
|
+
* default ripple field for an account and the No Ripple flag of its trust
|
9
|
+
* lines, compared with the recommended settings. Expects a response in the form
|
10
|
+
* of an {@link NoRippleCheckResponse}.
|
11
|
+
*
|
12
|
+
* @example
|
13
|
+
* ```ts
|
14
|
+
* const noRipple: NoRippleCheckRequest = {
|
15
|
+
* "id": 0,
|
16
|
+
* "command": "noripple_check",
|
17
|
+
* "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
18
|
+
* "role": "gateway",
|
19
|
+
* "ledger_index": "current",
|
20
|
+
* "limit": 2,
|
21
|
+
* "transactions": true
|
22
|
+
* }
|
23
|
+
* ```
|
24
|
+
*
|
25
|
+
* @category Requests
|
26
|
+
*/
|
27
|
+
export interface NoRippleCheckRequest extends BaseRequest {
|
28
|
+
command: 'noripple_check'
|
29
|
+
/** A unique identifier for the account, most commonly the account's address. */
|
30
|
+
account: string
|
31
|
+
/**
|
32
|
+
* Whether the address refers to a gateway or user. Recommendations depend on
|
33
|
+
* the role of the account. Issuers must have Default Ripple enabled and must
|
34
|
+
* disable No Ripple on all trust lines. Users should have Default Ripple
|
35
|
+
* disabled, and should enable No Ripple on all trust lines.
|
36
|
+
*/
|
37
|
+
role: 'gateway' | 'user'
|
38
|
+
/**
|
39
|
+
* If true, include an array of suggested transactions, as JSON objects,
|
40
|
+
* that you can sign and submit to fix the problems. Defaults to false.
|
41
|
+
*/
|
42
|
+
transactions?: boolean
|
43
|
+
/**
|
44
|
+
* The maximum number of trust line problems to include in the results.
|
45
|
+
* Defaults to 300.
|
46
|
+
*/
|
47
|
+
limit?: number
|
48
|
+
/** A 20-byte hex string for the ledger version to use. */
|
49
|
+
ledger_hash?: string
|
50
|
+
/**
|
51
|
+
* The ledger index of the ledger to use, or a shortcut string to choose a
|
52
|
+
* ledger automatically.
|
53
|
+
*/
|
54
|
+
ledger_index?: LedgerIndex
|
55
|
+
}
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Response expected by a {@link NoRippleCheckRequest}.
|
59
|
+
*
|
60
|
+
* @category Responses
|
61
|
+
*/
|
62
|
+
export interface NoRippleCheckResponse extends BaseResponse {
|
63
|
+
result: {
|
64
|
+
/** The ledger index of the ledger used to calculate these results. */
|
65
|
+
ledger_current_index: number
|
66
|
+
/**
|
67
|
+
* Array of strings with human-readable descriptions of the problems.
|
68
|
+
* This includes up to one entry if the account's Default Ripple setting is
|
69
|
+
* not as recommended, plus up to limit entries for trust lines whose no
|
70
|
+
* ripple setting is not as recommended.
|
71
|
+
*/
|
72
|
+
problems: string[]
|
73
|
+
/**
|
74
|
+
* If the request specified transactions as true, this is an array of JSON
|
75
|
+
* objects, each of which is the JSON form of a transaction that should fix
|
76
|
+
* one of the described problems. The length of this array is the same as
|
77
|
+
* the problems array, and each entry is intended to fix the problem
|
78
|
+
* described at the same index into that array.
|
79
|
+
*/
|
80
|
+
transactions: Array<Transaction & ResponseOnlyTxInfo>
|
81
|
+
}
|
82
|
+
}
|
@@ -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
|
+
}
|