@wishknish/knishio-client-ts 0.9.4 → 0.9.6

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.d.cts CHANGED
@@ -472,6 +472,27 @@ declare class Atom {
472
472
  static groupByIsotope(atoms: Atom[]): Record<AtomIsotope, Atom[]>;
473
473
  }
474
474
 
475
+ declare class TokenUnit {
476
+ id: string;
477
+ name: string;
478
+ metas: Record<string, any>;
479
+ constructor(id: string, name: string, metas?: Record<string, any>);
480
+ static createFromGraphQL(data: {
481
+ id: string;
482
+ name: string;
483
+ metas?: any;
484
+ }): TokenUnit;
485
+ static createFromDB(data: [string, string, Record<string, any>?]): TokenUnit;
486
+ getFragmentZone(): any | null;
487
+ getFusedTokenUnits(): any | null;
488
+ toData(): [string, string, Record<string, any>];
489
+ toGraphQLResponse(): {
490
+ id: string;
491
+ name: string;
492
+ metas: string;
493
+ };
494
+ }
495
+
475
496
  declare class Wallet {
476
497
  token: string;
477
498
  balance: string;
@@ -515,7 +536,7 @@ declare class Wallet {
515
536
  static generateAddress(key: string): string;
516
537
  static generatePosition(saltLength?: number): string;
517
538
  static isBundleHash(maybeBundleHash: unknown): maybeBundleHash is string;
518
- static getTokenUnits(unitsData: any[]): any[];
539
+ static getTokenUnits(unitsData: Array<[string, string, Record<string, any>?]>): TokenUnit[];
519
540
  createRemainder(secret: string): Wallet;
520
541
  initBatchId({ sourceWallet, isRemainder }: {
521
542
  sourceWallet: Wallet;
@@ -729,6 +750,10 @@ declare class Molecule {
729
750
  amount: number;
730
751
  walletBundle?: string | null;
731
752
  }): Molecule;
753
+ replenishToken({ amount, units }: {
754
+ amount: number;
755
+ units?: Array<[string, string, Record<string, any>?]>;
756
+ }): Molecule;
732
757
  initAuthorization({ meta }: {
733
758
  meta: Record<string, any>;
734
759
  }): Molecule;
@@ -1396,10 +1421,10 @@ declare class KnishIOClient {
1396
1421
  units?: string[] | null;
1397
1422
  sourceWallet?: Wallet | null;
1398
1423
  }): Promise<Response>;
1399
- replenishToken({ token, amount, units, sourceWallet: _sourceWallet }: {
1424
+ replenishToken({ token, amount, units, sourceWallet }: {
1400
1425
  token: TokenSlug | string;
1401
1426
  amount?: number | string | null;
1402
- units?: string[] | null;
1427
+ units?: Array<[string, string, Record<string, any>?]> | null;
1403
1428
  sourceWallet?: Wallet | null;
1404
1429
  }): Promise<Response>;
1405
1430
  fuseToken({ bundleHash: _bundleHash, tokenSlug, newTokenUnit: _newTokenUnit, fusedTokenUnitIds: _fusedTokenUnitIds, sourceWallet: _sourceWallet }: {
@@ -1795,27 +1820,6 @@ declare class MutationAppendRequest extends MutationProposeMolecule {
1795
1820
  createResponse(json: any): ResponseAppendRequest;
1796
1821
  }
1797
1822
 
1798
- declare class TokenUnit {
1799
- id: string;
1800
- name: string;
1801
- metas: Record<string, any>;
1802
- constructor(id: string, name: string, metas?: Record<string, any>);
1803
- static createFromGraphQL(data: {
1804
- id: string;
1805
- name: string;
1806
- metas?: any;
1807
- }): TokenUnit;
1808
- static createFromDB(data: [string, string, Record<string, any>?]): TokenUnit;
1809
- getFragmentZone(): any | null;
1810
- getFusedTokenUnits(): any | null;
1811
- toData(): [string, string, Record<string, any>];
1812
- toGraphQLResponse(): {
1813
- id: string;
1814
- name: string;
1815
- metas: string;
1816
- };
1817
- }
1818
-
1819
1823
  declare class PolicyMeta {
1820
1824
  policy: Record<string, any>;
1821
1825
  constructor(policy?: Record<string, any>, metaKeys?: string[]);
@@ -2074,12 +2078,12 @@ declare const EXCEPTION_CODES: {
2074
2078
  readonly NETWORK_ERROR: "NETWORK_ERROR";
2075
2079
  };
2076
2080
 
2077
- declare const SDK_VERSION = "1.0.0";
2081
+ declare const SDK_VERSION = "0.9.6";
2078
2082
  declare const SDK_NAME = "KnishIO-Client-TS";
2079
2083
  declare const COMPATIBLE_SERVER_VERSIONS: number[];
2080
2084
  declare const SDK_INFO: {
2081
2085
  readonly name: "KnishIO-Client-TS";
2082
- readonly version: "1.0.0";
2086
+ readonly version: "0.9.6";
2083
2087
  readonly description: "TypeScript SDK for Knish.IO post-blockchain distributed ledger";
2084
2088
  readonly compatibleServerVersions: number[];
2085
2089
  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"];
@@ -2107,7 +2111,7 @@ declare const DevUtils: {
2107
2111
  nodeVersion: string;
2108
2112
  environment: string;
2109
2113
  name: "KnishIO-Client-TS";
2110
- version: "1.0.0";
2114
+ version: "0.9.6";
2111
2115
  description: "TypeScript SDK for Knish.IO post-blockchain distributed ledger";
2112
2116
  compatibleServerVersions: number[];
2113
2117
  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"];
@@ -2134,7 +2138,7 @@ declare const KnishIO: {
2134
2138
  SDK_VERSION: string;
2135
2139
  SDK_INFO: {
2136
2140
  readonly name: "KnishIO-Client-TS";
2137
- readonly version: "1.0.0";
2141
+ readonly version: "0.9.6";
2138
2142
  readonly description: "TypeScript SDK for Knish.IO post-blockchain distributed ledger";
2139
2143
  readonly compatibleServerVersions: number[];
2140
2144
  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
@@ -472,6 +472,27 @@ declare class Atom {
472
472
  static groupByIsotope(atoms: Atom[]): Record<AtomIsotope, Atom[]>;
473
473
  }
474
474
 
475
+ declare class TokenUnit {
476
+ id: string;
477
+ name: string;
478
+ metas: Record<string, any>;
479
+ constructor(id: string, name: string, metas?: Record<string, any>);
480
+ static createFromGraphQL(data: {
481
+ id: string;
482
+ name: string;
483
+ metas?: any;
484
+ }): TokenUnit;
485
+ static createFromDB(data: [string, string, Record<string, any>?]): TokenUnit;
486
+ getFragmentZone(): any | null;
487
+ getFusedTokenUnits(): any | null;
488
+ toData(): [string, string, Record<string, any>];
489
+ toGraphQLResponse(): {
490
+ id: string;
491
+ name: string;
492
+ metas: string;
493
+ };
494
+ }
495
+
475
496
  declare class Wallet {
476
497
  token: string;
477
498
  balance: string;
@@ -515,7 +536,7 @@ declare class Wallet {
515
536
  static generateAddress(key: string): string;
516
537
  static generatePosition(saltLength?: number): string;
517
538
  static isBundleHash(maybeBundleHash: unknown): maybeBundleHash is string;
518
- static getTokenUnits(unitsData: any[]): any[];
539
+ static getTokenUnits(unitsData: Array<[string, string, Record<string, any>?]>): TokenUnit[];
519
540
  createRemainder(secret: string): Wallet;
520
541
  initBatchId({ sourceWallet, isRemainder }: {
521
542
  sourceWallet: Wallet;
@@ -729,6 +750,10 @@ declare class Molecule {
729
750
  amount: number;
730
751
  walletBundle?: string | null;
731
752
  }): Molecule;
753
+ replenishToken({ amount, units }: {
754
+ amount: number;
755
+ units?: Array<[string, string, Record<string, any>?]>;
756
+ }): Molecule;
732
757
  initAuthorization({ meta }: {
733
758
  meta: Record<string, any>;
734
759
  }): Molecule;
@@ -1396,10 +1421,10 @@ declare class KnishIOClient {
1396
1421
  units?: string[] | null;
1397
1422
  sourceWallet?: Wallet | null;
1398
1423
  }): Promise<Response>;
1399
- replenishToken({ token, amount, units, sourceWallet: _sourceWallet }: {
1424
+ replenishToken({ token, amount, units, sourceWallet }: {
1400
1425
  token: TokenSlug | string;
1401
1426
  amount?: number | string | null;
1402
- units?: string[] | null;
1427
+ units?: Array<[string, string, Record<string, any>?]> | null;
1403
1428
  sourceWallet?: Wallet | null;
1404
1429
  }): Promise<Response>;
1405
1430
  fuseToken({ bundleHash: _bundleHash, tokenSlug, newTokenUnit: _newTokenUnit, fusedTokenUnitIds: _fusedTokenUnitIds, sourceWallet: _sourceWallet }: {
@@ -1795,27 +1820,6 @@ declare class MutationAppendRequest extends MutationProposeMolecule {
1795
1820
  createResponse(json: any): ResponseAppendRequest;
1796
1821
  }
1797
1822
 
1798
- declare class TokenUnit {
1799
- id: string;
1800
- name: string;
1801
- metas: Record<string, any>;
1802
- constructor(id: string, name: string, metas?: Record<string, any>);
1803
- static createFromGraphQL(data: {
1804
- id: string;
1805
- name: string;
1806
- metas?: any;
1807
- }): TokenUnit;
1808
- static createFromDB(data: [string, string, Record<string, any>?]): TokenUnit;
1809
- getFragmentZone(): any | null;
1810
- getFusedTokenUnits(): any | null;
1811
- toData(): [string, string, Record<string, any>];
1812
- toGraphQLResponse(): {
1813
- id: string;
1814
- name: string;
1815
- metas: string;
1816
- };
1817
- }
1818
-
1819
1823
  declare class PolicyMeta {
1820
1824
  policy: Record<string, any>;
1821
1825
  constructor(policy?: Record<string, any>, metaKeys?: string[]);
@@ -2074,12 +2078,12 @@ declare const EXCEPTION_CODES: {
2074
2078
  readonly NETWORK_ERROR: "NETWORK_ERROR";
2075
2079
  };
2076
2080
 
2077
- declare const SDK_VERSION = "1.0.0";
2081
+ declare const SDK_VERSION = "0.9.6";
2078
2082
  declare const SDK_NAME = "KnishIO-Client-TS";
2079
2083
  declare const COMPATIBLE_SERVER_VERSIONS: number[];
2080
2084
  declare const SDK_INFO: {
2081
2085
  readonly name: "KnishIO-Client-TS";
2082
- readonly version: "1.0.0";
2086
+ readonly version: "0.9.6";
2083
2087
  readonly description: "TypeScript SDK for Knish.IO post-blockchain distributed ledger";
2084
2088
  readonly compatibleServerVersions: number[];
2085
2089
  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"];
@@ -2107,7 +2111,7 @@ declare const DevUtils: {
2107
2111
  nodeVersion: string;
2108
2112
  environment: string;
2109
2113
  name: "KnishIO-Client-TS";
2110
- version: "1.0.0";
2114
+ version: "0.9.6";
2111
2115
  description: "TypeScript SDK for Knish.IO post-blockchain distributed ledger";
2112
2116
  compatibleServerVersions: number[];
2113
2117
  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"];
@@ -2134,7 +2138,7 @@ declare const KnishIO: {
2134
2138
  SDK_VERSION: string;
2135
2139
  SDK_INFO: {
2136
2140
  readonly name: "KnishIO-Client-TS";
2137
- readonly version: "1.0.0";
2141
+ readonly version: "0.9.6";
2138
2142
  readonly description: "TypeScript SDK for Knish.IO post-blockchain distributed ledger";
2139
2143
  readonly compatibleServerVersions: number[];
2140
2144
  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"];