@kynesyslabs/demosdk 2.8.21 → 2.8.23
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,83 @@ 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
|
+
* Internal helper to make gcr_routine RPC calls
|
|
416
|
+
*/
|
|
417
|
+
private static gcrRoutineCall;
|
|
418
|
+
/**
|
|
419
|
+
* Get a storage program by address
|
|
420
|
+
*
|
|
421
|
+
* @param rpcUrl - The RPC endpoint URL (e.g., "https://node.demos.sh")
|
|
422
|
+
* @param storageAddress - The storage program address (stor-{hash})
|
|
423
|
+
* @param identity - Optional requester identity for ACL-protected programs
|
|
424
|
+
* @returns Storage program data or null if not found
|
|
425
|
+
*
|
|
426
|
+
* @example
|
|
427
|
+
* ```typescript
|
|
428
|
+
* const program = await StorageProgram.getByAddress(
|
|
429
|
+
* 'https://node.demos.sh',
|
|
430
|
+
* 'stor-7a8b9c...'
|
|
431
|
+
* )
|
|
432
|
+
* if (program) {
|
|
433
|
+
* console.log(`Found: ${program.programName}`)
|
|
434
|
+
* }
|
|
435
|
+
* ```
|
|
436
|
+
*/
|
|
437
|
+
static getByAddress(rpcUrl: string, storageAddress: string, identity?: string): Promise<StorageProgramData | null>;
|
|
438
|
+
/**
|
|
439
|
+
* Get all storage programs owned by an address
|
|
440
|
+
*
|
|
441
|
+
* @param rpcUrl - The RPC endpoint URL
|
|
442
|
+
* @param owner - The owner's address
|
|
443
|
+
* @param identity - Optional requester identity for ACL filtering
|
|
444
|
+
* @returns Array of storage program list items
|
|
445
|
+
*
|
|
446
|
+
* @example
|
|
447
|
+
* ```typescript
|
|
448
|
+
* const programs = await StorageProgram.getByOwner(
|
|
449
|
+
* 'https://node.demos.sh',
|
|
450
|
+
* 'demos1abc...'
|
|
451
|
+
* )
|
|
452
|
+
* console.log(`Found ${programs.length} programs`)
|
|
453
|
+
* ```
|
|
454
|
+
*/
|
|
455
|
+
static getByOwner(rpcUrl: string, owner: string, identity?: string): Promise<StorageProgramListItem[]>;
|
|
456
|
+
/**
|
|
457
|
+
* Search storage programs by name (supports partial matching)
|
|
458
|
+
*
|
|
459
|
+
* @param rpcUrl - The RPC endpoint URL
|
|
460
|
+
* @param nameQuery - The name or partial name to search for
|
|
461
|
+
* @param options - Search options (exactMatch, limit, offset, identity)
|
|
462
|
+
* @returns Array of storage program list items
|
|
463
|
+
*
|
|
464
|
+
* @example
|
|
465
|
+
* ```typescript
|
|
466
|
+
* // Partial match search
|
|
467
|
+
* const results = await StorageProgram.searchByName(
|
|
468
|
+
* 'https://node.demos.sh',
|
|
469
|
+
* 'config' // matches "appConfig", "myConfig", etc.
|
|
470
|
+
* )
|
|
471
|
+
*
|
|
472
|
+
* // Exact match search
|
|
473
|
+
* const exact = await StorageProgram.searchByName(
|
|
474
|
+
* 'https://node.demos.sh',
|
|
475
|
+
* 'myConfig',
|
|
476
|
+
* { exactMatch: true }
|
|
477
|
+
* )
|
|
478
|
+
*
|
|
479
|
+
* // Paginated search
|
|
480
|
+
* const page2 = await StorageProgram.searchByName(
|
|
481
|
+
* 'https://node.demos.sh',
|
|
482
|
+
* 'config',
|
|
483
|
+
* { limit: 10, offset: 10 }
|
|
484
|
+
* )
|
|
485
|
+
* ```
|
|
486
|
+
*/
|
|
487
|
+
static searchByName(rpcUrl: string, nameQuery: string, options?: {
|
|
488
|
+
exactMatch?: boolean;
|
|
489
|
+
limit?: number;
|
|
490
|
+
offset?: number;
|
|
491
|
+
identity?: string;
|
|
492
|
+
}): Promise<StorageProgramListItem[]>;
|
|
387
493
|
}
|
|
@@ -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,132 @@ class StorageProgram {
|
|
|
538
542
|
allowedAddresses,
|
|
539
543
|
};
|
|
540
544
|
}
|
|
545
|
+
// ========================================================================
|
|
546
|
+
// Query Methods (RPC calls via gcr_routine)
|
|
547
|
+
// ========================================================================
|
|
548
|
+
/**
|
|
549
|
+
* Internal helper to make gcr_routine RPC calls
|
|
550
|
+
*/
|
|
551
|
+
static async gcrRoutineCall(rpcUrl, method, params) {
|
|
552
|
+
const response = await axios_1.default.post(rpcUrl, {
|
|
553
|
+
method: "gcr_routine",
|
|
554
|
+
params: [{ method, params }],
|
|
555
|
+
}, {
|
|
556
|
+
headers: { "Content-Type": "application/json" },
|
|
557
|
+
});
|
|
558
|
+
return response.data;
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Get a storage program by address
|
|
562
|
+
*
|
|
563
|
+
* @param rpcUrl - The RPC endpoint URL (e.g., "https://node.demos.sh")
|
|
564
|
+
* @param storageAddress - The storage program address (stor-{hash})
|
|
565
|
+
* @param identity - Optional requester identity for ACL-protected programs
|
|
566
|
+
* @returns Storage program data or null if not found
|
|
567
|
+
*
|
|
568
|
+
* @example
|
|
569
|
+
* ```typescript
|
|
570
|
+
* const program = await StorageProgram.getByAddress(
|
|
571
|
+
* 'https://node.demos.sh',
|
|
572
|
+
* 'stor-7a8b9c...'
|
|
573
|
+
* )
|
|
574
|
+
* if (program) {
|
|
575
|
+
* console.log(`Found: ${program.programName}`)
|
|
576
|
+
* }
|
|
577
|
+
* ```
|
|
578
|
+
*/
|
|
579
|
+
static async getByAddress(rpcUrl, storageAddress, identity) {
|
|
580
|
+
try {
|
|
581
|
+
const result = await this.gcrRoutineCall(rpcUrl, "getStorageProgram", [storageAddress, identity]);
|
|
582
|
+
if (result.result !== 200 || !result.response) {
|
|
583
|
+
return null;
|
|
584
|
+
}
|
|
585
|
+
return result.response;
|
|
586
|
+
}
|
|
587
|
+
catch (error) {
|
|
588
|
+
if (axios_1.default.isAxiosError(error) && error.response?.status === 404) {
|
|
589
|
+
return null;
|
|
590
|
+
}
|
|
591
|
+
throw error;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Get all storage programs owned by an address
|
|
596
|
+
*
|
|
597
|
+
* @param rpcUrl - The RPC endpoint URL
|
|
598
|
+
* @param owner - The owner's address
|
|
599
|
+
* @param identity - Optional requester identity for ACL filtering
|
|
600
|
+
* @returns Array of storage program list items
|
|
601
|
+
*
|
|
602
|
+
* @example
|
|
603
|
+
* ```typescript
|
|
604
|
+
* const programs = await StorageProgram.getByOwner(
|
|
605
|
+
* 'https://node.demos.sh',
|
|
606
|
+
* 'demos1abc...'
|
|
607
|
+
* )
|
|
608
|
+
* console.log(`Found ${programs.length} programs`)
|
|
609
|
+
* ```
|
|
610
|
+
*/
|
|
611
|
+
static async getByOwner(rpcUrl, owner, identity) {
|
|
612
|
+
try {
|
|
613
|
+
const result = await this.gcrRoutineCall(rpcUrl, "getStorageProgramsByOwner", [owner, identity]);
|
|
614
|
+
if (result.result !== 200 || !result.response) {
|
|
615
|
+
return [];
|
|
616
|
+
}
|
|
617
|
+
return result.response;
|
|
618
|
+
}
|
|
619
|
+
catch (error) {
|
|
620
|
+
return [];
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Search storage programs by name (supports partial matching)
|
|
625
|
+
*
|
|
626
|
+
* @param rpcUrl - The RPC endpoint URL
|
|
627
|
+
* @param nameQuery - The name or partial name to search for
|
|
628
|
+
* @param options - Search options (exactMatch, limit, offset, identity)
|
|
629
|
+
* @returns Array of storage program list items
|
|
630
|
+
*
|
|
631
|
+
* @example
|
|
632
|
+
* ```typescript
|
|
633
|
+
* // Partial match search
|
|
634
|
+
* const results = await StorageProgram.searchByName(
|
|
635
|
+
* 'https://node.demos.sh',
|
|
636
|
+
* 'config' // matches "appConfig", "myConfig", etc.
|
|
637
|
+
* )
|
|
638
|
+
*
|
|
639
|
+
* // Exact match search
|
|
640
|
+
* const exact = await StorageProgram.searchByName(
|
|
641
|
+
* 'https://node.demos.sh',
|
|
642
|
+
* 'myConfig',
|
|
643
|
+
* { exactMatch: true }
|
|
644
|
+
* )
|
|
645
|
+
*
|
|
646
|
+
* // Paginated search
|
|
647
|
+
* const page2 = await StorageProgram.searchByName(
|
|
648
|
+
* 'https://node.demos.sh',
|
|
649
|
+
* 'config',
|
|
650
|
+
* { limit: 10, offset: 10 }
|
|
651
|
+
* )
|
|
652
|
+
* ```
|
|
653
|
+
*/
|
|
654
|
+
static async searchByName(rpcUrl, nameQuery, options) {
|
|
655
|
+
try {
|
|
656
|
+
const searchOptions = {
|
|
657
|
+
limit: options?.limit,
|
|
658
|
+
offset: options?.offset,
|
|
659
|
+
exactMatch: options?.exactMatch,
|
|
660
|
+
};
|
|
661
|
+
const result = await this.gcrRoutineCall(rpcUrl, "searchStoragePrograms", [nameQuery, searchOptions, options?.identity]);
|
|
662
|
+
if (result.result !== 200 || !result.response) {
|
|
663
|
+
return [];
|
|
664
|
+
}
|
|
665
|
+
return result.response;
|
|
666
|
+
}
|
|
667
|
+
catch (error) {
|
|
668
|
+
return [];
|
|
669
|
+
}
|
|
670
|
+
}
|
|
541
671
|
}
|
|
542
672
|
exports.StorageProgram = StorageProgram;
|
|
543
673
|
//# 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;IACvB,2EAA2E;IAC3E,qBAAqB;IACrB,2EAA2E;IAE3E;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,oBAAoB,CACvB,eAAuB,EACvB,WAAmB,EACnB,K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AE,QAAQ,CAAC,CACpB,CAAA;YAED,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;gBAC5C,OAAO,EAAE,CAAA;YACb,CAAC;YAED,OAAO,MAAM,CAAC,QAAQ,CAAA;QAC1B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,EAAE,CAAA;QACb,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,MAAM,CAAC,KAAK,CAAC,YAAY,CACrB,MAAc,EACd,SAAiB,EACjB,OAKC;QAED,IAAI,CAAC;YACD,MAAM,aAAa,GAAG;gBAClB,KAAK,EAAE,OAAO,EAAE,KAAK;gBACrB,MAAM,EAAE,OAAO,EAAE,MAAM;gBACvB,UAAU,EAAE,OAAO,EAAE,UAAU;aAClC,CAAA;YAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CACpC,MAAM,EACN,uBAAuB,EACvB,CAAC,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,CAAC,CAChD,CAAA;YAED,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;gBAC5C,OAAO,EAAE,CAAA;YACb,CAAC;YAED,OAAO,MAAM,CAAC,QAAQ,CAAA;QAC1B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,EAAE,CAAA;QACb,CAAC;IACL,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.23",
|
|
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",
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"@cosmjs/proto-signing": "^0.32.4",
|
|
98
98
|
"@cosmjs/stargate": "^0.32.4",
|
|
99
99
|
"@cryptkeeperzk/snarkjs": "^0.7.2",
|
|
100
|
+
"@kynesyslabs/demosdk": "^2.8.22",
|
|
100
101
|
"@metaplex-foundation/js": "^0.20.1",
|
|
101
102
|
"@multiversx/sdk-core": "^13.17.2",
|
|
102
103
|
"@multiversx/sdk-extension-provider": "^3.0.0",
|