@xandeum/web3.js 1.12.0 → 1.14.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/getXandeumResult.d.ts +15 -0
- package/dist/getXandeumResult.js +95 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -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/getXandeumResult.ts +48 -0
- package/src/index.ts +2 -1
- 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,12 @@
|
|
|
1
|
+
import { Transaction, PublicKey } from '@solana/web3.js';
|
|
2
|
+
/**
|
|
3
|
+
* Constructs a Solana transaction to assign a co-owner to a file or directory
|
|
4
|
+
* identified by a file system ID (`fsid`).
|
|
5
|
+
*
|
|
6
|
+
* @param fsid - A stringified integer representing the file system ID where the co-owner is to be assigned.
|
|
7
|
+
* @param path - The path within the file system.
|
|
8
|
+
* @param coowner - The public key of the co-owner to be assigned.
|
|
9
|
+
* @param wallet - The public key of the wallet that will sign and authorize the transaction.
|
|
10
|
+
* @returns A Promise that resolves to a Solana `Transaction` object containing the assignCoowner instruction.
|
|
11
|
+
*/
|
|
12
|
+
export declare function assignCoowner(fsid: string, path: string, coowner: PublicKey, wallet: PublicKey): Promise<Transaction>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.assignCoowner = assignCoowner;
|
|
43
|
+
var web3_js_1 = require("@solana/web3.js");
|
|
44
|
+
var const_1 = require("./const");
|
|
45
|
+
var bn_js_1 = __importDefault(require("bn.js"));
|
|
46
|
+
/**
|
|
47
|
+
* Constructs a Solana transaction to assign a co-owner to a file or directory
|
|
48
|
+
* identified by a file system ID (`fsid`).
|
|
49
|
+
*
|
|
50
|
+
* @param fsid - A stringified integer representing the file system ID where the co-owner is to be assigned.
|
|
51
|
+
* @param path - The path within the file system.
|
|
52
|
+
* @param coowner - The public key of the co-owner to be assigned.
|
|
53
|
+
* @param wallet - The public key of the wallet that will sign and authorize the transaction.
|
|
54
|
+
* @returns A Promise that resolves to a Solana `Transaction` object containing the assignCoowner instruction.
|
|
55
|
+
*/
|
|
56
|
+
function assignCoowner(fsid, path, coowner, wallet) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
58
|
+
var rest, instructionData, instruction, tx;
|
|
59
|
+
return __generator(this, function (_a) {
|
|
60
|
+
rest = Buffer.from("".concat(path, "\0").concat(coowner.toString()), 'utf-8');
|
|
61
|
+
instructionData = Buffer.concat([
|
|
62
|
+
Buffer.from(Int8Array.from([14]).buffer),
|
|
63
|
+
Buffer.from(Uint8Array.of.apply(Uint8Array, new bn_js_1.default(fsid).toArray('le', 8))),
|
|
64
|
+
rest
|
|
65
|
+
]);
|
|
66
|
+
instruction = new web3_js_1.TransactionInstruction({
|
|
67
|
+
keys: [
|
|
68
|
+
{
|
|
69
|
+
pubkey: wallet,
|
|
70
|
+
isSigner: true,
|
|
71
|
+
isWritable: true
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
programId: new web3_js_1.PublicKey(const_1.programId),
|
|
75
|
+
data: instructionData
|
|
76
|
+
});
|
|
77
|
+
tx = new web3_js_1.Transaction().add(instruction);
|
|
78
|
+
return [2 /*return*/, tx];
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Connection } from "@solana/web3.js";
|
|
2
|
+
/**
|
|
3
|
+
* Sends a JSON-RPC request to the Xandeum-compatible endpoint to retrieve
|
|
4
|
+
* the result of a transaction previously submitted with a specific signature.
|
|
5
|
+
*
|
|
6
|
+
* This function calls the custom RPC method `getXandeumResult`, which returns
|
|
7
|
+
* the result associated with the given transaction signature.
|
|
8
|
+
*
|
|
9
|
+
* @param connection - The Solana web3 connection object pointing to a Xandeum-compatible RPC endpoint.
|
|
10
|
+
* @param signature - The transaction signature string whose result should be queried.
|
|
11
|
+
*
|
|
12
|
+
* @returns A `Promise<any>` resolving to the parsed JSON response from the RPC server,
|
|
13
|
+
* which includes the result of the transaction if available.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getXandeumResult(connection: Connection, signature: string): Promise<any>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.getXandeumResult = getXandeumResult;
|
|
40
|
+
function sleep(ms) {
|
|
41
|
+
return new Promise(function (resolve) { return setTimeout(resolve, ms); });
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Sends a JSON-RPC request to the Xandeum-compatible endpoint to retrieve
|
|
45
|
+
* the result of a transaction previously submitted with a specific signature.
|
|
46
|
+
*
|
|
47
|
+
* This function calls the custom RPC method `getXandeumResult`, which returns
|
|
48
|
+
* the result associated with the given transaction signature.
|
|
49
|
+
*
|
|
50
|
+
* @param connection - The Solana web3 connection object pointing to a Xandeum-compatible RPC endpoint.
|
|
51
|
+
* @param signature - The transaction signature string whose result should be queried.
|
|
52
|
+
*
|
|
53
|
+
* @returns A `Promise<any>` resolving to the parsed JSON response from the RPC server,
|
|
54
|
+
* which includes the result of the transaction if available.
|
|
55
|
+
*/
|
|
56
|
+
function getXandeumResult(connection, signature) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
58
|
+
var url, requestBody, response, errorText, data;
|
|
59
|
+
return __generator(this, function (_a) {
|
|
60
|
+
switch (_a.label) {
|
|
61
|
+
case 0:
|
|
62
|
+
url = connection.rpcEndpoint;
|
|
63
|
+
requestBody = {
|
|
64
|
+
jsonrpc: '2.0',
|
|
65
|
+
id: 1,
|
|
66
|
+
method: 'getXandeumResult',
|
|
67
|
+
params: [signature]
|
|
68
|
+
};
|
|
69
|
+
// sleeping To let the transaction process
|
|
70
|
+
return [4 /*yield*/, sleep(5000)];
|
|
71
|
+
case 1:
|
|
72
|
+
// sleeping To let the transaction process
|
|
73
|
+
_a.sent();
|
|
74
|
+
return [4 /*yield*/, fetch(url, {
|
|
75
|
+
method: 'POST',
|
|
76
|
+
headers: {
|
|
77
|
+
'Content-Type': 'application/json'
|
|
78
|
+
},
|
|
79
|
+
body: JSON.stringify(requestBody)
|
|
80
|
+
})];
|
|
81
|
+
case 2:
|
|
82
|
+
response = _a.sent();
|
|
83
|
+
if (!!response.ok) return [3 /*break*/, 4];
|
|
84
|
+
return [4 /*yield*/, response.text()];
|
|
85
|
+
case 3:
|
|
86
|
+
errorText = _a.sent();
|
|
87
|
+
return [2 /*return*/, new Error("Error! status: ".concat(response.status, ", message: ").concat(errorText))];
|
|
88
|
+
case 4: return [4 /*yield*/, response.json()];
|
|
89
|
+
case 5:
|
|
90
|
+
data = _a.sent();
|
|
91
|
+
return [2 /*return*/, data];
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export * from "./poke";
|
|
|
10
10
|
export * from "./removeDirectory";
|
|
11
11
|
export * from "./copyPath";
|
|
12
12
|
export * from "./move";
|
|
13
|
+
export * from "./getXandeumResult";
|
|
14
|
+
export * from "./assignCoowner";
|
|
13
15
|
export { exists } from "./exists";
|
|
14
16
|
export { listDirectoryEntry } from "./listDirectoryEntery";
|
|
15
17
|
export { getMetadata } from "./getMetadata";
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,8 @@ __exportStar(require("./poke"), exports);
|
|
|
28
28
|
__exportStar(require("./removeDirectory"), exports);
|
|
29
29
|
__exportStar(require("./copyPath"), exports);
|
|
30
30
|
__exportStar(require("./move"), exports);
|
|
31
|
+
__exportStar(require("./getXandeumResult"), exports);
|
|
32
|
+
__exportStar(require("./assignCoowner"), exports);
|
|
31
33
|
var exists_1 = require("./exists");
|
|
32
34
|
Object.defineProperty(exports, "exists", { enumerable: true, get: function () { return exists_1.exists; } });
|
|
33
35
|
var listDirectoryEntery_1 = require("./listDirectoryEntery");
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--light-hl-0: #795E26;
|
|
3
|
+
--dark-hl-0: #DCDCAA;
|
|
4
|
+
--light-hl-1: #000000;
|
|
5
|
+
--dark-hl-1: #D4D4D4;
|
|
6
|
+
--light-hl-2: #A31515;
|
|
7
|
+
--dark-hl-2: #CE9178;
|
|
8
|
+
--light-hl-3: #001080;
|
|
9
|
+
--dark-hl-3: #9CDCFE;
|
|
10
|
+
--light-hl-4: #AF00DB;
|
|
11
|
+
--dark-hl-4: #C586C0;
|
|
12
|
+
--light-hl-5: #0000FF;
|
|
13
|
+
--dark-hl-5: #569CD6;
|
|
14
|
+
--light-hl-6: #0070C1;
|
|
15
|
+
--dark-hl-6: #4FC1FF;
|
|
16
|
+
--light-hl-7: #CD3131;
|
|
17
|
+
--dark-hl-7: #F44747;
|
|
18
|
+
--light-hl-8: #008000;
|
|
19
|
+
--dark-hl-8: #6A9955;
|
|
20
|
+
--light-hl-9: #098658;
|
|
21
|
+
--dark-hl-9: #B5CEA8;
|
|
22
|
+
--light-code-background: #FFFFFF;
|
|
23
|
+
--dark-code-background: #1E1E1E;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media (prefers-color-scheme: light) { :root {
|
|
27
|
+
--hl-0: var(--light-hl-0);
|
|
28
|
+
--hl-1: var(--light-hl-1);
|
|
29
|
+
--hl-2: var(--light-hl-2);
|
|
30
|
+
--hl-3: var(--light-hl-3);
|
|
31
|
+
--hl-4: var(--light-hl-4);
|
|
32
|
+
--hl-5: var(--light-hl-5);
|
|
33
|
+
--hl-6: var(--light-hl-6);
|
|
34
|
+
--hl-7: var(--light-hl-7);
|
|
35
|
+
--hl-8: var(--light-hl-8);
|
|
36
|
+
--hl-9: var(--light-hl-9);
|
|
37
|
+
--code-background: var(--light-code-background);
|
|
38
|
+
} }
|
|
39
|
+
|
|
40
|
+
@media (prefers-color-scheme: dark) { :root {
|
|
41
|
+
--hl-0: var(--dark-hl-0);
|
|
42
|
+
--hl-1: var(--dark-hl-1);
|
|
43
|
+
--hl-2: var(--dark-hl-2);
|
|
44
|
+
--hl-3: var(--dark-hl-3);
|
|
45
|
+
--hl-4: var(--dark-hl-4);
|
|
46
|
+
--hl-5: var(--dark-hl-5);
|
|
47
|
+
--hl-6: var(--dark-hl-6);
|
|
48
|
+
--hl-7: var(--dark-hl-7);
|
|
49
|
+
--hl-8: var(--dark-hl-8);
|
|
50
|
+
--hl-9: var(--dark-hl-9);
|
|
51
|
+
--code-background: var(--dark-code-background);
|
|
52
|
+
} }
|
|
53
|
+
|
|
54
|
+
:root[data-theme='light'] {
|
|
55
|
+
--hl-0: var(--light-hl-0);
|
|
56
|
+
--hl-1: var(--light-hl-1);
|
|
57
|
+
--hl-2: var(--light-hl-2);
|
|
58
|
+
--hl-3: var(--light-hl-3);
|
|
59
|
+
--hl-4: var(--light-hl-4);
|
|
60
|
+
--hl-5: var(--light-hl-5);
|
|
61
|
+
--hl-6: var(--light-hl-6);
|
|
62
|
+
--hl-7: var(--light-hl-7);
|
|
63
|
+
--hl-8: var(--light-hl-8);
|
|
64
|
+
--hl-9: var(--light-hl-9);
|
|
65
|
+
--code-background: var(--light-code-background);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:root[data-theme='dark'] {
|
|
69
|
+
--hl-0: var(--dark-hl-0);
|
|
70
|
+
--hl-1: var(--dark-hl-1);
|
|
71
|
+
--hl-2: var(--dark-hl-2);
|
|
72
|
+
--hl-3: var(--dark-hl-3);
|
|
73
|
+
--hl-4: var(--dark-hl-4);
|
|
74
|
+
--hl-5: var(--dark-hl-5);
|
|
75
|
+
--hl-6: var(--dark-hl-6);
|
|
76
|
+
--hl-7: var(--dark-hl-7);
|
|
77
|
+
--hl-8: var(--dark-hl-8);
|
|
78
|
+
--hl-9: var(--dark-hl-9);
|
|
79
|
+
--code-background: var(--dark-code-background);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.hl-0 { color: var(--hl-0); }
|
|
83
|
+
.hl-1 { color: var(--hl-1); }
|
|
84
|
+
.hl-2 { color: var(--hl-2); }
|
|
85
|
+
.hl-3 { color: var(--hl-3); }
|
|
86
|
+
.hl-4 { color: var(--hl-4); }
|
|
87
|
+
.hl-5 { color: var(--hl-5); }
|
|
88
|
+
.hl-6 { color: var(--hl-6); }
|
|
89
|
+
.hl-7 { color: var(--hl-7); }
|
|
90
|
+
.hl-8 { color: var(--hl-8); }
|
|
91
|
+
.hl-9 { color: var(--hl-9); }
|
|
92
|
+
pre, code { background: var(--code-background); }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window.navigationData = "eJyNk8FOwzAMht8l5wkuiMPOjBsS4oSEdnAb00VtnCpx0KaJd6cRsLLV8bj6/7+vkeW+HQ3jns3aQPTQobWBzMqMwLtp9p6pZRco3c7pzY79MFV6R9as7+8+VydF47oGqJP4n0iB2zAengsm0L+ZhkcExgcXseUQD6LlvHJV9ugGrHtKqihw7xInCf9OFLRDfkIGCwwS/yfWJa9AFrN/wZQHrpjOOopumN582tyGWN7wsqUoffgQ11vmCjYi9hJW5hoWevFrZa5gEctz1LO6qFyV1c5qTlUFgcfafzKniiLlJrXRNVg/jIuKIsv0D92itBBuvwCmQJJv"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window.searchData = "eJyVlluP2jAQRv+LnyOWyY2E57ZSHypVfagqIVQFYtiIXFAu210h/nvHCWAbD+3wssKe+U5YcuLMSbTNn04sVydxKOpcLOPQE3VWSbEUWVtle5nnTS08MbQlbu2GetsXTd296OLsta9K7NiWWddJZAlx9gjcpthvsnpPsC4VLmjbHD++Z/0rQbqW2KhWZr38VLRy2zftB0W0O54DfylK+ZCpilycfC+6viNQU4GL2cv+m+yzPOszgmVUnwD+yupcDtUP2Q1lT1OtFi66xH/s9rN/rnvy7rhNXHzVvFG3Rm1zEUcpDwRCbbMRzYH6Fmqbi2il+s7/Uviu4znwA4V1kY9THx48t7rIxXXDptu2xUY+FO+ugwse6v+jnR4KvvYEsuW7WJ7Em2w7TOK+PwtmKXbuClnm6uCdrovRpqpkra6WN9th/Li+tP0cb5xqnrpf5sJbzT0/nCVhul57q2t4LIwbV4beGYOAK6CC4ATBCvq48qmg7wR9KxjgKqCCgRMMrGCIq5AKhk4wtIIRriIqGDnByArGuIqpYOwEYyu4wNWCCi6c4MIKJrhKqGDiBBMriAatUiqYOsHUFkD5AKQ74MoDd/aM+tD+EALZBoHyAkiHwJUIbItAuQGkR+CKBLZJoPwA0iVwZQLbJlCOAOkTuEKBbRQoT4B0ClypLlvjuYEHRi/zr9P5gY+9OYudxO/LwTK/nlonMcc/57M+RnBlnCSqpq51m8E0AzQDWAw1Yx3HY1xDfA3xeZBxBMr1W0uzAs0KnmDtxheVxoQaE7Iw1xlLIyKNiFgInHWq23ylObHmxFzO+zQztZdXkIYtNGzBgqkZ6fZDy2mQ0rhE4xIWbhqcNCDVgJQFmMYmQ0DDYuBpPI1NBsKUmGfxNMCQAoJhM/B0nmj3CoKhMvBcngah+8cLDJmBZ/NtQHENAsNr4IltDDwEz/AbGILjAXcsjrIsaoys1ufzX6+Vu4k=";
|
|
@@ -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>armageddon | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">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 (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 - v1.12.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,4 @@
|
|
|
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 - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">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 - 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>
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>copyPath | Xandeum Web3 Library -
|
|
2
|
-
<p>The payload includes:</p>
|
|
3
|
-
<ul>
|
|
4
|
-
<li>Opcode <code>9</code> (1 byte)</li>
|
|
5
|
-
<li>Filesystem ID (<code>fsid</code>) encoded as 8 bytes little-endian</li>
|
|
6
|
-
<li>UTF-8 encoded <code>srcPath\0destPath</code></li>
|
|
7
|
-
</ul>
|
|
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>copyPath | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">copyPath</a></li></ul><h1>Function copyPath</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="copypath"><span class="tsd-kind-call-signature">copyPath</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">fsid</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">srcPath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">destPath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">wallet</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span><a href="#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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Constructs a Solana transaction to copy a file or directory from one path to another.</p>
|
|
8
2
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fsid</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The unique numeric identifier representing the target file system.</p>
|
|
9
3
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">srcPath</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The source path to copy from (e.g., <code>/documents/report.txt</code>).</p>
|
|
10
4
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">destPath</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The destination path to copy to (e.g., <code>/archive/report.txt</code>).</p>
|
|
11
5
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">wallet</span>: <span class="tsd-signature-type">PublicKey</span></span><div class="tsd-comment tsd-typography"><p>The wallet public key used to sign and authorize the transaction.</p>
|
|
12
6
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span></h4><p>A Promise that resolves to a Solana <code>Transaction</code> object containing the copyPath instruction.</p>
|
|
13
7
|
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Will throw an error if <code>srcPath</code> or <code>destPath</code> contains invalid characters.</p>
|
|
14
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/copyPath.ts#
|
|
8
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/copyPath.ts#L18">copyPath.ts:18</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Xandeum Web3 Library - v1.12.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>createDirectory | Xandeum Web3 Library -
|
|
2
|
-
<p>The function builds the transaction instruction with:</p>
|
|
3
|
-
<ul>
|
|
4
|
-
<li>Instruction byte <code>6</code></li>
|
|
5
|
-
<li>FSID encoded as 8-byte little-endian</li>
|
|
6
|
-
<li>UTF-8 encoded <code>path\0name</code> payload</li>
|
|
7
|
-
</ul>
|
|
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>createDirectory | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">createDirectory</a></li></ul><h1>Function createDirectory</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="createdirectory"><span class="tsd-kind-call-signature">createDirectory</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">fsid</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">wallet</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span><a href="#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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Constructs a Solana transaction to create a new directory within a file system.</p>
|
|
8
2
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fsid</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A numeric filesystem identifier used to scope the directory creation.</p>
|
|
9
3
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The parent path where the directory should be created (e.g., <code>/documents</code>).</p>
|
|
10
4
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The name of the new directory (e.g., <code>reports</code>).</p>
|
|
11
5
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">wallet</span>: <span class="tsd-signature-type">PublicKey</span></span><div class="tsd-comment tsd-typography"><p>The signer’s public key that authorizes the transaction.</p>
|
|
12
6
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span></h4><p>A Promise that resolves to a Solana <code>Transaction</code> object containing the createDirectory instruction.</p>
|
|
13
7
|
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Will throw an error if <code>path</code> or <code>name</code> contains invalid characters.@throws Will throw if the combined path is invalid (non-alphanumeric or unsupported characters).</p>
|
|
14
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/createDirectory.ts#
|
|
8
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/createDirectory.ts#L17">createDirectory.ts:17</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Xandeum Web3 Library - v1.12.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>createFile | Xandeum Web3 Library -
|
|
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>createFile | Xandeum Web3 Library - v1.12.0</title><meta name="description" content="Documentation for Xandeum Web3 Library"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Xandeum Web3 Library - v1.12.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">createFile</a></li></ul><h1>Function createFile</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="createfile"><span class="tsd-kind-call-signature">createFile</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">fsid</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">wallet</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span><a href="#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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Constructs a Solana transaction to create a new file
|
|
2
2
|
within a file system, identified by a file system ID (<code>fsid</code>).</p>
|
|
3
|
-
<p>This transaction includes:</p>
|
|
4
|
-
<ul>
|
|
5
|
-
<li>A discriminator byte <code>2</code> to identify the "create file" operation.</li>
|
|
6
|
-
<li>The <code>fsid</code> encoded as a 64-bit little-endian unsigned integer.</li>
|
|
7
|
-
<li>A UTF-8 encoded payload combining the <code>path</code> and <code>name</code>, separated by a null terminator.</li>
|
|
8
|
-
<li>The wallet public key as a signer and writable account.</li>
|
|
9
|
-
</ul>
|
|
10
3
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fsid</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A stringified integer representing the file system ID where the file is to be created.</p>
|
|
11
4
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The absolute or relative path within the file system where the file should be created.</p>
|
|
12
5
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The name of the new file or directory to be created.</p>
|
|
13
6
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">wallet</span>: <span class="tsd-signature-type">PublicKey</span></span><div class="tsd-comment tsd-typography"><p>The public key of the wallet that will sign and authorize the transaction.</p>
|
|
14
7
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">></span></h4><p>A Promise that resolves to a Solana <code>Transaction</code> object containing the createFile instruction.</p>
|
|
15
8
|
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Will throw an error if <code>path</code> or <code>name</code> contains invalid characters.</p>
|
|
16
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/createFile.ts#
|
|
9
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Xandeum/test_web3/blob/main/src/createFile.ts#L17">createFile.ts:17</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Xandeum Web3 Library - v1.12.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|