@hinkal/common 0.0.37 → 0.0.39

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 (30) hide show
  1. package/assets/{utxoWorkerLauncher-DD2MTdrZ.js → snarkjsWorkerLauncher-DnwkYs-X.js} +1 -2
  2. package/assets/{snarkjsWorkerLogic-CEwqbPan.js → snarkjsWorkerLogic-BC6aIyVU.js} +1737 -1714
  3. package/assets/{snarkjsWorkerLogic-BQ4zqGJJ.js → snarkjsWorkerLogic-nszaMzK5.js} +615 -613
  4. package/assets/{snarkjsWorkerLauncher-CA30lfwg.js → utxoWorkerLauncher-DnwHvvqe.js} +1 -2
  5. package/assets/{utxoWorkerLogic-POijX68C.js → utxoWorkerLogic-7GeccTLS.js} +31 -26
  6. package/assets/{utxoWorkerLogic-BthoGkYp.js → utxoWorkerLogic-nv68H8Xa.js} +9 -9
  7. package/assets/viteWorkerURL.constant-C5mJTKPS.js +11 -0
  8. package/assets/{zkProofWorkerLauncher-B2C2_BED.js → zkProofWorkerLauncher-z3GSPrLx.js} +22 -23
  9. package/assets/{zkProofWorkerLogic-vjSyGOya.js → zkProofWorkerLogic-BbfiJ5PN.js} +57523 -57493
  10. package/constants/token-data/index.d.ts +2 -1
  11. package/constants/token-data/popularTokens.constants.d.ts +3 -0
  12. package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +2 -0
  13. package/data-structures/Hinkal/index.d.ts +1 -0
  14. package/functions/index.d.ts +1 -0
  15. package/functions/private-wallet/emporium.helpers.d.ts +5 -0
  16. package/functions/private-wallet/index.d.ts +1 -0
  17. package/functions/snarkjs/constructEmporiumProof.d.ts +10 -0
  18. package/functions/snarkjs/index.d.ts +1 -0
  19. package/{index-DSRkx6gL.js → index-CaHu7xgL.mjs} +37108 -37023
  20. package/index.mjs +453 -0
  21. package/package.json +6 -9
  22. package/{snarkjsWorkerLogic-CC5wBg5V.js → snarkjsWorkerLogic-FVkZbSSu.mjs} +615 -612
  23. package/types/ethereum-network.types.d.ts +1 -0
  24. package/{utxoWorkerLogic-aaBiDpYT.js → utxoWorkerLogic-DkQqd2La.mjs} +4 -4
  25. package/viteWorkerURL.constant-DV_UzTgr.mjs +9 -0
  26. package/{workerProxy-CdISks2D.js → workerProxy-C7q4UMti.mjs} +1 -1
  27. package/{zkProofWorkerLogic-tLglzki9.js → zkProofWorkerLogic-CCcXVAsh.mjs} +20 -20
  28. package/assets/viteWorkerURL.constant-A3dxrwE0.js +0 -11
  29. package/index.js +0 -448
  30. package/viteWorkerURL.constant-CkkzA-Qt.js +0 -9
@@ -17,6 +17,7 @@ import { networkRegistry as optimismRegistry } from './optimismRegistry.json';
17
17
  import { networkRegistry as baseRegistry } from './baseRegistry.json';
18
18
  import { networkRegistry as blastRegistry } from './blastRegistry.json';
19
19
  import { networkRegistry as localhostRegistry } from './localhostRegistry.json';
20
+ import { PopularTokenSymbols } from './popularTokens.constants';
20
21
  export * from './ERC20Registry';
21
22
  declare const coingeckoRegistry: CoingeckoToken[];
22
- export { ethMainnetRegistryFixed, arbMainnetRegistryFixed, bnbMainnetRegistryFixed, polygonRegistryFixed, avalancheRegistryFixed, optimismRegistryFixed, baseRegistryFixed, blastRegistryFixed, ethMainnetRegistry, arbMainnetRegistry, bnbMainnetRegistry, polygonRegistry, avalancheRegistry, optimismRegistry, baseRegistry, blastRegistry, localhostRegistry, coingeckoRegistry, urlForBeefyVaultTotalInUSD, urlForBeefyVaultTokens, urlForRegularTokenPricesInBeefy, };
23
+ export { ethMainnetRegistryFixed, arbMainnetRegistryFixed, bnbMainnetRegistryFixed, polygonRegistryFixed, avalancheRegistryFixed, optimismRegistryFixed, baseRegistryFixed, blastRegistryFixed, ethMainnetRegistry, arbMainnetRegistry, bnbMainnetRegistry, polygonRegistry, avalancheRegistry, optimismRegistry, baseRegistry, blastRegistry, localhostRegistry, coingeckoRegistry, urlForBeefyVaultTotalInUSD, urlForBeefyVaultTokens, urlForRegularTokenPricesInBeefy, PopularTokenSymbols, };
@@ -0,0 +1,3 @@
1
+ export declare const PopularTokenSymbols: {
2
+ symbol: string;
3
+ }[];
@@ -0,0 +1,2 @@
1
+ import { IHinkal } from './IHinkal';
2
+ export declare const hinkalPrivateWallet: (hinkal: IHinkal, erc20Addresses: string[], amountChanges: bigint[], ops: string[] | undefined, walletNone: bigint, onlyGasEstimate?: boolean) => Promise<bigint | import("libs/shared/common/src/types/relayer.types").RelayerTransaction>;
@@ -8,4 +8,5 @@ export * from './hinkalDeposit';
8
8
  export * from './hinkalSwap';
9
9
  export * from './hinkalTransfer';
10
10
  export * from './hinkalWithdraw';
11
+ export * from './hinkalPrivateWallet';
11
12
  export * from './resetMerkleTrees';
@@ -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';