@hinkal/common 0.0.63 → 0.0.64
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/{snarkjsWorkerLauncher-CAfPlZZk.js → snarkjsWorkerLauncher-Cxayz-rO.js} +1 -1
- package/assets/{snarkjsWorkerLogic-CfOGOfbH.js → snarkjsWorkerLogic-C0jhwQeU.js} +29 -26
- package/assets/{snarkjsWorkerLogic-nmHEk4-X.js → snarkjsWorkerLogic-scy9tbGQ.js} +612 -615
- package/assets/{utxoWorkerLauncher-fcb6eWp0.js → utxoWorkerLauncher-949gA7j-.js} +1 -1
- package/assets/{utxoWorkerLogic-B8tT1TX5.js → utxoWorkerLogic-CWVrduGP.js} +4 -4
- package/assets/{utxoWorkerLogic-Wy6IstjZ.js → utxoWorkerLogic-CyWO48JX.js} +27119 -27067
- package/assets/viteWorkerURL.constant-D9TTkFfm.js +11 -0
- package/assets/{zkProofWorkerLauncher-BQBrO28l.js → zkProofWorkerLauncher-B54jpyIs.js} +1 -1
- package/assets/{zkProofWorkerLogic-C7OtYbQP.js → zkProofWorkerLogic-g413cUJh.js} +58151 -61837
- package/constants/coingecko.constants.d.ts +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +0 -1
- package/data-structures/Hinkal/IHinkal.d.ts +0 -1
- package/data-structures/Hinkal/hinkalActionPendle.d.ts +1 -1
- package/data-structures/Hinkal/hinkalActionVolatile.d.ts +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.d.ts +1 -1
- package/data-structures/Hinkal/index.d.ts +0 -1
- package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.d.ts +1 -4
- package/externalABIs/index.d.ts +1 -2
- package/functions/index.d.ts +0 -1
- package/functions/snarkjs/generateCircomData.d.ts +1 -2
- package/functions/snarkjs/generateZkProof.d.ts +1 -1
- package/functions/snarkjs/index.d.ts +0 -1
- package/functions/utils/external-action.utils.d.ts +1 -2
- package/{index-Aiaspot9.mjs → index-CUbILGvb.js} +23953 -28974
- package/index.js +449 -0
- package/package.json +1 -3
- package/{snarkjsWorkerLogic-Cfiz1nf4.mjs → snarkjsWorkerLogic-CwwtO7nZ.js} +611 -615
- package/types/IMultiThreadedUtxoUtils.d.ts +1 -2
- package/types/ethereum-network.types.d.ts +0 -1
- package/types/hinkal.types.d.ts +0 -1
- package/{utxoWorkerLogic-CzARBTiU.mjs → utxoWorkerLogic-CF58kJ-M.js} +2 -2
- package/viteWorkerURL.constant-c_SfgCMF.js +9 -0
- package/{workerProxy-C05dOvVG.mjs → workerProxy-MPE0DJEa.js} +1 -1
- package/{zkProofWorkerLogic-DYmJThyB.mjs → zkProofWorkerLogic-D70zEqDu.js} +2 -2
- package/assets/viteWorkerURL.constant-BTZdN3Pf.js +0 -11
- package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +0 -2
- package/functions/private-wallet/emporium.helpers.d.ts +0 -5
- package/functions/private-wallet/index.d.ts +0 -2
- package/functions/private-wallet/opProducer.d.ts +0 -5
- package/functions/snarkjs/constructEmporiumProof.d.ts +0 -10
- package/index.mjs +0 -456
- package/viteWorkerURL.constant-LzBk6jes.mjs +0 -9
|
@@ -7,7 +7,7 @@ export declare const coingeckoTokenListUrl = "https://pro-api.coingecko.com/api/
|
|
|
7
7
|
export declare const getCoingeckoIdForNativeTokens: {
|
|
8
8
|
[x: number]: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const getCoingeckoPlatform: (chainId: number) => "base" | "blast" | "ethereum" | "
|
|
10
|
+
export declare const getCoingeckoPlatform: (chainId: number) => "base" | "blast" | "ethereum" | "polygon-pos" | "arbitrum-one" | "avalanche" | "binance-smart-chain" | "optimistic-ethereum";
|
|
11
11
|
export declare const CoinGeckoChainLabels: {
|
|
12
12
|
[x: number]: string;
|
|
13
13
|
};
|
|
@@ -75,7 +75,6 @@ export declare class Hinkal<ConnectorType> implements IHinkal {
|
|
|
75
75
|
actionPendleLP(erc20Addresses: string[], amountChanges: bigint[], pendleLPMetadata: PendleLPMetadata, gasTokenAddress?: string, onlyGasEstimate?: boolean): Promise<RelayerTransaction | bigint>;
|
|
76
76
|
actionVolatile(erc20Addresses: string[], amountChanges: bigint[], volatileHelperData: VolatileHelperData, onlyGasEstimate?: boolean): Promise<RelayerTransaction | ContractTransaction | bigint>;
|
|
77
77
|
actionStake(erc20Addresses: string[], amountChanges: bigint[], stakeMode: HinkalStakeMode, stakedTokenRecipient: string): Promise<ContractTransaction>;
|
|
78
|
-
actionPrivateWallet(erc20Addresses: string[], amountChanges: bigint[], ops?: string[], walletNonce?: bigint, onlyGasEstimate?: boolean): Promise<RelayerTransaction | bigint>;
|
|
79
78
|
getPendleLPClaimableParams(wlpTokenAddress: string, wlpTokenBalance: bigint): Promise<{
|
|
80
79
|
amount: bigint;
|
|
81
80
|
timestamp: string;
|
|
@@ -67,7 +67,6 @@ export interface IHinkal<ConnectorType = unknown> {
|
|
|
67
67
|
actionPendle(erc20Addresses: string[], amountChanges: bigint[], pendleMetadata: PendleMetadata, gasTokenAddress?: string, onlyGasEstimate?: boolean): Promise<RelayerTransaction | ContractTransaction | bigint>;
|
|
68
68
|
actionPendleLP(erc20Addresses: string[], amountChanges: bigint[], pendleLPMetadata: PendleLPMetadata, gasTokenAddress?: string, onlyGasEstimate?: boolean): Promise<RelayerTransaction | bigint>;
|
|
69
69
|
actionVolatile(erc20Addresses: string[], amountChanges: bigint[], volatileHelperData: VolatileHelperData, onlyGasEstimate?: boolean): Promise<RelayerTransaction | ContractTransaction | bigint>;
|
|
70
|
-
actionPrivateWallet(erc20Addresses: string[], amountChanges: bigint[], ops: string[], walletNonce: bigint | undefined, onlyGasEstimate: boolean): Promise<RelayerTransaction | bigint>;
|
|
71
70
|
getPendleLPClaimableParams(wlpTokenAddress: string, wlpTokenBalance: bigint): Promise<{
|
|
72
71
|
amount: bigint;
|
|
73
72
|
timestamp: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PendleMetadata } from '../../types';
|
|
2
2
|
import { IHinkal } from './IHinkal';
|
|
3
|
-
export declare const hinkalActionPendle: (hinkal: IHinkal, erc20Addresses: string[], amountChanges: bigint[], pendleMetadata: PendleMetadata, gasTokenAddress?: string, onlyGasEstimate?: boolean) => Promise<bigint | import("libs/shared/common/src/types/relayer.types").RelayerTransaction
|
|
3
|
+
export declare const hinkalActionPendle: (hinkal: IHinkal, erc20Addresses: string[], amountChanges: bigint[], pendleMetadata: PendleMetadata, gasTokenAddress?: string, onlyGasEstimate?: boolean) => Promise<bigint | import("ethers").ContractTransaction | import("libs/shared/common/src/types/relayer.types").RelayerTransaction>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { VolatileHelperData } from '../volatile-helper/VolatileHelper';
|
|
2
2
|
import { IHinkal } from './IHinkal';
|
|
3
|
-
export declare const hinkalActionVolatile: (hinkal: IHinkal, erc20Addresses: string[], amountChanges: bigint[], volatileHelperData: VolatileHelperData, onlyGasEstimate: boolean) => Promise<bigint | import("libs/shared/common/src/types/relayer.types").RelayerTransaction
|
|
3
|
+
export declare const hinkalActionVolatile: (hinkal: IHinkal, erc20Addresses: string[], amountChanges: bigint[], volatileHelperData: VolatileHelperData, onlyGasEstimate: boolean) => Promise<bigint | import("ethers").ContractTransaction | import("libs/shared/common/src/types/relayer.types").RelayerTransaction>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IHinkal } from './IHinkal';
|
|
2
|
-
export declare const hinkalWithdraw: (hinkal: IHinkal, erc20Addresses: string[], amountChanges: bigint[], recipientAddress: string, isRelayerOff: boolean, onlyGasEstimate?: boolean) => Promise<bigint | import("libs/shared/common/src/types/relayer.types").RelayerTransaction
|
|
2
|
+
export declare const hinkalWithdraw: (hinkal: IHinkal, erc20Addresses: string[], amountChanges: bigint[], recipientAddress: string, isRelayerOff: boolean, onlyGasEstimate?: boolean) => Promise<bigint | import("ethers").ContractTransaction | import("libs/shared/common/src/types/relayer.types").RelayerTransaction>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { UserKeys } from '
|
|
2
|
-
import { Utxo } from '../utxo/Utxo';
|
|
3
|
-
import { EncryptedOutputWithSign, OutputsWithSignAndLast } from '../../types/commitments.types';
|
|
4
|
-
import { IMultiThreadedUtxoUtils } from '../../types/IMultiThreadedUtxoUtils';
|
|
1
|
+
import { EncryptedOutputWithSign, IMultiThreadedUtxoUtils, OutputsWithSignAndLast, UserKeys, Utxo } from '../../index.ts';
|
|
5
2
|
export declare class MultiThreadedUtxoUtils implements IMultiThreadedUtxoUtils {
|
|
6
3
|
private get NUM_WORKERS();
|
|
7
4
|
private createUtxoPromise;
|
package/externalABIs/index.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ import { abi as USDRABI } from './USDR';
|
|
|
13
13
|
import { abi as USDR3CRVABI } from './USDR3CRV';
|
|
14
14
|
import { abi as USDTABI } from './USDT';
|
|
15
15
|
import { abi as WETHABI } from './WETH';
|
|
16
|
-
import { abi as ISwapRouterABI } from './ISwapRouter.json';
|
|
17
16
|
import lidoStEthAbi from './LidoStEthAbi.json';
|
|
18
17
|
import lidoStMaticAbi from './LidoStMaticAbi.json';
|
|
19
18
|
import lidoWithdrawalQueueERC721Abi from './LidoWithdrawalQueueERC721Abi.json';
|
|
@@ -24,4 +23,4 @@ import { abi as transactionProverABI } from './transactionsProver.json';
|
|
|
24
23
|
import { abi as BabABI } from './BabPassport.json';
|
|
25
24
|
import { abi as GalxeABI } from './GalxePassport.json';
|
|
26
25
|
import optimismGasPriceOracleAbi from './OptimismGasPriceOracle.json';
|
|
27
|
-
export { CurveWrappedMainPoolABI, CurveReadingWrapperABI, quoterV2ABI, factoryABI, AmTokenABI, BeefyVaultABI, ERC20ABI, USDCABI, daiABI, USDRABI, USDR3CRVABI, USDTABI, WETHABI, BUSDABI, sanctionsListABI, lidoStEthAbi, lidoStMaticAbi, lidoWithdrawalQueueERC721Abi, lidoWstEthAbi, poLidoNftAbi, lidoStakeManagerAbi, transactionProverABI, BabABI, GalxeABI, optimismGasPriceOracleAbi,
|
|
26
|
+
export { CurveWrappedMainPoolABI, CurveReadingWrapperABI, quoterV2ABI, factoryABI, AmTokenABI, BeefyVaultABI, ERC20ABI, USDCABI, daiABI, USDRABI, USDR3CRVABI, USDTABI, WETHABI, BUSDABI, sanctionsListABI, lidoStEthAbi, lidoStMaticAbi, lidoWithdrawalQueueERC721Abi, lidoWstEthAbi, poLidoNftAbi, lidoStakeManagerAbi, transactionProverABI, BabABI, GalxeABI, optimismGasPriceOracleAbi, };
|
package/functions/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export * from './snarkjs';
|
|
|
5
5
|
export * from './pre-transaction';
|
|
6
6
|
export * from './protocols';
|
|
7
7
|
export * from './staking';
|
|
8
|
-
export * from './private-wallet';
|
|
9
8
|
export * from './pre-transaction/getFlatFees';
|
|
10
9
|
export * from './pre-transaction/outputUtxoProcessing';
|
|
11
10
|
export * from './utils/requireEnv';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { Utxo } from '../../data-structures/utxo/Utxo';
|
|
2
|
-
import { CircomDataType, HookDataType, StealthAddressStructure } from '../../types
|
|
3
|
-
import { ExternalActionId } from '../../types/external-action.types';
|
|
2
|
+
import { CircomDataType, ExternalActionId, HookDataType, StealthAddressStructure } from '../../types';
|
|
4
3
|
export declare const generateCircomData: (rootHashHinkal: bigint | undefined, rootHashAccessToken: bigint | undefined, inputUtxos: Utxo[][], outputUtxos: Utxo[][], encryptedOutputs: string[][], flatFees: bigint[], publicSignalCount: number, externalActionId: ExternalActionId | bigint, externalAddress: string | undefined, externalActionMetadata: string, relay: string, calldataHash: bigint, tokenIds: number[], stealthAddressStructure: StealthAddressStructure, onChainCreation: boolean[], hookData: HookDataType | undefined) => Promise<CircomDataType>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NewZkCallDataType } from '../../types
|
|
1
|
+
import { NewZkCallDataType } from '../../types';
|
|
2
2
|
export declare const generateZkProof: (chainId: number, verifierName: string, input: any) => Promise<{
|
|
3
3
|
zkCallData: NewZkCallDataType;
|
|
4
4
|
publicSignals: string[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ethers } from 'ethers';
|
|
2
|
-
import { CircomDataJsonType } from '../../types
|
|
3
|
-
import { ExternalActionId } from '../../types/external-action.types';
|
|
2
|
+
import { CircomDataJsonType, ExternalActionId } from '../../types';
|
|
4
3
|
export declare const getExternalActionIdHash: (externalActionId: ExternalActionId | 0n) => bigint;
|
|
5
4
|
export declare const getExternalActionIdFromNumber: (externalActionIdNumber: string | bigint) => ExternalActionId | undefined;
|
|
6
5
|
export declare const getActionFromMetadata: (externalActionId: ExternalActionId, circomDataDeserialized: Partial<CircomDataJsonType>) => number | undefined;
|