1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Transaction | @project-serum/anchor - v0.22.0</title><meta name="description" content="Documentation for @project-serum/anchor - v0.22.0"/><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 async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></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">@project-serum/anchor - v0.22.0</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@project-serum/anchor - v0.22.0</a></li><li><a href="../modules/web3.html">web3</a></li><li><a href="web3.Transaction.html">Transaction</a></li></ul><h1>Class Transaction</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Transaction class</p>
- </div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Transaction</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section tsd-is-external"><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section tsd-is-external"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#feePayer" class="tsd-kind-icon">fee<wbr/>Payer</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#instructions" class="tsd-kind-icon">instructions</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#nonceInfo" class="tsd-kind-icon">nonce<wbr/>Info</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#recentBlockhash" class="tsd-kind-icon">recent<wbr/>Blockhash</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#signatures" class="tsd-kind-icon">signatures</a></li></ul></section><section class="tsd-index-section tsd-is-external"><h3>Accessors</h3><ul class="tsd-index-list"><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#signature" class="tsd-kind-icon">signature</a></li></ul></section><section class="tsd-index-section tsd-is-external"><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#add" class="tsd-kind-icon">add</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#addSignature" class="tsd-kind-icon">add<wbr/>Signature</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#compileMessage" class="tsd-kind-icon">compile<wbr/>Message</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#partialSign" class="tsd-kind-icon">partial<wbr/>Sign</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#serialize" class="tsd-kind-icon">serialize</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#serializeMessage" class="tsd-kind-icon">serialize<wbr/>Message</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#setSigners" class="tsd-kind-icon">set<wbr/>Signers</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#sign" class="tsd-kind-icon">sign</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#verifySignatures" class="tsd-kind-icon">verify<wbr/>Signatures</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="web3.Transaction.html#from" class="tsd-kind-icon">from</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="web3.Transaction.html#populate" class="tsd-kind-icon">populate</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group tsd-is-external"><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-external"><a id="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-external"><li class="tsd-signature tsd-kind-icon">new <wbr/>Transaction<span class="tsd-signature-symbol">(</span>opts<span class="tsd-signature-symbol">?: </span><a href="../modules/web3.html#TransactionCtorFields" class="tsd-signature-type" data-tsd-kind="Type alias">TransactionCtorFields</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="web3.Transaction.html" class="tsd-signature-type" data-tsd-kind="Class">Transaction</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:396</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Construct an empty Transaction</p>
- </div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> opts: <a href="../modules/web3.html#TransactionCtorFields" class="tsd-signature-type" data-tsd-kind="Type alias">TransactionCtorFields</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="web3.Transaction.html" class="tsd-signature-type" data-tsd-kind="Class">Transaction</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group tsd-is-external"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"><a id="feePayer" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> fee<wbr/>Payer</h3><div class="tsd-signature tsd-kind-icon">fee<wbr/>Payer<span class="tsd-signature-symbol">?:</span> <a href="web3.PublicKey.html" class="tsd-signature-type" data-tsd-kind="Class">PublicKey</a></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:379</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>The transaction fee payer</p>
- </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"><a id="instructions" class="tsd-anchor"></a><h3>instructions</h3><div class="tsd-signature tsd-kind-icon">instructions<span class="tsd-signature-symbol">:</span> <a href="web3.TransactionInstruction.html" class="tsd-signature-type" data-tsd-kind="Class">TransactionInstruction</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:383</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>The instructions to atomically execute</p>
- </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"><a id="nonceInfo" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> nonce<wbr/>Info</h3><div class="tsd-signature tsd-kind-icon">nonce<wbr/>Info<span class="tsd-signature-symbol">?:</span> <a href="../modules/web3.html#NonceInformation" class="tsd-signature-type" data-tsd-kind="Type alias">NonceInformation</a></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:392</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Optional Nonce information. If populated, transaction will use a durable
- Nonce hash instead of a recentBlockhash. Must be populated by the caller</p>
- </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"><a id="recentBlockhash" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> recent<wbr/>Blockhash</h3><div class="tsd-signature tsd-kind-icon">recent<wbr/>Blockhash<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:387</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>A recent transaction id. Must be populated by the caller</p>
- </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"><a id="signatures" class="tsd-anchor"></a><h3>signatures</h3><div class="tsd-signature tsd-kind-icon">signatures<span class="tsd-signature-symbol">:</span> <a href="../modules/web3.html#SignaturePubkeyPair" class="tsd-signature-type" data-tsd-kind="Type alias">SignaturePubkeyPair</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:371</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Signatures for the transaction. Typically created by invoking the
- <code>sign()</code> method</p>
- </div></div></section></section><section class="tsd-panel-group tsd-member-group tsd-is-external"><h2>Accessors</h2><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-external"><a id="signature" class="tsd-anchor"></a><h3>signature</h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> signature<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Buffer</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:375</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>The first (payer) Transaction signature</p>
- </div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Buffer</span></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group tsd-is-external"><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"><a id="add" class="tsd-anchor"></a><h3>add</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"><li class="tsd-signature tsd-kind-icon">add<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>items<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><a href="web3.Transaction.html" class="tsd-signature-type" data-tsd-kind="Class">Transaction</a><span class="tsd-signature-symbol"> | </span><a href="../modules/web3.html#TransactionInstructionCtorFields" class="tsd-signature-type" data-tsd-kind="Type alias">TransactionInstructionCtorFields</a><span class="tsd-signature-symbol"> | </span><a href="web3.TransactionInstruction.html" class="tsd-signature-type" data-tsd-kind="Class">TransactionInstruction</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="web3.Transaction.html" class="tsd-signature-type" data-tsd-kind="Class">Transaction</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:400</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Add one or more instructions to this Transaction</p>
- </div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>items: <span class="tsd-signature-symbol">(</span><a href="web3.Transaction.html" class="tsd-signature-type" data-tsd-kind="Class">Transaction</a><span class="tsd-signature-symbol"> | </span><a href="../modules/web3.html#TransactionInstructionCtorFields" class="tsd-signature-type" data-tsd-kind="Type alias">TransactionInstructionCtorFields</a><span class="tsd-signature-symbol"> | </span><a href="web3.TransactionInstruction.html" class="tsd-signature-type" data-tsd-kind="Class">TransactionInstruction</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="web3.Transaction.html" class="tsd-signature-type" data-tsd-kind="Class">Transaction</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"><a id="addSignature" class="tsd-anchor"></a><h3>add<wbr/>Signature</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"><li class="tsd-signature tsd-kind-icon">add<wbr/>Signature<span class="tsd-signature-symbol">(</span>pubkey<span class="tsd-signature-symbol">: </span><a href="web3.PublicKey.html" class="tsd-signature-type" data-tsd-kind="Class">PublicKey</a>, signature<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:452</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Add an externally created signature to a transaction. The public key
- must correspond to either the fee payer or a signer account in the transaction
- instructions.</p>
- </div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>pubkey: <a href="web3.PublicKey.html" class="tsd-signature-type" data-tsd-kind="Class">PublicKey</a></h5></li><li><h5>signature: <span class="tsd-signature-type">Buffer</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"><a id="compileMessage" class="tsd-anchor"></a><h3>compile<wbr/>Message</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"><li class="tsd-signature tsd-kind-icon">compile<wbr/>Message<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="web3.Message.html" class="tsd-signature-type" data-tsd-kind="Class">Message</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:408</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Compile transaction data</p>
- </div></div><h4 class="tsd-returns-title">Returns <a href="web3.Message.html" class="tsd-signature-type" data-tsd-kind="Class">Message</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"><a id="partialSign" class="tsd-anchor"></a><h3>partial<wbr/>Sign</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"><li class="tsd-signature tsd-kind-icon">partial<wbr/>Sign<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>signers<span class="tsd-signature-symbol">: </span><a href="../interfaces/web3.Signer.html" class="tsd-signature-type" data-tsd-kind="Interface">Signer</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:446</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Partially sign a transaction with the specified accounts. All accounts must
- correspond to either the fee payer or a signer account in the transaction
- instructions.</p>
- </div><div><p>All the caveats from the <code>sign</code> method apply to <code>partialSign</code></p>
- </div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>signers: <a href="../interfaces/web3.Signer.html" class="tsd-signature-type" data-tsd-kind="Interface">Signer</a><span class="tsd-signature-symbol">[]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"><a id="serialize" class="tsd-anchor"></a><h3>serialize</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"><li class="tsd-signature tsd-kind-icon">serialize<span class="tsd-signature-symbol">(</span>config<span class="tsd-signature-symbol">?: </span><a href="../modules/web3.html#SerializeConfig" class="tsd-signature-type" data-tsd-kind="Type alias">SerializeConfig</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Buffer</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:460</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Serialize the Transaction in the wire format.</p>
- </div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> config: <a href="../modules/web3.html#SerializeConfig" class="tsd-signature-type" data-tsd-kind="Type alias">SerializeConfig</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Buffer</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"><a id="serializeMessage" class="tsd-anchor"></a><h3>serialize<wbr/>Message</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"><li class="tsd-signature tsd-kind-icon">serialize<wbr/>Message<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Buffer</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:412</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Get a buffer of the Transaction data that need to be covered by signatures</p>
- </div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Buffer</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"><a id="setSigners" class="tsd-anchor"></a><h3>set<wbr/>Signers</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"><li class="tsd-signature tsd-kind-icon">set<wbr/>Signers<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>signers<span class="tsd-signature-symbol">: </span><a href="web3.PublicKey.html" class="tsd-signature-type" data-tsd-kind="Class">PublicKey</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:423</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Specify the public keys which will be used to sign the Transaction.
- The first signer will be used as the transaction fee payer account.</p>
- </div><div><p>Signatures can be added with either <code>partialSign</code> or <code>addSignature</code></p>
- </div><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><p>Deprecated since v0.84.0. Only the fee payer needs to be
- specified and it can be set in the Transaction constructor or with the
- <code>feePayer</code> property.</p>
- </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>signers: <a href="web3.PublicKey.html" class="tsd-signature-type" data-tsd-kind="Class">PublicKey</a><span class="tsd-signature-symbol">[]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"><a id="sign" class="tsd-anchor"></a><h3>sign</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"><li class="tsd-signature tsd-kind-icon">sign<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>signers<span class="tsd-signature-symbol">: </span><a href="../interfaces/web3.Signer.html" class="tsd-signature-type" data-tsd-kind="Interface">Signer</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:438</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Sign the Transaction with the specified signers. Multiple signatures may
- be applied to a Transaction. The first signature is considered "primary"
- and is used identify and confirm transactions.</p>
- </div><div><p>If the Transaction <code>feePayer</code> is not set, the first signer will be used
- as the transaction fee payer account.</p>
- <p>Transaction fields should not be modified after the first call to <code>sign</code>,
- as doing so may invalidate the signature and cause the Transaction to be
- rejected.</p>
- <p>The Transaction must be assigned a valid <code>recentBlockhash</code> before invoking this method</p>
- </div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>signers: <a href="../interfaces/web3.Signer.html" class="tsd-signature-type" data-tsd-kind="Interface">Signer</a><span class="tsd-signature-symbol">[]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"><a id="verifySignatures" class="tsd-anchor"></a><h3>verify<wbr/>Signatures</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"><li class="tsd-signature tsd-kind-icon">verify<wbr/>Signatures<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:456</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Verify signatures of a complete, signed Transaction</p>
- </div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><a id="from" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagStatic">Static</span> from</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><li class="tsd-signature tsd-kind-icon">from<span class="tsd-signature-symbol">(</span>buffer<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><span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="web3.Transaction.html" class="tsd-signature-type" data-tsd-kind="Class">Transaction</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:464</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Parse a wire transaction into a Transaction object.</p>
- </div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>buffer: <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><span class="tsd-signature-type">Buffer</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="web3.Transaction.html" class="tsd-signature-type" data-tsd-kind="Class">Transaction</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><a id="populate" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagStatic">Static</span> populate</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><li class="tsd-signature tsd-kind-icon">populate<span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><a href="web3.Message.html" class="tsd-signature-type" data-tsd-kind="Class">Message</a>, signatures<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="web3.Transaction.html" class="tsd-signature-type" data-tsd-kind="Class">Transaction</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@solana/web3.js/lib/index.d.ts:468</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
- <p>Populate Transaction object from message and signatures</p>
- </div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>message: <a href="web3.Message.html" class="tsd-signature-type" data-tsd-kind="Class">Message</a></h5></li><li><h5>signatures: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="web3.Transaction.html" class="tsd-signature-type" data-tsd-kind="Class">Transaction</a></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class="label tsd-is-external"><span>Internals</span></li><li class=" tsd-kind-namespace"><a href="../modules/utils.html">utils</a></li><li class="label tsd-is-external"><span>Externals</span></li><li class=" tsd-kind-namespace tsd-is-external"><a href="../modules/BN.html">BN</a></li><li class="current tsd-kind-namespace tsd-is-external"><a href="../modules/web3.html">web3</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class tsd-parent-kind-namespace tsd-is-external"><a href="web3.Transaction.html" class="tsd-kind-icon">Transaction</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#feePayer" class="tsd-kind-icon">fee<wbr/>Payer</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#instructions" class="tsd-kind-icon">instructions</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#nonceInfo" class="tsd-kind-icon">nonce<wbr/>Info</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#recentBlockhash" class="tsd-kind-icon">recent<wbr/>Blockhash</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#signatures" class="tsd-kind-icon">signatures</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#signature" class="tsd-kind-icon">signature</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#add" class="tsd-kind-icon">add</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#addSignature" class="tsd-kind-icon">add<wbr/>Signature</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#compileMessage" class="tsd-kind-icon">compile<wbr/>Message</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#partialSign" class="tsd-kind-icon">partial<wbr/>Sign</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#serialize" class="tsd-kind-icon">serialize</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#serializeMessage" class="tsd-kind-icon">serialize<wbr/>Message</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#setSigners" class="tsd-kind-icon">set<wbr/>Signers</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#sign" class="tsd-kind-icon">sign</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="web3.Transaction.html#verifySignatures" class="tsd-kind-icon">verify<wbr/>Signatures</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="web3.Transaction.html#from" class="tsd-kind-icon">from</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="web3.Transaction.html#populate" class="tsd-kind-icon">populate</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|