@xandeum/web3.js 1.2.0 → 1.3.1

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 (117) hide show
  1. package/README.md +9 -6
  2. package/archbee.yaml +55 -0
  3. package/dist/armageddon.js +9 -1
  4. package/dist/assignCoowner.d.ts +12 -0
  5. package/dist/assignCoowner.js +89 -0
  6. package/dist/bigbang.d.ts +2 -1
  7. package/dist/bigbang.js +17 -3
  8. package/dist/const.d.ts +1 -0
  9. package/dist/const.js +2 -1
  10. package/dist/copyPath.js +9 -1
  11. package/dist/createDirectory.js +10 -2
  12. package/dist/createFile.js +10 -2
  13. package/dist/exists.js +7 -5
  14. package/dist/find.d.ts +22 -0
  15. package/dist/find.js +88 -0
  16. package/dist/getMetadata.js +7 -5
  17. package/dist/getXandeumResult.d.ts +15 -0
  18. package/dist/getXandeumResult.js +115 -0
  19. package/dist/helpers.d.ts +56 -0
  20. package/dist/helpers.js +80 -0
  21. package/dist/index.d.ts +5 -0
  22. package/dist/index.js +7 -1
  23. package/dist/listDirectoryEntery.js +7 -5
  24. package/dist/move.d.ts +14 -0
  25. package/dist/move.js +96 -0
  26. package/dist/pdaHelpers.d.ts +57 -0
  27. package/dist/pdaHelpers.js +83 -0
  28. package/dist/peek.js +9 -1
  29. package/dist/poke.js +9 -1
  30. package/dist/removeDirectory.js +9 -1
  31. package/dist/removeFile.js +9 -1
  32. package/dist/renamePath.js +9 -1
  33. package/dist/webSocket.d.ts +1 -1
  34. package/dist/webSocket.js +16 -3
  35. package/docs/html/assets/highlight.css +92 -0
  36. package/docs/html/assets/navigation.js +1 -0
  37. package/docs/html/assets/search.js +1 -0
  38. package/docs/{functions → html/functions}/armageddon.html +3 -3
  39. package/docs/html/functions/assignCoowner.html +8 -0
  40. package/docs/html/functions/bigbang.html +5 -0
  41. package/docs/{functions → html/functions}/copyPath.html +2 -8
  42. package/docs/{functions → html/functions}/createDirectory.html +2 -8
  43. package/docs/{functions → html/functions}/createFile.html +2 -9
  44. package/docs/{functions → html/functions}/exists.html +4 -4
  45. package/docs/html/functions/find.html +10 -0
  46. package/docs/html/functions/getMetadata.html +10 -0
  47. package/docs/html/functions/getXandeumResult.html +9 -0
  48. package/docs/{functions → html/functions}/listDirectoryEntry.html +4 -4
  49. package/docs/html/functions/move.html +9 -0
  50. package/docs/{functions → html/functions}/peek.html +2 -10
  51. package/docs/{functions → html/functions}/poke.html +2 -10
  52. package/docs/{functions → html/functions}/removeDirectory.html +2 -8
  53. package/docs/{functions → html/functions}/removeFile.html +2 -8
  54. package/docs/{functions → html/functions}/renamePath.html +3 -9
  55. package/docs/{functions → html/functions}/subscribeResult.html +4 -4
  56. package/docs/html/functions/unsubscribeResult.html +6 -0
  57. package/docs/{hierarchy.html → html/hierarchy.html} +1 -1
  58. package/docs/html/index.html +62 -0
  59. package/docs/html/modules.html +1 -0
  60. package/docs/markdown/README.md +166 -2
  61. package/docs/markdown/functions/armageddon.md +2 -3
  62. package/docs/markdown/functions/assignCoowner.md +46 -0
  63. package/docs/markdown/functions/bigbang.md +9 -3
  64. package/docs/markdown/functions/copyPath.md +2 -2
  65. package/docs/markdown/functions/createDirectory.md +2 -2
  66. package/docs/markdown/functions/createFile.md +2 -2
  67. package/docs/markdown/functions/exists.md +8 -8
  68. package/docs/markdown/functions/find.md +44 -0
  69. package/docs/markdown/functions/getMetadata.md +8 -8
  70. package/docs/markdown/functions/getXandeumResult.md +38 -0
  71. package/docs/markdown/functions/listDirectoryEntry.md +8 -8
  72. package/docs/markdown/functions/move.md +55 -0
  73. package/docs/markdown/functions/peek.md +2 -2
  74. package/docs/markdown/functions/poke.md +2 -2
  75. package/docs/markdown/functions/removeDirectory.md +2 -2
  76. package/docs/markdown/functions/removeFile.md +2 -2
  77. package/docs/markdown/functions/renamePath.md +2 -2
  78. package/docs/markdown/functions/subscribeResult.md +8 -8
  79. package/docs/markdown/functions/unsubscribeResult.md +8 -8
  80. package/docs/markdown/globals.md +6 -2
  81. package/package.json +3 -3
  82. package/src/armageddon.ts +8 -0
  83. package/src/assignCoowner.ts +49 -0
  84. package/src/bigbang.ts +13 -2
  85. package/src/const.ts +3 -1
  86. package/src/copyPath.ts +8 -1
  87. package/src/createDirectory.ts +9 -2
  88. package/src/createFile.ts +9 -3
  89. package/src/exists.ts +2 -1
  90. package/src/find.ts +53 -0
  91. package/src/getMetadata.ts +2 -1
  92. package/src/getXandeumResult.ts +67 -0
  93. package/src/helpers.ts +85 -0
  94. package/src/index.ts +5 -1
  95. package/src/listDirectoryEntery.ts +2 -1
  96. package/src/move.ts +62 -0
  97. package/src/peek.ts +8 -1
  98. package/src/poke.ts +8 -1
  99. package/src/removeDirectory.ts +8 -2
  100. package/src/removeFile.ts +8 -2
  101. package/src/renamePath.ts +8 -2
  102. package/src/webSocket.ts +18 -5
  103. package/typedoc.json +3 -4
  104. package/docs/assets/highlight.css +0 -22
  105. package/docs/assets/navigation.js +0 -1
  106. package/docs/assets/search.js +0 -1
  107. package/docs/functions/bigbang.html +0 -4
  108. package/docs/functions/getMetadata.html +0 -10
  109. package/docs/functions/unsubscribeResult.html +0 -6
  110. package/docs/index.html +0 -2
  111. package/docs/modules.html +0 -1
  112. /package/docs/{.nojekyll → html/.nojekyll} +0 -0
  113. /package/docs/{assets → html/assets}/hierarchy.js +0 -0
  114. /package/docs/{assets → html/assets}/icons.js +0 -0
  115. /package/docs/{assets → html/assets}/icons.svg +0 -0
  116. /package/docs/{assets → html/assets}/main.js +0 -0
  117. /package/docs/{assets → html/assets}/style.css +0 -0
@@ -0,0 +1,46 @@
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
+
3
+ ***
4
+
5
+ [Xandeum Web3 Library](../globals.md) / assignCoowner
6
+
7
+ # Function: assignCoowner()
8
+
9
+ > **assignCoowner**(`fsid`, `path`, `coowner`, `wallet`): `Promise`\<`Transaction`\>
10
+
11
+ Defined in: [assignCoowner.ts:15](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/assignCoowner.ts#L15)
12
+
13
+ Constructs a Solana transaction to assign a co-owner to a file or directory
14
+ identified by a file system ID (`fsid`).
15
+
16
+ ## Parameters
17
+
18
+ ### fsid
19
+
20
+ `string`
21
+
22
+ A stringified integer representing the file system ID where the co-owner is to be assigned.
23
+
24
+ ### path
25
+
26
+ `string`
27
+
28
+ The path within the file system.
29
+
30
+ ### coowner
31
+
32
+ `PublicKey`
33
+
34
+ The public key of the co-owner to be assigned.
35
+
36
+ ### wallet
37
+
38
+ `PublicKey`
39
+
40
+ The public key of the wallet that will sign and authorize the transaction.
41
+
42
+ ## Returns
43
+
44
+ `Promise`\<`Transaction`\>
45
+
46
+ A Promise that resolves to a Solana `Transaction` object containing the assignCoowner instruction.
@@ -1,4 +1,4 @@
1
- [**Xandeum Web3 Library v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -6,14 +6,20 @@
6
6
 
7
7
  # Function: bigbang()
8
8
 
9
- > **bigbang**(`wallet`): `Promise`\<`Transaction`\>
9
+ > **bigbang**(`replica_count`, `wallet`): `Promise`\<`Transaction`\>
10
10
 
11
- Defined in: [bigbang.ts:10](https://github.com/Xandeum/test_web3/blob/main/src/bigbang.ts#L10)
11
+ Defined in: [bigbang.ts:12](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/bigbang.ts#L12)
12
12
 
13
13
  Constructs a Solana transaction that triggers the "bigbang" instruction and create new file system.
14
14
 
15
15
  ## Parameters
16
16
 
17
+ ### replica\_count
18
+
19
+ `string`
20
+
21
+ A stringified integer representing the number of replicas for the new file system. Must be 2 or greater. The total number of copies will be replica_count + 1 (one original plus the replicas).
22
+
17
23
  ### wallet
18
24
 
19
25
  `PublicKey`
@@ -1,4 +1,4 @@
1
- [**Xandeum Web3 Library v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **copyPath**(`fsid`, `srcPath`, `destPath`, `wallet`): `Promise`\<`Transaction`\>
10
10
 
11
- Defined in: [copyPath.ts:18](https://github.com/Xandeum/test_web3/blob/main/src/copyPath.ts#L18)
11
+ Defined in: [copyPath.ts:18](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/copyPath.ts#L18)
12
12
 
13
13
  Constructs a Solana transaction to copy a file or directory from one path to another.
14
14
 
@@ -1,4 +1,4 @@
1
- [**Xandeum Web3 Library v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **createDirectory**(`fsid`, `path`, `name`, `wallet`): `Promise`\<`Transaction`\>
10
10
 
11
- Defined in: [createDirectory.ts:17](https://github.com/Xandeum/test_web3/blob/main/src/createDirectory.ts#L17)
11
+ Defined in: [createDirectory.ts:17](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/createDirectory.ts#L17)
12
12
 
13
13
  Constructs a Solana transaction to create a new directory within a file system.
14
14
 
@@ -1,4 +1,4 @@
1
- [**Xandeum Web3 Library v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **createFile**(`fsid`, `path`, `name`, `wallet`): `Promise`\<`Transaction`\>
10
10
 
11
- Defined in: [createFile.ts:17](https://github.com/Xandeum/test_web3/blob/main/src/createFile.ts#L17)
11
+ Defined in: [createFile.ts:17](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/createFile.ts#L17)
12
12
 
13
13
  Constructs a Solana transaction to create a new file
14
14
  within a file system, identified by a file system ID (`fsid`).
@@ -1,4 +1,4 @@
1
- [**Xandeum Web3 Library v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -6,9 +6,9 @@
6
6
 
7
7
  # Function: exists()
8
8
 
9
- > **exists**(`path`, `url`): `Promise`\<`any`\>
9
+ > **exists**(`connection`, `path`): `Promise`\<`any`\>
10
10
 
11
- Defined in: [exists.ts:22](https://github.com/Xandeum/test_web3/blob/main/src/exists.ts#L22)
11
+ Defined in: [exists.ts:23](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/exists.ts#L23)
12
12
 
13
13
  Sends a JSON-RPC request to the Xandeum RPC endpoint to check if a file or directory exists.
14
14
 
@@ -17,17 +17,17 @@ by the backend to validate the existence of metadata (files/directories) at a gi
17
17
 
18
18
  ## Parameters
19
19
 
20
- ### path
20
+ ### connection
21
21
 
22
- `string`
22
+ `Connection`
23
23
 
24
- The filesystem path to check (e.g., `/documents/myfile.txt`).
24
+ The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., `'https://api.devnet.solana.com'`).
25
25
 
26
- ### url
26
+ ### path
27
27
 
28
28
  `string`
29
29
 
30
- The full URL of the Xandeum-compatible JSON-RPC endpoint (e.g., `'https://api.devnet.solana.com'`).
30
+ The filesystem path to check (e.g., `/documents/myfile.txt`).
31
31
 
32
32
  ## Returns
33
33
 
@@ -0,0 +1,44 @@
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
+
3
+ ***
4
+
5
+ [Xandeum Web3 Library](../globals.md) / find
6
+
7
+ # Function: find()
8
+
9
+ > **find**(`connection`, `path`, `query`): `Promise`\<`any`\>
10
+
11
+ Defined in: [find.ts:25](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/find.ts#L25)
12
+
13
+ Sends a JSON-RPC request to the Xandeum RPC endpoint to search for a file or directory
14
+ within a specified path.
15
+
16
+ This function calls the custom RPC method `find`, which is return an array of
17
+ directory entry metadata — names, types etc.
18
+
19
+ ## Parameters
20
+
21
+ ### connection
22
+
23
+ `Connection`
24
+
25
+ The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., `'https://api.devnet.solana.com'`).
26
+
27
+ ### path
28
+
29
+ `string`
30
+
31
+ The filesystem path where the search will be performed (e.g., `/documents`).
32
+
33
+ ### query
34
+
35
+ `string`
36
+
37
+ The query to search for (e.g., `'myfile.txt'`).
38
+
39
+ ## Returns
40
+
41
+ `Promise`\<`any`\>
42
+
43
+ A `Promise<any>` resolving to the parsed JSON response from the RPC server,
44
+ typically including a `result` array containing directory entry objects.
@@ -1,4 +1,4 @@
1
- [**Xandeum Web3 Library v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -6,9 +6,9 @@
6
6
 
7
7
  # Function: getMetadata()
8
8
 
9
- > **getMetadata**(`path`, `url`): `Promise`\<`any`\>
9
+ > **getMetadata**(`connection`, `path`): `Promise`\<`any`\>
10
10
 
11
- Defined in: [getMetadata.ts:24](https://github.com/Xandeum/test_web3/blob/main/src/getMetadata.ts#L24)
11
+ Defined in: [getMetadata.ts:26](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/getMetadata.ts#L26)
12
12
 
13
13
  Sends a JSON-RPC request to the Xandeum RPC endpoint to retrieve metadata
14
14
  about a file or directory at the given path.
@@ -19,17 +19,17 @@ timestamps etc.
19
19
 
20
20
  ## Parameters
21
21
 
22
- ### path
22
+ ### connection
23
23
 
24
- `string`
24
+ `Connection`
25
25
 
26
- The filesystem path to query metadata for (e.g., `/documents/myfile.txt`).
26
+ The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., `'https://api.devnet.solana.com'`).
27
27
 
28
- ### url
28
+ ### path
29
29
 
30
30
  `string`
31
31
 
32
- The full URL of the Xandeum-compatible JSON-RPC endpoint (e.g., `'https://api.devnet.solana.com'`).
32
+ The filesystem path to query metadata for (e.g., `/documents/myfile.txt`).
33
33
 
34
34
  ## Returns
35
35
 
@@ -0,0 +1,38 @@
1
+ [**Xandeum Web3 Library v0.8.1**](../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/xandeum-web3.js/blob/reinheim/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.
@@ -1,4 +1,4 @@
1
- [**Xandeum Web3 Library v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -6,9 +6,9 @@
6
6
 
7
7
  # Function: listDirectoryEntry()
8
8
 
9
- > **listDirectoryEntry**(`path`, `url`): `Promise`\<`any`\>
9
+ > **listDirectoryEntry**(`connection`, `path`): `Promise`\<`any`\>
10
10
 
11
- Defined in: [listDirectoryEntery.ts:22](https://github.com/Xandeum/test_web3/blob/main/src/listDirectoryEntery.ts#L22)
11
+ Defined in: [listDirectoryEntery.ts:24](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/listDirectoryEntery.ts#L24)
12
12
 
13
13
  Sends a JSON-RPC request to the Xandeum RPC endpoint to list all entries (files and subdirectories)
14
14
  within a specified path.
@@ -18,17 +18,17 @@ directory entry metadata — names, types etc.
18
18
 
19
19
  ## Parameters
20
20
 
21
- ### path
21
+ ### connection
22
22
 
23
- `string`
23
+ `Connection`
24
24
 
25
- The filesystem path representing the directory to list (e.g., `/documents`).
25
+ The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., `'https://api.devnet.solana.com'`).
26
26
 
27
- ### url
27
+ ### path
28
28
 
29
29
  `string`
30
30
 
31
- The full URL of the Xandeum-compatible JSON-RPC endpoint (e.g., `'https://api.devnet.solana.com'`).
31
+ The filesystem path representing the directory to list (e.g., `/documents`).
32
32
 
33
33
  ## Returns
34
34
 
@@ -0,0 +1,55 @@
1
+ [**Xandeum Web3 Library v0.8.1**](../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/xandeum-web3.js/blob/reinheim/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 v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **peek**(`fsid`, `path`, `startPosition`, `endPosition`, `wallet`): `Promise`\<`Transaction`\>
10
10
 
11
- Defined in: [peek.ts:20](https://github.com/Xandeum/test_web3/blob/main/src/peek.ts#L20)
11
+ Defined in: [peek.ts:20](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/peek.ts#L20)
12
12
 
13
13
  Constructs a Solana transaction to perform a "peek" operation on a file within a file system.
14
14
 
@@ -1,4 +1,4 @@
1
- [**Xandeum Web3 Library v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **poke**(`fsid`, `path`, `position`, `wallet`, `dataKey`): `Promise`\<`Transaction`\>
10
10
 
11
- Defined in: [poke.ts:19](https://github.com/Xandeum/test_web3/blob/main/src/poke.ts#L19)
11
+ Defined in: [poke.ts:19](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/poke.ts#L19)
12
12
 
13
13
  Constructs a Solana transaction to perform a poke\operation, which writes data
14
14
  to a file at the specified path and byte position.
@@ -1,4 +1,4 @@
1
- [**Xandeum Web3 Library v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **removeDirectory**(`fsid`, `path`, `wallet`): `Promise`\<`Transaction`\>
10
10
 
11
- Defined in: [removeDirectory.ts:17](https://github.com/Xandeum/test_web3/blob/main/src/removeDirectory.ts#L17)
11
+ Defined in: [removeDirectory.ts:17](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/removeDirectory.ts#L17)
12
12
 
13
13
  Constructs a Solana transaction to perform a "remove directory" operation
14
14
  in a file system, identified by a file system ID (`fsid`).
@@ -1,4 +1,4 @@
1
- [**Xandeum Web3 Library v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **removeFile**(`fsid`, `path`, `wallet`): `Promise`\<`Transaction`\>
10
10
 
11
- Defined in: [removeFile.ts:17](https://github.com/Xandeum/test_web3/blob/main/src/removeFile.ts#L17)
11
+ Defined in: [removeFile.ts:17](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/removeFile.ts#L17)
12
12
 
13
13
  Constructs a Solana transaction to remove a file from a file system,
14
14
  identified by a file system ID (`fsid`) and a UTF-8 encoded file path.
@@ -1,4 +1,4 @@
1
- [**Xandeum Web3 Library v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **renamePath**(`fsid`, `oldPath`, `name`, `wallet`): `Promise`\<`Transaction`\>
10
10
 
11
- Defined in: [renamePath.ts:18](https://github.com/Xandeum/test_web3/blob/main/src/renamePath.ts#L18)
11
+ Defined in: [renamePath.ts:18](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/renamePath.ts#L18)
12
12
 
13
13
  Constructs a Solana transaction to rename (or move) a file or directory
14
14
  within a file system, based on a provided file system ID (`fsid`).
@@ -1,4 +1,4 @@
1
- [**Xandeum Web3 Library v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -6,9 +6,9 @@
6
6
 
7
7
  # Function: subscribeResult()
8
8
 
9
- > **subscribeResult**(`tx`, `wsUrl`, `onResult`, `onError?`, `onClose?`): `void`
9
+ > **subscribeResult**(`connection`, `tx`, `onResult`, `onError?`, `onClose?`): `void`
10
10
 
11
- Defined in: [webSocket.ts:38](https://github.com/Xandeum/test_web3/blob/main/src/webSocket.ts#L38)
11
+ Defined in: [webSocket.ts:40](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/src/webSocket.ts#L40)
12
12
 
13
13
  Opens a WebSocket connection and subscribes to the result of a transaction
14
14
  via the custom `xandeumResultSubscribe` method.
@@ -25,17 +25,17 @@ if a valid result with `fsid`, `status`, or `data` is received.
25
25
 
26
26
  ## Parameters
27
27
 
28
- ### tx
28
+ ### connection
29
29
 
30
- `string`
30
+ `Connection`
31
31
 
32
- The transaction ID you want to listen for results from.
32
+ The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., `'https://api.devnet.solana.com'`).
33
33
 
34
- ### wsUrl
34
+ ### tx
35
35
 
36
36
  `string`
37
37
 
38
- The full WebSocket endpoint (e.g., `wss://...`) to connect to.
38
+ The transaction ID you want to listen for results from.
39
39
 
40
40
  ### onResult
41
41
 
@@ -1,4 +1,4 @@
1
- [**Xandeum Web3 Library v9.2.0**](../README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -6,9 +6,9 @@
6
6
 
7
7
  # Function: unsubscribeResult()
8
8
 
9
- > **unsubscribeResult**(`subscriptionId`, `wsUrl`): `void`
9
+ > **unsubscribeResult**(`connection`, `subscriptionId`): `void`
10
10
 
11
- Defined in: [webSocket.ts:93](https://github.com/Xandeum/test_web3/blob/main/src/webSocket.ts#L93)
11
+ Defined in: [webSocket.ts:103](https://github.com/Xandeum/xandeum-web3.js/blob/reinheim/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).
@@ -17,17 +17,17 @@ This function automatically closes the WebSocket connection after sending the un
17
17
 
18
18
  ## Parameters
19
19
 
20
- ### subscriptionId
20
+ ### connection
21
21
 
22
- `string`
22
+ `Connection`
23
23
 
24
- The ID of the active subscription you want to cancel.
24
+ The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., `'https://api.devnet.solana.com'`).
25
25
 
26
- ### wsUrl
26
+ ### subscriptionId
27
27
 
28
28
  `string`
29
29
 
30
- The WebSocket endpoint (e.g., `wss://...`) to connect to for unsubscribing.
30
+ The ID of the active subscription you want to cancel.
31
31
 
32
32
  ## Returns
33
33
 
@@ -1,19 +1,23 @@
1
- [**Xandeum Web3 Library v9.2.0**](README.md)
1
+ [**Xandeum Web3 Library v0.8.1**](README.md)
2
2
 
3
3
  ***
4
4
 
5
- # Xandeum Web3 Library v9.2.0
5
+ # Xandeum Web3 Library v0.8.1
6
6
 
7
7
  ## Functions
8
8
 
9
9
  - [armageddon](functions/armageddon.md)
10
+ - [assignCoowner](functions/assignCoowner.md)
10
11
  - [bigbang](functions/bigbang.md)
11
12
  - [copyPath](functions/copyPath.md)
12
13
  - [createDirectory](functions/createDirectory.md)
13
14
  - [createFile](functions/createFile.md)
14
15
  - [exists](functions/exists.md)
16
+ - [find](functions/find.md)
15
17
  - [getMetadata](functions/getMetadata.md)
18
+ - [getXandeumResult](functions/getXandeumResult.md)
16
19
  - [listDirectoryEntry](functions/listDirectoryEntry.md)
20
+ - [move](functions/move.md)
17
21
  - [peek](functions/peek.md)
18
22
  - [poke](functions/poke.md)
19
23
  - [removeDirectory](functions/removeDirectory.md)
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@xandeum/web3.js",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
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
- "license": "MIT",
12
+ "license": "Apache-2.0",
13
13
  "publishConfig": {
14
14
  "access": "public"
15
15
  },
package/src/armageddon.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Transaction, TransactionInstruction, PublicKey } from '@solana/web3.js'
2
2
  import BN from 'bn.js'
3
3
  import { programId } from './const.js'
4
+ import { getFeeDistributorPda } from './helpers.js'
4
5
 
5
6
  /**
6
7
  * Constructs a Solana transaction that triggers the "armageddon" instruction
@@ -15,9 +16,11 @@ export async function armageddon (
15
16
  wallet: PublicKey
16
17
  ): Promise<Transaction> {
17
18
  const instructionData = Buffer.concat([
19
+ Buffer.from(Int8Array.from([0]).buffer),
18
20
  Buffer.from(Int8Array.from([1]).buffer),
19
21
  Buffer.from(Uint8Array.of(...new BN(fsid).toArray('le', 8)))
20
22
  ])
23
+ let feeDistributorPda = getFeeDistributorPda()
21
24
 
22
25
  const instruction = new TransactionInstruction({
23
26
  keys: [
@@ -25,6 +28,11 @@ export async function armageddon (
25
28
  pubkey: wallet,
26
29
  isSigner: true,
27
30
  isWritable: true
31
+ },
32
+ {
33
+ pubkey: feeDistributorPda.pda,
34
+ isSigner: false,
35
+ isWritable: true
28
36
  }
29
37
  ],
30
38
  programId: new PublicKey(programId),