@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 @@
|
|
|
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"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"></ul><h1>Xandeum Web3 Library - v1.12.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 - 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>
|
package/docs/markdown/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
**Xandeum Web3 Library v1.
|
|
1
|
+
**Xandeum Web3 Library v1.12.0**
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -42,7 +42,8 @@ import {
|
|
|
42
42
|
import {
|
|
43
43
|
Connection,
|
|
44
44
|
sendAndConfirmTransaction,
|
|
45
|
-
Keypair
|
|
45
|
+
Keypair,
|
|
46
|
+
PublicKey
|
|
46
47
|
} from '@solana/web3.js'
|
|
47
48
|
|
|
48
49
|
const connection = new Connection('https://apis.devnet.xandeum.com)
|
|
@@ -55,15 +56,17 @@ async function main() {
|
|
|
55
56
|
await sendAndConfirmTransaction(connection, tx1, [signer])
|
|
56
57
|
|
|
57
58
|
// Create a file
|
|
58
|
-
const tx2 = await createFile('1', '/
|
|
59
|
+
const tx2 = await createFile('1', '/','hello.txt', wallet)
|
|
59
60
|
await sendAndConfirmTransaction(connection, tx2, [signer])
|
|
60
61
|
|
|
62
|
+
const dataAccount = new PublicKey("FBM4G63KPUneqyLwQy6zVu81AsMqmkQjsdxNGBKq3dkv");
|
|
63
|
+
|
|
61
64
|
// Write data
|
|
62
|
-
const tx3 = await poke('1', '/
|
|
65
|
+
const tx3 = await poke('1', '/hello.txt', 0, Buffer.from('Hello Xandeum!'), wallet)
|
|
63
66
|
await sendAndConfirmTransaction(connection, tx3, [signer])
|
|
64
67
|
|
|
65
68
|
// Read data
|
|
66
|
-
const tx4 = await peek('1', '/
|
|
69
|
+
const tx4 = await peek('1', '/hello.txt', 0, 14, wallet)
|
|
67
70
|
await sendAndConfirmTransaction(connection, tx4, [signer])
|
|
68
71
|
}
|
|
69
72
|
```
|
|
@@ -144,7 +147,7 @@ const signer = Keypair.generate()
|
|
|
144
147
|
const wallet = signer.publicKey
|
|
145
148
|
|
|
146
149
|
async function main() {
|
|
147
|
-
const tx = await createFile('1', '/
|
|
150
|
+
const tx = await createFile('1', '/hello.txt', wallet)
|
|
148
151
|
const txSignature = await sendAndConfirmTransaction(connection, tx, [signer])
|
|
149
152
|
|
|
150
153
|
subscribeResult(
|
|
@@ -159,7 +162,7 @@ async function main() {
|
|
|
159
162
|
}
|
|
160
163
|
```
|
|
161
164
|
|
|
162
|
-
|
|
165
|
+
Apache-2.0 © Xandeum
|
|
163
166
|
|
|
164
167
|
👤 Author
|
|
165
168
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[**Xandeum Web3 Library v1.12.0**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Xandeum Web3 Library](../globals.md) / getXandeumResult
|
|
6
|
+
|
|
7
|
+
# Function: getXandeumResult()
|
|
8
|
+
|
|
9
|
+
> **getXandeumResult**(`connection`, `signature`): `Promise`\<`any`\>
|
|
10
|
+
|
|
11
|
+
Defined in: [getXandeumResult.ts:21](https://github.com/Xandeum/test_web3/blob/main/src/getXandeumResult.ts#L21)
|
|
12
|
+
|
|
13
|
+
Sends a JSON-RPC request to the Xandeum-compatible endpoint to retrieve
|
|
14
|
+
the result of a transaction previously submitted with a specific signature.
|
|
15
|
+
|
|
16
|
+
This function calls the custom RPC method `getXandeumResult`, which returns
|
|
17
|
+
the result associated with the given transaction signature.
|
|
18
|
+
|
|
19
|
+
## Parameters
|
|
20
|
+
|
|
21
|
+
### connection
|
|
22
|
+
|
|
23
|
+
`Connection`
|
|
24
|
+
|
|
25
|
+
The Solana web3 connection object pointing to a Xandeum-compatible RPC endpoint.
|
|
26
|
+
|
|
27
|
+
### signature
|
|
28
|
+
|
|
29
|
+
`string`
|
|
30
|
+
|
|
31
|
+
The transaction signature string whose result should be queried.
|
|
32
|
+
|
|
33
|
+
## Returns
|
|
34
|
+
|
|
35
|
+
`Promise`\<`any`\>
|
|
36
|
+
|
|
37
|
+
A `Promise<any>` resolving to the parsed JSON response from the RPC server,
|
|
38
|
+
which includes the result of the transaction if available.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
[**Xandeum Web3 Library v1.12.0**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Xandeum Web3 Library](../globals.md) / move
|
|
6
|
+
|
|
7
|
+
# Function: move()
|
|
8
|
+
|
|
9
|
+
> **move**(`fsid`, `srcPath`, `destPath`, `name`, `wallet`): `Promise`\<`Transaction`\>
|
|
10
|
+
|
|
11
|
+
Defined in: [move.ts:19](https://github.com/Xandeum/test_web3/blob/main/src/move.ts#L19)
|
|
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`).
|
|
28
|
+
|
|
29
|
+
### destPath
|
|
30
|
+
|
|
31
|
+
`string`
|
|
32
|
+
|
|
33
|
+
The destination path to copy to (e.g., `/archive`).
|
|
34
|
+
|
|
35
|
+
### name
|
|
36
|
+
|
|
37
|
+
`string`
|
|
38
|
+
|
|
39
|
+
The name of the new file or directory at the destination (e.g., `report.txt`).
|
|
40
|
+
|
|
41
|
+
### wallet
|
|
42
|
+
|
|
43
|
+
`PublicKey`
|
|
44
|
+
|
|
45
|
+
The wallet public key used to sign and authorize the transaction.
|
|
46
|
+
|
|
47
|
+
## Returns
|
|
48
|
+
|
|
49
|
+
`Promise`\<`Transaction`\>
|
|
50
|
+
|
|
51
|
+
A Promise that resolves to a Solana `Transaction` object containing the copyPath instruction.
|
|
52
|
+
|
|
53
|
+
## Throws
|
|
54
|
+
|
|
55
|
+
Will throw an error if `srcPath` or `destPath` contains invalid characters.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**Xandeum Web3 Library v1.
|
|
1
|
+
[**Xandeum Web3 Library v1.12.0**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **unsubscribeResult**(`connection`, `subscriptionId`): `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [webSocket.ts:
|
|
11
|
+
Defined in: [webSocket.ts:103](https://github.com/Xandeum/test_web3/blob/main/src/webSocket.ts#L103)
|
|
12
12
|
|
|
13
13
|
Sends a WebSocket JSON-RPC message to unsubscribe from a previously subscribed transaction result
|
|
14
14
|
using the `xandeumResultUnsubscribed` method (note: custom method, ensure server-side implementation matches).
|
package/docs/markdown/globals.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
[**Xandeum Web3 Library v1.
|
|
1
|
+
[**Xandeum Web3 Library v1.12.0**](README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
5
|
-
# Xandeum Web3 Library v1.
|
|
5
|
+
# Xandeum Web3 Library v1.12.0
|
|
6
6
|
|
|
7
7
|
## Functions
|
|
8
8
|
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
- [createFile](functions/createFile.md)
|
|
14
14
|
- [exists](functions/exists.md)
|
|
15
15
|
- [getMetadata](functions/getMetadata.md)
|
|
16
|
+
- [getXandeumResult](functions/getXandeumResult.md)
|
|
16
17
|
- [listDirectoryEntry](functions/listDirectoryEntry.md)
|
|
18
|
+
- [move](functions/move.md)
|
|
17
19
|
- [peek](functions/peek.md)
|
|
18
20
|
- [poke](functions/poke.md)
|
|
19
21
|
- [removeDirectory](functions/removeDirectory.md)
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xandeum/web3.js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Xandeum javascript api",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
|
-
"deploy-docs": "typedoc && gh-pages -d docs"
|
|
9
|
+
"deploy-docs": "typedoc && gh-pages -d docs/html"
|
|
10
10
|
},
|
|
11
11
|
"author": "",
|
|
12
12
|
"license": "Apache-2.0",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Transaction, TransactionInstruction, PublicKey } from '@solana/web3.js'
|
|
2
|
+
import { programId } from './const'
|
|
3
|
+
import BN from 'bn.js'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Constructs a Solana transaction to assign a co-owner to a file or directory
|
|
7
|
+
* identified by a file system ID (`fsid`).
|
|
8
|
+
*
|
|
9
|
+
* @param fsid - A stringified integer representing the file system ID where the co-owner is to be assigned.
|
|
10
|
+
* @param path - The path within the file system.
|
|
11
|
+
* @param coowner - The public key of the co-owner to be assigned.
|
|
12
|
+
* @param wallet - The public key of the wallet that will sign and authorize the transaction.
|
|
13
|
+
* @returns A Promise that resolves to a Solana `Transaction` object containing the assignCoowner instruction.
|
|
14
|
+
*/
|
|
15
|
+
export async function assignCoowner (
|
|
16
|
+
fsid: string,
|
|
17
|
+
path: string,
|
|
18
|
+
coowner: PublicKey,
|
|
19
|
+
wallet: PublicKey
|
|
20
|
+
): Promise<Transaction> {
|
|
21
|
+
const rest = Buffer.from(`${path}\0${coowner.toString()}`, 'utf-8')
|
|
22
|
+
const instructionData = Buffer.concat([
|
|
23
|
+
Buffer.from(Int8Array.from([14]).buffer),
|
|
24
|
+
Buffer.from(Uint8Array.of(...new BN(fsid).toArray('le', 8))),
|
|
25
|
+
rest
|
|
26
|
+
])
|
|
27
|
+
|
|
28
|
+
const instruction = new TransactionInstruction({
|
|
29
|
+
keys: [
|
|
30
|
+
{
|
|
31
|
+
pubkey: wallet,
|
|
32
|
+
isSigner: true,
|
|
33
|
+
isWritable: true
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
programId: new PublicKey(programId),
|
|
37
|
+
data: instructionData
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
const tx = new Transaction().add(instruction)
|
|
41
|
+
return tx
|
|
42
|
+
}
|
package/src/bigbang.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Transaction, TransactionInstruction, PublicKey } from '@solana/web3.js'
|
|
2
|
+
import BN from 'bn.js'
|
|
2
3
|
import { programId } from './const'
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -7,9 +8,10 @@ import { programId } from './const'
|
|
|
7
8
|
* @param wallet - The public key of the wallet that will sign and authorize the transaction.
|
|
8
9
|
* @returns A Promise that resolves to a Solana `Transaction` object containing the bigbang instruction.
|
|
9
10
|
*/
|
|
10
|
-
export async function bigbang (wallet: PublicKey): Promise<Transaction> {
|
|
11
|
+
export async function bigbang (replica_count:string,wallet: PublicKey): Promise<Transaction> {
|
|
11
12
|
const instructionData = Buffer.concat([
|
|
12
|
-
Buffer.from(Int8Array.from([0]).buffer)
|
|
13
|
+
Buffer.from(Int8Array.from([0]).buffer),
|
|
14
|
+
Buffer.from(Uint8Array.of(...new BN(replica_count).toArray('le', 8)))
|
|
13
15
|
])
|
|
14
16
|
|
|
15
17
|
const instruction = new TransactionInstruction({
|
package/src/index.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from "./removeDirectory";
|
|
|
11
11
|
export * from "./copyPath";
|
|
12
12
|
export * from "./move";
|
|
13
13
|
export * from "./getXandeumResult";
|
|
14
|
+
export * from "./assignCoowner";
|
|
14
15
|
export {exists } from "./exists";
|
|
15
16
|
export {listDirectoryEntry} from "./listDirectoryEntery";
|
|
16
17
|
export {getMetadata} from "./getMetadata";
|
package/typedoc.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--light-code-background: #FFFFFF;
|
|
3
|
-
--dark-code-background: #1E1E1E;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
@media (prefers-color-scheme: light) { :root {
|
|
7
|
-
--code-background: var(--light-code-background);
|
|
8
|
-
} }
|
|
9
|
-
|
|
10
|
-
@media (prefers-color-scheme: dark) { :root {
|
|
11
|
-
--code-background: var(--dark-code-background);
|
|
12
|
-
} }
|
|
13
|
-
|
|
14
|
-
:root[data-theme='light'] {
|
|
15
|
-
--code-background: var(--light-code-background);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:root[data-theme='dark'] {
|
|
19
|
-
--code-background: var(--dark-code-background);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
pre, code { background: var(--code-background); }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
window.navigationData = "eJyNkj0PgjAQhv9LZ6OLcXBWNxPjahyucGIDtKQ9DMb434X4gcJxuN77Pk/Taw83RViRWirwOSQYx86qiSqAzvXsVNqIjLNh1qbTM+VZXUmNjdVyMb9PPgptEg024fhXJMCRK667BmPodybhHoFwZTxG5PyVtfxWRmUbk+Gwp0kFBVYmUODwZyKgCdIWCWIg4PivWJBk9SGfq64t8SvptwRlgZhykmYuYS5l19jMBcxj7i7yg3Yqo7KhB21TUWEhx6Ef2qaCIpQ6RN5o3GMoM+I8nYogK+0ful6pJzw+AFipZAk="
|
package/docs/assets/search.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
window.searchData = "eJyVlk2P2jAQhv+LzxHL5Duc20o9VKp66AWhKiSGjcgHysd2V4j/3nECOMbDdrggxjPvYyl+x56TaJu/nVitT+JQ1LlYhb4j6rSSYiXStkr3Ms+bWjhiaEtc2g111hdN3b3o5OK1r0qsyMq06ySyhDg7BG5b7LdpvSdYlwwXlDXHj59p/0qQrik2qpVpL78Urcz6pv2giGbFc+BvRSkfMlWSi5PvRdd3BGpKcDF72f+QfZqnfUqwZlkusMTdb9/ma92Tn9Au4uKPUh4IoFpmI5oDdQRqmYtoZdW8fWqSu4rnwA9MopN8nPrzoDN0kovrhm2XtcVW/pLdUPYE866CCx7q/6OtGgq+cQSy5btYncSbbDtU4rq78BYJVu4KWebqapv2RWlTVbJWu+VNNox/N5ey3+PBqeKp+mUpnPXScb1FGMFm46yv4jExLlwZemUUAkZACcESgiF0MXIpoWsJXUPoYeRRQs8SeobQx8inhL4l9A1hgFFACQNLGBjCEKOQEoaWMDSEEUYRJYwsYWQIY4xiShhbwtgQooPWCSVMLGFiGkD5AUjvgG0euHPPaB/aP4SBTAeB8gWQHgLbRGC6CJQ3gPQR2EYC00mg/AGkl8A202Vp7F5s217m36cuxuabzxwn8efS3svr3XESS/w5n3UzYzTrZ5VTe91mDc0AzQAWQ80Sx/Ey1RBXQ1weZHzqc/12aJanWd4TrN34XGiMrzE+C3OdJTQi0IiAhcBJobrNEZoTak7I4qjJ4PZt5DQ+aFykcRELN40LGhBrQMwDjMOCBiQakLAA06NNHjfMTAw8F0+0+wOHuZN5Vp4e/3szw8zNwLPz7VFuLw/3jDbzM/AMPXvkCd7M2MBwNl4nx+Ioy6JGyXpzPv8DcZ0xZw==";
|
|
@@ -1,6 +0,0 @@
|
|
|
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>armageddon | Xandeum Web3 Library - v9.0.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 - v9.0.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">armageddon</a></li></ul><h1>Function armageddon</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="armageddon"><span class="tsd-kind-call-signature">armageddon</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">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="#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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Constructs a Solana transaction that triggers the "armageddon" instruction
|
|
2
|
-
on the specified file system ID (fsid).</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 to be used in the instruction.</p>
|
|
4
|
-
</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>
|
|
5
|
-
</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 armageddon instruction.</p>
|
|
6
|
-
<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/armageddon.ts#L13">armageddon.ts:13</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 - v9.0.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>
|
|
@@ -1,4 +0,0 @@
|
|
|
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>bigbang | Xandeum Web3 Library - v9.0.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 - v9.0.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">bigbang</a></li></ul><h1>Function bigbang</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="bigbang"><span class="tsd-kind-call-signature">bigbang</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="#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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Constructs a Solana transaction that triggers the "bigbang" instruction and create new file system.</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">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>
|
|
3
|
-
</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 bigbang instruction.</p>
|
|
4
|
-
<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/bigbang.ts#L10">bigbang.ts:10</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 - v9.0.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>
|
|
@@ -1,8 +0,0 @@
|
|
|
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>exists | Xandeum Web3 Library - v9.0.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 - v9.0.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">exists</a></li></ul><h1>Function exists</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="exists"><span class="tsd-kind-call-signature">exists</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">url</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="#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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Sends a JSON-RPC request to the Xandeum RPC endpoint to check if a file or directory exists.</p>
|
|
2
|
-
<p>This function calls the custom RPC method <code>isExist</code>, which should be implemented
|
|
3
|
-
by the backend to validate the existence of metadata (files/directories) at a given path.</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">path</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The filesystem path to check (e.g., <code>/documents/myfile.txt</code>).</p>
|
|
5
|
-
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">url</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The full URL of the 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></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 RPC response JSON, typically including a <code>result</code> field
|
|
7
|
-
indicating existence (e.g., <code>true</code> or <code>false</code>), or <code>null</code> if not found.</p>
|
|
8
|
-
<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/exists.ts#L22">exists.ts:22</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 - v9.0.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>
|
|
@@ -1,10 +0,0 @@
|
|
|
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>getMetadata | Xandeum Web3 Library - v9.0.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 - v9.0.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">getMetadata</a></li></ul><h1>Function getMetadata</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getmetadata"><span class="tsd-kind-call-signature">getMetadata</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">url</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="#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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Sends a JSON-RPC request to the Xandeum RPC endpoint to retrieve metadata
|
|
2
|
-
about a file or directory at the given path.</p>
|
|
3
|
-
<p>This function calls the custom RPC method <code>getMetadata</code>, which is implemented
|
|
4
|
-
by the backend to return metadata such as type (file or directory), size,
|
|
5
|
-
timestamps etc.</p>
|
|
6
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><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 to query metadata for (e.g., <code>/documents/myfile.txt</code>).</p>
|
|
7
|
-
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">url</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The full URL of the Xandeum-compatible JSON-RPC endpoint (e.g., <code>'https://api.devnet.solana.com'</code>).</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">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,
|
|
9
|
-
typically containing a <code>result</code> object with metadata fields.</p>
|
|
10
|
-
<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/getMetadata.ts#L24">getMetadata.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 - v9.0.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>
|