diff --git a/.vscode/settings.json b/.vscode/settings.json
index 0131dd87..71c9b25f 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,7 +1,11 @@
{
"editor.tabSize": 2,
"cSpell.words": [
- "secp256k1"
+ "Multisigned",
+ "Setf",
+ "hostid",
+ "preauthorization",
+ "secp256k1"
],
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
diff --git a/README.md b/README.md
index 0a9609c5..a17c54c4 100644
--- a/README.md
+++ b/README.md
@@ -63,6 +63,72 @@ main()
For more examples, see the [documentation](#documentation).
+### Using xrpl.js with `create-react-app`
+To use `xrpl.js` with React, you need to install shims for core NodeJS modules. Starting with version 5, Webpack stopped including shims by default, so you must modify your Webpack configuration to add the shims you need. Either you can eject your config and modify it, or you can use a library such as `react-app-rewired`. The example below uses `react-app-rewired`.
+
+1. Install shims (you can use `yarn` as well):
+
+ ```shell
+ npm install --save-dev \
+ assert \
+ buffer \
+ crypto-browserify \
+ https-browserify \
+ os-browserify \
+ process \
+ stream-browserify \
+ stream-http \
+ url
+ ```
+2. Modify your webpack configuration
+ 1. Install `react-app-rewired`
+
+ ````shell
+ npm install --save-dev react-app-rewired
+ ````
+
+ 2. At the project root, add a file named `config-overrides.js` with the following content:
+
+ ```javascript
+ const webpack = require('webpack');
+
+ module.exports = function override(config) {
+ const fallback = config.resolve.fallback || {};
+ Object.assign(fallback, {
+ "assert": require.resolve("assert"),
+ "crypto": require.resolve("crypto-browserify"),
+ "http": require.resolve("stream-http"),
+ "https": require.resolve("https-browserify"),
+ "os": require.resolve("os-browserify"),
+ "stream": require.resolve("stream-browserify"),
+ "url": require.resolve("url"),
+ "ws": require.resolve('xrpl/dist/npm/client/WSWrapper'),
+ })
+ config.resolve.fallback = fallback
+ config.plugins = (config.plugins || []).concat([
+ new webpack.ProvidePlugin({
+ process: 'process/browser',
+ Buffer: ['buffer', 'Buffer']
+ })
+ ])
+
+ // This is deprecated in webpack 5 but alias false does not seem to work
+ config.module.rules.push({
+ test: /node_modules[\\\/]https-proxy-agent[\\\/]/,
+ use: 'null-loader',
+ })
+ return config;
+ }
+ ```
+
+ 3. Update package.json scripts section with
+
+ ```
+ "start": "react-app-rewired start",
+ "build": "react-app-rewired build",
+ "test": "react-app-rewired test",
+ ```
+
### Using xrpl.js with React Native
If you want to use `xrpl.js` with React Native you will need to install shims for core NodeJS modules. To help with this you can use a module like [rn-nodeify](https://github.com/tradle/rn-nodeify).
@@ -147,4 +213,4 @@ Experienced an issue? Report it [here](https://github.com/XRPLF/xrpl.js/issues/n
+ [xrpl-announce mailing list](https://groups.google.com/g/xrpl-announce) - subscribe for release announcements
+ [xrpl.js API Reference](https://js.xrpl.org)
-+ [XRP Ledger Dev Portal](https://xrpl.org)
\ No newline at end of file
++ [XRP Ledger Dev Portal](https://xrpl.org)
diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css
index 2740d785..3499f1c1 100644
--- a/docs/assets/highlight.css
+++ b/docs/assets/highlight.css
@@ -1,20 +1,20 @@
:root {
- --light-hl-0: #0000FF;
- --dark-hl-0: #569CD6;
+ --light-hl-0: #001080;
+ --dark-hl-0: #9CDCFE;
--light-hl-1: #000000;
--dark-hl-1: #D4D4D4;
- --light-hl-2: #0070C1;
- --dark-hl-2: #4FC1FF;
- --light-hl-3: #795E26;
- --dark-hl-3: #DCDCAA;
- --light-hl-4: #001080;
- --dark-hl-4: #9CDCFE;
- --light-hl-5: #008000;
- --dark-hl-5: #6A9955;
+ --light-hl-2: #0000FF;
+ --dark-hl-2: #569CD6;
+ --light-hl-3: #0070C1;
+ --dark-hl-3: #4FC1FF;
+ --light-hl-4: #795E26;
+ --dark-hl-4: #DCDCAA;
+ --light-hl-5: #A31515;
+ --dark-hl-5: #CE9178;
--light-hl-6: #AF00DB;
--dark-hl-6: #C586C0;
- --light-hl-7: #A31515;
- --dark-hl-7: #CE9178;
+ --light-hl-7: #008000;
+ --dark-hl-7: #6A9955;
--light-hl-8: #267F99;
--dark-hl-8: #4EC9B0;
--light-hl-9: #098658;
diff --git a/docs/assets/main.js b/docs/assets/main.js
index c815b334..abd0485a 100644
--- a/docs/assets/main.js
+++ b/docs/assets/main.js
@@ -1,5 +1,5 @@
"use strict";
-(()=>{var Qe=Object.create;var ae=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Oe=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var _e=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Me=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ce(e))!Re.call(t,i)&&i!==n&&ae(t,i,{get:()=>e[i],enumerable:!(r=Pe(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Qe(Oe(t)):{},Me(e||!t||!t.__esModule?ae(n,"default",{value:t,enumerable:!0}):n,t));var de=_e((ce,he)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u{let n=Date.now();return(...r)=>{n+e-Date.now()<0&&(t(...r),n=Date.now())}};var re=class extends J{constructor(){super();this.scrollTop=0;this.lastY=0;this.width=0;this.height=0;this.showToolbar=!0;this.toolbar=document.querySelector(".tsd-page-toolbar"),this.navigation=document.querySelector(".col-menu"),window.addEventListener("scroll",ne(()=>this.onScroll(),10)),window.addEventListener("resize",ne(()=>this.onResize(),10)),this.searchInput=document.querySelector("#tsd-search input"),this.searchInput&&this.searchInput.addEventListener("focus",()=>{this.hideShowToolbar()}),this.onResize(),this.onScroll()}triggerResize(){let n=new CustomEvent("resize",{detail:{width:this.width,height:this.height}});this.dispatchEvent(n)}onResize(){this.width=window.innerWidth||0,this.height=window.innerHeight||0;let n=new CustomEvent("resize",{detail:{width:this.width,height:this.height}});this.dispatchEvent(n)}onScroll(){this.scrollTop=window.scrollY||0;let n=new CustomEvent("scroll",{detail:{scrollTop:this.scrollTop}});this.dispatchEvent(n),this.hideShowToolbar()}hideShowToolbar(){let n=this.showToolbar;this.showToolbar=this.lastY>=this.scrollTop||this.scrollTop<=0||!!this.searchInput&&this.searchInput===document.activeElement,n!==this.showToolbar&&(this.toolbar.classList.toggle("tsd-page-toolbar--hide"),this.navigation?.classList.toggle("col-menu--hide")),this.lastY=this.scrollTop}},R=re;R.instance=new re;var X=class extends k{constructor(n){super(n);this.anchors=[];this.index=-1;R.instance.addEventListener("resize",()=>this.onResize()),R.instance.addEventListener("scroll",r=>this.onScroll(r)),this.createAnchors()}createAnchors(){let n=window.location.href;n.indexOf("#")!=-1&&(n=n.substring(0,n.indexOf("#"))),this.el.querySelectorAll("a").forEach(r=>{let i=r.href;if(i.indexOf("#")==-1||i.substring(0,n.length)!=n)return;let s=i.substring(i.indexOf("#")+1),o=document.querySelector("a.tsd-anchor[name="+s+"]"),a=r.parentNode;!o||!a||this.anchors.push({link:a,anchor:o,position:0})}),this.onResize()}onResize(){let n;for(let i=0,s=this.anchors.length;ii.position-s.position);let r=new CustomEvent("scroll",{detail:{scrollTop:R.instance.scrollTop}});this.onScroll(r)}onScroll(n){let r=n.detail.scrollTop+5,i=this.anchors,s=i.length-1,o=this.index;for(;o>-1&&i[o].position>r;)o-=1;for(;o-1&&this.anchors[this.index].link.classList.remove("focus"),this.index=o,this.index>-1&&this.anchors[this.index].link.classList.add("focus"))}};var ue=(t,e=100)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(r),e)}};var me=De(de());function ve(){let t=document.getElementById("tsd-search");if(!t)return;let e=document.getElementById("search-script");t.classList.add("loading"),e&&(e.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),e.addEventListener("load",()=>{t.classList.remove("loading"),t.classList.add("ready")}),window.searchData&&t.classList.remove("loading"));let n=document.querySelector("#tsd-search input"),r=document.querySelector("#tsd-search .results");if(!n||!r)throw new Error("The input field or the result list wrapper was not found");let i=!1;r.addEventListener("mousedown",()=>i=!0),r.addEventListener("mouseup",()=>{i=!1,t.classList.remove("has-focus")}),n.addEventListener("focus",()=>t.classList.add("has-focus")),n.addEventListener("blur",()=>{i||(i=!1,t.classList.remove("has-focus"))});let s={base:t.dataset.base+"/"};Fe(t,r,n,s)}function Fe(t,e,n,r){n.addEventListener("input",ue(()=>{Ae(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?fe(e,-1):s.key==="ArrowDown"?fe(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function He(t,e){t.index||window.searchData&&(e.classList.remove("loading"),e.classList.add("ready"),t.data=window.searchData,t.index=me.Index.load(window.searchData.index))}function Ae(t,e,n,r){if(He(r,t),!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s=i?r.index.search(`*${i}*`):[];for(let o=0;o
Inherited from Client.getLedgerIndex
Fetch orderbook (buy/sell orders) between two accounts.
@@ -240,7 +240,7 @@ offer would pay, as an object withcurrency and issuer
offer would receive, as an object with currency and issuer fields.
Options allowing the client to specify ledger_index, ledger_hash, filter by taker, and/or limit number of orders.
Optional taker?: stringFilter orders by taker.
Inherited from Client.getOrderbook
Get the XRP balance for an account.
-const client = new Client(wss://s.altnet.rippletest.net:51233)
const balance = await client.getXrpBalance('rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn')
console.log(balance)
/// '200'
+Example
const client = new Client(wss://s.altnet.rippletest.net:51233)
const balance = await client.getXrpBalance('rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn')
console.log(balance)
/// '200'
Returns
The XRP balance of the account (as a string).
@@ -296,7 +296,7 @@ the order book. Defaults to 20.
Address of the account to retrieve XRP balance.
-
-
options: { ledger_hash?: string; ledger_index?: LedgerIndex } = {}
+options: {
ledger_hash?: string;
ledger_index?: LedgerIndex;
} = {}
Options to include for getting the XRP balance.
@@ -313,7 +313,7 @@ ledger_index.
Returns Promise<string>
Inherited from Client.getXrpBalance
The autofilled transaction.
Inherited from Client.autofill
Submits a signed/unsigned transaction. Steps performed on a transaction:
@@ -392,7 +392,7 @@ Steps performed on a transaction:A transaction to autofill, sign & encode, and submit.
Optional opts: { autofill?: boolean; failHard?: boolean; wallet?: Wallet }Optional opts: { (Optional) Options used to sign and submit a transaction.
Asynchronously submits a transaction and verifies that it has been included in a
validated ledger (or has errored/will not be included for some reason).
@@ -440,7 +440,7 @@ See Reliable Tra
A transaction to autofill, sign & encode, and submit. (Optional) Options used to sign and submit a transaction.
+Optional opts: { autofill?: boolean; failHard?: boolean; wallet?: Wallet }Optional opts: {
autofill?: boolean;
failHard?: boolean;
wallet?: Wallet;
}
@@ -459,22 +459,22 @@ See Reliable Tra
Returns Promise<TxResponse>
Inherited from Client.submitAndWait
Generates a random wallet with some amount of XRP (usually 1000 XRP).
-const api = new xrpl.Client("wss://s.altnet.rippletest.net:51233")
await api.connect()
const { wallet, balance } = await api.fundWallet()
+Example
const api = new xrpl.Client("wss://s.altnet.rippletest.net:51233")
await api.connect()
const { wallet, balance } = await api.fundWallet()
Returns
A Wallet on the Testnet or Devnet that contains some amount of XRP,
@@ -494,7 +494,7 @@ and that wallet's balance in XRP.
An existing XRPL Wallet to fund. If undefined or null, a new Wallet will be created.
-
-
Optional options: { faucetHost?: string }
+Optional options: {
faucetHost?: string;
}
See below.
@@ -506,10 +506,10 @@ automatically. In other environments, or if you would like to customize the
faucet host in devnet or testnet, you should provide the host using this
option.
Inherited from Client.fundWallet
Inherited from Client.feeCushion
Readonly maxInherited from Client.maxFeeXRP
Inherited from Client.url
Inherited from Client.disconnect
Inherited from Client.isConnected
Event handler for subscription streams.
-const api = new Client('wss://s.altnet.rippletest.net:51233')
api.on('transactions', (tx: TransactionStream) => {
console.log("Received Transaction")
console.log(tx)
})
await api.connect()
const response = await api.request({
command: 'subscribe',
streams: ['transactions_proposed']
})
+Example
const api = new Client('wss://s.altnet.rippletest.net:51233')
api.on('transactions', (tx: TransactionStream) => {
console.log("Received Transaction")
console.log(tx)
})
await api.connect()
const response = await api.request({
command: 'subscribe',
streams: ['transactions_proposed']
})
Event handler for subscription streams.
@@ -640,7 +640,7 @@ number. Defaults to '2'.Event handler for subscription streams.
@@ -670,7 +670,7 @@ number. Defaults to '2'.Event handler for subscription streams.
@@ -700,7 +700,7 @@ number. Defaults to '2'.Event handler for subscription streams.
@@ -730,7 +730,7 @@ number. Defaults to '2'.Event handler for subscription streams.
@@ -760,7 +760,7 @@ number. Defaults to '2'.Event handler for subscription streams.
@@ -790,7 +790,7 @@ number. Defaults to '2'.Event handler for subscription streams.
@@ -820,7 +820,7 @@ number. Defaults to '2'.Event handler for subscription streams.
@@ -850,7 +850,7 @@ number. Defaults to '2'.Makes a request to the client with the given command and @@ -880,7 +880,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -896,7 +896,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -912,7 +912,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -928,7 +928,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -944,7 +944,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -960,7 +960,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -976,7 +976,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -992,7 +992,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1008,7 +1008,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1024,7 +1024,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1040,7 +1040,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1056,7 +1056,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1072,7 +1072,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1088,7 +1088,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1104,7 +1104,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1120,7 +1120,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1136,7 +1136,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1152,7 +1152,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1168,7 +1168,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1184,7 +1184,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1200,7 +1200,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1216,7 +1216,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1232,7 +1232,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1248,7 +1248,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1264,7 +1264,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1280,7 +1280,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1296,7 +1296,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1312,7 +1312,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1328,7 +1328,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1344,7 +1344,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1360,7 +1360,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1376,7 +1376,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1392,7 +1392,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1400,13 +1400,13 @@ additional request body parameters.
The response from the server.
Inherited from Client.requestAll
Makes multiple paged requests to the client to return a given number of @@ -1454,7 +1454,7 @@ requests as needed.
Inherited from Client.requestAll
Makes multiple paged requests to the client to return a given number of @@ -1479,7 +1479,7 @@ requests as needed.
Inherited from Client.requestAll
Makes multiple paged requests to the client to return a given number of @@ -1504,7 +1504,7 @@ requests as needed.
Inherited from Client.requestAll
Makes multiple paged requests to the client to return a given number of @@ -1529,7 +1529,7 @@ requests as needed.
Inherited from Client.requestAll
Makes multiple paged requests to the client to return a given number of @@ -1554,7 +1554,7 @@ requests as needed.
Inherited from Client.requestAll
Makes multiple paged requests to the client to return a given number of @@ -1579,7 +1579,7 @@ requests as needed.
Inherited from Client.requestAll
Inherited from Client.requestNextPage
Requests the next page of data.
@@ -1616,7 +1616,7 @@ requests as needed.Inherited from Client.requestNextPage
Requests the next page of data.
@@ -1637,7 +1637,7 @@ requests as needed.Inherited from Client.requestNextPage
Requests the next page of data.
@@ -1658,7 +1658,7 @@ requests as needed.Inherited from Client.requestNextPage
Requests the next page of data.
@@ -1679,7 +1679,7 @@ requests as needed.Inherited from Client.requestNextPage
Requests the next page of data.
@@ -1700,20 +1700,20 @@ requests as needed.Inherited from Client.requestNextPage
Private Readonly clientsReadonly connectionInherited from Client.connection
The autofilled transaction.
Inherited from Client.prepareTransaction
Static Readonly capture'error' listener is installed.
Synchronously calls each of the listeners registered for the event namedeventName, in the order they were registered, passing the supplied arguments
to each.
Returns true if the event had listeners, false otherwise.
const EventEmitter = require('events');
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
+const EventEmitter = require('events');
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
Since
v0.1.26
@@ -1851,7 +1851,7 @@ to each.
-
Returns an array listing the events for which the emitter has registered
listeners. The values in the array are strings or Symbols.
-const EventEmitter = require('events');
const myEE = new EventEmitter();
myEE.on('foo', () => {});
myEE.on('bar', () => {});
const sym = Symbol('symbol');
myEE.on(sym, () => {});
console.log(myEE.eventNames());
// Prints: [ 'foo', 'bar', Symbol(symbol) ]
+const EventEmitter = require('events');
const myEE = new EventEmitter();
myEE.on('foo', () => {});
myEE.on('bar', () => {});
const sym = Symbol('symbol');
myEE.on(sym, () => {});
console.log(myEE.eventNames());
// Prints: [ 'foo', 'bar', Symbol(symbol) ]
Since
v6.0.0
@@ -1885,7 +1885,7 @@ set by emitter.setMaxListeners(n) or defaults to Returns string[]
-- Defined in packages/xrpl/src/client/BroadcastClient.ts:66
+- Defined in packages/xrpl/src/client/BroadcastClient.ts:66
listener Count
@@ -1912,7 +1912,7 @@ set by emitter.setMaxListeners(n) or defaults to listeners(eventName: string | symbol): Function[]
-
Returns a copy of the array of listeners for the event named eventName.
-server.on('connection', (stream) => {
console.log('someone connected!');
});
console.log(util.inspect(server.listeners('connection')));
// Prints: [ [Function] ]
+server.on('connection', (stream) => {
console.log('someone connected!');
});
console.log(util.inspect(server.listeners('connection')));
// Prints: [ [Function] ]
Since
v0.1.26
@@ -1964,12 +1964,12 @@ set by emitter.setMaxListeners(n) or defaults to
Adds a one-timelistener function for the event named eventName. The
next time eventName is triggered, this listener is removed and then invoked.
-server.once('connection', (stream) => {
console.log('Ah, we have our first user!');
});
+server.once('connection', (stream) => {
console.log('Ah, we have our first user!');
});
Returns a reference to the EventEmitter, so that calls can be chained.
By default, event listeners are invoked in the order they are added. Theemitter.prependOnceListener() method can be used as an alternative to add the
event listener to the beginning of the listeners array.
-const myEE = new EventEmitter();
myEE.once('foo', () => console.log('a'));
myEE.prependOnceListener('foo', () => console.log('b'));
myEE.emit('foo');
// Prints:
// b
// a
+const myEE = new EventEmitter();
myEE.once('foo', () => console.log('a'));
myEE.prependOnceListener('foo', () => console.log('b'));
myEE.emit('foo');
// Prints:
// b
// a
Since
v0.3.0
@@ -2009,7 +2009,7 @@ event listener to the beginning of the listeners array.
event named eventName. No checks are made to see if the listener has
already been added. Multiple calls passing the same combination of eventNameand listener will result in the listener being added, and called, multiple
times.
-server.prependListener('connection', (stream) => {
console.log('someone connected!');
});
+server.prependListener('connection', (stream) => {
console.log('someone connected!');
});
Returns a reference to the EventEmitter, so that calls can be chained.
@@ -2048,7 +2048,7 @@ times.
-
Adds a one-timelistener function for the event named eventName to the_beginning_ of the listeners array. The next time eventName is triggered, this
listener is removed, and then invoked.
-server.prependOnceListener('connection', (stream) => {
console.log('Ah, we have our first user!');
});
+server.prependOnceListener('connection', (stream) => {
console.log('Ah, we have our first user!');
});
Returns a reference to the EventEmitter, so that calls can be chained.
@@ -2087,7 +2087,7 @@ listener is removed, and then invoked.
-
Returns a copy of the array of listeners for the event named eventName,
including any wrappers (such as those created by .once()).
-const emitter = new EventEmitter();
emitter.once('log', () => console.log('log once'));
// Returns a new Array with a function `onceWrapper` which has a property
// `listener` which contains the original listener bound above
const listeners = emitter.rawListeners('log');
const logFnWrapper = listeners[0];
// Logs "log once" to the console and does not unbind the `once` event
logFnWrapper.listener();
// Logs "log once" to the console and removes the listener
logFnWrapper();
emitter.on('log', () => console.log('log persistently'));
// Will return a new Array with a single function bound by `.on()` above
const newListeners = emitter.rawListeners('log');
// Logs "log persistently" twice
newListeners[0]();
emitter.emit('log');
+const emitter = new EventEmitter();
emitter.once('log', () => console.log('log once'));
// Returns a new Array with a function `onceWrapper` which has a property
// `listener` which contains the original listener bound above
const listeners = emitter.rawListeners('log');
const logFnWrapper = listeners[0];
// Logs "log once" to the console and does not unbind the `once` event
logFnWrapper.listener();
// Logs "log once" to the console and removes the listener
logFnWrapper();
emitter.on('log', () => console.log('log persistently'));
// Will return a new Array with a single function bound by `.on()` above
const newListeners = emitter.rawListeners('log');
// Logs "log persistently" twice
newListeners[0]();
emitter.emit('log');
Since
v9.4.0
@@ -2129,7 +2129,7 @@ component or module (e.g. sockets or file streams).
- remove
Listener(eventName: string | symbol, listener: ((...args: any[]) => void)): BroadcastClient
-
Removes the specified listener from the listener array for the event namedeventName.
-const callback = (stream) => {
console.log('someone connected!');
};
server.on('connection', callback);
// ...
server.removeListener('connection', callback);
+const callback = (stream) => {
console.log('someone connected!');
};
server.on('connection', callback);
// ...
server.removeListener('connection', callback);
removeListener() will remove, at most, one instance of a listener from the
listener array. If any single listener has been added multiple times to the
@@ -2138,7 +2138,7 @@ called multiple times to remove each instance.
Once an event is emitted, all listeners attached to it at the
time of emitting are called in order. This implies that anyremoveListener() or removeAllListeners() calls after emitting and_before_ the last listener finishes execution will
not remove them fromemit() in progress. Subsequent events behave as expected.
-const myEmitter = new MyEmitter();
const callbackA = () => {
console.log('A');
myEmitter.removeListener('event', callbackB);
};
const callbackB = () => {
console.log('B');
};
myEmitter.on('event', callbackA);
myEmitter.on('event', callbackB);
// callbackA removes listener callbackB but it will still be called.
// Internal listener array at time of emit [callbackA, callbackB]
myEmitter.emit('event');
// Prints:
// A
// B
// callbackB is now removed.
// Internal listener array [callbackA]
myEmitter.emit('event');
// Prints:
// A
+const myEmitter = new MyEmitter();
const callbackA = () => {
console.log('A');
myEmitter.removeListener('event', callbackB);
};
const callbackB = () => {
console.log('B');
};
myEmitter.on('event', callbackA);
myEmitter.on('event', callbackB);
// callbackA removes listener callbackB but it will still be called.
// Internal listener array at time of emit [callbackA, callbackB]
myEmitter.emit('event');
// Prints:
// A
// B
// callbackB is now removed.
// Internal listener array [callbackA]
myEmitter.emit('event');
// Prints:
// A
Because listeners are managed using an internal array, calling this will
change the position indices of any listener registered after the listener
@@ -2148,7 +2148,7 @@ the emitter.listeners() method will need to be recreated.
When a single function has been added as a handler multiple times for a single
event (as in the example below), removeListener() will remove the most
recently added instance. In the example the once('ping')listener is removed:
-const ee = new EventEmitter();
function pong() {
console.log('pong');
}
ee.on('ping', pong);
ee.once('ping', pong);
ee.removeListener('ping', pong);
ee.emit('ping');
ee.emit('ping');
+const ee = new EventEmitter();
function pong() {
console.log('pong');
}
ee.on('ping', pong);
ee.once('ping', pong);
ee.removeListener('ping', pong);
ee.emit('ping');
ee.emit('ping');
Returns a reference to the EventEmitter, so that calls can be chained.
@@ -2208,7 +2208,7 @@ modified for this specific EventEmitter instance. The value can be
the emitter.
For EventTargets this is the only way to get the event listeners for the
event target. This is useful for debugging and diagnostic purposes.
-const { getEventListeners, EventEmitter } = require('events');
{
const ee = new EventEmitter();
const listener = () => console.log('Events are fun');
ee.on('foo', listener);
getEventListeners(ee, 'foo'); // [listener]
}
{
const et = new EventTarget();
const listener = () => console.log('Events are fun');
et.addEventListener('foo', listener);
getEventListeners(et, 'foo'); // [listener]
}
+const { getEventListeners, EventEmitter } = require('events');
{
const ee = new EventEmitter();
const listener = () => console.log('Events are fun');
ee.on('foo', listener);
getEventListeners(ee, 'foo'); // [listener]
}
{
const et = new EventTarget();
const listener = () => console.log('Events are fun');
et.addEventListener('foo', listener);
getEventListeners(et, 'foo'); // [listener]
}
Since
v15.2.0, v14.17.0
@@ -2230,7 +2230,7 @@ event target. This is useful for debugging and diagnostic purposes.
- listener
Count(emitter: EventEmitter, eventName: string | symbol): number
-
A class method that returns the number of listeners for the given eventNameregistered on the given emitter.
-const { EventEmitter, listenerCount } = require('events');
const myEmitter = new EventEmitter();
myEmitter.on('event', () => {});
myEmitter.on('event', () => {});
console.log(listenerCount(myEmitter, 'event'));
// Prints: 2
+const { EventEmitter, listenerCount } = require('events');
const myEmitter = new EventEmitter();
myEmitter.on('event', () => {});
myEmitter.on('event', () => {});
console.log(listenerCount(myEmitter, 'event'));
// Prints: 2
Since
v0.9.12
@@ -2257,14 +2257,14 @@ event target. This is useful for debugging and diagnostic purposes.
- on(emitter: EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator<any>
-
-
const { on, EventEmitter } = require('events');
(async () => {
const ee = new EventEmitter();
// Emit later on
process.nextTick(() => {
ee.emit('foo', 'bar');
ee.emit('foo', 42);
});
for await (const event of on(ee, 'foo')) {
// The execution of this inner block is synchronous and it
// processes one event at a time (even with await). Do not use
// if concurrent execution is required.
console.log(event); // prints ['bar'] [42]
}
// Unreachable here
})();
+const { on, EventEmitter } = require('events');
(async () => {
const ee = new EventEmitter();
// Emit later on
process.nextTick(() => {
ee.emit('foo', 'bar');
ee.emit('foo', 42);
});
for await (const event of on(ee, 'foo')) {
// The execution of this inner block is synchronous and it
// processes one event at a time (even with await). Do not use
// if concurrent execution is required.
console.log(event); // prints ['bar'] [42]
}
// Unreachable here
})();
Returns an AsyncIterator that iterates eventName events. It will throw
if the EventEmitter emits 'error'. It removes all listeners when
exiting the loop. The value returned by each iteration is an array
composed of the emitted event arguments.
An AbortSignal can be used to cancel waiting on events:
-const { on, EventEmitter } = require('events');
const ac = new AbortController();
(async () => {
const ee = new EventEmitter();
// Emit later on
process.nextTick(() => {
ee.emit('foo', 'bar');
ee.emit('foo', 42);
});
for await (const event of on(ee, 'foo', { signal: ac.signal })) {
// The execution of this inner block is synchronous and it
// processes one event at a time (even with await). Do not use
// if concurrent execution is required.
console.log(event); // prints ['bar'] [42]
}
// Unreachable here
})();
process.nextTick(() => ac.abort());
+const { on, EventEmitter } = require('events');
const ac = new AbortController();
(async () => {
const ee = new EventEmitter();
// Emit later on
process.nextTick(() => {
ee.emit('foo', 'bar');
ee.emit('foo', 42);
});
for await (const event of on(ee, 'foo', { signal: ac.signal })) {
// The execution of this inner block is synchronous and it
// processes one event at a time (even with await). Do not use
// if concurrent execution is required.
console.log(event); // prints ['bar'] [42]
}
// Unreachable here
})();
process.nextTick(() => ac.abort());
Since
v13.6.0, v12.16.0
@@ -2297,15 +2297,15 @@ The Promise will resolve with an array of all the arguments emitted
given event.
This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event
semantics and does not listen to the 'error' event.
-const { once, EventEmitter } = require('events');
async function run() {
const ee = new EventEmitter();
process.nextTick(() => {
ee.emit('myevent', 42);
});
const [value] = await once(ee, 'myevent');
console.log(value);
const err = new Error('kaboom');
process.nextTick(() => {
ee.emit('error', err);
});
try {
await once(ee, 'myevent');
} catch (err) {
console.log('error happened', err);
}
}
run();
+const { once, EventEmitter } = require('events');
async function run() {
const ee = new EventEmitter();
process.nextTick(() => {
ee.emit('myevent', 42);
});
const [value] = await once(ee, 'myevent');
console.log(value);
const err = new Error('kaboom');
process.nextTick(() => {
ee.emit('error', err);
});
try {
await once(ee, 'myevent');
} catch (err) {
console.log('error happened', err);
}
}
run();
The special handling of the 'error' event is only used when events.once()is used to wait for another event. If events.once() is used to wait for the
'error' event itself, then it is treated as any other kind of event without
special handling:
-const { EventEmitter, once } = require('events');
const ee = new EventEmitter();
once(ee, 'error')
.then(([err]) => console.log('ok', err.message))
.catch((err) => console.log('error', err.message));
ee.emit('error', new Error('boom'));
// Prints: ok boom
+const { EventEmitter, once } = require('events');
const ee = new EventEmitter();
once(ee, 'error')
.then(([err]) => console.log('ok', err.message))
.catch((err) => console.log('error', err.message));
ee.emit('error', new Error('boom'));
// Prints: ok boom
An AbortSignal can be used to cancel waiting for the event:
-const { EventEmitter, once } = require('events');
const ee = new EventEmitter();
const ac = new AbortController();
async function foo(emitter, event, signal) {
try {
await once(emitter, event, { signal });
console.log('event emitted!');
} catch (error) {
if (error.name === 'AbortError') {
console.error('Waiting for the event was canceled!');
} else {
console.error('There was an error', error.message);
}
}
}
foo(ee, 'foo', ac.signal);
ac.abort(); // Abort waiting for the event
ee.emit('foo'); // Prints: Waiting for the event was canceled!
+const { EventEmitter, once } = require('events');
const ee = new EventEmitter();
const ac = new AbortController();
async function foo(emitter, event, signal) {
try {
await once(emitter, event, { signal });
console.log('event emitted!');
} catch (error) {
if (error.name === 'AbortError') {
console.error('Waiting for the event was canceled!');
} else {
console.error('There was an error', error.message);
}
}
}
foo(ee, 'foo', ac.signal);
ac.abort(); // Abort waiting for the event
ee.emit('foo'); // Prints: Waiting for the event was canceled!
Since
v11.13.0, v10.16.0
@@ -2348,7 +2348,7 @@ added for a particular event. This is a useful default that helps finding
memory leaks. The EventEmitter.setMaxListeners() method allows the default limit to be
modified (if eventTargets is empty) or modify the limit specified in every EventTarget | EventEmitter passed as arguments.
The value can be set toInfinity (or 0) to indicate an unlimited number of listeners.
-EventEmitter.setMaxListeners(20);
// Equivalent to
EventEmitter.defaultMaxListeners = 20;
const eventTarget = new EventTarget();
// Only way to increase limit for `EventTarget` instances
// as these doesn't expose its own `setMaxListeners` method
EventEmitter.setMaxListeners(20, eventTarget);
+EventEmitter.setMaxListeners(20);
// Equivalent to
EventEmitter.defaultMaxListeners = 20;
const eventTarget = new EventTarget();
// Only way to increase limit for `EventTarget` instances
// as these doesn't expose its own `setMaxListeners` method
EventEmitter.setMaxListeners(20, eventTarget);
Since
v15.3.0, v14.17.0
diff --git a/docs/classes/Client.html b/docs/classes/Client.html
index ba1d9412..1f64e779 100644
--- a/docs/classes/Client.html
+++ b/docs/classes/Client.html
@@ -25,7 +25,7 @@
-- Defined in packages/xrpl/src/client/index.ts:180
+- Defined in packages/xrpl/src/client/index.ts:180
@@ -119,18 +119,18 @@
Returns Client
Overrides EventEmitter.constructor
-- Defined in packages/xrpl/src/client/index.ts:210
+- Defined in packages/xrpl/src/client/index.ts:210
Abstraction
get Balances
-get Balances: ((this: Client, address: string, options?: { ledger_hash?: string; ledger_index?: LedgerIndex; limit?: number; peer?: string }) => Promise<{ currency: string; issuer?: string; value: string }[]>) = getBalances
+get Balances: ((this: Client, address: string, options?: {
ledger_hash?: string;
ledger_index?: LedgerIndex;
limit?: number;
peer?: string;
}) => Promise<{
currency: string;
issuer?: string;
value: string;
}[]>) = getBalances
Type declaration
-
-- (this: Client, address: string, options?: { ledger_hash?: string; ledger_index?: LedgerIndex; limit?: number; peer?: string }): Promise<{ currency: string; issuer?: string; value: string }[]>
+- (this: Client, address: string, options?: {
ledger_hash?: string;
ledger_index?: LedgerIndex;
limit?: number;
peer?: string;
}): Promise<{
currency: string;
issuer?: string;
value: string;
}[]>
-
Get XRP/non-XRP balances for an account.
@@ -148,7 +148,7 @@
Address of the account to retrieve balances for.
-
-
options: { ledger_hash?: string; ledger_index?: LedgerIndex; limit?: number; peer?: string } = {}
+options: {
ledger_hash?: string;
ledger_index?: LedgerIndex;
limit?: number;
peer?: string;
} = {}
Allows the client to specify a ledger_hash, ledger_index,
filter by peer, and/or limit number of balances.
@@ -171,9 +171,9 @@ ledger_index.
Optional peer?: string
Filter balances by peer.
-Returns Promise<{ currency: string; issuer?: string; value: string }[]>
+Returns Promise<{
currency: string;
issuer?: string;
value: string;
}[]>
-- Defined in packages/xrpl/src/client/index.ts:620
+- Defined in packages/xrpl/src/client/index.ts:620
get Ledger Index
@@ -197,16 +197,16 @@ ledger_index.
Returns Promise<number>
-- Defined in packages/xrpl/src/client/index.ts:630
+ - Defined in packages/xrpl/src/client/index.ts:630
get Orderbook
-get Orderbook: ((this: Client, takerPays: TakerAmount, takerGets: TakerAmount, options?: { ledger_hash?: string; ledger_index?: LedgerIndex; limit?: number; taker?: string }) => Promise<{ buy: BookOffer[]; sell: BookOffer[] }>) = getOrderbook
+get Orderbook: ((this: Client, takerPays: TakerAmount, takerGets: TakerAmount, options?: {
ledger_hash?: string;
ledger_index?: LedgerIndex;
limit?: number;
taker?: string;
}) => Promise<{
buy: BookOffer[];
sell: BookOffer[];
}>) = getOrderbook
Type declaration
-
-- (this: Client, takerPays: TakerAmount, takerGets: TakerAmount, options?: { ledger_hash?: string; ledger_index?: LedgerIndex; limit?: number; taker?: string }): Promise<{ buy: BookOffer[]; sell: BookOffer[] }>
+- (this: Client, takerPays: TakerAmount, takerGets: TakerAmount, options?: {
ledger_hash?: string;
ledger_index?: LedgerIndex;
limit?: number;
taker?: string;
}): Promise<{
buy: BookOffer[];
sell: BookOffer[];
}>
-
Fetch orderbook (buy/sell orders) between two accounts.
@@ -230,7 +230,7 @@ offer would pay, as an object with currency and issuer
offer would receive, as an object with currency and issuer fields.
-
-
options: { ledger_hash?: string; ledger_index?: LedgerIndex; limit?: number; taker?: string } = {}
+options: {
ledger_hash?: string;
ledger_index?: LedgerIndex;
limit?: number;
taker?: string;
} = {}
Options allowing the client to specify ledger_index,
ledger_hash, filter by taker, and/or limit number of orders.
@@ -253,22 +253,22 @@ the order book. Defaults to 20.
Optional taker?: string
Filter orders by taker.
-Returns Promise<{ buy: BookOffer[]; sell: BookOffer[] }>
+Returns Promise<{
buy: BookOffer[];
sell: BookOffer[];
}>
-- Defined in packages/xrpl/src/client/index.ts:625
+ - Defined in packages/xrpl/src/client/index.ts:625
get Xrp Balance
-get Xrp Balance: ((this: Client, address: string, options?: { ledger_hash?: string; ledger_index?: LedgerIndex }) => Promise<string>) = getXrpBalance
+get Xrp Balance: ((this: Client, address: string, options?: {
ledger_hash?: string;
ledger_index?: LedgerIndex;
}) => Promise<string>) = getXrpBalance
Type declaration
-
-- (this: Client, address: string, options?: { ledger_hash?: string; ledger_index?: LedgerIndex }): Promise<string>
+- (this: Client, address: string, options?: {
ledger_hash?: string;
ledger_index?: LedgerIndex;
}): Promise<string>
-
Get the XRP balance for an account.
-Example
const client = new Client(wss://s.altnet.rippletest.net:51233)
const balance = await client.getXrpBalance('rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn')
console.log(balance)
/// '200'
+Example
const client = new Client(wss://s.altnet.rippletest.net:51233)
const balance = await client.getXrpBalance('rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn')
console.log(balance)
/// '200'
Returns
The XRP balance of the account (as a string).
@@ -285,7 +285,7 @@ the order book. Defaults to 20.
Address of the account to retrieve XRP balance.
-
-
options: { ledger_hash?: string; ledger_index?: LedgerIndex } = {}
+options: {
ledger_hash?: string;
ledger_index?: LedgerIndex;
} = {}
Options to include for getting the XRP balance.
@@ -301,7 +301,7 @@ ledger_index.
Returns Promise<string>
-- Defined in packages/xrpl/src/client/index.ts:615
+- Defined in packages/xrpl/src/client/index.ts:615
Core
@@ -321,11 +321,11 @@ flags interfaces into numbers.
Returns
The autofilled transaction.
-
-Type Parameters
+
+Type Parameters
-
-
T extends Transaction
+T extends Transaction
Parameters
@@ -344,16 +344,16 @@ Only used for multisigned transactions.
Returns Promise<T>
Submits a signed/unsigned transaction. Steps performed on a transaction:
@@ -379,7 +379,7 @@ Steps performed on a transaction:A transaction to autofill, sign & encode, and submit.
Optional opts: { autofill?: boolean; failHard?: boolean; wallet?: Wallet }Optional opts: { (Optional) Options used to sign and submit a transaction.
Asynchronously submits a transaction and verifies that it has been included in a
validated ledger (or has errored/will not be included for some reason).
@@ -426,7 +426,7 @@ See Reliable Tra
A transaction to autofill, sign & encode, and submit. (Optional) Options used to sign and submit a transaction.
+Optional opts: { autofill?: boolean; failHard?: boolean; wallet?: Wallet }Optional opts: {
autofill?: boolean;
failHard?: boolean;
wallet?: Wallet;
}
@@ -444,22 +444,22 @@ See Reliable Tra
Generates a random wallet with some amount of XRP (usually 1000 XRP).
-const api = new xrpl.Client("wss://s.altnet.rippletest.net:51233")
await api.connect()
const { wallet, balance } = await api.fundWallet()
+Example
const api = new xrpl.Client("wss://s.altnet.rippletest.net:51233")
await api.connect()
const { wallet, balance } = await api.fundWallet()
Returns
A Wallet on the Testnet or Devnet that contains some amount of XRP,
@@ -479,7 +479,7 @@ and that wallet's balance in XRP.
An existing XRPL Wallet to fund. If undefined or null, a new Wallet will be created.
-
-
Optional options: { faucetHost?: string }
+Optional options: {
faucetHost?: string;
}
See below.
@@ -491,9 +491,9 @@ automatically. In other environments, or if you would like to customize the
faucet host in devnet or testnet, you should provide the host using this
option.
Readonly maxEvent handler for subscription streams.
-const api = new Client('wss://s.altnet.rippletest.net:51233')
api.on('transactions', (tx: TransactionStream) => {
console.log("Received Transaction")
console.log(tx)
})
await api.connect()
const response = await api.request({
command: 'subscribe',
streams: ['transactions_proposed']
})
+Example
const api = new Client('wss://s.altnet.rippletest.net:51233')
api.on('transactions', (tx: TransactionStream) => {
console.log("Received Transaction")
console.log(tx)
})
await api.connect()
const response = await api.request({
command: 'subscribe',
streams: ['transactions_proposed']
})
Overrides EventEmitter.on
Event handler for subscription streams.
@@ -618,7 +618,7 @@ number. Defaults to '2'.Overrides EventEmitter.on
Event handler for subscription streams.
@@ -648,7 +648,7 @@ number. Defaults to '2'.Overrides EventEmitter.on
Event handler for subscription streams.
@@ -678,7 +678,7 @@ number. Defaults to '2'.Overrides EventEmitter.on
Event handler for subscription streams.
@@ -708,7 +708,7 @@ number. Defaults to '2'.Overrides EventEmitter.on
Event handler for subscription streams.
@@ -738,7 +738,7 @@ number. Defaults to '2'.Overrides EventEmitter.on
Event handler for subscription streams.
@@ -768,7 +768,7 @@ number. Defaults to '2'.Overrides EventEmitter.on
Event handler for subscription streams.
@@ -798,7 +798,7 @@ number. Defaults to '2'.Overrides EventEmitter.on
Event handler for subscription streams.
@@ -828,7 +828,7 @@ number. Defaults to '2'.Overrides EventEmitter.on
Makes a request to the client with the given command and @@ -856,7 +856,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -871,7 +871,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -886,7 +886,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -901,7 +901,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -916,7 +916,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -931,7 +931,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -946,7 +946,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -961,7 +961,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -976,7 +976,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -991,7 +991,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1006,7 +1006,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1021,7 +1021,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1036,7 +1036,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1051,7 +1051,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1066,7 +1066,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1081,7 +1081,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1096,7 +1096,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1111,7 +1111,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1126,7 +1126,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1141,7 +1141,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1156,7 +1156,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1171,7 +1171,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1186,7 +1186,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1201,7 +1201,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1216,7 +1216,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1231,7 +1231,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1246,7 +1246,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1261,7 +1261,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1276,7 +1276,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1291,7 +1291,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1306,7 +1306,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1321,7 +1321,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1336,7 +1336,7 @@ additional request body parameters.
Makes a request to the client with the given command and @@ -1344,13 +1344,13 @@ additional request body parameters.
The response from the server.
Makes multiple paged requests to the client to return a given number of @@ -1395,7 +1395,7 @@ requests as needed.
Makes multiple paged requests to the client to return a given number of @@ -1419,7 +1419,7 @@ requests as needed.
Makes multiple paged requests to the client to return a given number of @@ -1443,7 +1443,7 @@ requests as needed.
Makes multiple paged requests to the client to return a given number of @@ -1467,7 +1467,7 @@ requests as needed.
Makes multiple paged requests to the client to return a given number of @@ -1491,7 +1491,7 @@ requests as needed.
Makes multiple paged requests to the client to return a given number of @@ -1515,7 +1515,7 @@ requests as needed.
Requests the next page of data.
@@ -1550,7 +1550,7 @@ requests as needed.Requests the next page of data.
@@ -1570,7 +1570,7 @@ requests as needed.Requests the next page of data.
@@ -1590,7 +1590,7 @@ requests as needed.Requests the next page of data.
@@ -1610,7 +1610,7 @@ requests as needed.Requests the next page of data.
@@ -1630,14 +1630,14 @@ requests as needed.Readonly connectionThe autofilled transaction.
Static Readonly capture'error' listener is installed.
Synchronously calls each of the listeners registered for the event namedeventName, in the order they were registered, passing the supplied arguments
to each.
Returns true if the event had listeners, false otherwise.
const EventEmitter = require('events');
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
+const EventEmitter = require('events');
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
Since
v0.1.26
@@ -1774,7 +1774,7 @@ to each.
-
Returns an array listing the events for which the emitter has registered
listeners. The values in the array are strings or Symbols.
-const EventEmitter = require('events');
const myEE = new EventEmitter();
myEE.on('foo', () => {});
myEE.on('bar', () => {});
const sym = Symbol('symbol');
myEE.on(sym, () => {});
console.log(myEE.eventNames());
// Prints: [ 'foo', 'bar', Symbol(symbol) ]
+const EventEmitter = require('events');
const myEE = new EventEmitter();
myEE.on('foo', () => {});
myEE.on('bar', () => {});
const sym = Symbol('symbol');
myEE.on(sym, () => {});
console.log(myEE.eventNames());
// Prints: [ 'foo', 'bar', Symbol(symbol) ]
Since
v6.0.0
@@ -1823,7 +1823,7 @@ set by emitter.setMaxListeners(n) or defaults to listeners(eventName: string | symbol): Function[]
-
Returns a copy of the array of listeners for the event named eventName.
-server.on('connection', (stream) => {
console.log('someone connected!');
});
console.log(util.inspect(server.listeners('connection')));
// Prints: [ [Function] ]
+server.on('connection', (stream) => {
console.log('someone connected!');
});
console.log(util.inspect(server.listeners('connection')));
// Prints: [ [Function] ]
Since
v0.1.26
@@ -1875,12 +1875,12 @@ set by emitter.setMaxListeners(n) or defaults to
Adds a one-timelistener function for the event named eventName. The
next time eventName is triggered, this listener is removed and then invoked.
-server.once('connection', (stream) => {
console.log('Ah, we have our first user!');
});
+server.once('connection', (stream) => {
console.log('Ah, we have our first user!');
});
Returns a reference to the EventEmitter, so that calls can be chained.
By default, event listeners are invoked in the order they are added. Theemitter.prependOnceListener() method can be used as an alternative to add the
event listener to the beginning of the listeners array.
-const myEE = new EventEmitter();
myEE.once('foo', () => console.log('a'));
myEE.prependOnceListener('foo', () => console.log('b'));
myEE.emit('foo');
// Prints:
// b
// a
+const myEE = new EventEmitter();
myEE.once('foo', () => console.log('a'));
myEE.prependOnceListener('foo', () => console.log('b'));
myEE.emit('foo');
// Prints:
// b
// a
Since
v0.3.0
@@ -1920,7 +1920,7 @@ event listener to the beginning of the listeners array.
event named eventName. No checks are made to see if the listener has
already been added. Multiple calls passing the same combination of eventNameand listener will result in the listener being added, and called, multiple
times.
-server.prependListener('connection', (stream) => {
console.log('someone connected!');
});
+server.prependListener('connection', (stream) => {
console.log('someone connected!');
});
Returns a reference to the EventEmitter, so that calls can be chained.
@@ -1959,7 +1959,7 @@ times.
-
Adds a one-timelistener function for the event named eventName to the_beginning_ of the listeners array. The next time eventName is triggered, this
listener is removed, and then invoked.
-server.prependOnceListener('connection', (stream) => {
console.log('Ah, we have our first user!');
});
+server.prependOnceListener('connection', (stream) => {
console.log('Ah, we have our first user!');
});
Returns a reference to the EventEmitter, so that calls can be chained.
@@ -1998,7 +1998,7 @@ listener is removed, and then invoked.
-
Returns a copy of the array of listeners for the event named eventName,
including any wrappers (such as those created by .once()).
-const emitter = new EventEmitter();
emitter.once('log', () => console.log('log once'));
// Returns a new Array with a function `onceWrapper` which has a property
// `listener` which contains the original listener bound above
const listeners = emitter.rawListeners('log');
const logFnWrapper = listeners[0];
// Logs "log once" to the console and does not unbind the `once` event
logFnWrapper.listener();
// Logs "log once" to the console and removes the listener
logFnWrapper();
emitter.on('log', () => console.log('log persistently'));
// Will return a new Array with a single function bound by `.on()` above
const newListeners = emitter.rawListeners('log');
// Logs "log persistently" twice
newListeners[0]();
emitter.emit('log');
+const emitter = new EventEmitter();
emitter.once('log', () => console.log('log once'));
// Returns a new Array with a function `onceWrapper` which has a property
// `listener` which contains the original listener bound above
const listeners = emitter.rawListeners('log');
const logFnWrapper = listeners[0];
// Logs "log once" to the console and does not unbind the `once` event
logFnWrapper.listener();
// Logs "log once" to the console and removes the listener
logFnWrapper();
emitter.on('log', () => console.log('log persistently'));
// Will return a new Array with a single function bound by `.on()` above
const newListeners = emitter.rawListeners('log');
// Logs "log persistently" twice
newListeners[0]();
emitter.emit('log');
Since
v9.4.0
@@ -2040,7 +2040,7 @@ component or module (e.g. sockets or file streams).
- remove
Listener(eventName: string | symbol, listener: ((...args: any[]) => void)): Client
-
Removes the specified listener from the listener array for the event namedeventName.
-const callback = (stream) => {
console.log('someone connected!');
};
server.on('connection', callback);
// ...
server.removeListener('connection', callback);
+const callback = (stream) => {
console.log('someone connected!');
};
server.on('connection', callback);
// ...
server.removeListener('connection', callback);
removeListener() will remove, at most, one instance of a listener from the
listener array. If any single listener has been added multiple times to the
@@ -2049,7 +2049,7 @@ called multiple times to remove each instance.
Once an event is emitted, all listeners attached to it at the
time of emitting are called in order. This implies that anyremoveListener() or removeAllListeners() calls after emitting and_before_ the last listener finishes execution will
not remove them fromemit() in progress. Subsequent events behave as expected.
-const myEmitter = new MyEmitter();
const callbackA = () => {
console.log('A');
myEmitter.removeListener('event', callbackB);
};
const callbackB = () => {
console.log('B');
};
myEmitter.on('event', callbackA);
myEmitter.on('event', callbackB);
// callbackA removes listener callbackB but it will still be called.
// Internal listener array at time of emit [callbackA, callbackB]
myEmitter.emit('event');
// Prints:
// A
// B
// callbackB is now removed.
// Internal listener array [callbackA]
myEmitter.emit('event');
// Prints:
// A
+const myEmitter = new MyEmitter();
const callbackA = () => {
console.log('A');
myEmitter.removeListener('event', callbackB);
};
const callbackB = () => {
console.log('B');
};
myEmitter.on('event', callbackA);
myEmitter.on('event', callbackB);
// callbackA removes listener callbackB but it will still be called.
// Internal listener array at time of emit [callbackA, callbackB]
myEmitter.emit('event');
// Prints:
// A
// B
// callbackB is now removed.
// Internal listener array [callbackA]
myEmitter.emit('event');
// Prints:
// A
Because listeners are managed using an internal array, calling this will
change the position indices of any listener registered after the listener
@@ -2059,7 +2059,7 @@ the emitter.listeners() method will need to be recreated.
When a single function has been added as a handler multiple times for a single
event (as in the example below), removeListener() will remove the most
recently added instance. In the example the once('ping')listener is removed:
-const ee = new EventEmitter();
function pong() {
console.log('pong');
}
ee.on('ping', pong);
ee.once('ping', pong);
ee.removeListener('ping', pong);
ee.emit('ping');
ee.emit('ping');
+const ee = new EventEmitter();
function pong() {
console.log('pong');
}
ee.on('ping', pong);
ee.once('ping', pong);
ee.removeListener('ping', pong);
ee.emit('ping');
ee.emit('ping');
Returns a reference to the EventEmitter, so that calls can be chained.
@@ -2119,7 +2119,7 @@ modified for this specific EventEmitter instance. The value can be
the emitter.
For EventTargets this is the only way to get the event listeners for the
event target. This is useful for debugging and diagnostic purposes.
-const { getEventListeners, EventEmitter } = require('events');
{
const ee = new EventEmitter();
const listener = () => console.log('Events are fun');
ee.on('foo', listener);
getEventListeners(ee, 'foo'); // [listener]
}
{
const et = new EventTarget();
const listener = () => console.log('Events are fun');
et.addEventListener('foo', listener);
getEventListeners(et, 'foo'); // [listener]
}
+const { getEventListeners, EventEmitter } = require('events');
{
const ee = new EventEmitter();
const listener = () => console.log('Events are fun');
ee.on('foo', listener);
getEventListeners(ee, 'foo'); // [listener]
}
{
const et = new EventTarget();
const listener = () => console.log('Events are fun');
et.addEventListener('foo', listener);
getEventListeners(et, 'foo'); // [listener]
}
Since
v15.2.0, v14.17.0
@@ -2141,7 +2141,7 @@ event target. This is useful for debugging and diagnostic purposes.
- listener
Count(emitter: EventEmitter, eventName: string | symbol): number
-
A class method that returns the number of listeners for the given eventNameregistered on the given emitter.
-const { EventEmitter, listenerCount } = require('events');
const myEmitter = new EventEmitter();
myEmitter.on('event', () => {});
myEmitter.on('event', () => {});
console.log(listenerCount(myEmitter, 'event'));
// Prints: 2
+const { EventEmitter, listenerCount } = require('events');
const myEmitter = new EventEmitter();
myEmitter.on('event', () => {});
myEmitter.on('event', () => {});
console.log(listenerCount(myEmitter, 'event'));
// Prints: 2
Since
v0.9.12
@@ -2168,14 +2168,14 @@ event target. This is useful for debugging and diagnostic purposes.
- on(emitter: EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator<any>
-
-
const { on, EventEmitter } = require('events');
(async () => {
const ee = new EventEmitter();
// Emit later on
process.nextTick(() => {
ee.emit('foo', 'bar');
ee.emit('foo', 42);
});
for await (const event of on(ee, 'foo')) {
// The execution of this inner block is synchronous and it
// processes one event at a time (even with await). Do not use
// if concurrent execution is required.
console.log(event); // prints ['bar'] [42]
}
// Unreachable here
})();
+const { on, EventEmitter } = require('events');
(async () => {
const ee = new EventEmitter();
// Emit later on
process.nextTick(() => {
ee.emit('foo', 'bar');
ee.emit('foo', 42);
});
for await (const event of on(ee, 'foo')) {
// The execution of this inner block is synchronous and it
// processes one event at a time (even with await). Do not use
// if concurrent execution is required.
console.log(event); // prints ['bar'] [42]
}
// Unreachable here
})();
Returns an AsyncIterator that iterates eventName events. It will throw
if the EventEmitter emits 'error'. It removes all listeners when
exiting the loop. The value returned by each iteration is an array
composed of the emitted event arguments.
An AbortSignal can be used to cancel waiting on events:
-const { on, EventEmitter } = require('events');
const ac = new AbortController();
(async () => {
const ee = new EventEmitter();
// Emit later on
process.nextTick(() => {
ee.emit('foo', 'bar');
ee.emit('foo', 42);
});
for await (const event of on(ee, 'foo', { signal: ac.signal })) {
// The execution of this inner block is synchronous and it
// processes one event at a time (even with await). Do not use
// if concurrent execution is required.
console.log(event); // prints ['bar'] [42]
}
// Unreachable here
})();
process.nextTick(() => ac.abort());
+const { on, EventEmitter } = require('events');
const ac = new AbortController();
(async () => {
const ee = new EventEmitter();
// Emit later on
process.nextTick(() => {
ee.emit('foo', 'bar');
ee.emit('foo', 42);
});
for await (const event of on(ee, 'foo', { signal: ac.signal })) {
// The execution of this inner block is synchronous and it
// processes one event at a time (even with await). Do not use
// if concurrent execution is required.
console.log(event); // prints ['bar'] [42]
}
// Unreachable here
})();
process.nextTick(() => ac.abort());
Since
v13.6.0, v12.16.0
@@ -2208,15 +2208,15 @@ The Promise will resolve with an array of all the arguments emitted
given event.
This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event
semantics and does not listen to the 'error' event.
-const { once, EventEmitter } = require('events');
async function run() {
const ee = new EventEmitter();
process.nextTick(() => {
ee.emit('myevent', 42);
});
const [value] = await once(ee, 'myevent');
console.log(value);
const err = new Error('kaboom');
process.nextTick(() => {
ee.emit('error', err);
});
try {
await once(ee, 'myevent');
} catch (err) {
console.log('error happened', err);
}
}
run();
+const { once, EventEmitter } = require('events');
async function run() {
const ee = new EventEmitter();
process.nextTick(() => {
ee.emit('myevent', 42);
});
const [value] = await once(ee, 'myevent');
console.log(value);
const err = new Error('kaboom');
process.nextTick(() => {
ee.emit('error', err);
});
try {
await once(ee, 'myevent');
} catch (err) {
console.log('error happened', err);
}
}
run();
The special handling of the 'error' event is only used when events.once()is used to wait for another event. If events.once() is used to wait for the
'error' event itself, then it is treated as any other kind of event without
special handling:
-const { EventEmitter, once } = require('events');
const ee = new EventEmitter();
once(ee, 'error')
.then(([err]) => console.log('ok', err.message))
.catch((err) => console.log('error', err.message));
ee.emit('error', new Error('boom'));
// Prints: ok boom
+const { EventEmitter, once } = require('events');
const ee = new EventEmitter();
once(ee, 'error')
.then(([err]) => console.log('ok', err.message))
.catch((err) => console.log('error', err.message));
ee.emit('error', new Error('boom'));
// Prints: ok boom
An AbortSignal can be used to cancel waiting for the event:
-const { EventEmitter, once } = require('events');
const ee = new EventEmitter();
const ac = new AbortController();
async function foo(emitter, event, signal) {
try {
await once(emitter, event, { signal });
console.log('event emitted!');
} catch (error) {
if (error.name === 'AbortError') {
console.error('Waiting for the event was canceled!');
} else {
console.error('There was an error', error.message);
}
}
}
foo(ee, 'foo', ac.signal);
ac.abort(); // Abort waiting for the event
ee.emit('foo'); // Prints: Waiting for the event was canceled!
+const { EventEmitter, once } = require('events');
const ee = new EventEmitter();
const ac = new AbortController();
async function foo(emitter, event, signal) {
try {
await once(emitter, event, { signal });
console.log('event emitted!');
} catch (error) {
if (error.name === 'AbortError') {
console.error('Waiting for the event was canceled!');
} else {
console.error('There was an error', error.message);
}
}
}
foo(ee, 'foo', ac.signal);
ac.abort(); // Abort waiting for the event
ee.emit('foo'); // Prints: Waiting for the event was canceled!
Since
v11.13.0, v10.16.0
@@ -2259,7 +2259,7 @@ added for a particular event. This is a useful default that helps finding
memory leaks. The EventEmitter.setMaxListeners() method allows the default limit to be
modified (if eventTargets is empty) or modify the limit specified in every EventTarget | EventEmitter passed as arguments.
The value can be set toInfinity (or 0) to indicate an unlimited number of listeners.
-EventEmitter.setMaxListeners(20);
// Equivalent to
EventEmitter.defaultMaxListeners = 20;
const eventTarget = new EventTarget();
// Only way to increase limit for `EventTarget` instances
// as these doesn't expose its own `setMaxListeners` method
EventEmitter.setMaxListeners(20, eventTarget);
+EventEmitter.setMaxListeners(20);
// Equivalent to
EventEmitter.defaultMaxListeners = 20;
const eventTarget = new EventTarget();
// Only way to increase limit for `EventTarget` instances
// as these doesn't expose its own `setMaxListeners` method
EventEmitter.setMaxListeners(20, eventTarget);
Since
v15.3.0, v14.17.0
diff --git a/docs/classes/ConnectionError.html b/docs/classes/ConnectionError.html
index 54a9c571..fcd4ed43 100644
--- a/docs/classes/ConnectionError.html
+++ b/docs/classes/ConnectionError.html
@@ -29,7 +29,7 @@
- TimeoutError
- ResponseFormatError
-- Defined in packages/xrpl/src/errors.ts:78
+- Defined in packages/xrpl/src/errors.ts:78
@@ -41,11 +41,11 @@
Properties
-data
+
@@ -77,7 +77,7 @@
Returns ConnectionError
Inherited from XrplError.constructor
-- Defined in packages/xrpl/src/errors.ts:21
+- Defined in packages/xrpl/src/errors.ts:21
Properties
@@ -85,19 +85,19 @@
data?: unknown
-- Defined in packages/xrpl/src/errors.ts:13
+- Defined in packages/xrpl/src/errors.ts:13
Readonly message
message: string
Inherited from XrplError.message
-- Defined in packages/xrpl/src/errors.ts:12
+- Defined in packages/xrpl/src/errors.ts:12
Readonly name
name: string
-- Defined in packages/xrpl/src/errors.ts:11
+- Defined in packages/xrpl/src/errors.ts:11
Optional stack
stack?: string
@@ -151,7 +151,7 @@ us to customize its output:
Returns string
Inherited from XrplError.inspect
-- Defined in packages/xrpl/src/errors.ts:54
+- Defined in packages/xrpl/src/errors.ts:54
to String
@@ -164,7 +164,7 @@ us to customize its output:
Returns string
Inherited from XrplError.toString
-- Defined in packages/xrpl/src/errors.ts:38
+- Defined in packages/xrpl/src/errors.ts:38
Static capture Stack Trace
@@ -210,11 +210,11 @@ us to customize its output:
- Connection
Error
- constructor
-- data
+- data?
- message
- name
-- stack
-- prepare
Stack Trace
+- stack?
+- prepare
Stack Trace?
- stack
Trace Limit
- inspect
- to
String
diff --git a/docs/classes/DisconnectedError.html b/docs/classes/DisconnectedError.html
index 24663a32..746f6832 100644
--- a/docs/classes/DisconnectedError.html
+++ b/docs/classes/DisconnectedError.html
@@ -23,7 +23,7 @@
- DisconnectedError
-- Defined in packages/xrpl/src/errors.ts:92
+- Defined in packages/xrpl/src/errors.ts:92
@@ -35,11 +35,11 @@
Properties
-data
+
@@ -71,7 +71,7 @@
Returns DisconnectedError
Inherited from ConnectionError.constructor
-- Defined in packages/xrpl/src/errors.ts:21
+- Defined in packages/xrpl/src/errors.ts:21
Properties
@@ -79,19 +79,19 @@
data?: unknown
Inherited from ConnectionError.data
-- Defined in packages/xrpl/src/errors.ts:13
+- Defined in packages/xrpl/src/errors.ts:13
Readonly message
message: string
Inherited from ConnectionError.message
-- Defined in packages/xrpl/src/errors.ts:12
+- Defined in packages/xrpl/src/errors.ts:12
Readonly name
name: string
Inherited from ConnectionError.name
-- Defined in packages/xrpl/src/errors.ts:11
+- Defined in packages/xrpl/src/errors.ts:11
Optional stack
stack?: string
@@ -145,7 +145,7 @@ us to customize its output:
Returns string
Inherited from ConnectionError.inspect
-- Defined in packages/xrpl/src/errors.ts:54
+- Defined in packages/xrpl/src/errors.ts:54
to String
@@ -158,7 +158,7 @@ us to customize its output:
Returns string
Inherited from ConnectionError.toString
-- Defined in packages/xrpl/src/errors.ts:38
+- Defined in packages/xrpl/src/errors.ts:38
Static capture Stack Trace
@@ -204,11 +204,11 @@ us to customize its output:
- Disconnected
Error
- constructor
-- data
+- data?
- message
- name
-- stack
-- prepare
Stack Trace
+- stack?
+- prepare
Stack Trace?
- stack
Trace Limit
- inspect
- to
String
diff --git a/docs/classes/NotConnectedError.html b/docs/classes/NotConnectedError.html
index 68843549..db4f6bea 100644
--- a/docs/classes/NotConnectedError.html
+++ b/docs/classes/NotConnectedError.html
@@ -23,7 +23,7 @@
- NotConnectedError
-- Defined in packages/xrpl/src/errors.ts:85
+- Defined in packages/xrpl/src/errors.ts:85
@@ -35,11 +35,11 @@
Properties
-data
+
@@ -71,7 +71,7 @@
Returns NotConnectedError
Inherited from ConnectionError.constructor
-- Defined in packages/xrpl/src/errors.ts:21
+- Defined in packages/xrpl/src/errors.ts:21
Properties
@@ -79,19 +79,19 @@
data?: unknown
Inherited from ConnectionError.data
-- Defined in packages/xrpl/src/errors.ts:13
+- Defined in packages/xrpl/src/errors.ts:13
Readonly message
message: string
Inherited from ConnectionError.message
-- Defined in packages/xrpl/src/errors.ts:12
+- Defined in packages/xrpl/src/errors.ts:12
Readonly name
name: string
Inherited from ConnectionError.name
-- Defined in packages/xrpl/src/errors.ts:11
+- Defined in packages/xrpl/src/errors.ts:11
Optional stack
stack?: string
@@ -145,7 +145,7 @@ us to customize its output:
Returns string
Inherited from ConnectionError.inspect
-- Defined in packages/xrpl/src/errors.ts:54
+- Defined in packages/xrpl/src/errors.ts:54
to String
@@ -158,7 +158,7 @@ us to customize its output:
Returns string
Inherited from ConnectionError.toString
-- Defined in packages/xrpl/src/errors.ts:38
+- Defined in packages/xrpl/src/errors.ts:38
Static capture Stack Trace
@@ -204,11 +204,11 @@ us to customize its output:
- Not
Connected Error
- constructor
-- data
+- data?
- message
- name
-- stack
-- prepare
Stack Trace
+- stack?
+- prepare
Stack Trace?
- stack
Trace Limit
- inspect
- to
String
diff --git a/docs/classes/NotFoundError.html b/docs/classes/NotFoundError.html
index 634e67af..3e8deaad 100644
--- a/docs/classes/NotFoundError.html
+++ b/docs/classes/NotFoundError.html
@@ -24,7 +24,7 @@ From rippled.
- NotFoundError
-- Defined in packages/xrpl/src/errors.ts:137
+- Defined in packages/xrpl/src/errors.ts:137
@@ -36,11 +36,11 @@ From rippled.
Properties
-data
+
@@ -68,7 +68,7 @@ From rippled.
Returns NotFoundError
Overrides XrplError.constructor
-- Defined in packages/xrpl/src/errors.ts:143
+- Defined in packages/xrpl/src/errors.ts:143
Properties
@@ -76,19 +76,19 @@ From rippled.
data?: unknown
-- Defined in packages/xrpl/src/errors.ts:13
+- Defined in packages/xrpl/src/errors.ts:13
Readonly message
message: string
Inherited from XrplError.message
-- Defined in packages/xrpl/src/errors.ts:12
+- Defined in packages/xrpl/src/errors.ts:12
Readonly name
name: string
-- Defined in packages/xrpl/src/errors.ts:11
+- Defined in packages/xrpl/src/errors.ts:11
Optional stack
stack?: string
@@ -142,7 +142,7 @@ us to customize its output:
Returns string
Inherited from XrplError.inspect
-- Defined in packages/xrpl/src/errors.ts:54
+- Defined in packages/xrpl/src/errors.ts:54
to String
@@ -155,7 +155,7 @@ us to customize its output:
Returns string
Inherited from XrplError.toString
-- Defined in packages/xrpl/src/errors.ts:38
+- Defined in packages/xrpl/src/errors.ts:38
Static capture Stack Trace
@@ -201,11 +201,11 @@ us to customize its output:
- Not
Found Error
- constructor
-- data
+- data?
- message
- name
-- stack
-- prepare
Stack Trace
+- stack?
+- prepare
Stack Trace?
- stack
Trace Limit
- inspect
- to
String
diff --git a/docs/classes/ResponseFormatError.html b/docs/classes/ResponseFormatError.html
index 17dbfa12..ccb49c41 100644
--- a/docs/classes/ResponseFormatError.html
+++ b/docs/classes/ResponseFormatError.html
@@ -23,7 +23,7 @@
- ResponseFormatError
-- Defined in packages/xrpl/src/errors.ts:113
+- Defined in packages/xrpl/src/errors.ts:113
@@ -35,11 +35,11 @@
Properties
-data
+
@@ -71,7 +71,7 @@
Returns ResponseFormatError
Inherited from ConnectionError.constructor
-- Defined in packages/xrpl/src/errors.ts:21
+- Defined in packages/xrpl/src/errors.ts:21
Properties
@@ -79,19 +79,19 @@
data?: unknown
Inherited from ConnectionError.data
-- Defined in packages/xrpl/src/errors.ts:13
+- Defined in packages/xrpl/src/errors.ts:13
Readonly message
message: string
Inherited from ConnectionError.message
-- Defined in packages/xrpl/src/errors.ts:12
+- Defined in packages/xrpl/src/errors.ts:12
Readonly name
name: string
Inherited from ConnectionError.name
-- Defined in packages/xrpl/src/errors.ts:11
+- Defined in packages/xrpl/src/errors.ts:11
Optional stack
stack?: string
@@ -145,7 +145,7 @@ us to customize its output:
Returns string
Inherited from ConnectionError.inspect
-- Defined in packages/xrpl/src/errors.ts:54
+- Defined in packages/xrpl/src/errors.ts:54
to String
@@ -158,7 +158,7 @@ us to customize its output:
Returns string
Inherited from ConnectionError.toString
-- Defined in packages/xrpl/src/errors.ts:38
+- Defined in packages/xrpl/src/errors.ts:38
Static capture Stack Trace
@@ -204,11 +204,11 @@ us to customize its output:
- Response
Format Error
- constructor
-- data
+- data?
- message
- name
-- stack
-- prepare
Stack Trace
+- stack?
+- prepare
Stack Trace?
- stack
Trace Limit
- inspect
- to
String
diff --git a/docs/classes/RippledError.html b/docs/classes/RippledError.html
index 7cf91489..fb8193c6 100644
--- a/docs/classes/RippledError.html
+++ b/docs/classes/RippledError.html
@@ -23,7 +23,7 @@
- RippledError
-- Defined in packages/xrpl/src/errors.ts:64
+- Defined in packages/xrpl/src/errors.ts:64
@@ -35,11 +35,11 @@
Properties
-data
+
@@ -71,7 +71,7 @@
Returns RippledError
Inherited from XrplError.constructor
-- Defined in packages/xrpl/src/errors.ts:21
+- Defined in packages/xrpl/src/errors.ts:21
Properties
@@ -79,19 +79,19 @@
data?: unknown
-- Defined in packages/xrpl/src/errors.ts:13
+- Defined in packages/xrpl/src/errors.ts:13
Readonly message
message: string
Inherited from XrplError.message
-- Defined in packages/xrpl/src/errors.ts:12
+- Defined in packages/xrpl/src/errors.ts:12
Readonly name
name: string
-- Defined in packages/xrpl/src/errors.ts:11
+- Defined in packages/xrpl/src/errors.ts:11
Optional stack
stack?: string
@@ -145,7 +145,7 @@ us to customize its output:
Returns string
Inherited from XrplError.inspect
-- Defined in packages/xrpl/src/errors.ts:54
+- Defined in packages/xrpl/src/errors.ts:54
to String
@@ -158,7 +158,7 @@ us to customize its output:
Returns string
Inherited from XrplError.toString
-- Defined in packages/xrpl/src/errors.ts:38
+- Defined in packages/xrpl/src/errors.ts:38
Static capture Stack Trace
@@ -204,11 +204,11 @@ us to customize its output:
- Rippled
Error
- constructor
-- data
+- data?
- message
- name
-- stack
-- prepare
Stack Trace
+- stack?
+- prepare
Stack Trace?
- stack
Trace Limit
- inspect
- to
String
diff --git a/docs/classes/RippledNotInitializedError.html b/docs/classes/RippledNotInitializedError.html
index 948b766b..7d927bd0 100644
--- a/docs/classes/RippledNotInitializedError.html
+++ b/docs/classes/RippledNotInitializedError.html
@@ -23,7 +23,7 @@
- RippledNotInitializedError
-- Defined in packages/xrpl/src/errors.ts:99
+- Defined in packages/xrpl/src/errors.ts:99
@@ -35,11 +35,11 @@
Properties
-data
+
@@ -71,7 +71,7 @@
Returns RippledNotInitializedError
Inherited from ConnectionError.constructor
-- Defined in packages/xrpl/src/errors.ts:21
+- Defined in packages/xrpl/src/errors.ts:21
Properties
@@ -79,19 +79,19 @@
data?: unknown
Inherited from ConnectionError.data
-- Defined in packages/xrpl/src/errors.ts:13
+- Defined in packages/xrpl/src/errors.ts:13
Readonly message
message: string
Inherited from ConnectionError.message
-- Defined in packages/xrpl/src/errors.ts:12
+- Defined in packages/xrpl/src/errors.ts:12
Readonly name
name: string
Inherited from ConnectionError.name
-- Defined in packages/xrpl/src/errors.ts:11
+- Defined in packages/xrpl/src/errors.ts:11
Optional stack
stack?: string
@@ -145,7 +145,7 @@ us to customize its output:
Returns string
Inherited from ConnectionError.inspect
-- Defined in packages/xrpl/src/errors.ts:54
+- Defined in packages/xrpl/src/errors.ts:54
to String
@@ -158,7 +158,7 @@ us to customize its output:
Returns string
Inherited from ConnectionError.toString
-- Defined in packages/xrpl/src/errors.ts:38
+- Defined in packages/xrpl/src/errors.ts:38
Static capture Stack Trace
@@ -204,11 +204,11 @@ us to customize its output:
- Rippled
Not Initialized Error
- constructor
-- data
+- data?
- message
- name
-- stack
-- prepare
Stack Trace
+- stack?
+- prepare
Stack Trace?
- stack
Trace Limit
- inspect
- to
String
diff --git a/docs/classes/TimeoutError.html b/docs/classes/TimeoutError.html
index 77476912..1f36251a 100644
--- a/docs/classes/TimeoutError.html
+++ b/docs/classes/TimeoutError.html
@@ -23,7 +23,7 @@
- TimeoutError
-- Defined in packages/xrpl/src/errors.ts:106
+- Defined in packages/xrpl/src/errors.ts:106
@@ -35,11 +35,11 @@
Properties
-data
+
@@ -71,7 +71,7 @@
Returns TimeoutError
Inherited from ConnectionError.constructor
-- Defined in packages/xrpl/src/errors.ts:21
+- Defined in packages/xrpl/src/errors.ts:21
Properties
@@ -79,19 +79,19 @@
data?: unknown
Inherited from ConnectionError.data
-- Defined in packages/xrpl/src/errors.ts:13
+- Defined in packages/xrpl/src/errors.ts:13
Readonly message
message: string
Inherited from ConnectionError.message
-- Defined in packages/xrpl/src/errors.ts:12
+- Defined in packages/xrpl/src/errors.ts:12
Readonly name
name: string
Inherited from ConnectionError.name
-- Defined in packages/xrpl/src/errors.ts:11
+- Defined in packages/xrpl/src/errors.ts:11
Optional stack
stack?: string
@@ -145,7 +145,7 @@ us to customize its output:
Returns string
Inherited from ConnectionError.inspect
-- Defined in packages/xrpl/src/errors.ts:54
+- Defined in packages/xrpl/src/errors.ts:54
to String
@@ -158,7 +158,7 @@ us to customize its output:
Returns string
Inherited from ConnectionError.toString
-- Defined in packages/xrpl/src/errors.ts:38
+- Defined in packages/xrpl/src/errors.ts:38
Static capture Stack Trace
@@ -204,11 +204,11 @@ us to customize its output:
- Timeout
Error
- constructor
-- data
+- data?
- message
- name
-- stack
-- prepare
Stack Trace
+- stack?
+- prepare
Stack Trace?
- stack
Trace Limit
- inspect
- to
String
diff --git a/docs/classes/UnexpectedError.html b/docs/classes/UnexpectedError.html
index 9adf0e88..726e0da2 100644
--- a/docs/classes/UnexpectedError.html
+++ b/docs/classes/UnexpectedError.html
@@ -23,7 +23,7 @@
- UnexpectedError
-- Defined in packages/xrpl/src/errors.ts:71
+- Defined in packages/xrpl/src/errors.ts:71
@@ -35,11 +35,11 @@
Properties
-data
+
@@ -71,7 +71,7 @@
Returns UnexpectedError
Inherited from XrplError.constructor
-- Defined in packages/xrpl/src/errors.ts:21
+- Defined in packages/xrpl/src/errors.ts:21
Properties
@@ -79,19 +79,19 @@
data?: unknown
-- Defined in packages/xrpl/src/errors.ts:13
+- Defined in packages/xrpl/src/errors.ts:13
Readonly message
message: string
Inherited from XrplError.message
-- Defined in packages/xrpl/src/errors.ts:12
+- Defined in packages/xrpl/src/errors.ts:12
Readonly name
name: string
-- Defined in packages/xrpl/src/errors.ts:11
+- Defined in packages/xrpl/src/errors.ts:11
Optional stack
stack?: string
@@ -145,7 +145,7 @@ us to customize its output:
Returns string
Inherited from XrplError.inspect
-- Defined in packages/xrpl/src/errors.ts:54
+- Defined in packages/xrpl/src/errors.ts:54
to String
@@ -158,7 +158,7 @@ us to customize its output:
Returns string
Inherited from XrplError.toString
-- Defined in packages/xrpl/src/errors.ts:38
+- Defined in packages/xrpl/src/errors.ts:38
Static capture Stack Trace
@@ -204,11 +204,11 @@ us to customize its output:
- Unexpected
Error
- constructor
-- data
+- data?
- message
- name
-- stack
-- prepare
Stack Trace
+- stack?
+- prepare
Stack Trace?
- stack
Trace Limit
- inspect
- to
String
diff --git a/docs/classes/ValidationError.html b/docs/classes/ValidationError.html
index 8b13f52c..387619b0 100644
--- a/docs/classes/ValidationError.html
+++ b/docs/classes/ValidationError.html
@@ -23,7 +23,7 @@
- ValidationError
-- Defined in packages/xrpl/src/errors.ts:120
+- Defined in packages/xrpl/src/errors.ts:120
@@ -35,11 +35,11 @@
Properties
-data
+
@@ -71,7 +71,7 @@
Returns ValidationError
Inherited from XrplError.constructor
-- Defined in packages/xrpl/src/errors.ts:21
+- Defined in packages/xrpl/src/errors.ts:21
Properties
@@ -79,19 +79,19 @@
data?: unknown
-- Defined in packages/xrpl/src/errors.ts:13
+- Defined in packages/xrpl/src/errors.ts:13
Readonly message
message: string
Inherited from XrplError.message
-- Defined in packages/xrpl/src/errors.ts:12
+- Defined in packages/xrpl/src/errors.ts:12
Readonly name
name: string
-- Defined in packages/xrpl/src/errors.ts:11
+- Defined in packages/xrpl/src/errors.ts:11
Optional stack
stack?: string
@@ -145,7 +145,7 @@ us to customize its output:
Returns string
Inherited from XrplError.inspect
-- Defined in packages/xrpl/src/errors.ts:54
+- Defined in packages/xrpl/src/errors.ts:54
to String
@@ -158,7 +158,7 @@ us to customize its output:
Returns string
Inherited from XrplError.toString
-- Defined in packages/xrpl/src/errors.ts:38
+- Defined in packages/xrpl/src/errors.ts:38
Static capture Stack Trace
@@ -204,11 +204,11 @@ us to customize its output:
- Validation
Error
- constructor
-- data
+- data?
- message
- name
-- stack
-- prepare
Stack Trace
+- stack?
+- prepare
Stack Trace?
- stack
Trace Limit
- inspect
- to
String
diff --git a/docs/classes/Wallet.html b/docs/classes/Wallet.html
index 07ef5f52..2dc76f8c 100644
--- a/docs/classes/Wallet.html
+++ b/docs/classes/Wallet.html
@@ -18,7 +18,7 @@
A wallet can be derived from either a seed, mnemonic, or entropy (array of random numbers).
It provides functionality to sign/verify transactions offline.
-Example
// Derive a wallet from a bip39 Mnemonic
const wallet = Wallet.fromMnemonic(
'jewel insect retreat jump claim horse second chef west gossip bone frown exotic embark laundry'
)
console.log(wallet)
// Wallet {
// publicKey: '02348F89E9A6A3615BA317F8474A3F51D66221562D3CA32BFA8D21348FF67012B2',
// privateKey: '00A8F2E77FC0E05890C1B5088AFE0ECF9D96466A4419B897B1AB383E336E1735A2',
// classicAddress: 'rwZiksrExmVkR64pf87Jor4cYbmff47SUm',
// seed: undefined
// }.
// Derive a wallet from a base58 encoded seed.
const seedWallet = Wallet.fromSeed('ssZkdwURFMBXenJPbrpE14b6noJSu')
console.log(seedWallet)
// Wallet {
// publicKey: '02FE9932A9C4AA2AC9F0ED0F2B89302DE7C2C95F91D782DA3CF06E64E1C1216449',
// privateKey: '00445D0A16DD05EFAF6D5AF45E6B8A6DE4170D93C0627021A0B8E705786CBCCFF7',
// classicAddress: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo',
// seed: 'ssZkdwURFMBXenJPbrpE14b6noJSu'
// }.
// Sign a JSON Transaction
const signed = seedWallet.signTransaction({
TransactionType: 'Payment',
Account: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo'
...........
}).
console.log(signed)
// '1200007321......B01BE1DFF3'.
console.log(decode(signed))
// {
// TransactionType: 'Payment',
// SigningPubKey: '02FE9932A9C4AA2AC9F0ED0F2B89302DE7C2C95F91D782DA3CF06E64E1C1216449',
// TxnSignature: '3045022100AAD......5B631ABD21171B61B07D304',
// Account: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo'
// ...........
// }
+Example
// Derive a wallet from a bip39 Mnemonic
const wallet = Wallet.fromMnemonic(
'jewel insect retreat jump claim horse second chef west gossip bone frown exotic embark laundry'
)
console.log(wallet)
// Wallet {
// publicKey: '02348F89E9A6A3615BA317F8474A3F51D66221562D3CA32BFA8D21348FF67012B2',
// privateKey: '00A8F2E77FC0E05890C1B5088AFE0ECF9D96466A4419B897B1AB383E336E1735A2',
// classicAddress: 'rwZiksrExmVkR64pf87Jor4cYbmff47SUm',
// seed: undefined
// }.
// Derive a wallet from a base58 encoded seed.
const seedWallet = Wallet.fromSeed('ssZkdwURFMBXenJPbrpE14b6noJSu')
console.log(seedWallet)
// Wallet {
// publicKey: '02FE9932A9C4AA2AC9F0ED0F2B89302DE7C2C95F91D782DA3CF06E64E1C1216449',
// privateKey: '00445D0A16DD05EFAF6D5AF45E6B8A6DE4170D93C0627021A0B8E705786CBCCFF7',
// classicAddress: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo',
// seed: 'ssZkdwURFMBXenJPbrpE14b6noJSu'
// }.
// Sign a JSON Transaction
const signed = seedWallet.signTransaction({
TransactionType: 'Payment',
Account: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo'
...........
}).
console.log(signed)
// '1200007321......B01BE1DFF3'.
console.log(decode(signed))
// {
// TransactionType: 'Payment',
// SigningPubKey: '02FE9932A9C4AA2AC9F0ED0F2B89302DE7C2C95F91D782DA3CF06E64E1C1216449',
// TxnSignature: '3045022100AAD......5B631ABD21171B61B07D304',
// Account: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo'
// ...........
// }
@@ -26,7 +26,7 @@ It provides functionality to sign/verify transactions offline.
- Wallet
-- Defined in packages/xrpl/src/Wallet/index.ts:94
+- Defined in packages/xrpl/src/Wallet/index.ts:94
@@ -41,7 +41,7 @@ It provides functionality to sign/verify transactions offline.
@@ -66,7 +66,7 @@ It provides functionality to sign/verify transactions offline.
constructor
-- new
Wallet(publicKey: string, privateKey: string, opts?: { masterAddress?: string; seed?: string }): Wallet
+- new
Wallet(publicKey: string, privateKey: string, opts?: {
masterAddress?: string;
seed?: string;
}): Wallet
-
Creates a new Wallet.
@@ -82,7 +82,7 @@ It provides functionality to sign/verify transactions offline.
The private key used for signing transactions for the account.
-
-
opts: { masterAddress?: string; seed?: string } = {}
+opts: {
masterAddress?: string;
seed?: string;
} = {}
(Optional) Options to initialize a Wallet.
@@ -96,38 +96,38 @@ It provides functionality to sign/verify transactions offline.
Returns Wallet
-- Defined in packages/xrpl/src/Wallet/index.ts:118
+- Defined in packages/xrpl/src/Wallet/index.ts:118
Properties
Readonly classic Address
classic Address: string
-- Defined in packages/xrpl/src/Wallet/index.ts:97
+- Defined in packages/xrpl/src/Wallet/index.ts:97
Readonly private Key
private Key: string
-- Defined in packages/xrpl/src/Wallet/index.ts:96
+- Defined in packages/xrpl/src/Wallet/index.ts:96
Readonly public Key
public Key: string
-- Defined in packages/xrpl/src/Wallet/index.ts:95
+- Defined in packages/xrpl/src/Wallet/index.ts:95
Optional Readonly seed
seed?: string
-- Defined in packages/xrpl/src/Wallet/index.ts:98
+- Defined in packages/xrpl/src/Wallet/index.ts:98
Static from Secret
-from Secret: ((seed: string, opts?: { algorithm?: ECDSA; masterAddress?: string }) => Wallet) = Wallet.fromSeed
+from Secret: ((seed: string, opts?: {
algorithm?: ECDSA;
masterAddress?: string;
}) => Wallet) = Wallet.fromSeed
Type declaration
-
-- (seed: string, opts?: { algorithm?: ECDSA; masterAddress?: string }): Wallet
+- (seed: string, opts?: {
algorithm?: ECDSA;
masterAddress?: string;
}): Wallet
-
Derives a wallet from a seed.
@@ -141,7 +141,7 @@ It provides functionality to sign/verify transactions offline.
A string used to generate a keypair (publicKey/privateKey) to derive a wallet.
-
-
opts: { algorithm?: ECDSA; masterAddress?: string } = {}
+opts: {
algorithm?: ECDSA;
masterAddress?: string;
} = {}
(Optional) Options to derive a Wallet.
@@ -155,7 +155,7 @@ It provides functionality to sign/verify transactions offline.
Returns Wallet
-- Defined in packages/xrpl/src/Wallet/index.ts:174
+ - Defined in packages/xrpl/src/Wallet/index.ts:174
Accessors
@@ -169,7 +169,7 @@ It provides functionality to sign/verify transactions offline.
Returns string
-- Defined in packages/xrpl/src/Wallet/index.ts:105
+- Defined in packages/xrpl/src/Wallet/index.ts:105
Methods
@@ -199,7 +199,7 @@ the serialized Transaction desn't match the original transaction.
Returns void
-- Defined in packages/xrpl/src/Wallet/index.ts:408
+- Defined in packages/xrpl/src/Wallet/index.ts:408
getXAddress
@@ -222,11 +222,11 @@ the serialized Transaction desn't match the original transaction.
Returns string
-- Defined in packages/xrpl/src/Wallet/index.ts:392
+- Defined in packages/xrpl/src/Wallet/index.ts:392
sign
-- sign(this: Wallet, transaction: Transaction, multisign?: string | boolean): { hash: string; tx_blob: string }
+- sign(this: Wallet, transaction: Transaction, multisign?: string | boolean): {
hash: string;
tx_blob: string;
}
-
Signs a transaction offline.
@@ -251,14 +251,14 @@ the serialized Transaction desn't match the original transaction.
Optional multisign: string | boolean
Specify true/false to use multisign or actual address (classic/x-address) to make multisign tx request.
-Returns { hash: string; tx_blob: string }
+Returns {
hash: string;
tx_blob: string;
}
-
hash: string
-
tx_ blob: string
-- Defined in packages/xrpl/src/Wallet/index.ts:317
+- Defined in packages/xrpl/src/Wallet/index.ts:317
verify Transaction
@@ -277,11 +277,11 @@ the serialized Transaction desn't match the original transaction.
Static Private deriveDerive a Wallet from a seed.
@@ -295,7 +295,7 @@ the serialized Transaction desn't match the original transaction.The seed used to derive the wallet.
(Optional) Options to derive a Wallet.
Static fromDerives a wallet from an entropy (array of random numbers).
@@ -327,7 +327,7 @@ the serialized Transaction desn't match the original transaction.An array of random numbers to generate a seed used to derive a wallet.
(Optional) Options to derive a Wallet.
Static fromDerives a wallet from a bip39 or RFC1751 mnemonic (Defaults to bip39).
@@ -361,7 +361,7 @@ the serialized Transaction desn't match the original transaction.A string consisting of words (whitespace delimited) used to derive a wallet.
(Optional) Options to derive a Wallet.
Static Private fromRFC1751Derives a wallet from a RFC1751 mnemonic, which is how wallet_propose encodes mnemonics.
A string consisting of words (whitespace delimited) used to derive a wallet.
(Optional) Options to derive a Wallet.
Static fromDerives a wallet from a seed.
@@ -436,7 +436,7 @@ the serialized Transaction desn't match the original transaction.A string used to generate a keypair (publicKey/privateKey) to derive a wallet.
(Optional) Options to derive a Wallet.
Static generateStatic captureEnum for AccountSet Flags.
Allow another account to mint and burn tokens on behalf of this account.
Enable rippling on this account's trust lines by default.
Enable Deposit Authorization on this account.
XRP should not be sent to this account.
Freeze all assets issued by this account.
Require a destination tag to send transactions to this account.
Derive an X-Address from a public key and a destination tag.
@@ -25,7 +25,7 @@Public key and destination tag to encode as an X-Address.
Optional api_Inherited from BaseRequest.api_version
Overrides BaseRequest.command
Optional destination_Optional idInherited from BaseRequest.id
Optional ledger_20-byte hex string for the ledger version to use.
Optional ledger_Optional limitOptional markerGenerated using TypeDoc
Get XRP/non-XRP balances for an account.
@@ -156,7 +156,7 @@ using xrpl-clientAddress of the account to retrieve balances for.
options: { ledger_hash?: string; ledger_index?: LedgerIndex; limit?: number; peer?: string } = {}
+options: {
ledger_hash?: string;
ledger_index?: LedgerIndex;
limit?: number;
peer?: string;
} = {}
Allows the client to specify a ledger_hash, ledger_index, filter by peer, and/or limit number of balances.
Optionalpeer?: stringFilter balances by peer.