@lombard.finance/sdk 3.6.0 → 3.6.2
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 +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +83 -85
- package/dist/index2.cjs +47 -47
- package/dist/index2.js +3144 -3082
- package/package.json +1 -1
- package/src/api-functions/generateDepositBtcAddress/generateDepositBtcAddress.stories.tsx +5 -5
- package/src/api-functions/generateDepositBtcAddress/generateDepositBtcAddress.ts +1 -1
- package/src/api-functions/getDepositBtcAddress/getDepositBtcAddress.stories.tsx +5 -5
- package/src/api-functions/getDepositBtcAddress/getDepositBtcAddress.ts +1 -1
- package/src/api-functions/getDepositBtcAddress/getDepositBtcAddresses.stories.tsx +4 -4
- package/src/api-functions/getDepositsByAddress/getDepositsByAddress.stories.tsx +3 -3
- package/src/api-functions/getLBTCExchangeRate/getLBTCExchangeRate.stories.tsx +5 -5
- package/src/api-functions/getLBTCExchangeRate/getLBTCExchangeRate.ts +4 -4
- package/src/api-functions/getNetworkFeeSignature/getNetworkFeeSignature.stories.tsx +6 -6
- package/src/api-functions/getNetworkFeeSignature/getNetworkFeeSignature.ts +2 -2
- package/src/api-functions/getPointsByAddress/getPointsByAddress.stories.tsx +3 -3
- package/src/api-functions/getPointsByAddress/getPointsByAddress.ts +2 -2
- package/src/api-functions/getUnstakesByAddress/getUnstakesByAddress.stories.tsx +3 -3
- package/src/api-functions/getUserStakeAndBakeSignature/getUserStakeAndBakeSignature.stories.tsx +4 -4
- package/src/api-functions/getUserStakeAndBakeSignature/getUserStakeAndBakeSignature.ts +2 -2
- package/src/api-functions/setReferral/setReferral.ts +1 -1
- package/src/api-functions/storeNetworkFeeSignature/storeNetworkFeeSignature.stories.tsx +3 -3
- package/src/api-functions/storeNetworkFeeSignature/storeNetworkFeeSignature.ts +1 -1
- package/src/api-functions/storeStakeAndBakeSignature/storeStakeAndBakeSignature.stories.tsx +1 -1
- package/src/api-functions/storeStakeAndBakeSignature/storeStakeAndBakeSignature.ts +1 -1
- package/src/bridge/lib/bridge.stories.tsx +7 -7
- package/src/bridge/lib/bridge.ts +3 -3
- package/src/bridge/lib/ccip-bridge.stories.tsx +7 -7
- package/src/bridge/lib/ccip-bridge.ts +11 -11
- package/src/clients/public-client.ts +3 -3
- package/src/clients/wallet-client.ts +3 -3
- package/src/common/parameters.ts +1 -1
- package/src/contract-functions/approveLBTC/approveLBTC.stories.tsx +10 -10
- package/src/contract-functions/approveLBTC/approveLBTC.ts +7 -7
- package/src/contract-functions/claimLBTC/claimLBTC.stories.tsx +8 -8
- package/src/contract-functions/claimLBTC/claimLBTC.ts +11 -12
- package/src/contract-functions/getBasculeDepositStatus/getBasculeDepositStatus.stories.tsx +3 -3
- package/src/contract-functions/getBasculeDepositStatus/getBasculeDepositStatus.ts +6 -6
- package/src/contract-functions/getLBTCMintingFee/getLBTCMintingFee.tsx +16 -23
- package/src/contract-functions/getLBTCTotalSupply/getLBTCTotalSupply.stories.tsx +3 -4
- package/src/contract-functions/getLBTCTotalSupply/getLBTCTotalSupply.ts +8 -4
- package/src/contract-functions/getPermitNonce/getPermitNonce.stories.tsx +2 -2
- package/src/contract-functions/getPermitNonce/getPermitNonce.ts +8 -4
- package/src/contract-functions/getShareValue/getShareValue.stories.tsx +2 -2
- package/src/contract-functions/getShareValue/getShareValue.ts +4 -4
- package/src/contract-functions/getSharesByAddress/getSharesByAddress.stories.tsx +5 -5
- package/src/contract-functions/getSharesByAddress/getSharesByAddress.ts +4 -4
- package/src/contract-functions/getStakeAndBakeFee/getStakeAndBakeFee.stories.tsx +6 -6
- package/src/contract-functions/getStakeAndBakeFee/getStakeAndBakeFee.tsx +7 -7
- package/src/contract-functions/signLbtcDestionationAddr/signLbtcDestinationAddr.ts +1 -1
- package/src/contract-functions/signLbtcDestionationAddr/signLbtcDestionationAddr.stories.tsx +5 -5
- package/src/contract-functions/signNetworkFee/signNetworkFee.stories.tsx +7 -7
- package/src/contract-functions/signNetworkFee/signNetworkFee.ts +4 -4
- package/src/contract-functions/signStakeAndBake/signStakeAndBake.stories.tsx +6 -6
- package/src/contract-functions/signStakeAndBake/signStakeAndBake.ts +7 -7
- package/src/contract-functions/unstakeLBTC/unstakeLBTC.stories.tsx +8 -8
- package/src/contract-functions/unstakeLBTC/unstakeLBTC.ts +10 -10
- package/src/metrics/get-lbtc-stats.stories.tsx +1 -1
- package/src/metrics/get-lbtc-stats.ts +4 -3
- package/src/metrics/get-rewards-info.ts +49 -11
- package/src/rewards/lib/claim-reward.stories.tsx +9 -9
- package/src/rewards/lib/claim-reward.ts +6 -6
- package/src/rewards/lib/get-reward-balances.stories.tsx +4 -4
- package/src/rewards/lib/get-reward-balances.ts +4 -4
- package/src/rewards/lib/get-reward-signing-data.stories.tsx +4 -4
- package/src/rewards/lib/get-reward-signing-data.ts +3 -3
- package/src/rewards/lib/get-reward-withdrawal-fee.stories.tsx +4 -4
- package/src/rewards/lib/get-reward-withdrawal-fee.ts +3 -3
- package/src/rewards/lib/get-reward-withdrawals.stories.tsx +4 -4
- package/src/rewards/lib/get-reward-withdrawals.ts +3 -3
- package/src/stories/components/decorators/wagmi-decorator.tsx +1 -1
- package/src/stories/hooks/useConnection.ts +2 -2
- package/src/tokens/abi/ASSET_ROUTER_ABI.ts +37 -8
- package/src/tokens/lbtc-addresses.ts +2 -2
- package/src/tokens/token-addresses.ts +0 -8
- package/src/tokens/tokens.ts +74 -36
- package/src/utils/env.ts +1 -1
- package/src/vaults/lib/config.ts +4 -4
- package/src/vaults/lib/metrics/get-vault-apy.stories.tsx +3 -3
- package/src/vaults/lib/metrics/get-vault-apy.ts +2 -2
- package/src/vaults/lib/metrics/get-vault-points.stories.tsx +3 -3
- package/src/vaults/lib/metrics/get-vault-points.ts +2 -2
- package/src/vaults/lib/metrics/get-vault-tvl.stories.tsx +3 -3
- package/src/vaults/lib/metrics/get-vault-tvl.ts +8 -8
- package/src/vaults/lib/ops/cancel-withdraw.stories.tsx +6 -6
- package/src/vaults/lib/ops/deposit.stories.tsx +7 -7
- package/src/vaults/lib/ops/deposit.ts +5 -5
- package/src/vaults/lib/ops/get-vault-deposits.stories.tsx +5 -5
- package/src/vaults/lib/ops/get-vault-deposits.ts +11 -11
- package/src/vaults/lib/ops/get-vault-withdrawals.stories.tsx +4 -4
- package/src/vaults/lib/ops/get-vault-withdrawals.ts +9 -9
- package/src/vaults/lib/ops/withdraw.stories.tsx +7 -7
- package/src/vaults/lib/ops/withdraw.ts +5 -5
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { Button } from '../../../stories/components/Button';
|
|
3
3
|
import { CodeBlock } from '../../../stories/components/CodeBlock';
|
|
4
|
-
import useQuery from '../../../stories/hooks/useQuery';
|
|
5
4
|
import {
|
|
6
5
|
functionType,
|
|
7
6
|
wagmiDecorator,
|
|
8
7
|
} from '../../../stories/components/decorators';
|
|
9
|
-
import { Vault } from '../config';
|
|
10
8
|
import { ErrorBlock } from '../../../stories/components/error-block';
|
|
11
9
|
import { EXAMPLE_EVM_ADDRESS } from '../../../stories/constants';
|
|
12
|
-
import
|
|
10
|
+
import useQuery from '../../../stories/hooks/useQuery';
|
|
11
|
+
import { Vault } from '../config';
|
|
12
|
+
import { GetVaultPointsParameters, getVaultPoints } from './get-vault-points';
|
|
13
13
|
|
|
14
14
|
const meta = {
|
|
15
15
|
title: 'vault/metrics/getVaultPoints',
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { Button } from '../../../stories/components/Button';
|
|
3
3
|
import { CodeBlock } from '../../../stories/components/CodeBlock';
|
|
4
|
-
import useQuery from '../../../stories/hooks/useQuery';
|
|
5
4
|
import {
|
|
6
5
|
functionType,
|
|
7
6
|
wagmiDecorator,
|
|
8
7
|
} from '../../../stories/components/decorators';
|
|
9
|
-
import { Vault } from '../config';
|
|
10
8
|
import { ErrorBlock } from '../../../stories/components/error-block';
|
|
11
|
-
import
|
|
9
|
+
import useQuery from '../../../stories/hooks/useQuery';
|
|
10
|
+
import { Vault } from '../config';
|
|
11
|
+
import { GetVaultTVLParameters, getVaultTVL } from './get-vault-tvl';
|
|
12
12
|
|
|
13
13
|
const meta = {
|
|
14
14
|
title: 'vault/metrics/getVaultTVL',
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
1
2
|
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { PublicClient, extractChain } from 'viem';
|
|
4
|
+
import * as chains from 'viem/chains';
|
|
2
5
|
import { makePublicClient } from '../../../clients/public-client';
|
|
3
|
-
import {
|
|
6
|
+
import { getApiConfig } from '../../../common/api-config';
|
|
7
|
+
import { IEnvParam } from '../../../common/parameters';
|
|
8
|
+
import { Token } from '../../../tokens/token-addresses';
|
|
4
9
|
import {
|
|
5
10
|
fromBaseDenomination,
|
|
6
11
|
getTokenContractInfo,
|
|
7
12
|
retrieveTokenProperties,
|
|
8
13
|
} from '../../../tokens/tokens';
|
|
9
|
-
import {
|
|
10
|
-
import { extractChain, PublicClient } from 'viem';
|
|
11
|
-
import * as chains from 'viem/chains';
|
|
12
|
-
import { IEnvParam } from '../../../common/parameters';
|
|
13
|
-
import { getApiConfig } from '../../../common/api-config';
|
|
14
|
-
import axios from 'axios';
|
|
14
|
+
import { VAULTS, Vault, VedaVaultChain } from '../config';
|
|
15
15
|
|
|
16
16
|
export type GetVaultBtcHolding = {
|
|
17
17
|
vaultKey?: Vault;
|
|
@@ -39,7 +39,7 @@ export async function getVaultBtcHolding({
|
|
|
39
39
|
|
|
40
40
|
for (const [token, chainIds] of Object.entries(vault.tokens)) {
|
|
41
41
|
for (const chainId of chainIds) {
|
|
42
|
-
const tokenContract = getTokenContractInfo(token as Token, chainId);
|
|
42
|
+
const tokenContract = await getTokenContractInfo(token as Token, chainId);
|
|
43
43
|
|
|
44
44
|
const publicClient = clients[chainId];
|
|
45
45
|
if (!publicClient) continue;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { Button } from '../../../stories/components/Button';
|
|
3
3
|
import { CodeBlock } from '../../../stories/components/CodeBlock';
|
|
4
|
-
import {
|
|
5
|
-
canPerformAction,
|
|
6
|
-
useConnection,
|
|
7
|
-
} from '../../../stories/hooks/useConnection';
|
|
8
|
-
import useQuery from '../../../stories/hooks/useQuery';
|
|
9
4
|
import { ConnectButton } from '../../../stories/components/ConnectButton';
|
|
10
5
|
import {
|
|
11
6
|
functionType,
|
|
12
7
|
wagmiDecorator,
|
|
13
8
|
} from '../../../stories/components/decorators';
|
|
14
|
-
import { Vault } from '../config';
|
|
15
9
|
import { ErrorBlock } from '../../../stories/components/error-block';
|
|
10
|
+
import {
|
|
11
|
+
canPerformAction,
|
|
12
|
+
useConnection,
|
|
13
|
+
} from '../../../stories/hooks/useConnection';
|
|
14
|
+
import useQuery from '../../../stories/hooks/useQuery';
|
|
15
|
+
import { Vault } from '../config';
|
|
16
16
|
import { CancelWithdrawParameters, cancelWithdraw } from './withdraw';
|
|
17
17
|
|
|
18
18
|
const meta = {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { Button } from '../../../stories/components/Button';
|
|
3
3
|
import { CodeBlock } from '../../../stories/components/CodeBlock';
|
|
4
|
-
import {
|
|
5
|
-
canPerformAction,
|
|
6
|
-
useConnection,
|
|
7
|
-
} from '../../../stories/hooks/useConnection';
|
|
8
|
-
import useQuery from '../../../stories/hooks/useQuery';
|
|
9
4
|
import { ConnectButton } from '../../../stories/components/ConnectButton';
|
|
10
5
|
import {
|
|
11
6
|
functionType,
|
|
12
7
|
wagmiDecorator,
|
|
13
8
|
} from '../../../stories/components/decorators';
|
|
14
|
-
import { deposit, DepositParameters } from './deposit';
|
|
15
|
-
import { Vault } from '../config';
|
|
16
9
|
import { ErrorBlock } from '../../../stories/components/error-block';
|
|
10
|
+
import {
|
|
11
|
+
canPerformAction,
|
|
12
|
+
useConnection,
|
|
13
|
+
} from '../../../stories/hooks/useConnection';
|
|
14
|
+
import useQuery from '../../../stories/hooks/useQuery';
|
|
15
|
+
import { Vault } from '../config';
|
|
16
|
+
import { DepositParameters, deposit } from './deposit';
|
|
17
17
|
|
|
18
18
|
const meta = {
|
|
19
19
|
title: 'vault/ops/deposit',
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
|
-
import { isVedaVaultChain, Vault, VAULTS } from '../config';
|
|
3
|
-
import { CommonWriteParameters } from '../../../common/parameters';
|
|
4
2
|
import { makePublicClient } from '../../../clients/public-client';
|
|
5
3
|
import { makeWalletClient } from '../../../clients/wallet-client';
|
|
6
|
-
import toBigInt from '../../../utils/numbers';
|
|
7
4
|
import { CHAIN_ID_TO_VIEM_CHAIN_MAP } from '../../../common/chains';
|
|
8
|
-
import {
|
|
5
|
+
import { CommonWriteParameters } from '../../../common/parameters';
|
|
6
|
+
import { Token } from '../../../tokens/token-addresses';
|
|
9
7
|
import {
|
|
10
8
|
fromBaseDenomination,
|
|
11
9
|
getTokenInfo,
|
|
12
10
|
toBaseDenomination,
|
|
13
11
|
} from '../../../tokens/tokens';
|
|
14
|
-
import {
|
|
12
|
+
import { getErrorMessage } from '../../../utils/err';
|
|
13
|
+
import toBigInt from '../../../utils/numbers';
|
|
14
|
+
import { VAULTS, Vault, isVedaVaultChain } from '../config';
|
|
15
15
|
|
|
16
16
|
export type DepositParameters = {
|
|
17
17
|
/** The amount to be deposited into the DeFi vault. */
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ChainId } from '../../../common/chains';
|
|
2
3
|
import { Button } from '../../../stories/components/Button';
|
|
3
4
|
import { CodeBlock } from '../../../stories/components/CodeBlock';
|
|
4
|
-
import useQuery from '../../../stories/hooks/useQuery';
|
|
5
5
|
import {
|
|
6
6
|
functionType,
|
|
7
7
|
wagmiDecorator,
|
|
8
8
|
} from '../../../stories/components/decorators';
|
|
9
|
-
import { Vault } from '../config';
|
|
10
9
|
import { ErrorBlock } from '../../../stories/components/error-block';
|
|
10
|
+
import { EXAMPLE_EVM_ADDRESS } from '../../../stories/constants';
|
|
11
|
+
import useQuery from '../../../stories/hooks/useQuery';
|
|
12
|
+
import { Vault } from '../config';
|
|
11
13
|
import {
|
|
12
|
-
getVaultDeposits,
|
|
13
14
|
GetVaultDepositsParameters,
|
|
15
|
+
getVaultDeposits,
|
|
14
16
|
} from './get-vault-deposits';
|
|
15
|
-
import { EXAMPLE_EVM_ADDRESS } from '../../../stories/constants';
|
|
16
|
-
import { ChainId } from '../../../common/chains';
|
|
17
17
|
|
|
18
18
|
const meta = {
|
|
19
19
|
title: 'vault/ops/getVaultDeposits',
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
1
3
|
import { Address, Hash } from 'viem';
|
|
2
4
|
import { ChainId } from '../../../common/chains';
|
|
3
5
|
import {
|
|
4
|
-
|
|
6
|
+
TokenInfo,
|
|
7
|
+
fromBaseDenomination,
|
|
8
|
+
getAssetInfo,
|
|
9
|
+
} from '../../../tokens/tokens';
|
|
10
|
+
import { orderBy, unique } from '../../../utils/array';
|
|
11
|
+
import { ensureHex } from '../../../utils/hex';
|
|
12
|
+
import {
|
|
5
13
|
NETWORK_TO_VEDA_VAULT_CHAIN_MAP,
|
|
6
|
-
Vault,
|
|
7
14
|
VAULTS,
|
|
8
15
|
VEDA_VAULT_CHAIN_TO_NETWORK_MAP,
|
|
16
|
+
Vault,
|
|
9
17
|
VedaVaultChain,
|
|
18
|
+
isVedaVaultChain,
|
|
10
19
|
} from '../config';
|
|
11
|
-
import axios from 'axios';
|
|
12
|
-
import BigNumber from 'bignumber.js';
|
|
13
|
-
import {
|
|
14
|
-
fromBaseDenomination,
|
|
15
|
-
getAssetInfo,
|
|
16
|
-
TokenInfo,
|
|
17
|
-
} from '../../../tokens/tokens';
|
|
18
|
-
import { ensureHex } from '../../../utils/hex';
|
|
19
|
-
import { orderBy, unique } from '../../../utils/array';
|
|
20
20
|
|
|
21
21
|
const DEPOSITS_URL =
|
|
22
22
|
'https://api.sevenseas.capital/deposits/{network}/{vault}/{account}';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ChainId } from '../../../common/chains';
|
|
2
3
|
import { Button } from '../../../stories/components/Button';
|
|
3
4
|
import { CodeBlock } from '../../../stories/components/CodeBlock';
|
|
4
|
-
import useQuery from '../../../stories/hooks/useQuery';
|
|
5
5
|
import {
|
|
6
6
|
functionType,
|
|
7
7
|
wagmiDecorator,
|
|
8
8
|
} from '../../../stories/components/decorators';
|
|
9
|
-
import { Vault } from '../config';
|
|
10
9
|
import { ErrorBlock } from '../../../stories/components/error-block';
|
|
11
10
|
import { EXAMPLE_EVM_ADDRESS } from '../../../stories/constants';
|
|
12
|
-
import
|
|
11
|
+
import useQuery from '../../../stories/hooks/useQuery';
|
|
12
|
+
import { Vault } from '../config';
|
|
13
13
|
import {
|
|
14
|
-
getVaultWithdrawals,
|
|
15
14
|
GetVaultWithdrawalsParameters,
|
|
15
|
+
getVaultWithdrawals,
|
|
16
16
|
} from './get-vault-withdrawals';
|
|
17
17
|
|
|
18
18
|
const meta = {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
1
3
|
import { Address, Hash } from 'viem';
|
|
2
|
-
import {
|
|
3
|
-
isVedaVaultChain,
|
|
4
|
-
Vault,
|
|
5
|
-
VAULTS,
|
|
6
|
-
VEDA_VAULT_CHAIN_TO_NETWORK_MAP,
|
|
7
|
-
} from '../config';
|
|
8
4
|
import { ChainId } from '../../../common/chains';
|
|
9
5
|
import {
|
|
6
|
+
TokenInfo,
|
|
10
7
|
fromBaseDenomination,
|
|
11
8
|
getAssetInfo,
|
|
12
|
-
TokenInfo,
|
|
13
9
|
} from '../../../tokens/tokens';
|
|
14
|
-
import BigNumber from 'bignumber.js';
|
|
15
|
-
import axios from 'axios';
|
|
16
10
|
import { orderBy, unique } from '../../../utils/array';
|
|
17
11
|
import { ensureHex } from '../../../utils/hex';
|
|
12
|
+
import {
|
|
13
|
+
VAULTS,
|
|
14
|
+
VEDA_VAULT_CHAIN_TO_NETWORK_MAP,
|
|
15
|
+
Vault,
|
|
16
|
+
isVedaVaultChain,
|
|
17
|
+
} from '../config';
|
|
18
18
|
|
|
19
19
|
export type GetVaultWithdrawalsParameters = {
|
|
20
20
|
account: Address;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { Button } from '../../../stories/components/Button';
|
|
3
3
|
import { CodeBlock } from '../../../stories/components/CodeBlock';
|
|
4
|
-
import {
|
|
5
|
-
canPerformAction,
|
|
6
|
-
useConnection,
|
|
7
|
-
} from '../../../stories/hooks/useConnection';
|
|
8
|
-
import useQuery from '../../../stories/hooks/useQuery';
|
|
9
4
|
import { ConnectButton } from '../../../stories/components/ConnectButton';
|
|
10
5
|
import {
|
|
11
6
|
functionType,
|
|
12
7
|
wagmiDecorator,
|
|
13
8
|
} from '../../../stories/components/decorators';
|
|
14
|
-
import { Vault } from '../config';
|
|
15
9
|
import { ErrorBlock } from '../../../stories/components/error-block';
|
|
16
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
canPerformAction,
|
|
12
|
+
useConnection,
|
|
13
|
+
} from '../../../stories/hooks/useConnection';
|
|
14
|
+
import useQuery from '../../../stories/hooks/useQuery';
|
|
15
|
+
import { Vault } from '../config';
|
|
16
|
+
import { QueueWithdrawParameters, queueWithdraw } from './withdraw';
|
|
17
17
|
|
|
18
18
|
const meta = {
|
|
19
19
|
title: 'vault/ops/withdraw',
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
|
-
import { isVedaVaultChain, Vault, VAULTS } from '../config';
|
|
3
|
-
import { CommonWriteParameters } from '../../../common/parameters';
|
|
4
2
|
import { makePublicClient } from '../../../clients/public-client';
|
|
5
3
|
import { makeWalletClient } from '../../../clients/wallet-client';
|
|
4
|
+
import { CHAIN_ID_TO_VIEM_CHAIN_MAP } from '../../../common/chains';
|
|
5
|
+
import { CommonWriteParameters } from '../../../common/parameters';
|
|
6
|
+
import { Token } from '../../../tokens/token-addresses';
|
|
6
7
|
import {
|
|
7
8
|
fromBaseDenomination,
|
|
8
9
|
getTokenInfo,
|
|
9
10
|
toBaseDenomination,
|
|
10
11
|
} from '../../../tokens/tokens';
|
|
11
|
-
import toBigInt from '../../../utils/numbers';
|
|
12
|
-
import { CHAIN_ID_TO_VIEM_CHAIN_MAP } from '../../../common/chains';
|
|
13
12
|
import { getErrorMessage } from '../../../utils/err';
|
|
13
|
+
import toBigInt from '../../../utils/numbers';
|
|
14
14
|
import { DAY } from '../../../utils/time';
|
|
15
|
-
import {
|
|
15
|
+
import { VAULTS, Vault, isVedaVaultChain } from '../config';
|
|
16
16
|
|
|
17
17
|
export type QueueWithdrawParameters = {
|
|
18
18
|
/** The amount to be withdrawn from the DeFi vault. */
|