@midnight-ntwrk/midnight-js-types 3.0.0-alpha.2 → 3.0.0-alpha.5

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.
@@ -25,8 +25,8 @@ export type Witness<PS> = (context: WitnessContext<any, PS>, ...rest: any[]) =>
25
25
  export type Witnesses<PS = any> = Record<string, Witness<PS>>;
26
26
  /**
27
27
  * Interface for a contract. The data types defined in this file are generic shapes for the artifacts
28
- * produced by the `compactc` compiler. In other words, this `Contract` interface should match the shape
29
- * of any `Contract` class produced by `compactc`. Midnight.js uses it for generic constraints.
28
+ * produced by the `compact` compiler. In other words, this `Contract` interface should match the shape
29
+ * of any `Contract` class produced by `compact`. Midnight.js uses it for generic constraints.
30
30
  *
31
31
  * @typeParam PS - The private state modified by the contract witnesses.
32
32
  * @typeParam W - The contract witnesses type.
package/dist/index.cjs CHANGED
@@ -153,6 +153,7 @@ const FailFallible = 'FailFallible';
153
153
  */
154
154
  const SucceedEntirely = 'SucceedEntirely';
155
155
  const TRANSACTION_TO_PROVE = 'TransactionToProve';
156
+ const BALANCE_TRANSACTION_TO_PROVE = 'BalanceTransactionToProve';
156
157
  const NOTHING_TO_PROVE = 'NothingToProve';
157
158
 
158
159
  /*
@@ -178,7 +179,7 @@ const NOTHING_TO_PROVE = 'NothingToProve';
178
179
  */
179
180
  class ZKConfigProvider {
180
181
  /**
181
- * Retrieves the verifier keys produced by `compactc` for the given circuits.
182
+ * Retrieves the verifier keys produced by `compact` compiler for the given circuits.
182
183
  * @param circuitIds The circuit IDs of the verifier keys to retrieve.
183
184
  */
184
185
  async getVerifierKeys(circuitIds) {
@@ -188,7 +189,7 @@ class ZKConfigProvider {
188
189
  }));
189
190
  }
190
191
  /**
191
- * Retrieves all zero-knowledge artifacts produced by `compactc` for the given circuit.
192
+ * Retrieves all zero-knowledge artifacts produced by `compact` compiler for the given circuit.
192
193
  * @param circuitId The circuit ID of the artifacts to retrieve.
193
194
  */
194
195
  async get(circuitId) {
@@ -205,6 +206,7 @@ Object.defineProperty(exports, "Transaction", {
205
206
  enumerable: true,
206
207
  get: function () { return ledgerV6.Transaction; }
207
208
  });
209
+ exports.BALANCE_TRANSACTION_TO_PROVE = BALANCE_TRANSACTION_TO_PROVE;
208
210
  exports.FailEntirely = FailEntirely;
209
211
  exports.FailFallible = FailFallible;
210
212
  exports.InvalidProtocolSchemeError = InvalidProtocolSchemeError;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/contract.ts","../src/errors.ts","../src/logger-provider.ts","../src/midnight-types.ts","../src/zk-config-provider.ts"],"sourcesContent":[null,null,null,null,null],"names":["LogLevel"],"mappings":";;;;AAAA;;;;;;;;;;;;;AAaG;AA8EH;;;;;;AAMG;AACI,MAAM,mBAAmB,GAAG,CAAqB,QAAW,KACjE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc;;ACnGrC;;;;;;;;;;;;;AAaG;AAEH;;AAEG;AACG,MAAO,0BAA2B,SAAQ,KAAK,CAAA;AAMjC,IAAA,aAAA;AACA,IAAA,gBAAA;AANlB;;;AAGG;IACH,WAAA,CACkB,aAAqB,EACrB,gBAA0B,EAAA;AAE1C,QAAA,KAAK,CAAC,CAAA,0BAAA,EAA6B,aAAa,CAAA,iCAAA,EAAoC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,CAAE,CAAC;QAHjG,IAAA,CAAA,aAAa,GAAb,aAAa;QACb,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;IAGlC;AACD;;AC7BD;;;;;;;;;;;;;AAaG;AAIH;;AAEG;AACSA;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAClB;;AAEG;AACH,IAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA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AW,EAAE,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC;AACjD,YAAA,IAAI,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS;SACnC;IACH;AACD;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../src/contract.ts","../src/errors.ts","../src/logger-provider.ts","../src/midnight-types.ts","../src/zk-config-provider.ts"],"sourcesContent":[null,null,null,null,null],"names":["LogLevel"],"mappings":";;;;AAAA;;;;;;;;;;;;;AAaG;AA8EH;;;;;;AAMG;AACI,MAAM,mBAAmB,GAAG,CAAqB,QAAW,KACjE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc;;ACnGrC;;;;;;;;;;;;;AAaG;AAEH;;AAEG;AACG,MAAO,0BAA2B,SAAQ,KAAK,CAAA;AAMjC,IAAA,aAAA;AACA,IAAA,gBAAA;AANlB;;;AAGG;IACH,WAAA,CACkB,aAAqB,EACrB,gBAA0B,EAAA;AAE1C,QAAA,KAAK,CAAC,CAAA,0BAAA,EAA6B,aAAa,CAAA,iCAAA,EAAoC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,CAAE,CAAC;QAHjG,IAAA,CAAA,aAAa,GAAb,aAAa;QACb,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;IAGlC;AACD;;AC7BD;;;;;;;;;;;;;AAaG;AAIH;;AAEG;AACSA;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAClB;;AAEG;AACH,IAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf;;AAEG;AACH,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACjB,CAAC,EAb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AC,SAAS;SACnC;IACH;AACD;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { WitnessContext, CircuitContext, CircuitResults, ConstructorContext, ConstructorResult, ContractAddress as ContractAddress$1, SigningKey, ContractState } from '@midnight-ntwrk/compact-runtime';
2
2
  import { LogFn } from 'pino';
3
- import { FinalizedTransaction, TransactionId, Transaction, SignatureEnabled, Proof, Binding, TransactionHash, ContractAddress, IntentHash, RawTokenType, UnprovenTransaction, PreBinding, ZswapChainState, ZswapSecretKeys, DustSecretKey, ShieldedCoinInfo } from '@midnight-ntwrk/ledger-v6';
3
+ import { FinalizedTransaction, TransactionId, UnprovenTransaction, Transaction, SignatureEnabled, Proof, Binding, TransactionHash, ContractAddress, IntentHash, RawTokenType, PreBinding, ZswapChainState, ShieldedCoinInfo, CoinPublicKey, EncPublicKey } from '@midnight-ntwrk/ledger-v6';
4
4
  export { Transaction } from '@midnight-ntwrk/ledger-v6';
5
5
  import { Observable } from 'rxjs';
6
6
 
@@ -30,8 +30,8 @@ type Witness<PS> = (context: WitnessContext<any, PS>, ...rest: any[]) => [PS, an
30
30
  type Witnesses<PS = any> = Record<string, Witness<PS>>;
31
31
  /**
32
32
  * Interface for a contract. The data types defined in this file are generic shapes for the artifacts
33
- * produced by the `compactc` compiler. In other words, this `Contract` interface should match the shape
34
- * of any `Contract` class produced by `compactc`. Midnight.js uses it for generic constraints.
33
+ * produced by the `compact` compiler. In other words, this `Contract` interface should match the shape
34
+ * of any `Contract` class produced by `compact`. Midnight.js uses it for generic constraints.
35
35
  *
36
36
  * @typeParam PS - The private state modified by the contract witnesses.
37
37
  * @typeParam W - The contract witnesses type.
@@ -272,11 +272,11 @@ type UnshieldedUtxos = {
272
272
  /**
273
273
  * Represents the unshielded UTXOs that have been created but not yet spent.
274
274
  */
275
- readonly created: UnshieldedUtxo[];
275
+ readonly created: readonly UnshieldedUtxo[];
276
276
  /**
277
277
  * Represents the unshielded UTXOs that have been spent.
278
278
  */
279
- readonly spent: UnshieldedUtxo[];
279
+ readonly spent: readonly UnshieldedUtxo[];
280
280
  };
281
281
  /**
282
282
  * Represents the fees associated with a particular entity or operation.
@@ -318,7 +318,7 @@ interface FinalizedTxData {
318
318
  /**
319
319
  * All transaction IDs of the submitted transaction.
320
320
  */
321
- readonly identifiers: TransactionId[];
321
+ readonly identifiers: readonly TransactionId[];
322
322
  /**
323
323
  * The transaction hash of the transaction in which the original transaction was included.
324
324
  */
@@ -628,18 +628,6 @@ interface PublicDataProvider {
628
628
  * transaction balancing and finalization, and provides access to cryptographic secret keys.
629
629
  */
630
630
  interface WalletProvider {
631
- /**
632
- * Represents a readonly property that stores secret keys used for Zswap encryption or authentication.
633
- *
634
- * @type {ZswapSecretKeys}
635
- */
636
- readonly zswapSecretKeys: ZswapSecretKeys;
637
- /**
638
- * A readonly property that stores the secret key used for dust operations.
639
- *
640
- * @type {DustSecretKey}
641
- */
642
- readonly dustSecretKey: DustSecretKey;
643
631
  /**
644
632
  * Balances a transaction
645
633
  * @param tx The transaction to balance.
@@ -647,13 +635,8 @@ interface WalletProvider {
647
635
  * @param ttl
648
636
  */
649
637
  balanceTx(tx: UnprovenTransaction, newCoins?: ShieldedCoinInfo[], ttl?: Date): Promise<ProvingRecipe<UnprovenTransaction | FinalizedTransaction>>;
650
- /**
651
- * Finalizes the given transaction to complete its processing.
652
- *
653
- * @param {FinalizedTransaction} tx - The transaction object that needs to be finalized.
654
- * @return {Promise<FinalizedTransaction>} A promise that resolves to the finalized transaction object.
655
- */
656
- finalizeTx(tx: ProvingRecipe<FinalizedTransaction>): Promise<FinalizedTransaction>;
638
+ getCoinPublicKey(): CoinPublicKey;
639
+ getEncryptionPublicKey(): EncPublicKey;
657
640
  }
658
641
 
659
642
  /**
@@ -665,27 +648,27 @@ interface WalletProvider {
665
648
  */
666
649
  declare abstract class ZKConfigProvider<K extends string> {
667
650
  /**
668
- * Retrieves the zero-knowledge intermediate representation produced by `compactc` for the given circuit.
651
+ * Retrieves the zero-knowledge intermediate representation produced by `compact` compiler for the given circuit.
669
652
  * @param circuitId The circuit ID of the ZKIR to retrieve.
670
653
  */
671
654
  abstract getZKIR(circuitId: K): Promise<ZKIR>;
672
655
  /**
673
- * Retrieves the prover key produced by `compactc` for the given circuit.
656
+ * Retrieves the prover key produced by `compact` compiler for the given circuit.
674
657
  * @param circuitId The circuit ID of the prover key to retrieve.
675
658
  */
676
659
  abstract getProverKey(circuitId: K): Promise<ProverKey>;
677
660
  /**
678
- * Retrieves the verifier key produced by `compactc` for the given circuit.
661
+ * Retrieves the verifier key produced by `compact` compiler for the given circuit.
679
662
  * @param circuitId The circuit ID of the verifier key to retrieve.
680
663
  */
681
664
  abstract getVerifierKey(circuitId: K): Promise<VerifierKey>;
682
665
  /**
683
- * Retrieves the verifier keys produced by `compactc` for the given circuits.
666
+ * Retrieves the verifier keys produced by `compact` compiler for the given circuits.
684
667
  * @param circuitIds The circuit IDs of the verifier keys to retrieve.
685
668
  */
686
669
  getVerifierKeys(circuitIds: K[]): Promise<[K, VerifierKey][]>;
687
670
  /**
688
- * Retrieves all zero-knowledge artifacts produced by `compactc` for the given circuit.
671
+ * Retrieves all zero-knowledge artifacts produced by `compact` compiler for the given circuit.
689
672
  * @param circuitId The circuit ID of the artifacts to retrieve.
690
673
  */
691
674
  get(circuitId: K): Promise<ZKConfig<K>>;
@@ -729,5 +712,5 @@ interface MidnightProviders<ICK extends ImpureCircuitId = ImpureCircuitId, PSI e
729
712
  readonly loggerProvider?: LoggerProvider;
730
713
  }
731
714
 
732
- export { FailEntirely, FailFallible, InvalidProtocolSchemeError, LogLevel, NOTHING_TO_PROVE, SegmentFail, SegmentSuccess, SucceedEntirely, TRANSACTION_TO_PROVE, ZKConfigProvider, createProverKey, createVerifierKey, createZKIR, getImpureCircuitIds };
733
- export type { All, BlockHash, BlockHashConfig, BlockHeightConfig, CircuitParameters, CircuitReturnType, Contract, ContractStateObservableConfig, Fees, FinalizedTxData, ImpureCircuit, ImpureCircuitId, ImpureCircuits, InitialStateParameters, Latest, LoggerProvider, MidnightProvider, MidnightProviders, NothingToProve, PrivateState, PrivateStateId, PrivateStateProvider, ProofProvider, ProveTxConfig, ProvenTransaction, ProverKey, ProvingRecipe, PublicDataProvider, SegmentStatus, TransactionToProve, TxIdConfig, TxStatus, UnshieldedBalance, UnshieldedBalances, UnshieldedUtxo, UnshieldedUtxos, VerifierKey, WalletProvider, Witness, Witnesses, ZKConfig, ZKIR };
715
+ export { BALANCE_TRANSACTION_TO_PROVE, FailEntirely, FailFallible, InvalidProtocolSchemeError, LogLevel, NOTHING_TO_PROVE, SegmentFail, SegmentSuccess, SucceedEntirely, TRANSACTION_TO_PROVE, ZKConfigProvider, createProverKey, createVerifierKey, createZKIR, getImpureCircuitIds };
716
+ export type { All, BalanceTransactionToProve, BlockHash, BlockHashConfig, BlockHeightConfig, CircuitParameters, CircuitReturnType, Contract, ContractStateObservableConfig, Fees, FinalizedTxData, ImpureCircuit, ImpureCircuitId, ImpureCircuits, InitialStateParameters, Latest, LoggerProvider, MidnightProvider, MidnightProviders, NothingToProve, PrivateState, PrivateStateId, PrivateStateProvider, ProofProvider, ProveTxConfig, ProvenTransaction, ProverKey, ProvingRecipe, PublicDataProvider, SegmentStatus, TransactionToProve, TxIdConfig, TxStatus, UnshieldedBalance, UnshieldedBalances, UnshieldedUtxo, UnshieldedUtxos, VerifierKey, WalletProvider, Witness, Witnesses, ZKConfig, ZKIR };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { WitnessContext, CircuitContext, CircuitResults, ConstructorContext, ConstructorResult, ContractAddress as ContractAddress$1, SigningKey, ContractState } from '@midnight-ntwrk/compact-runtime';
2
2
  import { LogFn } from 'pino';
3
- import { FinalizedTransaction, TransactionId, Transaction, SignatureEnabled, Proof, Binding, TransactionHash, ContractAddress, IntentHash, RawTokenType, UnprovenTransaction, PreBinding, ZswapChainState, ZswapSecretKeys, DustSecretKey, ShieldedCoinInfo } from '@midnight-ntwrk/ledger-v6';
3
+ import { FinalizedTransaction, TransactionId, UnprovenTransaction, Transaction, SignatureEnabled, Proof, Binding, TransactionHash, ContractAddress, IntentHash, RawTokenType, PreBinding, ZswapChainState, ShieldedCoinInfo, CoinPublicKey, EncPublicKey } from '@midnight-ntwrk/ledger-v6';
4
4
  export { Transaction } from '@midnight-ntwrk/ledger-v6';
5
5
  import { Observable } from 'rxjs';
6
6
 
@@ -30,8 +30,8 @@ type Witness<PS> = (context: WitnessContext<any, PS>, ...rest: any[]) => [PS, an
30
30
  type Witnesses<PS = any> = Record<string, Witness<PS>>;
31
31
  /**
32
32
  * Interface for a contract. The data types defined in this file are generic shapes for the artifacts
33
- * produced by the `compactc` compiler. In other words, this `Contract` interface should match the shape
34
- * of any `Contract` class produced by `compactc`. Midnight.js uses it for generic constraints.
33
+ * produced by the `compact` compiler. In other words, this `Contract` interface should match the shape
34
+ * of any `Contract` class produced by `compact`. Midnight.js uses it for generic constraints.
35
35
  *
36
36
  * @typeParam PS - The private state modified by the contract witnesses.
37
37
  * @typeParam W - The contract witnesses type.
@@ -272,11 +272,11 @@ type UnshieldedUtxos = {
272
272
  /**
273
273
  * Represents the unshielded UTXOs that have been created but not yet spent.
274
274
  */
275
- readonly created: UnshieldedUtxo[];
275
+ readonly created: readonly UnshieldedUtxo[];
276
276
  /**
277
277
  * Represents the unshielded UTXOs that have been spent.
278
278
  */
279
- readonly spent: UnshieldedUtxo[];
279
+ readonly spent: readonly UnshieldedUtxo[];
280
280
  };
281
281
  /**
282
282
  * Represents the fees associated with a particular entity or operation.
@@ -318,7 +318,7 @@ interface FinalizedTxData {
318
318
  /**
319
319
  * All transaction IDs of the submitted transaction.
320
320
  */
321
- readonly identifiers: TransactionId[];
321
+ readonly identifiers: readonly TransactionId[];
322
322
  /**
323
323
  * The transaction hash of the transaction in which the original transaction was included.
324
324
  */
@@ -628,18 +628,6 @@ interface PublicDataProvider {
628
628
  * transaction balancing and finalization, and provides access to cryptographic secret keys.
629
629
  */
630
630
  interface WalletProvider {
631
- /**
632
- * Represents a readonly property that stores secret keys used for Zswap encryption or authentication.
633
- *
634
- * @type {ZswapSecretKeys}
635
- */
636
- readonly zswapSecretKeys: ZswapSecretKeys;
637
- /**
638
- * A readonly property that stores the secret key used for dust operations.
639
- *
640
- * @type {DustSecretKey}
641
- */
642
- readonly dustSecretKey: DustSecretKey;
643
631
  /**
644
632
  * Balances a transaction
645
633
  * @param tx The transaction to balance.
@@ -647,13 +635,8 @@ interface WalletProvider {
647
635
  * @param ttl
648
636
  */
649
637
  balanceTx(tx: UnprovenTransaction, newCoins?: ShieldedCoinInfo[], ttl?: Date): Promise<ProvingRecipe<UnprovenTransaction | FinalizedTransaction>>;
650
- /**
651
- * Finalizes the given transaction to complete its processing.
652
- *
653
- * @param {FinalizedTransaction} tx - The transaction object that needs to be finalized.
654
- * @return {Promise<FinalizedTransaction>} A promise that resolves to the finalized transaction object.
655
- */
656
- finalizeTx(tx: ProvingRecipe<FinalizedTransaction>): Promise<FinalizedTransaction>;
638
+ getCoinPublicKey(): CoinPublicKey;
639
+ getEncryptionPublicKey(): EncPublicKey;
657
640
  }
658
641
 
659
642
  /**
@@ -665,27 +648,27 @@ interface WalletProvider {
665
648
  */
666
649
  declare abstract class ZKConfigProvider<K extends string> {
667
650
  /**
668
- * Retrieves the zero-knowledge intermediate representation produced by `compactc` for the given circuit.
651
+ * Retrieves the zero-knowledge intermediate representation produced by `compact` compiler for the given circuit.
669
652
  * @param circuitId The circuit ID of the ZKIR to retrieve.
670
653
  */
671
654
  abstract getZKIR(circuitId: K): Promise<ZKIR>;
672
655
  /**
673
- * Retrieves the prover key produced by `compactc` for the given circuit.
656
+ * Retrieves the prover key produced by `compact` compiler for the given circuit.
674
657
  * @param circuitId The circuit ID of the prover key to retrieve.
675
658
  */
676
659
  abstract getProverKey(circuitId: K): Promise<ProverKey>;
677
660
  /**
678
- * Retrieves the verifier key produced by `compactc` for the given circuit.
661
+ * Retrieves the verifier key produced by `compact` compiler for the given circuit.
679
662
  * @param circuitId The circuit ID of the verifier key to retrieve.
680
663
  */
681
664
  abstract getVerifierKey(circuitId: K): Promise<VerifierKey>;
682
665
  /**
683
- * Retrieves the verifier keys produced by `compactc` for the given circuits.
666
+ * Retrieves the verifier keys produced by `compact` compiler for the given circuits.
684
667
  * @param circuitIds The circuit IDs of the verifier keys to retrieve.
685
668
  */
686
669
  getVerifierKeys(circuitIds: K[]): Promise<[K, VerifierKey][]>;
687
670
  /**
688
- * Retrieves all zero-knowledge artifacts produced by `compactc` for the given circuit.
671
+ * Retrieves all zero-knowledge artifacts produced by `compact` compiler for the given circuit.
689
672
  * @param circuitId The circuit ID of the artifacts to retrieve.
690
673
  */
691
674
  get(circuitId: K): Promise<ZKConfig<K>>;
@@ -729,5 +712,5 @@ interface MidnightProviders<ICK extends ImpureCircuitId = ImpureCircuitId, PSI e
729
712
  readonly loggerProvider?: LoggerProvider;
730
713
  }
731
714
 
732
- export { FailEntirely, FailFallible, InvalidProtocolSchemeError, LogLevel, NOTHING_TO_PROVE, SegmentFail, SegmentSuccess, SucceedEntirely, TRANSACTION_TO_PROVE, ZKConfigProvider, createProverKey, createVerifierKey, createZKIR, getImpureCircuitIds };
733
- export type { All, BlockHash, BlockHashConfig, BlockHeightConfig, CircuitParameters, CircuitReturnType, Contract, ContractStateObservableConfig, Fees, FinalizedTxData, ImpureCircuit, ImpureCircuitId, ImpureCircuits, InitialStateParameters, Latest, LoggerProvider, MidnightProvider, MidnightProviders, NothingToProve, PrivateState, PrivateStateId, PrivateStateProvider, ProofProvider, ProveTxConfig, ProvenTransaction, ProverKey, ProvingRecipe, PublicDataProvider, SegmentStatus, TransactionToProve, TxIdConfig, TxStatus, UnshieldedBalance, UnshieldedBalances, UnshieldedUtxo, UnshieldedUtxos, VerifierKey, WalletProvider, Witness, Witnesses, ZKConfig, ZKIR };
715
+ export { BALANCE_TRANSACTION_TO_PROVE, FailEntirely, FailFallible, InvalidProtocolSchemeError, LogLevel, NOTHING_TO_PROVE, SegmentFail, SegmentSuccess, SucceedEntirely, TRANSACTION_TO_PROVE, ZKConfigProvider, createProverKey, createVerifierKey, createZKIR, getImpureCircuitIds };
716
+ export type { All, BalanceTransactionToProve, BlockHash, BlockHashConfig, BlockHeightConfig, CircuitParameters, CircuitReturnType, Contract, ContractStateObservableConfig, Fees, FinalizedTxData, ImpureCircuit, ImpureCircuitId, ImpureCircuits, InitialStateParameters, Latest, LoggerProvider, MidnightProvider, MidnightProviders, NothingToProve, PrivateState, PrivateStateId, PrivateStateProvider, ProofProvider, ProveTxConfig, ProvenTransaction, ProverKey, ProvingRecipe, PublicDataProvider, SegmentStatus, TransactionToProve, TxIdConfig, TxStatus, UnshieldedBalance, UnshieldedBalances, UnshieldedUtxo, UnshieldedUtxos, VerifierKey, WalletProvider, Witness, Witnesses, ZKConfig, ZKIR };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { WitnessContext, CircuitContext, CircuitResults, ConstructorContext, ConstructorResult, ContractAddress as ContractAddress$1, SigningKey, ContractState } from '@midnight-ntwrk/compact-runtime';
2
2
  import { LogFn } from 'pino';
3
- import { FinalizedTransaction, TransactionId, Transaction, SignatureEnabled, Proof, Binding, TransactionHash, ContractAddress, IntentHash, RawTokenType, UnprovenTransaction, PreBinding, ZswapChainState, ZswapSecretKeys, DustSecretKey, ShieldedCoinInfo } from '@midnight-ntwrk/ledger-v6';
3
+ import { FinalizedTransaction, TransactionId, UnprovenTransaction, Transaction, SignatureEnabled, Proof, Binding, TransactionHash, ContractAddress, IntentHash, RawTokenType, PreBinding, ZswapChainState, ShieldedCoinInfo, CoinPublicKey, EncPublicKey } from '@midnight-ntwrk/ledger-v6';
4
4
  export { Transaction } from '@midnight-ntwrk/ledger-v6';
5
5
  import { Observable } from 'rxjs';
6
6
 
@@ -30,8 +30,8 @@ type Witness<PS> = (context: WitnessContext<any, PS>, ...rest: any[]) => [PS, an
30
30
  type Witnesses<PS = any> = Record<string, Witness<PS>>;
31
31
  /**
32
32
  * Interface for a contract. The data types defined in this file are generic shapes for the artifacts
33
- * produced by the `compactc` compiler. In other words, this `Contract` interface should match the shape
34
- * of any `Contract` class produced by `compactc`. Midnight.js uses it for generic constraints.
33
+ * produced by the `compact` compiler. In other words, this `Contract` interface should match the shape
34
+ * of any `Contract` class produced by `compact`. Midnight.js uses it for generic constraints.
35
35
  *
36
36
  * @typeParam PS - The private state modified by the contract witnesses.
37
37
  * @typeParam W - The contract witnesses type.
@@ -272,11 +272,11 @@ type UnshieldedUtxos = {
272
272
  /**
273
273
  * Represents the unshielded UTXOs that have been created but not yet spent.
274
274
  */
275
- readonly created: UnshieldedUtxo[];
275
+ readonly created: readonly UnshieldedUtxo[];
276
276
  /**
277
277
  * Represents the unshielded UTXOs that have been spent.
278
278
  */
279
- readonly spent: UnshieldedUtxo[];
279
+ readonly spent: readonly UnshieldedUtxo[];
280
280
  };
281
281
  /**
282
282
  * Represents the fees associated with a particular entity or operation.
@@ -318,7 +318,7 @@ interface FinalizedTxData {
318
318
  /**
319
319
  * All transaction IDs of the submitted transaction.
320
320
  */
321
- readonly identifiers: TransactionId[];
321
+ readonly identifiers: readonly TransactionId[];
322
322
  /**
323
323
  * The transaction hash of the transaction in which the original transaction was included.
324
324
  */
@@ -628,18 +628,6 @@ interface PublicDataProvider {
628
628
  * transaction balancing and finalization, and provides access to cryptographic secret keys.
629
629
  */
630
630
  interface WalletProvider {
631
- /**
632
- * Represents a readonly property that stores secret keys used for Zswap encryption or authentication.
633
- *
634
- * @type {ZswapSecretKeys}
635
- */
636
- readonly zswapSecretKeys: ZswapSecretKeys;
637
- /**
638
- * A readonly property that stores the secret key used for dust operations.
639
- *
640
- * @type {DustSecretKey}
641
- */
642
- readonly dustSecretKey: DustSecretKey;
643
631
  /**
644
632
  * Balances a transaction
645
633
  * @param tx The transaction to balance.
@@ -647,13 +635,8 @@ interface WalletProvider {
647
635
  * @param ttl
648
636
  */
649
637
  balanceTx(tx: UnprovenTransaction, newCoins?: ShieldedCoinInfo[], ttl?: Date): Promise<ProvingRecipe<UnprovenTransaction | FinalizedTransaction>>;
650
- /**
651
- * Finalizes the given transaction to complete its processing.
652
- *
653
- * @param {FinalizedTransaction} tx - The transaction object that needs to be finalized.
654
- * @return {Promise<FinalizedTransaction>} A promise that resolves to the finalized transaction object.
655
- */
656
- finalizeTx(tx: ProvingRecipe<FinalizedTransaction>): Promise<FinalizedTransaction>;
638
+ getCoinPublicKey(): CoinPublicKey;
639
+ getEncryptionPublicKey(): EncPublicKey;
657
640
  }
658
641
 
659
642
  /**
@@ -665,27 +648,27 @@ interface WalletProvider {
665
648
  */
666
649
  declare abstract class ZKConfigProvider<K extends string> {
667
650
  /**
668
- * Retrieves the zero-knowledge intermediate representation produced by `compactc` for the given circuit.
651
+ * Retrieves the zero-knowledge intermediate representation produced by `compact` compiler for the given circuit.
669
652
  * @param circuitId The circuit ID of the ZKIR to retrieve.
670
653
  */
671
654
  abstract getZKIR(circuitId: K): Promise<ZKIR>;
672
655
  /**
673
- * Retrieves the prover key produced by `compactc` for the given circuit.
656
+ * Retrieves the prover key produced by `compact` compiler for the given circuit.
674
657
  * @param circuitId The circuit ID of the prover key to retrieve.
675
658
  */
676
659
  abstract getProverKey(circuitId: K): Promise<ProverKey>;
677
660
  /**
678
- * Retrieves the verifier key produced by `compactc` for the given circuit.
661
+ * Retrieves the verifier key produced by `compact` compiler for the given circuit.
679
662
  * @param circuitId The circuit ID of the verifier key to retrieve.
680
663
  */
681
664
  abstract getVerifierKey(circuitId: K): Promise<VerifierKey>;
682
665
  /**
683
- * Retrieves the verifier keys produced by `compactc` for the given circuits.
666
+ * Retrieves the verifier keys produced by `compact` compiler for the given circuits.
684
667
  * @param circuitIds The circuit IDs of the verifier keys to retrieve.
685
668
  */
686
669
  getVerifierKeys(circuitIds: K[]): Promise<[K, VerifierKey][]>;
687
670
  /**
688
- * Retrieves all zero-knowledge artifacts produced by `compactc` for the given circuit.
671
+ * Retrieves all zero-knowledge artifacts produced by `compact` compiler for the given circuit.
689
672
  * @param circuitId The circuit ID of the artifacts to retrieve.
690
673
  */
691
674
  get(circuitId: K): Promise<ZKConfig<K>>;
@@ -729,5 +712,5 @@ interface MidnightProviders<ICK extends ImpureCircuitId = ImpureCircuitId, PSI e
729
712
  readonly loggerProvider?: LoggerProvider;
730
713
  }
731
714
 
732
- export { FailEntirely, FailFallible, InvalidProtocolSchemeError, LogLevel, NOTHING_TO_PROVE, SegmentFail, SegmentSuccess, SucceedEntirely, TRANSACTION_TO_PROVE, ZKConfigProvider, createProverKey, createVerifierKey, createZKIR, getImpureCircuitIds };
733
- export type { All, BlockHash, BlockHashConfig, BlockHeightConfig, CircuitParameters, CircuitReturnType, Contract, ContractStateObservableConfig, Fees, FinalizedTxData, ImpureCircuit, ImpureCircuitId, ImpureCircuits, InitialStateParameters, Latest, LoggerProvider, MidnightProvider, MidnightProviders, NothingToProve, PrivateState, PrivateStateId, PrivateStateProvider, ProofProvider, ProveTxConfig, ProvenTransaction, ProverKey, ProvingRecipe, PublicDataProvider, SegmentStatus, TransactionToProve, TxIdConfig, TxStatus, UnshieldedBalance, UnshieldedBalances, UnshieldedUtxo, UnshieldedUtxos, VerifierKey, WalletProvider, Witness, Witnesses, ZKConfig, ZKIR };
715
+ export { BALANCE_TRANSACTION_TO_PROVE, FailEntirely, FailFallible, InvalidProtocolSchemeError, LogLevel, NOTHING_TO_PROVE, SegmentFail, SegmentSuccess, SucceedEntirely, TRANSACTION_TO_PROVE, ZKConfigProvider, createProverKey, createVerifierKey, createZKIR, getImpureCircuitIds };
716
+ export type { All, BalanceTransactionToProve, BlockHash, BlockHashConfig, BlockHeightConfig, CircuitParameters, CircuitReturnType, Contract, ContractStateObservableConfig, Fees, FinalizedTxData, ImpureCircuit, ImpureCircuitId, ImpureCircuits, InitialStateParameters, Latest, LoggerProvider, MidnightProvider, MidnightProviders, NothingToProve, PrivateState, PrivateStateId, PrivateStateProvider, ProofProvider, ProveTxConfig, ProvenTransaction, ProverKey, ProvingRecipe, PublicDataProvider, SegmentStatus, TransactionToProve, TxIdConfig, TxStatus, UnshieldedBalance, UnshieldedBalances, UnshieldedUtxo, UnshieldedUtxos, VerifierKey, WalletProvider, Witness, Witnesses, ZKConfig, ZKIR };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,YAAY,EACZ,OAAO,EACP,SAAS,EACV,MAAM,YAAY,CAAC;AACpB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EACL,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,IAAI,EACJ,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,aAAa,EACb,WAAW,EACX,aAAa,EACb,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,WAAW,EACX,QAAQ,EACR,IAAI,EACL,MAAM,kBAAkB,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,YAAY,EACZ,OAAO,EACP,SAAS,EACV,MAAM,YAAY,CAAC;AACpB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,IAAI,EACJ,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,aAAa,EACb,WAAW,EACX,aAAa,EACb,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,WAAW,EACX,QAAQ,EACR,IAAI,EACL,MAAM,kBAAkB,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC"}
package/dist/index.mjs CHANGED
@@ -151,6 +151,7 @@ const FailFallible = 'FailFallible';
151
151
  */
152
152
  const SucceedEntirely = 'SucceedEntirely';
153
153
  const TRANSACTION_TO_PROVE = 'TransactionToProve';
154
+ const BALANCE_TRANSACTION_TO_PROVE = 'BalanceTransactionToProve';
154
155
  const NOTHING_TO_PROVE = 'NothingToProve';
155
156
 
156
157
  /*
@@ -176,7 +177,7 @@ const NOTHING_TO_PROVE = 'NothingToProve';
176
177
  */
177
178
  class ZKConfigProvider {
178
179
  /**
179
- * Retrieves the verifier keys produced by `compactc` for the given circuits.
180
+ * Retrieves the verifier keys produced by `compact` compiler for the given circuits.
180
181
  * @param circuitIds The circuit IDs of the verifier keys to retrieve.
181
182
  */
182
183
  async getVerifierKeys(circuitIds) {
@@ -186,7 +187,7 @@ class ZKConfigProvider {
186
187
  }));
187
188
  }
188
189
  /**
189
- * Retrieves all zero-knowledge artifacts produced by `compactc` for the given circuit.
190
+ * Retrieves all zero-knowledge artifacts produced by `compact` compiler for the given circuit.
190
191
  * @param circuitId The circuit ID of the artifacts to retrieve.
191
192
  */
192
193
  async get(circuitId) {
@@ -199,5 +200,5 @@ class ZKConfigProvider {
199
200
  }
200
201
  }
201
202
 
202
- export { FailEntirely, FailFallible, InvalidProtocolSchemeError, LogLevel, NOTHING_TO_PROVE, SegmentFail, SegmentSuccess, SucceedEntirely, TRANSACTION_TO_PROVE, ZKConfigProvider, createProverKey, createVerifierKey, createZKIR, getImpureCircuitIds };
203
+ export { BALANCE_TRANSACTION_TO_PROVE, FailEntirely, FailFallible, InvalidProtocolSchemeError, LogLevel, NOTHING_TO_PROVE, SegmentFail, SegmentSuccess, SucceedEntirely, TRANSACTION_TO_PROVE, ZKConfigProvider, createProverKey, createVerifierKey, createZKIR, getImpureCircuitIds };
203
204
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/contract.ts","../src/errors.ts","../src/logger-provider.ts","../src/midnight-types.ts","../src/zk-config-provider.ts"],"sourcesContent":[null,null,null,null,null],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;AAaG;AA8EH;;;;;;AAMG;AACI,MAAM,mBAAmB,GAAG,CAAqB,QAAW,KACjE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc;;ACnGrC;;;;;;;;;;;;;AAaG;AAEH;;AAEG;AACG,MAAO,0BAA2B,SAAQ,KAAK,CAAA;AAMjC,IAAA,aAAA;AACA,IAAA,gBAAA;AANlB;;;AAGG;IACH,WAAA,CACkB,aAAqB,EACrB,gBAA0B,EAAA;AAE1C,QAAA,KAAK,CAAC,CAAA,0BAAA,EAA6B,aAAa,CAAA,iCAAA,EAAoC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,CAAE,CAAC;QAHjG,IAAA,CAAA,aAAa,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U,CAAC,GAAG,CAAC,OAAO,EAAE,KAAI;YAC1B,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC;AACzC,YAAA,OAAO,CAAC,EAAE,EAAE,GAAG,CAAC;QAClB,CAAC,CAAC,CACH;IACH;AAEA;;;AAGG;IACH,MAAM,GAAG,CAAC,SAAY,EAAA;QACpB,OAAO;YACL,SAAS;AACT,YAAA,SAAS,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC;AAC7C,YAAA,WAAW,EAAE,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC;AACjD,YAAA,IAAI,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS;SACnC;IACH;AACD;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/contract.ts","../src/errors.ts","../src/logger-provider.ts","../src/midnight-types.ts","../src/zk-config-provider.ts"],"sourcesContent":[null,null,null,null,null],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;AAaG;AA8EH;;;;;;AAMG;AACI,MAAM,mBAAmB,GAAG,CAAqB,QAAW,KACjE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc;;ACnGrC;;;;;;;;;;;;;AAaG;AAEH;;AAEG;AACG,MAAO,0BAA2B,SAAQ,KAAK,CAAA;AAMjC,IAAA,aAAA;AACA,IAAA,gBAAA;AANlB;;;AAGG;IACH,WAAA,CACkB,aAAqB,EACrB,gBAA0B,EAAA;AAE1C,QAAA,KAAK,CAAC,CAAA,0BAAA,EAA6B,aAAa,CAAA,iCAAA,EAAoC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,CAAE,CAAC;QAHjG,IAAA,CAAA,aAAa,GAAb,aAAa;QACb,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;IAGlC;AACD;;AC7BD;;;;;;;;;;;;;AAaG;AAIH;;AAEG;IACS;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAClB;;AAEG;AACH,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EAAE,GAAG,CAAC;QAClB,CAAC,CAAC,CACH;IACH;AAEA;;;AAGG;IACH,MAAM,GAAG,CAAC,SAAY,EAAA;QACpB,OAAO;YACL,SAAS;AACT,YAAA,SAAS,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC;AAC7C,YAAA,WAAW,EAAE,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC;AACjD,YAAA,IAAI,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS;SACnC;IACH;AACD;;;;"}
@@ -132,11 +132,11 @@ export type UnshieldedUtxos = {
132
132
  /**
133
133
  * Represents the unshielded UTXOs that have been created but not yet spent.
134
134
  */
135
- readonly created: UnshieldedUtxo[];
135
+ readonly created: readonly UnshieldedUtxo[];
136
136
  /**
137
137
  * Represents the unshielded UTXOs that have been spent.
138
138
  */
139
- readonly spent: UnshieldedUtxo[];
139
+ readonly spent: readonly UnshieldedUtxo[];
140
140
  };
141
141
  /**
142
142
  * Represents the fees associated with a particular entity or operation.
@@ -178,7 +178,7 @@ export interface FinalizedTxData {
178
178
  /**
179
179
  * All transaction IDs of the submitted transaction.
180
180
  */
181
- readonly identifiers: TransactionId[];
181
+ readonly identifiers: readonly TransactionId[];
182
182
  /**
183
183
  * The transaction hash of the transaction in which the original transaction was included.
184
184
  */
@@ -1 +1 @@
1
- {"version":3,"file":"midnight-types.d.ts","sourceRoot":"","sources":["../src/midnight-types.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG;IACnC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,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B,EAAE,CAAC;AAErD,eAAO,MAAM,oBAAoB,uBAAuB,CAAC;AACzD,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AACxE,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AAEjD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,IAAI,EAAE,OAAO,oBAAoB,CAAC;IAC3C,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,yBAAyB,CAAC,YAAY,IAAI;IACpD,QAAQ,CAAC,IAAI,EAAE,OAAO,4BAA4B,CAAC;IACnD,QAAQ,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;IACjD,QAAQ,CAAC,oBAAoB,EAAE,YAAY,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,YAAY,IAAI;IACzC,QAAQ,CAAC,IAAI,EAAE,OAAO,gBAAgB,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,YAAY,IAClC,kBAAkB,GAClB,yBAAyB,CAAC,YAAY,CAAC,GACvC,cAAc,CAAC,YAAY,CAAC,CAAC"}
@@ -1,22 +1,10 @@
1
- import { type DustSecretKey, type FinalizedTransaction, type ShieldedCoinInfo, type UnprovenTransaction, type ZswapSecretKeys } from '@midnight-ntwrk/ledger-v6';
1
+ import { type CoinPublicKey, type EncPublicKey, type FinalizedTransaction, type ShieldedCoinInfo, type UnprovenTransaction } from '@midnight-ntwrk/ledger-v6';
2
2
  import { type ProvingRecipe } from './midnight-types';
3
3
  /**
4
4
  * Interface representing a WalletProvider that handles operations such as
5
5
  * transaction balancing and finalization, and provides access to cryptographic secret keys.
6
6
  */
7
7
  export interface WalletProvider {
8
- /**
9
- * Represents a readonly property that stores secret keys used for Zswap encryption or authentication.
10
- *
11
- * @type {ZswapSecretKeys}
12
- */
13
- readonly zswapSecretKeys: ZswapSecretKeys;
14
- /**
15
- * A readonly property that stores the secret key used for dust operations.
16
- *
17
- * @type {DustSecretKey}
18
- */
19
- readonly dustSecretKey: DustSecretKey;
20
8
  /**
21
9
  * Balances a transaction
22
10
  * @param tx The transaction to balance.
@@ -24,12 +12,7 @@ export interface WalletProvider {
24
12
  * @param ttl
25
13
  */
26
14
  balanceTx(tx: UnprovenTransaction, newCoins?: ShieldedCoinInfo[], ttl?: Date): Promise<ProvingRecipe<UnprovenTransaction | FinalizedTransaction>>;
27
- /**
28
- * Finalizes the given transaction to complete its processing.
29
- *
30
- * @param {FinalizedTransaction} tx - The transaction object that needs to be finalized.
31
- * @return {Promise<FinalizedTransaction>} A promise that resolves to the finalized transaction object.
32
- */
33
- finalizeTx(tx: ProvingRecipe<FinalizedTransaction>): Promise<FinalizedTransaction>;
15
+ getCoinPublicKey(): CoinPublicKey;
16
+ getEncryptionPublicKey(): EncPublicKey;
34
17
  }
35
18
  //# sourceMappingURL=wallet-provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wallet-provider.d.ts","sourceRoot":"","sources":["../src/wallet-provider.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAE1C;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEtC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,EAAE,mBAAmB,EAAE,QAAQ,CAAC,EAAE,gBAAgB,EAAE,EAAE,GAAG,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,mBAAmB,GAAG,oBAAoB,CAAC,CAAC,CAAC;IAElJ;;;;;OAKG;IACH,UAAU,CAAC,EAAE,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACpF"}
1
+ {"version":3,"file":"wallet-provider.d.ts","sourceRoot":"","sources":["../src/wallet-provider.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAE7B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,EAAE,mBAAmB,EAAE,QAAQ,CAAC,EAAE,gBAAgB,EAAE,EAAE,GAAG,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,mBAAmB,GAAG,oBAAoB,CAAC,CAAC,CAAC;IAElJ,gBAAgB,IAAI,aAAa,CAAC;IAElC,sBAAsB,IAAI,YAAY,CAAC;CACxC"}
@@ -8,27 +8,27 @@ import type { ProverKey, VerifierKey, ZKConfig, ZKIR } from './midnight-types';
8
8
  */
9
9
  export declare abstract class ZKConfigProvider<K extends string> {
10
10
  /**
11
- * Retrieves the zero-knowledge intermediate representation produced by `compactc` for the given circuit.
11
+ * Retrieves the zero-knowledge intermediate representation produced by `compact` compiler for the given circuit.
12
12
  * @param circuitId The circuit ID of the ZKIR to retrieve.
13
13
  */
14
14
  abstract getZKIR(circuitId: K): Promise<ZKIR>;
15
15
  /**
16
- * Retrieves the prover key produced by `compactc` for the given circuit.
16
+ * Retrieves the prover key produced by `compact` compiler for the given circuit.
17
17
  * @param circuitId The circuit ID of the prover key to retrieve.
18
18
  */
19
19
  abstract getProverKey(circuitId: K): Promise<ProverKey>;
20
20
  /**
21
- * Retrieves the verifier key produced by `compactc` for the given circuit.
21
+ * Retrieves the verifier key produced by `compact` compiler for the given circuit.
22
22
  * @param circuitId The circuit ID of the verifier key to retrieve.
23
23
  */
24
24
  abstract getVerifierKey(circuitId: K): Promise<VerifierKey>;
25
25
  /**
26
- * Retrieves the verifier keys produced by `compactc` for the given circuits.
26
+ * Retrieves the verifier keys produced by `compact` compiler for the given circuits.
27
27
  * @param circuitIds The circuit IDs of the verifier keys to retrieve.
28
28
  */
29
29
  getVerifierKeys(circuitIds: K[]): Promise<[K, VerifierKey][]>;
30
30
  /**
31
- * Retrieves all zero-knowledge artifacts produced by `compactc` for the given circuit.
31
+ * Retrieves all zero-knowledge artifacts produced by `compact` compiler for the given circuit.
32
32
  * @param circuitId The circuit ID of the artifacts to retrieve.
33
33
  */
34
34
  get(circuitId: K): Promise<ZKConfig<K>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midnight-ntwrk/midnight-js-types",
3
- "version": "3.0.0-alpha.2",
3
+ "version": "3.0.0-alpha.5",
4
4
  "description": "Shared data types and interfaces for MidnightJS modules",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",