@xandeum/web3.js 1.13.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assignCoowner.d.ts +12 -0
- package/dist/assignCoowner.js +81 -0
- package/dist/bigbang.d.ts +1 -1
- package/dist/bigbang.js +7 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/docs/html/assets/highlight.css +92 -0
- package/docs/html/assets/navigation.js +1 -0
- package/docs/html/assets/search.js +1 -0
- package/docs/html/functions/armageddon.html +6 -0
- package/docs/html/functions/bigbang.html +4 -0
- package/docs/{functions → html/functions}/copyPath.html +2 -8
- package/docs/{functions → html/functions}/createDirectory.html +2 -8
- package/docs/{functions → html/functions}/createFile.html +2 -9
- package/docs/html/functions/exists.html +8 -0
- package/docs/html/functions/getMetadata.html +10 -0
- package/docs/html/functions/getXandeumResult.html +9 -0
- package/docs/html/functions/listDirectoryEntry.html +9 -0
- package/docs/html/functions/move.html +9 -0
- package/docs/html/functions/peek.html +10 -0
- package/docs/html/functions/poke.html +10 -0
- package/docs/html/functions/removeDirectory.html +8 -0
- package/docs/html/functions/removeFile.html +8 -0
- package/docs/html/functions/renamePath.html +9 -0
- package/docs/html/functions/subscribeResult.html +17 -0
- package/docs/html/functions/unsubscribeResult.html +6 -0
- package/docs/html/hierarchy.html +1 -0
- package/docs/html/index.html +62 -0
- package/docs/html/modules.html +1 -0
- package/docs/markdown/README.md +10 -7
- package/docs/markdown/functions/armageddon.md +1 -1
- package/docs/markdown/functions/bigbang.md +1 -1
- package/docs/markdown/functions/copyPath.md +1 -1
- package/docs/markdown/functions/createDirectory.md +1 -1
- package/docs/markdown/functions/createFile.md +1 -1
- package/docs/markdown/functions/exists.md +1 -1
- package/docs/markdown/functions/getMetadata.md +1 -1
- package/docs/markdown/functions/getXandeumResult.md +38 -0
- package/docs/markdown/functions/listDirectoryEntry.md +1 -1
- package/docs/markdown/functions/move.md +55 -0
- package/docs/markdown/functions/peek.md +1 -1
- package/docs/markdown/functions/poke.md +1 -1
- package/docs/markdown/functions/removeDirectory.md +1 -1
- package/docs/markdown/functions/removeFile.md +1 -1
- package/docs/markdown/functions/renamePath.md +1 -1
- package/docs/markdown/functions/subscribeResult.md +1 -1
- package/docs/markdown/functions/unsubscribeResult.md +2 -2
- package/docs/markdown/globals.md +4 -2
- package/package.json +2 -2
- package/src/assignCoowner.ts +42 -0
- package/src/bigbang.ts +4 -2
- package/src/index.ts +1 -0
- package/typedoc.json +1 -2
- package/docs/assets/highlight.css +0 -22
- package/docs/assets/navigation.js +0 -1
- package/docs/assets/search.js +0 -1
- package/docs/functions/armageddon.html +0 -6
- package/docs/functions/bigbang.html +0 -4
- package/docs/functions/exists.html +0 -8
- package/docs/functions/getMetadata.html +0 -10
- package/docs/functions/listDirectoryEntry.html +0 -9
- package/docs/functions/peek.html +0 -18
- package/docs/functions/poke.html +0 -18
- package/docs/functions/removeDirectory.html +0 -14
- package/docs/functions/removeFile.html +0 -14
- package/docs/functions/renamePath.html +0 -15
- package/docs/functions/subscribeResult.html +0 -17
- package/docs/functions/unsubscribeResult.html +0 -6
- package/docs/hierarchy.html +0 -1
- package/docs/index.html +0 -2
- package/docs/modules.html +0 -1
- /package/docs/{.nojekyll → html/.nojekyll} +0 -0
- /package/docs/{assets → html/assets}/hierarchy.js +0 -0
- /package/docs/{assets → html/assets}/icons.js +0 -0
- /package/docs/{assets → html/assets}/icons.svg +0 -0
- /package/docs/{assets → html/assets}/main.js +0 -0
- /package/docs/{assets → html/assets}/style.css +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>getXandeumResult | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><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></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" 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></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">getXandeumResult</a></li></ul><h1>Function getXandeumResult</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getxandeumresult"><span class="tsd-kind-call-signature">getXandeumResult</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">connection</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Connection</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">signature</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-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><a href="#getxandeumresult" 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>Sends a JSON-RPC request to the Xandeum-compatible endpoint to retrieve
|
|
2
|
+
the result of a transaction previously submitted with a specific signature.</p>
|
|
3
|
+
<p>This function calls the custom RPC method <code>getXandeumResult</code>, which returns
|
|
4
|
+
the result associated with the given transaction signature.</p>
|
|
5
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connection</span>: <span class="tsd-signature-type">Connection</span></span><div class="tsd-comment tsd-typography"><p>The Solana web3 connection object pointing to a Xandeum-compatible RPC endpoint.</p>
|
|
6
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">signature</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The transaction signature string whose result should be queried.</p>
|
|
7
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><p>A <code>Promise<any></code> resolving to the parsed JSON response from the RPC server,
|
|
8
|
+
which includes the result of the transaction if available.</p>
|
|
9
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/getXandeumResult.ts#L21">getXandeumResult.ts:21</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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-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" 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>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Xandeum Web3 Library - v1.12.0</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>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>listDirectoryEntry | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><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></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" 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></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">listDirectoryEntry</a></li></ul><h1>Function listDirectoryEntry</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listdirectoryentry"><span class="tsd-kind-call-signature">listDirectoryEntry</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">connection</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Connection</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">path</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-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><a href="#listdirectoryentry" 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>Sends a JSON-RPC request to the Xandeum RPC endpoint to list all entries (files and subdirectories)
|
|
2
|
+
within a specified path.</p>
|
|
3
|
+
<p>This function calls the custom RPC method <code>listDirs</code>, which is return an array of
|
|
4
|
+
directory entry metadata — names, types etc.</p>
|
|
5
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connection</span>: <span class="tsd-signature-type">Connection</span></span><div class="tsd-comment tsd-typography"><p>The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., <code>'https://api.devnet.solana.com'</code>).</p>
|
|
6
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The filesystem path representing the directory to list (e.g., <code>/documents</code>).</p>
|
|
7
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><p>A <code>Promise<any></code> resolving to the parsed JSON response from the RPC server,
|
|
8
|
+
typically including a <code>result</code> array containing directory entry objects.</p>
|
|
9
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/listDirectoryEntery.ts#L24">listDirectoryEntery.ts:24</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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-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" 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>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Xandeum Web3 Library - v1.12.0</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>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>move | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><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></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" 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></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">move</a></li></ul><h1>Function move</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="move"><span class="tsd-kind-call-signature">move</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">fsid</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">srcPath</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">destPath</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">name</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">wallet</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span><a href="#move" 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>Constructs a Solana transaction to copy a file or directory from one path to another.</p>
|
|
2
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fsid</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The unique numeric identifier representing the target file system.</p>
|
|
3
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">srcPath</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The source path to copy from (e.g., <code>/documents</code>).</p>
|
|
4
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">destPath</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The destination path to copy to (e.g., <code>/archive</code>).</p>
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The name of the new file or directory at the destination (e.g., <code>report.txt</code>).</p>
|
|
6
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">wallet</span>: <span class="tsd-signature-type">PublicKey</span></span><div class="tsd-comment tsd-typography"><p>The wallet public key used to sign and authorize the transaction.</p>
|
|
7
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span></h4><p>A Promise that resolves to a Solana <code>Transaction</code> object containing the copyPath instruction.</p>
|
|
8
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">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>Will throw an error if <code>srcPath</code> or <code>destPath</code> contains invalid characters.</p>
|
|
9
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/move.ts#L19">move.ts:19</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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-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" 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>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Xandeum Web3 Library - v1.12.0</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>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>peek | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><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></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" 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></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">peek</a></li></ul><h1>Function peek</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="peek"><span class="tsd-kind-call-signature">peek</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">fsid</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">path</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">startPosition</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">endPosition</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">wallet</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span><a href="#peek" 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>Constructs a Solana transaction to perform a "peek" operation on a file within a file system.</p>
|
|
2
|
+
<p>The peek operation reads data between two byte offsets within a specified file path.</p>
|
|
3
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fsid</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A stringified integer representing the file system ID in which the file resides.</p>
|
|
4
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The path to the file to be peeked.</p>
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">startPosition</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The starting byte offset (inclusive) to begin reading from.</p>
|
|
6
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">endPosition</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The ending byte offset (exclusive) to stop reading at.</p>
|
|
7
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">wallet</span>: <span class="tsd-signature-type">PublicKey</span></span><div class="tsd-comment tsd-typography"><p>The public key of the wallet that will sign and authorize the transaction.</p>
|
|
8
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span></h4><p>A Promise that resolves to a Solana <code>Transaction</code> object containing the peek instruction.</p>
|
|
9
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">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>Will throw an error if the <code>path</code> contains invalid characters.</p>
|
|
10
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/peek.ts#L20">peek.ts:20</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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-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" 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>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Xandeum Web3 Library - v1.12.0</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>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>poke | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><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></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" 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></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">poke</a></li></ul><h1>Function poke</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="poke"><span class="tsd-kind-call-signature">poke</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">fsid</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">path</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">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">wallet</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">dataKey</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span><a href="#poke" 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>Constructs a Solana transaction to perform a poke\operation, which writes data
|
|
2
|
+
to a file at the specified path and byte position.</p>
|
|
3
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fsid</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A stringified integer representing the file system ID where the file resides.</p>
|
|
4
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The path to the file to be written to.</p>
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">position</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The byte offset in the file where data should be written.</p>
|
|
6
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">wallet</span>: <span class="tsd-signature-type">PublicKey</span></span><div class="tsd-comment tsd-typography"><p>The public key of the wallet that signs and authorizes the transaction.</p>
|
|
7
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">dataKey</span>: <span class="tsd-signature-type">PublicKey</span></span><div class="tsd-comment tsd-typography"><p>A public key of a data account that holds the content to be written to the file.</p>
|
|
8
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span></h4><p>A Promise that resolves to a Solana <code>Transaction</code> object containing the poke instruction.</p>
|
|
9
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">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>Will throw an error if the <code>path</code> contains invalid characters.</p>
|
|
10
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/poke.ts#L19">poke.ts:19</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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-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" 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>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Xandeum Web3 Library - v1.12.0</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>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>removeDirectory | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><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></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" 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></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">removeDirectory</a></li></ul><h1>Function removeDirectory</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="removedirectory"><span class="tsd-kind-call-signature">removeDirectory</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">fsid</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">path</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">wallet</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span><a href="#removedirectory" 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>Constructs a Solana transaction to perform a "remove directory" operation
|
|
2
|
+
in a file system, identified by a file system ID (<code>fsid</code>).</p>
|
|
3
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fsid</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A stringified integer representing the file system ID containing the directory.</p>
|
|
4
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The full path to the directory that should be removed.</p>
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">wallet</span>: <span class="tsd-signature-type">PublicKey</span></span><div class="tsd-comment tsd-typography"><p>The public key of the wallet that will sign and authorize the transaction.</p>
|
|
6
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span></h4><p>A Promise that resolves to a Solana <code>Transaction</code> object containing the remove directory instruction.</p>
|
|
7
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">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>May throw an error if the <code>path</code> fails validation in <code>sanitizePath</code>.</p>
|
|
8
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/removeDirectory.ts#L17">removeDirectory.ts:17</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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-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" 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>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Xandeum Web3 Library - v1.12.0</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>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>removeFile | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><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></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" 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></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">removeFile</a></li></ul><h1>Function removeFile</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="removefile"><span class="tsd-kind-call-signature">removeFile</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fsid</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">path</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">wallet</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span><a href="#removefile" 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>Constructs a Solana transaction to remove a file from a file system,
|
|
2
|
+
identified by a file system ID (<code>fsid</code>) and a UTF-8 encoded file path.</p>
|
|
3
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fsid</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A stringified integer representing the file system ID in which the file resides.</p>
|
|
4
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The full path to the file to be deleted.</p>
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">wallet</span>: <span class="tsd-signature-type">PublicKey</span></span><div class="tsd-comment tsd-typography"><p>The public key of the wallet that signs and authorizes the transaction.</p>
|
|
6
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span></h4><p>A Promise that resolves to a Solana <code>Transaction</code> object containing the remove file instruction.</p>
|
|
7
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">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>May throw an error if <code>path</code> is invalid per <code>sanitizePath</code>.</p>
|
|
8
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/removeFile.ts#L17">removeFile.ts:17</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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-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" 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>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Xandeum Web3 Library - v1.12.0</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>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>renamePath | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><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></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" 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></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">renamePath</a></li></ul><h1>Function renamePath</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="renamepath"><span class="tsd-kind-call-signature">renamePath</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">fsid</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">oldPath</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">name</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">wallet</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span><a href="#renamepath" 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>Constructs a Solana transaction to rename (or move) a file or directory
|
|
2
|
+
within a file system, based on a provided file system ID (<code>fsid</code>).</p>
|
|
3
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fsid</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A stringified integer representing the file system ID where the path exists.</p>
|
|
4
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">oldPath</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The current path of the file or directory to be renamed or moved.</p>
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The new name to assign to the file or directory.</p>
|
|
6
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">wallet</span>: <span class="tsd-signature-type">PublicKey</span></span><div class="tsd-comment tsd-typography"><p>The public key of the wallet that signs and authorizes the transaction.</p>
|
|
7
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span></h4><p>A Promise that resolves to a Solana <code>Transaction</code> object containing the rename path instruction.</p>
|
|
8
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">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>May throw an error if either <code>oldPath</code> or <code>newPath</code> is invalid per <code>sanitizePath</code>.</p>
|
|
9
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/renamePath.ts#L18">renamePath.ts:18</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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-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" 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>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Xandeum Web3 Library - v1.12.0</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>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>subscribeResult | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><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></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" 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></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">subscribeResult</a></li></ul><h1>Function subscribeResult</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="subscriberesult"><span class="tsd-kind-call-signature">subscribeResult</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">connection</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Connection</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">tx</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">onResult</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ResultValue</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">onError</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">onClose</span><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><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#subscriberesult" 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>Opens a WebSocket connection and subscribes to the result of a transaction
|
|
2
|
+
via the custom <code>xandeumResultSubscribe</code> method.</p>
|
|
3
|
+
<p>This is useful for receiving asynchronous results tied to an on-chain operation,
|
|
4
|
+
such as file creation, modification, or deletion.</p>
|
|
5
|
+
<p>The subscription sends a JSON-RPC request with:</p>
|
|
6
|
+
<ul>
|
|
7
|
+
<li><code>method</code>: "xandeumResultSubscribe"</li>
|
|
8
|
+
<li><code>params</code>: [txId, { commitment: "finalized" }]</li>
|
|
9
|
+
</ul>
|
|
10
|
+
<p>The WebSocket listens for result messages and invokes the <code>onResult</code> callback
|
|
11
|
+
if a valid result with <code>fsid</code>, <code>status</code>, or <code>data</code> is received.</p>
|
|
12
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connection</span>: <span class="tsd-signature-type">Connection</span></span><div class="tsd-comment tsd-typography"><p>The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., <code>'https://api.devnet.solana.com'</code>).</p>
|
|
13
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">tx</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The transaction ID you want to listen for results from.</p>
|
|
14
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">onResult</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ResultValue</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span></span><div class="tsd-comment tsd-typography"><p>Callback to handle incoming result messages. Triggered when a valid response is received.</p>
|
|
15
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">onError</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span></span><div class="tsd-comment tsd-typography"><p>(Optional) Callback triggered if a WebSocket error occurs.</p>
|
|
16
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">onClose</span>: <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span></span><div class="tsd-comment tsd-typography"><p>(Optional) Callback triggered when the WebSocket connection closes.</p>
|
|
17
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/webSocket.ts#L40">webSocket.ts:40</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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-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" 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>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Xandeum Web3 Library - v1.12.0</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>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>unsubscribeResult | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><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></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" 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></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">unsubscribeResult</a></li></ul><h1>Function unsubscribeResult</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="unsubscriberesult"><span class="tsd-kind-call-signature">unsubscribeResult</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">connection</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Connection</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">subscriptionId</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-type">void</span><a href="#unsubscriberesult" 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>Sends a WebSocket JSON-RPC message to unsubscribe from a previously subscribed transaction result
|
|
2
|
+
using the <code>xandeumResultUnsubscribed</code> method (note: custom method, ensure server-side implementation matches).</p>
|
|
3
|
+
<p>This function automatically closes the WebSocket connection after sending the unsubscribe request.</p>
|
|
4
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connection</span>: <span class="tsd-signature-type">Connection</span></span><div class="tsd-comment tsd-typography"><p>The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., <code>'https://api.devnet.solana.com'</code>).</p>
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">subscriptionId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The ID of the active subscription you want to cancel.</p>
|
|
6
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/webSocket.ts#L103">webSocket.ts:103</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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-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" 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>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Xandeum Web3 Library - v1.12.0</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>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><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></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" 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></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>Xandeum Web3 Library - v1.12.0</h1></div><h2>Hierarchy Summary</h2></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>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-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" 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>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html">Xandeum Web3 Library - v1.12.0</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>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><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></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" 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></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>Xandeum Web3 Library - v1.12.0</h1></div><div class="tsd-panel tsd-typography"><h1 id="xandeumweb3js" class="tsd-anchor-link">@xandeum/web3.js<a href="#xandeumweb3js" 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></h1><blockquote>
|
|
2
|
+
<p>Solana transaction builder for interacting with a file system on the Xandeum network.</p>
|
|
3
|
+
</blockquote>
|
|
4
|
+
<p>This package provides a JavaScript/TypeScript interface to construct Solana transactions for creating, modifying, and managing file systems on-chain using the Xandeum program.</p>
|
|
5
|
+
<h2 id="✨-features" class="tsd-anchor-link">✨ Features<a href="#✨-features" 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></h2><ul>
|
|
6
|
+
<li>Create and delete file systems (<code>bigbang</code>, <code>armageddon</code>)</li>
|
|
7
|
+
<li>Manage files and directories (<code>create</code>, <code>rename</code>, <code>remove</code>, <code>copy</code>)</li>
|
|
8
|
+
<li>Read and write file contents with byte-level control (<code>peek</code>, <code>poke</code>)</li>
|
|
9
|
+
<li>Secure path validation and serialization</li>
|
|
10
|
+
<li>Compatible with <code>@solana/web3.js</code></li>
|
|
11
|
+
</ul>
|
|
12
|
+
<h2 id="📦-installation" class="tsd-anchor-link">📦 Installation<a href="#📦-installation" 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></h2><pre><code class="bash"><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">install</span><span class="hl-1"> </span><span class="hl-2">@xandeum/web3.js</span>
|
|
13
|
+
</code><button type="button">Copy</button></pre>
|
|
14
|
+
|
|
15
|
+
<p>or</p>
|
|
16
|
+
<pre><code><span class="hl-3">yarn</span><span class="hl-1"> </span><span class="hl-3">add</span><span class="hl-1"> @</span><span class="hl-3">xandeum</span><span class="hl-1">/</span><span class="hl-3">web3</span><span class="hl-1">.</span><span class="hl-3">js</span>
|
|
17
|
+
</code><button>Copy</button></pre>
|
|
18
|
+
|
|
19
|
+
<p>🚀 Usage</p>
|
|
20
|
+
<pre><code><span class="hl-4">import</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">bigbang</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">armageddon</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">createFile</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">poke</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">peek</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">copyPath</span><br/><span class="hl-1">} </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">'@xandeum/web3.js'</span><br/><br/><span class="hl-4">import</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">Connection</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">sendAndConfirmTransaction</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">Keypair</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">PublicKey</span><br/><span class="hl-1">} </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">'@solana/web3.js'</span><br/><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">connection</span><span class="hl-1"> = </span><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-0">Connection</span><span class="hl-1">(</span><span class="hl-2">'https://apis.devnet.xandeum.com</span><span class="hl-7">)</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-3">signer</span><span class="hl-1"> = </span><span class="hl-3">Keypair</span><span class="hl-1">.</span><span class="hl-0">generate</span><span class="hl-1">()</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-3">wallet</span><span class="hl-1"> = </span><span class="hl-3">signer</span><span class="hl-1">.</span><span class="hl-3">publicKey</span><br/><br/><span class="hl-5">async</span><span class="hl-1"> </span><span class="hl-5">function</span><span class="hl-1"> </span><span class="hl-0">main</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-8">// Create a new file system</span><br/><span class="hl-1"> </span><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">tx1</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">bigbang</span><span class="hl-1">(</span><span class="hl-3">wallet</span><span class="hl-1">)</span><br/><span class="hl-1"> </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">sendAndConfirmTransaction</span><span class="hl-1">(</span><span class="hl-3">connection</span><span class="hl-1">, </span><span class="hl-3">tx1</span><span class="hl-1">, [</span><span class="hl-3">signer</span><span class="hl-1">])</span><br/><br/><span class="hl-1"> </span><span class="hl-8">// Create a file</span><br/><span class="hl-1"> </span><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">tx2</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">createFile</span><span class="hl-1">(</span><span class="hl-2">'1'</span><span class="hl-1">, </span><span class="hl-2">'/'</span><span class="hl-1">,</span><span class="hl-2">'hello.txt'</span><span class="hl-1">, </span><span class="hl-3">wallet</span><span class="hl-1">)</span><br/><span class="hl-1"> </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">sendAndConfirmTransaction</span><span class="hl-1">(</span><span class="hl-3">connection</span><span class="hl-1">, </span><span class="hl-3">tx2</span><span class="hl-1">, [</span><span class="hl-3">signer</span><span class="hl-1">])</span><br/><br/><span class="hl-1"> </span><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">dataAccount</span><span class="hl-1"> = </span><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-0">PublicKey</span><span class="hl-1">(</span><span class="hl-2">"FBM4G63KPUneqyLwQy6zVu81AsMqmkQjsdxNGBKq3dkv"</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-8">// Write data</span><br/><span class="hl-1"> </span><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">tx3</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">poke</span><span class="hl-1">(</span><span class="hl-2">'1'</span><span class="hl-1">, </span><span class="hl-2">'/hello.txt'</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-3">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">'Hello Xandeum!'</span><span class="hl-1">), </span><span class="hl-3">wallet</span><span class="hl-1">)</span><br/><span class="hl-1"> </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">sendAndConfirmTransaction</span><span class="hl-1">(</span><span class="hl-3">connection</span><span class="hl-1">, </span><span class="hl-3">tx3</span><span class="hl-1">, [</span><span class="hl-3">signer</span><span class="hl-1">])</span><br/><br/><span class="hl-1"> </span><span class="hl-8">// Read data</span><br/><span class="hl-1"> </span><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">tx4</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">peek</span><span class="hl-1">(</span><span class="hl-2">'1'</span><span class="hl-1">, </span><span class="hl-2">'/hello.txt'</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">14</span><span class="hl-1">, </span><span class="hl-3">wallet</span><span class="hl-1">)</span><br/><span class="hl-1"> </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">sendAndConfirmTransaction</span><span class="hl-1">(</span><span class="hl-3">connection</span><span class="hl-1">, </span><span class="hl-3">tx4</span><span class="hl-1">, [</span><span class="hl-3">signer</span><span class="hl-1">])</span><br/><span class="hl-1">}</span>
|
|
21
|
+
</code><button>Copy</button></pre>
|
|
22
|
+
|
|
23
|
+
<h2 id="🧩-api-overview" class="tsd-anchor-link">🧩 API Overview<a href="#🧩-api-overview" 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></h2><p>bigbang(wallet: PublicKey): Promise<Transaction>
|
|
24
|
+
Creates a new file system account.</p>
|
|
25
|
+
<p>armageddon(fsid: string, wallet: PublicKey): Promise<Transaction>
|
|
26
|
+
Deletes a file system by ID.</p>
|
|
27
|
+
<p>createFile(fsid: string, path: string, wallet: PublicKey): Promise<Transaction>
|
|
28
|
+
Creates a new file at the given path.</p>
|
|
29
|
+
<p>poke(fsid: string, path: string, offset: number, data: Buffer, wallet: PublicKey): Promise<Transaction>
|
|
30
|
+
Writes bytes to a file starting at a specific offset.</p>
|
|
31
|
+
<p>peek(fsid: string, path: string, offset: number, length: number, wallet: PublicKey): Promise<Transaction>
|
|
32
|
+
Reads bytes from a file.</p>
|
|
33
|
+
<p>copyPath(fsid: string, srcPath: string, destPath: string, wallet: PublicKey): Promise<Transaction>
|
|
34
|
+
Copies a file or directory from one path to another.</p>
|
|
35
|
+
<p>Other available functions <br />
|
|
36
|
+
renamePath <br />
|
|
37
|
+
removeFile <br />
|
|
38
|
+
removeDirectory <br />
|
|
39
|
+
createDirectory <br />
|
|
40
|
+
exists <br />
|
|
41
|
+
listDirectoryEntry <br />
|
|
42
|
+
getMetadata <br /></p>
|
|
43
|
+
<p>All functions that accept a file or directory path will validate inputs using sanitizePath to prevent invalid characters.</p>
|
|
44
|
+
<h2 id="🌐-websocket-subscription" class="tsd-anchor-link">🌐 WebSocket Subscription<a href="#🌐-websocket-subscription" 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></h2><p>subscribeResult(connection: Connection,tx: string, onResult: (result: ResultValue) => void, onError?: (err: any) => void, onClose?: () => void): void
|
|
45
|
+
Subscribes to results from a transaction via WebSocket. Used for listening events triggered by the transaction.</p>
|
|
46
|
+
<h4 id="parameters" class="tsd-anchor-link">Parameters:<a href="#parameters" 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>connection - The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., <code>'https://api.devnet.solana.com'</code>).
|
|
47
|
+
tx — Transaction signature to subscribe to
|
|
48
|
+
onResult(result) — Called when a valid result is received
|
|
49
|
+
onError(err) — Optional callback for connection errors
|
|
50
|
+
onClose() — Optional callback for connection closure
|
|
51
|
+
Example:</p>
|
|
52
|
+
<pre><code><span class="hl-0">subscribeResult</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-3">connection</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">'transactionSignatureHere'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">result</span><span class="hl-1"> </span><span class="hl-5">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">'Result:'</span><span class="hl-1">, </span><span class="hl-3">result</span><span class="hl-1">)</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">)</span>
|
|
53
|
+
</code><button>Copy</button></pre>
|
|
54
|
+
|
|
55
|
+
<p>Example</p>
|
|
56
|
+
<pre><code><span class="hl-4">import</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">bigbang</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">createFile</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">poke</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">peek</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">subscribeResult</span><br/><span class="hl-1">} </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">'@xandeum/web3.js'</span><br/><br/><span class="hl-4">import</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">Connection</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">sendAndConfirmTransaction</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">Keypair</span><br/><span class="hl-1">} </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">'@solana/web3.js'</span><br/><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">connection</span><span class="hl-1"> = </span><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-0">Connection</span><span class="hl-1">(</span><span class="hl-2">'https://api.mainnet-beta.solana.com'</span><span class="hl-1">)</span><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">signer</span><span class="hl-1"> = </span><span class="hl-3">Keypair</span><span class="hl-1">.</span><span class="hl-0">generate</span><span class="hl-1">()</span><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">wallet</span><span class="hl-1"> = </span><span class="hl-3">signer</span><span class="hl-1">.</span><span class="hl-3">publicKey</span><br/><br/><span class="hl-5">async</span><span class="hl-1"> </span><span class="hl-5">function</span><span class="hl-1"> </span><span class="hl-0">main</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">tx</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">createFile</span><span class="hl-1">(</span><span class="hl-2">'1'</span><span class="hl-1">, </span><span class="hl-2">'/hello.txt'</span><span class="hl-1">, </span><span class="hl-3">wallet</span><span class="hl-1">)</span><br/><span class="hl-1"> </span><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">txSignature</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">sendAndConfirmTransaction</span><span class="hl-1">(</span><span class="hl-3">connection</span><span class="hl-1">, </span><span class="hl-3">tx</span><span class="hl-1">, [</span><span class="hl-3">signer</span><span class="hl-1">])</span><br/><br/><span class="hl-1"> </span><span class="hl-0">subscribeResult</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-3">connection</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">txSignature</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">result</span><span class="hl-1"> </span><span class="hl-5">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">'Received result:'</span><span class="hl-1">, </span><span class="hl-3">result</span><span class="hl-1">)</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-3">err</span><span class="hl-1"> </span><span class="hl-5">=></span><span class="hl-1"> </span><span class="hl-3">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-2">'WebSocket error:'</span><span class="hl-1">, </span><span class="hl-3">err</span><span class="hl-1">),</span><br/><span class="hl-1"> () </span><span class="hl-5">=></span><span class="hl-1"> </span><span class="hl-3">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">'WebSocket closed'</span><span class="hl-1">)</span><br/><span class="hl-1"> )</span><br/><span class="hl-1">}</span>
|
|
57
|
+
</code><button>Copy</button></pre>
|
|
58
|
+
|
|
59
|
+
<p>Apache-2.0 © Xandeum</p>
|
|
60
|
+
<p>👤 Author</p>
|
|
61
|
+
<p>Built by Xandeum to provide decentralized, programmable file systems on Solana via the Xandeum protocol.</p>
|
|
62
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>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-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" 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>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"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#xandeumweb3js"><span>@xandeum/web3.js</span></a><ul><li><a href="#✨-features"><span>✨ <wbr/>Features</span></a></li><li><a href="#📦-installation"><span>📦 <wbr/>Installation</span></a></li><li><a href="#🧩-api-overview"><span>🧩 <wbr/>API <wbr/>Overview</span></a></li><li><a href="#🌐-websocket-subscription"><span>🌐 <wbr/>Web<wbr/>Socket <wbr/>Subscription</span></a></li><li><ul><li><a href="#parameters"><span>Parameters:</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html">Xandeum Web3 Library - v1.12.0</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>
|