hedge-web3 0.1.29 → 0.1.31
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/declarations/idl/vault.d.ts +99 -99
- package/declarations/index.d.ts +1 -0
- package/declarations/instructions/claimLiquidationPoolPosition.d.ts +3 -2
- package/declarations/instructions/claimStakingPoolPosition.d.ts +3 -2
- package/declarations/instructions/closeLiquidationPoolPosition.d.ts +3 -2
- package/declarations/instructions/createStakingPool.d.ts +3 -2
- package/declarations/instructions/createVault.d.ts +6 -5
- package/declarations/instructions/depositLiquidationPool.d.ts +3 -2
- package/declarations/instructions/depositStakingPool.d.ts +3 -2
- package/declarations/instructions/depositVault.d.ts +3 -2
- package/declarations/instructions/initHedgeFoundation.d.ts +3 -2
- package/declarations/instructions/liquidateVault.d.ts +3 -2
- package/declarations/instructions/loanVault.d.ts +3 -2
- package/declarations/instructions/redeemVault.d.ts +3 -2
- package/declarations/instructions/refreshOraclePrice.d.ts +3 -2
- package/declarations/instructions/repayVault.d.ts +3 -2
- package/declarations/instructions/setHalted.d.ts +3 -2
- package/declarations/instructions/setVaultTypeStatus.d.ts +3 -2
- package/declarations/instructions/withdrawStakingPool.d.ts +3 -2
- package/declarations/instructions/withdrawVault.d.ts +3 -2
- package/declarations/state/VaultAccount.d.ts +1 -1
- package/declarations/utils/getLinkedListAccounts.d.ts +3 -1
- package/lib/idl/vault.js +99 -99
- package/lib/index.js +1 -0
- package/lib/instructions/claimLiquidationPoolPosition.js +19 -22
- package/lib/instructions/claimStakingPoolPosition.js +19 -19
- package/lib/instructions/closeLiquidationPoolPosition.js +22 -22
- package/lib/instructions/createStakingPool.js +17 -18
- package/lib/instructions/createVault.js +28 -31
- package/lib/instructions/depositLiquidationPool.js +17 -18
- package/lib/instructions/depositStakingPool.js +16 -18
- package/lib/instructions/depositVault.js +25 -27
- package/lib/instructions/initHedgeFoundation.js +17 -19
- package/lib/instructions/initHedgeFoundationTokens.js +15 -15
- package/lib/instructions/liquidateVault.js +32 -33
- package/lib/instructions/loanVault.js +23 -23
- package/lib/instructions/redeemVault.js +24 -24
- package/lib/instructions/refreshOraclePrice.js +17 -17
- package/lib/instructions/repayVault.js +23 -23
- package/lib/instructions/setHalted.js +8 -9
- package/lib/instructions/setVaultTypeStatus.js +9 -10
- package/lib/instructions/withdrawStakingPool.js +22 -24
- package/lib/instructions/withdrawVault.js +23 -23
- package/lib/state/LiquidationPoolEra.js +3 -1
- package/lib/state/LiquidationPosition.js +0 -7
- package/lib/state/StakingPool.js +3 -4
- package/lib/state/VaultAccount.js +2 -5
- package/lib/utils/getLinkedListAccounts.js +24 -16
- package/package.json +2 -2
- package/src/idl/vault.ts +198 -198
- package/src/index.ts +1 -0
- package/src/instructions/claimLiquidationPoolPosition.ts +39 -29
- package/src/instructions/claimStakingPoolPosition.ts +45 -25
- package/src/instructions/closeLiquidationPoolPosition.ts +62 -32
- package/src/instructions/createStakingPool.ts +37 -35
- package/src/instructions/createVault.ts +81 -125
- package/src/instructions/depositLiquidationPool.ts +45 -26
- package/src/instructions/depositStakingPool.ts +32 -24
- package/src/instructions/depositVault.ts +57 -86
- package/src/instructions/initHedgeFoundation.ts +42 -43
- package/src/instructions/initHedgeFoundationTokens.ts +38 -39
- package/src/instructions/liquidateVault.ts +42 -65
- package/src/instructions/loanVault.ts +51 -69
- package/src/instructions/redeemVault.ts +83 -47
- package/src/instructions/refreshOraclePrice.ts +41 -32
- package/src/instructions/repayVault.ts +45 -65
- package/src/instructions/setHalted.ts +32 -24
- package/src/instructions/setVaultTypeStatus.ts +32 -24
- package/src/instructions/withdrawStakingPool.ts +44 -30
- package/src/instructions/withdrawVault.ts +58 -82
- package/src/state/LiquidationPoolEra.ts +4 -3
- package/src/state/LiquidationPosition.ts +0 -27
- package/src/state/StakingPool.ts +4 -7
- package/src/state/StakingPoolPosition.ts +2 -3
- package/src/state/VaultAccount.ts +9 -28
- package/src/state/VaultHistoryEvent.ts +1 -2
- package/src/utils/getLinkedListAccounts.ts +31 -30
@@ -1797,68 +1797,6 @@ export declare type Vault = {
|
|
1797
1797
|
];
|
1798
1798
|
};
|
1799
1799
|
},
|
1800
|
-
{
|
1801
|
-
"name": "stakingPool";
|
1802
|
-
"type": {
|
1803
|
-
"kind": "struct";
|
1804
|
-
"fields": [
|
1805
|
-
{
|
1806
|
-
"name": "halfLifeInDays";
|
1807
|
-
"type": "u64";
|
1808
|
-
},
|
1809
|
-
{
|
1810
|
-
"name": "deposits";
|
1811
|
-
"type": "u64";
|
1812
|
-
},
|
1813
|
-
{
|
1814
|
-
"name": "startTime";
|
1815
|
-
"type": "u64";
|
1816
|
-
},
|
1817
|
-
{
|
1818
|
-
"name": "lastTransactionTime";
|
1819
|
-
"type": "u64";
|
1820
|
-
},
|
1821
|
-
{
|
1822
|
-
"name": "hedgeRewardAccumulator";
|
1823
|
-
"type": "u128";
|
1824
|
-
},
|
1825
|
-
{
|
1826
|
-
"name": "ushFeeAccumulator";
|
1827
|
-
"type": "u128";
|
1828
|
-
},
|
1829
|
-
{
|
1830
|
-
"name": "totalHedgeReward";
|
1831
|
-
"type": "u64";
|
1832
|
-
},
|
1833
|
-
{
|
1834
|
-
"name": "stakedTokenMint";
|
1835
|
-
"type": "publicKey";
|
1836
|
-
},
|
1837
|
-
{
|
1838
|
-
"name": "seedPhrase";
|
1839
|
-
"type": {
|
1840
|
-
"array": [
|
1841
|
-
"u8",
|
1842
|
-
12
|
1843
|
-
];
|
1844
|
-
};
|
1845
|
-
},
|
1846
|
-
{
|
1847
|
-
"name": "collateralFeeAccumulator";
|
1848
|
-
"type": {
|
1849
|
-
"array": [
|
1850
|
-
"u128",
|
1851
|
-
32
|
1852
|
-
];
|
1853
|
-
};
|
1854
|
-
},
|
1855
|
-
{
|
1856
|
-
"name": "bump";
|
1857
|
-
"type": "u8";
|
1858
|
-
}
|
1859
|
-
];
|
1860
|
-
};
|
1861
|
-
},
|
1862
1800
|
{
|
1863
1801
|
"name": "stakingPoolPosition";
|
1864
1802
|
"type": {
|
@@ -1924,75 +1862,63 @@ export declare type Vault = {
|
|
1924
1862
|
};
|
1925
1863
|
},
|
1926
1864
|
{
|
1927
|
-
"name": "
|
1865
|
+
"name": "stakingPool";
|
1928
1866
|
"type": {
|
1929
1867
|
"kind": "struct";
|
1930
1868
|
"fields": [
|
1931
1869
|
{
|
1932
|
-
"name": "
|
1933
|
-
"type": "publicKey";
|
1934
|
-
},
|
1935
|
-
{
|
1936
|
-
"name": "vaultNumber";
|
1870
|
+
"name": "halfLifeInDays";
|
1937
1871
|
"type": "u64";
|
1938
1872
|
},
|
1939
1873
|
{
|
1940
|
-
"name": "
|
1874
|
+
"name": "deposits";
|
1941
1875
|
"type": "u64";
|
1942
1876
|
},
|
1943
1877
|
{
|
1944
|
-
"name": "
|
1878
|
+
"name": "startTime";
|
1945
1879
|
"type": "u64";
|
1946
1880
|
},
|
1947
1881
|
{
|
1948
|
-
"name": "
|
1949
|
-
"type": "
|
1882
|
+
"name": "lastTransactionTime";
|
1883
|
+
"type": "u64";
|
1950
1884
|
},
|
1951
1885
|
{
|
1952
|
-
"name": "
|
1953
|
-
"type": "
|
1886
|
+
"name": "hedgeRewardAccumulator";
|
1887
|
+
"type": "u128";
|
1954
1888
|
},
|
1955
1889
|
{
|
1956
|
-
"name": "
|
1957
|
-
"type": "
|
1890
|
+
"name": "ushFeeAccumulator";
|
1891
|
+
"type": "u128";
|
1958
1892
|
},
|
1959
1893
|
{
|
1960
|
-
"name": "
|
1894
|
+
"name": "totalHedgeReward";
|
1961
1895
|
"type": "u64";
|
1962
1896
|
},
|
1963
1897
|
{
|
1964
|
-
"name": "
|
1965
|
-
"type": "
|
1966
|
-
},
|
1967
|
-
{
|
1968
|
-
"name": "collateralAccumulatorSnapshotBytes";
|
1969
|
-
"type": "u128";
|
1898
|
+
"name": "stakedTokenMint";
|
1899
|
+
"type": "publicKey";
|
1970
1900
|
},
|
1971
1901
|
{
|
1972
|
-
"name": "
|
1902
|
+
"name": "seedPhrase";
|
1973
1903
|
"type": {
|
1974
|
-
"
|
1904
|
+
"array": [
|
1905
|
+
"u8",
|
1906
|
+
12
|
1907
|
+
];
|
1975
1908
|
};
|
1976
1909
|
},
|
1977
1910
|
{
|
1978
|
-
"name": "
|
1911
|
+
"name": "collateralFeeAccumulator";
|
1979
1912
|
"type": {
|
1980
|
-
"
|
1913
|
+
"array": [
|
1914
|
+
"u128",
|
1915
|
+
32
|
1916
|
+
];
|
1981
1917
|
};
|
1982
1918
|
},
|
1983
1919
|
{
|
1984
|
-
"name": "
|
1985
|
-
"type": "
|
1986
|
-
},
|
1987
|
-
{
|
1988
|
-
"name": "timeLastInteraction";
|
1989
|
-
"type": "u64";
|
1990
|
-
},
|
1991
|
-
{
|
1992
|
-
"name": "nextVaultToRedeem";
|
1993
|
-
"type": {
|
1994
|
-
"option": "publicKey";
|
1995
|
-
};
|
1920
|
+
"name": "bump";
|
1921
|
+
"type": "u8";
|
1996
1922
|
}
|
1997
1923
|
];
|
1998
1924
|
};
|
@@ -2198,6 +2124,80 @@ export declare type Vault = {
|
|
2198
2124
|
}
|
2199
2125
|
];
|
2200
2126
|
};
|
2127
|
+
},
|
2128
|
+
{
|
2129
|
+
"name": "vault";
|
2130
|
+
"type": {
|
2131
|
+
"kind": "struct";
|
2132
|
+
"fields": [
|
2133
|
+
{
|
2134
|
+
"name": "vaultOwner";
|
2135
|
+
"type": "publicKey";
|
2136
|
+
},
|
2137
|
+
{
|
2138
|
+
"name": "vaultNumber";
|
2139
|
+
"type": "u64";
|
2140
|
+
},
|
2141
|
+
{
|
2142
|
+
"name": "deposited";
|
2143
|
+
"type": "u64";
|
2144
|
+
},
|
2145
|
+
{
|
2146
|
+
"name": "denormalizedDebt";
|
2147
|
+
"type": "u64";
|
2148
|
+
},
|
2149
|
+
{
|
2150
|
+
"name": "collateralType";
|
2151
|
+
"type": "string";
|
2152
|
+
},
|
2153
|
+
{
|
2154
|
+
"name": "pdaSalt";
|
2155
|
+
"type": "string";
|
2156
|
+
},
|
2157
|
+
{
|
2158
|
+
"name": "bump";
|
2159
|
+
"type": "u8";
|
2160
|
+
},
|
2161
|
+
{
|
2162
|
+
"name": "vaultVersion";
|
2163
|
+
"type": "u64";
|
2164
|
+
},
|
2165
|
+
{
|
2166
|
+
"name": "debtProductSnapshotBytes";
|
2167
|
+
"type": "u128";
|
2168
|
+
},
|
2169
|
+
{
|
2170
|
+
"name": "collateralAccumulatorSnapshotBytes";
|
2171
|
+
"type": "u128";
|
2172
|
+
},
|
2173
|
+
{
|
2174
|
+
"name": "debtType";
|
2175
|
+
"type": {
|
2176
|
+
"defined": "CurrencyType";
|
2177
|
+
};
|
2178
|
+
},
|
2179
|
+
{
|
2180
|
+
"name": "vaultStatus";
|
2181
|
+
"type": {
|
2182
|
+
"defined": "VaultStatus";
|
2183
|
+
};
|
2184
|
+
},
|
2185
|
+
{
|
2186
|
+
"name": "timeCreated";
|
2187
|
+
"type": "u64";
|
2188
|
+
},
|
2189
|
+
{
|
2190
|
+
"name": "timeLastInteraction";
|
2191
|
+
"type": "u64";
|
2192
|
+
},
|
2193
|
+
{
|
2194
|
+
"name": "nextVaultToRedeem";
|
2195
|
+
"type": {
|
2196
|
+
"option": "publicKey";
|
2197
|
+
};
|
2198
|
+
}
|
2199
|
+
];
|
2200
|
+
};
|
2201
2201
|
}
|
2202
2202
|
];
|
2203
2203
|
"types": [
|
package/declarations/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function claimLiquidationPoolPosition(program: Program<Vault>, provider: Provider, poolPosition: PublicKey, payer: Signer, collateralType: string, overrideStartTime?: number): Promise<PublicKey>;
|
5
|
+
export declare function claimLiquidationPoolPositionInstruction(program: Program<Vault>, poolState: PublicKey, poolAssociatedTokenAccount: PublicKey, vaultTypeAccount: PublicKey, collateralMint: PublicKey, poolPosition: PublicKey, payer: PublicKey, payerAssociatedTokenAccount: PublicKey, overrideStartTime?: number): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function claimStakingPoolPosition(program: Program<Vault>, provider: Provider, poolPosition: PublicKey, payer: Signer, collateralType: string): Promise<PublicKey>;
|
5
|
+
export declare function claimStakingPoolPositionInstruction(program: Program<Vault>, feePool: PublicKey, feePoolAssociatedTokenAccount: PublicKey, stakedTokenMint: PublicKey, vaultTypeAccount: PublicKey, collateralMint: PublicKey, poolPosition: PublicKey, payer: PublicKey, payerAssociatedTokenAccount: PublicKey): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function closeLiquidationPoolPosition(program: Program<Vault>, provider: Provider, poolPosition: PublicKey, payer: Signer, overrideStartTime?: number): Promise<PublicKey>;
|
5
|
+
export declare function closeLiquidationPoolPositionInstruction(program: Program<Vault>, poolEra: PublicKey, poolPosition: PublicKey, payerPublicKey: PublicKey, payerUshAccount: PublicKey, payerAssociatedHedgeAccount: PublicKey, communityAssociatedHedgeTokenAccount: PublicKey, overrideStartTime?: number): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function createStakingPool(program: Program<Vault>, provider: Provider, payer: Signer, mintPublicKey: PublicKey, hedgeTokensToBeMinted: number, overrideStartTime?: number): Promise<PublicKey>;
|
5
|
+
export declare function createStakingPoolInstruction(program: Program<Vault>, payerPublicKey: PublicKey, mintPublicKey: PublicKey, hedgeTokensToBeMinted: number, overrideStartTime?: number): Promise<TransactionInstruction>;
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import { Program, Provider } from
|
2
|
-
import { PublicKey, Signer, Transaction, TransactionInstruction } from
|
3
|
-
|
4
|
-
export declare function
|
5
|
-
export declare function
|
1
|
+
import { Program, Provider } from '@project-serum/anchor';
|
2
|
+
import { PublicKey, Signer, Transaction, TransactionInstruction } from '@solana/web3.js';
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function createVault(program: Program<Vault>, provider: Provider, payer: Signer, collateralType: string, depositAmount: number, overrideTime?: number): Promise<PublicKey>;
|
5
|
+
export declare function buildCreateVaultTransaction(program: Program<Vault>, payerPublicKey: PublicKey, collateralType: string, depositAmount: number, overrideTime?: number): Promise<[Transaction, Signer[], PublicKey]>;
|
6
|
+
export declare function createVaultInstruction(program: Program<Vault>, salt: string, payerPublicKey: PublicKey, payerTokenAccountPublicKey: PublicKey, vaultPublicKey: PublicKey, vaultAssociatedTokenAccount: PublicKey, feePool: PublicKey, feePoolAssociatedUshTokenAccount: PublicKey, vaultTypeAccount: PublicKey, collateralMint: PublicKey, historyPublicKey: PublicKey, ushMintPublickey: PublicKey, depositAmount: number, overrideTime?: number): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function depositLiquidationPool(program: Program<Vault>, provider: Provider, payer: Signer, depositAmount: number, overrideStartTime?: number): Promise<PublicKey>;
|
5
|
+
export declare function depositLiquidationPoolInstruction(program: Program<Vault>, payerPublicKey: PublicKey, payerUshAccount: PublicKey, poolPositionPublicKey: PublicKey, depositAmount: number, overrideStartTime?: number): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function depositStakingPool(program: Program<Vault>, provider: Provider, payer: Signer, mintPublicKey: PublicKey, depositAmount: number, overrideStartTime?: number): Promise<PublicKey>;
|
5
|
+
export declare function depositStakingPoolInstruction(program: Program<Vault>, payerPublicKey: PublicKey, poolPositionPublicKey: PublicKey, stakedTokenMintPublicKey: PublicKey, depositAmount: number, overrideStartTime?: number): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function depositVault(program: Program<Vault>, provider: Provider, payer: Signer, vaultPublicKey: PublicKey, depositAmount: number, overrideTime?: number): Promise<PublicKey>;
|
5
|
+
export declare function depositVaultInstruction(program: Program<Vault>, vaultSystemStatePublicKey: PublicKey, vaultOwner: PublicKey, vaultOwnerTokenAccount: PublicKey, vaultPublicKey: PublicKey, vaultAssociatedTokenAccount: PublicKey, historyPublicKey: PublicKey, vaultTypeAccountPublicKey: PublicKey, vaultTypeAssociatedTokenAccount: PublicKey, hedgeStakingPoolPublicKey: PublicKey, hedgeStakingPoolAssociatedUshTokenAccount: PublicKey, collateralMint: PublicKey, ushMintPublickey: PublicKey, oldSmallerPublicKey: PublicKey, newSmallerPublicKey: PublicKey, newLargerPublicKey: PublicKey, depositAmount: number, overrideTime?: number): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function initHedgeFoundation(program: Program<Vault>, provider: Provider, payer: Signer): Promise<PublicKey>;
|
5
|
+
export declare function initHedgeFoundationInstruction(program: Program<Vault>, poolEraPublicKey: PublicKey, payerPublicKey: PublicKey): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function liquidateVault(program: Program<Vault>, provider: Provider, payer: Signer, vaultPublicKey: PublicKey, overrideTime?: number): Promise<PublicKey>;
|
5
|
+
export declare function liquidateVaultInstruction(program: Program<Vault>, payerPublicKey: PublicKey, payerAssociatedTokenAccount: PublicKey, vaultPublickey: PublicKey, vaultAssociatedTokenAccount: PublicKey, poolState: PublicKey, poolEra: PublicKey, poolAssociatedTokenAccount: PublicKey, historyPublicKey: PublicKey, newEraPublicKey: PublicKey, feePool: PublicKey, feePoolAssociatedTokenAccount: PublicKey, hedgeStakingPoolAssociatedUshTokenAccount: PublicKey, collateralMint: PublicKey, vaultTypeAssociatedTokenAccount: PublicKey, oldSmallerPublicKey: PublicKey, newSmallerPublicKey: PublicKey, newLargerPublicKey: PublicKey, collateralType: string, overrideTime?: number): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function loanVault(program: Program<Vault>, provider: Provider, payer: Signer, vaultPublicKey: PublicKey, loanAmount: number, overrideTime?: number): Promise<PublicKey>;
|
5
|
+
export declare function loanVaultInstruction(program: Program<Vault>, payerPublicKey: PublicKey, ownerUshAccount: PublicKey, vaultPublickey: PublicKey, vaultAssociatedTokenAccount: PublicKey, historyPublicKey: PublicKey, vaultTypeAccount: PublicKey, vaultTypeAssociatedTokenAccount: PublicKey, oldSmallerPublicKey: PublicKey, newSmallerPublicKey: PublicKey, newLargerPublicKey: PublicKey, loanAmount: number, overrideTime?: number): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function redeemVault(program: Program<Vault>, provider: Provider, payer: Signer, vaultPublicKey: PublicKey, redeemAmount: number, transactionOverrideTime?: number): Promise<PublicKey>;
|
5
|
+
export declare function redeemVaultInstruction(program: Program<Vault>, payerPublicKey: PublicKey, payerUshAccount: PublicKey, destinationTokenAccount: PublicKey, vaultPublickey: PublicKey, vaultAssociatedTokenAccount: PublicKey, historyPublicKey: PublicKey, vaultTypeAccount: PublicKey, vaultTypeAssociatedTokenAccount: PublicKey, oldSmallerPublicKey: PublicKey, newSmallerPublicKey: PublicKey, newLargerPublicKey: PublicKey, redeemAmount: number, transactionOverrideTime?: number): Promise<TransactionInstruction>;
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function refreshOraclePrice(program: Program<Vault>, provider: Provider, payer: Signer, collateralType: string, network: Cluster, overridePrice?: number, overrideTime?: number): Promise<string>;
|
5
|
+
export declare function refreshOraclePriceInstruction(program: Program<Vault>, collateralType: string, network: Cluster, overridePrice?: number, overrideTime?: number): Promise<TransactionInstruction>;
|
5
6
|
declare enum Cluster {
|
6
7
|
Testing = "Testing",
|
7
8
|
Devnet = "Devnet",
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function repayVault(program: Program<Vault>, provider: Provider, payer: Signer, vaultPublicKey: PublicKey, repayAmount: number, overrideTime?: number): Promise<PublicKey>;
|
5
|
+
export declare function repayVaultInstruction(program: Program<Vault>, payerPublicKey: PublicKey, ownerUshAccount: PublicKey, vaultPublickey: PublicKey, vaultAssociatedTokenAccount: PublicKey, historyPublicKey: PublicKey, vaultTypeAccount: PublicKey, vaultTypeAssociatedTokenAccount: PublicKey, oldSmallerPublicKey: PublicKey, newSmallerPublicKey: PublicKey, newLargerPublicKey: PublicKey, repayAmount: number, overrideTime?: number): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function setHalted(program: Program<Vault>, provider: Provider, payer: Signer, halted: boolean): Promise<PublicKey>;
|
5
|
+
export declare function setHaltedInstruction(program: Program<Vault>, vaultSystemStatePublicKey: PublicKey, payerPublicKey: PublicKey, halted: boolean): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function setVaultTypeStatus(program: Program<Vault>, provider: Provider, payer: Signer, vaultTypeAccount: PublicKey, deprecated: boolean): Promise<PublicKey>;
|
5
|
+
export declare function setVaultTypeStatusInstruction(program: Program<Vault>, vaultSystemStatePublicKey: PublicKey, payerPublicKey: PublicKey, vaultTypeAccount: PublicKey, deprecated: boolean): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function withdrawStakingPool(program: Program<Vault>, provider: Provider, payer: Signer, poolPositionPublicKey: PublicKey, stakedTokenMintPublicKey: PublicKey, overrideStartTime?: number): Promise<PublicKey>;
|
5
|
+
export declare function withdrawStakingPoolInstruction(program: Program<Vault>, payerPublicKey: PublicKey, poolPositionPublicKey: PublicKey, stakedTokenMintPublicKey: PublicKey, overrideStartTime?: number): Promise<TransactionInstruction>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey, Signer, TransactionInstruction } from '@solana/web3.js';
|
3
|
-
|
4
|
-
export declare function
|
3
|
+
import { Vault } from 'idl/vault';
|
4
|
+
export declare function withdrawVault(program: Program<Vault>, provider: Provider, payer: Signer, vaultPublicKey: PublicKey, withdrawAmount: number, overrideTime?: number): Promise<PublicKey>;
|
5
|
+
export declare function withdrawVaultInstruction(program: Program<Vault>, vaultSystemStatePublicKey: PublicKey, payerPublicKey: PublicKey, destinationTokenAccount: PublicKey, vaultPublickey: PublicKey, vaultAssociatedCollateralPublicKey: PublicKey, vaultTypeAccount: PublicKey, vaultTypeAssociatedTokenAccount: PublicKey, hedgeStakingPoolPublicKey: PublicKey, hedgeStakingPoolAssociatedUshTokenAccount: PublicKey, ushMint: PublicKey, historyPublicKey: PublicKey, oldSmallerPublicKey: PublicKey, newSmallerPublicKey: PublicKey, newLargerPublicKey: PublicKey, withdrawAmount: number, overrideTime?: number): Promise<TransactionInstruction>;
|
@@ -51,6 +51,6 @@ export declare class VaultAccount {
|
|
51
51
|
addDeposit(depositAmount: number): void;
|
52
52
|
redeem(): void;
|
53
53
|
liquidate(): void;
|
54
|
-
|
54
|
+
updateDebtAndCollateral(vaultTypeAccuntData: any): void;
|
55
55
|
toString(highlight: PublicKey): string;
|
56
56
|
}
|
@@ -1,3 +1,5 @@
|
|
1
1
|
import { Program, Provider } from '@project-serum/anchor';
|
2
2
|
import { PublicKey } from '@solana/web3.js';
|
3
|
-
|
3
|
+
import { VaultAccount } from '../state/VaultAccount';
|
4
|
+
import { Vault } from 'idl/vault';
|
5
|
+
export declare function getLinkedListAccounts(program: Program<Vault>, provider: Provider, vaultTypeAccountPublicKey: PublicKey, vaultPublicKey: PublicKey, depositAmount: number, loanAmount: number, redeem: boolean, liquidate: boolean, cachedVaults?: VaultAccount[]): Promise<[PublicKey, PublicKey, PublicKey, VaultAccount[]]>;
|