hedge-web3 0.2.21 → 0.2.25
Sign up to get free protection for your applications and to get access to all the features.
- package/declarations/Constants.d.ts +25 -12
- package/declarations/idl/pyth.d.ts +44 -24
- package/declarations/idl/switchboard.d.ts +47 -0
- package/declarations/idl/vault.d.ts +905 -155
- package/declarations/index.d.ts +26 -20
- package/declarations/instructions/closeLiquidationPoolPosition.d.ts +2 -2
- package/declarations/instructions/createReferralAccount.d.ts +17 -0
- package/declarations/instructions/createUserReferralAccount.d.ts +5 -0
- package/declarations/instructions/depositLiquidationPool.d.ts +2 -2
- package/declarations/instructions/loanVault.d.ts +2 -2
- package/declarations/instructions/psmEditAccount.d.ts +12 -0
- package/declarations/instructions/psmMintUsh.d.ts +2 -2
- package/declarations/instructions/psmRedeemUsh.d.ts +2 -2
- package/declarations/instructions/referralClaimFees.d.ts +16 -0
- package/declarations/instructions/transferVault.d.ts +3 -17
- package/declarations/instructions/updateReferralAccount.d.ts +13 -0
- package/declarations/instructions/updateReferralState.d.ts +20 -0
- package/declarations/state/VaultAccount.d.ts +1 -1
- package/declarations/utils/getLinkedListAccounts.d.ts +2 -2
- package/lib/Constants.js +57 -28
- package/lib/idl/pyth.js +44 -24
- package/lib/idl/switchboard.js +49 -0
- package/lib/idl/vault.js +898 -148
- package/lib/index.js +26 -20
- package/lib/instructions/claimLiquidationPoolPosition.js +10 -7
- package/lib/instructions/claimStakingPoolPosition.js +5 -5
- package/lib/instructions/closeClaimedLiquidationPoolPosition.js +1 -1
- package/lib/instructions/closeLiquidationPoolPosition.js +25 -12
- package/lib/instructions/createReferralAccount.js +80 -0
- package/lib/instructions/createStakingPool.js +7 -7
- package/lib/instructions/createUserReferralAccount.js +61 -0
- package/lib/instructions/createVault.js +15 -15
- package/lib/instructions/depositLiquidationPool.js +21 -10
- package/lib/instructions/depositStakingPool.js +5 -5
- package/lib/instructions/depositVault.js +11 -9
- package/lib/instructions/initHedgeFoundation.js +8 -8
- package/lib/instructions/initHedgeFoundationTokens.js +5 -5
- package/lib/instructions/liquidateVault.js +8 -8
- package/lib/instructions/loanVault.js +23 -10
- package/lib/instructions/psmEditAccount.js +60 -0
- package/lib/instructions/psmMintUsh.js +24 -13
- package/lib/instructions/psmRedeemUsh.js +24 -13
- package/lib/instructions/redeemVault.js +7 -7
- package/lib/instructions/referralClaimFees.js +84 -0
- package/lib/instructions/refreshOraclePrice.js +3 -3
- package/lib/instructions/repayVault.js +9 -9
- package/lib/instructions/setHalted.js +1 -1
- package/lib/instructions/transferVault.js +10 -24
- package/lib/instructions/updateReferralAccount.js +50 -0
- package/lib/instructions/updateReferralState.js +57 -0
- package/lib/instructions/updateVaultType.js +1 -1
- package/lib/instructions/withdrawStakingPool.js +11 -11
- package/lib/instructions/withdrawVault.js +5 -5
- package/lib/state/VaultAccount.js +3 -1
- package/lib/utils/getLinkedListAccounts.js +2 -3
- package/package.json +1 -1
- package/src/Constants.ts +64 -63
- package/src/idl/pyth.ts +88 -48
- package/src/idl/switchboard.ts +93 -0
- package/src/idl/vault.ts +1851 -351
- package/src/index.ts +28 -24
- package/src/instructions/claimLiquidationPoolPosition.ts +31 -29
- package/src/instructions/claimStakingPoolPosition.ts +10 -15
- package/src/instructions/closeClaimedLiquidationPoolPosition.ts +4 -2
- package/src/instructions/closeLiquidationPoolPosition.ts +36 -18
- package/src/instructions/createReferralAccount.ts +115 -0
- package/src/instructions/createStakingPool.ts +11 -13
- package/src/instructions/createUserReferralAccount.ts +75 -0
- package/src/instructions/createVault.ts +44 -26
- package/src/instructions/depositLiquidationPool.ts +34 -21
- package/src/instructions/depositStakingPool.ts +18 -14
- package/src/instructions/depositVault.ts +23 -18
- package/src/instructions/initHedgeFoundation.ts +16 -14
- package/src/instructions/initHedgeFoundationTokens.ts +12 -14
- package/src/instructions/liquidateVault.ts +15 -20
- package/src/instructions/loanVault.ts +29 -19
- package/src/instructions/{psmEditAccount.rs → psmEditAccount.ts} +10 -18
- package/src/instructions/psmMintUsh.ts +35 -38
- package/src/instructions/psmRedeemUsh.ts +35 -40
- package/src/instructions/redeemVault.ts +12 -15
- package/src/instructions/referralClaimFees.ts +145 -0
- package/src/instructions/refreshOraclePrice.ts +6 -8
- package/src/instructions/repayVault.ts +18 -16
- package/src/instructions/setHalted.ts +5 -24
- package/src/instructions/transferVault.ts +57 -0
- package/src/instructions/updateReferralAccount.ts +70 -0
- package/src/instructions/updateReferralState.ts +86 -0
- package/src/instructions/updateVaultType.ts +9 -23
- package/src/instructions/withdrawStakingPool.ts +17 -21
- package/src/instructions/withdrawVault.ts +10 -16
- package/src/state/VaultAccount.ts +9 -10
- package/src/utils/getLinkedListAccounts.ts +4 -7
@@ -285,6 +285,21 @@ export declare type Vault = {
|
|
285
285
|
"isMut": true;
|
286
286
|
"isSigner": false;
|
287
287
|
},
|
288
|
+
{
|
289
|
+
"name": "userReferralAccount";
|
290
|
+
"isMut": true;
|
291
|
+
"isSigner": false;
|
292
|
+
},
|
293
|
+
{
|
294
|
+
"name": "referralAccount";
|
295
|
+
"isMut": true;
|
296
|
+
"isSigner": false;
|
297
|
+
},
|
298
|
+
{
|
299
|
+
"name": "referralState";
|
300
|
+
"isMut": true;
|
301
|
+
"isSigner": false;
|
302
|
+
},
|
288
303
|
{
|
289
304
|
"name": "associatedTokenProgram";
|
290
305
|
"isMut": false;
|
@@ -524,6 +539,16 @@ export declare type Vault = {
|
|
524
539
|
"isMut": true;
|
525
540
|
"isSigner": false;
|
526
541
|
},
|
542
|
+
{
|
543
|
+
"name": "userReferralAccount";
|
544
|
+
"isMut": true;
|
545
|
+
"isSigner": false;
|
546
|
+
},
|
547
|
+
{
|
548
|
+
"name": "referralAccount";
|
549
|
+
"isMut": true;
|
550
|
+
"isSigner": false;
|
551
|
+
},
|
527
552
|
{
|
528
553
|
"name": "systemProgram";
|
529
554
|
"isMut": false;
|
@@ -891,6 +916,21 @@ export declare type Vault = {
|
|
891
916
|
"isMut": true;
|
892
917
|
"isSigner": false;
|
893
918
|
},
|
919
|
+
{
|
920
|
+
"name": "referralState";
|
921
|
+
"isMut": true;
|
922
|
+
"isSigner": false;
|
923
|
+
},
|
924
|
+
{
|
925
|
+
"name": "referralAccount";
|
926
|
+
"isMut": true;
|
927
|
+
"isSigner": false;
|
928
|
+
},
|
929
|
+
{
|
930
|
+
"name": "userReferralAccount";
|
931
|
+
"isMut": true;
|
932
|
+
"isSigner": false;
|
933
|
+
},
|
894
934
|
{
|
895
935
|
"name": "systemProgram";
|
896
936
|
"isMut": false;
|
@@ -1760,62 +1800,51 @@ export declare type Vault = {
|
|
1760
1800
|
"args": [];
|
1761
1801
|
},
|
1762
1802
|
{
|
1763
|
-
"name": "
|
1803
|
+
"name": "createReferralState";
|
1764
1804
|
"accounts": [
|
1765
1805
|
{
|
1766
|
-
"name": "
|
1806
|
+
"name": "signer";
|
1767
1807
|
"isMut": true;
|
1768
1808
|
"isSigner": true;
|
1769
1809
|
},
|
1770
1810
|
{
|
1771
1811
|
"name": "vaultSystemState";
|
1772
|
-
"isMut":
|
1812
|
+
"isMut": false;
|
1773
1813
|
"isSigner": false;
|
1774
1814
|
},
|
1775
1815
|
{
|
1776
|
-
"name": "
|
1816
|
+
"name": "referralState";
|
1777
1817
|
"isMut": true;
|
1778
1818
|
"isSigner": false;
|
1779
1819
|
},
|
1780
1820
|
{
|
1781
|
-
"name": "
|
1782
|
-
"isMut":
|
1821
|
+
"name": "referralAccount";
|
1822
|
+
"isMut": true;
|
1783
1823
|
"isSigner": false;
|
1784
1824
|
},
|
1785
1825
|
{
|
1786
1826
|
"name": "systemProgram";
|
1787
1827
|
"isMut": false;
|
1788
1828
|
"isSigner": false;
|
1789
|
-
}
|
1790
|
-
];
|
1791
|
-
"args": [
|
1792
|
-
{
|
1793
|
-
"name": "mintFee";
|
1794
|
-
"type": "u64";
|
1795
|
-
},
|
1796
|
-
{
|
1797
|
-
"name": "redeemFee";
|
1798
|
-
"type": "u64";
|
1799
|
-
},
|
1800
|
-
{
|
1801
|
-
"name": "debtLimit";
|
1802
|
-
"type": "u64";
|
1803
1829
|
},
|
1804
1830
|
{
|
1805
|
-
"name": "
|
1806
|
-
"
|
1831
|
+
"name": "tokenProgram";
|
1832
|
+
"isMut": false;
|
1833
|
+
"isSigner": false;
|
1807
1834
|
},
|
1808
1835
|
{
|
1809
|
-
"name": "
|
1810
|
-
"
|
1836
|
+
"name": "rent";
|
1837
|
+
"isMut": false;
|
1838
|
+
"isSigner": false;
|
1811
1839
|
}
|
1812
1840
|
];
|
1841
|
+
"args": [];
|
1813
1842
|
},
|
1814
1843
|
{
|
1815
|
-
"name": "
|
1844
|
+
"name": "createReferralAccount";
|
1816
1845
|
"accounts": [
|
1817
1846
|
{
|
1818
|
-
"name": "
|
1847
|
+
"name": "signer";
|
1819
1848
|
"isMut": true;
|
1820
1849
|
"isSigner": true;
|
1821
1850
|
},
|
@@ -1825,38 +1854,52 @@ export declare type Vault = {
|
|
1825
1854
|
"isSigner": false;
|
1826
1855
|
},
|
1827
1856
|
{
|
1828
|
-
"name": "
|
1857
|
+
"name": "referralState";
|
1829
1858
|
"isMut": true;
|
1830
1859
|
"isSigner": false;
|
1831
1860
|
},
|
1832
1861
|
{
|
1833
|
-
"name": "
|
1834
|
-
"isMut":
|
1862
|
+
"name": "referralAccount";
|
1863
|
+
"isMut": true;
|
1835
1864
|
"isSigner": false;
|
1836
1865
|
},
|
1837
1866
|
{
|
1838
|
-
"name": "
|
1839
|
-
"isMut":
|
1867
|
+
"name": "userReferralAccount";
|
1868
|
+
"isMut": true;
|
1840
1869
|
"isSigner": false;
|
1841
|
-
}
|
1842
|
-
];
|
1843
|
-
"args": [
|
1870
|
+
},
|
1844
1871
|
{
|
1845
|
-
"name": "
|
1846
|
-
"
|
1872
|
+
"name": "poolPosition";
|
1873
|
+
"isMut": true;
|
1874
|
+
"isSigner": false;
|
1847
1875
|
},
|
1848
1876
|
{
|
1849
|
-
"name": "
|
1850
|
-
"
|
1877
|
+
"name": "hedgeMint";
|
1878
|
+
"isMut": true;
|
1879
|
+
"isSigner": false;
|
1851
1880
|
},
|
1852
1881
|
{
|
1853
|
-
"name": "
|
1854
|
-
"
|
1882
|
+
"name": "hdgAta";
|
1883
|
+
"isMut": true;
|
1884
|
+
"isSigner": false;
|
1855
1885
|
},
|
1856
1886
|
{
|
1857
|
-
"name": "
|
1858
|
-
"
|
1887
|
+
"name": "systemProgram";
|
1888
|
+
"isMut": false;
|
1889
|
+
"isSigner": false;
|
1890
|
+
},
|
1891
|
+
{
|
1892
|
+
"name": "tokenProgram";
|
1893
|
+
"isMut": false;
|
1894
|
+
"isSigner": false;
|
1859
1895
|
},
|
1896
|
+
{
|
1897
|
+
"name": "rent";
|
1898
|
+
"isMut": false;
|
1899
|
+
"isSigner": false;
|
1900
|
+
}
|
1901
|
+
];
|
1902
|
+
"args": [
|
1860
1903
|
{
|
1861
1904
|
"name": "overrideCurrentTime";
|
1862
1905
|
"type": "i64";
|
@@ -1864,85 +1907,117 @@ export declare type Vault = {
|
|
1864
1907
|
];
|
1865
1908
|
},
|
1866
1909
|
{
|
1867
|
-
"name": "
|
1910
|
+
"name": "createUserReferralAccount";
|
1868
1911
|
"accounts": [
|
1869
1912
|
{
|
1870
|
-
"name": "
|
1913
|
+
"name": "signer";
|
1871
1914
|
"isMut": true;
|
1872
1915
|
"isSigner": true;
|
1873
1916
|
},
|
1874
1917
|
{
|
1875
|
-
"name": "
|
1918
|
+
"name": "userReferralAccount";
|
1876
1919
|
"isMut": true;
|
1877
1920
|
"isSigner": false;
|
1878
1921
|
},
|
1879
1922
|
{
|
1880
|
-
"name": "
|
1923
|
+
"name": "referralAccount";
|
1881
1924
|
"isMut": true;
|
1882
1925
|
"isSigner": false;
|
1883
1926
|
},
|
1884
1927
|
{
|
1885
|
-
"name": "
|
1886
|
-
"isMut":
|
1928
|
+
"name": "systemProgram";
|
1929
|
+
"isMut": false;
|
1887
1930
|
"isSigner": false;
|
1888
1931
|
},
|
1889
1932
|
{
|
1890
|
-
"name": "
|
1891
|
-
"isMut":
|
1933
|
+
"name": "tokenProgram";
|
1934
|
+
"isMut": false;
|
1892
1935
|
"isSigner": false;
|
1893
1936
|
},
|
1894
1937
|
{
|
1895
|
-
"name": "
|
1896
|
-
"isMut":
|
1938
|
+
"name": "rent";
|
1939
|
+
"isMut": false;
|
1897
1940
|
"isSigner": false;
|
1898
|
-
}
|
1941
|
+
}
|
1942
|
+
];
|
1943
|
+
"args": [
|
1899
1944
|
{
|
1900
|
-
"name": "
|
1945
|
+
"name": "overrideCurrentTime";
|
1946
|
+
"type": "i64";
|
1947
|
+
}
|
1948
|
+
];
|
1949
|
+
},
|
1950
|
+
{
|
1951
|
+
"name": "updateReferralState";
|
1952
|
+
"accounts": [
|
1953
|
+
{
|
1954
|
+
"name": "signer";
|
1901
1955
|
"isMut": true;
|
1956
|
+
"isSigner": true;
|
1957
|
+
},
|
1958
|
+
{
|
1959
|
+
"name": "vaultSystemState";
|
1960
|
+
"isMut": false;
|
1902
1961
|
"isSigner": false;
|
1903
1962
|
},
|
1904
1963
|
{
|
1905
|
-
"name": "
|
1964
|
+
"name": "referralState";
|
1906
1965
|
"isMut": true;
|
1907
1966
|
"isSigner": false;
|
1908
1967
|
},
|
1909
1968
|
{
|
1910
|
-
"name": "
|
1969
|
+
"name": "systemProgram";
|
1911
1970
|
"isMut": false;
|
1912
1971
|
"isSigner": false;
|
1913
|
-
}
|
1972
|
+
}
|
1973
|
+
];
|
1974
|
+
"args": [
|
1914
1975
|
{
|
1915
|
-
"name": "
|
1976
|
+
"name": "config";
|
1977
|
+
"type": {
|
1978
|
+
"defined": "ReferralStateConfig";
|
1979
|
+
};
|
1980
|
+
}
|
1981
|
+
];
|
1982
|
+
},
|
1983
|
+
{
|
1984
|
+
"name": "updateReferralAccount";
|
1985
|
+
"accounts": [
|
1986
|
+
{
|
1987
|
+
"name": "signer";
|
1916
1988
|
"isMut": true;
|
1917
|
-
"isSigner":
|
1989
|
+
"isSigner": true;
|
1918
1990
|
},
|
1919
1991
|
{
|
1920
|
-
"name": "
|
1992
|
+
"name": "vaultSystemState";
|
1921
1993
|
"isMut": false;
|
1922
1994
|
"isSigner": false;
|
1923
1995
|
},
|
1924
1996
|
{
|
1925
|
-
"name": "
|
1997
|
+
"name": "referralAccount";
|
1998
|
+
"isMut": true;
|
1999
|
+
"isSigner": false;
|
2000
|
+
},
|
2001
|
+
{
|
2002
|
+
"name": "systemProgram";
|
1926
2003
|
"isMut": false;
|
1927
2004
|
"isSigner": false;
|
1928
2005
|
}
|
1929
2006
|
];
|
1930
2007
|
"args": [
|
1931
2008
|
{
|
1932
|
-
"name": "
|
1933
|
-
"type":
|
1934
|
-
|
1935
|
-
|
1936
|
-
"name": "overrideCurrentTime";
|
1937
|
-
"type": "i64";
|
2009
|
+
"name": "config";
|
2010
|
+
"type": {
|
2011
|
+
"defined": "ReferralAccountConfig";
|
2012
|
+
};
|
1938
2013
|
}
|
1939
2014
|
];
|
1940
2015
|
},
|
1941
2016
|
{
|
1942
|
-
"name": "
|
2017
|
+
"name": "referralClaimFees";
|
1943
2018
|
"accounts": [
|
1944
2019
|
{
|
1945
|
-
"name": "
|
2020
|
+
"name": "signer";
|
1946
2021
|
"isMut": true;
|
1947
2022
|
"isSigner": true;
|
1948
2023
|
},
|
@@ -1952,42 +2027,52 @@ export declare type Vault = {
|
|
1952
2027
|
"isSigner": false;
|
1953
2028
|
},
|
1954
2029
|
{
|
1955
|
-
"name": "
|
2030
|
+
"name": "referralState";
|
1956
2031
|
"isMut": true;
|
1957
2032
|
"isSigner": false;
|
1958
2033
|
},
|
1959
2034
|
{
|
1960
|
-
"name": "
|
2035
|
+
"name": "referralAccount";
|
1961
2036
|
"isMut": true;
|
1962
2037
|
"isSigner": false;
|
1963
2038
|
},
|
1964
2039
|
{
|
1965
|
-
"name": "
|
2040
|
+
"name": "poolPosition";
|
1966
2041
|
"isMut": true;
|
1967
2042
|
"isSigner": false;
|
1968
2043
|
},
|
1969
2044
|
{
|
1970
|
-
"name": "
|
2045
|
+
"name": "hedgeMint";
|
1971
2046
|
"isMut": true;
|
1972
2047
|
"isSigner": false;
|
1973
2048
|
},
|
1974
2049
|
{
|
1975
|
-
"name": "
|
2050
|
+
"name": "signerHdgAta";
|
1976
2051
|
"isMut": true;
|
1977
2052
|
"isSigner": false;
|
1978
2053
|
},
|
1979
2054
|
{
|
1980
|
-
"name": "
|
2055
|
+
"name": "ushMint";
|
1981
2056
|
"isMut": true;
|
1982
2057
|
"isSigner": false;
|
1983
2058
|
},
|
1984
2059
|
{
|
1985
|
-
"name": "
|
1986
|
-
"isMut":
|
2060
|
+
"name": "signerUshAta";
|
2061
|
+
"isMut": true;
|
1987
2062
|
"isSigner": false;
|
1988
2063
|
},
|
1989
2064
|
{
|
1990
|
-
"name": "
|
2065
|
+
"name": "communityAssociatedHedgeTokenAccount";
|
2066
|
+
"isMut": true;
|
2067
|
+
"isSigner": false;
|
2068
|
+
},
|
2069
|
+
{
|
2070
|
+
"name": "feePool";
|
2071
|
+
"isMut": true;
|
2072
|
+
"isSigner": false;
|
2073
|
+
},
|
2074
|
+
{
|
2075
|
+
"name": "feePoolAssociatedUshTokenAccount";
|
1991
2076
|
"isMut": true;
|
1992
2077
|
"isSigner": false;
|
1993
2078
|
},
|
@@ -2000,50 +2085,382 @@ export declare type Vault = {
|
|
2000
2085
|
"name": "tokenProgram";
|
2001
2086
|
"isMut": false;
|
2002
2087
|
"isSigner": false;
|
2088
|
+
},
|
2089
|
+
{
|
2090
|
+
"name": "rent";
|
2091
|
+
"isMut": false;
|
2092
|
+
"isSigner": false;
|
2003
2093
|
}
|
2004
2094
|
];
|
2005
|
-
"args": [
|
2095
|
+
"args": [];
|
2096
|
+
},
|
2097
|
+
{
|
2098
|
+
"name": "psmCreate";
|
2099
|
+
"accounts": [
|
2006
2100
|
{
|
2007
|
-
"name": "
|
2008
|
-
"
|
2101
|
+
"name": "payer";
|
2102
|
+
"isMut": true;
|
2103
|
+
"isSigner": true;
|
2009
2104
|
},
|
2010
2105
|
{
|
2011
|
-
"name": "
|
2012
|
-
"
|
2106
|
+
"name": "vaultSystemState";
|
2107
|
+
"isMut": true;
|
2108
|
+
"isSigner": false;
|
2109
|
+
},
|
2110
|
+
{
|
2111
|
+
"name": "psmAccount";
|
2112
|
+
"isMut": true;
|
2113
|
+
"isSigner": false;
|
2114
|
+
},
|
2115
|
+
{
|
2116
|
+
"name": "collateralMint";
|
2117
|
+
"isMut": false;
|
2118
|
+
"isSigner": false;
|
2119
|
+
},
|
2120
|
+
{
|
2121
|
+
"name": "systemProgram";
|
2122
|
+
"isMut": false;
|
2123
|
+
"isSigner": false;
|
2013
2124
|
}
|
2014
2125
|
];
|
2015
|
-
|
2016
|
-
|
2017
|
-
|
2018
|
-
|
2019
|
-
|
2020
|
-
|
2021
|
-
|
2022
|
-
|
2023
|
-
|
2126
|
+
"args": [
|
2127
|
+
{
|
2128
|
+
"name": "mintFee";
|
2129
|
+
"type": "u64";
|
2130
|
+
},
|
2131
|
+
{
|
2132
|
+
"name": "redeemFee";
|
2133
|
+
"type": "u64";
|
2134
|
+
},
|
2135
|
+
{
|
2136
|
+
"name": "debtLimit";
|
2137
|
+
"type": "u64";
|
2138
|
+
},
|
2139
|
+
{
|
2140
|
+
"name": "minSwap";
|
2141
|
+
"type": "u64";
|
2142
|
+
},
|
2143
|
+
{
|
2144
|
+
"name": "overrideCurrentTime";
|
2145
|
+
"type": "i64";
|
2146
|
+
}
|
2147
|
+
];
|
2148
|
+
},
|
2149
|
+
{
|
2150
|
+
"name": "psmEditAccount";
|
2151
|
+
"accounts": [
|
2152
|
+
{
|
2153
|
+
"name": "payer";
|
2154
|
+
"isMut": true;
|
2155
|
+
"isSigner": true;
|
2156
|
+
},
|
2157
|
+
{
|
2158
|
+
"name": "vaultSystemState";
|
2159
|
+
"isMut": true;
|
2160
|
+
"isSigner": false;
|
2161
|
+
},
|
2162
|
+
{
|
2163
|
+
"name": "psmAccount";
|
2164
|
+
"isMut": true;
|
2165
|
+
"isSigner": false;
|
2166
|
+
},
|
2167
|
+
{
|
2168
|
+
"name": "collateralMint";
|
2169
|
+
"isMut": false;
|
2170
|
+
"isSigner": false;
|
2171
|
+
},
|
2172
|
+
{
|
2173
|
+
"name": "systemProgram";
|
2174
|
+
"isMut": false;
|
2175
|
+
"isSigner": false;
|
2176
|
+
}
|
2177
|
+
];
|
2178
|
+
"args": [
|
2179
|
+
{
|
2180
|
+
"name": "mintFee";
|
2181
|
+
"type": "u64";
|
2182
|
+
},
|
2183
|
+
{
|
2184
|
+
"name": "redeemFee";
|
2185
|
+
"type": "u64";
|
2186
|
+
},
|
2187
|
+
{
|
2188
|
+
"name": "debtLimit";
|
2189
|
+
"type": "u64";
|
2190
|
+
},
|
2191
|
+
{
|
2192
|
+
"name": "minSwap";
|
2193
|
+
"type": "u64";
|
2194
|
+
},
|
2195
|
+
{
|
2196
|
+
"name": "overrideCurrentTime";
|
2197
|
+
"type": "i64";
|
2198
|
+
}
|
2199
|
+
];
|
2200
|
+
},
|
2201
|
+
{
|
2202
|
+
"name": "psmMintUsh";
|
2203
|
+
"accounts": [
|
2204
|
+
{
|
2205
|
+
"name": "payer";
|
2206
|
+
"isMut": true;
|
2207
|
+
"isSigner": true;
|
2208
|
+
},
|
2209
|
+
{
|
2210
|
+
"name": "vaultSystemState";
|
2211
|
+
"isMut": true;
|
2212
|
+
"isSigner": false;
|
2213
|
+
},
|
2214
|
+
{
|
2215
|
+
"name": "feePool";
|
2216
|
+
"isMut": true;
|
2217
|
+
"isSigner": false;
|
2218
|
+
},
|
2219
|
+
{
|
2220
|
+
"name": "feePoolAssociatedUshTokenAccount";
|
2221
|
+
"isMut": true;
|
2222
|
+
"isSigner": false;
|
2223
|
+
},
|
2224
|
+
{
|
2225
|
+
"name": "psmAccount";
|
2226
|
+
"isMut": true;
|
2227
|
+
"isSigner": false;
|
2228
|
+
},
|
2229
|
+
{
|
2230
|
+
"name": "psmAccountAta";
|
2231
|
+
"isMut": true;
|
2232
|
+
"isSigner": false;
|
2233
|
+
},
|
2234
|
+
{
|
2235
|
+
"name": "ownerUshAccount";
|
2236
|
+
"isMut": true;
|
2237
|
+
"isSigner": false;
|
2238
|
+
},
|
2239
|
+
{
|
2240
|
+
"name": "ownerCollateralAccount";
|
2241
|
+
"isMut": true;
|
2242
|
+
"isSigner": false;
|
2243
|
+
},
|
2244
|
+
{
|
2245
|
+
"name": "collateralMint";
|
2246
|
+
"isMut": false;
|
2247
|
+
"isSigner": false;
|
2248
|
+
},
|
2249
|
+
{
|
2250
|
+
"name": "ushMint";
|
2251
|
+
"isMut": true;
|
2252
|
+
"isSigner": false;
|
2253
|
+
},
|
2254
|
+
{
|
2255
|
+
"name": "referralState";
|
2256
|
+
"isMut": true;
|
2257
|
+
"isSigner": false;
|
2258
|
+
},
|
2259
|
+
{
|
2260
|
+
"name": "referralAccount";
|
2261
|
+
"isMut": true;
|
2262
|
+
"isSigner": false;
|
2263
|
+
},
|
2264
|
+
{
|
2265
|
+
"name": "systemProgram";
|
2266
|
+
"isMut": false;
|
2267
|
+
"isSigner": false;
|
2268
|
+
},
|
2269
|
+
{
|
2270
|
+
"name": "tokenProgram";
|
2271
|
+
"isMut": false;
|
2272
|
+
"isSigner": false;
|
2273
|
+
}
|
2274
|
+
];
|
2275
|
+
"args": [
|
2276
|
+
{
|
2277
|
+
"name": "collateralAmount";
|
2278
|
+
"type": "u64";
|
2279
|
+
},
|
2280
|
+
{
|
2281
|
+
"name": "overrideCurrentTime";
|
2282
|
+
"type": "i64";
|
2283
|
+
}
|
2284
|
+
];
|
2285
|
+
},
|
2286
|
+
{
|
2287
|
+
"name": "psmRedeemUsh";
|
2288
|
+
"accounts": [
|
2289
|
+
{
|
2290
|
+
"name": "payer";
|
2291
|
+
"isMut": true;
|
2292
|
+
"isSigner": true;
|
2293
|
+
},
|
2294
|
+
{
|
2295
|
+
"name": "vaultSystemState";
|
2296
|
+
"isMut": true;
|
2297
|
+
"isSigner": false;
|
2298
|
+
},
|
2299
|
+
{
|
2300
|
+
"name": "feePool";
|
2301
|
+
"isMut": true;
|
2302
|
+
"isSigner": false;
|
2303
|
+
},
|
2304
|
+
{
|
2305
|
+
"name": "feePoolAssociatedUshTokenAccount";
|
2306
|
+
"isMut": true;
|
2307
|
+
"isSigner": false;
|
2308
|
+
},
|
2309
|
+
{
|
2310
|
+
"name": "psmAccount";
|
2311
|
+
"isMut": true;
|
2312
|
+
"isSigner": false;
|
2313
|
+
},
|
2314
|
+
{
|
2315
|
+
"name": "psmAccountAta";
|
2316
|
+
"isMut": true;
|
2317
|
+
"isSigner": false;
|
2318
|
+
},
|
2319
|
+
{
|
2320
|
+
"name": "ownerUshAccount";
|
2321
|
+
"isMut": true;
|
2322
|
+
"isSigner": false;
|
2323
|
+
},
|
2324
|
+
{
|
2325
|
+
"name": "ownerCollateralAccount";
|
2326
|
+
"isMut": true;
|
2327
|
+
"isSigner": false;
|
2328
|
+
},
|
2329
|
+
{
|
2330
|
+
"name": "collateralMint";
|
2331
|
+
"isMut": false;
|
2332
|
+
"isSigner": false;
|
2333
|
+
},
|
2334
|
+
{
|
2335
|
+
"name": "ushMint";
|
2336
|
+
"isMut": true;
|
2337
|
+
"isSigner": false;
|
2338
|
+
},
|
2339
|
+
{
|
2340
|
+
"name": "referralState";
|
2341
|
+
"isMut": true;
|
2342
|
+
"isSigner": false;
|
2343
|
+
},
|
2344
|
+
{
|
2345
|
+
"name": "referralAccount";
|
2346
|
+
"isMut": true;
|
2347
|
+
"isSigner": false;
|
2348
|
+
},
|
2349
|
+
{
|
2350
|
+
"name": "systemProgram";
|
2351
|
+
"isMut": false;
|
2352
|
+
"isSigner": false;
|
2353
|
+
},
|
2354
|
+
{
|
2355
|
+
"name": "tokenProgram";
|
2356
|
+
"isMut": false;
|
2357
|
+
"isSigner": false;
|
2358
|
+
}
|
2359
|
+
];
|
2360
|
+
"args": [
|
2361
|
+
{
|
2362
|
+
"name": "ushAmount";
|
2363
|
+
"type": "u64";
|
2364
|
+
},
|
2365
|
+
{
|
2366
|
+
"name": "overrideCurrentTime";
|
2367
|
+
"type": "i64";
|
2368
|
+
}
|
2369
|
+
];
|
2370
|
+
},
|
2371
|
+
{
|
2372
|
+
"name": "transferVault";
|
2373
|
+
"accounts": [
|
2374
|
+
{
|
2375
|
+
"name": "vault";
|
2376
|
+
"isMut": true;
|
2377
|
+
"isSigner": false;
|
2378
|
+
},
|
2379
|
+
{
|
2380
|
+
"name": "vaultSystemState";
|
2381
|
+
"isMut": true;
|
2382
|
+
"isSigner": false;
|
2383
|
+
},
|
2384
|
+
{
|
2385
|
+
"name": "vaultType";
|
2386
|
+
"isMut": true;
|
2387
|
+
"isSigner": false;
|
2388
|
+
},
|
2389
|
+
{
|
2390
|
+
"name": "history";
|
2391
|
+
"isMut": true;
|
2392
|
+
"isSigner": true;
|
2393
|
+
},
|
2394
|
+
{
|
2395
|
+
"name": "vaultOwner";
|
2396
|
+
"isMut": true;
|
2397
|
+
"isSigner": true;
|
2398
|
+
},
|
2399
|
+
{
|
2400
|
+
"name": "systemProgram";
|
2401
|
+
"isMut": false;
|
2402
|
+
"isSigner": false;
|
2403
|
+
}
|
2404
|
+
];
|
2405
|
+
"args": [
|
2406
|
+
{
|
2407
|
+
"name": "newOwner";
|
2408
|
+
"type": "publicKey";
|
2409
|
+
}
|
2410
|
+
];
|
2411
|
+
}
|
2412
|
+
];
|
2413
|
+
"accounts": [
|
2414
|
+
{
|
2415
|
+
"name": "aggregator";
|
2416
|
+
"docs": [
|
2417
|
+
"Define the type of state stored in accounts"
|
2418
|
+
];
|
2419
|
+
"type": {
|
2420
|
+
"kind": "struct";
|
2421
|
+
"fields": [
|
2422
|
+
{
|
2024
2423
|
"name": "isInitialized";
|
2424
|
+
"docs": [
|
2425
|
+
"Set to true after initialization."
|
2426
|
+
];
|
2025
2427
|
"type": "bool";
|
2026
2428
|
},
|
2027
2429
|
{
|
2028
2430
|
"name": "version";
|
2431
|
+
"docs": [
|
2432
|
+
"Version of the state"
|
2433
|
+
];
|
2029
2434
|
"type": "u32";
|
2030
2435
|
},
|
2031
2436
|
{
|
2032
2437
|
"name": "config";
|
2438
|
+
"docs": [
|
2439
|
+
"The configuration for this aggregator"
|
2440
|
+
];
|
2033
2441
|
"type": {
|
2034
2442
|
"defined": "Config";
|
2035
2443
|
};
|
2036
2444
|
},
|
2037
2445
|
{
|
2038
2446
|
"name": "updatedAt";
|
2447
|
+
"docs": [
|
2448
|
+
"When the config was last updated."
|
2449
|
+
];
|
2039
2450
|
"type": "i64";
|
2040
2451
|
},
|
2041
2452
|
{
|
2042
2453
|
"name": "owner";
|
2454
|
+
"docs": [
|
2455
|
+
"The aggregator owner is allowed to modify it's config."
|
2456
|
+
];
|
2043
2457
|
"type": "publicKey";
|
2044
2458
|
},
|
2045
2459
|
{
|
2046
2460
|
"name": "submissions";
|
2461
|
+
"docs": [
|
2462
|
+
"A set of current submissions, one per oracle. Array index corresponds to oracle index."
|
2463
|
+
];
|
2047
2464
|
"type": {
|
2048
2465
|
"array": [
|
2049
2466
|
{
|
@@ -2055,6 +2472,9 @@ export declare type Vault = {
|
|
2055
2472
|
},
|
2056
2473
|
{
|
2057
2474
|
"name": "answer";
|
2475
|
+
"docs": [
|
2476
|
+
"The current median answer."
|
2477
|
+
];
|
2058
2478
|
"type": {
|
2059
2479
|
"option": "u128";
|
2060
2480
|
};
|
@@ -2213,106 +2633,234 @@ export declare type Vault = {
|
|
2213
2633
|
"type": "publicKey";
|
2214
2634
|
},
|
2215
2635
|
{
|
2216
|
-
"name": "oraclePyth";
|
2217
|
-
"type": "publicKey";
|
2636
|
+
"name": "oraclePyth";
|
2637
|
+
"type": "publicKey";
|
2638
|
+
},
|
2639
|
+
{
|
2640
|
+
"name": "oracleChainlink";
|
2641
|
+
"type": "publicKey";
|
2642
|
+
},
|
2643
|
+
{
|
2644
|
+
"name": "oracleSwitchboard";
|
2645
|
+
"type": "publicKey";
|
2646
|
+
},
|
2647
|
+
{
|
2648
|
+
"name": "priorityPyth";
|
2649
|
+
"type": "i8";
|
2650
|
+
},
|
2651
|
+
{
|
2652
|
+
"name": "priorityChainlink";
|
2653
|
+
"type": "i8";
|
2654
|
+
},
|
2655
|
+
{
|
2656
|
+
"name": "prioritySwitchboard";
|
2657
|
+
"type": "i8";
|
2658
|
+
},
|
2659
|
+
{
|
2660
|
+
"name": "vaultTypeName";
|
2661
|
+
"type": "string";
|
2662
|
+
}
|
2663
|
+
];
|
2664
|
+
};
|
2665
|
+
},
|
2666
|
+
{
|
2667
|
+
"name": "psmAccount";
|
2668
|
+
"type": {
|
2669
|
+
"kind": "struct";
|
2670
|
+
"fields": [
|
2671
|
+
{
|
2672
|
+
"name": "collateralMint";
|
2673
|
+
"type": "publicKey";
|
2674
|
+
},
|
2675
|
+
{
|
2676
|
+
"name": "minCollateralRatio";
|
2677
|
+
"type": "u128";
|
2678
|
+
},
|
2679
|
+
{
|
2680
|
+
"name": "mintFee";
|
2681
|
+
"type": "u128";
|
2682
|
+
},
|
2683
|
+
{
|
2684
|
+
"name": "redeemFee";
|
2685
|
+
"type": "u128";
|
2686
|
+
},
|
2687
|
+
{
|
2688
|
+
"name": "totalFeesAccumulatedUsh";
|
2689
|
+
"type": "u128";
|
2690
|
+
},
|
2691
|
+
{
|
2692
|
+
"name": "totalFeesAccumulatedCollateral";
|
2693
|
+
"type": "u128";
|
2694
|
+
},
|
2695
|
+
{
|
2696
|
+
"name": "recentPrice";
|
2697
|
+
"type": "u128";
|
2698
|
+
},
|
2699
|
+
{
|
2700
|
+
"name": "debtLimit";
|
2701
|
+
"type": "u64";
|
2702
|
+
},
|
2703
|
+
{
|
2704
|
+
"name": "deposited";
|
2705
|
+
"type": "u64";
|
2706
|
+
},
|
2707
|
+
{
|
2708
|
+
"name": "amountMinted";
|
2709
|
+
"type": "u64";
|
2710
|
+
},
|
2711
|
+
{
|
2712
|
+
"name": "minSwap";
|
2713
|
+
"type": "u64";
|
2714
|
+
},
|
2715
|
+
{
|
2716
|
+
"name": "timeCreated";
|
2717
|
+
"type": "u64";
|
2718
|
+
},
|
2719
|
+
{
|
2720
|
+
"name": "timeLastInteraction";
|
2721
|
+
"type": "u64";
|
2722
|
+
},
|
2723
|
+
{
|
2724
|
+
"name": "priceLastUpdatedTimestamp";
|
2725
|
+
"type": "u64";
|
2726
|
+
},
|
2727
|
+
{
|
2728
|
+
"name": "psmStatus";
|
2729
|
+
"type": {
|
2730
|
+
"defined": "PsmStatus";
|
2731
|
+
};
|
2732
|
+
},
|
2733
|
+
{
|
2734
|
+
"name": "collateralDecimals";
|
2735
|
+
"type": "u8";
|
2736
|
+
}
|
2737
|
+
];
|
2738
|
+
};
|
2739
|
+
},
|
2740
|
+
{
|
2741
|
+
"name": "referralAccount";
|
2742
|
+
"type": {
|
2743
|
+
"kind": "struct";
|
2744
|
+
"fields": [
|
2745
|
+
{
|
2746
|
+
"name": "referrer";
|
2747
|
+
"type": "publicKey";
|
2748
|
+
},
|
2749
|
+
{
|
2750
|
+
"name": "setupCut";
|
2751
|
+
"type": "u128";
|
2752
|
+
},
|
2753
|
+
{
|
2754
|
+
"name": "referredUserDiscount";
|
2755
|
+
"type": "u128";
|
2756
|
+
},
|
2757
|
+
{
|
2758
|
+
"name": "stabilityCut";
|
2759
|
+
"type": "u128";
|
2760
|
+
},
|
2761
|
+
{
|
2762
|
+
"name": "psmCut";
|
2763
|
+
"type": "u128";
|
2218
2764
|
},
|
2219
2765
|
{
|
2220
|
-
"name": "
|
2221
|
-
"type": "
|
2766
|
+
"name": "ushAccumulator";
|
2767
|
+
"type": "u64";
|
2222
2768
|
},
|
2223
2769
|
{
|
2224
|
-
"name": "
|
2225
|
-
"type": "
|
2770
|
+
"name": "hdgAccumulator";
|
2771
|
+
"type": "u64";
|
2226
2772
|
},
|
2227
2773
|
{
|
2228
|
-
"name": "
|
2229
|
-
"type": "
|
2774
|
+
"name": "ushClaimed";
|
2775
|
+
"type": "u64";
|
2230
2776
|
},
|
2231
2777
|
{
|
2232
|
-
"name": "
|
2233
|
-
"type": "
|
2778
|
+
"name": "hdgClaimed";
|
2779
|
+
"type": "u64";
|
2234
2780
|
},
|
2235
2781
|
{
|
2236
|
-
"name": "
|
2237
|
-
"type": "
|
2782
|
+
"name": "hdgThreshold";
|
2783
|
+
"type": "u64";
|
2238
2784
|
},
|
2239
2785
|
{
|
2240
|
-
"name": "
|
2241
|
-
"type": "
|
2786
|
+
"name": "referralId";
|
2787
|
+
"type": "u64";
|
2242
2788
|
}
|
2243
2789
|
];
|
2244
2790
|
};
|
2245
2791
|
},
|
2246
2792
|
{
|
2247
|
-
"name": "
|
2793
|
+
"name": "referralState";
|
2248
2794
|
"type": {
|
2249
2795
|
"kind": "struct";
|
2250
2796
|
"fields": [
|
2251
2797
|
{
|
2252
|
-
"name": "
|
2253
|
-
"type": "
|
2798
|
+
"name": "setupCut";
|
2799
|
+
"type": "u128";
|
2254
2800
|
},
|
2255
2801
|
{
|
2256
|
-
"name": "
|
2802
|
+
"name": "referredUserDiscount";
|
2257
2803
|
"type": "u128";
|
2258
2804
|
},
|
2259
2805
|
{
|
2260
|
-
"name": "
|
2806
|
+
"name": "stabilityCut";
|
2261
2807
|
"type": "u128";
|
2262
2808
|
},
|
2263
2809
|
{
|
2264
|
-
"name": "
|
2810
|
+
"name": "psmCut";
|
2265
2811
|
"type": "u128";
|
2266
2812
|
},
|
2267
2813
|
{
|
2268
|
-
"name": "
|
2814
|
+
"name": "maxSetupCut";
|
2269
2815
|
"type": "u128";
|
2270
2816
|
},
|
2271
2817
|
{
|
2272
|
-
"name": "
|
2818
|
+
"name": "maxReferredDiscount";
|
2273
2819
|
"type": "u128";
|
2274
2820
|
},
|
2275
2821
|
{
|
2276
|
-
"name": "
|
2822
|
+
"name": "maxStabilityCut";
|
2277
2823
|
"type": "u128";
|
2278
2824
|
},
|
2279
2825
|
{
|
2280
|
-
"name": "
|
2281
|
-
"type": "
|
2826
|
+
"name": "maxPsmCut";
|
2827
|
+
"type": "u128";
|
2282
2828
|
},
|
2283
2829
|
{
|
2284
|
-
"name": "
|
2830
|
+
"name": "referralAccountCount";
|
2285
2831
|
"type": "u64";
|
2286
2832
|
},
|
2287
2833
|
{
|
2288
|
-
"name": "
|
2834
|
+
"name": "hdgThreshold";
|
2289
2835
|
"type": "u64";
|
2290
2836
|
},
|
2291
2837
|
{
|
2292
|
-
"name": "
|
2838
|
+
"name": "hdgPsmThreshold";
|
2293
2839
|
"type": "u64";
|
2294
2840
|
},
|
2295
2841
|
{
|
2296
|
-
"name": "
|
2297
|
-
"type": "
|
2842
|
+
"name": "totalUshClaimed";
|
2843
|
+
"type": "u128";
|
2298
2844
|
},
|
2299
2845
|
{
|
2300
|
-
"name": "
|
2846
|
+
"name": "totalHdgClaimed";
|
2301
2847
|
"type": "u64";
|
2302
2848
|
},
|
2303
2849
|
{
|
2304
|
-
"name": "
|
2850
|
+
"name": "totalUshFees";
|
2851
|
+
"type": "u128";
|
2852
|
+
},
|
2853
|
+
{
|
2854
|
+
"name": "totalHdgFees";
|
2305
2855
|
"type": "u64";
|
2306
2856
|
},
|
2307
2857
|
{
|
2308
|
-
"name": "
|
2309
|
-
"type":
|
2310
|
-
"defined": "PsmStatus";
|
2311
|
-
};
|
2858
|
+
"name": "referralPromoThreshold";
|
2859
|
+
"type": "u64";
|
2312
2860
|
},
|
2313
2861
|
{
|
2314
|
-
"name": "
|
2315
|
-
"type": "
|
2862
|
+
"name": "referralEnabled";
|
2863
|
+
"type": "bool";
|
2316
2864
|
}
|
2317
2865
|
];
|
2318
2866
|
};
|
@@ -2443,6 +2991,30 @@ export declare type Vault = {
|
|
2443
2991
|
];
|
2444
2992
|
};
|
2445
2993
|
},
|
2994
|
+
{
|
2995
|
+
"name": "userReferralAccount";
|
2996
|
+
"type": {
|
2997
|
+
"kind": "struct";
|
2998
|
+
"fields": [
|
2999
|
+
{
|
3000
|
+
"name": "referralAccount";
|
3001
|
+
"type": "publicKey";
|
3002
|
+
},
|
3003
|
+
{
|
3004
|
+
"name": "referrer";
|
3005
|
+
"type": "publicKey";
|
3006
|
+
},
|
3007
|
+
{
|
3008
|
+
"name": "referralId";
|
3009
|
+
"type": "u64";
|
3010
|
+
},
|
3011
|
+
{
|
3012
|
+
"name": "lastReferrerChange";
|
3013
|
+
"type": "u64";
|
3014
|
+
}
|
3015
|
+
];
|
3016
|
+
};
|
3017
|
+
},
|
2446
3018
|
{
|
2447
3019
|
"name": "vaultHistoryEvent";
|
2448
3020
|
"type": {
|
@@ -2649,6 +3221,14 @@ export declare type Vault = {
|
|
2649
3221
|
"type": {
|
2650
3222
|
"option": "publicKey";
|
2651
3223
|
};
|
3224
|
+
},
|
3225
|
+
{
|
3226
|
+
"name": "lastRedeemFeeBytes";
|
3227
|
+
"type": "u128";
|
3228
|
+
},
|
3229
|
+
{
|
3230
|
+
"name": "lastRedeemTimestamp";
|
3231
|
+
"type": "u64";
|
2652
3232
|
}
|
2653
3233
|
];
|
2654
3234
|
};
|
@@ -2740,20 +3320,32 @@ export declare type Vault = {
|
|
2740
3320
|
"fields": [
|
2741
3321
|
{
|
2742
3322
|
"name": "oracles";
|
3323
|
+
"docs": [
|
3324
|
+
"A list of oracles allowed to submit answers."
|
3325
|
+
];
|
2743
3326
|
"type": {
|
2744
3327
|
"vec": "publicKey";
|
2745
3328
|
};
|
2746
3329
|
},
|
2747
3330
|
{
|
2748
3331
|
"name": "minAnswerThreshold";
|
3332
|
+
"docs": [
|
3333
|
+
"Number of submissions required to produce an answer. Must be larger than 0."
|
3334
|
+
];
|
2749
3335
|
"type": "u8";
|
2750
3336
|
},
|
2751
3337
|
{
|
2752
3338
|
"name": "stalenessThreshold";
|
3339
|
+
"docs": [
|
3340
|
+
"Offset in number of seconds before a submission is considered stale."
|
3341
|
+
];
|
2753
3342
|
"type": "u8";
|
2754
3343
|
},
|
2755
3344
|
{
|
2756
3345
|
"name": "decimals";
|
3346
|
+
"docs": [
|
3347
|
+
"Decimal places for value representations"
|
3348
|
+
];
|
2757
3349
|
"type": "u8";
|
2758
3350
|
}
|
2759
3351
|
];
|
@@ -2775,6 +3367,124 @@ export declare type Vault = {
|
|
2775
3367
|
];
|
2776
3368
|
};
|
2777
3369
|
},
|
3370
|
+
{
|
3371
|
+
"name": "ReferralAccountConfig";
|
3372
|
+
"type": {
|
3373
|
+
"kind": "struct";
|
3374
|
+
"fields": [
|
3375
|
+
{
|
3376
|
+
"name": "setupCut";
|
3377
|
+
"type": {
|
3378
|
+
"option": "u128";
|
3379
|
+
};
|
3380
|
+
},
|
3381
|
+
{
|
3382
|
+
"name": "referredUserDiscount";
|
3383
|
+
"type": {
|
3384
|
+
"option": "u128";
|
3385
|
+
};
|
3386
|
+
},
|
3387
|
+
{
|
3388
|
+
"name": "stabilityCut";
|
3389
|
+
"type": {
|
3390
|
+
"option": "u128";
|
3391
|
+
};
|
3392
|
+
},
|
3393
|
+
{
|
3394
|
+
"name": "psmCut";
|
3395
|
+
"type": {
|
3396
|
+
"option": "u128";
|
3397
|
+
};
|
3398
|
+
},
|
3399
|
+
{
|
3400
|
+
"name": "hdgThreshold";
|
3401
|
+
"type": {
|
3402
|
+
"option": "u64";
|
3403
|
+
};
|
3404
|
+
}
|
3405
|
+
];
|
3406
|
+
};
|
3407
|
+
},
|
3408
|
+
{
|
3409
|
+
"name": "ReferralStateConfig";
|
3410
|
+
"type": {
|
3411
|
+
"kind": "struct";
|
3412
|
+
"fields": [
|
3413
|
+
{
|
3414
|
+
"name": "setupCut";
|
3415
|
+
"type": {
|
3416
|
+
"option": "u128";
|
3417
|
+
};
|
3418
|
+
},
|
3419
|
+
{
|
3420
|
+
"name": "referredUserDiscount";
|
3421
|
+
"type": {
|
3422
|
+
"option": "u128";
|
3423
|
+
};
|
3424
|
+
},
|
3425
|
+
{
|
3426
|
+
"name": "stabilityCut";
|
3427
|
+
"type": {
|
3428
|
+
"option": "u128";
|
3429
|
+
};
|
3430
|
+
},
|
3431
|
+
{
|
3432
|
+
"name": "psmCut";
|
3433
|
+
"type": {
|
3434
|
+
"option": "u128";
|
3435
|
+
};
|
3436
|
+
},
|
3437
|
+
{
|
3438
|
+
"name": "maxSetupCut";
|
3439
|
+
"type": {
|
3440
|
+
"option": "u128";
|
3441
|
+
};
|
3442
|
+
},
|
3443
|
+
{
|
3444
|
+
"name": "maxReferredDiscount";
|
3445
|
+
"type": {
|
3446
|
+
"option": "u128";
|
3447
|
+
};
|
3448
|
+
},
|
3449
|
+
{
|
3450
|
+
"name": "maxStabilityCut";
|
3451
|
+
"type": {
|
3452
|
+
"option": "u128";
|
3453
|
+
};
|
3454
|
+
},
|
3455
|
+
{
|
3456
|
+
"name": "maxPsmCut";
|
3457
|
+
"type": {
|
3458
|
+
"option": "u128";
|
3459
|
+
};
|
3460
|
+
},
|
3461
|
+
{
|
3462
|
+
"name": "hdgThreshold";
|
3463
|
+
"type": {
|
3464
|
+
"option": "u64";
|
3465
|
+
};
|
3466
|
+
},
|
3467
|
+
{
|
3468
|
+
"name": "hdgPsmThreshold";
|
3469
|
+
"type": {
|
3470
|
+
"option": "u64";
|
3471
|
+
};
|
3472
|
+
},
|
3473
|
+
{
|
3474
|
+
"name": "referralPromoThreshold";
|
3475
|
+
"type": {
|
3476
|
+
"option": "u64";
|
3477
|
+
};
|
3478
|
+
},
|
3479
|
+
{
|
3480
|
+
"name": "referralEnabled";
|
3481
|
+
"type": {
|
3482
|
+
"option": "bool";
|
3483
|
+
};
|
3484
|
+
}
|
3485
|
+
];
|
3486
|
+
};
|
3487
|
+
},
|
2778
3488
|
{
|
2779
3489
|
"name": "VaultTypeConfig";
|
2780
3490
|
"type": {
|
@@ -3082,6 +3792,26 @@ export declare type Vault = {
|
|
3082
3792
|
"index": false;
|
3083
3793
|
}
|
3084
3794
|
];
|
3795
|
+
},
|
3796
|
+
{
|
3797
|
+
"name": "VaultTransferEvent";
|
3798
|
+
"fields": [
|
3799
|
+
{
|
3800
|
+
"name": "vault";
|
3801
|
+
"type": "publicKey";
|
3802
|
+
"index": false;
|
3803
|
+
},
|
3804
|
+
{
|
3805
|
+
"name": "oldOwner";
|
3806
|
+
"type": "publicKey";
|
3807
|
+
"index": false;
|
3808
|
+
},
|
3809
|
+
{
|
3810
|
+
"name": "newOwner";
|
3811
|
+
"type": "publicKey";
|
3812
|
+
"index": false;
|
3813
|
+
}
|
3814
|
+
];
|
3085
3815
|
}
|
3086
3816
|
];
|
3087
3817
|
"errors": [
|
@@ -3132,131 +3862,151 @@ export declare type Vault = {
|
|
3132
3862
|
},
|
3133
3863
|
{
|
3134
3864
|
"code": 6009;
|
3865
|
+
"name": "NotAuthorizedToCreateReferralState";
|
3866
|
+
"msg": "Signer not authorized to create referral state account";
|
3867
|
+
},
|
3868
|
+
{
|
3869
|
+
"code": 6010;
|
3135
3870
|
"name": "NotAuthorized";
|
3136
3871
|
"msg": "Signer not authorized to call this function";
|
3137
3872
|
},
|
3138
3873
|
{
|
3139
|
-
"code":
|
3874
|
+
"code": 6011;
|
3140
3875
|
"name": "BadSeed";
|
3141
3876
|
"msg": "Bad Seed";
|
3142
3877
|
},
|
3143
3878
|
{
|
3144
|
-
"code":
|
3879
|
+
"code": 6012;
|
3145
3880
|
"name": "CollateralPriceOutOfDate";
|
3146
3881
|
"msg": "Collateral price needs to be refreshed. It is only valid for 60 seconds.";
|
3147
3882
|
},
|
3148
3883
|
{
|
3149
|
-
"code":
|
3884
|
+
"code": 6013;
|
3150
3885
|
"name": "EmergencyMode";
|
3151
3886
|
"msg": "System is not accepting any tx that would worsen collateral ratio at this time";
|
3152
3887
|
},
|
3153
3888
|
{
|
3154
|
-
"code":
|
3889
|
+
"code": 6014;
|
3155
3890
|
"name": "MinDebtRequired";
|
3156
3891
|
"msg": "Vault under the minimum debt limit. Vault must have zero debt or be over the minimum.";
|
3157
3892
|
},
|
3158
3893
|
{
|
3159
|
-
"code":
|
3894
|
+
"code": 6015;
|
3160
3895
|
"name": "PoolPositionAlreadyClosed";
|
3161
3896
|
"msg": "Pool position already closed";
|
3162
3897
|
},
|
3163
3898
|
{
|
3164
|
-
"code":
|
3899
|
+
"code": 6016;
|
3165
3900
|
"name": "PoolPositionNoYetClosed";
|
3166
3901
|
"msg": "Pool position must be closed to claim reward";
|
3167
3902
|
},
|
3168
3903
|
{
|
3169
|
-
"code":
|
3904
|
+
"code": 6017;
|
3170
3905
|
"name": "MaxDebtAgainstVaultType";
|
3171
3906
|
"msg": "Max debt extended against vault type reached.";
|
3172
3907
|
},
|
3173
3908
|
{
|
3174
|
-
"code":
|
3909
|
+
"code": 6018;
|
3175
3910
|
"name": "VaultTypeNotRedeemable";
|
3176
3911
|
"msg": "Vault type cannot be redeemed against.";
|
3177
3912
|
},
|
3178
3913
|
{
|
3179
|
-
"code":
|
3914
|
+
"code": 6019;
|
3180
3915
|
"name": "SystemHalted";
|
3181
3916
|
"msg": "System is currently halted. No actions may be taken at this time.";
|
3182
3917
|
},
|
3183
3918
|
{
|
3184
|
-
"code":
|
3919
|
+
"code": 6020;
|
3185
3920
|
"name": "EntireVaultRedeem";
|
3186
3921
|
"msg": "Entire vault must be redeemed at this time.";
|
3187
3922
|
},
|
3188
3923
|
{
|
3189
|
-
"code":
|
3924
|
+
"code": 6021;
|
3190
3925
|
"name": "NotRedeemingLowestCollateralRatioVault";
|
3191
3926
|
"msg": "Can only redeem lowest collateral ratio vault in system.";
|
3192
3927
|
},
|
3193
3928
|
{
|
3194
|
-
"code":
|
3929
|
+
"code": 6022;
|
3195
3930
|
"name": "VaultTypeDeprecated";
|
3196
3931
|
"msg": "Vaults of this collateral type are deprecated. No new vaults can be created and no new debt will be issued for this collateral type.";
|
3197
3932
|
},
|
3198
3933
|
{
|
3199
|
-
"code":
|
3934
|
+
"code": 6023;
|
3200
3935
|
"name": "UpdateLinkedListFailed";
|
3201
3936
|
"msg": "There was an error updating the list of vaults. Please make sure the transaction is fresh.";
|
3202
3937
|
},
|
3203
3938
|
{
|
3204
|
-
"code":
|
3939
|
+
"code": 6024;
|
3205
3940
|
"name": "InvalidSaltLength";
|
3206
3941
|
"msg": "Salt for new vaults must be of length 8";
|
3207
3942
|
},
|
3208
3943
|
{
|
3209
|
-
"code":
|
3944
|
+
"code": 6025;
|
3210
3945
|
"name": "InvalidNameLength";
|
3211
3946
|
"msg": "Name for new vault type must be length 16";
|
3212
3947
|
},
|
3213
3948
|
{
|
3214
|
-
"code":
|
3949
|
+
"code": 6026;
|
3215
3950
|
"name": "PositionNotClaimed";
|
3216
3951
|
"msg": "Not all positions claimed. Claim all before closing account to recover SOL rent.";
|
3217
3952
|
},
|
3218
3953
|
{
|
3219
|
-
"code":
|
3954
|
+
"code": 6027;
|
3220
3955
|
"name": "PoolWasUsed";
|
3221
3956
|
"msg": "Era was not unused. Cannot reclaim the SOL rent.";
|
3222
3957
|
},
|
3223
3958
|
{
|
3224
|
-
"code":
|
3959
|
+
"code": 6028;
|
3960
|
+
"name": "NotEnoughHDG";
|
3961
|
+
"msg": "Need more HDG to open account.";
|
3962
|
+
},
|
3963
|
+
{
|
3964
|
+
"code": 6029;
|
3965
|
+
"name": "ReferralDisabled";
|
3966
|
+
"msg": "Referrals are currently disabled.";
|
3967
|
+
},
|
3968
|
+
{
|
3969
|
+
"code": 6030;
|
3970
|
+
"name": "WrongReferralAccount";
|
3971
|
+
"msg": "Attempted to pass in wrong referral account.";
|
3972
|
+
},
|
3973
|
+
{
|
3974
|
+
"code": 6031;
|
3225
3975
|
"name": "PsmDisabled";
|
3226
3976
|
"msg": "PSM is currently disabled.";
|
3227
3977
|
},
|
3228
3978
|
{
|
3229
|
-
"code":
|
3979
|
+
"code": 6032;
|
3230
3980
|
"name": "PsmMaxDebtReached";
|
3231
3981
|
"msg": "PSM - Max Debt reached";
|
3232
3982
|
},
|
3233
3983
|
{
|
3234
|
-
"code":
|
3984
|
+
"code": 6033;
|
3235
3985
|
"name": "PsmMinSwapAmount";
|
3236
3986
|
"msg": "PSM - Need more to swap";
|
3237
3987
|
},
|
3238
3988
|
{
|
3239
|
-
"code":
|
3989
|
+
"code": 6034;
|
3240
3990
|
"name": "UpdateVaultTypeBadMaxDebtExtended";
|
3241
3991
|
"msg": "New Max debt extended value is less than the current debt!";
|
3242
3992
|
},
|
3243
3993
|
{
|
3244
|
-
"code":
|
3994
|
+
"code": 6035;
|
3245
3995
|
"name": "UpdateVaultTypeNoEnabledOracles";
|
3246
3996
|
"msg": "No Enabled Oracles!";
|
3247
3997
|
},
|
3248
3998
|
{
|
3249
|
-
"code":
|
3999
|
+
"code": 6036;
|
3250
4000
|
"name": "UpdateVaultTypeDuplicateOraclePriorities";
|
3251
4001
|
"msg": "Duplicate Oracle Priorities";
|
3252
4002
|
},
|
3253
4003
|
{
|
3254
|
-
"code":
|
4004
|
+
"code": 6037;
|
3255
4005
|
"name": "UpdateVaultTypeInvalidOraclePriority";
|
3256
4006
|
"msg": "Invalid Oracle Priority";
|
3257
4007
|
},
|
3258
4008
|
{
|
3259
|
-
"code":
|
4009
|
+
"code": 6038;
|
3260
4010
|
"name": "OracleUpdateFailed";
|
3261
4011
|
"msg": "OracleUpdateFailed";
|
3262
4012
|
}
|