@xandeum/web3.js 1.3.0 → 1.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.
- package/README.md +4 -4
- package/dist/webSocket.d.ts +1 -1
- package/dist/webSocket.js +1 -1
- package/package.json +1 -1
- package/src/webSocket.ts +2 -2
package/README.md
CHANGED
|
@@ -51,15 +51,15 @@ async function main() {
|
|
|
51
51
|
await sendAndConfirmTransaction(connection, tx1, [signer])
|
|
52
52
|
|
|
53
53
|
// Create a file
|
|
54
|
-
const tx2 = await createFile('1', '/
|
|
54
|
+
const tx2 = await createFile('1', '/','hello.txt', wallet)
|
|
55
55
|
await sendAndConfirmTransaction(connection, tx2, [signer])
|
|
56
56
|
|
|
57
57
|
// Write data
|
|
58
|
-
const tx3 = await poke('1', '/
|
|
58
|
+
const tx3 = await poke('1', '/hello.txt', 0, Buffer.from('Hello Xandeum!'), wallet)
|
|
59
59
|
await sendAndConfirmTransaction(connection, tx3, [signer])
|
|
60
60
|
|
|
61
61
|
// Read data
|
|
62
|
-
const tx4 = await peek('1', '/
|
|
62
|
+
const tx4 = await peek('1', '/hello.txt', 0, 14, wallet)
|
|
63
63
|
await sendAndConfirmTransaction(connection, tx4, [signer])
|
|
64
64
|
}
|
|
65
65
|
```
|
|
@@ -140,7 +140,7 @@ const signer = Keypair.generate()
|
|
|
140
140
|
const wallet = signer.publicKey
|
|
141
141
|
|
|
142
142
|
async function main() {
|
|
143
|
-
const tx = await createFile('1', '/
|
|
143
|
+
const tx = await createFile('1', '/hello.txt', wallet)
|
|
144
144
|
const txSignature = await sendAndConfirmTransaction(connection, tx, [signer])
|
|
145
145
|
|
|
146
146
|
subscribeResult(
|
package/dist/webSocket.d.ts
CHANGED
|
@@ -40,8 +40,8 @@ export declare function subscribeResult(connection: Connection, tx: string, onRe
|
|
|
40
40
|
*
|
|
41
41
|
* This function automatically closes the WebSocket connection after sending the unsubscribe request.
|
|
42
42
|
*
|
|
43
|
-
* @param subscriptionId - The ID of the active subscription you want to cancel.
|
|
44
43
|
* @param connection - The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., `'https://api.devnet.solana.com'`).
|
|
44
|
+
* @param subscriptionId - The ID of the active subscription you want to cancel.
|
|
45
45
|
*/
|
|
46
46
|
export declare function unsubscribeResult(connection: Connection, subscriptionId: string): void;
|
|
47
47
|
export {};
|
package/dist/webSocket.js
CHANGED
|
@@ -67,8 +67,8 @@ function subscribeResult(connection, tx, onResult, onError, onClose) {
|
|
|
67
67
|
*
|
|
68
68
|
* This function automatically closes the WebSocket connection after sending the unsubscribe request.
|
|
69
69
|
*
|
|
70
|
-
* @param subscriptionId - The ID of the active subscription you want to cancel.
|
|
71
70
|
* @param connection - The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., `'https://api.devnet.solana.com'`).
|
|
71
|
+
* @param subscriptionId - The ID of the active subscription you want to cancel.
|
|
72
72
|
*/
|
|
73
73
|
function unsubscribeResult(connection, subscriptionId) {
|
|
74
74
|
var rpcEndpoint = connection.rpcEndpoint;
|
package/package.json
CHANGED
package/src/webSocket.ts
CHANGED
|
@@ -88,9 +88,9 @@ export function subscribeResult (
|
|
|
88
88
|
* using the `xandeumResultUnsubscribed` method (note: custom method, ensure server-side implementation matches).
|
|
89
89
|
*
|
|
90
90
|
* This function automatically closes the WebSocket connection after sending the unsubscribe request.
|
|
91
|
-
*
|
|
92
|
-
* @param subscriptionId - The ID of the active subscription you want to cancel.
|
|
91
|
+
*
|
|
93
92
|
* @param connection - The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., `'https://api.devnet.solana.com'`).
|
|
93
|
+
* @param subscriptionId - The ID of the active subscription you want to cancel.
|
|
94
94
|
*/
|
|
95
95
|
|
|
96
96
|
export function unsubscribeResult(connection: Connection,subscriptionId: string): void {
|