@hinkal/common 0.0.51 → 0.0.52

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.
Files changed (25) hide show
  1. package/assets/{snarkjsWorkerLauncher-iiALUvt4.js → snarkjsWorkerLauncher-CAfPlZZk.js} +1 -1
  2. package/assets/{snarkjsWorkerLogic-CsiLW3mP.js → snarkjsWorkerLogic-C_MtXVdj.js} +615 -612
  3. package/assets/{snarkjsWorkerLogic-Dkn7HIO7.js → snarkjsWorkerLogic-CfOGOfbH.js} +10127 -10163
  4. package/assets/{utxoWorkerLauncher-949gA7j-.js → utxoWorkerLauncher-DnwHvvqe.js} +1 -1
  5. package/assets/{utxoWorkerLogic-CyWO48JX.js → utxoWorkerLogic-7GeccTLS.js} +30 -25
  6. package/assets/{utxoWorkerLogic-BKMfZj0g.js → utxoWorkerLogic-xG7UH4_1.js} +4 -4
  7. package/assets/viteWorkerURL.constant-DDSRgJCA.js +11 -0
  8. package/assets/{zkProofWorkerLauncher-BHFWRzUg.js → zkProofWorkerLauncher-BNaaoPQ7.js} +1 -1
  9. package/assets/{zkProofWorkerLogic-CeCxHRmW.js → zkProofWorkerLogic--J1eNnn8.js} +52686 -52712
  10. package/functions/index.d.ts +1 -0
  11. package/functions/private-wallet/emporium.helpers.d.ts +5 -0
  12. package/functions/private-wallet/index.d.ts +1 -0
  13. package/functions/snarkjs/constructEmporiumProof.d.ts +10 -0
  14. package/functions/snarkjs/index.d.ts +1 -0
  15. package/{index-DMct9BfB.js → index-BLdwnJPj.mjs} +7889 -7783
  16. package/index.mjs +452 -0
  17. package/package.json +1 -1
  18. package/{snarkjsWorkerLogic-pPc-bqoW.js → snarkjsWorkerLogic-VFKqHDuO.mjs} +615 -611
  19. package/{utxoWorkerLogic-B69q4uVA.js → utxoWorkerLogic-Ca6cWQhG.mjs} +2 -2
  20. package/viteWorkerURL.constant-BG7q0oTX.mjs +9 -0
  21. package/{workerProxy-BjrtiZjr.js → workerProxy-CHspkHvN.mjs} +1 -1
  22. package/{zkProofWorkerLogic-xs5Suq6X.js → zkProofWorkerLogic-ZYFSlYEQ.mjs} +2 -2
  23. package/assets/viteWorkerURL.constant-Dh6O2cyO.js +0 -11
  24. package/index.js +0 -449
  25. package/viteWorkerURL.constant-BIyyvK8K.js +0 -9
@@ -5,6 +5,7 @@ export * from './snarkjs';
5
5
  export * from './pre-transaction';
6
6
  export * from './protocols';
7
7
  export * from './staking';
8
+ export * from './private-wallet';
8
9
  export * from './pre-transaction/getFlatFees';
9
10
  export * from './pre-transaction/outputUtxoProcessing';
10
11
  export * from './utils/requireEnv';
@@ -0,0 +1,5 @@
1
+ import { Contract, ContractTransaction } from 'ethers';
2
+ export declare const emporiumOp: <ContractInstance extends Contract, ContractFunctions extends ContractInstance["functions"], ExactFunction extends { [K in keyof ContractFunctions]: ReturnType<ContractFunctions[K]> extends Promise<ContractTransaction> ? K : never; }[keyof ContractFunctions], FunctionArguments extends Parameters<ContractFunctions[ExactFunction]>>(contract: ContractInstance | string, func?: ExactFunction, args?: FunctionArguments extends [
3
+ ] ? [
4
+ ] : FunctionArguments, invokeWallet?: boolean, value?: bigint) => string;
5
+ export declare const encodeEmporiumMetadata: (ops: string[], walletSalt?: string) => string;
@@ -0,0 +1 @@
1
+ export * from './emporium.helpers';
@@ -0,0 +1,10 @@
1
+ import { MerkleTree } from "../../data-structures/merkle-tree";
2
+ import { Utxo } from "../../data-structures/utxo/Utxo";
3
+ import { UserKeys } from "../../data-structures/crypto-keys/keys";
4
+ import { CircomDataType, DimDataType } from "../../types/circom-data.types";
5
+ export declare const constructEmporiumProof: (merkleTree: MerkleTree<bigint>, merkleTreeAccessToken: MerkleTree<bigint>, inputUtxos: Utxo[][], outputUtxos: Utxo[][], userKeys: UserKeys, tokenCount: number, inputCount: number, emporiumAddress: string, operations: string[], relay?: string, chainId?: number, onChainCreation?: boolean[], flatFees?: bigint[], walletNonce?: bigint, volatileAmounts?: bigint[], volatileAction?: string) => Promise<{
6
+ zkCallData: import('../../index.ts').NewZkCallDataType;
7
+ circomData: CircomDataType;
8
+ dimData: DimDataType;
9
+ encryptedOutputs: string[][];
10
+ }>;
@@ -1,3 +1,4 @@
1
1
  export * from './constructGeneralZkProof';
2
+ export * from './constructEmporiumProof';
2
3
  export * from './common.snarkjs';
3
4
  export * from './generateZkProof';