@bench.games/opportunity-markets 0.3.1 → 0.3.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/dist/browser/index.js +694 -1035
- package/dist/index.cjs +919 -1250
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +85 -235
- package/dist/index.d.ts +85 -235
- package/dist/index.js +694 -1035
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -176,14 +176,14 @@ async function fetchAllMaybeArciumSignerAccount(rpc, addresses, config) {
|
|
|
176
176
|
import {
|
|
177
177
|
assertAccountExists as assertAccountExists3,
|
|
178
178
|
assertAccountsExist as assertAccountsExist3,
|
|
179
|
-
combineCodec as
|
|
179
|
+
combineCodec as combineCodec50,
|
|
180
180
|
decodeAccount as decodeAccount3,
|
|
181
181
|
fetchEncodedAccount as fetchEncodedAccount3,
|
|
182
182
|
fetchEncodedAccounts as fetchEncodedAccounts3,
|
|
183
183
|
fixDecoderSize as fixDecoderSize3,
|
|
184
184
|
fixEncoderSize as fixEncoderSize3,
|
|
185
|
-
getAddressDecoder as
|
|
186
|
-
getAddressEncoder as
|
|
185
|
+
getAddressDecoder as getAddressDecoder26,
|
|
186
|
+
getAddressEncoder as getAddressEncoder26,
|
|
187
187
|
getArrayDecoder as getArrayDecoder12,
|
|
188
188
|
getArrayEncoder as getArrayEncoder12,
|
|
189
189
|
getBooleanDecoder as getBooleanDecoder6,
|
|
@@ -192,8 +192,8 @@ import {
|
|
|
192
192
|
getBytesEncoder as getBytesEncoder3,
|
|
193
193
|
getOptionDecoder as getOptionDecoder4,
|
|
194
194
|
getOptionEncoder as getOptionEncoder4,
|
|
195
|
-
getStructDecoder as
|
|
196
|
-
getStructEncoder as
|
|
195
|
+
getStructDecoder as getStructDecoder44,
|
|
196
|
+
getStructEncoder as getStructEncoder44,
|
|
197
197
|
getU16Decoder as getU16Decoder5,
|
|
198
198
|
getU16Encoder as getU16Encoder5,
|
|
199
199
|
getU64Decoder as getU64Decoder24,
|
|
@@ -834,8 +834,7 @@ function getMarketCreatedEventEncoder() {
|
|
|
834
834
|
["feeRates", getFeeRatesEncoder()],
|
|
835
835
|
["creatorFeeClaimer", getAddressEncoder7()],
|
|
836
836
|
["marketResolutionDeadlineSeconds", getU64Encoder7()],
|
|
837
|
-
["
|
|
838
|
-
["maxRevealPeriodSeconds", getU64Encoder7()],
|
|
837
|
+
["revealPeriodSeconds", getU64Encoder7()],
|
|
839
838
|
["timestamp", getI64Encoder5()]
|
|
840
839
|
]);
|
|
841
840
|
}
|
|
@@ -855,8 +854,7 @@ function getMarketCreatedEventDecoder() {
|
|
|
855
854
|
["feeRates", getFeeRatesDecoder()],
|
|
856
855
|
["creatorFeeClaimer", getAddressDecoder7()],
|
|
857
856
|
["marketResolutionDeadlineSeconds", getU64Decoder7()],
|
|
858
|
-
["
|
|
859
|
-
["maxRevealPeriodSeconds", getU64Decoder7()],
|
|
857
|
+
["revealPeriodSeconds", getU64Decoder7()],
|
|
860
858
|
["timestamp", getI64Decoder5()]
|
|
861
859
|
]);
|
|
862
860
|
}
|
|
@@ -1788,7 +1786,7 @@ function getStakeRevealedEventCodec() {
|
|
|
1788
1786
|
);
|
|
1789
1787
|
}
|
|
1790
1788
|
|
|
1791
|
-
// src/generated/types/
|
|
1789
|
+
// src/generated/types/stuckStakeClosedEvent.ts
|
|
1792
1790
|
import {
|
|
1793
1791
|
combineCodec as combineCodec44,
|
|
1794
1792
|
getAddressDecoder as getAddressDecoder22,
|
|
@@ -1796,98 +1794,40 @@ import {
|
|
|
1796
1794
|
getI64Decoder as getI64Decoder18,
|
|
1797
1795
|
getI64Encoder as getI64Encoder18,
|
|
1798
1796
|
getStructDecoder as getStructDecoder38,
|
|
1799
|
-
getStructEncoder as getStructEncoder38
|
|
1800
|
-
} from "@solana/kit";
|
|
1801
|
-
function getStakingPausedEventEncoder() {
|
|
1802
|
-
return getStructEncoder38([
|
|
1803
|
-
["market", getAddressEncoder22()],
|
|
1804
|
-
["timestamp", getI64Encoder18()]
|
|
1805
|
-
]);
|
|
1806
|
-
}
|
|
1807
|
-
function getStakingPausedEventDecoder() {
|
|
1808
|
-
return getStructDecoder38([
|
|
1809
|
-
["market", getAddressDecoder22()],
|
|
1810
|
-
["timestamp", getI64Decoder18()]
|
|
1811
|
-
]);
|
|
1812
|
-
}
|
|
1813
|
-
function getStakingPausedEventCodec() {
|
|
1814
|
-
return combineCodec44(
|
|
1815
|
-
getStakingPausedEventEncoder(),
|
|
1816
|
-
getStakingPausedEventDecoder()
|
|
1817
|
-
);
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
// src/generated/types/stakingResumedEvent.ts
|
|
1821
|
-
import {
|
|
1822
|
-
combineCodec as combineCodec45,
|
|
1823
|
-
getAddressDecoder as getAddressDecoder23,
|
|
1824
|
-
getAddressEncoder as getAddressEncoder23,
|
|
1825
|
-
getI64Decoder as getI64Decoder19,
|
|
1826
|
-
getI64Encoder as getI64Encoder19,
|
|
1827
|
-
getStructDecoder as getStructDecoder39,
|
|
1828
|
-
getStructEncoder as getStructEncoder39
|
|
1829
|
-
} from "@solana/kit";
|
|
1830
|
-
function getStakingResumedEventEncoder() {
|
|
1831
|
-
return getStructEncoder39([
|
|
1832
|
-
["market", getAddressEncoder23()],
|
|
1833
|
-
["timestamp", getI64Encoder19()]
|
|
1834
|
-
]);
|
|
1835
|
-
}
|
|
1836
|
-
function getStakingResumedEventDecoder() {
|
|
1837
|
-
return getStructDecoder39([
|
|
1838
|
-
["market", getAddressDecoder23()],
|
|
1839
|
-
["timestamp", getI64Decoder19()]
|
|
1840
|
-
]);
|
|
1841
|
-
}
|
|
1842
|
-
function getStakingResumedEventCodec() {
|
|
1843
|
-
return combineCodec45(
|
|
1844
|
-
getStakingResumedEventEncoder(),
|
|
1845
|
-
getStakingResumedEventDecoder()
|
|
1846
|
-
);
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
|
-
// src/generated/types/stuckStakeClosedEvent.ts
|
|
1850
|
-
import {
|
|
1851
|
-
combineCodec as combineCodec46,
|
|
1852
|
-
getAddressDecoder as getAddressDecoder24,
|
|
1853
|
-
getAddressEncoder as getAddressEncoder24,
|
|
1854
|
-
getI64Decoder as getI64Decoder20,
|
|
1855
|
-
getI64Encoder as getI64Encoder20,
|
|
1856
|
-
getStructDecoder as getStructDecoder40,
|
|
1857
|
-
getStructEncoder as getStructEncoder40,
|
|
1797
|
+
getStructEncoder as getStructEncoder38,
|
|
1858
1798
|
getU32Decoder as getU32Decoder11,
|
|
1859
1799
|
getU32Encoder as getU32Encoder11,
|
|
1860
1800
|
getU64Decoder as getU64Decoder20,
|
|
1861
1801
|
getU64Encoder as getU64Encoder20
|
|
1862
1802
|
} from "@solana/kit";
|
|
1863
1803
|
function getStuckStakeClosedEventEncoder() {
|
|
1864
|
-
return
|
|
1865
|
-
["owner",
|
|
1866
|
-
["market",
|
|
1867
|
-
["stakeAccount",
|
|
1804
|
+
return getStructEncoder38([
|
|
1805
|
+
["owner", getAddressEncoder22()],
|
|
1806
|
+
["market", getAddressEncoder22()],
|
|
1807
|
+
["stakeAccount", getAddressEncoder22()],
|
|
1868
1808
|
["stakeAccountId", getU32Encoder11()],
|
|
1869
1809
|
["refundedAmount", getU64Encoder20()],
|
|
1870
1810
|
["refundedPlatformFee", getU64Encoder20()],
|
|
1871
1811
|
["refundedRewardPoolFee", getU64Encoder20()],
|
|
1872
1812
|
["refundedCreatorFee", getU64Encoder20()],
|
|
1873
|
-
["timestamp",
|
|
1813
|
+
["timestamp", getI64Encoder18()]
|
|
1874
1814
|
]);
|
|
1875
1815
|
}
|
|
1876
1816
|
function getStuckStakeClosedEventDecoder() {
|
|
1877
|
-
return
|
|
1878
|
-
["owner",
|
|
1879
|
-
["market",
|
|
1880
|
-
["stakeAccount",
|
|
1817
|
+
return getStructDecoder38([
|
|
1818
|
+
["owner", getAddressDecoder22()],
|
|
1819
|
+
["market", getAddressDecoder22()],
|
|
1820
|
+
["stakeAccount", getAddressDecoder22()],
|
|
1881
1821
|
["stakeAccountId", getU32Decoder11()],
|
|
1882
1822
|
["refundedAmount", getU64Decoder20()],
|
|
1883
1823
|
["refundedPlatformFee", getU64Decoder20()],
|
|
1884
1824
|
["refundedRewardPoolFee", getU64Decoder20()],
|
|
1885
1825
|
["refundedCreatorFee", getU64Decoder20()],
|
|
1886
|
-
["timestamp",
|
|
1826
|
+
["timestamp", getI64Decoder18()]
|
|
1887
1827
|
]);
|
|
1888
1828
|
}
|
|
1889
1829
|
function getStuckStakeClosedEventCodec() {
|
|
1890
|
-
return
|
|
1830
|
+
return combineCodec44(
|
|
1891
1831
|
getStuckStakeClosedEventEncoder(),
|
|
1892
1832
|
getStuckStakeClosedEventDecoder()
|
|
1893
1833
|
);
|
|
@@ -1895,88 +1835,88 @@ function getStuckStakeClosedEventCodec() {
|
|
|
1895
1835
|
|
|
1896
1836
|
// src/generated/types/timestamp.ts
|
|
1897
1837
|
import {
|
|
1898
|
-
combineCodec as
|
|
1899
|
-
getStructDecoder as
|
|
1900
|
-
getStructEncoder as
|
|
1838
|
+
combineCodec as combineCodec45,
|
|
1839
|
+
getStructDecoder as getStructDecoder39,
|
|
1840
|
+
getStructEncoder as getStructEncoder39,
|
|
1901
1841
|
getU64Decoder as getU64Decoder21,
|
|
1902
1842
|
getU64Encoder as getU64Encoder21
|
|
1903
1843
|
} from "@solana/kit";
|
|
1904
1844
|
function getTimestampEncoder() {
|
|
1905
|
-
return
|
|
1845
|
+
return getStructEncoder39([["timestamp", getU64Encoder21()]]);
|
|
1906
1846
|
}
|
|
1907
1847
|
function getTimestampDecoder() {
|
|
1908
|
-
return
|
|
1848
|
+
return getStructDecoder39([["timestamp", getU64Decoder21()]]);
|
|
1909
1849
|
}
|
|
1910
1850
|
function getTimestampCodec() {
|
|
1911
|
-
return
|
|
1851
|
+
return combineCodec45(getTimestampEncoder(), getTimestampDecoder());
|
|
1912
1852
|
}
|
|
1913
1853
|
|
|
1914
1854
|
// src/generated/types/unstakedEvent.ts
|
|
1915
1855
|
import {
|
|
1916
|
-
combineCodec as
|
|
1917
|
-
getAddressDecoder as
|
|
1918
|
-
getAddressEncoder as
|
|
1919
|
-
getI64Decoder as
|
|
1920
|
-
getI64Encoder as
|
|
1921
|
-
getStructDecoder as
|
|
1922
|
-
getStructEncoder as
|
|
1856
|
+
combineCodec as combineCodec46,
|
|
1857
|
+
getAddressDecoder as getAddressDecoder23,
|
|
1858
|
+
getAddressEncoder as getAddressEncoder23,
|
|
1859
|
+
getI64Decoder as getI64Decoder19,
|
|
1860
|
+
getI64Encoder as getI64Encoder19,
|
|
1861
|
+
getStructDecoder as getStructDecoder40,
|
|
1862
|
+
getStructEncoder as getStructEncoder40,
|
|
1923
1863
|
getU32Decoder as getU32Decoder12,
|
|
1924
1864
|
getU32Encoder as getU32Encoder12,
|
|
1925
1865
|
getU64Decoder as getU64Decoder22,
|
|
1926
1866
|
getU64Encoder as getU64Encoder22
|
|
1927
1867
|
} from "@solana/kit";
|
|
1928
1868
|
function getUnstakedEventEncoder() {
|
|
1929
|
-
return
|
|
1930
|
-
["owner",
|
|
1931
|
-
["market",
|
|
1932
|
-
["stakeAccount",
|
|
1869
|
+
return getStructEncoder40([
|
|
1870
|
+
["owner", getAddressEncoder23()],
|
|
1871
|
+
["market", getAddressEncoder23()],
|
|
1872
|
+
["stakeAccount", getAddressEncoder23()],
|
|
1933
1873
|
["stakeAccountId", getU32Encoder12()],
|
|
1934
1874
|
["amount", getU64Encoder22()],
|
|
1935
|
-
["timestamp",
|
|
1875
|
+
["timestamp", getI64Encoder19()]
|
|
1936
1876
|
]);
|
|
1937
1877
|
}
|
|
1938
1878
|
function getUnstakedEventDecoder() {
|
|
1939
|
-
return
|
|
1940
|
-
["owner",
|
|
1941
|
-
["market",
|
|
1942
|
-
["stakeAccount",
|
|
1879
|
+
return getStructDecoder40([
|
|
1880
|
+
["owner", getAddressDecoder23()],
|
|
1881
|
+
["market", getAddressDecoder23()],
|
|
1882
|
+
["stakeAccount", getAddressDecoder23()],
|
|
1943
1883
|
["stakeAccountId", getU32Decoder12()],
|
|
1944
1884
|
["amount", getU64Decoder22()],
|
|
1945
|
-
["timestamp",
|
|
1885
|
+
["timestamp", getI64Decoder19()]
|
|
1946
1886
|
]);
|
|
1947
1887
|
}
|
|
1948
1888
|
function getUnstakedEventCodec() {
|
|
1949
|
-
return
|
|
1889
|
+
return combineCodec46(getUnstakedEventEncoder(), getUnstakedEventDecoder());
|
|
1950
1890
|
}
|
|
1951
1891
|
|
|
1952
1892
|
// src/generated/types/updateAuthorityChangedEvent.ts
|
|
1953
1893
|
import {
|
|
1954
|
-
combineCodec as
|
|
1955
|
-
getAddressDecoder as
|
|
1956
|
-
getAddressEncoder as
|
|
1957
|
-
getI64Decoder as
|
|
1958
|
-
getI64Encoder as
|
|
1959
|
-
getStructDecoder as
|
|
1960
|
-
getStructEncoder as
|
|
1894
|
+
combineCodec as combineCodec47,
|
|
1895
|
+
getAddressDecoder as getAddressDecoder24,
|
|
1896
|
+
getAddressEncoder as getAddressEncoder24,
|
|
1897
|
+
getI64Decoder as getI64Decoder20,
|
|
1898
|
+
getI64Encoder as getI64Encoder20,
|
|
1899
|
+
getStructDecoder as getStructDecoder41,
|
|
1900
|
+
getStructEncoder as getStructEncoder41
|
|
1961
1901
|
} from "@solana/kit";
|
|
1962
1902
|
function getUpdateAuthorityChangedEventEncoder() {
|
|
1963
|
-
return
|
|
1964
|
-
["platformConfig",
|
|
1965
|
-
["oldValue",
|
|
1966
|
-
["newValue",
|
|
1967
|
-
["timestamp",
|
|
1903
|
+
return getStructEncoder41([
|
|
1904
|
+
["platformConfig", getAddressEncoder24()],
|
|
1905
|
+
["oldValue", getAddressEncoder24()],
|
|
1906
|
+
["newValue", getAddressEncoder24()],
|
|
1907
|
+
["timestamp", getI64Encoder20()]
|
|
1968
1908
|
]);
|
|
1969
1909
|
}
|
|
1970
1910
|
function getUpdateAuthorityChangedEventDecoder() {
|
|
1971
|
-
return
|
|
1972
|
-
["platformConfig",
|
|
1973
|
-
["oldValue",
|
|
1974
|
-
["newValue",
|
|
1975
|
-
["timestamp",
|
|
1911
|
+
return getStructDecoder41([
|
|
1912
|
+
["platformConfig", getAddressDecoder24()],
|
|
1913
|
+
["oldValue", getAddressDecoder24()],
|
|
1914
|
+
["newValue", getAddressDecoder24()],
|
|
1915
|
+
["timestamp", getI64Decoder20()]
|
|
1976
1916
|
]);
|
|
1977
1917
|
}
|
|
1978
1918
|
function getUpdateAuthorityChangedEventCodec() {
|
|
1979
|
-
return
|
|
1919
|
+
return combineCodec47(
|
|
1980
1920
|
getUpdateAuthorityChangedEventEncoder(),
|
|
1981
1921
|
getUpdateAuthorityChangedEventDecoder()
|
|
1982
1922
|
);
|
|
@@ -1984,16 +1924,16 @@ function getUpdateAuthorityChangedEventCodec() {
|
|
|
1984
1924
|
|
|
1985
1925
|
// src/generated/types/utilityPubkeys.ts
|
|
1986
1926
|
import {
|
|
1987
|
-
combineCodec as
|
|
1927
|
+
combineCodec as combineCodec48,
|
|
1988
1928
|
getArrayDecoder as getArrayDecoder11,
|
|
1989
1929
|
getArrayEncoder as getArrayEncoder11,
|
|
1990
|
-
getStructDecoder as
|
|
1991
|
-
getStructEncoder as
|
|
1930
|
+
getStructDecoder as getStructDecoder42,
|
|
1931
|
+
getStructEncoder as getStructEncoder42,
|
|
1992
1932
|
getU8Decoder as getU8Decoder15,
|
|
1993
1933
|
getU8Encoder as getU8Encoder15
|
|
1994
1934
|
} from "@solana/kit";
|
|
1995
1935
|
function getUtilityPubkeysEncoder() {
|
|
1996
|
-
return
|
|
1936
|
+
return getStructEncoder42([
|
|
1997
1937
|
["x25519Pubkey", getArrayEncoder11(getU8Encoder15(), { size: 32 })],
|
|
1998
1938
|
["ed25519VerifyingKey", getArrayEncoder11(getU8Encoder15(), { size: 32 })],
|
|
1999
1939
|
["elgamalPubkey", getArrayEncoder11(getU8Encoder15(), { size: 32 })],
|
|
@@ -2001,7 +1941,7 @@ function getUtilityPubkeysEncoder() {
|
|
|
2001
1941
|
]);
|
|
2002
1942
|
}
|
|
2003
1943
|
function getUtilityPubkeysDecoder() {
|
|
2004
|
-
return
|
|
1944
|
+
return getStructDecoder42([
|
|
2005
1945
|
["x25519Pubkey", getArrayDecoder11(getU8Decoder15(), { size: 32 })],
|
|
2006
1946
|
["ed25519VerifyingKey", getArrayDecoder11(getU8Decoder15(), { size: 32 })],
|
|
2007
1947
|
["elgamalPubkey", getArrayDecoder11(getU8Decoder15(), { size: 32 })],
|
|
@@ -2009,47 +1949,47 @@ function getUtilityPubkeysDecoder() {
|
|
|
2009
1949
|
]);
|
|
2010
1950
|
}
|
|
2011
1951
|
function getUtilityPubkeysCodec() {
|
|
2012
|
-
return
|
|
1952
|
+
return combineCodec48(getUtilityPubkeysEncoder(), getUtilityPubkeysDecoder());
|
|
2013
1953
|
}
|
|
2014
1954
|
|
|
2015
1955
|
// src/generated/types/winningOptionSetEvent.ts
|
|
2016
1956
|
import {
|
|
2017
|
-
combineCodec as
|
|
2018
|
-
getAddressDecoder as
|
|
2019
|
-
getAddressEncoder as
|
|
2020
|
-
getI64Decoder as
|
|
2021
|
-
getI64Encoder as
|
|
2022
|
-
getStructDecoder as
|
|
2023
|
-
getStructEncoder as
|
|
1957
|
+
combineCodec as combineCodec49,
|
|
1958
|
+
getAddressDecoder as getAddressDecoder25,
|
|
1959
|
+
getAddressEncoder as getAddressEncoder25,
|
|
1960
|
+
getI64Decoder as getI64Decoder21,
|
|
1961
|
+
getI64Encoder as getI64Encoder21,
|
|
1962
|
+
getStructDecoder as getStructDecoder43,
|
|
1963
|
+
getStructEncoder as getStructEncoder43,
|
|
2024
1964
|
getU16Decoder as getU16Decoder4,
|
|
2025
1965
|
getU16Encoder as getU16Encoder4,
|
|
2026
1966
|
getU64Decoder as getU64Decoder23,
|
|
2027
1967
|
getU64Encoder as getU64Encoder23
|
|
2028
1968
|
} from "@solana/kit";
|
|
2029
1969
|
function getWinningOptionSetEventEncoder() {
|
|
2030
|
-
return
|
|
2031
|
-
["market",
|
|
2032
|
-
["marketAuthority",
|
|
2033
|
-
["option",
|
|
1970
|
+
return getStructEncoder43([
|
|
1971
|
+
["market", getAddressEncoder25()],
|
|
1972
|
+
["marketAuthority", getAddressEncoder25()],
|
|
1973
|
+
["option", getAddressEncoder25()],
|
|
2034
1974
|
["optionId", getU64Encoder23()],
|
|
2035
1975
|
["rewardBp", getU16Encoder4()],
|
|
2036
1976
|
["winningOptionAllocation", getU16Encoder4()],
|
|
2037
|
-
["timestamp",
|
|
1977
|
+
["timestamp", getI64Encoder21()]
|
|
2038
1978
|
]);
|
|
2039
1979
|
}
|
|
2040
1980
|
function getWinningOptionSetEventDecoder() {
|
|
2041
|
-
return
|
|
2042
|
-
["market",
|
|
2043
|
-
["marketAuthority",
|
|
2044
|
-
["option",
|
|
1981
|
+
return getStructDecoder43([
|
|
1982
|
+
["market", getAddressDecoder25()],
|
|
1983
|
+
["marketAuthority", getAddressDecoder25()],
|
|
1984
|
+
["option", getAddressDecoder25()],
|
|
2045
1985
|
["optionId", getU64Decoder23()],
|
|
2046
1986
|
["rewardBp", getU16Decoder4()],
|
|
2047
1987
|
["winningOptionAllocation", getU16Decoder4()],
|
|
2048
|
-
["timestamp",
|
|
1988
|
+
["timestamp", getI64Decoder21()]
|
|
2049
1989
|
]);
|
|
2050
1990
|
}
|
|
2051
1991
|
function getWinningOptionSetEventCodec() {
|
|
2052
|
-
return
|
|
1992
|
+
return combineCodec49(
|
|
2053
1993
|
getWinningOptionSetEventEncoder(),
|
|
2054
1994
|
getWinningOptionSetEventDecoder()
|
|
2055
1995
|
);
|
|
@@ -2073,32 +2013,30 @@ function getOpportunityMarketDiscriminatorBytes() {
|
|
|
2073
2013
|
}
|
|
2074
2014
|
function getOpportunityMarketEncoder() {
|
|
2075
2015
|
return transformEncoder3(
|
|
2076
|
-
|
|
2016
|
+
getStructEncoder44([
|
|
2077
2017
|
["discriminator", fixEncoderSize3(getBytesEncoder3(), 8)],
|
|
2078
2018
|
["bump", getU8Encoder16()],
|
|
2079
|
-
["creator",
|
|
2019
|
+
["creator", getAddressEncoder26()],
|
|
2080
2020
|
["index", getU64Encoder24()],
|
|
2081
2021
|
["totalOptions", getU64Encoder24()],
|
|
2082
|
-
["platform",
|
|
2022
|
+
["platform", getAddressEncoder26()],
|
|
2083
2023
|
["stakeEndTimestamp", getOptionEncoder4(getU64Encoder24())],
|
|
2084
2024
|
["resolvedAtTimestamp", getOptionEncoder4(getU64Encoder24())],
|
|
2085
2025
|
["winningOptionAllocation", getU16Encoder5()],
|
|
2026
|
+
["winningOptionActiveBp", getU16Encoder5()],
|
|
2086
2027
|
["rewardAmount", getU64Encoder24()],
|
|
2087
|
-
["marketAuthority",
|
|
2088
|
-
["
|
|
2089
|
-
["mint", getAddressEncoder28()],
|
|
2028
|
+
["marketAuthority", getAddressEncoder26()],
|
|
2029
|
+
["mint", getAddressEncoder26()],
|
|
2090
2030
|
["earlinessCutoffSeconds", getU64Encoder24()],
|
|
2091
2031
|
["earlinessMultiplier", getU16Encoder5()],
|
|
2092
2032
|
["allowUnstakingEarly", getBooleanEncoder6()],
|
|
2093
2033
|
["authorizedReaderPubkey", getArrayEncoder12(getU8Encoder16(), { size: 32 })],
|
|
2094
|
-
["stakingPaused", getBooleanEncoder6()],
|
|
2095
2034
|
["feeRates", getFeeRatesEncoder()],
|
|
2096
2035
|
["collectedPlatformFees", getU64Encoder24()],
|
|
2097
2036
|
["collectedCreatorFees", getU64Encoder24()],
|
|
2098
|
-
["creatorFeeClaimer",
|
|
2037
|
+
["creatorFeeClaimer", getAddressEncoder26()],
|
|
2099
2038
|
["marketResolutionDeadlineSeconds", getU64Encoder24()],
|
|
2100
|
-
["
|
|
2101
|
-
["maxRevealPeriodSeconds", getU64Encoder24()],
|
|
2039
|
+
["revealPeriodSeconds", getU64Encoder24()],
|
|
2102
2040
|
["revealEnded", getBooleanEncoder6()],
|
|
2103
2041
|
["minStakeAmount", getU64Encoder24()]
|
|
2104
2042
|
]),
|
|
@@ -2106,38 +2044,36 @@ function getOpportunityMarketEncoder() {
|
|
|
2106
2044
|
);
|
|
2107
2045
|
}
|
|
2108
2046
|
function getOpportunityMarketDecoder() {
|
|
2109
|
-
return
|
|
2047
|
+
return getStructDecoder44([
|
|
2110
2048
|
["discriminator", fixDecoderSize3(getBytesDecoder3(), 8)],
|
|
2111
2049
|
["bump", getU8Decoder16()],
|
|
2112
|
-
["creator",
|
|
2050
|
+
["creator", getAddressDecoder26()],
|
|
2113
2051
|
["index", getU64Decoder24()],
|
|
2114
2052
|
["totalOptions", getU64Decoder24()],
|
|
2115
|
-
["platform",
|
|
2053
|
+
["platform", getAddressDecoder26()],
|
|
2116
2054
|
["stakeEndTimestamp", getOptionDecoder4(getU64Decoder24())],
|
|
2117
2055
|
["resolvedAtTimestamp", getOptionDecoder4(getU64Decoder24())],
|
|
2118
2056
|
["winningOptionAllocation", getU16Decoder5()],
|
|
2057
|
+
["winningOptionActiveBp", getU16Decoder5()],
|
|
2119
2058
|
["rewardAmount", getU64Decoder24()],
|
|
2120
|
-
["marketAuthority",
|
|
2121
|
-
["
|
|
2122
|
-
["mint", getAddressDecoder28()],
|
|
2059
|
+
["marketAuthority", getAddressDecoder26()],
|
|
2060
|
+
["mint", getAddressDecoder26()],
|
|
2123
2061
|
["earlinessCutoffSeconds", getU64Decoder24()],
|
|
2124
2062
|
["earlinessMultiplier", getU16Decoder5()],
|
|
2125
2063
|
["allowUnstakingEarly", getBooleanDecoder6()],
|
|
2126
2064
|
["authorizedReaderPubkey", getArrayDecoder12(getU8Decoder16(), { size: 32 })],
|
|
2127
|
-
["stakingPaused", getBooleanDecoder6()],
|
|
2128
2065
|
["feeRates", getFeeRatesDecoder()],
|
|
2129
2066
|
["collectedPlatformFees", getU64Decoder24()],
|
|
2130
2067
|
["collectedCreatorFees", getU64Decoder24()],
|
|
2131
|
-
["creatorFeeClaimer",
|
|
2068
|
+
["creatorFeeClaimer", getAddressDecoder26()],
|
|
2132
2069
|
["marketResolutionDeadlineSeconds", getU64Decoder24()],
|
|
2133
|
-
["
|
|
2134
|
-
["maxRevealPeriodSeconds", getU64Decoder24()],
|
|
2070
|
+
["revealPeriodSeconds", getU64Decoder24()],
|
|
2135
2071
|
["revealEnded", getBooleanDecoder6()],
|
|
2136
2072
|
["minStakeAmount", getU64Decoder24()]
|
|
2137
2073
|
]);
|
|
2138
2074
|
}
|
|
2139
2075
|
function getOpportunityMarketCodec() {
|
|
2140
|
-
return
|
|
2076
|
+
return combineCodec50(
|
|
2141
2077
|
getOpportunityMarketEncoder(),
|
|
2142
2078
|
getOpportunityMarketDecoder()
|
|
2143
2079
|
);
|
|
@@ -2177,20 +2113,20 @@ async function fetchAllMaybeOpportunityMarket(rpc, addresses, config) {
|
|
|
2177
2113
|
import {
|
|
2178
2114
|
assertAccountExists as assertAccountExists4,
|
|
2179
2115
|
assertAccountsExist as assertAccountsExist4,
|
|
2180
|
-
combineCodec as
|
|
2116
|
+
combineCodec as combineCodec51,
|
|
2181
2117
|
decodeAccount as decodeAccount4,
|
|
2182
2118
|
fetchEncodedAccount as fetchEncodedAccount4,
|
|
2183
2119
|
fetchEncodedAccounts as fetchEncodedAccounts4,
|
|
2184
2120
|
fixDecoderSize as fixDecoderSize4,
|
|
2185
2121
|
fixEncoderSize as fixEncoderSize4,
|
|
2186
|
-
getAddressDecoder as
|
|
2187
|
-
getAddressEncoder as
|
|
2122
|
+
getAddressDecoder as getAddressDecoder27,
|
|
2123
|
+
getAddressEncoder as getAddressEncoder27,
|
|
2124
|
+
getBooleanDecoder as getBooleanDecoder7,
|
|
2125
|
+
getBooleanEncoder as getBooleanEncoder7,
|
|
2188
2126
|
getBytesDecoder as getBytesDecoder4,
|
|
2189
2127
|
getBytesEncoder as getBytesEncoder4,
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
getStructDecoder as getStructDecoder47,
|
|
2193
|
-
getStructEncoder as getStructEncoder47,
|
|
2128
|
+
getStructDecoder as getStructDecoder45,
|
|
2129
|
+
getStructEncoder as getStructEncoder45,
|
|
2194
2130
|
getU128Decoder as getU128Decoder4,
|
|
2195
2131
|
getU128Encoder as getU128Encoder4,
|
|
2196
2132
|
getU16Decoder as getU16Decoder6,
|
|
@@ -2218,15 +2154,16 @@ function getOpportunityMarketOptionDiscriminatorBytes() {
|
|
|
2218
2154
|
}
|
|
2219
2155
|
function getOpportunityMarketOptionEncoder() {
|
|
2220
2156
|
return transformEncoder4(
|
|
2221
|
-
|
|
2157
|
+
getStructEncoder45([
|
|
2222
2158
|
["discriminator", fixEncoderSize4(getBytesEncoder4(), 8)],
|
|
2223
2159
|
["bump", getU8Encoder17()],
|
|
2224
2160
|
["id", getU64Encoder25()],
|
|
2225
|
-
["creator",
|
|
2161
|
+
["creator", getAddressEncoder27()],
|
|
2226
2162
|
["createdAt", getU64Encoder25()],
|
|
2227
2163
|
["totalStaked", getU64Encoder25()],
|
|
2228
2164
|
["totalScore", getU128Encoder4()],
|
|
2229
|
-
["rewardBp",
|
|
2165
|
+
["rewardBp", getU16Encoder6()],
|
|
2166
|
+
["includedInActiveBp", getBooleanEncoder7()]
|
|
2230
2167
|
]),
|
|
2231
2168
|
(value) => ({
|
|
2232
2169
|
...value,
|
|
@@ -2235,19 +2172,20 @@ function getOpportunityMarketOptionEncoder() {
|
|
|
2235
2172
|
);
|
|
2236
2173
|
}
|
|
2237
2174
|
function getOpportunityMarketOptionDecoder() {
|
|
2238
|
-
return
|
|
2175
|
+
return getStructDecoder45([
|
|
2239
2176
|
["discriminator", fixDecoderSize4(getBytesDecoder4(), 8)],
|
|
2240
2177
|
["bump", getU8Decoder17()],
|
|
2241
2178
|
["id", getU64Decoder25()],
|
|
2242
|
-
["creator",
|
|
2179
|
+
["creator", getAddressDecoder27()],
|
|
2243
2180
|
["createdAt", getU64Decoder25()],
|
|
2244
2181
|
["totalStaked", getU64Decoder25()],
|
|
2245
2182
|
["totalScore", getU128Decoder4()],
|
|
2246
|
-
["rewardBp",
|
|
2183
|
+
["rewardBp", getU16Decoder6()],
|
|
2184
|
+
["includedInActiveBp", getBooleanDecoder7()]
|
|
2247
2185
|
]);
|
|
2248
2186
|
}
|
|
2249
2187
|
function getOpportunityMarketOptionCodec() {
|
|
2250
|
-
return
|
|
2188
|
+
return combineCodec51(
|
|
2251
2189
|
getOpportunityMarketOptionEncoder(),
|
|
2252
2190
|
getOpportunityMarketOptionDecoder()
|
|
2253
2191
|
);
|
|
@@ -2291,20 +2229,20 @@ async function fetchAllMaybeOpportunityMarketOption(rpc, addresses, config) {
|
|
|
2291
2229
|
import {
|
|
2292
2230
|
assertAccountExists as assertAccountExists5,
|
|
2293
2231
|
assertAccountsExist as assertAccountsExist5,
|
|
2294
|
-
combineCodec as
|
|
2232
|
+
combineCodec as combineCodec52,
|
|
2295
2233
|
decodeAccount as decodeAccount5,
|
|
2296
2234
|
fetchEncodedAccount as fetchEncodedAccount5,
|
|
2297
2235
|
fetchEncodedAccounts as fetchEncodedAccounts5,
|
|
2298
2236
|
fixDecoderSize as fixDecoderSize5,
|
|
2299
2237
|
fixEncoderSize as fixEncoderSize5,
|
|
2300
|
-
getAddressDecoder as
|
|
2301
|
-
getAddressEncoder as
|
|
2302
|
-
getBooleanDecoder as
|
|
2303
|
-
getBooleanEncoder as
|
|
2238
|
+
getAddressDecoder as getAddressDecoder28,
|
|
2239
|
+
getAddressEncoder as getAddressEncoder28,
|
|
2240
|
+
getBooleanDecoder as getBooleanDecoder8,
|
|
2241
|
+
getBooleanEncoder as getBooleanEncoder8,
|
|
2304
2242
|
getBytesDecoder as getBytesDecoder5,
|
|
2305
2243
|
getBytesEncoder as getBytesEncoder5,
|
|
2306
|
-
getStructDecoder as
|
|
2307
|
-
getStructEncoder as
|
|
2244
|
+
getStructDecoder as getStructDecoder46,
|
|
2245
|
+
getStructEncoder as getStructEncoder46,
|
|
2308
2246
|
getU64Decoder as getU64Decoder26,
|
|
2309
2247
|
getU64Encoder as getU64Encoder26,
|
|
2310
2248
|
getU8Decoder as getU8Decoder18,
|
|
@@ -2328,13 +2266,13 @@ function getOpportunityMarketSponsorDiscriminatorBytes() {
|
|
|
2328
2266
|
}
|
|
2329
2267
|
function getOpportunityMarketSponsorEncoder() {
|
|
2330
2268
|
return transformEncoder5(
|
|
2331
|
-
|
|
2269
|
+
getStructEncoder46([
|
|
2332
2270
|
["discriminator", fixEncoderSize5(getBytesEncoder5(), 8)],
|
|
2333
2271
|
["bump", getU8Encoder18()],
|
|
2334
|
-
["sponsor",
|
|
2335
|
-
["market",
|
|
2272
|
+
["sponsor", getAddressEncoder28()],
|
|
2273
|
+
["market", getAddressEncoder28()],
|
|
2336
2274
|
["rewardDeposited", getU64Encoder26()],
|
|
2337
|
-
["rewardLocked",
|
|
2275
|
+
["rewardLocked", getBooleanEncoder8()]
|
|
2338
2276
|
]),
|
|
2339
2277
|
(value) => ({
|
|
2340
2278
|
...value,
|
|
@@ -2343,17 +2281,17 @@ function getOpportunityMarketSponsorEncoder() {
|
|
|
2343
2281
|
);
|
|
2344
2282
|
}
|
|
2345
2283
|
function getOpportunityMarketSponsorDecoder() {
|
|
2346
|
-
return
|
|
2284
|
+
return getStructDecoder46([
|
|
2347
2285
|
["discriminator", fixDecoderSize5(getBytesDecoder5(), 8)],
|
|
2348
2286
|
["bump", getU8Decoder18()],
|
|
2349
|
-
["sponsor",
|
|
2350
|
-
["market",
|
|
2287
|
+
["sponsor", getAddressDecoder28()],
|
|
2288
|
+
["market", getAddressDecoder28()],
|
|
2351
2289
|
["rewardDeposited", getU64Decoder26()],
|
|
2352
|
-
["rewardLocked",
|
|
2290
|
+
["rewardLocked", getBooleanDecoder8()]
|
|
2353
2291
|
]);
|
|
2354
2292
|
}
|
|
2355
2293
|
function getOpportunityMarketSponsorCodec() {
|
|
2356
|
-
return
|
|
2294
|
+
return combineCodec52(
|
|
2357
2295
|
getOpportunityMarketSponsorEncoder(),
|
|
2358
2296
|
getOpportunityMarketSponsorDecoder()
|
|
2359
2297
|
);
|
|
@@ -2399,18 +2337,18 @@ import {
|
|
|
2399
2337
|
addEncoderSizePrefix as addEncoderSizePrefix2,
|
|
2400
2338
|
assertAccountExists as assertAccountExists6,
|
|
2401
2339
|
assertAccountsExist as assertAccountsExist6,
|
|
2402
|
-
combineCodec as
|
|
2340
|
+
combineCodec as combineCodec53,
|
|
2403
2341
|
decodeAccount as decodeAccount6,
|
|
2404
2342
|
fetchEncodedAccount as fetchEncodedAccount6,
|
|
2405
2343
|
fetchEncodedAccounts as fetchEncodedAccounts6,
|
|
2406
2344
|
fixDecoderSize as fixDecoderSize6,
|
|
2407
2345
|
fixEncoderSize as fixEncoderSize6,
|
|
2408
|
-
getAddressDecoder as
|
|
2409
|
-
getAddressEncoder as
|
|
2346
|
+
getAddressDecoder as getAddressDecoder29,
|
|
2347
|
+
getAddressEncoder as getAddressEncoder29,
|
|
2410
2348
|
getBytesDecoder as getBytesDecoder6,
|
|
2411
2349
|
getBytesEncoder as getBytesEncoder6,
|
|
2412
|
-
getStructDecoder as
|
|
2413
|
-
getStructEncoder as
|
|
2350
|
+
getStructDecoder as getStructDecoder47,
|
|
2351
|
+
getStructEncoder as getStructEncoder47,
|
|
2414
2352
|
getU32Decoder as getU32Decoder13,
|
|
2415
2353
|
getU32Encoder as getU32Encoder13,
|
|
2416
2354
|
getU64Decoder as getU64Decoder27,
|
|
@@ -2438,37 +2376,37 @@ function getPlatformConfigDiscriminatorBytes() {
|
|
|
2438
2376
|
}
|
|
2439
2377
|
function getPlatformConfigEncoder() {
|
|
2440
2378
|
return transformEncoder6(
|
|
2441
|
-
|
|
2379
|
+
getStructEncoder47([
|
|
2442
2380
|
["discriminator", fixEncoderSize6(getBytesEncoder6(), 8)],
|
|
2443
2381
|
["bump", getU8Encoder19()],
|
|
2444
2382
|
["name", addEncoderSizePrefix2(getUtf8Encoder2(), getU32Encoder13())],
|
|
2445
|
-
["updateAuthority",
|
|
2446
|
-
["feeClaimAuthority",
|
|
2383
|
+
["updateAuthority", getAddressEncoder29()],
|
|
2384
|
+
["feeClaimAuthority", getAddressEncoder29()],
|
|
2447
2385
|
["feeRates", getFeeRatesEncoder()],
|
|
2448
2386
|
["marketResolutionDeadlineSeconds", getU64Encoder27()],
|
|
2449
2387
|
["minTimeToStakeSeconds", getU64Encoder27()],
|
|
2450
|
-
["
|
|
2451
|
-
["
|
|
2388
|
+
["revealAuthority", getAddressEncoder29()],
|
|
2389
|
+
["revealPeriodSeconds", getU64Encoder27()]
|
|
2452
2390
|
]),
|
|
2453
2391
|
(value) => ({ ...value, discriminator: PLATFORM_CONFIG_DISCRIMINATOR })
|
|
2454
2392
|
);
|
|
2455
2393
|
}
|
|
2456
2394
|
function getPlatformConfigDecoder() {
|
|
2457
|
-
return
|
|
2395
|
+
return getStructDecoder47([
|
|
2458
2396
|
["discriminator", fixDecoderSize6(getBytesDecoder6(), 8)],
|
|
2459
2397
|
["bump", getU8Decoder19()],
|
|
2460
2398
|
["name", addDecoderSizePrefix2(getUtf8Decoder2(), getU32Decoder13())],
|
|
2461
|
-
["updateAuthority",
|
|
2462
|
-
["feeClaimAuthority",
|
|
2399
|
+
["updateAuthority", getAddressDecoder29()],
|
|
2400
|
+
["feeClaimAuthority", getAddressDecoder29()],
|
|
2463
2401
|
["feeRates", getFeeRatesDecoder()],
|
|
2464
2402
|
["marketResolutionDeadlineSeconds", getU64Decoder27()],
|
|
2465
2403
|
["minTimeToStakeSeconds", getU64Decoder27()],
|
|
2466
|
-
["
|
|
2467
|
-
["
|
|
2404
|
+
["revealAuthority", getAddressDecoder29()],
|
|
2405
|
+
["revealPeriodSeconds", getU64Decoder27()]
|
|
2468
2406
|
]);
|
|
2469
2407
|
}
|
|
2470
2408
|
function getPlatformConfigCodec() {
|
|
2471
|
-
return
|
|
2409
|
+
return combineCodec53(getPlatformConfigEncoder(), getPlatformConfigDecoder());
|
|
2472
2410
|
}
|
|
2473
2411
|
function decodePlatformConfig(encodedAccount) {
|
|
2474
2412
|
return decodeAccount6(
|
|
@@ -2505,24 +2443,24 @@ async function fetchAllMaybePlatformConfig(rpc, addresses, config) {
|
|
|
2505
2443
|
import {
|
|
2506
2444
|
assertAccountExists as assertAccountExists7,
|
|
2507
2445
|
assertAccountsExist as assertAccountsExist7,
|
|
2508
|
-
combineCodec as
|
|
2446
|
+
combineCodec as combineCodec54,
|
|
2509
2447
|
decodeAccount as decodeAccount7,
|
|
2510
2448
|
fetchEncodedAccount as fetchEncodedAccount7,
|
|
2511
2449
|
fetchEncodedAccounts as fetchEncodedAccounts7,
|
|
2512
2450
|
fixDecoderSize as fixDecoderSize7,
|
|
2513
2451
|
fixEncoderSize as fixEncoderSize7,
|
|
2514
|
-
getAddressDecoder as
|
|
2515
|
-
getAddressEncoder as
|
|
2452
|
+
getAddressDecoder as getAddressDecoder30,
|
|
2453
|
+
getAddressEncoder as getAddressEncoder30,
|
|
2516
2454
|
getArrayDecoder as getArrayDecoder13,
|
|
2517
2455
|
getArrayEncoder as getArrayEncoder13,
|
|
2518
|
-
getBooleanDecoder as
|
|
2519
|
-
getBooleanEncoder as
|
|
2456
|
+
getBooleanDecoder as getBooleanDecoder9,
|
|
2457
|
+
getBooleanEncoder as getBooleanEncoder9,
|
|
2520
2458
|
getBytesDecoder as getBytesDecoder7,
|
|
2521
2459
|
getBytesEncoder as getBytesEncoder7,
|
|
2522
|
-
getOptionDecoder as
|
|
2523
|
-
getOptionEncoder as
|
|
2524
|
-
getStructDecoder as
|
|
2525
|
-
getStructEncoder as
|
|
2460
|
+
getOptionDecoder as getOptionDecoder5,
|
|
2461
|
+
getOptionEncoder as getOptionEncoder5,
|
|
2462
|
+
getStructDecoder as getStructDecoder48,
|
|
2463
|
+
getStructEncoder as getStructEncoder48,
|
|
2526
2464
|
getU128Decoder as getU128Decoder5,
|
|
2527
2465
|
getU128Encoder as getU128Encoder5,
|
|
2528
2466
|
getU32Decoder as getU32Decoder14,
|
|
@@ -2550,61 +2488,61 @@ function getStakeAccountDiscriminatorBytes() {
|
|
|
2550
2488
|
}
|
|
2551
2489
|
function getStakeAccountEncoder() {
|
|
2552
2490
|
return transformEncoder7(
|
|
2553
|
-
|
|
2491
|
+
getStructEncoder48([
|
|
2554
2492
|
["discriminator", fixEncoderSize7(getBytesEncoder7(), 8)],
|
|
2555
2493
|
["encryptedOption", getArrayEncoder13(getU8Encoder20(), { size: 32 })],
|
|
2556
2494
|
["stateNonce", getU128Encoder5()],
|
|
2557
2495
|
["bump", getU8Encoder20()],
|
|
2558
|
-
["owner",
|
|
2559
|
-
["market",
|
|
2496
|
+
["owner", getAddressEncoder30()],
|
|
2497
|
+
["market", getAddressEncoder30()],
|
|
2560
2498
|
["userPubkey", getArrayEncoder13(getU8Encoder20(), { size: 32 })],
|
|
2561
2499
|
[
|
|
2562
2500
|
"encryptedOptionDisclosure",
|
|
2563
2501
|
getArrayEncoder13(getU8Encoder20(), { size: 32 })
|
|
2564
2502
|
],
|
|
2565
2503
|
["stateNonceDisclosure", getU128Encoder5()],
|
|
2566
|
-
["stakedAtTimestamp",
|
|
2567
|
-
["unstakedAtTimestamp",
|
|
2504
|
+
["stakedAtTimestamp", getOptionEncoder5(getU64Encoder28())],
|
|
2505
|
+
["unstakedAtTimestamp", getOptionEncoder5(getU64Encoder28())],
|
|
2568
2506
|
["amount", getU64Encoder28()],
|
|
2569
2507
|
["collectedFees", getCollectedFeesEncoder()],
|
|
2570
|
-
["revealedOption",
|
|
2571
|
-
["score",
|
|
2572
|
-
["unstaked",
|
|
2508
|
+
["revealedOption", getOptionEncoder5(getU64Encoder28())],
|
|
2509
|
+
["score", getOptionEncoder5(getU64Encoder28())],
|
|
2510
|
+
["unstaked", getBooleanEncoder9()],
|
|
2573
2511
|
["id", getU32Encoder14()],
|
|
2574
|
-
["pendingStakeComputation",
|
|
2575
|
-
["pendingReveal",
|
|
2512
|
+
["pendingStakeComputation", getOptionEncoder5(getAddressEncoder30())],
|
|
2513
|
+
["pendingReveal", getBooleanEncoder9()]
|
|
2576
2514
|
]),
|
|
2577
2515
|
(value) => ({ ...value, discriminator: STAKE_ACCOUNT_DISCRIMINATOR })
|
|
2578
2516
|
);
|
|
2579
2517
|
}
|
|
2580
2518
|
function getStakeAccountDecoder() {
|
|
2581
|
-
return
|
|
2519
|
+
return getStructDecoder48([
|
|
2582
2520
|
["discriminator", fixDecoderSize7(getBytesDecoder7(), 8)],
|
|
2583
2521
|
["encryptedOption", getArrayDecoder13(getU8Decoder20(), { size: 32 })],
|
|
2584
2522
|
["stateNonce", getU128Decoder5()],
|
|
2585
2523
|
["bump", getU8Decoder20()],
|
|
2586
|
-
["owner",
|
|
2587
|
-
["market",
|
|
2524
|
+
["owner", getAddressDecoder30()],
|
|
2525
|
+
["market", getAddressDecoder30()],
|
|
2588
2526
|
["userPubkey", getArrayDecoder13(getU8Decoder20(), { size: 32 })],
|
|
2589
2527
|
[
|
|
2590
2528
|
"encryptedOptionDisclosure",
|
|
2591
2529
|
getArrayDecoder13(getU8Decoder20(), { size: 32 })
|
|
2592
2530
|
],
|
|
2593
2531
|
["stateNonceDisclosure", getU128Decoder5()],
|
|
2594
|
-
["stakedAtTimestamp",
|
|
2595
|
-
["unstakedAtTimestamp",
|
|
2532
|
+
["stakedAtTimestamp", getOptionDecoder5(getU64Decoder28())],
|
|
2533
|
+
["unstakedAtTimestamp", getOptionDecoder5(getU64Decoder28())],
|
|
2596
2534
|
["amount", getU64Decoder28()],
|
|
2597
2535
|
["collectedFees", getCollectedFeesDecoder()],
|
|
2598
|
-
["revealedOption",
|
|
2599
|
-
["score",
|
|
2600
|
-
["unstaked",
|
|
2536
|
+
["revealedOption", getOptionDecoder5(getU64Decoder28())],
|
|
2537
|
+
["score", getOptionDecoder5(getU64Decoder28())],
|
|
2538
|
+
["unstaked", getBooleanDecoder9()],
|
|
2601
2539
|
["id", getU32Decoder14()],
|
|
2602
|
-
["pendingStakeComputation",
|
|
2603
|
-
["pendingReveal",
|
|
2540
|
+
["pendingStakeComputation", getOptionDecoder5(getAddressDecoder30())],
|
|
2541
|
+
["pendingReveal", getBooleanDecoder9()]
|
|
2604
2542
|
]);
|
|
2605
2543
|
}
|
|
2606
2544
|
function getStakeAccountCodec() {
|
|
2607
|
-
return
|
|
2545
|
+
return combineCodec54(getStakeAccountEncoder(), getStakeAccountDecoder());
|
|
2608
2546
|
}
|
|
2609
2547
|
function decodeStakeAccount(encodedAccount) {
|
|
2610
2548
|
return decodeAccount7(
|
|
@@ -2737,21 +2675,19 @@ var OpportunityMarketInstruction = /* @__PURE__ */ ((OpportunityMarketInstructio
|
|
|
2737
2675
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["InitPlatformConfig"] = 11] = "InitPlatformConfig";
|
|
2738
2676
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["InitStakeAccount"] = 12] = "InitStakeAccount";
|
|
2739
2677
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["OpenMarket"] = 13] = "OpenMarket";
|
|
2740
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2741
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2742
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2743
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2744
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2745
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2746
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2747
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2748
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2749
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2750
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2751
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2752
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2753
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["UpdatePlatformConfig"] = 27] = "UpdatePlatformConfig";
|
|
2754
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["WithdrawReward"] = 28] = "WithdrawReward";
|
|
2678
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["ResolveMarket"] = 14] = "ResolveMarket";
|
|
2679
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["RevealStake"] = 15] = "RevealStake";
|
|
2680
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["RevealStakeCallback"] = 16] = "RevealStakeCallback";
|
|
2681
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["RevealStakeCompDef"] = 17] = "RevealStakeCompDef";
|
|
2682
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["SetFeeClaimAuthority"] = 18] = "SetFeeClaimAuthority";
|
|
2683
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["SetUpdateAuthority"] = 19] = "SetUpdateAuthority";
|
|
2684
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["SetWinningOption"] = 20] = "SetWinningOption";
|
|
2685
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["Stake"] = 21] = "Stake";
|
|
2686
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["StakeCallback"] = 22] = "StakeCallback";
|
|
2687
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["StakeCompDef"] = 23] = "StakeCompDef";
|
|
2688
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["Unstake"] = 24] = "Unstake";
|
|
2689
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["UpdatePlatformConfig"] = 25] = "UpdatePlatformConfig";
|
|
2690
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["WithdrawReward"] = 26] = "WithdrawReward";
|
|
2755
2691
|
return OpportunityMarketInstruction2;
|
|
2756
2692
|
})(OpportunityMarketInstruction || {});
|
|
2757
2693
|
function identifyOpportunityMarketInstruction(instruction) {
|
|
@@ -2882,15 +2818,6 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2882
2818
|
)) {
|
|
2883
2819
|
return 13 /* OpenMarket */;
|
|
2884
2820
|
}
|
|
2885
|
-
if (containsBytes(
|
|
2886
|
-
data,
|
|
2887
|
-
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2888
|
-
new Uint8Array([245, 191, 35, 58, 88, 250, 229, 60])
|
|
2889
|
-
),
|
|
2890
|
-
0
|
|
2891
|
-
)) {
|
|
2892
|
-
return 14 /* PauseStaking */;
|
|
2893
|
-
}
|
|
2894
2821
|
if (containsBytes(
|
|
2895
2822
|
data,
|
|
2896
2823
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
@@ -2898,16 +2825,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2898
2825
|
),
|
|
2899
2826
|
0
|
|
2900
2827
|
)) {
|
|
2901
|
-
return
|
|
2902
|
-
}
|
|
2903
|
-
if (containsBytes(
|
|
2904
|
-
data,
|
|
2905
|
-
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2906
|
-
new Uint8Array([31, 200, 175, 23, 211, 22, 63, 155])
|
|
2907
|
-
),
|
|
2908
|
-
0
|
|
2909
|
-
)) {
|
|
2910
|
-
return 16 /* ResumeStaking */;
|
|
2828
|
+
return 14 /* ResolveMarket */;
|
|
2911
2829
|
}
|
|
2912
2830
|
if (containsBytes(
|
|
2913
2831
|
data,
|
|
@@ -2916,7 +2834,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2916
2834
|
),
|
|
2917
2835
|
0
|
|
2918
2836
|
)) {
|
|
2919
|
-
return
|
|
2837
|
+
return 15 /* RevealStake */;
|
|
2920
2838
|
}
|
|
2921
2839
|
if (containsBytes(
|
|
2922
2840
|
data,
|
|
@@ -2925,7 +2843,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2925
2843
|
),
|
|
2926
2844
|
0
|
|
2927
2845
|
)) {
|
|
2928
|
-
return
|
|
2846
|
+
return 16 /* RevealStakeCallback */;
|
|
2929
2847
|
}
|
|
2930
2848
|
if (containsBytes(
|
|
2931
2849
|
data,
|
|
@@ -2934,7 +2852,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2934
2852
|
),
|
|
2935
2853
|
0
|
|
2936
2854
|
)) {
|
|
2937
|
-
return
|
|
2855
|
+
return 17 /* RevealStakeCompDef */;
|
|
2938
2856
|
}
|
|
2939
2857
|
if (containsBytes(
|
|
2940
2858
|
data,
|
|
@@ -2943,7 +2861,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2943
2861
|
),
|
|
2944
2862
|
0
|
|
2945
2863
|
)) {
|
|
2946
|
-
return
|
|
2864
|
+
return 18 /* SetFeeClaimAuthority */;
|
|
2947
2865
|
}
|
|
2948
2866
|
if (containsBytes(
|
|
2949
2867
|
data,
|
|
@@ -2952,7 +2870,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2952
2870
|
),
|
|
2953
2871
|
0
|
|
2954
2872
|
)) {
|
|
2955
|
-
return
|
|
2873
|
+
return 19 /* SetUpdateAuthority */;
|
|
2956
2874
|
}
|
|
2957
2875
|
if (containsBytes(
|
|
2958
2876
|
data,
|
|
@@ -2961,7 +2879,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2961
2879
|
),
|
|
2962
2880
|
0
|
|
2963
2881
|
)) {
|
|
2964
|
-
return
|
|
2882
|
+
return 20 /* SetWinningOption */;
|
|
2965
2883
|
}
|
|
2966
2884
|
if (containsBytes(
|
|
2967
2885
|
data,
|
|
@@ -2970,7 +2888,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2970
2888
|
),
|
|
2971
2889
|
0
|
|
2972
2890
|
)) {
|
|
2973
|
-
return
|
|
2891
|
+
return 21 /* Stake */;
|
|
2974
2892
|
}
|
|
2975
2893
|
if (containsBytes(
|
|
2976
2894
|
data,
|
|
@@ -2979,7 +2897,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2979
2897
|
),
|
|
2980
2898
|
0
|
|
2981
2899
|
)) {
|
|
2982
|
-
return
|
|
2900
|
+
return 22 /* StakeCallback */;
|
|
2983
2901
|
}
|
|
2984
2902
|
if (containsBytes(
|
|
2985
2903
|
data,
|
|
@@ -2988,7 +2906,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2988
2906
|
),
|
|
2989
2907
|
0
|
|
2990
2908
|
)) {
|
|
2991
|
-
return
|
|
2909
|
+
return 23 /* StakeCompDef */;
|
|
2992
2910
|
}
|
|
2993
2911
|
if (containsBytes(
|
|
2994
2912
|
data,
|
|
@@ -2997,7 +2915,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2997
2915
|
),
|
|
2998
2916
|
0
|
|
2999
2917
|
)) {
|
|
3000
|
-
return
|
|
2918
|
+
return 24 /* Unstake */;
|
|
3001
2919
|
}
|
|
3002
2920
|
if (containsBytes(
|
|
3003
2921
|
data,
|
|
@@ -3006,7 +2924,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
3006
2924
|
),
|
|
3007
2925
|
0
|
|
3008
2926
|
)) {
|
|
3009
|
-
return
|
|
2927
|
+
return 25 /* UpdatePlatformConfig */;
|
|
3010
2928
|
}
|
|
3011
2929
|
if (containsBytes(
|
|
3012
2930
|
data,
|
|
@@ -3015,7 +2933,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
3015
2933
|
),
|
|
3016
2934
|
0
|
|
3017
2935
|
)) {
|
|
3018
|
-
return
|
|
2936
|
+
return 26 /* WithdrawReward */;
|
|
3019
2937
|
}
|
|
3020
2938
|
throw new Error(
|
|
3021
2939
|
"The provided instruction could not be identified as a opportunityMarket instruction."
|
|
@@ -3049,16 +2967,15 @@ var OPPORTUNITY_MARKET_ERROR__LOCKED = 6022;
|
|
|
3049
2967
|
var OPPORTUNITY_MARKET_ERROR__INVALID_ACCOUNT_STATE = 6023;
|
|
3050
2968
|
var OPPORTUNITY_MARKET_ERROR__NO_FEES_TO_CLAIM = 6024;
|
|
3051
2969
|
var OPPORTUNITY_MARKET_ERROR__STAKE_NOT_STUCK = 6025;
|
|
3052
|
-
var
|
|
3053
|
-
var
|
|
3054
|
-
var
|
|
3055
|
-
var
|
|
3056
|
-
var
|
|
3057
|
-
var
|
|
3058
|
-
var
|
|
3059
|
-
var
|
|
3060
|
-
var
|
|
3061
|
-
var OPPORTUNITY_MARKET_ERROR__REWARD_ALREADY_CLAIMED = 6035;
|
|
2970
|
+
var OPPORTUNITY_MARKET_ERROR__STAKE_BELOW_MINIMUM = 6026;
|
|
2971
|
+
var OPPORTUNITY_MARKET_ERROR__SELECT_OPTIONS_DEADLINE_PASSED = 6027;
|
|
2972
|
+
var OPPORTUNITY_MARKET_ERROR__INVALID_FEE_RATES = 6028;
|
|
2973
|
+
var OPPORTUNITY_MARKET_ERROR__OPTION_STILL_NEEDED = 6029;
|
|
2974
|
+
var OPPORTUNITY_MARKET_ERROR__CREATOR_MISMATCH = 6030;
|
|
2975
|
+
var OPPORTUNITY_MARKET_ERROR__REVEAL_PERIOD_NOT_OVER = 6031;
|
|
2976
|
+
var OPPORTUNITY_MARKET_ERROR__NO_FINALIZED_WINNING_OPTION = 6032;
|
|
2977
|
+
var OPPORTUNITY_MARKET_ERROR__NO_REWARD_TO_CLAIM = 6033;
|
|
2978
|
+
var OPPORTUNITY_MARKET_ERROR__REWARD_ALREADY_CLAIMED = 6034;
|
|
3062
2979
|
var opportunityMarketErrorMessages;
|
|
3063
2980
|
if (true) {
|
|
3064
2981
|
opportunityMarketErrorMessages = {
|
|
@@ -3079,10 +2996,9 @@ if (true) {
|
|
|
3079
2996
|
[OPPORTUNITY_MARKET_ERROR__LOCKED]: `Account is locked`,
|
|
3080
2997
|
[OPPORTUNITY_MARKET_ERROR__MARKET_ALREADY_OPEN]: `Market is already open`,
|
|
3081
2998
|
[OPPORTUNITY_MARKET_ERROR__MARKET_NOT_OPEN]: `Market is not open`,
|
|
3082
|
-
[OPPORTUNITY_MARKET_ERROR__MARKET_NOT_PAUSED]: `Market is not paused`,
|
|
3083
2999
|
[OPPORTUNITY_MARKET_ERROR__MARKET_NOT_RESOLVED]: `Market not yet resolved`,
|
|
3084
|
-
[OPPORTUNITY_MARKET_ERROR__MARKET_PAUSED]: `Market staking is currently paused`,
|
|
3085
3000
|
[OPPORTUNITY_MARKET_ERROR__NO_FEES_TO_CLAIM]: `No fees to claim`,
|
|
3001
|
+
[OPPORTUNITY_MARKET_ERROR__NO_FINALIZED_WINNING_OPTION]: `No winning option has a finalized stake`,
|
|
3086
3002
|
[OPPORTUNITY_MARKET_ERROR__NO_REWARD_TO_CLAIM]: `No reward to claim`,
|
|
3087
3003
|
[OPPORTUNITY_MARKET_ERROR__NO_STAKE]: `Stake account has no recorded stake`,
|
|
3088
3004
|
[OPPORTUNITY_MARKET_ERROR__NOT_REVEALED]: `Stake not yet revealed`,
|
|
@@ -3117,15 +3033,15 @@ function isOpportunityMarketError(error, transactionMessage, code) {
|
|
|
3117
3033
|
|
|
3118
3034
|
// src/generated/instructions/addMarketOption.ts
|
|
3119
3035
|
import {
|
|
3120
|
-
combineCodec as
|
|
3036
|
+
combineCodec as combineCodec55,
|
|
3121
3037
|
fixDecoderSize as fixDecoderSize8,
|
|
3122
3038
|
fixEncoderSize as fixEncoderSize9,
|
|
3123
|
-
getAddressEncoder as
|
|
3039
|
+
getAddressEncoder as getAddressEncoder31,
|
|
3124
3040
|
getBytesDecoder as getBytesDecoder8,
|
|
3125
3041
|
getBytesEncoder as getBytesEncoder9,
|
|
3126
3042
|
getProgramDerivedAddress,
|
|
3127
|
-
getStructDecoder as
|
|
3128
|
-
getStructEncoder as
|
|
3043
|
+
getStructDecoder as getStructDecoder49,
|
|
3044
|
+
getStructEncoder as getStructEncoder49,
|
|
3129
3045
|
getU64Decoder as getU64Decoder29,
|
|
3130
3046
|
getU64Encoder as getU64Encoder29,
|
|
3131
3047
|
transformEncoder as transformEncoder8
|
|
@@ -3195,7 +3111,7 @@ function getAddMarketOptionDiscriminatorBytes() {
|
|
|
3195
3111
|
}
|
|
3196
3112
|
function getAddMarketOptionInstructionDataEncoder() {
|
|
3197
3113
|
return transformEncoder8(
|
|
3198
|
-
|
|
3114
|
+
getStructEncoder49([
|
|
3199
3115
|
["discriminator", fixEncoderSize9(getBytesEncoder9(), 8)],
|
|
3200
3116
|
["optionId", getU64Encoder29()]
|
|
3201
3117
|
]),
|
|
@@ -3203,13 +3119,13 @@ function getAddMarketOptionInstructionDataEncoder() {
|
|
|
3203
3119
|
);
|
|
3204
3120
|
}
|
|
3205
3121
|
function getAddMarketOptionInstructionDataDecoder() {
|
|
3206
|
-
return
|
|
3122
|
+
return getStructDecoder49([
|
|
3207
3123
|
["discriminator", fixDecoderSize8(getBytesDecoder8(), 8)],
|
|
3208
3124
|
["optionId", getU64Decoder29()]
|
|
3209
3125
|
]);
|
|
3210
3126
|
}
|
|
3211
3127
|
function getAddMarketOptionInstructionDataCodec() {
|
|
3212
|
-
return
|
|
3128
|
+
return combineCodec55(
|
|
3213
3129
|
getAddMarketOptionInstructionDataEncoder(),
|
|
3214
3130
|
getAddMarketOptionInstructionDataDecoder()
|
|
3215
3131
|
);
|
|
@@ -3231,7 +3147,7 @@ async function getAddMarketOptionInstructionAsync(input, config) {
|
|
|
3231
3147
|
getBytesEncoder9().encode(
|
|
3232
3148
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
3233
3149
|
),
|
|
3234
|
-
|
|
3150
|
+
getAddressEncoder31().encode(expectAddress(accounts.market.value)),
|
|
3235
3151
|
getU64Encoder29().encode(expectSome(args.optionId))
|
|
3236
3152
|
]
|
|
3237
3153
|
});
|
|
@@ -3304,18 +3220,18 @@ function parseAddMarketOptionInstruction(instruction) {
|
|
|
3304
3220
|
|
|
3305
3221
|
// src/generated/instructions/addReward.ts
|
|
3306
3222
|
import {
|
|
3307
|
-
combineCodec as
|
|
3223
|
+
combineCodec as combineCodec56,
|
|
3308
3224
|
fixDecoderSize as fixDecoderSize9,
|
|
3309
3225
|
fixEncoderSize as fixEncoderSize10,
|
|
3310
|
-
getAddressEncoder as
|
|
3311
|
-
getBooleanDecoder as
|
|
3312
|
-
getBooleanEncoder as
|
|
3226
|
+
getAddressEncoder as getAddressEncoder32,
|
|
3227
|
+
getBooleanDecoder as getBooleanDecoder10,
|
|
3228
|
+
getBooleanEncoder as getBooleanEncoder10,
|
|
3313
3229
|
getBytesDecoder as getBytesDecoder9,
|
|
3314
3230
|
getBytesEncoder as getBytesEncoder10,
|
|
3315
3231
|
getProgramDerivedAddress as getProgramDerivedAddress2,
|
|
3316
|
-
getStructDecoder as
|
|
3317
|
-
getStructEncoder as
|
|
3318
|
-
getU64Decoder as getU64Decoder30,
|
|
3232
|
+
getStructDecoder as getStructDecoder50,
|
|
3233
|
+
getStructEncoder as getStructEncoder50,
|
|
3234
|
+
getU64Decoder as getU64Decoder30,
|
|
3319
3235
|
getU64Encoder as getU64Encoder30,
|
|
3320
3236
|
transformEncoder as transformEncoder9
|
|
3321
3237
|
} from "@solana/kit";
|
|
@@ -3334,23 +3250,23 @@ function getAddRewardDiscriminatorBytes() {
|
|
|
3334
3250
|
}
|
|
3335
3251
|
function getAddRewardInstructionDataEncoder() {
|
|
3336
3252
|
return transformEncoder9(
|
|
3337
|
-
|
|
3253
|
+
getStructEncoder50([
|
|
3338
3254
|
["discriminator", fixEncoderSize10(getBytesEncoder10(), 8)],
|
|
3339
3255
|
["amount", getU64Encoder30()],
|
|
3340
|
-
["lock",
|
|
3256
|
+
["lock", getBooleanEncoder10()]
|
|
3341
3257
|
]),
|
|
3342
3258
|
(value) => ({ ...value, discriminator: ADD_REWARD_DISCRIMINATOR })
|
|
3343
3259
|
);
|
|
3344
3260
|
}
|
|
3345
3261
|
function getAddRewardInstructionDataDecoder() {
|
|
3346
|
-
return
|
|
3262
|
+
return getStructDecoder50([
|
|
3347
3263
|
["discriminator", fixDecoderSize9(getBytesDecoder9(), 8)],
|
|
3348
3264
|
["amount", getU64Decoder30()],
|
|
3349
|
-
["lock",
|
|
3265
|
+
["lock", getBooleanDecoder10()]
|
|
3350
3266
|
]);
|
|
3351
3267
|
}
|
|
3352
3268
|
function getAddRewardInstructionDataCodec() {
|
|
3353
|
-
return
|
|
3269
|
+
return combineCodec56(
|
|
3354
3270
|
getAddRewardInstructionDataEncoder(),
|
|
3355
3271
|
getAddRewardInstructionDataDecoder()
|
|
3356
3272
|
);
|
|
@@ -3379,8 +3295,8 @@ async function getAddRewardInstructionAsync(input, config) {
|
|
|
3379
3295
|
getBytesEncoder10().encode(
|
|
3380
3296
|
new Uint8Array([115, 112, 111, 110, 115, 111, 114])
|
|
3381
3297
|
),
|
|
3382
|
-
|
|
3383
|
-
|
|
3298
|
+
getAddressEncoder32().encode(expectAddress(accounts.sponsor.value)),
|
|
3299
|
+
getAddressEncoder32().encode(expectAddress(accounts.market.value))
|
|
3384
3300
|
]
|
|
3385
3301
|
});
|
|
3386
3302
|
}
|
|
@@ -3388,9 +3304,9 @@ async function getAddRewardInstructionAsync(input, config) {
|
|
|
3388
3304
|
accounts.marketTokenAta.value = await getProgramDerivedAddress2({
|
|
3389
3305
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
3390
3306
|
seeds: [
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3307
|
+
getAddressEncoder32().encode(expectAddress(accounts.market.value)),
|
|
3308
|
+
getAddressEncoder32().encode(expectAddress(accounts.tokenProgram.value)),
|
|
3309
|
+
getAddressEncoder32().encode(expectAddress(accounts.tokenMint.value))
|
|
3394
3310
|
]
|
|
3395
3311
|
});
|
|
3396
3312
|
}
|
|
@@ -3481,15 +3397,15 @@ function parseAddRewardInstruction(instruction) {
|
|
|
3481
3397
|
|
|
3482
3398
|
// src/generated/instructions/claimCreatorFees.ts
|
|
3483
3399
|
import {
|
|
3484
|
-
combineCodec as
|
|
3400
|
+
combineCodec as combineCodec57,
|
|
3485
3401
|
fixDecoderSize as fixDecoderSize10,
|
|
3486
3402
|
fixEncoderSize as fixEncoderSize11,
|
|
3487
|
-
getAddressEncoder as
|
|
3403
|
+
getAddressEncoder as getAddressEncoder33,
|
|
3488
3404
|
getBytesDecoder as getBytesDecoder10,
|
|
3489
3405
|
getBytesEncoder as getBytesEncoder11,
|
|
3490
3406
|
getProgramDerivedAddress as getProgramDerivedAddress3,
|
|
3491
|
-
getStructDecoder as
|
|
3492
|
-
getStructEncoder as
|
|
3407
|
+
getStructDecoder as getStructDecoder51,
|
|
3408
|
+
getStructEncoder as getStructEncoder51,
|
|
3493
3409
|
transformEncoder as transformEncoder10
|
|
3494
3410
|
} from "@solana/kit";
|
|
3495
3411
|
var CLAIM_CREATOR_FEES_DISCRIMINATOR = new Uint8Array([
|
|
@@ -3509,17 +3425,17 @@ function getClaimCreatorFeesDiscriminatorBytes() {
|
|
|
3509
3425
|
}
|
|
3510
3426
|
function getClaimCreatorFeesInstructionDataEncoder() {
|
|
3511
3427
|
return transformEncoder10(
|
|
3512
|
-
|
|
3428
|
+
getStructEncoder51([["discriminator", fixEncoderSize11(getBytesEncoder11(), 8)]]),
|
|
3513
3429
|
(value) => ({ ...value, discriminator: CLAIM_CREATOR_FEES_DISCRIMINATOR })
|
|
3514
3430
|
);
|
|
3515
3431
|
}
|
|
3516
3432
|
function getClaimCreatorFeesInstructionDataDecoder() {
|
|
3517
|
-
return
|
|
3433
|
+
return getStructDecoder51([
|
|
3518
3434
|
["discriminator", fixDecoderSize10(getBytesDecoder10(), 8)]
|
|
3519
3435
|
]);
|
|
3520
3436
|
}
|
|
3521
3437
|
function getClaimCreatorFeesInstructionDataCodec() {
|
|
3522
|
-
return
|
|
3438
|
+
return combineCodec57(
|
|
3523
3439
|
getClaimCreatorFeesInstructionDataEncoder(),
|
|
3524
3440
|
getClaimCreatorFeesInstructionDataDecoder()
|
|
3525
3441
|
);
|
|
@@ -3542,9 +3458,9 @@ async function getClaimCreatorFeesInstructionAsync(input, config) {
|
|
|
3542
3458
|
accounts.marketTokenAta.value = await getProgramDerivedAddress3({
|
|
3543
3459
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
3544
3460
|
seeds: [
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3461
|
+
getAddressEncoder33().encode(expectAddress(accounts.market.value)),
|
|
3462
|
+
getAddressEncoder33().encode(expectAddress(accounts.tokenProgram.value)),
|
|
3463
|
+
getAddressEncoder33().encode(expectAddress(accounts.tokenMint.value))
|
|
3548
3464
|
]
|
|
3549
3465
|
});
|
|
3550
3466
|
}
|
|
@@ -3616,15 +3532,15 @@ function parseClaimCreatorFeesInstruction(instruction) {
|
|
|
3616
3532
|
|
|
3617
3533
|
// src/generated/instructions/claimFees.ts
|
|
3618
3534
|
import {
|
|
3619
|
-
combineCodec as
|
|
3535
|
+
combineCodec as combineCodec58,
|
|
3620
3536
|
fixDecoderSize as fixDecoderSize11,
|
|
3621
3537
|
fixEncoderSize as fixEncoderSize12,
|
|
3622
|
-
getAddressEncoder as
|
|
3538
|
+
getAddressEncoder as getAddressEncoder34,
|
|
3623
3539
|
getBytesDecoder as getBytesDecoder11,
|
|
3624
3540
|
getBytesEncoder as getBytesEncoder12,
|
|
3625
3541
|
getProgramDerivedAddress as getProgramDerivedAddress4,
|
|
3626
|
-
getStructDecoder as
|
|
3627
|
-
getStructEncoder as
|
|
3542
|
+
getStructDecoder as getStructDecoder52,
|
|
3543
|
+
getStructEncoder as getStructEncoder52,
|
|
3628
3544
|
transformEncoder as transformEncoder11
|
|
3629
3545
|
} from "@solana/kit";
|
|
3630
3546
|
var CLAIM_FEES_DISCRIMINATOR = new Uint8Array([
|
|
@@ -3642,17 +3558,17 @@ function getClaimFeesDiscriminatorBytes() {
|
|
|
3642
3558
|
}
|
|
3643
3559
|
function getClaimFeesInstructionDataEncoder() {
|
|
3644
3560
|
return transformEncoder11(
|
|
3645
|
-
|
|
3561
|
+
getStructEncoder52([["discriminator", fixEncoderSize12(getBytesEncoder12(), 8)]]),
|
|
3646
3562
|
(value) => ({ ...value, discriminator: CLAIM_FEES_DISCRIMINATOR })
|
|
3647
3563
|
);
|
|
3648
3564
|
}
|
|
3649
3565
|
function getClaimFeesInstructionDataDecoder() {
|
|
3650
|
-
return
|
|
3566
|
+
return getStructDecoder52([
|
|
3651
3567
|
["discriminator", fixDecoderSize11(getBytesDecoder11(), 8)]
|
|
3652
3568
|
]);
|
|
3653
3569
|
}
|
|
3654
3570
|
function getClaimFeesInstructionDataCodec() {
|
|
3655
|
-
return
|
|
3571
|
+
return combineCodec58(
|
|
3656
3572
|
getClaimFeesInstructionDataEncoder(),
|
|
3657
3573
|
getClaimFeesInstructionDataDecoder()
|
|
3658
3574
|
);
|
|
@@ -3676,9 +3592,9 @@ async function getClaimFeesInstructionAsync(input, config) {
|
|
|
3676
3592
|
accounts.marketTokenAta.value = await getProgramDerivedAddress4({
|
|
3677
3593
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
3678
3594
|
seeds: [
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3595
|
+
getAddressEncoder34().encode(expectAddress(accounts.market.value)),
|
|
3596
|
+
getAddressEncoder34().encode(expectAddress(accounts.tokenProgram.value)),
|
|
3597
|
+
getAddressEncoder34().encode(expectAddress(accounts.tokenMint.value))
|
|
3682
3598
|
]
|
|
3683
3599
|
});
|
|
3684
3600
|
}
|
|
@@ -3754,15 +3670,15 @@ function parseClaimFeesInstruction(instruction) {
|
|
|
3754
3670
|
|
|
3755
3671
|
// src/generated/instructions/closeOptionAccount.ts
|
|
3756
3672
|
import {
|
|
3757
|
-
combineCodec as
|
|
3673
|
+
combineCodec as combineCodec59,
|
|
3758
3674
|
fixDecoderSize as fixDecoderSize12,
|
|
3759
3675
|
fixEncoderSize as fixEncoderSize13,
|
|
3760
|
-
getAddressEncoder as
|
|
3676
|
+
getAddressEncoder as getAddressEncoder35,
|
|
3761
3677
|
getBytesDecoder as getBytesDecoder12,
|
|
3762
3678
|
getBytesEncoder as getBytesEncoder13,
|
|
3763
3679
|
getProgramDerivedAddress as getProgramDerivedAddress5,
|
|
3764
|
-
getStructDecoder as
|
|
3765
|
-
getStructEncoder as
|
|
3680
|
+
getStructDecoder as getStructDecoder53,
|
|
3681
|
+
getStructEncoder as getStructEncoder53,
|
|
3766
3682
|
getU64Decoder as getU64Decoder31,
|
|
3767
3683
|
getU64Encoder as getU64Encoder31,
|
|
3768
3684
|
transformEncoder as transformEncoder12
|
|
@@ -3784,7 +3700,7 @@ function getCloseOptionAccountDiscriminatorBytes() {
|
|
|
3784
3700
|
}
|
|
3785
3701
|
function getCloseOptionAccountInstructionDataEncoder() {
|
|
3786
3702
|
return transformEncoder12(
|
|
3787
|
-
|
|
3703
|
+
getStructEncoder53([
|
|
3788
3704
|
["discriminator", fixEncoderSize13(getBytesEncoder13(), 8)],
|
|
3789
3705
|
["optionId", getU64Encoder31()]
|
|
3790
3706
|
]),
|
|
@@ -3792,13 +3708,13 @@ function getCloseOptionAccountInstructionDataEncoder() {
|
|
|
3792
3708
|
);
|
|
3793
3709
|
}
|
|
3794
3710
|
function getCloseOptionAccountInstructionDataDecoder() {
|
|
3795
|
-
return
|
|
3711
|
+
return getStructDecoder53([
|
|
3796
3712
|
["discriminator", fixDecoderSize12(getBytesDecoder12(), 8)],
|
|
3797
3713
|
["optionId", getU64Decoder31()]
|
|
3798
3714
|
]);
|
|
3799
3715
|
}
|
|
3800
3716
|
function getCloseOptionAccountInstructionDataCodec() {
|
|
3801
|
-
return
|
|
3717
|
+
return combineCodec59(
|
|
3802
3718
|
getCloseOptionAccountInstructionDataEncoder(),
|
|
3803
3719
|
getCloseOptionAccountInstructionDataDecoder()
|
|
3804
3720
|
);
|
|
@@ -3821,7 +3737,7 @@ async function getCloseOptionAccountInstructionAsync(input, config) {
|
|
|
3821
3737
|
getBytesEncoder13().encode(
|
|
3822
3738
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
3823
3739
|
),
|
|
3824
|
-
|
|
3740
|
+
getAddressEncoder35().encode(expectAddress(accounts.market.value)),
|
|
3825
3741
|
getU64Encoder31().encode(expectSome(args.optionId))
|
|
3826
3742
|
]
|
|
3827
3743
|
});
|
|
@@ -3900,15 +3816,15 @@ function parseCloseOptionAccountInstruction(instruction) {
|
|
|
3900
3816
|
|
|
3901
3817
|
// src/generated/instructions/closeStakeAccount.ts
|
|
3902
3818
|
import {
|
|
3903
|
-
combineCodec as
|
|
3819
|
+
combineCodec as combineCodec60,
|
|
3904
3820
|
fixDecoderSize as fixDecoderSize13,
|
|
3905
3821
|
fixEncoderSize as fixEncoderSize14,
|
|
3906
|
-
getAddressEncoder as
|
|
3822
|
+
getAddressEncoder as getAddressEncoder36,
|
|
3907
3823
|
getBytesDecoder as getBytesDecoder13,
|
|
3908
3824
|
getBytesEncoder as getBytesEncoder14,
|
|
3909
3825
|
getProgramDerivedAddress as getProgramDerivedAddress6,
|
|
3910
|
-
getStructDecoder as
|
|
3911
|
-
getStructEncoder as
|
|
3826
|
+
getStructDecoder as getStructDecoder54,
|
|
3827
|
+
getStructEncoder as getStructEncoder54,
|
|
3912
3828
|
getU32Decoder as getU32Decoder15,
|
|
3913
3829
|
getU32Encoder as getU32Encoder15,
|
|
3914
3830
|
getU64Decoder as getU64Decoder32,
|
|
@@ -3932,7 +3848,7 @@ function getCloseStakeAccountDiscriminatorBytes() {
|
|
|
3932
3848
|
}
|
|
3933
3849
|
function getCloseStakeAccountInstructionDataEncoder() {
|
|
3934
3850
|
return transformEncoder13(
|
|
3935
|
-
|
|
3851
|
+
getStructEncoder54([
|
|
3936
3852
|
["discriminator", fixEncoderSize14(getBytesEncoder14(), 8)],
|
|
3937
3853
|
["optionId", getU64Encoder32()],
|
|
3938
3854
|
["stakeAccountId", getU32Encoder15()]
|
|
@@ -3941,14 +3857,14 @@ function getCloseStakeAccountInstructionDataEncoder() {
|
|
|
3941
3857
|
);
|
|
3942
3858
|
}
|
|
3943
3859
|
function getCloseStakeAccountInstructionDataDecoder() {
|
|
3944
|
-
return
|
|
3860
|
+
return getStructDecoder54([
|
|
3945
3861
|
["discriminator", fixDecoderSize13(getBytesDecoder13(), 8)],
|
|
3946
3862
|
["optionId", getU64Decoder32()],
|
|
3947
3863
|
["stakeAccountId", getU32Decoder15()]
|
|
3948
3864
|
]);
|
|
3949
3865
|
}
|
|
3950
3866
|
function getCloseStakeAccountInstructionDataCodec() {
|
|
3951
|
-
return
|
|
3867
|
+
return combineCodec60(
|
|
3952
3868
|
getCloseStakeAccountInstructionDataEncoder(),
|
|
3953
3869
|
getCloseStakeAccountInstructionDataDecoder()
|
|
3954
3870
|
);
|
|
@@ -3992,8 +3908,8 @@ async function getCloseStakeAccountInstructionAsync(input, config) {
|
|
|
3992
3908
|
116
|
|
3993
3909
|
])
|
|
3994
3910
|
),
|
|
3995
|
-
|
|
3996
|
-
|
|
3911
|
+
getAddressEncoder36().encode(expectAddress(accounts.owner.value)),
|
|
3912
|
+
getAddressEncoder36().encode(expectAddress(accounts.market.value)),
|
|
3997
3913
|
getU32Encoder15().encode(expectSome(args.stakeAccountId))
|
|
3998
3914
|
]
|
|
3999
3915
|
});
|
|
@@ -4005,7 +3921,7 @@ async function getCloseStakeAccountInstructionAsync(input, config) {
|
|
|
4005
3921
|
getBytesEncoder14().encode(
|
|
4006
3922
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
4007
3923
|
),
|
|
4008
|
-
|
|
3924
|
+
getAddressEncoder36().encode(expectAddress(accounts.market.value)),
|
|
4009
3925
|
getU64Encoder32().encode(expectSome(args.optionId))
|
|
4010
3926
|
]
|
|
4011
3927
|
});
|
|
@@ -4014,9 +3930,9 @@ async function getCloseStakeAccountInstructionAsync(input, config) {
|
|
|
4014
3930
|
accounts.marketTokenAta.value = await getProgramDerivedAddress6({
|
|
4015
3931
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
4016
3932
|
seeds: [
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
3933
|
+
getAddressEncoder36().encode(expectAddress(accounts.market.value)),
|
|
3934
|
+
getAddressEncoder36().encode(expectAddress(accounts.tokenProgram.value)),
|
|
3935
|
+
getAddressEncoder36().encode(expectAddress(accounts.tokenMint.value))
|
|
4020
3936
|
]
|
|
4021
3937
|
});
|
|
4022
3938
|
}
|
|
@@ -4111,15 +4027,15 @@ function parseCloseStakeAccountInstruction(instruction) {
|
|
|
4111
4027
|
|
|
4112
4028
|
// src/generated/instructions/closeStuckStakeAccount.ts
|
|
4113
4029
|
import {
|
|
4114
|
-
combineCodec as
|
|
4030
|
+
combineCodec as combineCodec61,
|
|
4115
4031
|
fixDecoderSize as fixDecoderSize14,
|
|
4116
4032
|
fixEncoderSize as fixEncoderSize15,
|
|
4117
|
-
getAddressEncoder as
|
|
4033
|
+
getAddressEncoder as getAddressEncoder37,
|
|
4118
4034
|
getBytesDecoder as getBytesDecoder14,
|
|
4119
4035
|
getBytesEncoder as getBytesEncoder15,
|
|
4120
4036
|
getProgramDerivedAddress as getProgramDerivedAddress7,
|
|
4121
|
-
getStructDecoder as
|
|
4122
|
-
getStructEncoder as
|
|
4037
|
+
getStructDecoder as getStructDecoder55,
|
|
4038
|
+
getStructEncoder as getStructEncoder55,
|
|
4123
4039
|
getU32Decoder as getU32Decoder16,
|
|
4124
4040
|
getU32Encoder as getU32Encoder16,
|
|
4125
4041
|
transformEncoder as transformEncoder14
|
|
@@ -4141,7 +4057,7 @@ function getCloseStuckStakeAccountDiscriminatorBytes() {
|
|
|
4141
4057
|
}
|
|
4142
4058
|
function getCloseStuckStakeAccountInstructionDataEncoder() {
|
|
4143
4059
|
return transformEncoder14(
|
|
4144
|
-
|
|
4060
|
+
getStructEncoder55([
|
|
4145
4061
|
["discriminator", fixEncoderSize15(getBytesEncoder15(), 8)],
|
|
4146
4062
|
["stakeAccountId", getU32Encoder16()]
|
|
4147
4063
|
]),
|
|
@@ -4152,13 +4068,13 @@ function getCloseStuckStakeAccountInstructionDataEncoder() {
|
|
|
4152
4068
|
);
|
|
4153
4069
|
}
|
|
4154
4070
|
function getCloseStuckStakeAccountInstructionDataDecoder() {
|
|
4155
|
-
return
|
|
4071
|
+
return getStructDecoder55([
|
|
4156
4072
|
["discriminator", fixDecoderSize14(getBytesDecoder14(), 8)],
|
|
4157
4073
|
["stakeAccountId", getU32Decoder16()]
|
|
4158
4074
|
]);
|
|
4159
4075
|
}
|
|
4160
4076
|
function getCloseStuckStakeAccountInstructionDataCodec() {
|
|
4161
|
-
return
|
|
4077
|
+
return combineCodec61(
|
|
4162
4078
|
getCloseStuckStakeAccountInstructionDataEncoder(),
|
|
4163
4079
|
getCloseStuckStakeAccountInstructionDataDecoder()
|
|
4164
4080
|
);
|
|
@@ -4201,8 +4117,8 @@ async function getCloseStuckStakeAccountInstructionAsync(input, config) {
|
|
|
4201
4117
|
116
|
|
4202
4118
|
])
|
|
4203
4119
|
),
|
|
4204
|
-
|
|
4205
|
-
|
|
4120
|
+
getAddressEncoder37().encode(expectAddress(accounts.signer.value)),
|
|
4121
|
+
getAddressEncoder37().encode(expectAddress(accounts.market.value)),
|
|
4206
4122
|
getU32Encoder16().encode(expectSome(args.stakeAccountId))
|
|
4207
4123
|
]
|
|
4208
4124
|
});
|
|
@@ -4211,9 +4127,9 @@ async function getCloseStuckStakeAccountInstructionAsync(input, config) {
|
|
|
4211
4127
|
accounts.marketTokenAta.value = await getProgramDerivedAddress7({
|
|
4212
4128
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
4213
4129
|
seeds: [
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4130
|
+
getAddressEncoder37().encode(expectAddress(accounts.market.value)),
|
|
4131
|
+
getAddressEncoder37().encode(expectAddress(accounts.tokenProgram.value)),
|
|
4132
|
+
getAddressEncoder37().encode(expectAddress(accounts.tokenMint.value))
|
|
4217
4133
|
]
|
|
4218
4134
|
});
|
|
4219
4135
|
}
|
|
@@ -4306,20 +4222,20 @@ function parseCloseStuckStakeAccountInstruction(instruction) {
|
|
|
4306
4222
|
|
|
4307
4223
|
// src/generated/instructions/createMarket.ts
|
|
4308
4224
|
import {
|
|
4309
|
-
combineCodec as
|
|
4225
|
+
combineCodec as combineCodec62,
|
|
4310
4226
|
fixDecoderSize as fixDecoderSize15,
|
|
4311
4227
|
fixEncoderSize as fixEncoderSize16,
|
|
4312
|
-
getAddressDecoder as
|
|
4313
|
-
getAddressEncoder as
|
|
4228
|
+
getAddressDecoder as getAddressDecoder31,
|
|
4229
|
+
getAddressEncoder as getAddressEncoder38,
|
|
4314
4230
|
getArrayDecoder as getArrayDecoder14,
|
|
4315
4231
|
getArrayEncoder as getArrayEncoder14,
|
|
4316
|
-
getBooleanDecoder as
|
|
4317
|
-
getBooleanEncoder as
|
|
4232
|
+
getBooleanDecoder as getBooleanDecoder11,
|
|
4233
|
+
getBooleanEncoder as getBooleanEncoder11,
|
|
4318
4234
|
getBytesDecoder as getBytesDecoder15,
|
|
4319
4235
|
getBytesEncoder as getBytesEncoder16,
|
|
4320
4236
|
getProgramDerivedAddress as getProgramDerivedAddress8,
|
|
4321
|
-
getStructDecoder as
|
|
4322
|
-
getStructEncoder as
|
|
4237
|
+
getStructDecoder as getStructDecoder56,
|
|
4238
|
+
getStructEncoder as getStructEncoder56,
|
|
4323
4239
|
getU16Decoder as getU16Decoder7,
|
|
4324
4240
|
getU16Encoder as getU16Encoder7,
|
|
4325
4241
|
getU64Decoder as getU64Decoder33,
|
|
@@ -4345,37 +4261,35 @@ function getCreateMarketDiscriminatorBytes() {
|
|
|
4345
4261
|
}
|
|
4346
4262
|
function getCreateMarketInstructionDataEncoder() {
|
|
4347
4263
|
return transformEncoder15(
|
|
4348
|
-
|
|
4264
|
+
getStructEncoder56([
|
|
4349
4265
|
["discriminator", fixEncoderSize16(getBytesEncoder16(), 8)],
|
|
4350
4266
|
["marketIndex", getU64Encoder33()],
|
|
4351
|
-
["marketAuthority",
|
|
4352
|
-
["allowUnstakingEarly",
|
|
4267
|
+
["marketAuthority", getAddressEncoder38()],
|
|
4268
|
+
["allowUnstakingEarly", getBooleanEncoder11()],
|
|
4353
4269
|
["authorizedReaderPubkey", getArrayEncoder14(getU8Encoder21(), { size: 32 })],
|
|
4354
|
-
["revealPeriodAuthority", getAddressEncoder40()],
|
|
4355
4270
|
["earlinessCutoffSeconds", getU64Encoder33()],
|
|
4356
4271
|
["earlinessMultiplier", getU16Encoder7()],
|
|
4357
4272
|
["minStakeAmount", getU64Encoder33()],
|
|
4358
|
-
["creatorFeeClaimer",
|
|
4273
|
+
["creatorFeeClaimer", getAddressEncoder38()]
|
|
4359
4274
|
]),
|
|
4360
4275
|
(value) => ({ ...value, discriminator: CREATE_MARKET_DISCRIMINATOR })
|
|
4361
4276
|
);
|
|
4362
4277
|
}
|
|
4363
4278
|
function getCreateMarketInstructionDataDecoder() {
|
|
4364
|
-
return
|
|
4279
|
+
return getStructDecoder56([
|
|
4365
4280
|
["discriminator", fixDecoderSize15(getBytesDecoder15(), 8)],
|
|
4366
4281
|
["marketIndex", getU64Decoder33()],
|
|
4367
|
-
["marketAuthority",
|
|
4368
|
-
["allowUnstakingEarly",
|
|
4282
|
+
["marketAuthority", getAddressDecoder31()],
|
|
4283
|
+
["allowUnstakingEarly", getBooleanDecoder11()],
|
|
4369
4284
|
["authorizedReaderPubkey", getArrayDecoder14(getU8Decoder21(), { size: 32 })],
|
|
4370
|
-
["revealPeriodAuthority", getAddressDecoder33()],
|
|
4371
4285
|
["earlinessCutoffSeconds", getU64Decoder33()],
|
|
4372
4286
|
["earlinessMultiplier", getU16Decoder7()],
|
|
4373
4287
|
["minStakeAmount", getU64Decoder33()],
|
|
4374
|
-
["creatorFeeClaimer",
|
|
4288
|
+
["creatorFeeClaimer", getAddressDecoder31()]
|
|
4375
4289
|
]);
|
|
4376
4290
|
}
|
|
4377
4291
|
function getCreateMarketInstructionDataCodec() {
|
|
4378
|
-
return
|
|
4292
|
+
return combineCodec62(
|
|
4379
4293
|
getCreateMarketInstructionDataEncoder(),
|
|
4380
4294
|
getCreateMarketInstructionDataDecoder()
|
|
4381
4295
|
);
|
|
@@ -4424,10 +4338,10 @@ async function getCreateMarketInstructionAsync(input, config) {
|
|
|
4424
4338
|
116
|
|
4425
4339
|
])
|
|
4426
4340
|
),
|
|
4427
|
-
|
|
4341
|
+
getAddressEncoder38().encode(
|
|
4428
4342
|
expectAddress(accounts.platformConfig.value)
|
|
4429
4343
|
),
|
|
4430
|
-
|
|
4344
|
+
getAddressEncoder38().encode(expectAddress(accounts.creator.value)),
|
|
4431
4345
|
getU64Encoder33().encode(expectSome(args.marketIndex))
|
|
4432
4346
|
]
|
|
4433
4347
|
});
|
|
@@ -4436,9 +4350,9 @@ async function getCreateMarketInstructionAsync(input, config) {
|
|
|
4436
4350
|
accounts.marketTokenAta.value = await getProgramDerivedAddress8({
|
|
4437
4351
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
4438
4352
|
seeds: [
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4353
|
+
getAddressEncoder38().encode(expectAddress(accounts.market.value)),
|
|
4354
|
+
getAddressEncoder38().encode(expectAddress(accounts.tokenProgram.value)),
|
|
4355
|
+
getAddressEncoder38().encode(expectAddress(accounts.tokenMint.value))
|
|
4442
4356
|
]
|
|
4443
4357
|
});
|
|
4444
4358
|
}
|
|
@@ -4462,10 +4376,10 @@ async function getCreateMarketInstructionAsync(input, config) {
|
|
|
4462
4376
|
116
|
|
4463
4377
|
])
|
|
4464
4378
|
),
|
|
4465
|
-
|
|
4379
|
+
getAddressEncoder38().encode(
|
|
4466
4380
|
expectAddress(accounts.platformConfig.value)
|
|
4467
4381
|
),
|
|
4468
|
-
|
|
4382
|
+
getAddressEncoder38().encode(expectAddress(accounts.tokenMint.value))
|
|
4469
4383
|
]
|
|
4470
4384
|
});
|
|
4471
4385
|
}
|
|
@@ -4566,13 +4480,13 @@ function parseCreateMarketInstruction(instruction) {
|
|
|
4566
4480
|
|
|
4567
4481
|
// src/generated/instructions/endRevealPeriod.ts
|
|
4568
4482
|
import {
|
|
4569
|
-
combineCodec as
|
|
4483
|
+
combineCodec as combineCodec63,
|
|
4570
4484
|
fixDecoderSize as fixDecoderSize16,
|
|
4571
4485
|
fixEncoderSize as fixEncoderSize17,
|
|
4572
4486
|
getBytesDecoder as getBytesDecoder16,
|
|
4573
4487
|
getBytesEncoder as getBytesEncoder17,
|
|
4574
|
-
getStructDecoder as
|
|
4575
|
-
getStructEncoder as
|
|
4488
|
+
getStructDecoder as getStructDecoder57,
|
|
4489
|
+
getStructEncoder as getStructEncoder57,
|
|
4576
4490
|
transformEncoder as transformEncoder16
|
|
4577
4491
|
} from "@solana/kit";
|
|
4578
4492
|
var END_REVEAL_PERIOD_DISCRIMINATOR = new Uint8Array([
|
|
@@ -4592,17 +4506,17 @@ function getEndRevealPeriodDiscriminatorBytes() {
|
|
|
4592
4506
|
}
|
|
4593
4507
|
function getEndRevealPeriodInstructionDataEncoder() {
|
|
4594
4508
|
return transformEncoder16(
|
|
4595
|
-
|
|
4509
|
+
getStructEncoder57([["discriminator", fixEncoderSize17(getBytesEncoder17(), 8)]]),
|
|
4596
4510
|
(value) => ({ ...value, discriminator: END_REVEAL_PERIOD_DISCRIMINATOR })
|
|
4597
4511
|
);
|
|
4598
4512
|
}
|
|
4599
4513
|
function getEndRevealPeriodInstructionDataDecoder() {
|
|
4600
|
-
return
|
|
4514
|
+
return getStructDecoder57([
|
|
4601
4515
|
["discriminator", fixDecoderSize16(getBytesDecoder16(), 8)]
|
|
4602
4516
|
]);
|
|
4603
4517
|
}
|
|
4604
4518
|
function getEndRevealPeriodInstructionDataCodec() {
|
|
4605
|
-
return
|
|
4519
|
+
return combineCodec63(
|
|
4606
4520
|
getEndRevealPeriodInstructionDataEncoder(),
|
|
4607
4521
|
getEndRevealPeriodInstructionDataDecoder()
|
|
4608
4522
|
);
|
|
@@ -4611,21 +4525,23 @@ function getEndRevealPeriodInstruction(input, config) {
|
|
|
4611
4525
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
4612
4526
|
const originalAccounts = {
|
|
4613
4527
|
signer: { value: input.signer ?? null, isWritable: false },
|
|
4614
|
-
market: { value: input.market ?? null, isWritable: true }
|
|
4528
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
4529
|
+
platformConfig: { value: input.platformConfig ?? null, isWritable: false }
|
|
4615
4530
|
};
|
|
4616
4531
|
const accounts = originalAccounts;
|
|
4617
4532
|
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
4618
4533
|
return Object.freeze({
|
|
4619
4534
|
accounts: [
|
|
4620
4535
|
getAccountMeta(accounts.signer),
|
|
4621
|
-
getAccountMeta(accounts.market)
|
|
4536
|
+
getAccountMeta(accounts.market),
|
|
4537
|
+
getAccountMeta(accounts.platformConfig)
|
|
4622
4538
|
],
|
|
4623
4539
|
data: getEndRevealPeriodInstructionDataEncoder().encode({}),
|
|
4624
4540
|
programAddress
|
|
4625
4541
|
});
|
|
4626
4542
|
}
|
|
4627
4543
|
function parseEndRevealPeriodInstruction(instruction) {
|
|
4628
|
-
if (instruction.accounts.length <
|
|
4544
|
+
if (instruction.accounts.length < 3) {
|
|
4629
4545
|
throw new Error("Not enough accounts");
|
|
4630
4546
|
}
|
|
4631
4547
|
let accountIndex = 0;
|
|
@@ -4636,22 +4552,26 @@ function parseEndRevealPeriodInstruction(instruction) {
|
|
|
4636
4552
|
};
|
|
4637
4553
|
return {
|
|
4638
4554
|
programAddress: instruction.programAddress,
|
|
4639
|
-
accounts: {
|
|
4555
|
+
accounts: {
|
|
4556
|
+
signer: getNextAccount(),
|
|
4557
|
+
market: getNextAccount(),
|
|
4558
|
+
platformConfig: getNextAccount()
|
|
4559
|
+
},
|
|
4640
4560
|
data: getEndRevealPeriodInstructionDataDecoder().decode(instruction.data)
|
|
4641
4561
|
};
|
|
4642
4562
|
}
|
|
4643
4563
|
|
|
4644
4564
|
// src/generated/instructions/finalizeRevealStake.ts
|
|
4645
4565
|
import {
|
|
4646
|
-
combineCodec as
|
|
4566
|
+
combineCodec as combineCodec64,
|
|
4647
4567
|
fixDecoderSize as fixDecoderSize17,
|
|
4648
4568
|
fixEncoderSize as fixEncoderSize18,
|
|
4649
|
-
getAddressEncoder as
|
|
4569
|
+
getAddressEncoder as getAddressEncoder39,
|
|
4650
4570
|
getBytesDecoder as getBytesDecoder17,
|
|
4651
4571
|
getBytesEncoder as getBytesEncoder18,
|
|
4652
4572
|
getProgramDerivedAddress as getProgramDerivedAddress9,
|
|
4653
|
-
getStructDecoder as
|
|
4654
|
-
getStructEncoder as
|
|
4573
|
+
getStructDecoder as getStructDecoder58,
|
|
4574
|
+
getStructEncoder as getStructEncoder58,
|
|
4655
4575
|
getU32Decoder as getU32Decoder17,
|
|
4656
4576
|
getU32Encoder as getU32Encoder17,
|
|
4657
4577
|
getU64Decoder as getU64Decoder34,
|
|
@@ -4675,7 +4595,7 @@ function getFinalizeRevealStakeDiscriminatorBytes() {
|
|
|
4675
4595
|
}
|
|
4676
4596
|
function getFinalizeRevealStakeInstructionDataEncoder() {
|
|
4677
4597
|
return transformEncoder17(
|
|
4678
|
-
|
|
4598
|
+
getStructEncoder58([
|
|
4679
4599
|
["discriminator", fixEncoderSize18(getBytesEncoder18(), 8)],
|
|
4680
4600
|
["optionId", getU64Encoder34()],
|
|
4681
4601
|
["stakeAccountId", getU32Encoder17()]
|
|
@@ -4687,14 +4607,14 @@ function getFinalizeRevealStakeInstructionDataEncoder() {
|
|
|
4687
4607
|
);
|
|
4688
4608
|
}
|
|
4689
4609
|
function getFinalizeRevealStakeInstructionDataDecoder() {
|
|
4690
|
-
return
|
|
4610
|
+
return getStructDecoder58([
|
|
4691
4611
|
["discriminator", fixDecoderSize17(getBytesDecoder17(), 8)],
|
|
4692
4612
|
["optionId", getU64Decoder34()],
|
|
4693
4613
|
["stakeAccountId", getU32Decoder17()]
|
|
4694
4614
|
]);
|
|
4695
4615
|
}
|
|
4696
4616
|
function getFinalizeRevealStakeInstructionDataCodec() {
|
|
4697
|
-
return
|
|
4617
|
+
return combineCodec64(
|
|
4698
4618
|
getFinalizeRevealStakeInstructionDataEncoder(),
|
|
4699
4619
|
getFinalizeRevealStakeInstructionDataDecoder()
|
|
4700
4620
|
);
|
|
@@ -4732,8 +4652,8 @@ async function getFinalizeRevealStakeInstructionAsync(input, config) {
|
|
|
4732
4652
|
116
|
|
4733
4653
|
])
|
|
4734
4654
|
),
|
|
4735
|
-
|
|
4736
|
-
|
|
4655
|
+
getAddressEncoder39().encode(expectAddress(accounts.owner.value)),
|
|
4656
|
+
getAddressEncoder39().encode(expectAddress(accounts.market.value)),
|
|
4737
4657
|
getU32Encoder17().encode(expectSome(args.stakeAccountId))
|
|
4738
4658
|
]
|
|
4739
4659
|
});
|
|
@@ -4745,7 +4665,7 @@ async function getFinalizeRevealStakeInstructionAsync(input, config) {
|
|
|
4745
4665
|
getBytesEncoder18().encode(
|
|
4746
4666
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
4747
4667
|
),
|
|
4748
|
-
|
|
4668
|
+
getAddressEncoder39().encode(expectAddress(accounts.market.value)),
|
|
4749
4669
|
getU64Encoder34().encode(expectSome(args.optionId))
|
|
4750
4670
|
]
|
|
4751
4671
|
});
|
|
@@ -4828,15 +4748,15 @@ function parseFinalizeRevealStakeInstruction(instruction) {
|
|
|
4828
4748
|
|
|
4829
4749
|
// src/generated/instructions/initAllowedMint.ts
|
|
4830
4750
|
import {
|
|
4831
|
-
combineCodec as
|
|
4751
|
+
combineCodec as combineCodec65,
|
|
4832
4752
|
fixDecoderSize as fixDecoderSize18,
|
|
4833
4753
|
fixEncoderSize as fixEncoderSize19,
|
|
4834
|
-
getAddressEncoder as
|
|
4754
|
+
getAddressEncoder as getAddressEncoder40,
|
|
4835
4755
|
getBytesDecoder as getBytesDecoder18,
|
|
4836
4756
|
getBytesEncoder as getBytesEncoder19,
|
|
4837
4757
|
getProgramDerivedAddress as getProgramDerivedAddress10,
|
|
4838
|
-
getStructDecoder as
|
|
4839
|
-
getStructEncoder as
|
|
4758
|
+
getStructDecoder as getStructDecoder59,
|
|
4759
|
+
getStructEncoder as getStructEncoder59,
|
|
4840
4760
|
transformEncoder as transformEncoder18
|
|
4841
4761
|
} from "@solana/kit";
|
|
4842
4762
|
var INIT_ALLOWED_MINT_DISCRIMINATOR = new Uint8Array([
|
|
@@ -4856,17 +4776,17 @@ function getInitAllowedMintDiscriminatorBytes() {
|
|
|
4856
4776
|
}
|
|
4857
4777
|
function getInitAllowedMintInstructionDataEncoder() {
|
|
4858
4778
|
return transformEncoder18(
|
|
4859
|
-
|
|
4779
|
+
getStructEncoder59([["discriminator", fixEncoderSize19(getBytesEncoder19(), 8)]]),
|
|
4860
4780
|
(value) => ({ ...value, discriminator: INIT_ALLOWED_MINT_DISCRIMINATOR })
|
|
4861
4781
|
);
|
|
4862
4782
|
}
|
|
4863
4783
|
function getInitAllowedMintInstructionDataDecoder() {
|
|
4864
|
-
return
|
|
4784
|
+
return getStructDecoder59([
|
|
4865
4785
|
["discriminator", fixDecoderSize18(getBytesDecoder18(), 8)]
|
|
4866
4786
|
]);
|
|
4867
4787
|
}
|
|
4868
4788
|
function getInitAllowedMintInstructionDataCodec() {
|
|
4869
|
-
return
|
|
4789
|
+
return combineCodec65(
|
|
4870
4790
|
getInitAllowedMintInstructionDataEncoder(),
|
|
4871
4791
|
getInitAllowedMintInstructionDataDecoder()
|
|
4872
4792
|
);
|
|
@@ -4901,10 +4821,10 @@ async function getInitAllowedMintInstructionAsync(input, config) {
|
|
|
4901
4821
|
116
|
|
4902
4822
|
])
|
|
4903
4823
|
),
|
|
4904
|
-
|
|
4824
|
+
getAddressEncoder40().encode(
|
|
4905
4825
|
expectAddress(accounts.platformConfig.value)
|
|
4906
4826
|
),
|
|
4907
|
-
|
|
4827
|
+
getAddressEncoder40().encode(expectAddress(accounts.tokenMint.value))
|
|
4908
4828
|
]
|
|
4909
4829
|
});
|
|
4910
4830
|
}
|
|
@@ -4977,16 +4897,16 @@ function parseInitAllowedMintInstruction(instruction) {
|
|
|
4977
4897
|
import {
|
|
4978
4898
|
addDecoderSizePrefix as addDecoderSizePrefix3,
|
|
4979
4899
|
addEncoderSizePrefix as addEncoderSizePrefix3,
|
|
4980
|
-
combineCodec as
|
|
4900
|
+
combineCodec as combineCodec66,
|
|
4981
4901
|
fixDecoderSize as fixDecoderSize19,
|
|
4982
4902
|
fixEncoderSize as fixEncoderSize20,
|
|
4983
|
-
getAddressDecoder as
|
|
4984
|
-
getAddressEncoder as
|
|
4903
|
+
getAddressDecoder as getAddressDecoder32,
|
|
4904
|
+
getAddressEncoder as getAddressEncoder41,
|
|
4985
4905
|
getBytesDecoder as getBytesDecoder19,
|
|
4986
4906
|
getBytesEncoder as getBytesEncoder20,
|
|
4987
4907
|
getProgramDerivedAddress as getProgramDerivedAddress11,
|
|
4988
|
-
getStructDecoder as
|
|
4989
|
-
getStructEncoder as
|
|
4908
|
+
getStructDecoder as getStructDecoder60,
|
|
4909
|
+
getStructEncoder as getStructEncoder60,
|
|
4990
4910
|
getU16Decoder as getU16Decoder8,
|
|
4991
4911
|
getU16Encoder as getU16Encoder8,
|
|
4992
4912
|
getU32Decoder as getU32Decoder18,
|
|
@@ -5014,37 +4934,37 @@ function getInitPlatformConfigDiscriminatorBytes() {
|
|
|
5014
4934
|
}
|
|
5015
4935
|
function getInitPlatformConfigInstructionDataEncoder() {
|
|
5016
4936
|
return transformEncoder19(
|
|
5017
|
-
|
|
4937
|
+
getStructEncoder60([
|
|
5018
4938
|
["discriminator", fixEncoderSize20(getBytesEncoder20(), 8)],
|
|
5019
4939
|
["name", addEncoderSizePrefix3(getUtf8Encoder3(), getU32Encoder18())],
|
|
5020
4940
|
["platformFeeBp", getU16Encoder8()],
|
|
5021
4941
|
["rewardPoolFeeBp", getU16Encoder8()],
|
|
5022
4942
|
["creatorFeeBp", getU16Encoder8()],
|
|
5023
|
-
["feeClaimAuthority",
|
|
4943
|
+
["feeClaimAuthority", getAddressEncoder41()],
|
|
4944
|
+
["revealAuthority", getAddressEncoder41()],
|
|
5024
4945
|
["minTimeToStakeSeconds", getU64Encoder35()],
|
|
5025
|
-
["
|
|
5026
|
-
["maxRevealPeriodSeconds", getU64Encoder35()],
|
|
4946
|
+
["revealPeriodSeconds", getU64Encoder35()],
|
|
5027
4947
|
["marketResolutionDeadlineSeconds", getU64Encoder35()]
|
|
5028
4948
|
]),
|
|
5029
4949
|
(value) => ({ ...value, discriminator: INIT_PLATFORM_CONFIG_DISCRIMINATOR })
|
|
5030
4950
|
);
|
|
5031
4951
|
}
|
|
5032
4952
|
function getInitPlatformConfigInstructionDataDecoder() {
|
|
5033
|
-
return
|
|
4953
|
+
return getStructDecoder60([
|
|
5034
4954
|
["discriminator", fixDecoderSize19(getBytesDecoder19(), 8)],
|
|
5035
4955
|
["name", addDecoderSizePrefix3(getUtf8Decoder3(), getU32Decoder18())],
|
|
5036
4956
|
["platformFeeBp", getU16Decoder8()],
|
|
5037
4957
|
["rewardPoolFeeBp", getU16Decoder8()],
|
|
5038
4958
|
["creatorFeeBp", getU16Decoder8()],
|
|
5039
|
-
["feeClaimAuthority",
|
|
4959
|
+
["feeClaimAuthority", getAddressDecoder32()],
|
|
4960
|
+
["revealAuthority", getAddressDecoder32()],
|
|
5040
4961
|
["minTimeToStakeSeconds", getU64Decoder35()],
|
|
5041
|
-
["
|
|
5042
|
-
["maxRevealPeriodSeconds", getU64Decoder35()],
|
|
4962
|
+
["revealPeriodSeconds", getU64Decoder35()],
|
|
5043
4963
|
["marketResolutionDeadlineSeconds", getU64Decoder35()]
|
|
5044
4964
|
]);
|
|
5045
4965
|
}
|
|
5046
4966
|
function getInitPlatformConfigInstructionDataCodec() {
|
|
5047
|
-
return
|
|
4967
|
+
return combineCodec66(
|
|
5048
4968
|
getInitPlatformConfigInstructionDataEncoder(),
|
|
5049
4969
|
getInitPlatformConfigInstructionDataDecoder()
|
|
5050
4970
|
);
|
|
@@ -5081,7 +5001,7 @@ async function getInitPlatformConfigInstructionAsync(input, config) {
|
|
|
5081
5001
|
103
|
|
5082
5002
|
])
|
|
5083
5003
|
),
|
|
5084
|
-
|
|
5004
|
+
getAddressEncoder41().encode(expectAddress(accounts.payer.value)),
|
|
5085
5005
|
getUtf8Encoder3().encode(expectSome(args.name))
|
|
5086
5006
|
]
|
|
5087
5007
|
});
|
|
@@ -5152,15 +5072,15 @@ function parseInitPlatformConfigInstruction(instruction) {
|
|
|
5152
5072
|
|
|
5153
5073
|
// src/generated/instructions/initStakeAccount.ts
|
|
5154
5074
|
import {
|
|
5155
|
-
combineCodec as
|
|
5075
|
+
combineCodec as combineCodec67,
|
|
5156
5076
|
fixDecoderSize as fixDecoderSize20,
|
|
5157
5077
|
fixEncoderSize as fixEncoderSize21,
|
|
5158
|
-
getAddressEncoder as
|
|
5078
|
+
getAddressEncoder as getAddressEncoder42,
|
|
5159
5079
|
getBytesDecoder as getBytesDecoder20,
|
|
5160
5080
|
getBytesEncoder as getBytesEncoder21,
|
|
5161
5081
|
getProgramDerivedAddress as getProgramDerivedAddress12,
|
|
5162
|
-
getStructDecoder as
|
|
5163
|
-
getStructEncoder as
|
|
5082
|
+
getStructDecoder as getStructDecoder61,
|
|
5083
|
+
getStructEncoder as getStructEncoder61,
|
|
5164
5084
|
getU32Decoder as getU32Decoder19,
|
|
5165
5085
|
getU32Encoder as getU32Encoder19,
|
|
5166
5086
|
transformEncoder as transformEncoder20
|
|
@@ -5182,7 +5102,7 @@ function getInitStakeAccountDiscriminatorBytes() {
|
|
|
5182
5102
|
}
|
|
5183
5103
|
function getInitStakeAccountInstructionDataEncoder() {
|
|
5184
5104
|
return transformEncoder20(
|
|
5185
|
-
|
|
5105
|
+
getStructEncoder61([
|
|
5186
5106
|
["discriminator", fixEncoderSize21(getBytesEncoder21(), 8)],
|
|
5187
5107
|
["stakeAccountId", getU32Encoder19()]
|
|
5188
5108
|
]),
|
|
@@ -5190,13 +5110,13 @@ function getInitStakeAccountInstructionDataEncoder() {
|
|
|
5190
5110
|
);
|
|
5191
5111
|
}
|
|
5192
5112
|
function getInitStakeAccountInstructionDataDecoder() {
|
|
5193
|
-
return
|
|
5113
|
+
return getStructDecoder61([
|
|
5194
5114
|
["discriminator", fixDecoderSize20(getBytesDecoder20(), 8)],
|
|
5195
5115
|
["stakeAccountId", getU32Decoder19()]
|
|
5196
5116
|
]);
|
|
5197
5117
|
}
|
|
5198
5118
|
function getInitStakeAccountInstructionDataCodec() {
|
|
5199
|
-
return
|
|
5119
|
+
return combineCodec67(
|
|
5200
5120
|
getInitStakeAccountInstructionDataEncoder(),
|
|
5201
5121
|
getInitStakeAccountInstructionDataDecoder()
|
|
5202
5122
|
);
|
|
@@ -5233,8 +5153,8 @@ async function getInitStakeAccountInstructionAsync(input, config) {
|
|
|
5233
5153
|
116
|
|
5234
5154
|
])
|
|
5235
5155
|
),
|
|
5236
|
-
|
|
5237
|
-
|
|
5156
|
+
getAddressEncoder42().encode(expectAddress(accounts.owner.value)),
|
|
5157
|
+
getAddressEncoder42().encode(expectAddress(accounts.market.value)),
|
|
5238
5158
|
getU32Encoder19().encode(expectSome(args.stakeAccountId))
|
|
5239
5159
|
]
|
|
5240
5160
|
});
|
|
@@ -5311,13 +5231,13 @@ function parseInitStakeAccountInstruction(instruction) {
|
|
|
5311
5231
|
|
|
5312
5232
|
// src/generated/instructions/openMarket.ts
|
|
5313
5233
|
import {
|
|
5314
|
-
combineCodec as
|
|
5234
|
+
combineCodec as combineCodec68,
|
|
5315
5235
|
fixDecoderSize as fixDecoderSize21,
|
|
5316
5236
|
fixEncoderSize as fixEncoderSize22,
|
|
5317
5237
|
getBytesDecoder as getBytesDecoder21,
|
|
5318
5238
|
getBytesEncoder as getBytesEncoder22,
|
|
5319
|
-
getStructDecoder as
|
|
5320
|
-
getStructEncoder as
|
|
5239
|
+
getStructDecoder as getStructDecoder62,
|
|
5240
|
+
getStructEncoder as getStructEncoder62,
|
|
5321
5241
|
getU64Decoder as getU64Decoder36,
|
|
5322
5242
|
getU64Encoder as getU64Encoder36,
|
|
5323
5243
|
transformEncoder as transformEncoder21
|
|
@@ -5337,7 +5257,7 @@ function getOpenMarketDiscriminatorBytes() {
|
|
|
5337
5257
|
}
|
|
5338
5258
|
function getOpenMarketInstructionDataEncoder() {
|
|
5339
5259
|
return transformEncoder21(
|
|
5340
|
-
|
|
5260
|
+
getStructEncoder62([
|
|
5341
5261
|
["discriminator", fixEncoderSize22(getBytesEncoder22(), 8)],
|
|
5342
5262
|
["timeToStake", getU64Encoder36()]
|
|
5343
5263
|
]),
|
|
@@ -5345,13 +5265,13 @@ function getOpenMarketInstructionDataEncoder() {
|
|
|
5345
5265
|
);
|
|
5346
5266
|
}
|
|
5347
5267
|
function getOpenMarketInstructionDataDecoder() {
|
|
5348
|
-
return
|
|
5268
|
+
return getStructDecoder62([
|
|
5349
5269
|
["discriminator", fixDecoderSize21(getBytesDecoder21(), 8)],
|
|
5350
5270
|
["timeToStake", getU64Decoder36()]
|
|
5351
5271
|
]);
|
|
5352
5272
|
}
|
|
5353
5273
|
function getOpenMarketInstructionDataCodec() {
|
|
5354
|
-
return
|
|
5274
|
+
return combineCodec68(
|
|
5355
5275
|
getOpenMarketInstructionDataEncoder(),
|
|
5356
5276
|
getOpenMarketInstructionDataDecoder()
|
|
5357
5277
|
);
|
|
@@ -5402,50 +5322,50 @@ function parseOpenMarketInstruction(instruction) {
|
|
|
5402
5322
|
};
|
|
5403
5323
|
}
|
|
5404
5324
|
|
|
5405
|
-
// src/generated/instructions/
|
|
5325
|
+
// src/generated/instructions/resolveMarket.ts
|
|
5406
5326
|
import {
|
|
5407
|
-
combineCodec as
|
|
5327
|
+
combineCodec as combineCodec69,
|
|
5408
5328
|
fixDecoderSize as fixDecoderSize22,
|
|
5409
5329
|
fixEncoderSize as fixEncoderSize23,
|
|
5410
5330
|
getBytesDecoder as getBytesDecoder22,
|
|
5411
5331
|
getBytesEncoder as getBytesEncoder23,
|
|
5412
|
-
getStructDecoder as
|
|
5413
|
-
getStructEncoder as
|
|
5332
|
+
getStructDecoder as getStructDecoder63,
|
|
5333
|
+
getStructEncoder as getStructEncoder63,
|
|
5414
5334
|
transformEncoder as transformEncoder22
|
|
5415
5335
|
} from "@solana/kit";
|
|
5416
|
-
var
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5336
|
+
var RESOLVE_MARKET_DISCRIMINATOR = new Uint8Array([
|
|
5337
|
+
155,
|
|
5338
|
+
23,
|
|
5339
|
+
80,
|
|
5340
|
+
173,
|
|
5341
|
+
46,
|
|
5342
|
+
74,
|
|
5343
|
+
23,
|
|
5344
|
+
239
|
|
5425
5345
|
]);
|
|
5426
|
-
function
|
|
5346
|
+
function getResolveMarketDiscriminatorBytes() {
|
|
5427
5347
|
return fixEncoderSize23(getBytesEncoder23(), 8).encode(
|
|
5428
|
-
|
|
5348
|
+
RESOLVE_MARKET_DISCRIMINATOR
|
|
5429
5349
|
);
|
|
5430
5350
|
}
|
|
5431
|
-
function
|
|
5351
|
+
function getResolveMarketInstructionDataEncoder() {
|
|
5432
5352
|
return transformEncoder22(
|
|
5433
|
-
|
|
5434
|
-
(value) => ({ ...value, discriminator:
|
|
5353
|
+
getStructEncoder63([["discriminator", fixEncoderSize23(getBytesEncoder23(), 8)]]),
|
|
5354
|
+
(value) => ({ ...value, discriminator: RESOLVE_MARKET_DISCRIMINATOR })
|
|
5435
5355
|
);
|
|
5436
5356
|
}
|
|
5437
|
-
function
|
|
5438
|
-
return
|
|
5357
|
+
function getResolveMarketInstructionDataDecoder() {
|
|
5358
|
+
return getStructDecoder63([
|
|
5439
5359
|
["discriminator", fixDecoderSize22(getBytesDecoder22(), 8)]
|
|
5440
5360
|
]);
|
|
5441
5361
|
}
|
|
5442
|
-
function
|
|
5443
|
-
return
|
|
5444
|
-
|
|
5445
|
-
|
|
5362
|
+
function getResolveMarketInstructionDataCodec() {
|
|
5363
|
+
return combineCodec69(
|
|
5364
|
+
getResolveMarketInstructionDataEncoder(),
|
|
5365
|
+
getResolveMarketInstructionDataDecoder()
|
|
5446
5366
|
);
|
|
5447
5367
|
}
|
|
5448
|
-
function
|
|
5368
|
+
function getResolveMarketInstruction(input, config) {
|
|
5449
5369
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5450
5370
|
const originalAccounts = {
|
|
5451
5371
|
marketAuthority: {
|
|
@@ -5461,11 +5381,11 @@ function getPauseStakingInstruction(input, config) {
|
|
|
5461
5381
|
getAccountMeta(accounts.marketAuthority),
|
|
5462
5382
|
getAccountMeta(accounts.market)
|
|
5463
5383
|
],
|
|
5464
|
-
data:
|
|
5384
|
+
data: getResolveMarketInstructionDataEncoder().encode({}),
|
|
5465
5385
|
programAddress
|
|
5466
5386
|
});
|
|
5467
5387
|
}
|
|
5468
|
-
function
|
|
5388
|
+
function parseResolveMarketInstruction(instruction) {
|
|
5469
5389
|
if (instruction.accounts.length < 2) {
|
|
5470
5390
|
throw new Error("Not enough accounts");
|
|
5471
5391
|
}
|
|
@@ -5478,186 +5398,26 @@ function parsePauseStakingInstruction(instruction) {
|
|
|
5478
5398
|
return {
|
|
5479
5399
|
programAddress: instruction.programAddress,
|
|
5480
5400
|
accounts: { marketAuthority: getNextAccount(), market: getNextAccount() },
|
|
5481
|
-
data:
|
|
5401
|
+
data: getResolveMarketInstructionDataDecoder().decode(instruction.data)
|
|
5482
5402
|
};
|
|
5483
5403
|
}
|
|
5484
5404
|
|
|
5485
|
-
// src/generated/instructions/
|
|
5405
|
+
// src/generated/instructions/revealStake.ts
|
|
5486
5406
|
import {
|
|
5487
|
-
combineCodec as
|
|
5407
|
+
combineCodec as combineCodec70,
|
|
5488
5408
|
fixDecoderSize as fixDecoderSize23,
|
|
5489
5409
|
fixEncoderSize as fixEncoderSize24,
|
|
5410
|
+
getAddressEncoder as getAddressEncoder43,
|
|
5490
5411
|
getBytesDecoder as getBytesDecoder23,
|
|
5491
5412
|
getBytesEncoder as getBytesEncoder24,
|
|
5492
|
-
getStructDecoder as getStructDecoder66,
|
|
5493
|
-
getStructEncoder as getStructEncoder66,
|
|
5494
|
-
transformEncoder as transformEncoder23
|
|
5495
|
-
} from "@solana/kit";
|
|
5496
|
-
var RESOLVE_MARKET_DISCRIMINATOR = new Uint8Array([
|
|
5497
|
-
155,
|
|
5498
|
-
23,
|
|
5499
|
-
80,
|
|
5500
|
-
173,
|
|
5501
|
-
46,
|
|
5502
|
-
74,
|
|
5503
|
-
23,
|
|
5504
|
-
239
|
|
5505
|
-
]);
|
|
5506
|
-
function getResolveMarketDiscriminatorBytes() {
|
|
5507
|
-
return fixEncoderSize24(getBytesEncoder24(), 8).encode(
|
|
5508
|
-
RESOLVE_MARKET_DISCRIMINATOR
|
|
5509
|
-
);
|
|
5510
|
-
}
|
|
5511
|
-
function getResolveMarketInstructionDataEncoder() {
|
|
5512
|
-
return transformEncoder23(
|
|
5513
|
-
getStructEncoder66([["discriminator", fixEncoderSize24(getBytesEncoder24(), 8)]]),
|
|
5514
|
-
(value) => ({ ...value, discriminator: RESOLVE_MARKET_DISCRIMINATOR })
|
|
5515
|
-
);
|
|
5516
|
-
}
|
|
5517
|
-
function getResolveMarketInstructionDataDecoder() {
|
|
5518
|
-
return getStructDecoder66([
|
|
5519
|
-
["discriminator", fixDecoderSize23(getBytesDecoder23(), 8)]
|
|
5520
|
-
]);
|
|
5521
|
-
}
|
|
5522
|
-
function getResolveMarketInstructionDataCodec() {
|
|
5523
|
-
return combineCodec72(
|
|
5524
|
-
getResolveMarketInstructionDataEncoder(),
|
|
5525
|
-
getResolveMarketInstructionDataDecoder()
|
|
5526
|
-
);
|
|
5527
|
-
}
|
|
5528
|
-
function getResolveMarketInstruction(input, config) {
|
|
5529
|
-
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5530
|
-
const originalAccounts = {
|
|
5531
|
-
marketAuthority: {
|
|
5532
|
-
value: input.marketAuthority ?? null,
|
|
5533
|
-
isWritable: false
|
|
5534
|
-
},
|
|
5535
|
-
market: { value: input.market ?? null, isWritable: true }
|
|
5536
|
-
};
|
|
5537
|
-
const accounts = originalAccounts;
|
|
5538
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
5539
|
-
return Object.freeze({
|
|
5540
|
-
accounts: [
|
|
5541
|
-
getAccountMeta(accounts.marketAuthority),
|
|
5542
|
-
getAccountMeta(accounts.market)
|
|
5543
|
-
],
|
|
5544
|
-
data: getResolveMarketInstructionDataEncoder().encode({}),
|
|
5545
|
-
programAddress
|
|
5546
|
-
});
|
|
5547
|
-
}
|
|
5548
|
-
function parseResolveMarketInstruction(instruction) {
|
|
5549
|
-
if (instruction.accounts.length < 2) {
|
|
5550
|
-
throw new Error("Not enough accounts");
|
|
5551
|
-
}
|
|
5552
|
-
let accountIndex = 0;
|
|
5553
|
-
const getNextAccount = () => {
|
|
5554
|
-
const accountMeta = instruction.accounts[accountIndex];
|
|
5555
|
-
accountIndex += 1;
|
|
5556
|
-
return accountMeta;
|
|
5557
|
-
};
|
|
5558
|
-
return {
|
|
5559
|
-
programAddress: instruction.programAddress,
|
|
5560
|
-
accounts: { marketAuthority: getNextAccount(), market: getNextAccount() },
|
|
5561
|
-
data: getResolveMarketInstructionDataDecoder().decode(instruction.data)
|
|
5562
|
-
};
|
|
5563
|
-
}
|
|
5564
|
-
|
|
5565
|
-
// src/generated/instructions/resumeStaking.ts
|
|
5566
|
-
import {
|
|
5567
|
-
combineCodec as combineCodec73,
|
|
5568
|
-
fixDecoderSize as fixDecoderSize24,
|
|
5569
|
-
fixEncoderSize as fixEncoderSize25,
|
|
5570
|
-
getBytesDecoder as getBytesDecoder24,
|
|
5571
|
-
getBytesEncoder as getBytesEncoder25,
|
|
5572
|
-
getStructDecoder as getStructDecoder67,
|
|
5573
|
-
getStructEncoder as getStructEncoder67,
|
|
5574
|
-
transformEncoder as transformEncoder24
|
|
5575
|
-
} from "@solana/kit";
|
|
5576
|
-
var RESUME_STAKING_DISCRIMINATOR = new Uint8Array([
|
|
5577
|
-
31,
|
|
5578
|
-
200,
|
|
5579
|
-
175,
|
|
5580
|
-
23,
|
|
5581
|
-
211,
|
|
5582
|
-
22,
|
|
5583
|
-
63,
|
|
5584
|
-
155
|
|
5585
|
-
]);
|
|
5586
|
-
function getResumeStakingDiscriminatorBytes() {
|
|
5587
|
-
return fixEncoderSize25(getBytesEncoder25(), 8).encode(
|
|
5588
|
-
RESUME_STAKING_DISCRIMINATOR
|
|
5589
|
-
);
|
|
5590
|
-
}
|
|
5591
|
-
function getResumeStakingInstructionDataEncoder() {
|
|
5592
|
-
return transformEncoder24(
|
|
5593
|
-
getStructEncoder67([["discriminator", fixEncoderSize25(getBytesEncoder25(), 8)]]),
|
|
5594
|
-
(value) => ({ ...value, discriminator: RESUME_STAKING_DISCRIMINATOR })
|
|
5595
|
-
);
|
|
5596
|
-
}
|
|
5597
|
-
function getResumeStakingInstructionDataDecoder() {
|
|
5598
|
-
return getStructDecoder67([
|
|
5599
|
-
["discriminator", fixDecoderSize24(getBytesDecoder24(), 8)]
|
|
5600
|
-
]);
|
|
5601
|
-
}
|
|
5602
|
-
function getResumeStakingInstructionDataCodec() {
|
|
5603
|
-
return combineCodec73(
|
|
5604
|
-
getResumeStakingInstructionDataEncoder(),
|
|
5605
|
-
getResumeStakingInstructionDataDecoder()
|
|
5606
|
-
);
|
|
5607
|
-
}
|
|
5608
|
-
function getResumeStakingInstruction(input, config) {
|
|
5609
|
-
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5610
|
-
const originalAccounts = {
|
|
5611
|
-
marketAuthority: {
|
|
5612
|
-
value: input.marketAuthority ?? null,
|
|
5613
|
-
isWritable: false
|
|
5614
|
-
},
|
|
5615
|
-
market: { value: input.market ?? null, isWritable: true }
|
|
5616
|
-
};
|
|
5617
|
-
const accounts = originalAccounts;
|
|
5618
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
5619
|
-
return Object.freeze({
|
|
5620
|
-
accounts: [
|
|
5621
|
-
getAccountMeta(accounts.marketAuthority),
|
|
5622
|
-
getAccountMeta(accounts.market)
|
|
5623
|
-
],
|
|
5624
|
-
data: getResumeStakingInstructionDataEncoder().encode({}),
|
|
5625
|
-
programAddress
|
|
5626
|
-
});
|
|
5627
|
-
}
|
|
5628
|
-
function parseResumeStakingInstruction(instruction) {
|
|
5629
|
-
if (instruction.accounts.length < 2) {
|
|
5630
|
-
throw new Error("Not enough accounts");
|
|
5631
|
-
}
|
|
5632
|
-
let accountIndex = 0;
|
|
5633
|
-
const getNextAccount = () => {
|
|
5634
|
-
const accountMeta = instruction.accounts[accountIndex];
|
|
5635
|
-
accountIndex += 1;
|
|
5636
|
-
return accountMeta;
|
|
5637
|
-
};
|
|
5638
|
-
return {
|
|
5639
|
-
programAddress: instruction.programAddress,
|
|
5640
|
-
accounts: { marketAuthority: getNextAccount(), market: getNextAccount() },
|
|
5641
|
-
data: getResumeStakingInstructionDataDecoder().decode(instruction.data)
|
|
5642
|
-
};
|
|
5643
|
-
}
|
|
5644
|
-
|
|
5645
|
-
// src/generated/instructions/revealStake.ts
|
|
5646
|
-
import {
|
|
5647
|
-
combineCodec as combineCodec74,
|
|
5648
|
-
fixDecoderSize as fixDecoderSize25,
|
|
5649
|
-
fixEncoderSize as fixEncoderSize26,
|
|
5650
|
-
getAddressEncoder as getAddressEncoder45,
|
|
5651
|
-
getBytesDecoder as getBytesDecoder25,
|
|
5652
|
-
getBytesEncoder as getBytesEncoder26,
|
|
5653
5413
|
getProgramDerivedAddress as getProgramDerivedAddress13,
|
|
5654
|
-
getStructDecoder as
|
|
5655
|
-
getStructEncoder as
|
|
5414
|
+
getStructDecoder as getStructDecoder64,
|
|
5415
|
+
getStructEncoder as getStructEncoder64,
|
|
5656
5416
|
getU32Decoder as getU32Decoder20,
|
|
5657
5417
|
getU32Encoder as getU32Encoder20,
|
|
5658
5418
|
getU64Decoder as getU64Decoder37,
|
|
5659
5419
|
getU64Encoder as getU64Encoder37,
|
|
5660
|
-
transformEncoder as
|
|
5420
|
+
transformEncoder as transformEncoder23
|
|
5661
5421
|
} from "@solana/kit";
|
|
5662
5422
|
var REVEAL_STAKE_DISCRIMINATOR = new Uint8Array([
|
|
5663
5423
|
107,
|
|
@@ -5670,14 +5430,14 @@ var REVEAL_STAKE_DISCRIMINATOR = new Uint8Array([
|
|
|
5670
5430
|
188
|
|
5671
5431
|
]);
|
|
5672
5432
|
function getRevealStakeDiscriminatorBytes() {
|
|
5673
|
-
return
|
|
5433
|
+
return fixEncoderSize24(getBytesEncoder24(), 8).encode(
|
|
5674
5434
|
REVEAL_STAKE_DISCRIMINATOR
|
|
5675
5435
|
);
|
|
5676
5436
|
}
|
|
5677
5437
|
function getRevealStakeInstructionDataEncoder() {
|
|
5678
|
-
return
|
|
5679
|
-
|
|
5680
|
-
["discriminator",
|
|
5438
|
+
return transformEncoder23(
|
|
5439
|
+
getStructEncoder64([
|
|
5440
|
+
["discriminator", fixEncoderSize24(getBytesEncoder24(), 8)],
|
|
5681
5441
|
["computationOffset", getU64Encoder37()],
|
|
5682
5442
|
["stakeAccountId", getU32Encoder20()]
|
|
5683
5443
|
]),
|
|
@@ -5685,14 +5445,14 @@ function getRevealStakeInstructionDataEncoder() {
|
|
|
5685
5445
|
);
|
|
5686
5446
|
}
|
|
5687
5447
|
function getRevealStakeInstructionDataDecoder() {
|
|
5688
|
-
return
|
|
5689
|
-
["discriminator",
|
|
5448
|
+
return getStructDecoder64([
|
|
5449
|
+
["discriminator", fixDecoderSize23(getBytesDecoder23(), 8)],
|
|
5690
5450
|
["computationOffset", getU64Decoder37()],
|
|
5691
5451
|
["stakeAccountId", getU32Decoder20()]
|
|
5692
5452
|
]);
|
|
5693
5453
|
}
|
|
5694
5454
|
function getRevealStakeInstructionDataCodec() {
|
|
5695
|
-
return
|
|
5455
|
+
return combineCodec70(
|
|
5696
5456
|
getRevealStakeInstructionDataEncoder(),
|
|
5697
5457
|
getRevealStakeInstructionDataDecoder()
|
|
5698
5458
|
);
|
|
@@ -5725,7 +5485,7 @@ async function getRevealStakeInstructionAsync(input, config) {
|
|
|
5725
5485
|
accounts.stakeAccount.value = await getProgramDerivedAddress13({
|
|
5726
5486
|
programAddress,
|
|
5727
5487
|
seeds: [
|
|
5728
|
-
|
|
5488
|
+
getBytesEncoder24().encode(
|
|
5729
5489
|
new Uint8Array([
|
|
5730
5490
|
115,
|
|
5731
5491
|
116,
|
|
@@ -5742,8 +5502,8 @@ async function getRevealStakeInstructionAsync(input, config) {
|
|
|
5742
5502
|
116
|
|
5743
5503
|
])
|
|
5744
5504
|
),
|
|
5745
|
-
|
|
5746
|
-
|
|
5505
|
+
getAddressEncoder43().encode(expectAddress(accounts.owner.value)),
|
|
5506
|
+
getAddressEncoder43().encode(expectAddress(accounts.market.value)),
|
|
5747
5507
|
getU32Encoder20().encode(expectSome(args.stakeAccountId))
|
|
5748
5508
|
]
|
|
5749
5509
|
});
|
|
@@ -5752,7 +5512,7 @@ async function getRevealStakeInstructionAsync(input, config) {
|
|
|
5752
5512
|
accounts.signPdaAccount.value = await getProgramDerivedAddress13({
|
|
5753
5513
|
programAddress,
|
|
5754
5514
|
seeds: [
|
|
5755
|
-
|
|
5515
|
+
getBytesEncoder24().encode(
|
|
5756
5516
|
new Uint8Array([
|
|
5757
5517
|
65,
|
|
5758
5518
|
114,
|
|
@@ -5911,24 +5671,24 @@ function parseRevealStakeInstruction(instruction) {
|
|
|
5911
5671
|
|
|
5912
5672
|
// src/generated/instructions/revealStakeCallback.ts
|
|
5913
5673
|
import {
|
|
5914
|
-
combineCodec as
|
|
5915
|
-
fixDecoderSize as
|
|
5916
|
-
fixEncoderSize as
|
|
5674
|
+
combineCodec as combineCodec71,
|
|
5675
|
+
fixDecoderSize as fixDecoderSize24,
|
|
5676
|
+
fixEncoderSize as fixEncoderSize25,
|
|
5917
5677
|
getArrayDecoder as getArrayDecoder15,
|
|
5918
5678
|
getArrayEncoder as getArrayEncoder15,
|
|
5919
|
-
getBytesDecoder as
|
|
5920
|
-
getBytesEncoder as
|
|
5679
|
+
getBytesDecoder as getBytesDecoder24,
|
|
5680
|
+
getBytesEncoder as getBytesEncoder25,
|
|
5921
5681
|
getDiscriminatedUnionDecoder as getDiscriminatedUnionDecoder4,
|
|
5922
5682
|
getDiscriminatedUnionEncoder as getDiscriminatedUnionEncoder4,
|
|
5923
|
-
getStructDecoder as
|
|
5924
|
-
getStructEncoder as
|
|
5683
|
+
getStructDecoder as getStructDecoder65,
|
|
5684
|
+
getStructEncoder as getStructEncoder65,
|
|
5925
5685
|
getTupleDecoder as getTupleDecoder6,
|
|
5926
5686
|
getTupleEncoder as getTupleEncoder6,
|
|
5927
5687
|
getU8Decoder as getU8Decoder22,
|
|
5928
5688
|
getU8Encoder as getU8Encoder22,
|
|
5929
5689
|
getUnitDecoder,
|
|
5930
5690
|
getUnitEncoder,
|
|
5931
|
-
transformEncoder as
|
|
5691
|
+
transformEncoder as transformEncoder24
|
|
5932
5692
|
} from "@solana/kit";
|
|
5933
5693
|
var REVEAL_STAKE_CALLBACK_DISCRIMINATOR = new Uint8Array([
|
|
5934
5694
|
79,
|
|
@@ -5941,20 +5701,20 @@ var REVEAL_STAKE_CALLBACK_DISCRIMINATOR = new Uint8Array([
|
|
|
5941
5701
|
116
|
|
5942
5702
|
]);
|
|
5943
5703
|
function getRevealStakeCallbackDiscriminatorBytes() {
|
|
5944
|
-
return
|
|
5704
|
+
return fixEncoderSize25(getBytesEncoder25(), 8).encode(
|
|
5945
5705
|
REVEAL_STAKE_CALLBACK_DISCRIMINATOR
|
|
5946
5706
|
);
|
|
5947
5707
|
}
|
|
5948
5708
|
function getRevealStakeCallbackInstructionDataEncoder() {
|
|
5949
|
-
return
|
|
5950
|
-
|
|
5951
|
-
["discriminator",
|
|
5709
|
+
return transformEncoder24(
|
|
5710
|
+
getStructEncoder65([
|
|
5711
|
+
["discriminator", fixEncoderSize25(getBytesEncoder25(), 8)],
|
|
5952
5712
|
[
|
|
5953
5713
|
"output",
|
|
5954
5714
|
getDiscriminatedUnionEncoder4([
|
|
5955
5715
|
[
|
|
5956
5716
|
"Success",
|
|
5957
|
-
|
|
5717
|
+
getStructEncoder65([
|
|
5958
5718
|
[
|
|
5959
5719
|
"fields",
|
|
5960
5720
|
getTupleEncoder6([
|
|
@@ -5967,7 +5727,7 @@ function getRevealStakeCallbackInstructionDataEncoder() {
|
|
|
5967
5727
|
["Failure", getUnitEncoder()],
|
|
5968
5728
|
[
|
|
5969
5729
|
"MarkerForIdlBuildDoNotUseThis",
|
|
5970
|
-
|
|
5730
|
+
getStructEncoder65([
|
|
5971
5731
|
["fields", getTupleEncoder6([getRevealStakeOutputEncoder()])]
|
|
5972
5732
|
])
|
|
5973
5733
|
]
|
|
@@ -5981,14 +5741,14 @@ function getRevealStakeCallbackInstructionDataEncoder() {
|
|
|
5981
5741
|
);
|
|
5982
5742
|
}
|
|
5983
5743
|
function getRevealStakeCallbackInstructionDataDecoder() {
|
|
5984
|
-
return
|
|
5985
|
-
["discriminator",
|
|
5744
|
+
return getStructDecoder65([
|
|
5745
|
+
["discriminator", fixDecoderSize24(getBytesDecoder24(), 8)],
|
|
5986
5746
|
[
|
|
5987
5747
|
"output",
|
|
5988
5748
|
getDiscriminatedUnionDecoder4([
|
|
5989
5749
|
[
|
|
5990
5750
|
"Success",
|
|
5991
|
-
|
|
5751
|
+
getStructDecoder65([
|
|
5992
5752
|
[
|
|
5993
5753
|
"fields",
|
|
5994
5754
|
getTupleDecoder6([
|
|
@@ -6001,7 +5761,7 @@ function getRevealStakeCallbackInstructionDataDecoder() {
|
|
|
6001
5761
|
["Failure", getUnitDecoder()],
|
|
6002
5762
|
[
|
|
6003
5763
|
"MarkerForIdlBuildDoNotUseThis",
|
|
6004
|
-
|
|
5764
|
+
getStructDecoder65([
|
|
6005
5765
|
["fields", getTupleDecoder6([getRevealStakeOutputDecoder()])]
|
|
6006
5766
|
])
|
|
6007
5767
|
]
|
|
@@ -6010,7 +5770,7 @@ function getRevealStakeCallbackInstructionDataDecoder() {
|
|
|
6010
5770
|
]);
|
|
6011
5771
|
}
|
|
6012
5772
|
function getRevealStakeCallbackInstructionDataCodec() {
|
|
6013
|
-
return
|
|
5773
|
+
return combineCodec71(
|
|
6014
5774
|
getRevealStakeCallbackInstructionDataEncoder(),
|
|
6015
5775
|
getRevealStakeCallbackInstructionDataDecoder()
|
|
6016
5776
|
);
|
|
@@ -6086,14 +5846,14 @@ function parseRevealStakeCallbackInstruction(instruction) {
|
|
|
6086
5846
|
|
|
6087
5847
|
// src/generated/instructions/revealStakeCompDef.ts
|
|
6088
5848
|
import {
|
|
6089
|
-
combineCodec as
|
|
6090
|
-
fixDecoderSize as
|
|
6091
|
-
fixEncoderSize as
|
|
6092
|
-
getBytesDecoder as
|
|
6093
|
-
getBytesEncoder as
|
|
6094
|
-
getStructDecoder as
|
|
6095
|
-
getStructEncoder as
|
|
6096
|
-
transformEncoder as
|
|
5849
|
+
combineCodec as combineCodec72,
|
|
5850
|
+
fixDecoderSize as fixDecoderSize25,
|
|
5851
|
+
fixEncoderSize as fixEncoderSize26,
|
|
5852
|
+
getBytesDecoder as getBytesDecoder25,
|
|
5853
|
+
getBytesEncoder as getBytesEncoder26,
|
|
5854
|
+
getStructDecoder as getStructDecoder66,
|
|
5855
|
+
getStructEncoder as getStructEncoder66,
|
|
5856
|
+
transformEncoder as transformEncoder25
|
|
6097
5857
|
} from "@solana/kit";
|
|
6098
5858
|
var REVEAL_STAKE_COMP_DEF_DISCRIMINATOR = new Uint8Array([
|
|
6099
5859
|
197,
|
|
@@ -6106,13 +5866,13 @@ var REVEAL_STAKE_COMP_DEF_DISCRIMINATOR = new Uint8Array([
|
|
|
6106
5866
|
0
|
|
6107
5867
|
]);
|
|
6108
5868
|
function getRevealStakeCompDefDiscriminatorBytes() {
|
|
6109
|
-
return
|
|
5869
|
+
return fixEncoderSize26(getBytesEncoder26(), 8).encode(
|
|
6110
5870
|
REVEAL_STAKE_COMP_DEF_DISCRIMINATOR
|
|
6111
5871
|
);
|
|
6112
5872
|
}
|
|
6113
5873
|
function getRevealStakeCompDefInstructionDataEncoder() {
|
|
6114
|
-
return
|
|
6115
|
-
|
|
5874
|
+
return transformEncoder25(
|
|
5875
|
+
getStructEncoder66([["discriminator", fixEncoderSize26(getBytesEncoder26(), 8)]]),
|
|
6116
5876
|
(value) => ({
|
|
6117
5877
|
...value,
|
|
6118
5878
|
discriminator: REVEAL_STAKE_COMP_DEF_DISCRIMINATOR
|
|
@@ -6120,12 +5880,12 @@ function getRevealStakeCompDefInstructionDataEncoder() {
|
|
|
6120
5880
|
);
|
|
6121
5881
|
}
|
|
6122
5882
|
function getRevealStakeCompDefInstructionDataDecoder() {
|
|
6123
|
-
return
|
|
6124
|
-
["discriminator",
|
|
5883
|
+
return getStructDecoder66([
|
|
5884
|
+
["discriminator", fixDecoderSize25(getBytesDecoder25(), 8)]
|
|
6125
5885
|
]);
|
|
6126
5886
|
}
|
|
6127
5887
|
function getRevealStakeCompDefInstructionDataCodec() {
|
|
6128
|
-
return
|
|
5888
|
+
return combineCodec72(
|
|
6129
5889
|
getRevealStakeCompDefInstructionDataEncoder(),
|
|
6130
5890
|
getRevealStakeCompDefInstructionDataDecoder()
|
|
6131
5891
|
);
|
|
@@ -6198,14 +5958,14 @@ function parseRevealStakeCompDefInstruction(instruction) {
|
|
|
6198
5958
|
|
|
6199
5959
|
// src/generated/instructions/setFeeClaimAuthority.ts
|
|
6200
5960
|
import {
|
|
6201
|
-
combineCodec as
|
|
6202
|
-
fixDecoderSize as
|
|
6203
|
-
fixEncoderSize as
|
|
6204
|
-
getBytesDecoder as
|
|
6205
|
-
getBytesEncoder as
|
|
6206
|
-
getStructDecoder as
|
|
6207
|
-
getStructEncoder as
|
|
6208
|
-
transformEncoder as
|
|
5961
|
+
combineCodec as combineCodec73,
|
|
5962
|
+
fixDecoderSize as fixDecoderSize26,
|
|
5963
|
+
fixEncoderSize as fixEncoderSize27,
|
|
5964
|
+
getBytesDecoder as getBytesDecoder26,
|
|
5965
|
+
getBytesEncoder as getBytesEncoder27,
|
|
5966
|
+
getStructDecoder as getStructDecoder67,
|
|
5967
|
+
getStructEncoder as getStructEncoder67,
|
|
5968
|
+
transformEncoder as transformEncoder26
|
|
6209
5969
|
} from "@solana/kit";
|
|
6210
5970
|
var SET_FEE_CLAIM_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
6211
5971
|
75,
|
|
@@ -6218,13 +5978,13 @@ var SET_FEE_CLAIM_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
|
6218
5978
|
3
|
|
6219
5979
|
]);
|
|
6220
5980
|
function getSetFeeClaimAuthorityDiscriminatorBytes() {
|
|
6221
|
-
return
|
|
5981
|
+
return fixEncoderSize27(getBytesEncoder27(), 8).encode(
|
|
6222
5982
|
SET_FEE_CLAIM_AUTHORITY_DISCRIMINATOR
|
|
6223
5983
|
);
|
|
6224
5984
|
}
|
|
6225
5985
|
function getSetFeeClaimAuthorityInstructionDataEncoder() {
|
|
6226
|
-
return
|
|
6227
|
-
|
|
5986
|
+
return transformEncoder26(
|
|
5987
|
+
getStructEncoder67([["discriminator", fixEncoderSize27(getBytesEncoder27(), 8)]]),
|
|
6228
5988
|
(value) => ({
|
|
6229
5989
|
...value,
|
|
6230
5990
|
discriminator: SET_FEE_CLAIM_AUTHORITY_DISCRIMINATOR
|
|
@@ -6232,12 +5992,12 @@ function getSetFeeClaimAuthorityInstructionDataEncoder() {
|
|
|
6232
5992
|
);
|
|
6233
5993
|
}
|
|
6234
5994
|
function getSetFeeClaimAuthorityInstructionDataDecoder() {
|
|
6235
|
-
return
|
|
6236
|
-
["discriminator",
|
|
5995
|
+
return getStructDecoder67([
|
|
5996
|
+
["discriminator", fixDecoderSize26(getBytesDecoder26(), 8)]
|
|
6237
5997
|
]);
|
|
6238
5998
|
}
|
|
6239
5999
|
function getSetFeeClaimAuthorityInstructionDataCodec() {
|
|
6240
|
-
return
|
|
6000
|
+
return combineCodec73(
|
|
6241
6001
|
getSetFeeClaimAuthorityInstructionDataEncoder(),
|
|
6242
6002
|
getSetFeeClaimAuthorityInstructionDataDecoder()
|
|
6243
6003
|
);
|
|
@@ -6292,14 +6052,14 @@ function parseSetFeeClaimAuthorityInstruction(instruction) {
|
|
|
6292
6052
|
|
|
6293
6053
|
// src/generated/instructions/setUpdateAuthority.ts
|
|
6294
6054
|
import {
|
|
6295
|
-
combineCodec as
|
|
6296
|
-
fixDecoderSize as
|
|
6297
|
-
fixEncoderSize as
|
|
6298
|
-
getBytesDecoder as
|
|
6299
|
-
getBytesEncoder as
|
|
6300
|
-
getStructDecoder as
|
|
6301
|
-
getStructEncoder as
|
|
6302
|
-
transformEncoder as
|
|
6055
|
+
combineCodec as combineCodec74,
|
|
6056
|
+
fixDecoderSize as fixDecoderSize27,
|
|
6057
|
+
fixEncoderSize as fixEncoderSize28,
|
|
6058
|
+
getBytesDecoder as getBytesDecoder27,
|
|
6059
|
+
getBytesEncoder as getBytesEncoder28,
|
|
6060
|
+
getStructDecoder as getStructDecoder68,
|
|
6061
|
+
getStructEncoder as getStructEncoder68,
|
|
6062
|
+
transformEncoder as transformEncoder27
|
|
6303
6063
|
} from "@solana/kit";
|
|
6304
6064
|
var SET_UPDATE_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
6305
6065
|
166,
|
|
@@ -6312,23 +6072,23 @@ var SET_UPDATE_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
|
6312
6072
|
155
|
|
6313
6073
|
]);
|
|
6314
6074
|
function getSetUpdateAuthorityDiscriminatorBytes() {
|
|
6315
|
-
return
|
|
6075
|
+
return fixEncoderSize28(getBytesEncoder28(), 8).encode(
|
|
6316
6076
|
SET_UPDATE_AUTHORITY_DISCRIMINATOR
|
|
6317
6077
|
);
|
|
6318
6078
|
}
|
|
6319
6079
|
function getSetUpdateAuthorityInstructionDataEncoder() {
|
|
6320
|
-
return
|
|
6321
|
-
|
|
6080
|
+
return transformEncoder27(
|
|
6081
|
+
getStructEncoder68([["discriminator", fixEncoderSize28(getBytesEncoder28(), 8)]]),
|
|
6322
6082
|
(value) => ({ ...value, discriminator: SET_UPDATE_AUTHORITY_DISCRIMINATOR })
|
|
6323
6083
|
);
|
|
6324
6084
|
}
|
|
6325
6085
|
function getSetUpdateAuthorityInstructionDataDecoder() {
|
|
6326
|
-
return
|
|
6327
|
-
["discriminator",
|
|
6086
|
+
return getStructDecoder68([
|
|
6087
|
+
["discriminator", fixDecoderSize27(getBytesDecoder27(), 8)]
|
|
6328
6088
|
]);
|
|
6329
6089
|
}
|
|
6330
6090
|
function getSetUpdateAuthorityInstructionDataCodec() {
|
|
6331
|
-
return
|
|
6091
|
+
return combineCodec74(
|
|
6332
6092
|
getSetUpdateAuthorityInstructionDataEncoder(),
|
|
6333
6093
|
getSetUpdateAuthorityInstructionDataDecoder()
|
|
6334
6094
|
);
|
|
@@ -6380,20 +6140,20 @@ function parseSetUpdateAuthorityInstruction(instruction) {
|
|
|
6380
6140
|
|
|
6381
6141
|
// src/generated/instructions/setWinningOption.ts
|
|
6382
6142
|
import {
|
|
6383
|
-
combineCodec as
|
|
6384
|
-
fixDecoderSize as
|
|
6385
|
-
fixEncoderSize as
|
|
6386
|
-
getAddressEncoder as
|
|
6387
|
-
getBytesDecoder as
|
|
6388
|
-
getBytesEncoder as
|
|
6143
|
+
combineCodec as combineCodec75,
|
|
6144
|
+
fixDecoderSize as fixDecoderSize28,
|
|
6145
|
+
fixEncoderSize as fixEncoderSize29,
|
|
6146
|
+
getAddressEncoder as getAddressEncoder44,
|
|
6147
|
+
getBytesDecoder as getBytesDecoder28,
|
|
6148
|
+
getBytesEncoder as getBytesEncoder29,
|
|
6389
6149
|
getProgramDerivedAddress as getProgramDerivedAddress14,
|
|
6390
|
-
getStructDecoder as
|
|
6391
|
-
getStructEncoder as
|
|
6150
|
+
getStructDecoder as getStructDecoder69,
|
|
6151
|
+
getStructEncoder as getStructEncoder69,
|
|
6392
6152
|
getU16Decoder as getU16Decoder9,
|
|
6393
6153
|
getU16Encoder as getU16Encoder9,
|
|
6394
6154
|
getU64Decoder as getU64Decoder38,
|
|
6395
6155
|
getU64Encoder as getU64Encoder38,
|
|
6396
|
-
transformEncoder as
|
|
6156
|
+
transformEncoder as transformEncoder28
|
|
6397
6157
|
} from "@solana/kit";
|
|
6398
6158
|
var SET_WINNING_OPTION_DISCRIMINATOR = new Uint8Array([
|
|
6399
6159
|
156,
|
|
@@ -6406,14 +6166,14 @@ var SET_WINNING_OPTION_DISCRIMINATOR = new Uint8Array([
|
|
|
6406
6166
|
206
|
|
6407
6167
|
]);
|
|
6408
6168
|
function getSetWinningOptionDiscriminatorBytes() {
|
|
6409
|
-
return
|
|
6169
|
+
return fixEncoderSize29(getBytesEncoder29(), 8).encode(
|
|
6410
6170
|
SET_WINNING_OPTION_DISCRIMINATOR
|
|
6411
6171
|
);
|
|
6412
6172
|
}
|
|
6413
6173
|
function getSetWinningOptionInstructionDataEncoder() {
|
|
6414
|
-
return
|
|
6415
|
-
|
|
6416
|
-
["discriminator",
|
|
6174
|
+
return transformEncoder28(
|
|
6175
|
+
getStructEncoder69([
|
|
6176
|
+
["discriminator", fixEncoderSize29(getBytesEncoder29(), 8)],
|
|
6417
6177
|
["optionId", getU64Encoder38()],
|
|
6418
6178
|
["rewardBp", getU16Encoder9()]
|
|
6419
6179
|
]),
|
|
@@ -6421,14 +6181,14 @@ function getSetWinningOptionInstructionDataEncoder() {
|
|
|
6421
6181
|
);
|
|
6422
6182
|
}
|
|
6423
6183
|
function getSetWinningOptionInstructionDataDecoder() {
|
|
6424
|
-
return
|
|
6425
|
-
["discriminator",
|
|
6184
|
+
return getStructDecoder69([
|
|
6185
|
+
["discriminator", fixDecoderSize28(getBytesDecoder28(), 8)],
|
|
6426
6186
|
["optionId", getU64Decoder38()],
|
|
6427
6187
|
["rewardBp", getU16Decoder9()]
|
|
6428
6188
|
]);
|
|
6429
6189
|
}
|
|
6430
6190
|
function getSetWinningOptionInstructionDataCodec() {
|
|
6431
|
-
return
|
|
6191
|
+
return combineCodec75(
|
|
6432
6192
|
getSetWinningOptionInstructionDataEncoder(),
|
|
6433
6193
|
getSetWinningOptionInstructionDataDecoder()
|
|
6434
6194
|
);
|
|
@@ -6449,10 +6209,10 @@ async function getSetWinningOptionInstructionAsync(input, config) {
|
|
|
6449
6209
|
accounts.option.value = await getProgramDerivedAddress14({
|
|
6450
6210
|
programAddress,
|
|
6451
6211
|
seeds: [
|
|
6452
|
-
|
|
6212
|
+
getBytesEncoder29().encode(
|
|
6453
6213
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
6454
6214
|
),
|
|
6455
|
-
|
|
6215
|
+
getAddressEncoder44().encode(expectAddress(accounts.market.value)),
|
|
6456
6216
|
getU64Encoder38().encode(expectSome(args.optionId))
|
|
6457
6217
|
]
|
|
6458
6218
|
});
|
|
@@ -6518,17 +6278,17 @@ function parseSetWinningOptionInstruction(instruction) {
|
|
|
6518
6278
|
|
|
6519
6279
|
// src/generated/instructions/stake.ts
|
|
6520
6280
|
import {
|
|
6521
|
-
combineCodec as
|
|
6522
|
-
fixDecoderSize as
|
|
6523
|
-
fixEncoderSize as
|
|
6524
|
-
getAddressEncoder as
|
|
6281
|
+
combineCodec as combineCodec76,
|
|
6282
|
+
fixDecoderSize as fixDecoderSize29,
|
|
6283
|
+
fixEncoderSize as fixEncoderSize30,
|
|
6284
|
+
getAddressEncoder as getAddressEncoder45,
|
|
6525
6285
|
getArrayDecoder as getArrayDecoder16,
|
|
6526
6286
|
getArrayEncoder as getArrayEncoder16,
|
|
6527
|
-
getBytesDecoder as
|
|
6528
|
-
getBytesEncoder as
|
|
6287
|
+
getBytesDecoder as getBytesDecoder29,
|
|
6288
|
+
getBytesEncoder as getBytesEncoder30,
|
|
6529
6289
|
getProgramDerivedAddress as getProgramDerivedAddress15,
|
|
6530
|
-
getStructDecoder as
|
|
6531
|
-
getStructEncoder as
|
|
6290
|
+
getStructDecoder as getStructDecoder70,
|
|
6291
|
+
getStructEncoder as getStructEncoder70,
|
|
6532
6292
|
getU128Decoder as getU128Decoder6,
|
|
6533
6293
|
getU128Encoder as getU128Encoder6,
|
|
6534
6294
|
getU32Decoder as getU32Decoder21,
|
|
@@ -6537,7 +6297,7 @@ import {
|
|
|
6537
6297
|
getU64Encoder as getU64Encoder39,
|
|
6538
6298
|
getU8Decoder as getU8Decoder23,
|
|
6539
6299
|
getU8Encoder as getU8Encoder23,
|
|
6540
|
-
transformEncoder as
|
|
6300
|
+
transformEncoder as transformEncoder29
|
|
6541
6301
|
} from "@solana/kit";
|
|
6542
6302
|
var STAKE_DISCRIMINATOR = new Uint8Array([
|
|
6543
6303
|
206,
|
|
@@ -6550,12 +6310,12 @@ var STAKE_DISCRIMINATOR = new Uint8Array([
|
|
|
6550
6310
|
108
|
|
6551
6311
|
]);
|
|
6552
6312
|
function getStakeDiscriminatorBytes() {
|
|
6553
|
-
return
|
|
6313
|
+
return fixEncoderSize30(getBytesEncoder30(), 8).encode(STAKE_DISCRIMINATOR);
|
|
6554
6314
|
}
|
|
6555
6315
|
function getStakeInstructionDataEncoder() {
|
|
6556
|
-
return
|
|
6557
|
-
|
|
6558
|
-
["discriminator",
|
|
6316
|
+
return transformEncoder29(
|
|
6317
|
+
getStructEncoder70([
|
|
6318
|
+
["discriminator", fixEncoderSize30(getBytesEncoder30(), 8)],
|
|
6559
6319
|
["computationOffset", getU64Encoder39()],
|
|
6560
6320
|
["stakeAccountId", getU32Encoder21()],
|
|
6561
6321
|
["amount", getU64Encoder39()],
|
|
@@ -6572,8 +6332,8 @@ function getStakeInstructionDataEncoder() {
|
|
|
6572
6332
|
);
|
|
6573
6333
|
}
|
|
6574
6334
|
function getStakeInstructionDataDecoder() {
|
|
6575
|
-
return
|
|
6576
|
-
["discriminator",
|
|
6335
|
+
return getStructDecoder70([
|
|
6336
|
+
["discriminator", fixDecoderSize29(getBytesDecoder29(), 8)],
|
|
6577
6337
|
["computationOffset", getU64Decoder39()],
|
|
6578
6338
|
["stakeAccountId", getU32Decoder21()],
|
|
6579
6339
|
["amount", getU64Decoder39()],
|
|
@@ -6585,7 +6345,7 @@ function getStakeInstructionDataDecoder() {
|
|
|
6585
6345
|
]);
|
|
6586
6346
|
}
|
|
6587
6347
|
function getStakeInstructionDataCodec() {
|
|
6588
|
-
return
|
|
6348
|
+
return combineCodec76(
|
|
6589
6349
|
getStakeInstructionDataEncoder(),
|
|
6590
6350
|
getStakeInstructionDataDecoder()
|
|
6591
6351
|
);
|
|
@@ -6625,9 +6385,9 @@ async function getStakeInstructionAsync(input, config) {
|
|
|
6625
6385
|
accounts.marketTokenAta.value = await getProgramDerivedAddress15({
|
|
6626
6386
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
6627
6387
|
seeds: [
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6388
|
+
getAddressEncoder45().encode(expectAddress(accounts.market.value)),
|
|
6389
|
+
getAddressEncoder45().encode(expectAddress(accounts.tokenProgram.value)),
|
|
6390
|
+
getAddressEncoder45().encode(expectAddress(accounts.tokenMint.value))
|
|
6631
6391
|
]
|
|
6632
6392
|
});
|
|
6633
6393
|
}
|
|
@@ -6635,7 +6395,7 @@ async function getStakeInstructionAsync(input, config) {
|
|
|
6635
6395
|
accounts.signPdaAccount.value = await getProgramDerivedAddress15({
|
|
6636
6396
|
programAddress,
|
|
6637
6397
|
seeds: [
|
|
6638
|
-
|
|
6398
|
+
getBytesEncoder30().encode(
|
|
6639
6399
|
new Uint8Array([
|
|
6640
6400
|
65,
|
|
6641
6401
|
114,
|
|
@@ -6813,24 +6573,24 @@ function parseStakeInstruction(instruction) {
|
|
|
6813
6573
|
|
|
6814
6574
|
// src/generated/instructions/stakeCallback.ts
|
|
6815
6575
|
import {
|
|
6816
|
-
combineCodec as
|
|
6817
|
-
fixDecoderSize as
|
|
6818
|
-
fixEncoderSize as
|
|
6576
|
+
combineCodec as combineCodec77,
|
|
6577
|
+
fixDecoderSize as fixDecoderSize30,
|
|
6578
|
+
fixEncoderSize as fixEncoderSize31,
|
|
6819
6579
|
getArrayDecoder as getArrayDecoder17,
|
|
6820
6580
|
getArrayEncoder as getArrayEncoder17,
|
|
6821
|
-
getBytesDecoder as
|
|
6822
|
-
getBytesEncoder as
|
|
6581
|
+
getBytesDecoder as getBytesDecoder30,
|
|
6582
|
+
getBytesEncoder as getBytesEncoder31,
|
|
6823
6583
|
getDiscriminatedUnionDecoder as getDiscriminatedUnionDecoder5,
|
|
6824
6584
|
getDiscriminatedUnionEncoder as getDiscriminatedUnionEncoder5,
|
|
6825
|
-
getStructDecoder as
|
|
6826
|
-
getStructEncoder as
|
|
6585
|
+
getStructDecoder as getStructDecoder71,
|
|
6586
|
+
getStructEncoder as getStructEncoder71,
|
|
6827
6587
|
getTupleDecoder as getTupleDecoder7,
|
|
6828
6588
|
getTupleEncoder as getTupleEncoder7,
|
|
6829
6589
|
getU8Decoder as getU8Decoder24,
|
|
6830
6590
|
getU8Encoder as getU8Encoder24,
|
|
6831
6591
|
getUnitDecoder as getUnitDecoder2,
|
|
6832
6592
|
getUnitEncoder as getUnitEncoder2,
|
|
6833
|
-
transformEncoder as
|
|
6593
|
+
transformEncoder as transformEncoder30
|
|
6834
6594
|
} from "@solana/kit";
|
|
6835
6595
|
var STAKE_CALLBACK_DISCRIMINATOR = new Uint8Array([
|
|
6836
6596
|
40,
|
|
@@ -6843,20 +6603,20 @@ var STAKE_CALLBACK_DISCRIMINATOR = new Uint8Array([
|
|
|
6843
6603
|
89
|
|
6844
6604
|
]);
|
|
6845
6605
|
function getStakeCallbackDiscriminatorBytes() {
|
|
6846
|
-
return
|
|
6606
|
+
return fixEncoderSize31(getBytesEncoder31(), 8).encode(
|
|
6847
6607
|
STAKE_CALLBACK_DISCRIMINATOR
|
|
6848
6608
|
);
|
|
6849
6609
|
}
|
|
6850
6610
|
function getStakeCallbackInstructionDataEncoder() {
|
|
6851
|
-
return
|
|
6852
|
-
|
|
6853
|
-
["discriminator",
|
|
6611
|
+
return transformEncoder30(
|
|
6612
|
+
getStructEncoder71([
|
|
6613
|
+
["discriminator", fixEncoderSize31(getBytesEncoder31(), 8)],
|
|
6854
6614
|
[
|
|
6855
6615
|
"output",
|
|
6856
6616
|
getDiscriminatedUnionEncoder5([
|
|
6857
6617
|
[
|
|
6858
6618
|
"Success",
|
|
6859
|
-
|
|
6619
|
+
getStructEncoder71([
|
|
6860
6620
|
[
|
|
6861
6621
|
"fields",
|
|
6862
6622
|
getTupleEncoder7([
|
|
@@ -6869,7 +6629,7 @@ function getStakeCallbackInstructionDataEncoder() {
|
|
|
6869
6629
|
["Failure", getUnitEncoder2()],
|
|
6870
6630
|
[
|
|
6871
6631
|
"MarkerForIdlBuildDoNotUseThis",
|
|
6872
|
-
|
|
6632
|
+
getStructEncoder71([
|
|
6873
6633
|
["fields", getTupleEncoder7([getStakeOutputEncoder()])]
|
|
6874
6634
|
])
|
|
6875
6635
|
]
|
|
@@ -6880,14 +6640,14 @@ function getStakeCallbackInstructionDataEncoder() {
|
|
|
6880
6640
|
);
|
|
6881
6641
|
}
|
|
6882
6642
|
function getStakeCallbackInstructionDataDecoder() {
|
|
6883
|
-
return
|
|
6884
|
-
["discriminator",
|
|
6643
|
+
return getStructDecoder71([
|
|
6644
|
+
["discriminator", fixDecoderSize30(getBytesDecoder30(), 8)],
|
|
6885
6645
|
[
|
|
6886
6646
|
"output",
|
|
6887
6647
|
getDiscriminatedUnionDecoder5([
|
|
6888
6648
|
[
|
|
6889
6649
|
"Success",
|
|
6890
|
-
|
|
6650
|
+
getStructDecoder71([
|
|
6891
6651
|
[
|
|
6892
6652
|
"fields",
|
|
6893
6653
|
getTupleDecoder7([
|
|
@@ -6900,7 +6660,7 @@ function getStakeCallbackInstructionDataDecoder() {
|
|
|
6900
6660
|
["Failure", getUnitDecoder2()],
|
|
6901
6661
|
[
|
|
6902
6662
|
"MarkerForIdlBuildDoNotUseThis",
|
|
6903
|
-
|
|
6663
|
+
getStructDecoder71([
|
|
6904
6664
|
["fields", getTupleDecoder7([getStakeOutputDecoder()])]
|
|
6905
6665
|
])
|
|
6906
6666
|
]
|
|
@@ -6909,7 +6669,7 @@ function getStakeCallbackInstructionDataDecoder() {
|
|
|
6909
6669
|
]);
|
|
6910
6670
|
}
|
|
6911
6671
|
function getStakeCallbackInstructionDataCodec() {
|
|
6912
|
-
return
|
|
6672
|
+
return combineCodec77(
|
|
6913
6673
|
getStakeCallbackInstructionDataEncoder(),
|
|
6914
6674
|
getStakeCallbackInstructionDataDecoder()
|
|
6915
6675
|
);
|
|
@@ -6986,14 +6746,14 @@ function parseStakeCallbackInstruction(instruction) {
|
|
|
6986
6746
|
|
|
6987
6747
|
// src/generated/instructions/stakeCompDef.ts
|
|
6988
6748
|
import {
|
|
6989
|
-
combineCodec as
|
|
6990
|
-
fixDecoderSize as
|
|
6991
|
-
fixEncoderSize as
|
|
6992
|
-
getBytesDecoder as
|
|
6993
|
-
getBytesEncoder as
|
|
6994
|
-
getStructDecoder as
|
|
6995
|
-
getStructEncoder as
|
|
6996
|
-
transformEncoder as
|
|
6749
|
+
combineCodec as combineCodec78,
|
|
6750
|
+
fixDecoderSize as fixDecoderSize31,
|
|
6751
|
+
fixEncoderSize as fixEncoderSize32,
|
|
6752
|
+
getBytesDecoder as getBytesDecoder31,
|
|
6753
|
+
getBytesEncoder as getBytesEncoder32,
|
|
6754
|
+
getStructDecoder as getStructDecoder72,
|
|
6755
|
+
getStructEncoder as getStructEncoder72,
|
|
6756
|
+
transformEncoder as transformEncoder31
|
|
6997
6757
|
} from "@solana/kit";
|
|
6998
6758
|
var STAKE_COMP_DEF_DISCRIMINATOR = new Uint8Array([
|
|
6999
6759
|
156,
|
|
@@ -7006,23 +6766,23 @@ var STAKE_COMP_DEF_DISCRIMINATOR = new Uint8Array([
|
|
|
7006
6766
|
130
|
|
7007
6767
|
]);
|
|
7008
6768
|
function getStakeCompDefDiscriminatorBytes() {
|
|
7009
|
-
return
|
|
6769
|
+
return fixEncoderSize32(getBytesEncoder32(), 8).encode(
|
|
7010
6770
|
STAKE_COMP_DEF_DISCRIMINATOR
|
|
7011
6771
|
);
|
|
7012
6772
|
}
|
|
7013
6773
|
function getStakeCompDefInstructionDataEncoder() {
|
|
7014
|
-
return
|
|
7015
|
-
|
|
6774
|
+
return transformEncoder31(
|
|
6775
|
+
getStructEncoder72([["discriminator", fixEncoderSize32(getBytesEncoder32(), 8)]]),
|
|
7016
6776
|
(value) => ({ ...value, discriminator: STAKE_COMP_DEF_DISCRIMINATOR })
|
|
7017
6777
|
);
|
|
7018
6778
|
}
|
|
7019
6779
|
function getStakeCompDefInstructionDataDecoder() {
|
|
7020
|
-
return
|
|
7021
|
-
["discriminator",
|
|
6780
|
+
return getStructDecoder72([
|
|
6781
|
+
["discriminator", fixDecoderSize31(getBytesDecoder31(), 8)]
|
|
7022
6782
|
]);
|
|
7023
6783
|
}
|
|
7024
6784
|
function getStakeCompDefInstructionDataCodec() {
|
|
7025
|
-
return
|
|
6785
|
+
return combineCodec78(
|
|
7026
6786
|
getStakeCompDefInstructionDataEncoder(),
|
|
7027
6787
|
getStakeCompDefInstructionDataDecoder()
|
|
7028
6788
|
);
|
|
@@ -7093,18 +6853,18 @@ function parseStakeCompDefInstruction(instruction) {
|
|
|
7093
6853
|
|
|
7094
6854
|
// src/generated/instructions/unstake.ts
|
|
7095
6855
|
import {
|
|
7096
|
-
combineCodec as
|
|
7097
|
-
fixDecoderSize as
|
|
7098
|
-
fixEncoderSize as
|
|
7099
|
-
getAddressEncoder as
|
|
7100
|
-
getBytesDecoder as
|
|
7101
|
-
getBytesEncoder as
|
|
6856
|
+
combineCodec as combineCodec79,
|
|
6857
|
+
fixDecoderSize as fixDecoderSize32,
|
|
6858
|
+
fixEncoderSize as fixEncoderSize33,
|
|
6859
|
+
getAddressEncoder as getAddressEncoder46,
|
|
6860
|
+
getBytesDecoder as getBytesDecoder32,
|
|
6861
|
+
getBytesEncoder as getBytesEncoder33,
|
|
7102
6862
|
getProgramDerivedAddress as getProgramDerivedAddress16,
|
|
7103
|
-
getStructDecoder as
|
|
7104
|
-
getStructEncoder as
|
|
6863
|
+
getStructDecoder as getStructDecoder73,
|
|
6864
|
+
getStructEncoder as getStructEncoder73,
|
|
7105
6865
|
getU32Decoder as getU32Decoder22,
|
|
7106
6866
|
getU32Encoder as getU32Encoder22,
|
|
7107
|
-
transformEncoder as
|
|
6867
|
+
transformEncoder as transformEncoder32
|
|
7108
6868
|
} from "@solana/kit";
|
|
7109
6869
|
var UNSTAKE_DISCRIMINATOR = new Uint8Array([
|
|
7110
6870
|
90,
|
|
@@ -7117,25 +6877,25 @@ var UNSTAKE_DISCRIMINATOR = new Uint8Array([
|
|
|
7117
6877
|
225
|
|
7118
6878
|
]);
|
|
7119
6879
|
function getUnstakeDiscriminatorBytes() {
|
|
7120
|
-
return
|
|
6880
|
+
return fixEncoderSize33(getBytesEncoder33(), 8).encode(UNSTAKE_DISCRIMINATOR);
|
|
7121
6881
|
}
|
|
7122
6882
|
function getUnstakeInstructionDataEncoder() {
|
|
7123
|
-
return
|
|
7124
|
-
|
|
7125
|
-
["discriminator",
|
|
6883
|
+
return transformEncoder32(
|
|
6884
|
+
getStructEncoder73([
|
|
6885
|
+
["discriminator", fixEncoderSize33(getBytesEncoder33(), 8)],
|
|
7126
6886
|
["stakeAccountId", getU32Encoder22()]
|
|
7127
6887
|
]),
|
|
7128
6888
|
(value) => ({ ...value, discriminator: UNSTAKE_DISCRIMINATOR })
|
|
7129
6889
|
);
|
|
7130
6890
|
}
|
|
7131
6891
|
function getUnstakeInstructionDataDecoder() {
|
|
7132
|
-
return
|
|
7133
|
-
["discriminator",
|
|
6892
|
+
return getStructDecoder73([
|
|
6893
|
+
["discriminator", fixDecoderSize32(getBytesDecoder32(), 8)],
|
|
7134
6894
|
["stakeAccountId", getU32Decoder22()]
|
|
7135
6895
|
]);
|
|
7136
6896
|
}
|
|
7137
6897
|
function getUnstakeInstructionDataCodec() {
|
|
7138
|
-
return
|
|
6898
|
+
return combineCodec79(
|
|
7139
6899
|
getUnstakeInstructionDataEncoder(),
|
|
7140
6900
|
getUnstakeInstructionDataDecoder()
|
|
7141
6901
|
);
|
|
@@ -7162,7 +6922,7 @@ async function getUnstakeInstructionAsync(input, config) {
|
|
|
7162
6922
|
accounts.stakeAccount.value = await getProgramDerivedAddress16({
|
|
7163
6923
|
programAddress,
|
|
7164
6924
|
seeds: [
|
|
7165
|
-
|
|
6925
|
+
getBytesEncoder33().encode(
|
|
7166
6926
|
new Uint8Array([
|
|
7167
6927
|
115,
|
|
7168
6928
|
116,
|
|
@@ -7179,8 +6939,8 @@ async function getUnstakeInstructionAsync(input, config) {
|
|
|
7179
6939
|
116
|
|
7180
6940
|
])
|
|
7181
6941
|
),
|
|
7182
|
-
|
|
7183
|
-
|
|
6942
|
+
getAddressEncoder46().encode(expectAddress(accounts.owner.value)),
|
|
6943
|
+
getAddressEncoder46().encode(expectAddress(accounts.market.value)),
|
|
7184
6944
|
getU32Encoder22().encode(expectSome(args.stakeAccountId))
|
|
7185
6945
|
]
|
|
7186
6946
|
});
|
|
@@ -7189,9 +6949,9 @@ async function getUnstakeInstructionAsync(input, config) {
|
|
|
7189
6949
|
accounts.marketTokenAta.value = await getProgramDerivedAddress16({
|
|
7190
6950
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
7191
6951
|
seeds: [
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
6952
|
+
getAddressEncoder46().encode(expectAddress(accounts.market.value)),
|
|
6953
|
+
getAddressEncoder46().encode(expectAddress(accounts.tokenProgram.value)),
|
|
6954
|
+
getAddressEncoder46().encode(expectAddress(accounts.tokenMint.value))
|
|
7195
6955
|
]
|
|
7196
6956
|
});
|
|
7197
6957
|
}
|
|
@@ -7286,18 +7046,20 @@ function parseUnstakeInstruction(instruction) {
|
|
|
7286
7046
|
|
|
7287
7047
|
// src/generated/instructions/updatePlatformConfig.ts
|
|
7288
7048
|
import {
|
|
7289
|
-
combineCodec as
|
|
7290
|
-
fixDecoderSize as
|
|
7291
|
-
fixEncoderSize as
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7049
|
+
combineCodec as combineCodec80,
|
|
7050
|
+
fixDecoderSize as fixDecoderSize33,
|
|
7051
|
+
fixEncoderSize as fixEncoderSize34,
|
|
7052
|
+
getAddressDecoder as getAddressDecoder33,
|
|
7053
|
+
getAddressEncoder as getAddressEncoder47,
|
|
7054
|
+
getBytesDecoder as getBytesDecoder33,
|
|
7055
|
+
getBytesEncoder as getBytesEncoder34,
|
|
7056
|
+
getStructDecoder as getStructDecoder74,
|
|
7057
|
+
getStructEncoder as getStructEncoder74,
|
|
7296
7058
|
getU16Decoder as getU16Decoder10,
|
|
7297
7059
|
getU16Encoder as getU16Encoder10,
|
|
7298
7060
|
getU64Decoder as getU64Decoder40,
|
|
7299
7061
|
getU64Encoder as getU64Encoder40,
|
|
7300
|
-
transformEncoder as
|
|
7062
|
+
transformEncoder as transformEncoder33
|
|
7301
7063
|
} from "@solana/kit";
|
|
7302
7064
|
var UPDATE_PLATFORM_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
7303
7065
|
195,
|
|
@@ -7310,20 +7072,20 @@ var UPDATE_PLATFORM_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
|
7310
7072
|
143
|
|
7311
7073
|
]);
|
|
7312
7074
|
function getUpdatePlatformConfigDiscriminatorBytes() {
|
|
7313
|
-
return
|
|
7075
|
+
return fixEncoderSize34(getBytesEncoder34(), 8).encode(
|
|
7314
7076
|
UPDATE_PLATFORM_CONFIG_DISCRIMINATOR
|
|
7315
7077
|
);
|
|
7316
7078
|
}
|
|
7317
7079
|
function getUpdatePlatformConfigInstructionDataEncoder() {
|
|
7318
|
-
return
|
|
7319
|
-
|
|
7320
|
-
["discriminator",
|
|
7080
|
+
return transformEncoder33(
|
|
7081
|
+
getStructEncoder74([
|
|
7082
|
+
["discriminator", fixEncoderSize34(getBytesEncoder34(), 8)],
|
|
7321
7083
|
["platformFeeBp", getU16Encoder10()],
|
|
7322
7084
|
["rewardPoolFeeBp", getU16Encoder10()],
|
|
7323
7085
|
["creatorFeeBp", getU16Encoder10()],
|
|
7086
|
+
["revealAuthority", getAddressEncoder47()],
|
|
7324
7087
|
["minTimeToStakeSeconds", getU64Encoder40()],
|
|
7325
|
-
["
|
|
7326
|
-
["maxRevealPeriodSeconds", getU64Encoder40()],
|
|
7088
|
+
["revealPeriodSeconds", getU64Encoder40()],
|
|
7327
7089
|
["marketResolutionDeadlineSeconds", getU64Encoder40()]
|
|
7328
7090
|
]),
|
|
7329
7091
|
(value) => ({
|
|
@@ -7333,19 +7095,19 @@ function getUpdatePlatformConfigInstructionDataEncoder() {
|
|
|
7333
7095
|
);
|
|
7334
7096
|
}
|
|
7335
7097
|
function getUpdatePlatformConfigInstructionDataDecoder() {
|
|
7336
|
-
return
|
|
7337
|
-
["discriminator",
|
|
7098
|
+
return getStructDecoder74([
|
|
7099
|
+
["discriminator", fixDecoderSize33(getBytesDecoder33(), 8)],
|
|
7338
7100
|
["platformFeeBp", getU16Decoder10()],
|
|
7339
7101
|
["rewardPoolFeeBp", getU16Decoder10()],
|
|
7340
7102
|
["creatorFeeBp", getU16Decoder10()],
|
|
7103
|
+
["revealAuthority", getAddressDecoder33()],
|
|
7341
7104
|
["minTimeToStakeSeconds", getU64Decoder40()],
|
|
7342
|
-
["
|
|
7343
|
-
["maxRevealPeriodSeconds", getU64Decoder40()],
|
|
7105
|
+
["revealPeriodSeconds", getU64Decoder40()],
|
|
7344
7106
|
["marketResolutionDeadlineSeconds", getU64Decoder40()]
|
|
7345
7107
|
]);
|
|
7346
7108
|
}
|
|
7347
7109
|
function getUpdatePlatformConfigInstructionDataCodec() {
|
|
7348
|
-
return
|
|
7110
|
+
return combineCodec80(
|
|
7349
7111
|
getUpdatePlatformConfigInstructionDataEncoder(),
|
|
7350
7112
|
getUpdatePlatformConfigInstructionDataDecoder()
|
|
7351
7113
|
);
|
|
@@ -7397,16 +7159,16 @@ function parseUpdatePlatformConfigInstruction(instruction) {
|
|
|
7397
7159
|
|
|
7398
7160
|
// src/generated/instructions/withdrawReward.ts
|
|
7399
7161
|
import {
|
|
7400
|
-
combineCodec as
|
|
7401
|
-
fixDecoderSize as
|
|
7402
|
-
fixEncoderSize as
|
|
7403
|
-
getAddressEncoder as
|
|
7404
|
-
getBytesDecoder as
|
|
7405
|
-
getBytesEncoder as
|
|
7162
|
+
combineCodec as combineCodec81,
|
|
7163
|
+
fixDecoderSize as fixDecoderSize34,
|
|
7164
|
+
fixEncoderSize as fixEncoderSize35,
|
|
7165
|
+
getAddressEncoder as getAddressEncoder48,
|
|
7166
|
+
getBytesDecoder as getBytesDecoder34,
|
|
7167
|
+
getBytesEncoder as getBytesEncoder35,
|
|
7406
7168
|
getProgramDerivedAddress as getProgramDerivedAddress17,
|
|
7407
|
-
getStructDecoder as
|
|
7408
|
-
getStructEncoder as
|
|
7409
|
-
transformEncoder as
|
|
7169
|
+
getStructDecoder as getStructDecoder75,
|
|
7170
|
+
getStructEncoder as getStructEncoder75,
|
|
7171
|
+
transformEncoder as transformEncoder34
|
|
7410
7172
|
} from "@solana/kit";
|
|
7411
7173
|
var WITHDRAW_REWARD_DISCRIMINATOR = new Uint8Array([
|
|
7412
7174
|
191,
|
|
@@ -7419,23 +7181,23 @@ var WITHDRAW_REWARD_DISCRIMINATOR = new Uint8Array([
|
|
|
7419
7181
|
244
|
|
7420
7182
|
]);
|
|
7421
7183
|
function getWithdrawRewardDiscriminatorBytes() {
|
|
7422
|
-
return
|
|
7184
|
+
return fixEncoderSize35(getBytesEncoder35(), 8).encode(
|
|
7423
7185
|
WITHDRAW_REWARD_DISCRIMINATOR
|
|
7424
7186
|
);
|
|
7425
7187
|
}
|
|
7426
7188
|
function getWithdrawRewardInstructionDataEncoder() {
|
|
7427
|
-
return
|
|
7428
|
-
|
|
7189
|
+
return transformEncoder34(
|
|
7190
|
+
getStructEncoder75([["discriminator", fixEncoderSize35(getBytesEncoder35(), 8)]]),
|
|
7429
7191
|
(value) => ({ ...value, discriminator: WITHDRAW_REWARD_DISCRIMINATOR })
|
|
7430
7192
|
);
|
|
7431
7193
|
}
|
|
7432
7194
|
function getWithdrawRewardInstructionDataDecoder() {
|
|
7433
|
-
return
|
|
7434
|
-
["discriminator",
|
|
7195
|
+
return getStructDecoder75([
|
|
7196
|
+
["discriminator", fixDecoderSize34(getBytesDecoder34(), 8)]
|
|
7435
7197
|
]);
|
|
7436
7198
|
}
|
|
7437
7199
|
function getWithdrawRewardInstructionDataCodec() {
|
|
7438
|
-
return
|
|
7200
|
+
return combineCodec81(
|
|
7439
7201
|
getWithdrawRewardInstructionDataEncoder(),
|
|
7440
7202
|
getWithdrawRewardInstructionDataDecoder()
|
|
7441
7203
|
);
|
|
@@ -7459,11 +7221,11 @@ async function getWithdrawRewardInstructionAsync(input, config) {
|
|
|
7459
7221
|
accounts.sponsorAccount.value = await getProgramDerivedAddress17({
|
|
7460
7222
|
programAddress,
|
|
7461
7223
|
seeds: [
|
|
7462
|
-
|
|
7224
|
+
getBytesEncoder35().encode(
|
|
7463
7225
|
new Uint8Array([115, 112, 111, 110, 115, 111, 114])
|
|
7464
7226
|
),
|
|
7465
|
-
|
|
7466
|
-
|
|
7227
|
+
getAddressEncoder48().encode(expectAddress(accounts.sponsor.value)),
|
|
7228
|
+
getAddressEncoder48().encode(expectAddress(accounts.market.value))
|
|
7467
7229
|
]
|
|
7468
7230
|
});
|
|
7469
7231
|
}
|
|
@@ -7471,9 +7233,9 @@ async function getWithdrawRewardInstructionAsync(input, config) {
|
|
|
7471
7233
|
accounts.marketTokenAta.value = await getProgramDerivedAddress17({
|
|
7472
7234
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
7473
7235
|
seeds: [
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7236
|
+
getAddressEncoder48().encode(expectAddress(accounts.market.value)),
|
|
7237
|
+
getAddressEncoder48().encode(expectAddress(accounts.tokenProgram.value)),
|
|
7238
|
+
getAddressEncoder48().encode(expectAddress(accounts.tokenMint.value))
|
|
7477
7239
|
]
|
|
7478
7240
|
});
|
|
7479
7241
|
}
|
|
@@ -7687,6 +7449,44 @@ function getComputeAccounts(ixName, config) {
|
|
|
7687
7449
|
};
|
|
7688
7450
|
}
|
|
7689
7451
|
|
|
7452
|
+
// src/arcium/awaitFinalizeComputation.ts
|
|
7453
|
+
var TIMEOUT_SLOTS = 180;
|
|
7454
|
+
var DEFAULT_POLL_INTERVAL = 1e3;
|
|
7455
|
+
var DEFAULT_SIGNATURE_LIMIT = 100;
|
|
7456
|
+
var awaitComputationFinalization = async (rpc, computationAccount, invocationSignature, options) => {
|
|
7457
|
+
const commitment = options?.commitment ?? "confirmed";
|
|
7458
|
+
const pollInterval = options?.pollInterval ?? DEFAULT_POLL_INTERVAL;
|
|
7459
|
+
const limit = options?.transactionCountLimit ?? DEFAULT_SIGNATURE_LIMIT;
|
|
7460
|
+
const invocationTx = await rpc.getTransaction(invocationSignature, {
|
|
7461
|
+
commitment,
|
|
7462
|
+
encoding: "json",
|
|
7463
|
+
maxSupportedTransactionVersion: 0
|
|
7464
|
+
}).send();
|
|
7465
|
+
if (!invocationTx) {
|
|
7466
|
+
throw new Error(`Invocation transaction ${invocationSignature} not found`);
|
|
7467
|
+
}
|
|
7468
|
+
const deadlineSlot = invocationTx.slot + BigInt(TIMEOUT_SLOTS);
|
|
7469
|
+
for (; ; ) {
|
|
7470
|
+
const signatures = await rpc.getSignaturesForAddress(computationAccount, {
|
|
7471
|
+
limit,
|
|
7472
|
+
commitment
|
|
7473
|
+
}).send();
|
|
7474
|
+
for (const sigInfo of signatures) {
|
|
7475
|
+
if (sigInfo.signature === invocationSignature) continue;
|
|
7476
|
+
if (sigInfo.err === null) {
|
|
7477
|
+
return sigInfo.signature;
|
|
7478
|
+
}
|
|
7479
|
+
}
|
|
7480
|
+
const currentSlot = await rpc.getSlot({ commitment }).send();
|
|
7481
|
+
if (currentSlot > deadlineSlot) {
|
|
7482
|
+
throw new Error(
|
|
7483
|
+
`Computation ${computationAccount} not finalized within ${TIMEOUT_SLOTS} slots of invocation ${invocationSignature}`
|
|
7484
|
+
);
|
|
7485
|
+
}
|
|
7486
|
+
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
7487
|
+
}
|
|
7488
|
+
};
|
|
7489
|
+
|
|
7690
7490
|
// src/instructions/stake.ts
|
|
7691
7491
|
async function stake(input, config) {
|
|
7692
7492
|
const {
|
|
@@ -7727,6 +7527,10 @@ async function stake(input, config) {
|
|
|
7727
7527
|
programAddress ? { programAddress } : void 0
|
|
7728
7528
|
);
|
|
7729
7529
|
}
|
|
7530
|
+
async function awaitStakeFinalization(rpc, txSignature, config, options) {
|
|
7531
|
+
const { computationAccount } = getComputeAccounts("stake", config);
|
|
7532
|
+
return awaitComputationFinalization(rpc, computationAccount, txSignature, options);
|
|
7533
|
+
}
|
|
7730
7534
|
|
|
7731
7535
|
// src/instructions/revealStake.ts
|
|
7732
7536
|
async function revealStake(input, config) {
|
|
@@ -7742,6 +7546,10 @@ async function revealStake(input, config) {
|
|
|
7742
7546
|
programAddress ? { programAddress } : void 0
|
|
7743
7547
|
);
|
|
7744
7548
|
}
|
|
7549
|
+
async function awaitRevealStakeFinalization(rpc, txSignature, config, options) {
|
|
7550
|
+
const { computationAccount } = getComputeAccounts("reveal_stake", config);
|
|
7551
|
+
return awaitComputationFinalization(rpc, computationAccount, txSignature, options);
|
|
7552
|
+
}
|
|
7745
7553
|
|
|
7746
7554
|
// src/instructions/addMarketOption.ts
|
|
7747
7555
|
async function addMarketOption(input) {
|
|
@@ -7761,24 +7569,6 @@ function openMarket(input) {
|
|
|
7761
7569
|
);
|
|
7762
7570
|
}
|
|
7763
7571
|
|
|
7764
|
-
// src/instructions/pauseStaking.ts
|
|
7765
|
-
function pauseStaking(input) {
|
|
7766
|
-
const { programAddress, ...params } = input;
|
|
7767
|
-
return getPauseStakingInstruction(
|
|
7768
|
-
params,
|
|
7769
|
-
programAddress ? { programAddress } : void 0
|
|
7770
|
-
);
|
|
7771
|
-
}
|
|
7772
|
-
|
|
7773
|
-
// src/instructions/resumeStaking.ts
|
|
7774
|
-
function resumeStaking(input) {
|
|
7775
|
-
const { programAddress, ...params } = input;
|
|
7776
|
-
return getResumeStakingInstruction(
|
|
7777
|
-
params,
|
|
7778
|
-
programAddress ? { programAddress } : void 0
|
|
7779
|
-
);
|
|
7780
|
-
}
|
|
7781
|
-
|
|
7782
7572
|
// src/instructions/setWinningOption.ts
|
|
7783
7573
|
async function setWinningOption(input) {
|
|
7784
7574
|
const { programAddress, ...params } = input;
|
|
@@ -7880,7 +7670,7 @@ async function finalizeRevealStake(input) {
|
|
|
7880
7670
|
|
|
7881
7671
|
// src/accounts/platformConfig.ts
|
|
7882
7672
|
import {
|
|
7883
|
-
getAddressEncoder as
|
|
7673
|
+
getAddressEncoder as getAddressEncoder49,
|
|
7884
7674
|
getProgramDerivedAddress as getProgramDerivedAddress18,
|
|
7885
7675
|
getUtf8Encoder as getUtf8Encoder4
|
|
7886
7676
|
} from "@solana/kit";
|
|
@@ -7890,7 +7680,7 @@ async function getPlatformConfigAddress(authority, name, programId = OPPORTUNITY
|
|
|
7890
7680
|
programAddress: programId,
|
|
7891
7681
|
seeds: [
|
|
7892
7682
|
PLATFORM_CONFIG_SEED,
|
|
7893
|
-
|
|
7683
|
+
getAddressEncoder49().encode(authority),
|
|
7894
7684
|
getUtf8Encoder4().encode(name)
|
|
7895
7685
|
]
|
|
7896
7686
|
});
|
|
@@ -7906,9 +7696,9 @@ async function createPlatformConfig(rpc, params) {
|
|
|
7906
7696
|
rewardPoolFeeBp,
|
|
7907
7697
|
creatorFeeBp,
|
|
7908
7698
|
feeClaimAuthority,
|
|
7699
|
+
revealAuthority,
|
|
7909
7700
|
minTimeToStakeSeconds,
|
|
7910
|
-
|
|
7911
|
-
maxRevealPeriodSeconds,
|
|
7701
|
+
revealPeriodSeconds,
|
|
7912
7702
|
marketResolutionDeadlineSeconds
|
|
7913
7703
|
} = params;
|
|
7914
7704
|
const [platformConfigAddress] = await getPlatformConfigAddress(
|
|
@@ -7930,9 +7720,9 @@ async function createPlatformConfig(rpc, params) {
|
|
|
7930
7720
|
rewardPoolFeeBp,
|
|
7931
7721
|
creatorFeeBp,
|
|
7932
7722
|
feeClaimAuthority,
|
|
7723
|
+
revealAuthority,
|
|
7933
7724
|
minTimeToStakeSeconds,
|
|
7934
|
-
|
|
7935
|
-
maxRevealPeriodSeconds,
|
|
7725
|
+
revealPeriodSeconds,
|
|
7936
7726
|
marketResolutionDeadlineSeconds
|
|
7937
7727
|
},
|
|
7938
7728
|
programAddress ? { programAddress } : void 0
|
|
@@ -7948,9 +7738,9 @@ async function updatePlatformConfig(rpc, params) {
|
|
|
7948
7738
|
platformFeeBp,
|
|
7949
7739
|
rewardPoolFeeBp,
|
|
7950
7740
|
creatorFeeBp,
|
|
7741
|
+
revealAuthority,
|
|
7951
7742
|
minTimeToStakeSeconds,
|
|
7952
|
-
|
|
7953
|
-
maxRevealPeriodSeconds,
|
|
7743
|
+
revealPeriodSeconds,
|
|
7954
7744
|
marketResolutionDeadlineSeconds
|
|
7955
7745
|
} = params;
|
|
7956
7746
|
const [platformConfigAddress] = await getPlatformConfigAddress(
|
|
@@ -7971,9 +7761,9 @@ async function updatePlatformConfig(rpc, params) {
|
|
|
7971
7761
|
platformFeeBp,
|
|
7972
7762
|
rewardPoolFeeBp,
|
|
7973
7763
|
creatorFeeBp,
|
|
7764
|
+
revealAuthority,
|
|
7974
7765
|
minTimeToStakeSeconds,
|
|
7975
|
-
|
|
7976
|
-
maxRevealPeriodSeconds,
|
|
7766
|
+
revealPeriodSeconds,
|
|
7977
7767
|
marketResolutionDeadlineSeconds
|
|
7978
7768
|
},
|
|
7979
7769
|
programAddress ? { programAddress } : void 0
|
|
@@ -8027,12 +7817,12 @@ function setFeeClaimAuthority(input) {
|
|
|
8027
7817
|
|
|
8028
7818
|
// src/accounts/allowedMint.ts
|
|
8029
7819
|
import {
|
|
8030
|
-
getAddressEncoder as
|
|
7820
|
+
getAddressEncoder as getAddressEncoder50,
|
|
8031
7821
|
getProgramDerivedAddress as getProgramDerivedAddress19
|
|
8032
7822
|
} from "@solana/kit";
|
|
8033
7823
|
var ALLOWED_MINT_SEED = "allowed_mint";
|
|
8034
7824
|
async function getAllowedMintAddress(platformConfig, mint, programId = OPPORTUNITY_MARKET_PROGRAM_ADDRESS) {
|
|
8035
|
-
const enc =
|
|
7825
|
+
const enc = getAddressEncoder50();
|
|
8036
7826
|
return getProgramDerivedAddress19({
|
|
8037
7827
|
programAddress: programId,
|
|
8038
7828
|
seeds: [ALLOWED_MINT_SEED, enc.encode(platformConfig), enc.encode(mint)]
|
|
@@ -8041,7 +7831,7 @@ async function getAllowedMintAddress(platformConfig, mint, programId = OPPORTUNI
|
|
|
8041
7831
|
|
|
8042
7832
|
// src/accounts/opportunityMarket.ts
|
|
8043
7833
|
import {
|
|
8044
|
-
getAddressEncoder as
|
|
7834
|
+
getAddressEncoder as getAddressEncoder51,
|
|
8045
7835
|
getU64Encoder as getU64Encoder41,
|
|
8046
7836
|
getProgramDerivedAddress as getProgramDerivedAddress20
|
|
8047
7837
|
} from "@solana/kit";
|
|
@@ -8051,8 +7841,8 @@ async function getOpportunityMarketAddress(platformConfig, creator, marketIndex,
|
|
|
8051
7841
|
programAddress: programId,
|
|
8052
7842
|
seeds: [
|
|
8053
7843
|
OPPORTUNITY_MARKET_SEED,
|
|
8054
|
-
|
|
8055
|
-
|
|
7844
|
+
getAddressEncoder51().encode(platformConfig),
|
|
7845
|
+
getAddressEncoder51().encode(creator),
|
|
8056
7846
|
getU64Encoder41().encode(BigInt(marketIndex))
|
|
8057
7847
|
]
|
|
8058
7848
|
});
|
|
@@ -8060,7 +7850,7 @@ async function getOpportunityMarketAddress(platformConfig, creator, marketIndex,
|
|
|
8060
7850
|
|
|
8061
7851
|
// src/accounts/opportunityMarketOption.ts
|
|
8062
7852
|
import {
|
|
8063
|
-
getAddressEncoder as
|
|
7853
|
+
getAddressEncoder as getAddressEncoder52,
|
|
8064
7854
|
getU64Encoder as getU64Encoder42,
|
|
8065
7855
|
getProgramDerivedAddress as getProgramDerivedAddress21
|
|
8066
7856
|
} from "@solana/kit";
|
|
@@ -8070,7 +7860,7 @@ async function getOpportunityMarketOptionAddress(market, optionId, programId = O
|
|
|
8070
7860
|
programAddress: programId,
|
|
8071
7861
|
seeds: [
|
|
8072
7862
|
OPPORTUNITY_MARKET_OPTION_SEED,
|
|
8073
|
-
|
|
7863
|
+
getAddressEncoder52().encode(market),
|
|
8074
7864
|
getU64Encoder42().encode(optionId)
|
|
8075
7865
|
]
|
|
8076
7866
|
});
|
|
@@ -8078,12 +7868,12 @@ async function getOpportunityMarketOptionAddress(market, optionId, programId = O
|
|
|
8078
7868
|
|
|
8079
7869
|
// src/accounts/opportunityMarketSponsor.ts
|
|
8080
7870
|
import {
|
|
8081
|
-
getAddressEncoder as
|
|
7871
|
+
getAddressEncoder as getAddressEncoder53,
|
|
8082
7872
|
getProgramDerivedAddress as getProgramDerivedAddress22
|
|
8083
7873
|
} from "@solana/kit";
|
|
8084
7874
|
var SPONSOR_SEED = "sponsor";
|
|
8085
7875
|
async function getOpportunityMarketSponsorAddress(sponsor, market, programId = OPPORTUNITY_MARKET_PROGRAM_ADDRESS) {
|
|
8086
|
-
const addressEncoder =
|
|
7876
|
+
const addressEncoder = getAddressEncoder53();
|
|
8087
7877
|
return getProgramDerivedAddress22({
|
|
8088
7878
|
programAddress: programId,
|
|
8089
7879
|
seeds: [
|
|
@@ -8096,12 +7886,12 @@ async function getOpportunityMarketSponsorAddress(sponsor, market, programId = O
|
|
|
8096
7886
|
|
|
8097
7887
|
// src/accounts/stakeAccount.ts
|
|
8098
7888
|
import {
|
|
8099
|
-
getAddressEncoder as
|
|
7889
|
+
getAddressEncoder as getAddressEncoder54,
|
|
8100
7890
|
getProgramDerivedAddress as getProgramDerivedAddress23
|
|
8101
7891
|
} from "@solana/kit";
|
|
8102
7892
|
var STAKE_ACCOUNT_SEED = "stake_account";
|
|
8103
7893
|
async function getStakeAccountAddress(owner, market, stakeAccountId, programId = OPPORTUNITY_MARKET_PROGRAM_ADDRESS) {
|
|
8104
|
-
const addressEncoder =
|
|
7894
|
+
const addressEncoder = getAddressEncoder54();
|
|
8105
7895
|
const idBytes = new Uint8Array(4);
|
|
8106
7896
|
new DataView(idBytes.buffer).setUint32(0, stakeAccountId, true);
|
|
8107
7897
|
return getProgramDerivedAddress23({
|
|
@@ -8115,115 +7905,6 @@ async function getStakeAccountAddress(owner, market, stakeAccountId, programId =
|
|
|
8115
7905
|
});
|
|
8116
7906
|
}
|
|
8117
7907
|
|
|
8118
|
-
// src/arcium/awaitFinalizeComputation.ts
|
|
8119
|
-
import { getAddressEncoder as getAddressEncoder56 } from "@solana/kit";
|
|
8120
|
-
|
|
8121
|
-
// src/arcium/constants.ts
|
|
8122
|
-
var ARCIUM_PROGRAM_ID = "Arcj82pX7HxYKLR92qvgZUAd7vGS1k4hQvAFcPATFdEQ";
|
|
8123
|
-
|
|
8124
|
-
// src/arcium/awaitFinalizeComputation.ts
|
|
8125
|
-
var FINALIZE_COMPUTATION_EVENT_DISCRIMINATOR = new Uint8Array([27, 75, 117, 221, 191, 213, 253, 249]);
|
|
8126
|
-
function serializeLE(val, lengthInBytes) {
|
|
8127
|
-
const result = new Uint8Array(lengthInBytes);
|
|
8128
|
-
let tempVal = val;
|
|
8129
|
-
for (let i = 0; i < lengthInBytes; i++) {
|
|
8130
|
-
result[i] = Number(tempVal & BigInt(255));
|
|
8131
|
-
tempVal >>= BigInt(8);
|
|
8132
|
-
}
|
|
8133
|
-
return result;
|
|
8134
|
-
}
|
|
8135
|
-
function bytesEqual(a, b) {
|
|
8136
|
-
if (a.length !== b.length) return false;
|
|
8137
|
-
for (let i = 0; i < a.length; i++) {
|
|
8138
|
-
if (a[i] !== b[i]) return false;
|
|
8139
|
-
}
|
|
8140
|
-
return true;
|
|
8141
|
-
}
|
|
8142
|
-
var awaitBatchComputationFinalization = async (rpc, computationOffsets, options) => {
|
|
8143
|
-
if (computationOffsets.length === 0) {
|
|
8144
|
-
return /* @__PURE__ */ new Map();
|
|
8145
|
-
}
|
|
8146
|
-
const mxeProgramId = options?.mxeProgramId ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
8147
|
-
const commitment = options?.commitment ?? "confirmed";
|
|
8148
|
-
const mxeProgramIdBytes = getAddressEncoder56().encode(mxeProgramId);
|
|
8149
|
-
const transactionCountLimit = options?.transactionCountLimit ?? 100;
|
|
8150
|
-
const pollInterval = options?.pollInterval ?? 1e3;
|
|
8151
|
-
const maxAttempts = options?.maxAttempts ?? 120;
|
|
8152
|
-
const offsetBytesMap = /* @__PURE__ */ new Map();
|
|
8153
|
-
for (const offset of computationOffsets) {
|
|
8154
|
-
offsetBytesMap.set(offset, serializeLE(offset, 8));
|
|
8155
|
-
}
|
|
8156
|
-
const foundResults = /* @__PURE__ */ new Map();
|
|
8157
|
-
const remainingOffsets = new Set(computationOffsets);
|
|
8158
|
-
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
8159
|
-
try {
|
|
8160
|
-
const signatures = await rpc.getSignaturesForAddress(
|
|
8161
|
-
ARCIUM_PROGRAM_ID,
|
|
8162
|
-
{ limit: transactionCountLimit }
|
|
8163
|
-
).send();
|
|
8164
|
-
for (const sigInfo of signatures) {
|
|
8165
|
-
const tx = await rpc.getTransaction(sigInfo.signature, {
|
|
8166
|
-
commitment,
|
|
8167
|
-
encoding: "json",
|
|
8168
|
-
maxSupportedTransactionVersion: 0
|
|
8169
|
-
}).send();
|
|
8170
|
-
if (!tx) continue;
|
|
8171
|
-
const logs = tx.meta?.logMessages || [];
|
|
8172
|
-
for (const log of logs) {
|
|
8173
|
-
if (log.includes("Program data:")) {
|
|
8174
|
-
const base64Data = log.split("Program data: ")[1];
|
|
8175
|
-
if (!base64Data) continue;
|
|
8176
|
-
try {
|
|
8177
|
-
const eventData = Uint8Array.from(atob(base64Data), (c) => c.charCodeAt(0));
|
|
8178
|
-
if (eventData.length >= 48 && bytesEqual(eventData.subarray(0, 8), FINALIZE_COMPUTATION_EVENT_DISCRIMINATOR)) {
|
|
8179
|
-
const eventOffsetBytes = eventData.subarray(8, 16);
|
|
8180
|
-
const eventMxeProgramId = eventData.subarray(16, 48);
|
|
8181
|
-
if (!bytesEqual(eventMxeProgramId, mxeProgramIdBytes)) continue;
|
|
8182
|
-
for (const offset of remainingOffsets) {
|
|
8183
|
-
const expectedBytes = offsetBytesMap.get(offset);
|
|
8184
|
-
if (bytesEqual(eventOffsetBytes, expectedBytes)) {
|
|
8185
|
-
const txError = tx.meta?.err;
|
|
8186
|
-
let errorMessage;
|
|
8187
|
-
if (txError) {
|
|
8188
|
-
const errorLog = logs.find((l) => l.includes("Error") || l.includes("failed"));
|
|
8189
|
-
errorMessage = errorLog || JSON.stringify(txError);
|
|
8190
|
-
}
|
|
8191
|
-
foundResults.set(offset, {
|
|
8192
|
-
signature: sigInfo.signature,
|
|
8193
|
-
error: errorMessage
|
|
8194
|
-
});
|
|
8195
|
-
remainingOffsets.delete(offset);
|
|
8196
|
-
break;
|
|
8197
|
-
}
|
|
8198
|
-
}
|
|
8199
|
-
}
|
|
8200
|
-
} catch {
|
|
8201
|
-
continue;
|
|
8202
|
-
}
|
|
8203
|
-
}
|
|
8204
|
-
}
|
|
8205
|
-
if (remainingOffsets.size === 0) {
|
|
8206
|
-
return foundResults;
|
|
8207
|
-
}
|
|
8208
|
-
}
|
|
8209
|
-
if (remainingOffsets.size === 0) {
|
|
8210
|
-
return foundResults;
|
|
8211
|
-
}
|
|
8212
|
-
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
8213
|
-
} catch (error) {
|
|
8214
|
-
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
8215
|
-
}
|
|
8216
|
-
}
|
|
8217
|
-
const missingOffsets = Array.from(remainingOffsets).join(", ");
|
|
8218
|
-
throw new Error(
|
|
8219
|
-
`Computation finalization timed out after ${maxAttempts} attempts. Missing offsets: ${missingOffsets}`
|
|
8220
|
-
);
|
|
8221
|
-
};
|
|
8222
|
-
var awaitComputationFinalization = async (rpc, computationOffset, options) => {
|
|
8223
|
-
const results = await awaitBatchComputationFinalization(rpc, [computationOffset], options);
|
|
8224
|
-
return results.get(computationOffset);
|
|
8225
|
-
};
|
|
8226
|
-
|
|
8227
7908
|
// src/x25519/keypair.ts
|
|
8228
7909
|
import { RescueCipher, x25519 } from "@arcium-hq/client";
|
|
8229
7910
|
import { BN as BN3 } from "bn.js";
|
|
@@ -8287,11 +7968,10 @@ export {
|
|
|
8287
7968
|
OPPORTUNITY_MARKET_ERROR__LOCKED,
|
|
8288
7969
|
OPPORTUNITY_MARKET_ERROR__MARKET_ALREADY_OPEN,
|
|
8289
7970
|
OPPORTUNITY_MARKET_ERROR__MARKET_NOT_OPEN,
|
|
8290
|
-
OPPORTUNITY_MARKET_ERROR__MARKET_NOT_PAUSED,
|
|
8291
7971
|
OPPORTUNITY_MARKET_ERROR__MARKET_NOT_RESOLVED,
|
|
8292
|
-
OPPORTUNITY_MARKET_ERROR__MARKET_PAUSED,
|
|
8293
7972
|
OPPORTUNITY_MARKET_ERROR__NOT_REVEALED,
|
|
8294
7973
|
OPPORTUNITY_MARKET_ERROR__NO_FEES_TO_CLAIM,
|
|
7974
|
+
OPPORTUNITY_MARKET_ERROR__NO_FINALIZED_WINNING_OPTION,
|
|
8295
7975
|
OPPORTUNITY_MARKET_ERROR__NO_REWARD_TO_CLAIM,
|
|
8296
7976
|
OPPORTUNITY_MARKET_ERROR__NO_STAKE,
|
|
8297
7977
|
OPPORTUNITY_MARKET_ERROR__OPTION_STILL_NEEDED,
|
|
@@ -8314,12 +7994,10 @@ export {
|
|
|
8314
7994
|
OpportunityMarketAccount,
|
|
8315
7995
|
OpportunityMarketInstruction,
|
|
8316
7996
|
Output,
|
|
8317
|
-
PAUSE_STAKING_DISCRIMINATOR,
|
|
8318
7997
|
PLATFORM_CONFIG_DISCRIMINATOR,
|
|
8319
7998
|
PLATFORM_CONFIG_SEED,
|
|
8320
7999
|
Parameter,
|
|
8321
8000
|
RESOLVE_MARKET_DISCRIMINATOR,
|
|
8322
|
-
RESUME_STAKING_DISCRIMINATOR,
|
|
8323
8001
|
REVEAL_STAKE_CALLBACK_DISCRIMINATOR,
|
|
8324
8002
|
REVEAL_STAKE_COMP_DEF_DISCRIMINATOR,
|
|
8325
8003
|
REVEAL_STAKE_DISCRIMINATOR,
|
|
@@ -8337,8 +8015,9 @@ export {
|
|
|
8337
8015
|
WITHDRAW_REWARD_DISCRIMINATOR,
|
|
8338
8016
|
addMarketOption,
|
|
8339
8017
|
addReward,
|
|
8340
|
-
awaitBatchComputationFinalization,
|
|
8341
8018
|
awaitComputationFinalization,
|
|
8019
|
+
awaitRevealStakeFinalization,
|
|
8020
|
+
awaitStakeFinalization,
|
|
8342
8021
|
circuitSource,
|
|
8343
8022
|
claimCreatorFees,
|
|
8344
8023
|
claimFees,
|
|
@@ -8589,11 +8268,6 @@ export {
|
|
|
8589
8268
|
getParameterCodec,
|
|
8590
8269
|
getParameterDecoder,
|
|
8591
8270
|
getParameterEncoder,
|
|
8592
|
-
getPauseStakingDiscriminatorBytes,
|
|
8593
|
-
getPauseStakingInstruction,
|
|
8594
|
-
getPauseStakingInstructionDataCodec,
|
|
8595
|
-
getPauseStakingInstructionDataDecoder,
|
|
8596
|
-
getPauseStakingInstructionDataEncoder,
|
|
8597
8271
|
getPlatformConfigAddress,
|
|
8598
8272
|
getPlatformConfigCodec,
|
|
8599
8273
|
getPlatformConfigDecoder,
|
|
@@ -8604,11 +8278,6 @@ export {
|
|
|
8604
8278
|
getResolveMarketInstructionDataCodec,
|
|
8605
8279
|
getResolveMarketInstructionDataDecoder,
|
|
8606
8280
|
getResolveMarketInstructionDataEncoder,
|
|
8607
|
-
getResumeStakingDiscriminatorBytes,
|
|
8608
|
-
getResumeStakingInstruction,
|
|
8609
|
-
getResumeStakingInstructionDataCodec,
|
|
8610
|
-
getResumeStakingInstructionDataDecoder,
|
|
8611
|
-
getResumeStakingInstructionDataEncoder,
|
|
8612
8281
|
getRevealPeriodEndedEventCodec,
|
|
8613
8282
|
getRevealPeriodEndedEventDecoder,
|
|
8614
8283
|
getRevealPeriodEndedEventEncoder,
|
|
@@ -8695,12 +8364,6 @@ export {
|
|
|
8695
8364
|
getStakedEventCodec,
|
|
8696
8365
|
getStakedEventDecoder,
|
|
8697
8366
|
getStakedEventEncoder,
|
|
8698
|
-
getStakingPausedEventCodec,
|
|
8699
|
-
getStakingPausedEventDecoder,
|
|
8700
|
-
getStakingPausedEventEncoder,
|
|
8701
|
-
getStakingResumedEventCodec,
|
|
8702
|
-
getStakingResumedEventDecoder,
|
|
8703
|
-
getStakingResumedEventEncoder,
|
|
8704
8367
|
getStuckStakeClosedEventCodec,
|
|
8705
8368
|
getStuckStakeClosedEventDecoder,
|
|
8706
8369
|
getStuckStakeClosedEventEncoder,
|
|
@@ -8758,9 +8421,7 @@ export {
|
|
|
8758
8421
|
parseInitPlatformConfigInstruction,
|
|
8759
8422
|
parseInitStakeAccountInstruction,
|
|
8760
8423
|
parseOpenMarketInstruction,
|
|
8761
|
-
parsePauseStakingInstruction,
|
|
8762
8424
|
parseResolveMarketInstruction,
|
|
8763
|
-
parseResumeStakingInstruction,
|
|
8764
8425
|
parseRevealStakeCallbackInstruction,
|
|
8765
8426
|
parseRevealStakeCompDefInstruction,
|
|
8766
8427
|
parseRevealStakeInstruction,
|
|
@@ -8773,11 +8434,9 @@ export {
|
|
|
8773
8434
|
parseUnstakeInstruction,
|
|
8774
8435
|
parseUpdatePlatformConfigInstruction,
|
|
8775
8436
|
parseWithdrawRewardInstruction,
|
|
8776
|
-
pauseStaking,
|
|
8777
8437
|
randomComputationOffset,
|
|
8778
8438
|
randomStateNonce,
|
|
8779
8439
|
resolveMarket,
|
|
8780
|
-
resumeStaking,
|
|
8781
8440
|
revealStake,
|
|
8782
8441
|
setFeeClaimAuthority,
|
|
8783
8442
|
setUpdateAuthority,
|