@hinkal/common 0.0.38 → 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.
- package/assets/{utxoWorkerLauncher-DD2MTdrZ.js → snarkjsWorkerLauncher-DnwkYs-X.js} +1 -2
- package/assets/{snarkjsWorkerLogic-CEwqbPan.js → snarkjsWorkerLogic-BC6aIyVU.js} +1737 -1714
- package/assets/{snarkjsWorkerLogic-CLrSWcNt.js → snarkjsWorkerLogic-nszaMzK5.js} +615 -613
- package/assets/{snarkjsWorkerLauncher-CA30lfwg.js → utxoWorkerLauncher-DnwHvvqe.js} +1 -2
- package/assets/{utxoWorkerLogic-POijX68C.js → utxoWorkerLogic-7GeccTLS.js} +31 -26
- package/assets/{utxoWorkerLogic-BgOyVxuc.js → utxoWorkerLogic-nv68H8Xa.js} +9 -9
- package/assets/viteWorkerURL.constant-C5mJTKPS.js +11 -0
- package/assets/{zkProofWorkerLauncher-3zvFwfyC.js → zkProofWorkerLauncher-z3GSPrLx.js} +22 -23
- package/assets/{zkProofWorkerLogic-DjFkre1v.js → zkProofWorkerLogic-BbfiJ5PN.js} +57523 -57493
- package/constants/token-data/index.d.ts +2 -1
- package/constants/token-data/popularTokens.constants.d.ts +3 -0
- package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +2 -0
- package/data-structures/Hinkal/index.d.ts +1 -0
- package/functions/index.d.ts +1 -0
- package/functions/private-wallet/emporium.helpers.d.ts +5 -0
- package/functions/private-wallet/index.d.ts +1 -0
- package/functions/snarkjs/constructEmporiumProof.d.ts +10 -0
- package/functions/snarkjs/index.d.ts +1 -0
- package/{index-B2h7Ehka.js → index-CaHu7xgL.mjs} +7814 -7666
- package/index.mjs +453 -0
- package/package.json +6 -9
- package/{snarkjsWorkerLogic-CVOSTl5c.js → snarkjsWorkerLogic-FVkZbSSu.mjs} +615 -612
- package/types/ethereum-network.types.d.ts +1 -0
- package/{utxoWorkerLogic-BG98Iib9.js → utxoWorkerLogic-DkQqd2La.mjs} +4 -4
- package/viteWorkerURL.constant-DV_UzTgr.mjs +9 -0
- package/{workerProxy-AhHfF6hk.js → workerProxy-C7q4UMti.mjs} +1 -1
- package/{zkProofWorkerLogic-Dk3zCanr.js → zkProofWorkerLogic-CCcXVAsh.mjs} +20 -20
- package/assets/viteWorkerURL.constant-CQNSvlud.js +0 -11
- package/index.js +0 -448
- package/viteWorkerURL.constant-DtthAV1C.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,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>;
|
package/functions/index.d.ts
CHANGED
|
@@ -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
|
+
}>;
|