@xandeum/web3.js 0.4.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.
Files changed (119) hide show
  1. package/LICENSE +51 -0
  2. package/README.md +167 -0
  3. package/archbee.yaml +55 -0
  4. package/dist/armageddon.d.ts +10 -0
  5. package/dist/armageddon.js +77 -0
  6. package/dist/assignCoowner.d.ts +12 -0
  7. package/dist/assignCoowner.js +81 -0
  8. package/dist/bigbang.d.ts +9 -0
  9. package/dist/bigbang.js +76 -0
  10. package/dist/const.d.ts +1 -0
  11. package/dist/const.js +4 -0
  12. package/dist/copyPath.d.ts +13 -0
  13. package/dist/copyPath.js +86 -0
  14. package/dist/createDirectory.d.ts +12 -0
  15. package/dist/createDirectory.js +84 -0
  16. package/dist/createFile.d.ts +13 -0
  17. package/dist/createFile.js +85 -0
  18. package/dist/exists.d.ts +20 -0
  19. package/dist/exists.js +86 -0
  20. package/dist/find.d.ts +22 -0
  21. package/dist/find.js +88 -0
  22. package/dist/getInfo.d.ts +12 -0
  23. package/dist/getInfo.js +77 -0
  24. package/dist/getMetadata.d.ts +23 -0
  25. package/dist/getMetadata.js +89 -0
  26. package/dist/getXandeumResult.d.ts +15 -0
  27. package/dist/getXandeumResult.js +95 -0
  28. package/dist/index.d.ts +16 -0
  29. package/dist/index.js +37 -0
  30. package/dist/listDirectoryEntery.d.ts +21 -0
  31. package/dist/listDirectoryEntery.js +87 -0
  32. package/dist/move.d.ts +14 -0
  33. package/dist/move.js +88 -0
  34. package/dist/peek.d.ts +15 -0
  35. package/dist/peek.js +88 -0
  36. package/dist/poke.d.ts +14 -0
  37. package/dist/poke.js +93 -0
  38. package/dist/removeDirectory.d.ts +12 -0
  39. package/dist/removeDirectory.js +82 -0
  40. package/dist/removeFile.d.ts +12 -0
  41. package/dist/removeFile.js +82 -0
  42. package/dist/renamePath.d.ts +13 -0
  43. package/dist/renamePath.js +85 -0
  44. package/dist/sanitizePath.d.ts +14 -0
  45. package/dist/sanitizePath.js +60 -0
  46. package/dist/webSocket.d.ts +47 -0
  47. package/dist/webSocket.js +103 -0
  48. package/docs/html/.nojekyll +1 -0
  49. package/docs/html/assets/hierarchy.js +1 -0
  50. package/docs/html/assets/highlight.css +92 -0
  51. package/docs/html/assets/icons.js +18 -0
  52. package/docs/html/assets/icons.svg +1 -0
  53. package/docs/html/assets/main.js +60 -0
  54. package/docs/html/assets/navigation.js +1 -0
  55. package/docs/html/assets/search.js +1 -0
  56. package/docs/html/assets/style.css +1640 -0
  57. package/docs/html/functions/armageddon.html +6 -0
  58. package/docs/html/functions/bigbang.html +5 -0
  59. package/docs/html/functions/copyPath.html +8 -0
  60. package/docs/html/functions/createDirectory.html +8 -0
  61. package/docs/html/functions/createFile.html +9 -0
  62. package/docs/html/functions/exists.html +8 -0
  63. package/docs/html/functions/getMetadata.html +10 -0
  64. package/docs/html/functions/getXandeumResult.html +9 -0
  65. package/docs/html/functions/listDirectoryEntry.html +9 -0
  66. package/docs/html/functions/move.html +9 -0
  67. package/docs/html/functions/peek.html +10 -0
  68. package/docs/html/functions/poke.html +10 -0
  69. package/docs/html/functions/removeDirectory.html +8 -0
  70. package/docs/html/functions/removeFile.html +8 -0
  71. package/docs/html/functions/renamePath.html +9 -0
  72. package/docs/html/functions/subscribeResult.html +17 -0
  73. package/docs/html/functions/unsubscribeResult.html +6 -0
  74. package/docs/html/hierarchy.html +1 -0
  75. package/docs/html/index.html +62 -0
  76. package/docs/html/modules.html +1 -0
  77. package/docs/markdown/.nojekyll +0 -0
  78. package/docs/markdown/README.md +169 -0
  79. package/docs/markdown/functions/armageddon.md +34 -0
  80. package/docs/markdown/functions/bigbang.md +27 -0
  81. package/docs/markdown/functions/copyPath.md +49 -0
  82. package/docs/markdown/functions/createDirectory.md +49 -0
  83. package/docs/markdown/functions/createFile.md +50 -0
  84. package/docs/markdown/functions/exists.md +37 -0
  85. package/docs/markdown/functions/getMetadata.md +39 -0
  86. package/docs/markdown/functions/getXandeumResult.md +38 -0
  87. package/docs/markdown/functions/listDirectoryEntry.md +38 -0
  88. package/docs/markdown/functions/move.md +55 -0
  89. package/docs/markdown/functions/peek.md +57 -0
  90. package/docs/markdown/functions/poke.md +56 -0
  91. package/docs/markdown/functions/removeDirectory.md +44 -0
  92. package/docs/markdown/functions/removeFile.md +44 -0
  93. package/docs/markdown/functions/renamePath.md +50 -0
  94. package/docs/markdown/functions/subscribeResult.md +60 -0
  95. package/docs/markdown/functions/unsubscribeResult.md +34 -0
  96. package/docs/markdown/globals.md +25 -0
  97. package/docs/markdown/summary.md +44 -0
  98. package/package.json +26 -0
  99. package/src/armageddon.ts +36 -0
  100. package/src/bigbang.ts +32 -0
  101. package/src/const.ts +1 -0
  102. package/src/copyPath.ts +51 -0
  103. package/src/createDirectory.ts +47 -0
  104. package/src/createFile.ts +47 -0
  105. package/src/exists.ts +47 -0
  106. package/src/getMetadata.ts +50 -0
  107. package/src/getXandeumResult.ts +48 -0
  108. package/src/index.ts +16 -0
  109. package/src/listDirectoryEntery.ts +51 -0
  110. package/src/move.ts +55 -0
  111. package/src/peek.ts +52 -0
  112. package/src/poke.ts +59 -0
  113. package/src/removeDirectory.ts +43 -0
  114. package/src/removeFile.ts +44 -0
  115. package/src/renamePath.ts +50 -0
  116. package/src/sanitizePath.ts +69 -0
  117. package/src/webSocket.ts +131 -0
  118. package/tsconfig.json +14 -0
  119. package/typedoc.json +26 -0
@@ -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 - v0.4.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 - v0.4.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">=&gt;</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">=&gt;</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">=&gt;</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>: &quot;xandeumResultSubscribe&quot;</li>
8
+ <li><code>params</code>: [txId, { commitment: &quot;finalized&quot; }]</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">=&gt;</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">=&gt;</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">=&gt;</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/xandeum-web3.js/blob/master/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 - v0.4.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 - v0.4.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 - v0.4.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/xandeum-web3.js/blob/master/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 - v0.4.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 - v0.4.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 - v0.4.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 - v0.4.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 - v0.4.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 - v0.4.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 - v0.4.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 - v0.4.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">&#39;@xandeum/web3.js&#39;</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">&#39;@solana/web3.js&#39;</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">&#39;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">&#39;1&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;/&#39;</span><span class="hl-1">,</span><span class="hl-2">&#39;hello.txt&#39;</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">&quot;FBM4G63KPUneqyLwQy6zVu81AsMqmkQjsdxNGBKq3dkv&quot;</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">&#39;1&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;/hello.txt&#39;</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">&#39;Hello Xandeum!&#39;</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">&#39;1&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;/hello.txt&#39;</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) =&gt; void, onError?: (err: any) =&gt; void, onClose?: () =&gt; 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">&#39;transactionSignatureHere&#39;</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">=&gt;</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">&#39;Result:&#39;</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">&#39;@xandeum/web3.js&#39;</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">&#39;@solana/web3.js&#39;</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">&#39;https://api.mainnet-beta.solana.com&#39;</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">&#39;1&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;/hello.txt&#39;</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">=&gt;</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">&#39;Received result:&#39;</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">=&gt;</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">&#39;WebSocket error:&#39;</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">=&gt;</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">&#39;WebSocket closed&#39;</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 - v0.4.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 - v0.4.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 - v0.4.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"></ul><h1>Xandeum Web3 Library - v0.4.0</h1></div><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Functions"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h2>Functions</h2></summary><dl class="tsd-member-summaries"><dt class="tsd-member-summary" id="armageddon"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/armageddon.html">armageddon</a><a href="#armageddon" 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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="bigbang"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/bigbang.html">bigbang</a><a href="#bigbang" 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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="copypath"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/copyPath.html">copyPath</a><a href="#copypath" 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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="createdirectory"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/createDirectory.html">createDirectory</a><a href="#createdirectory" 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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="createfile"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/createFile.html">createFile</a><a href="#createfile" 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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="exists"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/exists.html">exists</a><a href="#exists" 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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="getmetadata"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/getMetadata.html">getMetadata</a><a href="#getmetadata" 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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="getxandeumresult"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/getXandeumResult.html">getXandeumResult</a><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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="listdirectoryentry"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/listDirectoryEntry.html">listDirectoryEntry</a><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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="move"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/move.html">move</a><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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="peek"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/peek.html">peek</a><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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="poke"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/poke.html">poke</a><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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="removedirectory"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/removeDirectory.html">removeDirectory</a><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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="removefile"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/removeFile.html">removeFile</a><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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="renamepath"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/renamePath.html">renamePath</a><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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="subscriberesult"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/subscribeResult.html">subscribeResult</a><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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="unsubscriberesult"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/unsubscribeResult.html">unsubscribeResult</a><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></span></dt><dd class="tsd-member-summary"></dd></dl></details></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"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Functions"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Functions</summary><div><a href="#armageddon"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>armageddon</span></a><a href="#bigbang"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>bigbang</span></a><a href="#copypath"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>copy<wbr/>Path</span></a><a href="#createdirectory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>create<wbr/>Directory</span></a><a href="#createfile"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>create<wbr/>File</span></a><a href="#exists"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>exists</span></a><a href="#getmetadata"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>get<wbr/>Metadata</span></a><a href="#getxandeumresult"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>get<wbr/>Xandeum<wbr/>Result</span></a><a href="#listdirectoryentry"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>list<wbr/>Directory<wbr/>Entry</span></a><a href="#move"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>move</span></a><a href="#peek"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>peek</span></a><a href="#poke"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>poke</span></a><a href="#removedirectory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>remove<wbr/>Directory</span></a><a href="#removefile"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>remove<wbr/>File</span></a><a href="#renamepath"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>rename<wbr/>Path</span></a><a href="#subscriberesult"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>subscribe<wbr/>Result</span></a><a href="#unsubscriberesult"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>unsubscribe<wbr/>Result</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html" class="current">Xandeum Web3 Library - v0.4.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>
File without changes
@@ -0,0 +1,169 @@
1
+ **Xandeum Web3 Library v1.12.0**
2
+
3
+ ***
4
+
5
+ # @xandeum/web3.js
6
+
7
+ > Solana transaction builder for interacting with a file system on the Xandeum network.
8
+
9
+ This package provides a JavaScript/TypeScript interface to construct Solana transactions for creating, modifying, and managing file systems on-chain using the Xandeum program.
10
+
11
+ ## ✨ Features
12
+
13
+ - Create and delete file systems (`bigbang`, `armageddon`)
14
+ - Manage files and directories (`create`, `rename`, `remove`, `copy`)
15
+ - Read and write file contents with byte-level control (`peek`, `poke`)
16
+ - Secure path validation and serialization
17
+ - Compatible with `@solana/web3.js`
18
+
19
+ ## 📦 Installation
20
+
21
+ ```bash
22
+ npm install @xandeum/web3.js
23
+ ```
24
+
25
+ or
26
+
27
+ ```
28
+ yarn add @xandeum/web3.js
29
+ ```
30
+ 🚀 Usage
31
+
32
+ ```
33
+ import {
34
+ bigbang,
35
+ armageddon,
36
+ createFile,
37
+ poke,
38
+ peek,
39
+ copyPath
40
+ } from '@xandeum/web3.js'
41
+
42
+ import {
43
+ Connection,
44
+ sendAndConfirmTransaction,
45
+ Keypair,
46
+ PublicKey
47
+ } from '@solana/web3.js'
48
+
49
+ const connection = new Connection('https://apis.devnet.xandeum.com)
50
+ const signer = Keypair.generate()
51
+ const wallet = signer.publicKey
52
+
53
+ async function main() {
54
+ // Create a new file system
55
+ const tx1 = await bigbang(wallet)
56
+ await sendAndConfirmTransaction(connection, tx1, [signer])
57
+
58
+ // Create a file
59
+ const tx2 = await createFile('1', '/','hello.txt', wallet)
60
+ await sendAndConfirmTransaction(connection, tx2, [signer])
61
+
62
+ const dataAccount = new PublicKey("FBM4G63KPUneqyLwQy6zVu81AsMqmkQjsdxNGBKq3dkv");
63
+
64
+ // Write data
65
+ const tx3 = await poke('1', '/hello.txt', 0, Buffer.from('Hello Xandeum!'), wallet)
66
+ await sendAndConfirmTransaction(connection, tx3, [signer])
67
+
68
+ // Read data
69
+ const tx4 = await peek('1', '/hello.txt', 0, 14, wallet)
70
+ await sendAndConfirmTransaction(connection, tx4, [signer])
71
+ }
72
+ ```
73
+
74
+ ## 🧩 API Overview
75
+
76
+ bigbang(wallet: PublicKey): Promise<Transaction>
77
+ Creates a new file system account.
78
+
79
+ armageddon(fsid: string, wallet: PublicKey): Promise<Transaction>
80
+ Deletes a file system by ID.
81
+
82
+ createFile(fsid: string, path: string, wallet: PublicKey): Promise<Transaction>
83
+ Creates a new file at the given path.
84
+
85
+ poke(fsid: string, path: string, offset: number, data: Buffer, wallet: PublicKey): Promise<Transaction>
86
+ Writes bytes to a file starting at a specific offset.
87
+
88
+ peek(fsid: string, path: string, offset: number, length: number, wallet: PublicKey): Promise<Transaction>
89
+ Reads bytes from a file.
90
+
91
+ copyPath(fsid: string, srcPath: string, destPath: string, wallet: PublicKey): Promise<Transaction>
92
+ Copies a file or directory from one path to another.
93
+
94
+ Other available functions <br />
95
+ renamePath <br />
96
+ removeFile <br />
97
+ removeDirectory <br />
98
+ createDirectory <br />
99
+ exists <br />
100
+ listDirectoryEntry <br />
101
+ getMetadata <br />
102
+
103
+ All functions that accept a file or directory path will validate inputs using sanitizePath to prevent invalid characters.
104
+
105
+ ## 🌐 WebSocket Subscription
106
+
107
+ subscribeResult(connection: Connection,tx: string, onResult: (result: ResultValue) => void, onError?: (err: any) => void, onClose?: () => void): void
108
+ Subscribes to results from a transaction via WebSocket. Used for listening events triggered by the transaction.
109
+
110
+ #### Parameters:
111
+
112
+ connection - The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., `'https://api.devnet.solana.com'`).
113
+ tx — Transaction signature to subscribe to
114
+ onResult(result) — Called when a valid result is received
115
+ onError(err) — Optional callback for connection errors
116
+ onClose() — Optional callback for connection closure
117
+ Example:
118
+
119
+ ```
120
+ subscribeResult(
121
+ connection,
122
+ 'transactionSignatureHere',
123
+ result => {
124
+ console.log('Result:', result)
125
+ }
126
+ )
127
+ ```
128
+
129
+ Example
130
+ ```
131
+ import {
132
+ bigbang,
133
+ createFile,
134
+ poke,
135
+ peek,
136
+ subscribeResult
137
+ } from '@xandeum/web3.js'
138
+
139
+ import {
140
+ Connection,
141
+ sendAndConfirmTransaction,
142
+ Keypair
143
+ } from '@solana/web3.js'
144
+
145
+ const connection = new Connection('https://api.mainnet-beta.solana.com')
146
+ const signer = Keypair.generate()
147
+ const wallet = signer.publicKey
148
+
149
+ async function main() {
150
+ const tx = await createFile('1', '/hello.txt', wallet)
151
+ const txSignature = await sendAndConfirmTransaction(connection, tx, [signer])
152
+
153
+ subscribeResult(
154
+ connection,
155
+ txSignature,
156
+ result => {
157
+ console.log('Received result:', result)
158
+ },
159
+ err => console.error('WebSocket error:', err),
160
+ () => console.log('WebSocket closed')
161
+ )
162
+ }
163
+ ```
164
+
165
+ Apache-2.0 © Xandeum
166
+
167
+ 👤 Author
168
+
169
+ Built by Xandeum to provide decentralized, programmable file systems on Solana via the Xandeum protocol.
@@ -0,0 +1,34 @@
1
+ [**Xandeum Web3 Library v1.12.0**](../README.md)
2
+
3
+ ***
4
+
5
+ [Xandeum Web3 Library](../globals.md) / armageddon
6
+
7
+ # Function: armageddon()
8
+
9
+ > **armageddon**(`fsid`, `wallet`): `Promise`\<`Transaction`\>
10
+
11
+ Defined in: [armageddon.ts:13](https://github.com/Xandeum/xandeum-web3.js/blob/master/src/armageddon.ts#L13)
12
+
13
+ Constructs a Solana transaction that triggers the "armageddon" instruction
14
+ on the specified file system (fsid).
15
+
16
+ ## Parameters
17
+
18
+ ### fsid
19
+
20
+ `string`
21
+
22
+ A stringified integer representing the file system ID to be used in the instruction.
23
+
24
+ ### wallet
25
+
26
+ `PublicKey`
27
+
28
+ The public key of the wallet that will sign and authorize the transaction.
29
+
30
+ ## Returns
31
+
32
+ `Promise`\<`Transaction`\>
33
+
34
+ A Promise that resolves to a Solana `Transaction` object containing the armageddon instruction.
@@ -0,0 +1,27 @@
1
+ [**Xandeum Web3 Library v1.12.0**](../README.md)
2
+
3
+ ***
4
+
5
+ [Xandeum Web3 Library](../globals.md) / bigbang
6
+
7
+ # Function: bigbang()
8
+
9
+ > **bigbang**(`wallet`): `Promise`\<`Transaction`\>
10
+
11
+ Defined in: [bigbang.ts:10](https://github.com/Xandeum/xandeum-web3.js/blob/master/src/bigbang.ts#L10)
12
+
13
+ Constructs a Solana transaction that triggers the "bigbang" instruction and create new file system.
14
+
15
+ ## Parameters
16
+
17
+ ### wallet
18
+
19
+ `PublicKey`
20
+
21
+ The public key of the wallet that will sign and authorize the transaction.
22
+
23
+ ## Returns
24
+
25
+ `Promise`\<`Transaction`\>
26
+
27
+ A Promise that resolves to a Solana `Transaction` object containing the bigbang instruction.
@@ -0,0 +1,49 @@
1
+ [**Xandeum Web3 Library v1.12.0**](../README.md)
2
+
3
+ ***
4
+
5
+ [Xandeum Web3 Library](../globals.md) / copyPath
6
+
7
+ # Function: copyPath()
8
+
9
+ > **copyPath**(`fsid`, `srcPath`, `destPath`, `wallet`): `Promise`\<`Transaction`\>
10
+
11
+ Defined in: [copyPath.ts:18](https://github.com/Xandeum/xandeum-web3.js/blob/master/src/copyPath.ts#L18)
12
+
13
+ Constructs a Solana transaction to copy a file or directory from one path to another.
14
+
15
+ ## Parameters
16
+
17
+ ### fsid
18
+
19
+ `string`
20
+
21
+ The unique numeric identifier representing the target file system.
22
+
23
+ ### srcPath
24
+
25
+ `string`
26
+
27
+ The source path to copy from (e.g., `/documents/report.txt`).
28
+
29
+ ### destPath
30
+
31
+ `string`
32
+
33
+ The destination path to copy to (e.g., `/archive/report.txt`).
34
+
35
+ ### wallet
36
+
37
+ `PublicKey`
38
+
39
+ The wallet public key used to sign and authorize the transaction.
40
+
41
+ ## Returns
42
+
43
+ `Promise`\<`Transaction`\>
44
+
45
+ A Promise that resolves to a Solana `Transaction` object containing the copyPath instruction.
46
+
47
+ ## Throws
48
+
49
+ Will throw an error if `srcPath` or `destPath` contains invalid characters.
@@ -0,0 +1,49 @@
1
+ [**Xandeum Web3 Library v1.12.0**](../README.md)
2
+
3
+ ***
4
+
5
+ [Xandeum Web3 Library](../globals.md) / createDirectory
6
+
7
+ # Function: createDirectory()
8
+
9
+ > **createDirectory**(`fsid`, `path`, `name`, `wallet`): `Promise`\<`Transaction`\>
10
+
11
+ Defined in: [createDirectory.ts:17](https://github.com/Xandeum/xandeum-web3.js/blob/master/src/createDirectory.ts#L17)
12
+
13
+ Constructs a Solana transaction to create a new directory within a file system.
14
+
15
+ ## Parameters
16
+
17
+ ### fsid
18
+
19
+ `string`
20
+
21
+ A numeric filesystem identifier used to scope the directory creation.
22
+
23
+ ### path
24
+
25
+ `string`
26
+
27
+ The parent path where the directory should be created (e.g., `/documents`).
28
+
29
+ ### name
30
+
31
+ `string`
32
+
33
+ The name of the new directory (e.g., `reports`).
34
+
35
+ ### wallet
36
+
37
+ `PublicKey`
38
+
39
+ The signer’s public key that authorizes the transaction.
40
+
41
+ ## Returns
42
+
43
+ `Promise`\<`Transaction`\>
44
+
45
+ A Promise that resolves to a Solana `Transaction` object containing the createDirectory instruction.
46
+
47
+ ## Throws
48
+
49
+ Will throw an error if `path` or `name` contains invalid characters.@throws Will throw if the combined path is invalid (non-alphanumeric or unsupported characters).