@wishknish/knishio-client-ts 0.9.7 → 0.9.8
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/index.cjs +27 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.iife.js +27 -5
- package/dist/index.iife.js.map +1 -1
- package/dist/index.js +27 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/KnishIOClient.ts +22 -5
- package/src/index.ts +1 -1
- package/src/mutation/MutationProposeMolecule.ts +7 -4
package/dist/index.d.cts
CHANGED
|
@@ -1752,7 +1752,7 @@ declare class QueryBatch extends Query {
|
|
|
1752
1752
|
createResponse(json: any): Response;
|
|
1753
1753
|
}
|
|
1754
1754
|
|
|
1755
|
-
declare
|
|
1755
|
+
declare class MutationProposeMolecule extends Mutation {
|
|
1756
1756
|
protected $__molecule: Molecule;
|
|
1757
1757
|
protected $__remainderWallet: any | null;
|
|
1758
1758
|
constructor(graphQLClient: GraphQLClient, knishIOClient: KnishIOClient, molecule: Molecule);
|
|
@@ -1763,7 +1763,7 @@ declare abstract class MutationProposeMolecule extends Mutation {
|
|
|
1763
1763
|
}): Promise<ResponseProposeMolecule | null>;
|
|
1764
1764
|
remainderWallet(): any | null;
|
|
1765
1765
|
molecule(): any;
|
|
1766
|
-
|
|
1766
|
+
fillMolecule(_params?: any): void;
|
|
1767
1767
|
}
|
|
1768
1768
|
|
|
1769
1769
|
declare class ResponseTransferTokens extends ResponseProposeMolecule {
|
|
@@ -2199,12 +2199,12 @@ declare function withSecureBytes<T>(bytes: Uint8Array, fn: (bytes: Uint8Array) =
|
|
|
2199
2199
|
declare function withSecureString<T>(secret: string, fn: (cleanSecret: string) => Promise<T> | T): Promise<T>;
|
|
2200
2200
|
declare function constantTimeCompare(a: Uint8Array | string, b: Uint8Array | string): boolean;
|
|
2201
2201
|
|
|
2202
|
-
declare const SDK_VERSION = "0.9.
|
|
2202
|
+
declare const SDK_VERSION = "0.9.8";
|
|
2203
2203
|
declare const SDK_NAME = "KnishIO-Client-TS";
|
|
2204
2204
|
declare const COMPATIBLE_SERVER_VERSIONS: number[];
|
|
2205
2205
|
declare const SDK_INFO: {
|
|
2206
2206
|
readonly name: "KnishIO-Client-TS";
|
|
2207
|
-
readonly version: "0.9.
|
|
2207
|
+
readonly version: "0.9.8";
|
|
2208
2208
|
readonly description: "TypeScript SDK for Knish.IO post-blockchain distributed ledger";
|
|
2209
2209
|
readonly compatibleServerVersions: number[];
|
|
2210
2210
|
readonly features: readonly ["Post-quantum cryptography (XMSS, ML-KEM768)", "Cross-platform compatibility", "Type-safe APIs", "DAG-based transaction processing", "GraphQL integration", "Real-time subscriptions", "Cellular architecture support"];
|
|
@@ -2232,7 +2232,7 @@ declare const DevUtils: {
|
|
|
2232
2232
|
nodeVersion: string;
|
|
2233
2233
|
environment: string;
|
|
2234
2234
|
name: "KnishIO-Client-TS";
|
|
2235
|
-
version: "0.9.
|
|
2235
|
+
version: "0.9.8";
|
|
2236
2236
|
description: "TypeScript SDK for Knish.IO post-blockchain distributed ledger";
|
|
2237
2237
|
compatibleServerVersions: number[];
|
|
2238
2238
|
features: readonly ["Post-quantum cryptography (XMSS, ML-KEM768)", "Cross-platform compatibility", "Type-safe APIs", "DAG-based transaction processing", "GraphQL integration", "Real-time subscriptions", "Cellular architecture support"];
|
|
@@ -2259,7 +2259,7 @@ declare const KnishIO: {
|
|
|
2259
2259
|
SDK_VERSION: string;
|
|
2260
2260
|
SDK_INFO: {
|
|
2261
2261
|
readonly name: "KnishIO-Client-TS";
|
|
2262
|
-
readonly version: "0.9.
|
|
2262
|
+
readonly version: "0.9.8";
|
|
2263
2263
|
readonly description: "TypeScript SDK for Knish.IO post-blockchain distributed ledger";
|
|
2264
2264
|
readonly compatibleServerVersions: number[];
|
|
2265
2265
|
readonly features: readonly ["Post-quantum cryptography (XMSS, ML-KEM768)", "Cross-platform compatibility", "Type-safe APIs", "DAG-based transaction processing", "GraphQL integration", "Real-time subscriptions", "Cellular architecture support"];
|
package/dist/index.d.ts
CHANGED
|
@@ -1752,7 +1752,7 @@ declare class QueryBatch extends Query {
|
|
|
1752
1752
|
createResponse(json: any): Response;
|
|
1753
1753
|
}
|
|
1754
1754
|
|
|
1755
|
-
declare
|
|
1755
|
+
declare class MutationProposeMolecule extends Mutation {
|
|
1756
1756
|
protected $__molecule: Molecule;
|
|
1757
1757
|
protected $__remainderWallet: any | null;
|
|
1758
1758
|
constructor(graphQLClient: GraphQLClient, knishIOClient: KnishIOClient, molecule: Molecule);
|
|
@@ -1763,7 +1763,7 @@ declare abstract class MutationProposeMolecule extends Mutation {
|
|
|
1763
1763
|
}): Promise<ResponseProposeMolecule | null>;
|
|
1764
1764
|
remainderWallet(): any | null;
|
|
1765
1765
|
molecule(): any;
|
|
1766
|
-
|
|
1766
|
+
fillMolecule(_params?: any): void;
|
|
1767
1767
|
}
|
|
1768
1768
|
|
|
1769
1769
|
declare class ResponseTransferTokens extends ResponseProposeMolecule {
|
|
@@ -2199,12 +2199,12 @@ declare function withSecureBytes<T>(bytes: Uint8Array, fn: (bytes: Uint8Array) =
|
|
|
2199
2199
|
declare function withSecureString<T>(secret: string, fn: (cleanSecret: string) => Promise<T> | T): Promise<T>;
|
|
2200
2200
|
declare function constantTimeCompare(a: Uint8Array | string, b: Uint8Array | string): boolean;
|
|
2201
2201
|
|
|
2202
|
-
declare const SDK_VERSION = "0.9.
|
|
2202
|
+
declare const SDK_VERSION = "0.9.8";
|
|
2203
2203
|
declare const SDK_NAME = "KnishIO-Client-TS";
|
|
2204
2204
|
declare const COMPATIBLE_SERVER_VERSIONS: number[];
|
|
2205
2205
|
declare const SDK_INFO: {
|
|
2206
2206
|
readonly name: "KnishIO-Client-TS";
|
|
2207
|
-
readonly version: "0.9.
|
|
2207
|
+
readonly version: "0.9.8";
|
|
2208
2208
|
readonly description: "TypeScript SDK for Knish.IO post-blockchain distributed ledger";
|
|
2209
2209
|
readonly compatibleServerVersions: number[];
|
|
2210
2210
|
readonly features: readonly ["Post-quantum cryptography (XMSS, ML-KEM768)", "Cross-platform compatibility", "Type-safe APIs", "DAG-based transaction processing", "GraphQL integration", "Real-time subscriptions", "Cellular architecture support"];
|
|
@@ -2232,7 +2232,7 @@ declare const DevUtils: {
|
|
|
2232
2232
|
nodeVersion: string;
|
|
2233
2233
|
environment: string;
|
|
2234
2234
|
name: "KnishIO-Client-TS";
|
|
2235
|
-
version: "0.9.
|
|
2235
|
+
version: "0.9.8";
|
|
2236
2236
|
description: "TypeScript SDK for Knish.IO post-blockchain distributed ledger";
|
|
2237
2237
|
compatibleServerVersions: number[];
|
|
2238
2238
|
features: readonly ["Post-quantum cryptography (XMSS, ML-KEM768)", "Cross-platform compatibility", "Type-safe APIs", "DAG-based transaction processing", "GraphQL integration", "Real-time subscriptions", "Cellular architecture support"];
|
|
@@ -2259,7 +2259,7 @@ declare const KnishIO: {
|
|
|
2259
2259
|
SDK_VERSION: string;
|
|
2260
2260
|
SDK_INFO: {
|
|
2261
2261
|
readonly name: "KnishIO-Client-TS";
|
|
2262
|
-
readonly version: "0.9.
|
|
2262
|
+
readonly version: "0.9.8";
|
|
2263
2263
|
readonly description: "TypeScript SDK for Knish.IO post-blockchain distributed ledger";
|
|
2264
2264
|
readonly compatibleServerVersions: number[];
|
|
2265
2265
|
readonly features: readonly ["Post-quantum cryptography (XMSS, ML-KEM768)", "Cross-platform compatibility", "Type-safe APIs", "DAG-based transaction processing", "GraphQL integration", "Real-time subscriptions", "Cellular architecture support"];
|
package/dist/index.iife.js
CHANGED
|
@@ -50902,6 +50902,13 @@ ${operationTypes.join("\n")}
|
|
|
50902
50902
|
molecule() {
|
|
50903
50903
|
return this.$__molecule.toJSON ? this.$__molecule.toJSON() : this.$__molecule;
|
|
50904
50904
|
}
|
|
50905
|
+
/**
|
|
50906
|
+
* Fills the molecule with specific mutation data.
|
|
50907
|
+
* Subclasses override to build domain-specific atoms.
|
|
50908
|
+
* Default implementation is a no-op for pre-assembled molecules.
|
|
50909
|
+
*/
|
|
50910
|
+
fillMolecule(_params) {
|
|
50911
|
+
}
|
|
50905
50912
|
};
|
|
50906
50913
|
|
|
50907
50914
|
// src/response/ResponseCreateToken.ts
|
|
@@ -53472,15 +53479,30 @@ ${operationTypes.join("\n")}
|
|
|
53472
53479
|
async createPolicy({
|
|
53473
53480
|
metaType,
|
|
53474
53481
|
metaId,
|
|
53475
|
-
policy =
|
|
53482
|
+
policy = {}
|
|
53476
53483
|
}) {
|
|
53477
53484
|
this.log("info", `KnishIOClient::createPolicy() - Creating policy for ${metaType}:${metaId}...`);
|
|
53478
|
-
|
|
53485
|
+
const molecule = await this.createMolecule({});
|
|
53486
|
+
molecule.addPolicyAtom({
|
|
53479
53487
|
metaType,
|
|
53480
53488
|
metaId,
|
|
53481
|
-
meta:
|
|
53482
|
-
policy
|
|
53489
|
+
meta: {},
|
|
53490
|
+
policy: policy || {}
|
|
53491
|
+
});
|
|
53492
|
+
molecule.addContinuIdAtom();
|
|
53493
|
+
molecule.sign({
|
|
53494
|
+
bundle: this.getBundle()
|
|
53483
53495
|
});
|
|
53496
|
+
molecule.check();
|
|
53497
|
+
const query = await this.createMoleculeMutation({
|
|
53498
|
+
mutationClass: MutationProposeMolecule,
|
|
53499
|
+
molecule
|
|
53500
|
+
});
|
|
53501
|
+
const response = await this.executeQuery(query);
|
|
53502
|
+
if (!response) {
|
|
53503
|
+
throw new CodeException("Policy creation failed");
|
|
53504
|
+
}
|
|
53505
|
+
return response;
|
|
53484
53506
|
}
|
|
53485
53507
|
/**
|
|
53486
53508
|
* Create an identifier
|
|
@@ -54054,7 +54076,7 @@ ${operationTypes.join("\n")}
|
|
|
54054
54076
|
}
|
|
54055
54077
|
|
|
54056
54078
|
// src/index.ts
|
|
54057
|
-
var SDK_VERSION = "0.9.
|
|
54079
|
+
var SDK_VERSION = "0.9.8";
|
|
54058
54080
|
var SDK_NAME = "KnishIO-Client-TS";
|
|
54059
54081
|
var COMPATIBLE_SERVER_VERSIONS = [4, 5];
|
|
54060
54082
|
var SDK_INFO = {
|