@arcanetech/privacy-sdk-stellar 0.5.2 → 0.6.1

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/node.d.ts CHANGED
@@ -62,6 +62,11 @@ interface StellarWalletPrivateAddressRecord {
62
62
  privateAddress: string;
63
63
  createdAt: number;
64
64
  }
65
+ interface StellarLeanImtNode {
66
+ level: number;
67
+ index: number;
68
+ value: string;
69
+ }
65
70
  interface StellarPoolMerkleState {
66
71
  poolContract: string;
67
72
  commitments: string[];
@@ -69,6 +74,7 @@ interface StellarPoolMerkleState {
69
74
  merkleRootHex: string;
70
75
  updatedAt: number;
71
76
  syncedLedger?: number;
77
+ nodes?: StellarLeanImtNode[];
72
78
  }
73
79
  interface StellarLeafEphemeral {
74
80
  poolContract: string;
@@ -275,6 +281,7 @@ interface StellarTransactArtifacts {
275
281
  };
276
282
  executeFinalizeRequired?: boolean;
277
283
  spendSource?: 'privateAddress' | 'escrow';
284
+ zkConfigNonce?: bigint;
278
285
  }
279
286
  interface StellarOperationReceipt {
280
287
  operationId: string;
@@ -330,6 +337,7 @@ interface FetchContractMerkleResult {
330
337
  commitments: string[];
331
338
  merkleRootHex: string;
332
339
  updatedAt: number;
340
+ nodes?: StellarLeanImtNode[];
333
341
  }
334
342
 
335
343
  type StellarTransactionDetails = {
@@ -390,6 +398,7 @@ declare function composeStellarStateService(adapter: StateBridgeAdapter): {
390
398
  commitments: string[];
391
399
  merkleRootHex: string;
392
400
  syncedLedger?: number;
401
+ nodes?: StellarPoolMerkleState["nodes"];
393
402
  }): Promise<void>;
394
403
  getWalletPrivateAddressRecord(input: {
395
404
  owner: StellarAddress;
@@ -486,6 +495,7 @@ declare function composeStellarPrivacyClient(config: ResolvedStellarPrivacyClien
486
495
  commitments: string[];
487
496
  merkleRootHex: string;
488
497
  syncedLedger?: number;
498
+ nodes?: StellarPoolMerkleState["nodes"];
489
499
  }): Promise<void>;
490
500
  getWalletPrivateAddressRecord(input: {
491
501
  owner: StellarAddress;
@@ -639,6 +649,18 @@ declare function createStateDelegates(state: StellarStateService): {
639
649
  };
640
650
  type StellarPrivacyClientStateDelegates = ReturnType<typeof createStateDelegates>;
641
651
 
652
+ type StellarPrivacyStateHydration = {
653
+ poolMerkleStates?: StellarPoolMerkleState[];
654
+ privateRecords?: StellarPrivateRecord[];
655
+ walletPrivateAddressRecords?: StellarWalletPrivateAddressRecord[];
656
+ walletPrivateAddressScalars?: StellarWalletPrivateAddressScalar[];
657
+ walletDefaultPrivateAddressNonces?: Array<{
658
+ owner: string;
659
+ nonce: string;
660
+ }>;
661
+ assets?: StellarAsset[];
662
+ };
663
+
642
664
  type StellarPrivacyClientNetwork = ComposedStellarPrivacyClient['network'];
643
665
  type StellarPrivacyClientOperations = ComposedStellarPrivacyClient['operations'];
644
666
  type StellarPrivacyClient = {
@@ -656,7 +678,9 @@ type StellarPrivacyClient = {
656
678
  waitForTransactionConfirmation: StellarPrivacyClientNetwork['waitForTransactionConfirmation'];
657
679
  fetchTransactionConfirmationStatus: StellarPrivacyClientNetwork['fetchTransactionConfirmationStatus'];
658
680
  getTransactionDetails: StellarPrivacyClientNetwork['getTransactionDetails'];
659
- } & StellarPrivacyClientStateDelegates;
681
+ } & StellarPrivacyClientStateDelegates & {
682
+ hydrateState: (snapshot: StellarPrivacyStateHydration) => Promise<void>;
683
+ };
660
684
 
661
685
  declare function createStellarPrivacyClientFromResolvedConfig(config: ResolvedStellarPrivacyClientConfig): StellarPrivacyClient;
662
686