mirror of
https://github.com/Xahau/xahau.js.git
synced 2026-04-29 15:37:50 +00:00
* fix: use .mts extension to emit ES Modules * add comments and Apppliction type * update docs
115 lines
70 KiB
HTML
115 lines
70 KiB
HTML
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><script src="https://cmp.osano.com/AzyjT6TIZMlgyLyy8/ad2447d5-f101-40df-b92e-d6452b5ecac0/osano.js"></script><script>
|
||
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||
})(window,document,'script','dataLayer','GTM-M7HKJJ3');
|
||
</script><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Wallet | xrpl</title><meta name="description" content="Documentation for xrpl"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M7HKJJ3" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">xrpl</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">xrpl</a></li><li><a href="Wallet.html">Wallet</a></li></ul><h1>Class Wallet</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>A utility for deriving a wallet composed of a keypair (publicKey/privateKey).
|
||
A wallet can be derived from either a seed, mnemonic, or entropy (array of random numbers).
|
||
It provides functionality to sign/verify transactions offline.</p>
|
||
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><br/><span class="hl-9">// Derive a wallet from a base58 encoded seed.</span><br/><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-3">seedWallet</span><span class="hl-1"> = </span><span class="hl-0">Wallet</span><span class="hl-1">.</span><span class="hl-4">fromSeed</span><span class="hl-1">(</span><span class="hl-5">'ssZkdwURFMBXenJPbrpE14b6noJSu'</span><span class="hl-1">)</span><br/><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-4">log</span><span class="hl-1">(</span><span class="hl-0">seedWallet</span><span class="hl-1">)</span><br/><span class="hl-9">// Wallet {</span><br/><span class="hl-9">// publicKey: '02FE9932A9C4AA2AC9F0ED0F2B89302DE7C2C95F91D782DA3CF06E64E1C1216449',</span><br/><span class="hl-9">// privateKey: '00445D0A16DD05EFAF6D5AF45E6B8A6DE4170D93C0627021A0B8E705786CBCCFF7',</span><br/><span class="hl-9">// classicAddress: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo',</span><br/><span class="hl-9">// seed: 'ssZkdwURFMBXenJPbrpE14b6noJSu'</span><br/><span class="hl-9">// }.</span><br/><br/><span class="hl-9">// Sign a JSON Transaction</span><br/><span class="hl-1"> </span><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-3">signed</span><span class="hl-1"> = </span><span class="hl-0">seedWallet</span><span class="hl-1">.</span><span class="hl-4">signTransaction</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-0">TransactionType:</span><span class="hl-1"> </span><span class="hl-5">'Payment'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">Account:</span><span class="hl-1"> </span><span class="hl-5">'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo'</span><br/><span class="hl-1"> ...........</span><br/><span class="hl-1">}).</span><br/><br/><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-4">log</span><span class="hl-1">(</span><span class="hl-0">signed</span><span class="hl-1">)</span><br/><span class="hl-9">// '1200007321......B01BE1DFF3'.</span><br/><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-4">log</span><span class="hl-1">(</span><span class="hl-4">decode</span><span class="hl-1">(</span><span class="hl-0">signed</span><span class="hl-1">))</span><br/><span class="hl-9">// {</span><br/><span class="hl-9">// TransactionType: 'Payment',</span><br/><span class="hl-9">// SigningPubKey: '02FE9932A9C4AA2AC9F0ED0F2B89302DE7C2C95F91D782DA3CF06E64E1C1216449',</span><br/><span class="hl-9">// TxnSignature: '3045022100AAD......5B631ABD21171B61B07D304',</span><br/><span class="hl-9">// Account: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo'</span><br/><span class="hl-9">// ...........</span><br/><span class="hl-9">// }</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div></div></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L91">packages/xrpl/src/Wallet/index.ts:91</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="Wallet.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
|
||
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="Wallet.html#classicaddress" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>classic<wbr/>Address</span></a>
|
||
<a href="Wallet.html#privatekey" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>private<wbr/>Key</span></a>
|
||
<a href="Wallet.html#publickey" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>public<wbr/>Key</span></a>
|
||
<a href="Wallet.html#seed" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>seed?</span></a>
|
||
<a href="Wallet.html#fromsecret" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>from<wbr/>Secret</span></a>
|
||
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="Wallet.html#address" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Accessor"><use href="../assets/icons.svg#icon-262144"></use></svg><span>address</span></a>
|
||
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="Wallet.html#getxaddress" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>getXAddress</span></a>
|
||
<a href="Wallet.html#sign" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sign</span></a>
|
||
<a href="Wallet.html#verifytransaction" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>verify<wbr/>Transaction</span></a>
|
||
<a href="Wallet.html#fromentropy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>from<wbr/>Entropy</span></a>
|
||
<a href="Wallet.html#frommnemonic" class="tsd-index-link deprecated"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>from<wbr/>Mnemonic</span></a>
|
||
<a href="Wallet.html#fromseed" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>from<wbr/>Seed</span></a>
|
||
<a href="Wallet.html#generate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>generate</span></a>
|
||
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorwallet" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">Wallet</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">publicKey</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">privateKey</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">opts</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">seed</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a><a href="#constructorwallet" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new Wallet.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">publicKey</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The public key for the account.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">privateKey</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The private key used for signing transactions for the account.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">opts</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">seed</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></span><div class="tsd-comment tsd-typography"><p>(Optional) Options to initialize a Wallet.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Include if a Wallet uses a Regular Key Pair. It must be the master address of the account.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">seed</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>The seed used to derive the account keys.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L106">packages/xrpl/src/Wallet/index.ts:106</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="classicaddress" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>classic<wbr/>Address</span><a href="#classicaddress" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">classicAddress</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L94">packages/xrpl/src/Wallet/index.ts:94</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="privatekey" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>private<wbr/>Key</span><a href="#privatekey" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">privateKey</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L93">packages/xrpl/src/Wallet/index.ts:93</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="publickey" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>public<wbr/>Key</span><a href="#publickey" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">publicKey</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L92">packages/xrpl/src/Wallet/index.ts:92</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="seed" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>seed</span><a href="#seed" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">seed</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L95">packages/xrpl/src/Wallet/index.ts:95</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="fromsecret" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>from<wbr/>Secret</span><a href="#fromsecret" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">fromSecret</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">seed</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">opts</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">algorithm</span><span class="tsd-signature-symbol">?:</span> <a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a><span class="tsd-signature-symbol"> = Wallet.fromSeed</span></div><div class="tsd-comment tsd-typography"><p>Derives a wallet from a secret (AKA a seed).</p>
|
||
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">seed</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">opts</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">algorithm</span><span class="tsd-signature-symbol">?:</span> <a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Derives a wallet from a seed.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">seed</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A string used to generate a keypair (publicKey/privateKey) to derive a wallet.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">opts</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">algorithm</span><span class="tsd-signature-symbol">?:</span> <a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></span><div class="tsd-comment tsd-typography"><p>(Optional) Options to derive a Wallet.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">algorithm</span><span class="tsd-signature-symbol">?: </span><a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a></h5><div class="tsd-comment tsd-typography"><p>The digital signature algorithm to generate an address for.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Include if a Wallet uses a Regular Key Pair. It must be the master address of the account.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a></h4><p>A Wallet derived from a seed.</p>
|
||
<div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"><div class="tsd-tag-param"><h4 class="tsd-anchor-link"><a id="param-secret" class="tsd-anchor"></a>Param: secret<a href="#param-secret" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>A string used to generate a keypair (publicKey/privateKey) to derive a wallet.</p>
|
||
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link"><a id="param-opts" class="tsd-anchor"></a>Param: opts<a href="#param-opts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>(Optional) Options to derive a Wallet.</p>
|
||
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link"><a id="param-optsalgorithm" class="tsd-anchor"></a>Param: opts.algorithm<a href="#param-optsalgorithm" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>The digital signature algorithm to generate an address for.</p>
|
||
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link"><a id="param-optsmasteraddress" class="tsd-anchor"></a>Param: opts.masterAddress<a href="#param-optsmasteraddress" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Include if a Wallet uses a Regular Key Pair. It must be the master address of the account.</p>
|
||
</div><div class="tsd-tag-returns"><h4 class="tsd-anchor-link"><a id="returns" class="tsd-anchor"></a>Returns<a href="#returns" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>A Wallet derived from a secret (AKA a seed).</p>
|
||
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L184">packages/xrpl/src/Wallet/index.ts:184</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Accessors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Accessors</h2></summary><section><section class="tsd-panel tsd-member"><a id="address" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>address</span><a href="#address" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature" id="address-1"><span class="tsd-signature-keyword">get</span> <span class="tsd-kind-get-signature">address</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Alias for wallet.classicAddress.</p>
|
||
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>The wallet's classic address.</p>
|
||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L127">packages/xrpl/src/Wallet/index.ts:127</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="getxaddress" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>getXAddress</span><a href="#getxaddress" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="getxaddress-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">getXAddress</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">tag</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">false</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">isTestnet</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#getxaddress-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets an X-address in Testnet/Mainnet format.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">tag</span>: <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">false</span><span class="tsd-signature-symbol"> = false</span></span><div class="tsd-comment tsd-typography"><p>A tag to be included within the X-address.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">isTestnet</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></span><div class="tsd-comment tsd-typography"><p>A boolean to indicate if X-address should be in Testnet (true) or Mainnet (false) format.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>An X-address.</p>
|
||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L458">packages/xrpl/src/Wallet/index.ts:458</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="sign" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>sign</span><a href="#sign" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="sign-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">sign</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">this</span><span class="tsd-signature-symbol">:</span> <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">transaction</span><span class="tsd-signature-symbol">:</span> <a href="../types/Transaction.html" class="tsd-signature-type tsd-kind-type-alias">Transaction</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">multisign</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">hash</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">tx_blob</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><a href="#sign-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Signs a transaction offline.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">this</span>: <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a></span><div class="tsd-comment tsd-typography"><p>Wallet instance.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">transaction</span>: <a href="../types/Transaction.html" class="tsd-signature-type tsd-kind-type-alias">Transaction</a></span><div class="tsd-comment tsd-typography"><p>A transaction to be signed offline.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">multisign</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Specify true/false to use multisign or actual address (classic/x-address) to make multisign tx request.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">hash</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">tx_blob</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></h4><p>A signed transaction.</p>
|
||
<div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example-1" class="tsd-anchor"></a>Example<a href="#example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">const</span><span class="hl-1"> { </span><span class="hl-3">Client</span><span class="hl-1">, </span><span class="hl-3">Wallet</span><span class="hl-1"> } = </span><span class="hl-4">require</span><span class="hl-1">(</span><span class="hl-5">'xrpl'</span><span class="hl-1">)</span><br/><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-3">client</span><span class="hl-1"> = </span><span class="hl-2">new</span><span class="hl-1"> </span><span class="hl-4">Client</span><span class="hl-1">(</span><span class="hl-5">'wss://s.altnet.rippletest.net:51233'</span><span class="hl-1">)</span><br/><br/><span class="hl-2">async</span><span class="hl-1"> </span><span class="hl-2">function</span><span class="hl-1"> </span><span class="hl-4">signTransaction</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-0">client</span><span class="hl-1">.</span><span class="hl-4">connect</span><span class="hl-1">()</span><br/><span class="hl-1"> </span><span class="hl-2">const</span><span class="hl-1"> { </span><span class="hl-0">balance</span><span class="hl-1">: </span><span class="hl-3">balance1</span><span class="hl-1">, </span><span class="hl-0">wallet</span><span class="hl-1">: </span><span class="hl-3">wallet1</span><span class="hl-1"> } = </span><span class="hl-0">client</span><span class="hl-1">.</span><span class="hl-4">fundWallet</span><span class="hl-1">()</span><br/><span class="hl-1"> </span><span class="hl-2">const</span><span class="hl-1"> { </span><span class="hl-0">balance</span><span class="hl-1">: </span><span class="hl-3">balance2</span><span class="hl-1">, </span><span class="hl-0">wallet</span><span class="hl-1">: </span><span class="hl-3">wallet2</span><span class="hl-1"> } = </span><span class="hl-0">client</span><span class="hl-1">.</span><span class="hl-4">fundWallet</span><span class="hl-1">()</span><br/><br/><span class="hl-1"> </span><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-3">transaction</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-0">TransactionType:</span><span class="hl-1"> </span><span class="hl-5">'Payment'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">Account:</span><span class="hl-1"> </span><span class="hl-0">wallet1</span><span class="hl-1">.</span><span class="hl-0">address</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">Destination:</span><span class="hl-1"> </span><span class="hl-0">wallet2</span><span class="hl-1">.</span><span class="hl-0">address</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">Amount:</span><span class="hl-1"> </span><span class="hl-5">'10'</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-6">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-0">client</span><span class="hl-1">.</span><span class="hl-4">autofill</span><span class="hl-1">(</span><span class="hl-0">transaction</span><span class="hl-1">)</span><br/><span class="hl-1"> </span><span class="hl-2">const</span><span class="hl-1"> { </span><span class="hl-0">tx_blob</span><span class="hl-1">: </span><span class="hl-3">signed_tx_blob</span><span class="hl-1">, </span><span class="hl-3">hash</span><span class="hl-1">} = </span><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-0">wallet1</span><span class="hl-1">.</span><span class="hl-4">sign</span><span class="hl-1">(</span><span class="hl-0">transaction</span><span class="hl-1">)</span><br/><span class="hl-1"> </span><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-4">log</span><span class="hl-1">(</span><span class="hl-0">signed_tx_blob</span><span class="hl-1">)</span><br/><span class="hl-1"> } </span><span class="hl-6">catch</span><span class="hl-1"> (</span><span class="hl-0">error</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-4">error</span><span class="hl-1">(</span><span class="hl-5">`Failed to sign transaction: </span><span class="hl-2">${</span><span class="hl-0">error</span><span class="hl-2">}</span><span class="hl-5">`</span><span class="hl-1">)</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> </span><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-3">result</span><span class="hl-1"> = </span><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-0">client</span><span class="hl-1">.</span><span class="hl-4">submit</span><span class="hl-1">(</span><span class="hl-0">signed_tx_blob</span><span class="hl-1">)</span><br/><span class="hl-1"> </span><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-0">client</span><span class="hl-1">.</span><span class="hl-4">disconnect</span><span class="hl-1">()</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-4">signTransaction</span><span class="hl-1">()</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
<p>In order for a transaction to be validated, it must be signed by the account sending the transaction to prove
|
||
That the owner is actually the one deciding to take that action.</p>
|
||
<p>In this example, we created, signed, and then submitted a transaction to testnet. You may notice that the
|
||
Output of <code>sign</code> includes a <code>tx_blob</code> and a <code>hash</code>, both of which are needed to submit & verify the results.
|
||
Note: If you pass a <code>Wallet</code> to <code>client.submit</code> or <code>client.submitAndWait</code> it will do signing like this under the hood.</p>
|
||
<p><code>tx_blob</code> is a binary representation of a transaction on the XRP Ledger. It's essentially a byte array
|
||
that encodes all of the data necessary to execute the transaction, including the source address, the destination
|
||
address, the amount, and any additional fields required for the specific transaction type.</p>
|
||
<p><code>hash</code> is a unique identifier that's generated from the signed transaction data on the XRP Ledger. It's essentially
|
||
A cryptographic digest of the signed transaction blob, created using a hash function. The signed transaction hash is
|
||
Useful for identifying and tracking specific transactions on the XRP Ledger. It can be used to query transaction
|
||
Information, verify the authenticity of a transaction, and detect any tampering with the transaction data.</p>
|
||
</div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>ValidationError if the transaction is already signed or does not encode/decode to same result.</p>
|
||
</div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws-1" class="tsd-anchor"></a>Throws<a href="#throws-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>XrplError if the issued currency being signed is XRP ignoring case.</p>
|
||
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L375">packages/xrpl/src/Wallet/index.ts:375</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="verifytransaction" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>verify<wbr/>Transaction</span><a href="#verifytransaction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="verifytransaction-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">verifyTransaction</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signedTransaction</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <a href="../types/Transaction.html" class="tsd-signature-type tsd-kind-type-alias">Transaction</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#verifytransaction-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Verifies a signed transaction offline.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signedTransaction</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <a href="../types/Transaction.html" class="tsd-signature-type tsd-kind-type-alias">Transaction</a></span><div class="tsd-comment tsd-typography"><p>A signed transaction (hex string of signTransaction result) to be verified offline.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>Returns true if a signedTransaction is valid.</p>
|
||
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws-2" class="tsd-anchor"></a>Throws<a href="#throws-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Transaction is missing a signature, TxnSignature</p>
|
||
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L447">packages/xrpl/src/Wallet/index.ts:447</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="fromentropy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>from<wbr/>Entropy</span><a href="#fromentropy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="fromentropy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">fromEntropy</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">entropy</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">opts</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">algorithm</span><span class="tsd-signature-symbol">?:</span> <a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a><a href="#fromentropy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Derives a wallet from an entropy (array of random numbers).</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">entropy</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Uint8Array</span></span><div class="tsd-comment tsd-typography"><p>An array of random numbers to generate a seed used to derive a wallet.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">opts</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">algorithm</span><span class="tsd-signature-symbol">?:</span> <a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></span><div class="tsd-comment tsd-typography"><p>(Optional) Options to derive a Wallet.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">algorithm</span><span class="tsd-signature-symbol">?: </span><a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a></h5><div class="tsd-comment tsd-typography"><p>The digital signature algorithm to generate an address for.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Include if a Wallet uses a Regular Key Pair. It must be the master address of the account.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a></h4><p>A Wallet derived from an entropy.</p>
|
||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L195">packages/xrpl/src/Wallet/index.ts:195</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="frommnemonic" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span class="deprecated">from<wbr/>Mnemonic</span><a href="#frommnemonic" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="frommnemonic-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">fromMnemonic</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">mnemonic</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">opts</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">algorithm</span><span class="tsd-signature-symbol">?:</span> <a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">derivationPath</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">mnemonicEncoding</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">"bip39"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"rfc1751"</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a><a href="#frommnemonic-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Derives a wallet from a bip39 or RFC1751 mnemonic (Defaults to bip39).</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">mnemonic</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A string consisting of words (whitespace delimited) used to derive a wallet.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">opts</span>: <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">algorithm</span><span class="tsd-signature-symbol">?:</span> <a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">derivationPath</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">mnemonicEncoding</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">"bip39"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"rfc1751"</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></span><div class="tsd-comment tsd-typography"><p>(Optional) Options to derive a Wallet.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">algorithm</span><span class="tsd-signature-symbol">?: </span><a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a></h5><div class="tsd-comment tsd-typography"><p>Only used if opts.mnemonicEncoding is 'rfc1751'. Allows the mnemonic to generate its
|
||
secp256k1 seed, or its ed25519 seed. By default, it will generate the secp256k1 seed
|
||
to match the rippled <code>wallet_propose</code> default algorithm.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">derivationPath</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>The path to derive a keypair (publicKey/privateKey). Only used for bip39 conversions.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Include if a Wallet uses a Regular Key Pair. It must be the master address of the account.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">mnemonicEncoding</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">"bip39"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"rfc1751"</span></h5><div class="tsd-comment tsd-typography"><p>If set to 'rfc1751', this interprets the mnemonic as a rippled RFC1751 mnemonic like
|
||
<code>wallet_propose</code> generates in rippled. Otherwise the function defaults to bip39 decoding.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a></h4><p>A Wallet derived from a mnemonic.</p>
|
||
<div class="tsd-comment tsd-typography"><div class="tsd-tag-deprecated"><h4 class="tsd-anchor-link"><a id="deprecated" class="tsd-anchor"></a>Deprecated<a href="#deprecated" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>since version 2.6.1.
|
||
Will be deleted in version 3.0.0.
|
||
This representation is currently deprecated in rippled.
|
||
You should use another method to represent your keys such as a seed or public/private keypair.</p>
|
||
</div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws-3" class="tsd-anchor"></a>Throws<a href="#throws-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>ValidationError if unable to derive private key from mnemonic input.</p>
|
||
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L231">packages/xrpl/src/Wallet/index.ts:231</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="fromseed" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>from<wbr/>Seed</span><a href="#fromseed" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="fromseed-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">fromSeed</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">seed</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">opts</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">algorithm</span><span class="tsd-signature-symbol">?:</span> <a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a><a href="#fromseed-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Derives a wallet from a seed.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">seed</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A string used to generate a keypair (publicKey/privateKey) to derive a wallet.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">opts</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">algorithm</span><span class="tsd-signature-symbol">?:</span> <a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></span><div class="tsd-comment tsd-typography"><p>(Optional) Options to derive a Wallet.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">algorithm</span><span class="tsd-signature-symbol">?: </span><a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a></h5><div class="tsd-comment tsd-typography"><p>The digital signature algorithm to generate an address for.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">masterAddress</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Include if a Wallet uses a Regular Key Pair. It must be the master address of the account.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a></h4><p>A Wallet derived from a seed.</p>
|
||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L164">packages/xrpl/src/Wallet/index.ts:164</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="generate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>generate</span><a href="#generate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="generate-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">generate</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">algorithm</span><span class="tsd-signature-symbol">?:</span> <a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a><a href="#generate-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p><code>generate()</code> creates a new random Wallet. In order to make this a valid account on ledger, you must
|
||
Send XRP to it. On test networks that can be done with "faucets" which send XRP to any account which asks
|
||
For it. You can call <code>client.fundWallet()</code> in order to generate credentials and fund the account on test networks.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">algorithm</span>: <a href="../enums/ECDSA.html" class="tsd-signature-type tsd-kind-enum">ECDSA</a><span class="tsd-signature-symbol"> = DEFAULT_ALGORITHM</span></span><div class="tsd-comment tsd-typography"><p>The digital signature algorithm to generate an address for.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="Wallet.html" class="tsd-signature-type tsd-kind-class">Wallet</a></h4><p>A new Wallet derived from a generated seed.</p>
|
||
<div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example-2" class="tsd-anchor"></a>Example<a href="#example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">const</span><span class="hl-1"> { </span><span class="hl-3">Wallet</span><span class="hl-1"> } = </span><span class="hl-4">require</span><span class="hl-1">(</span><span class="hl-5">'xrpl'</span><span class="hl-1">)</span><br/><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-3">wallet</span><span class="hl-1"> = </span><span class="hl-0">Wallet</span><span class="hl-1">.</span><span class="hl-4">generate</span><span class="hl-1">()</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws-4" class="tsd-anchor"></a>Throws<a href="#throws-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>ValidationError when signing algorithm isn't valid</p>
|
||
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/9d74cf958dce4f0004d702b706d1d198974ee150/packages/xrpl/src/Wallet/index.ts#L147">packages/xrpl/src/Wallet/index.ts:147</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#classicaddress" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>classic<wbr/>Address</span></a><a href="#privatekey" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>private<wbr/>Key</span></a><a href="#publickey" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>public<wbr/>Key</span></a><a href="#seed" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>seed</span></a><a href="#fromsecret" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>from<wbr/>Secret</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Accessors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Accessors</summary><div><a href="#address" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Accessor"><use href="../assets/icons.svg#icon-262144"></use></svg><span>address</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#getxaddress" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>getXAddress</span></a><a href="#sign" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sign</span></a><a href="#verifytransaction" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>verify<wbr/>Transaction</span></a><a href="#fromentropy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>from<wbr/>Entropy</span></a><a href="#frommnemonic" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>from<wbr/>Mnemonic</span></a><a href="#fromseed" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>from<wbr/>Seed</span></a><a href="#generate" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>generate</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">xrpl</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|