@dhedge/trading-widget 3.6.1 → 3.7.0
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/README.md +11 -15
- package/core-kit/abi/index.d.ts +0 -1
- package/core-kit/const/config.d.ts +1 -4
- package/core-kit/const/contracts/arbitrum.d.ts +0 -1
- package/core-kit/const/contracts/base.d.ts +0 -1
- package/core-kit/const/flat-money.d.ts +1 -1
- package/core-kit/const/gmx.d.ts +4 -0
- package/core-kit/const/index.d.ts +1 -0
- package/core-kit/const/logger.d.ts +0 -1
- package/core-kit/const/synthetix.d.ts +0 -5
- package/core-kit/hooks/pool/index.d.ts +0 -2
- package/core-kit/hooks/pool/use-pool-dynamic-contract-data.d.ts +3 -4
- package/core-kit/hooks/pool/use-pool-fees.d.ts +2 -3
- package/core-kit/hooks/pool/use-pool-token-price.d.ts +2 -3
- package/core-kit/hooks/trading/index.d.ts +0 -2
- package/core-kit/types/index.d.ts +0 -1
- package/core-kit/types/trading-panel.types.d.ts +1 -1
- package/core-kit/utils/flat-money.d.ts +1 -1
- package/core-kit/utils/gmx.d.ts +7 -0
- package/core-kit/utils/index.d.ts +1 -1
- package/index.cjs +217 -1
- package/index.d.ts +6 -6
- package/index.js +41876 -240
- package/package.json +1 -3
- package/trading-widget/components/deposit/button/valid-deposit-button/valid-deposit-button.hooks.d.ts +0 -4
- package/trading-widget/components/withdraw/init-step/button/valid-init-withdraw-button/valid-init-withdraw-button.hooks.d.ts +0 -7
- package/trading-widget/hooks/index.d.ts +0 -1
- package/trading-widget/hooks/{use-leveraged-flat-money-withdrawal-checks.d.ts → use-leveraged-withdrawal-checks.d.ts} +1 -1
- package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +0 -4
- package/trading-widget/types/index.d.ts +0 -1
- package/core-kit/abi/synthetix-v3/i-trusted-multicall-forwarder.d.ts +0 -41
- package/core-kit/abi/synthetix-v3/ierc-7412.d.ts +0 -53
- package/core-kit/abi/synthetix-v3/index.d.ts +0 -5
- package/core-kit/abi/synthetix-v3/synthetix-v3-asset-guard.d.ts +0 -37
- package/core-kit/abi/synthetix-v3/synthetix-v3-contract-guard.d.ts +0 -45
- package/core-kit/abi/synthetix-v3/synthetix-v3-core.d.ts +0 -41
- package/core-kit/hooks/pool/synthetixV3/use-pool-token-price-mutable.d.ts +0 -8
- package/core-kit/hooks/pool/synthetixV3/use-synthetix-v3-asset-balance.d.ts +0 -8
- package/core-kit/hooks/pool/synthetixV3/use-total-funds-value-mutable.d.ts +0 -8
- package/core-kit/hooks/trading/synthetix-v3/use-available-withdraw-liquidity.d.ts +0 -47
- package/core-kit/hooks/trading/synthetix-v3/use-oracles-update-transaction-data.d.ts +0 -23
- package/core-kit/hooks/trading/synthetix-v3/use-send-oracles-update-transaction.d.ts +0 -4
- package/core-kit/hooks/trading/synthetix-v3/use-synthetix-v3-oracles-update.d.ts +0 -7
- package/core-kit/hooks/trading/synthetix-v3/use-withdraw-liquidity.d.ts +0 -5
- package/core-kit/types/synthetix-v3.types.d.ts +0 -15
- package/core-kit/utils/synthetix-v3/eip-7412.d.ts +0 -21
- package/core-kit/utils/synthetix-v3/parse-error.d.ts +0 -3
- package/core-kit/utils/synthetix-v3/pyth-adapter.d.ts +0 -13
- package/core-kit/utils/synthetix.d.ts +0 -2
- package/index-41d61fb0.js +0 -42941
- package/index-e30df6fa.cjs +0 -217
- package/pyth-adapter-dc7665b9.js +0 -5705
- package/pyth-adapter-f74cde23.cjs +0 -11
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-summary/oracles-update-summary.d.ts +0 -2
- package/trading-widget/constants/synthetix-v3.d.ts +0 -2
- package/trading-widget/hooks/use-synthetix-withdrawal-window.d.ts +0 -4
- package/trading-widget/types/synthetix-v3.types.d.ts +0 -24
- package/trading-widget/utils/synthetix-v3.d.ts +0 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhedge/trading-widget",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -13,10 +13,8 @@
|
|
|
13
13
|
"wagmi": "^2.5.11"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@date-fns/utc": "^1.2.0",
|
|
17
16
|
"@headlessui/react": "^2.1.2",
|
|
18
17
|
"@heroicons/react": "^2.1.5",
|
|
19
|
-
"@pythnetwork/pyth-evm-js": "^1.36.0",
|
|
20
18
|
"bignumber.js": "^9.1.2",
|
|
21
19
|
"classnames": "^2.5.1",
|
|
22
20
|
"date-fns": "^4.1.0",
|
|
@@ -2,7 +2,6 @@ export declare const useValidDepositButton: () => {
|
|
|
2
2
|
requiresMinDeposit: boolean;
|
|
3
3
|
requiresWhitelist: boolean | undefined;
|
|
4
4
|
requiresApprove: boolean;
|
|
5
|
-
requiresUpdate: boolean;
|
|
6
5
|
requiresHighSlippageConfirm: boolean;
|
|
7
6
|
sendTokenSymbol: string;
|
|
8
7
|
poolSymbol: string;
|
|
@@ -10,9 +9,6 @@ export declare const useValidDepositButton: () => {
|
|
|
10
9
|
deprecated: boolean | undefined;
|
|
11
10
|
approve: () => Promise<void>;
|
|
12
11
|
confirmHighSlippage: () => void;
|
|
13
|
-
updateOracles: () => Promise<void>;
|
|
14
12
|
slippageToBeUsed: number;
|
|
15
|
-
isCheckOraclesPending: boolean;
|
|
16
|
-
isUpdateOraclesTransactionLoading: boolean;
|
|
17
13
|
maintenance: boolean | undefined;
|
|
18
14
|
};
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
export declare const useValidInitWithdrawButton: () => {
|
|
2
|
-
requiresWithdrawalWindow: boolean;
|
|
3
|
-
requiresWithdrawalLiquidity: boolean;
|
|
4
2
|
requiresEndOfCooldown: boolean;
|
|
5
3
|
requiresApprove: boolean;
|
|
6
4
|
requiresHighSlippageConfirm: boolean;
|
|
7
|
-
requiresUpdate: boolean;
|
|
8
5
|
sendTokenSymbol: string;
|
|
9
6
|
slippageToBeUsed: number;
|
|
10
7
|
dynamicCooldownEndsInTime: string;
|
|
11
|
-
withdrawalWindowStartTime: string;
|
|
12
|
-
withdrawalLiquidity: string;
|
|
13
8
|
approve: () => Promise<void>;
|
|
14
|
-
updateOracles: () => Promise<void>;
|
|
15
9
|
handleHighSlippageClick: () => void;
|
|
16
|
-
isCheckOraclesPending: boolean;
|
|
17
10
|
requiresLeveragedCollateralLiquidity: boolean;
|
|
18
11
|
leveragedCollateralValueFormatted: string;
|
|
19
12
|
maintenance: boolean | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { useHighSlippageCheck } from './use-high-slippage-check';
|
|
2
|
-
export { useSynthetixWithdrawalWindow } from './use-synthetix-withdrawal-window';
|
|
3
2
|
export { useGetThemeTypeBySlippage } from './use-get-theme-type-by-slippage';
|
|
4
3
|
export { useGetSlippagePlaceholder } from './use-get-slippage-placeholder';
|
|
5
4
|
export { useTradingTypeName } from './use-trading-type-name';
|
|
@@ -47,10 +47,7 @@ export type TranslationMap = {
|
|
|
47
47
|
poolIsPrivate: string;
|
|
48
48
|
poolDepositsAreMaintenance: string;
|
|
49
49
|
poolWithdrawalsAreMaintenance: string;
|
|
50
|
-
updateOracles: string;
|
|
51
|
-
checkingOracles: string;
|
|
52
50
|
confirmMaxSlippage: string;
|
|
53
|
-
withdrawalWindowDisabled: string;
|
|
54
51
|
withdrawalLiquidityDisabled: string;
|
|
55
52
|
withdrawCooldown: string;
|
|
56
53
|
termsOfUse: string;
|
|
@@ -71,7 +68,6 @@ export type TranslationMap = {
|
|
|
71
68
|
sendingOrderToWallet: string;
|
|
72
69
|
settingUpTx: string;
|
|
73
70
|
miningTx: string;
|
|
74
|
-
updateSynthetixOracles: string;
|
|
75
71
|
approveSpending: string;
|
|
76
72
|
pay: string;
|
|
77
73
|
multiAssetFractions: string;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export declare const ITrustedMulticallForwarderAbi: readonly [{
|
|
2
|
-
readonly inputs: readonly [{
|
|
3
|
-
readonly components: readonly [{
|
|
4
|
-
readonly internalType: "address";
|
|
5
|
-
readonly name: "target";
|
|
6
|
-
readonly type: "address";
|
|
7
|
-
}, {
|
|
8
|
-
readonly internalType: "bool";
|
|
9
|
-
readonly name: "requireSuccess";
|
|
10
|
-
readonly type: "bool";
|
|
11
|
-
}, {
|
|
12
|
-
readonly internalType: "uint256";
|
|
13
|
-
readonly name: "value";
|
|
14
|
-
readonly type: "uint256";
|
|
15
|
-
}, {
|
|
16
|
-
readonly internalType: "bytes";
|
|
17
|
-
readonly name: "callData";
|
|
18
|
-
readonly type: "bytes";
|
|
19
|
-
}];
|
|
20
|
-
readonly internalType: "struct TrustedMulticallForwarder.Call3Value[]";
|
|
21
|
-
readonly name: "calls";
|
|
22
|
-
readonly type: "tuple[]";
|
|
23
|
-
}];
|
|
24
|
-
readonly name: "aggregate3Value";
|
|
25
|
-
readonly outputs: readonly [{
|
|
26
|
-
readonly components: readonly [{
|
|
27
|
-
readonly internalType: "bool";
|
|
28
|
-
readonly name: "success";
|
|
29
|
-
readonly type: "bool";
|
|
30
|
-
}, {
|
|
31
|
-
readonly internalType: "bytes";
|
|
32
|
-
readonly name: "returnData";
|
|
33
|
-
readonly type: "bytes";
|
|
34
|
-
}];
|
|
35
|
-
readonly internalType: "struct TrustedMulticallForwarder.Result[]";
|
|
36
|
-
readonly name: "returnData";
|
|
37
|
-
readonly type: "tuple[]";
|
|
38
|
-
}];
|
|
39
|
-
readonly stateMutability: "payable";
|
|
40
|
-
readonly type: "function";
|
|
41
|
-
}];
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export declare const IERC7412Abi: readonly [{
|
|
2
|
-
readonly type: "function";
|
|
3
|
-
readonly name: "fulfillOracleQuery";
|
|
4
|
-
readonly inputs: readonly [{
|
|
5
|
-
readonly name: "signedOffchainData";
|
|
6
|
-
readonly type: "bytes";
|
|
7
|
-
readonly internalType: "bytes";
|
|
8
|
-
}];
|
|
9
|
-
readonly outputs: readonly [];
|
|
10
|
-
readonly stateMutability: "payable";
|
|
11
|
-
}, {
|
|
12
|
-
readonly type: "function";
|
|
13
|
-
readonly name: "oracleId";
|
|
14
|
-
readonly inputs: readonly [];
|
|
15
|
-
readonly outputs: readonly [{
|
|
16
|
-
readonly name: "";
|
|
17
|
-
readonly type: "bytes32";
|
|
18
|
-
readonly internalType: "bytes32";
|
|
19
|
-
}];
|
|
20
|
-
readonly stateMutability: "view";
|
|
21
|
-
}, {
|
|
22
|
-
readonly type: "error";
|
|
23
|
-
readonly name: "Errors";
|
|
24
|
-
readonly inputs: readonly [{
|
|
25
|
-
readonly name: "errors";
|
|
26
|
-
readonly type: "bytes[]";
|
|
27
|
-
readonly internalType: "bytes[]";
|
|
28
|
-
}];
|
|
29
|
-
}, {
|
|
30
|
-
readonly type: "error";
|
|
31
|
-
readonly name: "FeeRequired";
|
|
32
|
-
readonly inputs: readonly [{
|
|
33
|
-
readonly name: "feeAmount";
|
|
34
|
-
readonly type: "uint256";
|
|
35
|
-
readonly internalType: "uint256";
|
|
36
|
-
}];
|
|
37
|
-
}, {
|
|
38
|
-
readonly type: "error";
|
|
39
|
-
readonly name: "OracleDataRequired";
|
|
40
|
-
readonly inputs: readonly [{
|
|
41
|
-
readonly name: "oracleContract";
|
|
42
|
-
readonly type: "address";
|
|
43
|
-
readonly internalType: "address";
|
|
44
|
-
}, {
|
|
45
|
-
readonly name: "oracleQuery";
|
|
46
|
-
readonly type: "bytes";
|
|
47
|
-
readonly internalType: "bytes";
|
|
48
|
-
}, {
|
|
49
|
-
readonly name: "feeRequired";
|
|
50
|
-
readonly type: "uint256";
|
|
51
|
-
readonly internalType: "uint256";
|
|
52
|
-
}];
|
|
53
|
-
}];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { SynthetixV3AssetGuard } from './synthetix-v3-asset-guard';
|
|
2
|
-
export { SynthetixV3ContractGuard } from './synthetix-v3-contract-guard';
|
|
3
|
-
export { IERC7412Abi } from './ierc-7412';
|
|
4
|
-
export { ITrustedMulticallForwarderAbi } from './i-trusted-multicall-forwarder';
|
|
5
|
-
export { SynthetixV3CoreAbi } from './synthetix-v3-core';
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export declare const SynthetixV3AssetGuard: readonly [{
|
|
2
|
-
readonly inputs: readonly [{
|
|
3
|
-
readonly internalType: "address";
|
|
4
|
-
readonly name: "pool";
|
|
5
|
-
readonly type: "address";
|
|
6
|
-
}, {
|
|
7
|
-
readonly internalType: "address";
|
|
8
|
-
readonly name: "asset";
|
|
9
|
-
readonly type: "address";
|
|
10
|
-
}];
|
|
11
|
-
readonly name: "getBalanceMutable";
|
|
12
|
-
readonly outputs: readonly [{
|
|
13
|
-
readonly internalType: "uint256";
|
|
14
|
-
readonly name: "balance";
|
|
15
|
-
readonly type: "uint256";
|
|
16
|
-
}];
|
|
17
|
-
readonly stateMutability: "view";
|
|
18
|
-
readonly type: "function";
|
|
19
|
-
}, {
|
|
20
|
-
readonly inputs: readonly [{
|
|
21
|
-
readonly internalType: "address";
|
|
22
|
-
readonly name: "pool";
|
|
23
|
-
readonly type: "address";
|
|
24
|
-
}, {
|
|
25
|
-
readonly internalType: "address";
|
|
26
|
-
readonly name: "asset";
|
|
27
|
-
readonly type: "address";
|
|
28
|
-
}];
|
|
29
|
-
readonly name: "getBalance";
|
|
30
|
-
readonly outputs: readonly [{
|
|
31
|
-
readonly internalType: "uint256";
|
|
32
|
-
readonly name: "balance";
|
|
33
|
-
readonly type: "uint256";
|
|
34
|
-
}];
|
|
35
|
-
readonly stateMutability: "view";
|
|
36
|
-
readonly type: "function";
|
|
37
|
-
}];
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export declare const SynthetixV3ContractGuard: readonly [{
|
|
2
|
-
readonly inputs: readonly [{
|
|
3
|
-
readonly internalType: "address";
|
|
4
|
-
readonly name: "_poolLogic";
|
|
5
|
-
readonly type: "address";
|
|
6
|
-
}, {
|
|
7
|
-
readonly internalType: "address";
|
|
8
|
-
readonly name: "_to";
|
|
9
|
-
readonly type: "address";
|
|
10
|
-
}];
|
|
11
|
-
readonly name: "getAccountNftTokenId";
|
|
12
|
-
readonly outputs: readonly [{
|
|
13
|
-
readonly internalType: "uint128";
|
|
14
|
-
readonly name: "tokenId";
|
|
15
|
-
readonly type: "uint128";
|
|
16
|
-
}];
|
|
17
|
-
readonly stateMutability: "view";
|
|
18
|
-
readonly type: "function";
|
|
19
|
-
}, {
|
|
20
|
-
readonly inputs: readonly [{
|
|
21
|
-
readonly internalType: "address";
|
|
22
|
-
readonly name: "";
|
|
23
|
-
readonly type: "address";
|
|
24
|
-
}];
|
|
25
|
-
readonly name: "dHedgeVaultsWhitelist";
|
|
26
|
-
readonly outputs: readonly [{
|
|
27
|
-
readonly internalType: "address";
|
|
28
|
-
readonly name: "poolLogic";
|
|
29
|
-
readonly type: "address";
|
|
30
|
-
}, {
|
|
31
|
-
readonly internalType: "address";
|
|
32
|
-
readonly name: "collateralAsset";
|
|
33
|
-
readonly type: "address";
|
|
34
|
-
}, {
|
|
35
|
-
readonly internalType: "address";
|
|
36
|
-
readonly name: "debtAsset";
|
|
37
|
-
readonly type: "address";
|
|
38
|
-
}, {
|
|
39
|
-
readonly internalType: "uint128";
|
|
40
|
-
readonly name: "snxLiquidityPoolId";
|
|
41
|
-
readonly type: "uint128";
|
|
42
|
-
}];
|
|
43
|
-
readonly stateMutability: "view";
|
|
44
|
-
readonly type: "function";
|
|
45
|
-
}];
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export declare const SynthetixV3CoreAbi: readonly [{
|
|
2
|
-
readonly inputs: readonly [{
|
|
3
|
-
readonly internalType: "uint128";
|
|
4
|
-
readonly name: "accountId";
|
|
5
|
-
readonly type: "uint128";
|
|
6
|
-
}, {
|
|
7
|
-
readonly internalType: "uint128";
|
|
8
|
-
readonly name: "poolId";
|
|
9
|
-
readonly type: "uint128";
|
|
10
|
-
}, {
|
|
11
|
-
readonly internalType: "address";
|
|
12
|
-
readonly name: "collateralType";
|
|
13
|
-
readonly type: "address";
|
|
14
|
-
}];
|
|
15
|
-
readonly name: "getPositionDebt";
|
|
16
|
-
readonly outputs: readonly [{
|
|
17
|
-
readonly internalType: "int256";
|
|
18
|
-
readonly name: "debtD18";
|
|
19
|
-
readonly type: "int256";
|
|
20
|
-
}];
|
|
21
|
-
readonly stateMutability: "nonpayable";
|
|
22
|
-
readonly type: "function";
|
|
23
|
-
}, {
|
|
24
|
-
readonly inputs: readonly [{
|
|
25
|
-
readonly internalType: "uint128";
|
|
26
|
-
readonly name: "accountId";
|
|
27
|
-
readonly type: "uint128";
|
|
28
|
-
}, {
|
|
29
|
-
readonly internalType: "address";
|
|
30
|
-
readonly name: "collateralType";
|
|
31
|
-
readonly type: "address";
|
|
32
|
-
}];
|
|
33
|
-
readonly name: "getAccountAvailableCollateral";
|
|
34
|
-
readonly outputs: readonly [{
|
|
35
|
-
readonly internalType: "uint256";
|
|
36
|
-
readonly name: "";
|
|
37
|
-
readonly type: "uint256";
|
|
38
|
-
}];
|
|
39
|
-
readonly stateMutability: "view";
|
|
40
|
-
readonly type: "function";
|
|
41
|
-
}];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Address, ChainId } from 'core-kit/types/web3.types';
|
|
2
|
-
interface PoolTokenPriceParams {
|
|
3
|
-
address: Address;
|
|
4
|
-
chainId: ChainId;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const usePoolTokenPriceMutable: ({ address, chainId, disabled, }: PoolTokenPriceParams) => string | undefined;
|
|
8
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Address, ChainId } from 'core-kit/types';
|
|
2
|
-
interface UseSynthetixV3AssetBalanceVariables {
|
|
3
|
-
vaultAddress: Address;
|
|
4
|
-
chainId: ChainId;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const useSynthetixV3AssetBalance: ({ vaultAddress, disabled, chainId, }: UseSynthetixV3AssetBalanceVariables) => string;
|
|
8
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Address, ChainId } from 'core-kit/types';
|
|
2
|
-
interface UseTotalFundsValueMutable {
|
|
3
|
-
vaultManagerLogicAddress: Address | undefined;
|
|
4
|
-
chainId: ChainId;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const useTotalFundValueMutable: ({ vaultManagerLogicAddress, chainId, disabled, }: UseTotalFundsValueMutable) => string;
|
|
8
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export declare const useAvailableWithdrawLiquidity: (params?: {
|
|
2
|
-
enabled?: boolean;
|
|
3
|
-
}) => import("wagmi").UseReadContractReturnType<readonly [{
|
|
4
|
-
readonly inputs: readonly [{
|
|
5
|
-
readonly internalType: "uint128";
|
|
6
|
-
readonly name: "accountId";
|
|
7
|
-
readonly type: "uint128";
|
|
8
|
-
}, {
|
|
9
|
-
readonly internalType: "uint128";
|
|
10
|
-
readonly name: "poolId";
|
|
11
|
-
readonly type: "uint128";
|
|
12
|
-
}, {
|
|
13
|
-
readonly internalType: "address";
|
|
14
|
-
readonly name: "collateralType";
|
|
15
|
-
readonly type: "address";
|
|
16
|
-
}];
|
|
17
|
-
readonly name: "getPositionDebt";
|
|
18
|
-
readonly outputs: readonly [{
|
|
19
|
-
readonly internalType: "int256";
|
|
20
|
-
readonly name: "debtD18";
|
|
21
|
-
readonly type: "int256";
|
|
22
|
-
}];
|
|
23
|
-
readonly stateMutability: "nonpayable";
|
|
24
|
-
readonly type: "function";
|
|
25
|
-
}, {
|
|
26
|
-
readonly inputs: readonly [{
|
|
27
|
-
readonly internalType: "uint128";
|
|
28
|
-
readonly name: "accountId";
|
|
29
|
-
readonly type: "uint128";
|
|
30
|
-
}, {
|
|
31
|
-
readonly internalType: "address";
|
|
32
|
-
readonly name: "collateralType";
|
|
33
|
-
readonly type: "address";
|
|
34
|
-
}];
|
|
35
|
-
readonly name: "getAccountAvailableCollateral";
|
|
36
|
-
readonly outputs: readonly [{
|
|
37
|
-
readonly internalType: "uint256";
|
|
38
|
-
readonly name: "";
|
|
39
|
-
readonly type: "uint256";
|
|
40
|
-
}];
|
|
41
|
-
readonly stateMutability: "view";
|
|
42
|
-
readonly type: "function";
|
|
43
|
-
}], "getAccountAvailableCollateral", [bigint, `0x${string}`], {
|
|
44
|
-
address: `0x${string}`;
|
|
45
|
-
value: number;
|
|
46
|
-
formatted: string;
|
|
47
|
-
}>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { DefaultError, UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
-
import type { usePublicClient } from 'wagmi';
|
|
3
|
-
import type { Address, TransactionRequest } from 'core-kit/types';
|
|
4
|
-
interface UseOraclesUpdateQueryVariables {
|
|
5
|
-
account?: Address;
|
|
6
|
-
chainId: number;
|
|
7
|
-
vaultAddress: string;
|
|
8
|
-
}
|
|
9
|
-
type UseOraclesUpdateQueryResult = {
|
|
10
|
-
isOracleDataUpdateNeeded: boolean;
|
|
11
|
-
prependedTxns: TransactionRequest[];
|
|
12
|
-
};
|
|
13
|
-
export declare const DEFAULT_ORACLES_DATA_RESPONSE: {
|
|
14
|
-
isOracleDataUpdateNeeded: boolean;
|
|
15
|
-
prependedTxns: never[];
|
|
16
|
-
};
|
|
17
|
-
export declare const useOraclesUpdateTransactionData: ({ publicClient, account, chainId, vaultAddress, }: {
|
|
18
|
-
publicClient: NonNullable<ReturnType<typeof usePublicClient>> | undefined;
|
|
19
|
-
} & UseOraclesUpdateQueryVariables, options?: Omit<UseQueryOptions<UseOraclesUpdateQueryResult, DefaultError, UseOraclesUpdateQueryResult, [
|
|
20
|
-
string,
|
|
21
|
-
UseOraclesUpdateQueryVariables
|
|
22
|
-
]>, 'queryKey' | 'queryFn'>) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<UseOraclesUpdateQueryResult, Error>;
|
|
23
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Address, Hex, PublicClient, TransactionRequest } from 'core-kit/types/web3.types';
|
|
2
|
-
export interface OracleAdapter {
|
|
3
|
-
getOracleId: () => string;
|
|
4
|
-
fetchOffchainData: (client: PublicClient | undefined, oracleContract: Address, oracleQuery: Array<{
|
|
5
|
-
query: Hex;
|
|
6
|
-
fee: bigint;
|
|
7
|
-
}> | undefined) => Promise<Array<{
|
|
8
|
-
arg: Hex;
|
|
9
|
-
fee?: bigint;
|
|
10
|
-
}>>;
|
|
11
|
-
}
|
|
12
|
-
export interface Batcher {
|
|
13
|
-
batchable: (client: PublicClient, transactions: TransactionRequest[]) => Promise<boolean>;
|
|
14
|
-
batch: (transactions: TransactionRequest[]) => TransactionRequest;
|
|
15
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Hex } from 'viem';
|
|
2
|
-
import type { usePublicClient } from 'wagmi';
|
|
3
|
-
import type { Address, OracleAdapter, TransactionRequest } from 'core-kit/types';
|
|
4
|
-
export declare const LEGACY_ODR_ERROR: {
|
|
5
|
-
type: string;
|
|
6
|
-
name: string;
|
|
7
|
-
inputs: {
|
|
8
|
-
type: string;
|
|
9
|
-
}[];
|
|
10
|
-
}[];
|
|
11
|
-
export declare const makeTrustedForwarderMulticall: (transactions: TransactionRequest[]) => {
|
|
12
|
-
from: `0x${string}`;
|
|
13
|
-
to: `0x${string}`;
|
|
14
|
-
value: bigint;
|
|
15
|
-
data: `0x${string}`;
|
|
16
|
-
};
|
|
17
|
-
export declare function resolveAdapterCalls(origError: unknown, publicClient: NonNullable<ReturnType<typeof usePublicClient>> | undefined): Record<Address, Array<{
|
|
18
|
-
query: Hex;
|
|
19
|
-
fee: bigint;
|
|
20
|
-
}>>;
|
|
21
|
-
export declare function resolvePrependTransaction(origError: unknown, publicClient: NonNullable<ReturnType<typeof usePublicClient>> | undefined, adapters: OracleAdapter[], chainId: number): Promise<TransactionRequest[]>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Address, Hex, OracleAdapter, PublicClient } from 'core-kit/types';
|
|
2
|
-
export declare class PythAdapter implements OracleAdapter {
|
|
3
|
-
private readonly connection;
|
|
4
|
-
constructor(endpoint: string);
|
|
5
|
-
getOracleId(): string;
|
|
6
|
-
fetchOffchainData(_client: PublicClient | undefined, _oracleContract: Address, oracleQuery: Array<{
|
|
7
|
-
query: Hex;
|
|
8
|
-
fee?: bigint;
|
|
9
|
-
}> | undefined): Promise<Array<{
|
|
10
|
-
arg: Hex;
|
|
11
|
-
fee: bigint;
|
|
12
|
-
}>>;
|
|
13
|
-
}
|