@hinkal/common 0.2.33 → 0.2.35
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/API/callNearIntentsAPI.cjs +1 -0
- package/API/callNearIntentsAPI.d.ts +3 -0
- package/API/callNearIntentsAPI.mjs +8 -0
- package/API/enclaveSignatureCalls.cjs +1 -1
- package/API/enclaveSignatureCalls.d.ts +1 -1
- package/API/enclaveSignatureCalls.mjs +1 -1
- package/API/index.cjs +1 -1
- package/API/index.d.ts +1 -0
- package/API/index.mjs +1 -0
- package/constants/bridging.constants.cjs +1 -1
- package/constants/bridging.constants.d.ts +15 -1
- package/constants/bridging.constants.mjs +25 -5
- package/constants/chains.constants.cjs +1 -1
- package/constants/chains.constants.d.ts +12 -1
- package/constants/chains.constants.mjs +94 -26
- package/constants/index.cjs +1 -1
- package/constants/index.mjs +1 -0
- package/constants/protocol.constants.cjs +1 -1
- package/constants/protocol.constants.d.ts +3 -0
- package/constants/protocol.constants.mjs +2 -2
- package/constants/server.constants.cjs +1 -1
- package/constants/server.constants.d.ts +2 -0
- package/constants/server.constants.mjs +2 -0
- package/constants/token-data/ERC20Registry.cjs +1 -1
- package/constants/token-data/ERC20Registry.mjs +49 -14
- package/constants/token-data/avalancheRegistry.json.cjs +1 -0
- package/constants/token-data/avalancheRegistry.json.mjs +44 -0
- package/constants/token-data/bnbMainnetRegistry.json.cjs +1 -0
- package/constants/token-data/bnbMainnetRegistry.json.mjs +44 -0
- package/constants/token-data/cronosRegistry.json.cjs +1 -0
- package/constants/token-data/cronosRegistry.json.mjs +44 -0
- package/constants/token-data/hyperEvmRegistry.json.cjs +1 -0
- package/constants/token-data/hyperEvmRegistry.json.mjs +36 -0
- package/constants/token-data/index.cjs +1 -1
- package/constants/token-data/index.d.ts +58 -1
- package/constants/token-data/index.mjs +10 -2
- package/constants/token-data/inkRegistry.json.cjs +1 -0
- package/constants/token-data/inkRegistry.json.mjs +28 -0
- package/constants/token-data/monadRegistry.json.cjs +1 -0
- package/constants/token-data/monadRegistry.json.mjs +36 -0
- package/constants/token-data/plasmaRegistry.json.cjs +1 -0
- package/constants/token-data/plasmaRegistry.json.mjs +28 -0
- package/constants/token-data/popularNonRebasingTokens.cjs +1 -0
- package/constants/token-data/popularNonRebasingTokens.d.ts +2 -0
- package/constants/token-data/popularNonRebasingTokens.mjs +11 -0
- package/constants/tokens.constants.cjs +1 -1
- package/constants/tokens.constants.mjs +8 -1
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +8 -2
- package/data-structures/Hinkal/Hinkal.mjs +123 -101
- package/data-structures/Hinkal/IHinkal.d.ts +8 -2
- package/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/data-structures/Hinkal/handleAutoDepositBack.mjs +15 -15
- package/data-structures/Hinkal/hinkalClaimUtxo.cjs +1 -1
- package/data-structures/Hinkal/hinkalClaimUtxo.mjs +33 -35
- package/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
- package/data-structures/Hinkal/hinkalDepositAndBridge.mjs +43 -49
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +38 -40
- package/data-structures/Hinkal/hinkalNearDepositAndBridge.cjs +1 -0
- package/data-structures/Hinkal/hinkalNearDepositAndBridge.d.ts +6 -0
- package/data-structures/Hinkal/hinkalNearDepositAndBridge.mjs +43 -0
- package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.mjs +21 -26
- package/data-structures/Hinkal/hinkalSolanaClaimUtxo.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaClaimUtxo.mjs +62 -64
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +2 -2
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +36 -36
- package/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySend.mjs +7 -7
- package/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +9 -9
- package/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +8 -8
- package/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaSwap.mjs +50 -51
- package/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaTransfer.mjs +45 -46
- package/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +38 -39
- package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSwap.mjs +18 -19
- package/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalTransfer.mjs +21 -22
- package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.mjs +24 -25
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +39 -41
- package/data-structures/Hinkal/index.cjs +1 -1
- package/data-structures/Hinkal/index.d.ts +1 -0
- package/data-structures/Hinkal/index.mjs +1 -0
- package/data-structures/crypto-keys/keys.cjs +1 -1
- package/data-structures/crypto-keys/keys.d.ts +18 -0
- package/data-structures/crypto-keys/keys.mjs +10 -0
- package/data-structures/index.cjs +1 -1
- package/data-structures/index.mjs +1 -0
- package/error-handling/error-codes.constants.cjs +1 -1
- package/error-handling/error-codes.constants.d.ts +4 -0
- package/error-handling/error-codes.constants.mjs +4 -0
- package/error-handling/get-error.message.cjs +1 -1
- package/error-handling/get-error.message.mjs +2 -1
- package/functions/index.cjs +1 -1
- package/functions/index.mjs +8 -6
- package/functions/pre-transaction/buildCommitmentValidationData.cjs +1 -1
- package/functions/pre-transaction/buildCommitmentValidationData.d.ts +12 -2
- package/functions/pre-transaction/buildCommitmentValidationData.mjs +43 -36
- package/functions/pre-transaction/sendV0Transaction.cjs +2 -1
- package/functions/pre-transaction/sendV0Transaction.d.ts +2 -2
- package/functions/pre-transaction/sendV0Transaction.mjs +65 -60
- package/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/functions/snarkjs/constructGeneralZkProof.d.ts +1 -0
- package/functions/snarkjs/constructGeneralZkProof.mjs +6 -5
- package/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/functions/snarkjs/constructSolanaZkProof.d.ts +1 -0
- package/functions/snarkjs/constructSolanaZkProof.mjs +35 -34
- package/functions/snarkjs/generateMainAndCommitmentZkProof.cjs +1 -0
- package/functions/snarkjs/generateMainAndCommitmentZkProof.d.ts +11 -0
- package/functions/snarkjs/generateMainAndCommitmentZkProof.mjs +16 -0
- package/functions/snarkjs/generateZkProof.cjs +1 -1
- package/functions/snarkjs/generateZkProof.d.ts +3 -3
- package/functions/snarkjs/generateZkProof.mjs +5 -9
- package/functions/snarkjs/generateZkProofEnclave.cjs +1 -1
- package/functions/snarkjs/generateZkProofEnclave.d.ts +2 -2
- package/functions/snarkjs/generateZkProofEnclave.mjs +8 -8
- package/functions/snarkjs/generateZkProofSelf.cjs +1 -1
- package/functions/snarkjs/generateZkProofSelf.mjs +5 -5
- package/functions/snarkjs/index.cjs +1 -1
- package/functions/snarkjs/index.d.ts +1 -0
- package/functions/snarkjs/index.mjs +1 -0
- package/functions/snarkjs/verifyCommitmentValidationData.cjs +1 -1
- package/functions/snarkjs/verifyCommitmentValidationData.mjs +5 -5
- package/functions/utils/customEnclaveFunctionsRegister.d.ts +3 -3
- package/functions/utils/enclave-signature-storage.cjs +1 -1
- package/functions/utils/enclave-signature-storage.d.ts +1 -1
- package/functions/utils/enclave-signature-storage.mjs +1 -1
- package/functions/utils/index.cjs +1 -1
- package/functions/utils/index.d.ts +1 -0
- package/functions/utils/index.mjs +6 -5
- package/functions/utils/nearIntents.utils.cjs +1 -0
- package/functions/utils/nearIntents.utils.d.ts +11 -0
- package/functions/utils/nearIntents.utils.mjs +36 -0
- package/functions/utils/time.utils.cjs +1 -1
- package/functions/utils/time.utils.d.ts +1 -0
- package/functions/utils/time.utils.mjs +2 -2
- package/functions/web3/oneInchAPI.cjs +1 -1
- package/functions/web3/oneInchAPI.mjs +1 -1
- package/index.cjs +1 -1
- package/index.mjs +320 -315
- package/package.json +1 -1
- package/types/index.d.ts +1 -0
- package/types/near-intents.types.d.ts +60 -0
- package/types/solana.types.d.ts +1 -0
- package/webworker/{logError-fCJ4HXQz.js → logError-DoUkEIFE.js} +14 -14
- package/webworker/package.json +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +1 -1
- package/webworker/snarkjsWorkerNode.cjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +1 -1
- package/webworker/utxoWorkerNode.cjs +1 -1
- package/webworker/viteWorkerURL.constant.cjs +3 -3
- package/webworker/viteWorkerURL.constant.mjs +3 -3
- package/webworker/{workerProxy-BNBqYien.js → workerProxy-DQJE57Ye.js} +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +1 -1
- package/webworker/zkProofWorkerNode.cjs +1 -1
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export * from './http.types';
|
|
|
47
47
|
export * from './connector.types';
|
|
48
48
|
export * from './scheduled-transactions.types';
|
|
49
49
|
export * from './bridging-tx.types';
|
|
50
|
+
export * from './near-intents.types';
|
|
50
51
|
export * from './onramp.types';
|
|
51
52
|
export * from './events.types';
|
|
52
53
|
export * from './tron.types';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { TokenBalanceWithUsdValue } from './token.types';
|
|
2
|
+
export type NearIntentsSwapType = 'EXACT_INPUT' | 'EXACT_OUTPUT';
|
|
3
|
+
export type NearIntentsDepositType = 'ORIGIN_CHAIN' | 'INTENTS';
|
|
4
|
+
export type NearIntentsRecipientType = 'DESTINATION_CHAIN' | 'INTENTS';
|
|
5
|
+
export type NearIntentsRefundType = 'ORIGIN_CHAIN' | 'INTENTS';
|
|
6
|
+
export interface NearIntentsQuoteRequest {
|
|
7
|
+
dry: boolean;
|
|
8
|
+
swapType: NearIntentsSwapType;
|
|
9
|
+
slippageTolerance: number;
|
|
10
|
+
originAsset: string;
|
|
11
|
+
depositType: NearIntentsDepositType;
|
|
12
|
+
destinationAsset: string;
|
|
13
|
+
amount: string;
|
|
14
|
+
recipient: string;
|
|
15
|
+
recipientType: NearIntentsRecipientType;
|
|
16
|
+
refundTo: string;
|
|
17
|
+
refundType: NearIntentsRefundType;
|
|
18
|
+
deadline: string;
|
|
19
|
+
}
|
|
20
|
+
export interface NearIntentsQuoteResponse {
|
|
21
|
+
quote: {
|
|
22
|
+
depositAddress: string;
|
|
23
|
+
amountOut: string;
|
|
24
|
+
deadline?: string;
|
|
25
|
+
timeWhenInactive?: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface NearIntentsToken {
|
|
29
|
+
assetId: string;
|
|
30
|
+
decimals: number;
|
|
31
|
+
blockchain: string;
|
|
32
|
+
symbol: string;
|
|
33
|
+
contractAddress?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface NearBridgeParams {
|
|
36
|
+
originAsset: string;
|
|
37
|
+
destinationChainId: number;
|
|
38
|
+
destinationAsset: string;
|
|
39
|
+
slippageBps?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface NearIntentsRefundBalance extends TokenBalanceWithUsdValue {
|
|
42
|
+
assetId: string;
|
|
43
|
+
}
|
|
44
|
+
export interface NearBridgeLeg {
|
|
45
|
+
destinationRecipient: string;
|
|
46
|
+
amount: bigint;
|
|
47
|
+
depositAddress: string;
|
|
48
|
+
quote: NearIntentsQuoteResponse['quote'];
|
|
49
|
+
}
|
|
50
|
+
export interface NearBridgeResult {
|
|
51
|
+
depositTxHash: string;
|
|
52
|
+
legs: NearBridgeLeg[];
|
|
53
|
+
}
|
|
54
|
+
export interface NearBridgeQuoteResult {
|
|
55
|
+
totalOutputAmount: bigint;
|
|
56
|
+
outputAmounts: bigint[];
|
|
57
|
+
isLoading: boolean;
|
|
58
|
+
error: string;
|
|
59
|
+
hasRoute: boolean;
|
|
60
|
+
}
|
package/types/solana.types.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ export type SolanaTransactionBody = (SolanaTransactBody | SolanaSwapBody) & {
|
|
|
72
72
|
commitmentValidationData?: CommitmentValidationDataType;
|
|
73
73
|
recipientAmount?: string;
|
|
74
74
|
adminData?: AdminDataType;
|
|
75
|
+
displayRecipient?: string;
|
|
75
76
|
};
|
|
76
77
|
export interface SolanaTransactionParams {
|
|
77
78
|
mintFrom?: string;
|