@augustdigital/sdk 4.14.0-alpha.1 → 4.14.0-alpha.3
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/lib/adapters/evm/getters.js +15 -1
- package/lib/adapters/evm/getters.js.map +1 -1
- package/lib/core/constants/vaults.js +1 -0
- package/lib/core/constants/vaults.js.map +1 -1
- package/lib/core/constants.adapters.d.ts +111 -83
- package/lib/core/constants.core.d.ts +66 -59
- package/lib/core/constants.d.ts +76 -68
- package/lib/core/constants.vaults.d.ts +48 -3
- package/lib/core/constants.web3.d.ts +19 -18
- package/lib/core/core.helpers.d.ts +33 -8
- package/lib/core/helpers.adapters.d.ts +7 -2
- package/lib/core/helpers.core.d.ts +33 -8
- package/lib/core/helpers.signer.d.ts +6 -2
- package/lib/core/helpers.vaults.d.ts +34 -14
- package/lib/core/helpers.web3.d.ts +85 -19
- package/lib/core/read.actions.d.ts +4 -1
- package/lib/core/web3.helpers.d.ts +85 -19
- package/lib/core/write.actions.d.ts +8 -5
- package/lib/main.d.ts +4 -0
- package/lib/main.js +3 -0
- package/lib/main.js.map +1 -1
- package/lib/modules/vaults/constants.d.ts +91 -47
- package/lib/modules/vaults/getters.js +4 -3
- package/lib/modules/vaults/getters.js.map +1 -1
- package/lib/modules/vaults/main.d.ts +4 -0
- package/lib/modules/vaults/main.js +11 -0
- package/lib/modules/vaults/main.js.map +1 -1
- package/lib/modules/vaults/utils.js +8 -0
- package/lib/modules/vaults/utils.js.map +1 -1
- package/lib/modules/vaults/vault.actions.d.ts +13 -4
- package/lib/services/subgraph/vaults.js +1 -0
- package/lib/services/subgraph/vaults.js.map +1 -1
- package/lib/types/subgraph.d.ts +1 -0
- package/lib/types/vaults.d.ts +1 -0
- package/lib/types/vaults.js.map +1 -1
- package/lib/types/webserver.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { IChainId, IChainObj } from '../types';
|
|
2
2
|
export declare const SPECIAL_CHAINS: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
solana: {
|
|
4
|
+
name: string;
|
|
5
|
+
chainId: number;
|
|
6
|
+
explorer: string;
|
|
7
|
+
};
|
|
8
8
|
};
|
|
9
|
-
export declare const NATIVE_ADDRESS =
|
|
9
|
+
export declare const NATIVE_ADDRESS =
|
|
10
|
+
'0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE';
|
|
10
11
|
export declare const MIN_ABIS: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
name: string;
|
|
13
|
+
symbol: string;
|
|
14
|
+
decimals: string;
|
|
15
|
+
totalSupply: string;
|
|
16
|
+
approve: string;
|
|
17
|
+
allowance: string;
|
|
18
|
+
managementFeePercent: string;
|
|
18
19
|
};
|
|
19
20
|
export declare const ORACLE_CONTRACTS: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
1: string;
|
|
22
|
+
43114: string;
|
|
23
|
+
42161: string;
|
|
24
|
+
8453: string;
|
|
25
|
+
10: string;
|
|
25
26
|
};
|
|
26
27
|
export declare const NETWORKS: Record<IChainId, IChainObj>;
|
|
27
28
|
export declare const AVAILABLE_CHAINS: IChainId[];
|
|
@@ -1,23 +1,48 @@
|
|
|
1
1
|
import { INormalizedNumber } from '../types';
|
|
2
|
-
export declare function toNormalizedBn(
|
|
2
|
+
export declare function toNormalizedBn(
|
|
3
|
+
value: string | bigint | number,
|
|
4
|
+
decimals?: number | BigInt,
|
|
5
|
+
): INormalizedNumber;
|
|
3
6
|
export declare function getFallbackRpcUrls(chainId: number): string[];
|
|
4
7
|
export declare const filterOutBySize: (usdAmount: number) => boolean;
|
|
5
8
|
export declare function toTitleCase(str: string, type?: 'camel'): string;
|
|
6
9
|
export declare function truncate(s: string, amount?: number): string;
|
|
7
|
-
export declare function round(
|
|
10
|
+
export declare function round(
|
|
11
|
+
value: number | string | bigint,
|
|
12
|
+
options?: {
|
|
8
13
|
showing?: number | 'all';
|
|
9
14
|
usd?: boolean;
|
|
10
15
|
decimals?: number;
|
|
11
|
-
}
|
|
12
|
-
|
|
16
|
+
},
|
|
17
|
+
): string;
|
|
18
|
+
export declare function loanStateToReadable(
|
|
19
|
+
loanState: number | bigint,
|
|
20
|
+
):
|
|
21
|
+
| 'PREAPPROVED'
|
|
22
|
+
| 'FUNDING_REQUIRED'
|
|
23
|
+
| 'FUNDED'
|
|
24
|
+
| 'ACTIVE'
|
|
25
|
+
| 'CANCELLED'
|
|
26
|
+
| 'MATURED'
|
|
27
|
+
| 'CLOSED';
|
|
13
28
|
export declare function dateToUnix(date: Date): number;
|
|
14
29
|
export declare function unixToDate(epoch: number): Date;
|
|
15
30
|
export declare function isEarlierThanNow(startTime: Date): boolean;
|
|
16
31
|
export declare function daysAgo(days: number): Date;
|
|
17
32
|
export declare function prepareDateForDb(date: string | Date): string;
|
|
18
|
-
export declare function orderObjArrByDate(
|
|
33
|
+
export declare function orderObjArrByDate(
|
|
34
|
+
objectArray: any[],
|
|
35
|
+
options?: {
|
|
19
36
|
key?: string;
|
|
20
37
|
order?: 'asc' | 'desc';
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export declare function
|
|
38
|
+
},
|
|
39
|
+
): any[];
|
|
40
|
+
export declare function calculateWeights(
|
|
41
|
+
data?: Array<any>,
|
|
42
|
+
weightProperty?: string,
|
|
43
|
+
): any[];
|
|
44
|
+
export declare function calculateWeightedAverage(
|
|
45
|
+
data?: Array<any>,
|
|
46
|
+
valueProperty?: string,
|
|
47
|
+
weightProperty?: string,
|
|
48
|
+
): any;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { IAddress, IVaultAdapterConfig } from '../types';
|
|
2
|
-
export declare function getVaultAdapterConfig(
|
|
2
|
+
export declare function getVaultAdapterConfig(
|
|
3
|
+
vaultAddress: IAddress,
|
|
4
|
+
): IVaultAdapterConfig | undefined;
|
|
3
5
|
export declare function vaultHasAdapter(vaultAddress: IAddress): boolean;
|
|
4
|
-
export declare function getVaultDepositTokens(
|
|
6
|
+
export declare function getVaultDepositTokens(
|
|
7
|
+
vaultAddress: IAddress,
|
|
8
|
+
underlyingToken: IAddress,
|
|
9
|
+
): IAddress[];
|
|
@@ -1,23 +1,48 @@
|
|
|
1
1
|
import { INormalizedNumber } from '../types';
|
|
2
|
-
export declare function toNormalizedBn(
|
|
2
|
+
export declare function toNormalizedBn(
|
|
3
|
+
value: string | bigint | number,
|
|
4
|
+
decimals?: number | BigInt,
|
|
5
|
+
): INormalizedNumber;
|
|
3
6
|
export declare function getFallbackRpcUrls(chainId: number): string[];
|
|
4
7
|
export declare const filterOutBySize: (usdAmount: number) => boolean;
|
|
5
8
|
export declare function toTitleCase(str: string, type?: 'camel'): string;
|
|
6
9
|
export declare function truncate(s: string, amount?: number): string;
|
|
7
|
-
export declare function round(
|
|
10
|
+
export declare function round(
|
|
11
|
+
value: number | string | bigint,
|
|
12
|
+
options?: {
|
|
8
13
|
showing?: number | 'all';
|
|
9
14
|
usd?: boolean;
|
|
10
15
|
decimals?: number;
|
|
11
|
-
}
|
|
12
|
-
|
|
16
|
+
},
|
|
17
|
+
): string;
|
|
18
|
+
export declare function loanStateToReadable(
|
|
19
|
+
loanState: number | bigint,
|
|
20
|
+
):
|
|
21
|
+
| 'PREAPPROVED'
|
|
22
|
+
| 'FUNDING_REQUIRED'
|
|
23
|
+
| 'FUNDED'
|
|
24
|
+
| 'ACTIVE'
|
|
25
|
+
| 'CANCELLED'
|
|
26
|
+
| 'MATURED'
|
|
27
|
+
| 'CLOSED';
|
|
13
28
|
export declare function dateToUnix(date: Date): number;
|
|
14
29
|
export declare function unixToDate(epoch: number): Date;
|
|
15
30
|
export declare function isEarlierThanNow(startTime: Date): boolean;
|
|
16
31
|
export declare function daysAgo(days: number): Date;
|
|
17
32
|
export declare function prepareDateForDb(date: string | Date): string;
|
|
18
|
-
export declare function orderObjArrByDate(
|
|
33
|
+
export declare function orderObjArrByDate(
|
|
34
|
+
objectArray: any[],
|
|
35
|
+
options?: {
|
|
19
36
|
key?: string;
|
|
20
37
|
order?: 'asc' | 'desc';
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export declare function
|
|
38
|
+
},
|
|
39
|
+
): any[];
|
|
40
|
+
export declare function calculateWeights(
|
|
41
|
+
data?: Array<any>,
|
|
42
|
+
weightProperty?: string,
|
|
43
|
+
): any[];
|
|
44
|
+
export declare function calculateWeightedAverage(
|
|
45
|
+
data?: Array<any>,
|
|
46
|
+
valueProperty?: string,
|
|
47
|
+
weightProperty?: string,
|
|
48
|
+
): any;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Signer, Wallet } from 'ethers';
|
|
2
2
|
export declare function isViemWalletClient(signer: any): boolean;
|
|
3
|
-
export declare function viemToEthersSigner(
|
|
4
|
-
|
|
3
|
+
export declare function viemToEthersSigner(
|
|
4
|
+
walletClient: any,
|
|
5
|
+
): Promise<Signer | Wallet>;
|
|
6
|
+
export declare function normalizeSigner(
|
|
7
|
+
signer: Signer | Wallet | any,
|
|
8
|
+
): Promise<Signer | Wallet>;
|
|
5
9
|
export type CompatibleSigner = Signer | Wallet | any;
|
|
@@ -1,16 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
IAddress,
|
|
3
|
+
IContractRunner,
|
|
4
|
+
ITokenizedVault,
|
|
5
|
+
IVaultVersion,
|
|
6
|
+
} from '../types';
|
|
2
7
|
export declare const isBadVault: (address?: string) => boolean;
|
|
3
|
-
export declare function getVaultVersion(
|
|
4
|
-
|
|
8
|
+
export declare function getVaultVersion(
|
|
9
|
+
vault: string,
|
|
10
|
+
): IVaultVersion | undefined;
|
|
11
|
+
export declare function getVaultVersionV2(
|
|
12
|
+
vault: ITokenizedVault,
|
|
13
|
+
): IVaultVersion | undefined;
|
|
5
14
|
export declare const REWARD_DISTRIBUTOR_ADDRESS: (chainId: number) => string[];
|
|
6
|
-
export declare const AVAX_PRICE_FEED_ADDRESS: (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
export declare const AVAX_PRICE_FEED_ADDRESS: (
|
|
16
|
+
chainId: number,
|
|
17
|
+
) => '0xFF3EEb22B5E3dE6e705b44749C2559d704923FD7' | '0x';
|
|
18
|
+
export declare function getVaultSymbol(
|
|
19
|
+
vault: IAddress,
|
|
20
|
+
provider: IContractRunner,
|
|
21
|
+
): Promise<string>;
|
|
22
|
+
export declare const SUBGRAPH_POOL_URLS: (
|
|
23
|
+
apiKey: string,
|
|
24
|
+
chainId?: number,
|
|
25
|
+
pool?: IAddress,
|
|
26
|
+
) =>
|
|
27
|
+
| {
|
|
28
|
+
1: string;
|
|
29
|
+
8453: string;
|
|
30
|
+
43114: string;
|
|
31
|
+
42161: string;
|
|
32
|
+
56: string;
|
|
33
|
+
}
|
|
34
|
+
| {
|
|
35
|
+
999: string;
|
|
36
|
+
};
|
|
@@ -1,29 +1,95 @@
|
|
|
1
1
|
import { Contract, ethers, Interface, InterfaceAbi } from 'ethers';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IAddress,
|
|
4
|
+
IChainId,
|
|
5
|
+
IContractRunner,
|
|
6
|
+
IExplorerType,
|
|
7
|
+
IInfuraOptions,
|
|
8
|
+
} from '../types';
|
|
3
9
|
export declare const determineBlockCutoff: (chain: number) => 120000 | 150000;
|
|
4
|
-
export declare const determineBlockSkipInternal: (
|
|
10
|
+
export declare const determineBlockSkipInternal: (
|
|
11
|
+
chain: number,
|
|
12
|
+
) => 8000 | 50000;
|
|
5
13
|
export declare const getChainId: (provider: IContractRunner) => Promise<number>;
|
|
6
|
-
export declare function createContract({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
export declare function createContract({
|
|
15
|
+
provider,
|
|
16
|
+
address,
|
|
17
|
+
abi,
|
|
18
|
+
}: {
|
|
19
|
+
address: string;
|
|
20
|
+
provider: IContractRunner;
|
|
21
|
+
abi: Interface | InterfaceAbi;
|
|
10
22
|
}): Contract;
|
|
11
23
|
export declare const createProvider: (rpcUrl: string) => any;
|
|
12
|
-
export declare const getInfuraProvider: (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export declare const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
export declare const getInfuraProvider: (
|
|
25
|
+
infura: IInfuraOptions,
|
|
26
|
+
) => ethers.JsonRpcProvider;
|
|
27
|
+
export declare const explorerLink: (
|
|
28
|
+
hex: IAddress,
|
|
29
|
+
chain: IChainId,
|
|
30
|
+
type: IExplorerType,
|
|
31
|
+
) => string;
|
|
32
|
+
export declare const getDecimals: (
|
|
33
|
+
provider: IContractRunner,
|
|
34
|
+
address: IAddress,
|
|
35
|
+
) => Promise<any>;
|
|
36
|
+
export declare const getReceiptTokenAddress: (
|
|
37
|
+
provider: IContractRunner,
|
|
38
|
+
address: IAddress,
|
|
39
|
+
) => Promise<any>;
|
|
40
|
+
export declare const getSymbol: (
|
|
41
|
+
provider: IContractRunner,
|
|
42
|
+
address: IAddress | undefined,
|
|
43
|
+
) => Promise<any>;
|
|
44
|
+
export declare function getTokenMetadata(
|
|
45
|
+
provider: IContractRunner,
|
|
46
|
+
asset: IAddress,
|
|
47
|
+
meta: ('symbol' | 'decimals' | 'name' | 'totalSupply')[],
|
|
48
|
+
): Promise<any[]>;
|
|
49
|
+
export declare const getManagementFeePercent: (
|
|
50
|
+
provider: IContractRunner,
|
|
51
|
+
address: IAddress,
|
|
52
|
+
) => Promise<number>;
|
|
53
|
+
export declare function simulateTransaction(
|
|
54
|
+
provider: IContractRunner,
|
|
55
|
+
abi: string[] | any,
|
|
56
|
+
functionName: string,
|
|
57
|
+
options?: {
|
|
20
58
|
args?: (string | number | bigint)[][];
|
|
21
59
|
from?: string;
|
|
22
60
|
to?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
61
|
+
},
|
|
62
|
+
): Promise<boolean | ethers.Result>;
|
|
63
|
+
export declare function checkAddress(
|
|
64
|
+
address: string,
|
|
65
|
+
logger?: any,
|
|
66
|
+
type?: 'wallet' | 'contract',
|
|
67
|
+
): boolean;
|
|
25
68
|
type ILoanOracleFeeCategories = 'LOAN.REPAY.INTERESTS';
|
|
26
|
-
export declare function getLoanOracleFeeRate(
|
|
27
|
-
|
|
28
|
-
|
|
69
|
+
export declare function getLoanOracleFeeRate(
|
|
70
|
+
provider: IContractRunner,
|
|
71
|
+
category_id: ILoanOracleFeeCategories,
|
|
72
|
+
address: IAddress,
|
|
73
|
+
chainId?: number,
|
|
74
|
+
): Promise<number>;
|
|
75
|
+
export declare function getHistoricalContractData(
|
|
76
|
+
provider: IContractRunner,
|
|
77
|
+
contractAddress: IAddress,
|
|
78
|
+
abi: Interface | InterfaceAbi,
|
|
79
|
+
methodName: string,
|
|
80
|
+
args: (string | number | bigint | boolean)[],
|
|
81
|
+
startBlock: number,
|
|
82
|
+
endBlock: number,
|
|
83
|
+
blockInterval?: number,
|
|
84
|
+
): Promise<any[]>;
|
|
85
|
+
export declare function getHistoricalContractDataByDate(
|
|
86
|
+
provider: IContractRunner,
|
|
87
|
+
contractAddress: IAddress,
|
|
88
|
+
abi: Interface | InterfaceAbi,
|
|
89
|
+
methodName: string,
|
|
90
|
+
args: (string | number | bigint | boolean)[],
|
|
91
|
+
startDate: string | number,
|
|
92
|
+
endDate: string | number,
|
|
93
|
+
intervalHours?: number,
|
|
94
|
+
): Promise<any[]>;
|
|
29
95
|
export {};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { IContractWriteOptions } from './write.actions';
|
|
2
2
|
import { IContractRunner } from '../types';
|
|
3
|
-
export declare function allowance(
|
|
3
|
+
export declare function allowance(
|
|
4
|
+
signer: IContractRunner,
|
|
5
|
+
options: IContractWriteOptions,
|
|
6
|
+
): Promise<import('..').INormalizedNumber>;
|
|
@@ -1,29 +1,95 @@
|
|
|
1
1
|
import { Contract, ethers, Interface, InterfaceAbi } from 'ethers';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IAddress,
|
|
4
|
+
IChainId,
|
|
5
|
+
IContractRunner,
|
|
6
|
+
IExplorerType,
|
|
7
|
+
IInfuraOptions,
|
|
8
|
+
} from '../types';
|
|
3
9
|
export declare const determineBlockCutoff: (chain: number) => 120000 | 150000;
|
|
4
|
-
export declare const determineBlockSkipInternal: (
|
|
10
|
+
export declare const determineBlockSkipInternal: (
|
|
11
|
+
chain: number,
|
|
12
|
+
) => 8000 | 50000;
|
|
5
13
|
export declare const getChainId: (provider: IContractRunner) => Promise<number>;
|
|
6
|
-
export declare function createContract({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
export declare function createContract({
|
|
15
|
+
provider,
|
|
16
|
+
address,
|
|
17
|
+
abi,
|
|
18
|
+
}: {
|
|
19
|
+
address: string;
|
|
20
|
+
provider: IContractRunner;
|
|
21
|
+
abi: Interface | InterfaceAbi;
|
|
10
22
|
}): Contract;
|
|
11
23
|
export declare const createProvider: (rpcUrl: string) => any;
|
|
12
|
-
export declare const getInfuraProvider: (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export declare const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
export declare const getInfuraProvider: (
|
|
25
|
+
infura: IInfuraOptions,
|
|
26
|
+
) => ethers.JsonRpcProvider;
|
|
27
|
+
export declare const explorerLink: (
|
|
28
|
+
hex: IAddress,
|
|
29
|
+
chain: IChainId,
|
|
30
|
+
type: IExplorerType,
|
|
31
|
+
) => string;
|
|
32
|
+
export declare const getDecimals: (
|
|
33
|
+
provider: IContractRunner,
|
|
34
|
+
address: IAddress,
|
|
35
|
+
) => Promise<any>;
|
|
36
|
+
export declare const getReceiptTokenAddress: (
|
|
37
|
+
provider: IContractRunner,
|
|
38
|
+
address: IAddress,
|
|
39
|
+
) => Promise<any>;
|
|
40
|
+
export declare const getSymbol: (
|
|
41
|
+
provider: IContractRunner,
|
|
42
|
+
address: IAddress | undefined,
|
|
43
|
+
) => Promise<any>;
|
|
44
|
+
export declare function getTokenMetadata(
|
|
45
|
+
provider: IContractRunner,
|
|
46
|
+
asset: IAddress,
|
|
47
|
+
meta: ('symbol' | 'decimals' | 'name' | 'totalSupply')[],
|
|
48
|
+
): Promise<any[]>;
|
|
49
|
+
export declare const getManagementFeePercent: (
|
|
50
|
+
provider: IContractRunner,
|
|
51
|
+
address: IAddress,
|
|
52
|
+
) => Promise<number>;
|
|
53
|
+
export declare function simulateTransaction(
|
|
54
|
+
provider: IContractRunner,
|
|
55
|
+
abi: string[] | any,
|
|
56
|
+
functionName: string,
|
|
57
|
+
options?: {
|
|
20
58
|
args?: (string | number | bigint)[][];
|
|
21
59
|
from?: string;
|
|
22
60
|
to?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
61
|
+
},
|
|
62
|
+
): Promise<boolean | ethers.Result>;
|
|
63
|
+
export declare function checkAddress(
|
|
64
|
+
address: string,
|
|
65
|
+
logger?: any,
|
|
66
|
+
type?: 'wallet' | 'contract',
|
|
67
|
+
): boolean;
|
|
25
68
|
type ILoanOracleFeeCategories = 'LOAN.REPAY.INTERESTS';
|
|
26
|
-
export declare function getLoanOracleFeeRate(
|
|
27
|
-
|
|
28
|
-
|
|
69
|
+
export declare function getLoanOracleFeeRate(
|
|
70
|
+
provider: IContractRunner,
|
|
71
|
+
category_id: ILoanOracleFeeCategories,
|
|
72
|
+
address: IAddress,
|
|
73
|
+
chainId?: number,
|
|
74
|
+
): Promise<number>;
|
|
75
|
+
export declare function getHistoricalContractData(
|
|
76
|
+
provider: IContractRunner,
|
|
77
|
+
contractAddress: IAddress,
|
|
78
|
+
abi: Interface | InterfaceAbi,
|
|
79
|
+
methodName: string,
|
|
80
|
+
args: (string | number | bigint | boolean)[],
|
|
81
|
+
startBlock: number,
|
|
82
|
+
endBlock: number,
|
|
83
|
+
blockInterval?: number,
|
|
84
|
+
): Promise<any[]>;
|
|
85
|
+
export declare function getHistoricalContractDataByDate(
|
|
86
|
+
provider: IContractRunner,
|
|
87
|
+
contractAddress: IAddress,
|
|
88
|
+
abi: Interface | InterfaceAbi,
|
|
89
|
+
methodName: string,
|
|
90
|
+
args: (string | number | bigint | boolean)[],
|
|
91
|
+
startDate: string | number,
|
|
92
|
+
endDate: string | number,
|
|
93
|
+
intervalHours?: number,
|
|
94
|
+
): Promise<any[]>;
|
|
29
95
|
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { IAddress } from '../types';
|
|
2
2
|
import { Signer, Wallet } from 'ethers';
|
|
3
3
|
export type IContractWriteOptions = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
target: IAddress;
|
|
5
|
+
wallet: IAddress;
|
|
6
|
+
amount?: string | bigint | number;
|
|
7
|
+
wait?: boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare function approve(
|
|
9
|
+
export declare function approve(
|
|
10
|
+
signer: Signer | Wallet,
|
|
11
|
+
options: IContractWriteOptions,
|
|
12
|
+
): Promise<string>;
|
package/lib/main.d.ts
CHANGED
|
@@ -23,6 +23,10 @@ export declare class AugustSDK extends AugustBase {
|
|
|
23
23
|
loadSubaccounts?: boolean;
|
|
24
24
|
loadSnapshots?: boolean;
|
|
25
25
|
} & IVaultCustomOptions): Promise<import("./types").IVault[]>;
|
|
26
|
+
getTotalDeposited(options?: {
|
|
27
|
+
loadSubaccounts?: boolean;
|
|
28
|
+
loadSnapshots?: boolean;
|
|
29
|
+
}): Promise<number>;
|
|
26
30
|
vaultDeposit(signer: Signer | Wallet, options: IContractWriteOptions): Promise<string>;
|
|
27
31
|
getVault(props: {
|
|
28
32
|
vault: IAddress;
|
package/lib/main.js
CHANGED
|
@@ -52,6 +52,9 @@ class AugustSDK extends core_1.AugustBase {
|
|
|
52
52
|
async getVaults(options) {
|
|
53
53
|
return await this.vaults.getVaults(options);
|
|
54
54
|
}
|
|
55
|
+
async getTotalDeposited(options) {
|
|
56
|
+
return await this.vaults.getTotalDeposited(options);
|
|
57
|
+
}
|
|
55
58
|
async vaultDeposit(signer, options) {
|
|
56
59
|
return await this.vaults.vaultDeposit(signer, options);
|
|
57
60
|
}
|
package/lib/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src.ts/main.ts"],"names":[],"mappings":";;;;;;AACA,+DAA8C;AAC9C,yDAAwC;AACxC,yDAAwC;AAOxC,iCAKgB;AAChB,6CAI0B;AAiB1B,MAAa,SAAU,SAAQ,iBAAU;IAWvC,YAAY,UAAuB;QACjC,KAAK,CAAC,UAAU,CAAC,CAAC;QAElB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QAEvB,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC;YAC1C,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAGpD,IAAI,CAAC,GAAG,GAAG,IAAI,aAAU,EAAE,CAAC;QAG5B,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,EAAE,CACzC,qBAAc,CAAC,MAAM,CAAC,OAAO,CACR,CAAC;QACxB,IAAI,YAAY,EAAE,CAAC;YACjB,MAAM,aAAa,GAAG,IAAI,gBAAa,CACrC,YAAY,EACZ,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAC5D,CAAC;YACF,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC;QAC9B,CAAC;QAED,IAAI,CAAC,GAAG,GAAG,IAAI,aAAU,EAAE,CAAC;QAE5B,IAAI,CAAC,MAAM,G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