@kynesyslabs/demosdk 2.8.21 → 2.8.22
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.
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
import type { StorageProgramPayload, StorageProgramACL, StorageACLMode, StorageEncoding, StorageLocation, StorageGroupPermissions, StorageProgramAccessControl } from "../types/blockchain/TransactionSubtypes/StorageProgramTransaction";
|
|
2
|
+
/**
|
|
3
|
+
* Storage program data returned from RPC queries
|
|
4
|
+
*/
|
|
5
|
+
export interface StorageProgramData {
|
|
6
|
+
storageAddress: string;
|
|
7
|
+
owner: string;
|
|
8
|
+
programName: string;
|
|
9
|
+
encoding: "json" | "binary";
|
|
10
|
+
data?: Record<string, unknown> | string | null;
|
|
11
|
+
metadata?: Record<string, unknown> | null;
|
|
12
|
+
storageLocation: string;
|
|
13
|
+
sizeBytes: number;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Storage program list item (without full data)
|
|
19
|
+
*/
|
|
20
|
+
export interface StorageProgramListItem {
|
|
21
|
+
storageAddress: string;
|
|
22
|
+
programName: string;
|
|
23
|
+
encoding: "json" | "binary";
|
|
24
|
+
sizeBytes: number;
|
|
25
|
+
storageLocation: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
updatedAt: string;
|
|
28
|
+
}
|
|
2
29
|
/**
|
|
3
30
|
* StorageProgram - Unified storage solution for Demos Network
|
|
4
31
|
*
|
|
@@ -384,4 +411,79 @@ export declare class StorageProgram {
|
|
|
384
411
|
* Update access control with legacy mode
|
|
385
412
|
*/
|
|
386
413
|
static updateAccessControlLegacy(storageAddress: string, accessControl: StorageProgramAccessControl, allowedAddresses?: string[]): StorageProgramPayload;
|
|
414
|
+
/**
|
|
415
|
+
* Get a storage program by address
|
|
416
|
+
*
|
|
417
|
+
* @param rpcUrl - The RPC endpoint URL (e.g., "https://node.demos.sh")
|
|
418
|
+
* @param storageAddress - The storage program address (stor-{hash})
|
|
419
|
+
* @param identity - Optional requester identity for ACL-protected programs
|
|
420
|
+
* @returns Storage program data or null if not found
|
|
421
|
+
*
|
|
422
|
+
* @example
|
|
423
|
+
* ```typescript
|
|
424
|
+
* const program = await StorageProgram.getByAddress(
|
|
425
|
+
* 'https://node.demos.sh',
|
|
426
|
+
* 'stor-7a8b9c...'
|
|
427
|
+
* )
|
|
428
|
+
* if (program) {
|
|
429
|
+
* console.log(`Found: ${program.programName}`)
|
|
430
|
+
* }
|
|
431
|
+
* ```
|
|
432
|
+
*/
|
|
433
|
+
static getByAddress(rpcUrl: string, storageAddress: string, identity?: string): Promise<StorageProgramData | null>;
|
|
434
|
+
/**
|
|
435
|
+
* Get all storage programs owned by an address
|
|
436
|
+
*
|
|
437
|
+
* @param rpcUrl - The RPC endpoint URL
|
|
438
|
+
* @param owner - The owner's address
|
|
439
|
+
* @param identity - Optional requester identity for ACL filtering
|
|
440
|
+
* @returns Array of storage program list items
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* ```typescript
|
|
444
|
+
* const programs = await StorageProgram.getByOwner(
|
|
445
|
+
* 'https://node.demos.sh',
|
|
446
|
+
* 'demos1abc...'
|
|
447
|
+
* )
|
|
448
|
+
* console.log(`Found ${programs.length} programs`)
|
|
449
|
+
* ```
|
|
450
|
+
*/
|
|
451
|
+
static getByOwner(rpcUrl: string, owner: string, identity?: string): Promise<StorageProgramListItem[]>;
|
|
452
|
+
/**
|
|
453
|
+
* Search storage programs by name (supports partial matching)
|
|
454
|
+
*
|
|
455
|
+
* @param rpcUrl - The RPC endpoint URL
|
|
456
|
+
* @param nameQuery - The name or partial name to search for
|
|
457
|
+
* @param options - Search options (exactMatch, limit, offset, identity)
|
|
458
|
+
* @returns Array of storage program list items
|
|
459
|
+
*
|
|
460
|
+
* @example
|
|
461
|
+
* ```typescript
|
|
462
|
+
* // Partial match search
|
|
463
|
+
* const results = await StorageProgram.searchByName(
|
|
464
|
+
* 'https://node.demos.sh',
|
|
465
|
+
* 'config' // matches "appConfig", "myConfig", etc.
|
|
466
|
+
* )
|
|
467
|
+
*
|
|
468
|
+
* // Exact match search
|
|
469
|
+
* const exact = await StorageProgram.searchByName(
|
|
470
|
+
* 'https://node.demos.sh',
|
|
471
|
+
* 'myConfig',
|
|
472
|
+
* { exactMatch: true }
|
|
473
|
+
* )
|
|
474
|
+
*
|
|
475
|
+
* // Paginated search
|
|
476
|
+
* const page2 = await StorageProgram.searchByName(
|
|
477
|
+
* 'https://node.demos.sh',
|
|
478
|
+
* 'config',
|
|
479
|
+
* { limit: 10, offset: 10 }
|
|
480
|
+
* )
|
|
481
|
+
* ```
|
|
482
|
+
*/
|
|
483
|
+
static searchByName(rpcUrl: string, nameQuery: string, options?: {
|
|
484
|
+
exactMatch?: boolean;
|
|
485
|
+
limit?: number;
|
|
486
|
+
offset?: number;
|
|
487
|
+
identity?: string;
|
|
488
|
+
}): Promise<StorageProgramListItem[]>;
|
|
387
489
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.StorageProgram = void 0;
|
|
4
7
|
const js_sha256_1 = require("js-sha256");
|
|
8
|
+
const axios_1 = __importDefault(require("axios"));
|
|
5
9
|
const StorageProgramTransaction_1 = require("../types/blockchain/TransactionSubtypes/StorageProgramTransaction");
|
|
6
10
|
// REVIEW: Unified Storage Program class for both JSON and Binary storage with robust ACL
|
|
7
11
|
/**
|
|
@@ -538,6 +542,139 @@ class StorageProgram {
|
|
|
538
542
|
allowedAddresses,
|
|
539
543
|
};
|
|
540
544
|
}
|
|
545
|
+
// ========================================================================
|
|
546
|
+
// Query Methods (RPC calls)
|
|
547
|
+
// ========================================================================
|
|
548
|
+
/**
|
|
549
|
+
* Get a storage program by address
|
|
550
|
+
*
|
|
551
|
+
* @param rpcUrl - The RPC endpoint URL (e.g., "https://node.demos.sh")
|
|
552
|
+
* @param storageAddress - The storage program address (stor-{hash})
|
|
553
|
+
* @param identity - Optional requester identity for ACL-protected programs
|
|
554
|
+
* @returns Storage program data or null if not found
|
|
555
|
+
*
|
|
556
|
+
* @example
|
|
557
|
+
* ```typescript
|
|
558
|
+
* const program = await StorageProgram.getByAddress(
|
|
559
|
+
* 'https://node.demos.sh',
|
|
560
|
+
* 'stor-7a8b9c...'
|
|
561
|
+
* )
|
|
562
|
+
* if (program) {
|
|
563
|
+
* console.log(`Found: ${program.programName}`)
|
|
564
|
+
* }
|
|
565
|
+
* ```
|
|
566
|
+
*/
|
|
567
|
+
static async getByAddress(rpcUrl, storageAddress, identity) {
|
|
568
|
+
try {
|
|
569
|
+
const headers = {};
|
|
570
|
+
if (identity) {
|
|
571
|
+
headers["identity"] = identity;
|
|
572
|
+
}
|
|
573
|
+
const response = await axios_1.default.get(`${rpcUrl}/storage-program/${storageAddress}`, { headers });
|
|
574
|
+
if (!response.data.success || !response.data.storageAddress) {
|
|
575
|
+
return null;
|
|
576
|
+
}
|
|
577
|
+
return {
|
|
578
|
+
storageAddress: response.data.storageAddress,
|
|
579
|
+
owner: response.data.owner,
|
|
580
|
+
programName: response.data.programName,
|
|
581
|
+
encoding: response.data.encoding,
|
|
582
|
+
data: response.data.data,
|
|
583
|
+
metadata: response.data.metadata,
|
|
584
|
+
storageLocation: response.data.storageLocation,
|
|
585
|
+
sizeBytes: response.data.sizeBytes,
|
|
586
|
+
createdAt: response.data.createdAt,
|
|
587
|
+
updatedAt: response.data.updatedAt,
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
catch (error) {
|
|
591
|
+
if (axios_1.default.isAxiosError(error) && error.response?.status === 404) {
|
|
592
|
+
return null;
|
|
593
|
+
}
|
|
594
|
+
throw error;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Get all storage programs owned by an address
|
|
599
|
+
*
|
|
600
|
+
* @param rpcUrl - The RPC endpoint URL
|
|
601
|
+
* @param owner - The owner's address
|
|
602
|
+
* @param identity - Optional requester identity for ACL filtering
|
|
603
|
+
* @returns Array of storage program list items
|
|
604
|
+
*
|
|
605
|
+
* @example
|
|
606
|
+
* ```typescript
|
|
607
|
+
* const programs = await StorageProgram.getByOwner(
|
|
608
|
+
* 'https://node.demos.sh',
|
|
609
|
+
* 'demos1abc...'
|
|
610
|
+
* )
|
|
611
|
+
* console.log(`Found ${programs.length} programs`)
|
|
612
|
+
* ```
|
|
613
|
+
*/
|
|
614
|
+
static async getByOwner(rpcUrl, owner, identity) {
|
|
615
|
+
const headers = {};
|
|
616
|
+
if (identity) {
|
|
617
|
+
headers["identity"] = identity;
|
|
618
|
+
}
|
|
619
|
+
const response = await axios_1.default.get(`${rpcUrl}/storage-program/owner/${owner}`, { headers });
|
|
620
|
+
if (!response.data.success || !response.data.programs) {
|
|
621
|
+
return [];
|
|
622
|
+
}
|
|
623
|
+
return response.data.programs;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Search storage programs by name (supports partial matching)
|
|
627
|
+
*
|
|
628
|
+
* @param rpcUrl - The RPC endpoint URL
|
|
629
|
+
* @param nameQuery - The name or partial name to search for
|
|
630
|
+
* @param options - Search options (exactMatch, limit, offset, identity)
|
|
631
|
+
* @returns Array of storage program list items
|
|
632
|
+
*
|
|
633
|
+
* @example
|
|
634
|
+
* ```typescript
|
|
635
|
+
* // Partial match search
|
|
636
|
+
* const results = await StorageProgram.searchByName(
|
|
637
|
+
* 'https://node.demos.sh',
|
|
638
|
+
* 'config' // matches "appConfig", "myConfig", etc.
|
|
639
|
+
* )
|
|
640
|
+
*
|
|
641
|
+
* // Exact match search
|
|
642
|
+
* const exact = await StorageProgram.searchByName(
|
|
643
|
+
* 'https://node.demos.sh',
|
|
644
|
+
* 'myConfig',
|
|
645
|
+
* { exactMatch: true }
|
|
646
|
+
* )
|
|
647
|
+
*
|
|
648
|
+
* // Paginated search
|
|
649
|
+
* const page2 = await StorageProgram.searchByName(
|
|
650
|
+
* 'https://node.demos.sh',
|
|
651
|
+
* 'config',
|
|
652
|
+
* { limit: 10, offset: 10 }
|
|
653
|
+
* )
|
|
654
|
+
* ```
|
|
655
|
+
*/
|
|
656
|
+
static async searchByName(rpcUrl, nameQuery, options) {
|
|
657
|
+
const headers = {};
|
|
658
|
+
if (options?.identity) {
|
|
659
|
+
headers["identity"] = options.identity;
|
|
660
|
+
}
|
|
661
|
+
const params = new URLSearchParams();
|
|
662
|
+
params.set("q", nameQuery);
|
|
663
|
+
if (options?.exactMatch) {
|
|
664
|
+
params.set("exact", "true");
|
|
665
|
+
}
|
|
666
|
+
if (options?.limit !== undefined) {
|
|
667
|
+
params.set("limit", options.limit.toString());
|
|
668
|
+
}
|
|
669
|
+
if (options?.offset !== undefined) {
|
|
670
|
+
params.set("offset", options.offset.toString());
|
|
671
|
+
}
|
|
672
|
+
const response = await axios_1.default.get(`${rpcUrl}/storage-program/search?${params.toString()}`, { headers });
|
|
673
|
+
if (!response.data.success || !response.data.programs) {
|
|
674
|
+
return [];
|
|
675
|
+
}
|
|
676
|
+
return response.data.programs;
|
|
677
|
+
}
|
|
541
678
|
}
|
|
542
679
|
exports.StorageProgram = StorageProgram;
|
|
543
680
|
//# sourceMappingURL=StorageProgram.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageProgram.js","sourceRoot":"","sources":["../../../src/storage/StorageProgram.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StorageProgram.js","sourceRoot":"","sources":["../../../src/storage/StorageProgram.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAkC;AAClC,kDAAyB;AAUzB,iHAA6G;AAgE7G,yFAAyF;AAEzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAa,cAAc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E,MAAM,CAAC,CAAA;QAC/B,CAAC;QACD,IAAI,OAAO,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YAC/B,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;QACjD,CAAC;QACD,IAAI,OAAO,EAAE,MAAM,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAA;QACnD,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAC5B,GAAG,MAAM,2BAA2B,MAAM,CAAC,QAAQ,EAAE,EAAE,EACvD,EAAE,OAAO,EAAE,CACd,CAAA;QAED,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpD,OAAO,EAAE,CAAA;QACb,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAA;IACjC,CAAC;CACJ;AAlvBD,wCAkvBC"}
|
package/build/storage/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { StorageProgram } from "./StorageProgram";
|
|
2
|
+
export type { StorageProgramData, StorageProgramListItem } from "./StorageProgram";
|
|
2
3
|
export type { StorageProgramOperation, StorageEncoding, StorageLocation, StorageACLMode, StorageGroupPermissions, StorageProgramACL, StorageProgramPayload, StorageProgramTransactionContent, StorageProgramTransaction, StorageProgramAccessControl, } from "../types/blockchain/TransactionSubtypes/StorageProgramTransaction";
|
|
3
4
|
export { STORAGE_PROGRAM_CONSTANTS, isStorageProgramPayload, isValidEncoding, isValidStorageLocation, } from "../types/blockchain/TransactionSubtypes/StorageProgramTransaction";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/storage/index.ts"],"names":[],"mappings":";;;AAAA,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/storage/index.ts"],"names":[],"mappings":";;;AAAA,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AAkBvB,+GAK0E;AAJtE,sIAAA,yBAAyB,OAAA;AACzB,oIAAA,uBAAuB,OAAA;AACvB,4HAAA,eAAe,OAAA;AACf,mIAAA,sBAAsB,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kynesyslabs/demosdk",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.22",
|
|
4
4
|
"description": "Demosdk is a JavaScript/TypeScript SDK that provides a unified interface for interacting with Demos network",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|