@crypticdot/defituna-core 3.2.7 → 3.3.0

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.
@@ -191,11 +191,6 @@ function handleError(f, args) {
191
191
  }
192
192
  }
193
193
 
194
- function getArrayU8FromWasm0(ptr, len) {
195
- ptr = ptr >>> 0;
196
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
197
- }
198
-
199
194
  function dropObject(idx) {
200
195
  if (idx < 132) return;
201
196
  heap[idx] = heap_next;
@@ -207,6 +202,66 @@ function takeObject(idx) {
207
202
  dropObject(idx);
208
203
  return ret;
209
204
  }
205
+
206
+ function getArrayU8FromWasm0(ptr, len) {
207
+ ptr = ptr >>> 0;
208
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
209
+ }
210
+
211
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
212
+ ? { register: () => {}, unregister: () => {} }
213
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
214
+
215
+ function makeMutClosure(arg0, arg1, dtor, f) {
216
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
217
+ const real = (...args) => {
218
+
219
+ // First up with a closure we increment the internal reference
220
+ // count. This ensures that the Rust closure environment won't
221
+ // be deallocated while we're invoking it.
222
+ state.cnt++;
223
+ const a = state.a;
224
+ state.a = 0;
225
+ try {
226
+ return f(a, state.b, ...args);
227
+ } finally {
228
+ state.a = a;
229
+ real._wbg_cb_unref();
230
+ }
231
+ };
232
+ real._wbg_cb_unref = () => {
233
+ if (--state.cnt === 0) {
234
+ state.dtor(state.a, state.b);
235
+ state.a = 0;
236
+ CLOSURE_DTORS.unregister(state);
237
+ }
238
+ };
239
+ CLOSURE_DTORS.register(real, state, state);
240
+ return real;
241
+ }
242
+
243
+ function _assertClass(instance, klass) {
244
+ if (!(instance instanceof klass)) {
245
+ throw new Error(`expected instance of ${klass.name}`);
246
+ }
247
+ }
248
+
249
+ function passArrayJsValueToWasm0(array, malloc) {
250
+ const ptr = malloc(array.length * 4, 4) >>> 0;
251
+ const mem = getDataViewMemory0();
252
+ for (let i = 0; i < array.length; i++) {
253
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
254
+ }
255
+ WASM_VECTOR_LEN = array.length;
256
+ return ptr;
257
+ }
258
+
259
+ function passArray8ToWasm0(arg, malloc) {
260
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
261
+ getUint8ArrayMemory0().set(arg, ptr / 1);
262
+ WASM_VECTOR_LEN = arg.length;
263
+ return ptr;
264
+ }
210
265
  /**
211
266
  * Get the first tick index in the tick array that contains the specified tick index.
212
267
  *
@@ -1436,12 +1491,6 @@ export function _PROTOCOL_FEE_RATE_MUL_VALUE() {
1436
1491
  return ret;
1437
1492
  }
1438
1493
 
1439
- function passArray8ToWasm0(arg, malloc) {
1440
- const ptr = malloc(arg.length * 1, 1) >>> 0;
1441
- getUint8ArrayMemory0().set(arg, ptr / 1);
1442
- WASM_VECTOR_LEN = arg.length;
1443
- return ptr;
1444
- }
1445
1494
  /**
1446
1495
  * Get the first unoccupied position in a bundle
1447
1496
  *
@@ -1606,18 +1655,6 @@ export function swapQuoteByOutputToken(token_out, specified_token_a, slippage_to
1606
1655
  }
1607
1656
  }
1608
1657
 
1609
- export function _INVALID_ARGUMENTS() {
1610
- try {
1611
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1612
- wasm._INVALID_ARGUMENTS(retptr);
1613
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1614
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1615
- return getStringFromWasm0(r0, r1);
1616
- } finally {
1617
- wasm.__wbindgen_add_to_stack_pointer(16);
1618
- }
1619
- }
1620
-
1621
1658
  /**
1622
1659
  * Spot position increase quote
1623
1660
  *
@@ -1629,26 +1666,21 @@ export function _INVALID_ARGUMENTS() {
1629
1666
  * - `slippage_tolerance_bps`: An optional slippage tolerance in basis points. Defaults to the global slippage tolerance if not provided.
1630
1667
  * - `protocol_fee_rate`: Protocol fee rate from a market account represented as hundredths of a basis point (0.01% = 100).
1631
1668
  * - `protocol_fee_rate_on_collateral`: Protocol fee rate from a market account represented as hundredths of a basis point (0.01% = 100).
1669
+ * - `mint_a`: Token A mint address
1670
+ * - `mint_b`: Token B mint address
1632
1671
  * - `fusion_pool`: Fusion pool.
1633
- * - `tick_arrays`: Five tick arrays around the current pool price.
1672
+ * - `tick_arrays`: Optional five tick arrays around the current pool price. If not provided, the quote will be calculated using the Jupiter Aggregator.
1634
1673
  *
1635
1674
  * # Returns
1636
1675
  * - `IncreaseSpotPositionQuoteResult`: quote result
1637
1676
  */
1638
- export function getIncreaseSpotPositionQuote(increase_amount, collateral_token, position_token, leverage, slippage_tolerance_bps, protocol_fee_rate, protocol_fee_rate_on_collateral, fusion_pool, tick_arrays) {
1639
- try {
1640
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1641
- wasm.getIncreaseSpotPositionQuote(retptr, increase_amount, collateral_token, position_token, leverage, isLikeNone(slippage_tolerance_bps) ? 0xFFFFFF : slippage_tolerance_bps, protocol_fee_rate, protocol_fee_rate_on_collateral, addHeapObject(fusion_pool), addHeapObject(tick_arrays));
1642
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1643
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1644
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1645
- if (r2) {
1646
- throw takeObject(r1);
1647
- }
1648
- return takeObject(r0);
1649
- } finally {
1650
- wasm.__wbindgen_add_to_stack_pointer(16);
1651
- }
1677
+ export function getIncreaseSpotPositionQuote(increase_amount, collateral_token, position_token, leverage, slippage_tolerance_bps, protocol_fee_rate, protocol_fee_rate_on_collateral, mint_a, mint_b, fusion_pool, tick_arrays) {
1678
+ _assertClass(mint_a, Pubkey);
1679
+ var ptr0 = mint_a.__destroy_into_raw();
1680
+ _assertClass(mint_b, Pubkey);
1681
+ var ptr1 = mint_b.__destroy_into_raw();
1682
+ const ret = wasm.getIncreaseSpotPositionQuote(increase_amount, collateral_token, position_token, leverage, isLikeNone(slippage_tolerance_bps) ? 0xFFFFFF : slippage_tolerance_bps, protocol_fee_rate, protocol_fee_rate_on_collateral, ptr0, ptr1, addHeapObject(fusion_pool), isLikeNone(tick_arrays) ? 0 : addHeapObject(tick_arrays));
1683
+ return takeObject(ret);
1652
1684
  }
1653
1685
 
1654
1686
  /**
@@ -1666,25 +1698,18 @@ export function getIncreaseSpotPositionQuote(increase_amount, collateral_token,
1666
1698
  * - `protocol_fee_rate`: Protocol fee rate from a market account represented as hundredths of a basis point (0.01% = 100).
1667
1699
  * - `protocol_fee_rate_on_collateral`: Protocol fee rate from a market account represented as hundredths of a basis point (0.01% = 100).
1668
1700
  * - `fusion_pool`: Fusion pool.
1669
- * - `tick_arrays`: Five tick arrays around the current pool price.
1701
+ * - `tick_arrays`: Optional five tick arrays around the current pool price. If not provided, the quote will be calculated using the Jupiter Aggregator.
1670
1702
  *
1671
1703
  * # Returns
1672
1704
  * - `DecreaseSpotPositionQuoteResult`: quote result
1673
1705
  */
1674
- export function getDecreaseSpotPositionQuote(decrease_amount, collateral_token, leverage, reduce_only, slippage_tolerance_bps, position_token, position_amount, position_debt, protocol_fee_rate, protocol_fee_rate_on_collateral, fusion_pool, tick_arrays) {
1675
- try {
1676
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1677
- wasm.getDecreaseSpotPositionQuote(retptr, decrease_amount, collateral_token, leverage, reduce_only, isLikeNone(slippage_tolerance_bps) ? 0xFFFFFF : slippage_tolerance_bps, position_token, position_amount, position_debt, protocol_fee_rate, protocol_fee_rate_on_collateral, addHeapObject(fusion_pool), addHeapObject(tick_arrays));
1678
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1679
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1680
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1681
- if (r2) {
1682
- throw takeObject(r1);
1683
- }
1684
- return takeObject(r0);
1685
- } finally {
1686
- wasm.__wbindgen_add_to_stack_pointer(16);
1687
- }
1706
+ export function getDecreaseSpotPositionQuote(decrease_amount, collateral_token, leverage, reduce_only, slippage_tolerance_bps, position_token, position_amount, position_debt, protocol_fee_rate, protocol_fee_rate_on_collateral, mint_a, mint_b, fusion_pool, tick_arrays) {
1707
+ _assertClass(mint_a, Pubkey);
1708
+ var ptr0 = mint_a.__destroy_into_raw();
1709
+ _assertClass(mint_b, Pubkey);
1710
+ var ptr1 = mint_b.__destroy_into_raw();
1711
+ const ret = wasm.getDecreaseSpotPositionQuote(decrease_amount, collateral_token, leverage, reduce_only, isLikeNone(slippage_tolerance_bps) ? 0xFFFFFF : slippage_tolerance_bps, position_token, position_amount, position_debt, protocol_fee_rate, protocol_fee_rate_on_collateral, ptr0, ptr1, addHeapObject(fusion_pool), isLikeNone(tick_arrays) ? 0 : addHeapObject(tick_arrays));
1712
+ return takeObject(ret);
1688
1713
  }
1689
1714
 
1690
1715
  /**
@@ -1738,7 +1763,7 @@ export function getLiquidationPrice(position_token, amount, debt, liquidation_th
1738
1763
  export function getTradableAmount(collateral_token, available_balance, leverage, new_position_token, reduce_only, position_token, position_amount, position_debt, protocol_fee_rate, protocol_fee_rate_on_collateral, fusion_pool, tick_arrays) {
1739
1764
  try {
1740
1765
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1741
- wasm.getTradableAmount(retptr, collateral_token, available_balance, leverage, new_position_token, reduce_only, position_token, position_amount, position_debt, protocol_fee_rate, protocol_fee_rate_on_collateral, addHeapObject(fusion_pool), addHeapObject(tick_arrays));
1766
+ wasm.getTradableAmount(retptr, collateral_token, available_balance, leverage, new_position_token, reduce_only, position_token, position_amount, position_debt, protocol_fee_rate, protocol_fee_rate_on_collateral, addHeapObject(fusion_pool), isLikeNone(tick_arrays) ? 0 : addHeapObject(tick_arrays));
1742
1767
  var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
1743
1768
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1744
1769
  var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
@@ -1756,6 +1781,920 @@ export function calculateTunaProtocolFee(collateral_token, borrowed_token, colla
1756
1781
  return takeObject(ret);
1757
1782
  }
1758
1783
 
1784
+ export function _INVALID_ARGUMENTS() {
1785
+ try {
1786
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1787
+ wasm._INVALID_ARGUMENTS(retptr);
1788
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1789
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1790
+ return getStringFromWasm0(r0, r1);
1791
+ } finally {
1792
+ wasm.__wbindgen_add_to_stack_pointer(16);
1793
+ }
1794
+ }
1795
+
1796
+ export function _TICK_ARRAYS_NOT_PROVIDED() {
1797
+ try {
1798
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1799
+ wasm._TICK_ARRAYS_NOT_PROVIDED(retptr);
1800
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1801
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1802
+ return getStringFromWasm0(r0, r1);
1803
+ } finally {
1804
+ wasm.__wbindgen_add_to_stack_pointer(16);
1805
+ }
1806
+ }
1807
+
1808
+ export function _JUPITER_QUOTE_REQUEST_ERROR() {
1809
+ try {
1810
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1811
+ wasm._JUPITER_QUOTE_REQUEST_ERROR(retptr);
1812
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1813
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1814
+ return getStringFromWasm0(r0, r1);
1815
+ } finally {
1816
+ wasm.__wbindgen_add_to_stack_pointer(16);
1817
+ }
1818
+ }
1819
+
1820
+ export function _JUPITER_SWAP_INSTRUCTIONS_REQUEST_ERROR() {
1821
+ try {
1822
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1823
+ wasm._JUPITER_SWAP_INSTRUCTIONS_REQUEST_ERROR(retptr);
1824
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1825
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1826
+ return getStringFromWasm0(r0, r1);
1827
+ } finally {
1828
+ wasm.__wbindgen_add_to_stack_pointer(16);
1829
+ }
1830
+ }
1831
+
1832
+ /**
1833
+ * Initialize Javascript logging and panic handler
1834
+ */
1835
+ export function solana_program_init() {
1836
+ wasm.solana_program_init();
1837
+ }
1838
+
1839
+ function __wasm_bindgen_func_elem_3304(arg0, arg1, arg2) {
1840
+ wasm.__wasm_bindgen_func_elem_3304(arg0, arg1, addHeapObject(arg2));
1841
+ }
1842
+
1843
+ function __wasm_bindgen_func_elem_3120(arg0, arg1) {
1844
+ wasm.__wasm_bindgen_func_elem_3120(arg0, arg1);
1845
+ }
1846
+
1847
+ function __wasm_bindgen_func_elem_480(arg0, arg1, arg2, arg3) {
1848
+ wasm.__wasm_bindgen_func_elem_480(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1849
+ }
1850
+
1851
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
1852
+
1853
+ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
1854
+
1855
+ const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
1856
+
1857
+ const HashFinalization = (typeof FinalizationRegistry === 'undefined')
1858
+ ? { register: () => {}, unregister: () => {} }
1859
+ : new FinalizationRegistry(ptr => wasm.__wbg_hash_free(ptr >>> 0, 1));
1860
+ /**
1861
+ * A hash; the 32-byte output of a hashing algorithm.
1862
+ *
1863
+ * This struct is used most often in `solana-sdk` and related crates to contain
1864
+ * a [SHA-256] hash, but may instead contain a [blake3] hash.
1865
+ *
1866
+ * [SHA-256]: https://en.wikipedia.org/wiki/SHA-2
1867
+ * [blake3]: https://github.com/BLAKE3-team/BLAKE3
1868
+ */
1869
+ export class Hash {
1870
+
1871
+ static __wrap(ptr) {
1872
+ ptr = ptr >>> 0;
1873
+ const obj = Object.create(Hash.prototype);
1874
+ obj.__wbg_ptr = ptr;
1875
+ HashFinalization.register(obj, obj.__wbg_ptr, obj);
1876
+ return obj;
1877
+ }
1878
+
1879
+ __destroy_into_raw() {
1880
+ const ptr = this.__wbg_ptr;
1881
+ this.__wbg_ptr = 0;
1882
+ HashFinalization.unregister(this);
1883
+ return ptr;
1884
+ }
1885
+
1886
+ free() {
1887
+ const ptr = this.__destroy_into_raw();
1888
+ wasm.__wbg_hash_free(ptr, 0);
1889
+ }
1890
+ /**
1891
+ * Create a new Hash object
1892
+ *
1893
+ * * `value` - optional hash as a base58 encoded string, `Uint8Array`, `[number]`
1894
+ * @param {any} value
1895
+ */
1896
+ constructor(value) {
1897
+ try {
1898
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1899
+ wasm.hash_constructor(retptr, addHeapObject(value));
1900
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1901
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1902
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1903
+ if (r2) {
1904
+ throw takeObject(r1);
1905
+ }
1906
+ this.__wbg_ptr = r0 >>> 0;
1907
+ HashFinalization.register(this, this.__wbg_ptr, this);
1908
+ return this;
1909
+ } finally {
1910
+ wasm.__wbindgen_add_to_stack_pointer(16);
1911
+ }
1912
+ }
1913
+ /**
1914
+ * Return the base58 string representation of the hash
1915
+ * @returns {string}
1916
+ */
1917
+ toString() {
1918
+ let deferred1_0;
1919
+ let deferred1_1;
1920
+ try {
1921
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1922
+ wasm.hash_toString(retptr, this.__wbg_ptr);
1923
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1924
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1925
+ deferred1_0 = r0;
1926
+ deferred1_1 = r1;
1927
+ return getStringFromWasm0(r0, r1);
1928
+ } finally {
1929
+ wasm.__wbindgen_add_to_stack_pointer(16);
1930
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
1931
+ }
1932
+ }
1933
+ /**
1934
+ * Checks if two `Hash`s are equal
1935
+ * @param {Hash} other
1936
+ * @returns {boolean}
1937
+ */
1938
+ equals(other) {
1939
+ _assertClass(other, Hash);
1940
+ const ret = wasm.hash_equals(this.__wbg_ptr, other.__wbg_ptr);
1941
+ return ret !== 0;
1942
+ }
1943
+ /**
1944
+ * Return the `Uint8Array` representation of the hash
1945
+ * @returns {Uint8Array}
1946
+ */
1947
+ toBytes() {
1948
+ try {
1949
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1950
+ wasm.hash_toBytes(retptr, this.__wbg_ptr);
1951
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1952
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1953
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
1954
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1955
+ return v1;
1956
+ } finally {
1957
+ wasm.__wbindgen_add_to_stack_pointer(16);
1958
+ }
1959
+ }
1960
+ }
1961
+ if (Symbol.dispose) Hash.prototype[Symbol.dispose] = Hash.prototype.free;
1962
+
1963
+ const InstructionFinalization = (typeof FinalizationRegistry === 'undefined')
1964
+ ? { register: () => {}, unregister: () => {} }
1965
+ : new FinalizationRegistry(ptr => wasm.__wbg_instruction_free(ptr >>> 0, 1));
1966
+ /**
1967
+ * wasm-bindgen version of the Instruction struct.
1968
+ * This duplication is required until https://github.com/rustwasm/wasm-bindgen/issues/3671
1969
+ * is fixed. This must not diverge from the regular non-wasm Instruction struct.
1970
+ */
1971
+ export class Instruction {
1972
+
1973
+ static __wrap(ptr) {
1974
+ ptr = ptr >>> 0;
1975
+ const obj = Object.create(Instruction.prototype);
1976
+ obj.__wbg_ptr = ptr;
1977
+ InstructionFinalization.register(obj, obj.__wbg_ptr, obj);
1978
+ return obj;
1979
+ }
1980
+
1981
+ __destroy_into_raw() {
1982
+ const ptr = this.__wbg_ptr;
1983
+ this.__wbg_ptr = 0;
1984
+ InstructionFinalization.unregister(this);
1985
+ return ptr;
1986
+ }
1987
+
1988
+ free() {
1989
+ const ptr = this.__destroy_into_raw();
1990
+ wasm.__wbg_instruction_free(ptr, 0);
1991
+ }
1992
+ }
1993
+ if (Symbol.dispose) Instruction.prototype[Symbol.dispose] = Instruction.prototype.free;
1994
+
1995
+ const InstructionsFinalization = (typeof FinalizationRegistry === 'undefined')
1996
+ ? { register: () => {}, unregister: () => {} }
1997
+ : new FinalizationRegistry(ptr => wasm.__wbg_instructions_free(ptr >>> 0, 1));
1998
+
1999
+ export class Instructions {
2000
+
2001
+ __destroy_into_raw() {
2002
+ const ptr = this.__wbg_ptr;
2003
+ this.__wbg_ptr = 0;
2004
+ InstructionsFinalization.unregister(this);
2005
+ return ptr;
2006
+ }
2007
+
2008
+ free() {
2009
+ const ptr = this.__destroy_into_raw();
2010
+ wasm.__wbg_instructions_free(ptr, 0);
2011
+ }
2012
+ constructor() {
2013
+ const ret = wasm.instructions_constructor();
2014
+ this.__wbg_ptr = ret >>> 0;
2015
+ InstructionsFinalization.register(this, this.__wbg_ptr, this);
2016
+ return this;
2017
+ }
2018
+ /**
2019
+ * @param {Instruction} instruction
2020
+ */
2021
+ push(instruction) {
2022
+ _assertClass(instruction, Instruction);
2023
+ var ptr0 = instruction.__destroy_into_raw();
2024
+ wasm.instructions_push(this.__wbg_ptr, ptr0);
2025
+ }
2026
+ }
2027
+ if (Symbol.dispose) Instructions.prototype[Symbol.dispose] = Instructions.prototype.free;
2028
+
2029
+ const KeypairFinalization = (typeof FinalizationRegistry === 'undefined')
2030
+ ? { register: () => {}, unregister: () => {} }
2031
+ : new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr >>> 0, 1));
2032
+ /**
2033
+ * A vanilla Ed25519 key pair
2034
+ */
2035
+ export class Keypair {
2036
+
2037
+ static __wrap(ptr) {
2038
+ ptr = ptr >>> 0;
2039
+ const obj = Object.create(Keypair.prototype);
2040
+ obj.__wbg_ptr = ptr;
2041
+ KeypairFinalization.register(obj, obj.__wbg_ptr, obj);
2042
+ return obj;
2043
+ }
2044
+
2045
+ __destroy_into_raw() {
2046
+ const ptr = this.__wbg_ptr;
2047
+ this.__wbg_ptr = 0;
2048
+ KeypairFinalization.unregister(this);
2049
+ return ptr;
2050
+ }
2051
+
2052
+ free() {
2053
+ const ptr = this.__destroy_into_raw();
2054
+ wasm.__wbg_keypair_free(ptr, 0);
2055
+ }
2056
+ /**
2057
+ * Create a new `Keypair `
2058
+ */
2059
+ constructor() {
2060
+ const ret = wasm.keypair_constructor();
2061
+ this.__wbg_ptr = ret >>> 0;
2062
+ KeypairFinalization.register(this, this.__wbg_ptr, this);
2063
+ return this;
2064
+ }
2065
+ /**
2066
+ * Convert a `Keypair` to a `Uint8Array`
2067
+ * @returns {Uint8Array}
2068
+ */
2069
+ toBytes() {
2070
+ try {
2071
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2072
+ wasm.keypair_toBytes(retptr, this.__wbg_ptr);
2073
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2074
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2075
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
2076
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
2077
+ return v1;
2078
+ } finally {
2079
+ wasm.__wbindgen_add_to_stack_pointer(16);
2080
+ }
2081
+ }
2082
+ /**
2083
+ * Recover a `Keypair` from a `Uint8Array`
2084
+ * @param {Uint8Array} bytes
2085
+ * @returns {Keypair}
2086
+ */
2087
+ static fromBytes(bytes) {
2088
+ try {
2089
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2090
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
2091
+ const len0 = WASM_VECTOR_LEN;
2092
+ wasm.keypair_fromBytes(retptr, ptr0, len0);
2093
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2094
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2095
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2096
+ if (r2) {
2097
+ throw takeObject(r1);
2098
+ }
2099
+ return Keypair.__wrap(r0);
2100
+ } finally {
2101
+ wasm.__wbindgen_add_to_stack_pointer(16);
2102
+ }
2103
+ }
2104
+ /**
2105
+ * Return the `Pubkey` for this `Keypair`
2106
+ * @returns {Pubkey}
2107
+ */
2108
+ pubkey() {
2109
+ const ret = wasm.keypair_pubkey(this.__wbg_ptr);
2110
+ return Pubkey.__wrap(ret);
2111
+ }
2112
+ }
2113
+ if (Symbol.dispose) Keypair.prototype[Symbol.dispose] = Keypair.prototype.free;
2114
+
2115
+ const MessageFinalization = (typeof FinalizationRegistry === 'undefined')
2116
+ ? { register: () => {}, unregister: () => {} }
2117
+ : new FinalizationRegistry(ptr => wasm.__wbg_message_free(ptr >>> 0, 1));
2118
+ /**
2119
+ * wasm-bindgen version of the Message struct.
2120
+ * This duplication is required until https://github.com/rustwasm/wasm-bindgen/issues/3671
2121
+ * is fixed. This must not diverge from the regular non-wasm Message struct.
2122
+ */
2123
+ export class Message {
2124
+
2125
+ static __wrap(ptr) {
2126
+ ptr = ptr >>> 0;
2127
+ const obj = Object.create(Message.prototype);
2128
+ obj.__wbg_ptr = ptr;
2129
+ MessageFinalization.register(obj, obj.__wbg_ptr, obj);
2130
+ return obj;
2131
+ }
2132
+
2133
+ __destroy_into_raw() {
2134
+ const ptr = this.__wbg_ptr;
2135
+ this.__wbg_ptr = 0;
2136
+ MessageFinalization.unregister(this);
2137
+ return ptr;
2138
+ }
2139
+
2140
+ free() {
2141
+ const ptr = this.__destroy_into_raw();
2142
+ wasm.__wbg_message_free(ptr, 0);
2143
+ }
2144
+ /**
2145
+ * The id of a recent ledger entry.
2146
+ * @returns {Hash}
2147
+ */
2148
+ get recent_blockhash() {
2149
+ const ret = wasm.__wbg_get_message_recent_blockhash(this.__wbg_ptr);
2150
+ return Hash.__wrap(ret);
2151
+ }
2152
+ /**
2153
+ * The id of a recent ledger entry.
2154
+ * @param {Hash} arg0
2155
+ */
2156
+ set recent_blockhash(arg0) {
2157
+ _assertClass(arg0, Hash);
2158
+ var ptr0 = arg0.__destroy_into_raw();
2159
+ wasm.__wbg_set_message_recent_blockhash(this.__wbg_ptr, ptr0);
2160
+ }
2161
+ }
2162
+ if (Symbol.dispose) Message.prototype[Symbol.dispose] = Message.prototype.free;
2163
+
2164
+ const PubkeyFinalization = (typeof FinalizationRegistry === 'undefined')
2165
+ ? { register: () => {}, unregister: () => {} }
2166
+ : new FinalizationRegistry(ptr => wasm.__wbg_pubkey_free(ptr >>> 0, 1));
2167
+ /**
2168
+ * The address of a [Solana account][acc].
2169
+ *
2170
+ * Some account addresses are [ed25519] public keys, with corresponding secret
2171
+ * keys that are managed off-chain. Often, though, account addresses do not
2172
+ * have corresponding secret keys &mdash; as with [_program derived
2173
+ * addresses_][pdas] &mdash; or the secret key is not relevant to the operation
2174
+ * of a program, and may have even been disposed of. As running Solana programs
2175
+ * can not safely create or manage secret keys, the full [`Keypair`] is not
2176
+ * defined in `solana-program` but in `solana-sdk`.
2177
+ *
2178
+ * [acc]: https://solana.com/docs/core/accounts
2179
+ * [ed25519]: https://ed25519.cr.yp.to/
2180
+ * [pdas]: https://solana.com/docs/core/cpi#program-derived-addresses
2181
+ * [`Keypair`]: https://docs.rs/solana-sdk/latest/solana_sdk/signer/keypair/struct.Keypair.html
2182
+ */
2183
+ export class Pubkey {
2184
+
2185
+ static __wrap(ptr) {
2186
+ ptr = ptr >>> 0;
2187
+ const obj = Object.create(Pubkey.prototype);
2188
+ obj.__wbg_ptr = ptr;
2189
+ PubkeyFinalization.register(obj, obj.__wbg_ptr, obj);
2190
+ return obj;
2191
+ }
2192
+
2193
+ __destroy_into_raw() {
2194
+ const ptr = this.__wbg_ptr;
2195
+ this.__wbg_ptr = 0;
2196
+ PubkeyFinalization.unregister(this);
2197
+ return ptr;
2198
+ }
2199
+
2200
+ free() {
2201
+ const ptr = this.__destroy_into_raw();
2202
+ wasm.__wbg_pubkey_free(ptr, 0);
2203
+ }
2204
+ /**
2205
+ * Create a new Pubkey object
2206
+ *
2207
+ * * `value` - optional public key as a base58 encoded string, `Uint8Array`, `[number]`
2208
+ * @param {any} value
2209
+ */
2210
+ constructor(value) {
2211
+ try {
2212
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2213
+ wasm.pubkey_constructor(retptr, addHeapObject(value));
2214
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2215
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2216
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2217
+ if (r2) {
2218
+ throw takeObject(r1);
2219
+ }
2220
+ this.__wbg_ptr = r0 >>> 0;
2221
+ PubkeyFinalization.register(this, this.__wbg_ptr, this);
2222
+ return this;
2223
+ } finally {
2224
+ wasm.__wbindgen_add_to_stack_pointer(16);
2225
+ }
2226
+ }
2227
+ /**
2228
+ * Return the base58 string representation of the public key
2229
+ * @returns {string}
2230
+ */
2231
+ toString() {
2232
+ let deferred1_0;
2233
+ let deferred1_1;
2234
+ try {
2235
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2236
+ wasm.pubkey_toString(retptr, this.__wbg_ptr);
2237
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2238
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2239
+ deferred1_0 = r0;
2240
+ deferred1_1 = r1;
2241
+ return getStringFromWasm0(r0, r1);
2242
+ } finally {
2243
+ wasm.__wbindgen_add_to_stack_pointer(16);
2244
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
2245
+ }
2246
+ }
2247
+ /**
2248
+ * Check if a `Pubkey` is on the ed25519 curve.
2249
+ * @returns {boolean}
2250
+ */
2251
+ isOnCurve() {
2252
+ const ret = wasm.pubkey_isOnCurve(this.__wbg_ptr);
2253
+ return ret !== 0;
2254
+ }
2255
+ /**
2256
+ * Checks if two `Pubkey`s are equal
2257
+ * @param {Pubkey} other
2258
+ * @returns {boolean}
2259
+ */
2260
+ equals(other) {
2261
+ _assertClass(other, Pubkey);
2262
+ const ret = wasm.pubkey_equals(this.__wbg_ptr, other.__wbg_ptr);
2263
+ return ret !== 0;
2264
+ }
2265
+ /**
2266
+ * Return the `Uint8Array` representation of the public key
2267
+ * @returns {Uint8Array}
2268
+ */
2269
+ toBytes() {
2270
+ try {
2271
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2272
+ wasm.pubkey_toBytes(retptr, this.__wbg_ptr);
2273
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2274
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2275
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
2276
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
2277
+ return v1;
2278
+ } finally {
2279
+ wasm.__wbindgen_add_to_stack_pointer(16);
2280
+ }
2281
+ }
2282
+ /**
2283
+ * Derive a Pubkey from another Pubkey, string seed, and a program id
2284
+ * @param {Pubkey} base
2285
+ * @param {string} seed
2286
+ * @param {Pubkey} owner
2287
+ * @returns {Pubkey}
2288
+ */
2289
+ static createWithSeed(base, seed, owner) {
2290
+ try {
2291
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2292
+ _assertClass(base, Pubkey);
2293
+ const ptr0 = passStringToWasm0(seed, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2294
+ const len0 = WASM_VECTOR_LEN;
2295
+ _assertClass(owner, Pubkey);
2296
+ wasm.pubkey_createWithSeed(retptr, base.__wbg_ptr, ptr0, len0, owner.__wbg_ptr);
2297
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2298
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2299
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2300
+ if (r2) {
2301
+ throw takeObject(r1);
2302
+ }
2303
+ return Pubkey.__wrap(r0);
2304
+ } finally {
2305
+ wasm.__wbindgen_add_to_stack_pointer(16);
2306
+ }
2307
+ }
2308
+ /**
2309
+ * Derive a program address from seeds and a program id
2310
+ * @param {any[]} seeds
2311
+ * @param {Pubkey} program_id
2312
+ * @returns {Pubkey}
2313
+ */
2314
+ static createProgramAddress(seeds, program_id) {
2315
+ try {
2316
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2317
+ const ptr0 = passArrayJsValueToWasm0(seeds, wasm.__wbindgen_export);
2318
+ const len0 = WASM_VECTOR_LEN;
2319
+ _assertClass(program_id, Pubkey);
2320
+ wasm.pubkey_createProgramAddress(retptr, ptr0, len0, program_id.__wbg_ptr);
2321
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2322
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2323
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2324
+ if (r2) {
2325
+ throw takeObject(r1);
2326
+ }
2327
+ return Pubkey.__wrap(r0);
2328
+ } finally {
2329
+ wasm.__wbindgen_add_to_stack_pointer(16);
2330
+ }
2331
+ }
2332
+ /**
2333
+ * Find a valid program address
2334
+ *
2335
+ * Returns:
2336
+ * * `[PubKey, number]` - the program address and bump seed
2337
+ * @param {any[]} seeds
2338
+ * @param {Pubkey} program_id
2339
+ * @returns {any}
2340
+ */
2341
+ static findProgramAddress(seeds, program_id) {
2342
+ try {
2343
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2344
+ const ptr0 = passArrayJsValueToWasm0(seeds, wasm.__wbindgen_export);
2345
+ const len0 = WASM_VECTOR_LEN;
2346
+ _assertClass(program_id, Pubkey);
2347
+ wasm.pubkey_findProgramAddress(retptr, ptr0, len0, program_id.__wbg_ptr);
2348
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2349
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2350
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2351
+ if (r2) {
2352
+ throw takeObject(r1);
2353
+ }
2354
+ return takeObject(r0);
2355
+ } finally {
2356
+ wasm.__wbindgen_add_to_stack_pointer(16);
2357
+ }
2358
+ }
2359
+ }
2360
+ if (Symbol.dispose) Pubkey.prototype[Symbol.dispose] = Pubkey.prototype.free;
2361
+
2362
+ const SystemInstructionFinalization = (typeof FinalizationRegistry === 'undefined')
2363
+ ? { register: () => {}, unregister: () => {} }
2364
+ : new FinalizationRegistry(ptr => wasm.__wbg_systeminstruction_free(ptr >>> 0, 1));
2365
+
2366
+ export class SystemInstruction {
2367
+
2368
+ __destroy_into_raw() {
2369
+ const ptr = this.__wbg_ptr;
2370
+ this.__wbg_ptr = 0;
2371
+ SystemInstructionFinalization.unregister(this);
2372
+ return ptr;
2373
+ }
2374
+
2375
+ free() {
2376
+ const ptr = this.__destroy_into_raw();
2377
+ wasm.__wbg_systeminstruction_free(ptr, 0);
2378
+ }
2379
+ /**
2380
+ * @param {Pubkey} from_pubkey
2381
+ * @param {Pubkey} to_pubkey
2382
+ * @param {bigint} lamports
2383
+ * @param {bigint} space
2384
+ * @param {Pubkey} owner
2385
+ * @returns {Instruction}
2386
+ */
2387
+ static createAccount(from_pubkey, to_pubkey, lamports, space, owner) {
2388
+ _assertClass(from_pubkey, Pubkey);
2389
+ _assertClass(to_pubkey, Pubkey);
2390
+ _assertClass(owner, Pubkey);
2391
+ const ret = wasm.systeminstruction_createAccount(from_pubkey.__wbg_ptr, to_pubkey.__wbg_ptr, lamports, space, owner.__wbg_ptr);
2392
+ return Instruction.__wrap(ret);
2393
+ }
2394
+ /**
2395
+ * @param {Pubkey} from_pubkey
2396
+ * @param {Pubkey} to_pubkey
2397
+ * @param {Pubkey} base
2398
+ * @param {string} seed
2399
+ * @param {bigint} lamports
2400
+ * @param {bigint} space
2401
+ * @param {Pubkey} owner
2402
+ * @returns {Instruction}
2403
+ */
2404
+ static createAccountWithSeed(from_pubkey, to_pubkey, base, seed, lamports, space, owner) {
2405
+ _assertClass(from_pubkey, Pubkey);
2406
+ _assertClass(to_pubkey, Pubkey);
2407
+ _assertClass(base, Pubkey);
2408
+ const ptr0 = passStringToWasm0(seed, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2409
+ const len0 = WASM_VECTOR_LEN;
2410
+ _assertClass(owner, Pubkey);
2411
+ const ret = wasm.systeminstruction_createAccountWithSeed(from_pubkey.__wbg_ptr, to_pubkey.__wbg_ptr, base.__wbg_ptr, ptr0, len0, lamports, space, owner.__wbg_ptr);
2412
+ return Instruction.__wrap(ret);
2413
+ }
2414
+ /**
2415
+ * @param {Pubkey} pubkey
2416
+ * @param {Pubkey} owner
2417
+ * @returns {Instruction}
2418
+ */
2419
+ static assign(pubkey, owner) {
2420
+ _assertClass(pubkey, Pubkey);
2421
+ _assertClass(owner, Pubkey);
2422
+ const ret = wasm.systeminstruction_assign(pubkey.__wbg_ptr, owner.__wbg_ptr);
2423
+ return Instruction.__wrap(ret);
2424
+ }
2425
+ /**
2426
+ * @param {Pubkey} pubkey
2427
+ * @param {Pubkey} base
2428
+ * @param {string} seed
2429
+ * @param {Pubkey} owner
2430
+ * @returns {Instruction}
2431
+ */
2432
+ static assignWithSeed(pubkey, base, seed, owner) {
2433
+ _assertClass(pubkey, Pubkey);
2434
+ _assertClass(base, Pubkey);
2435
+ const ptr0 = passStringToWasm0(seed, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2436
+ const len0 = WASM_VECTOR_LEN;
2437
+ _assertClass(owner, Pubkey);
2438
+ const ret = wasm.systeminstruction_assignWithSeed(pubkey.__wbg_ptr, base.__wbg_ptr, ptr0, len0, owner.__wbg_ptr);
2439
+ return Instruction.__wrap(ret);
2440
+ }
2441
+ /**
2442
+ * @param {Pubkey} from_pubkey
2443
+ * @param {Pubkey} to_pubkey
2444
+ * @param {bigint} lamports
2445
+ * @returns {Instruction}
2446
+ */
2447
+ static transfer(from_pubkey, to_pubkey, lamports) {
2448
+ _assertClass(from_pubkey, Pubkey);
2449
+ _assertClass(to_pubkey, Pubkey);
2450
+ const ret = wasm.systeminstruction_transfer(from_pubkey.__wbg_ptr, to_pubkey.__wbg_ptr, lamports);
2451
+ return Instruction.__wrap(ret);
2452
+ }
2453
+ /**
2454
+ * @param {Pubkey} from_pubkey
2455
+ * @param {Pubkey} from_base
2456
+ * @param {string} from_seed
2457
+ * @param {Pubkey} from_owner
2458
+ * @param {Pubkey} to_pubkey
2459
+ * @param {bigint} lamports
2460
+ * @returns {Instruction}
2461
+ */
2462
+ static transferWithSeed(from_pubkey, from_base, from_seed, from_owner, to_pubkey, lamports) {
2463
+ _assertClass(from_pubkey, Pubkey);
2464
+ _assertClass(from_base, Pubkey);
2465
+ const ptr0 = passStringToWasm0(from_seed, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2466
+ const len0 = WASM_VECTOR_LEN;
2467
+ _assertClass(from_owner, Pubkey);
2468
+ _assertClass(to_pubkey, Pubkey);
2469
+ const ret = wasm.systeminstruction_transferWithSeed(from_pubkey.__wbg_ptr, from_base.__wbg_ptr, ptr0, len0, from_owner.__wbg_ptr, to_pubkey.__wbg_ptr, lamports);
2470
+ return Instruction.__wrap(ret);
2471
+ }
2472
+ /**
2473
+ * @param {Pubkey} pubkey
2474
+ * @param {bigint} space
2475
+ * @returns {Instruction}
2476
+ */
2477
+ static allocate(pubkey, space) {
2478
+ _assertClass(pubkey, Pubkey);
2479
+ const ret = wasm.systeminstruction_allocate(pubkey.__wbg_ptr, space);
2480
+ return Instruction.__wrap(ret);
2481
+ }
2482
+ /**
2483
+ * @param {Pubkey} address
2484
+ * @param {Pubkey} base
2485
+ * @param {string} seed
2486
+ * @param {bigint} space
2487
+ * @param {Pubkey} owner
2488
+ * @returns {Instruction}
2489
+ */
2490
+ static allocateWithSeed(address, base, seed, space, owner) {
2491
+ _assertClass(address, Pubkey);
2492
+ _assertClass(base, Pubkey);
2493
+ const ptr0 = passStringToWasm0(seed, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2494
+ const len0 = WASM_VECTOR_LEN;
2495
+ _assertClass(owner, Pubkey);
2496
+ const ret = wasm.systeminstruction_allocateWithSeed(address.__wbg_ptr, base.__wbg_ptr, ptr0, len0, space, owner.__wbg_ptr);
2497
+ return Instruction.__wrap(ret);
2498
+ }
2499
+ /**
2500
+ * @param {Pubkey} from_pubkey
2501
+ * @param {Pubkey} nonce_pubkey
2502
+ * @param {Pubkey} authority
2503
+ * @param {bigint} lamports
2504
+ * @returns {Array<any>}
2505
+ */
2506
+ static createNonceAccount(from_pubkey, nonce_pubkey, authority, lamports) {
2507
+ _assertClass(from_pubkey, Pubkey);
2508
+ _assertClass(nonce_pubkey, Pubkey);
2509
+ _assertClass(authority, Pubkey);
2510
+ const ret = wasm.systeminstruction_createNonceAccount(from_pubkey.__wbg_ptr, nonce_pubkey.__wbg_ptr, authority.__wbg_ptr, lamports);
2511
+ return takeObject(ret);
2512
+ }
2513
+ /**
2514
+ * @param {Pubkey} nonce_pubkey
2515
+ * @param {Pubkey} authorized_pubkey
2516
+ * @returns {Instruction}
2517
+ */
2518
+ static advanceNonceAccount(nonce_pubkey, authorized_pubkey) {
2519
+ _assertClass(nonce_pubkey, Pubkey);
2520
+ _assertClass(authorized_pubkey, Pubkey);
2521
+ const ret = wasm.systeminstruction_advanceNonceAccount(nonce_pubkey.__wbg_ptr, authorized_pubkey.__wbg_ptr);
2522
+ return Instruction.__wrap(ret);
2523
+ }
2524
+ /**
2525
+ * @param {Pubkey} nonce_pubkey
2526
+ * @param {Pubkey} authorized_pubkey
2527
+ * @param {Pubkey} to_pubkey
2528
+ * @param {bigint} lamports
2529
+ * @returns {Instruction}
2530
+ */
2531
+ static withdrawNonceAccount(nonce_pubkey, authorized_pubkey, to_pubkey, lamports) {
2532
+ _assertClass(nonce_pubkey, Pubkey);
2533
+ _assertClass(authorized_pubkey, Pubkey);
2534
+ _assertClass(to_pubkey, Pubkey);
2535
+ const ret = wasm.systeminstruction_withdrawNonceAccount(nonce_pubkey.__wbg_ptr, authorized_pubkey.__wbg_ptr, to_pubkey.__wbg_ptr, lamports);
2536
+ return Instruction.__wrap(ret);
2537
+ }
2538
+ /**
2539
+ * @param {Pubkey} nonce_pubkey
2540
+ * @param {Pubkey} authorized_pubkey
2541
+ * @param {Pubkey} new_authority
2542
+ * @returns {Instruction}
2543
+ */
2544
+ static authorizeNonceAccount(nonce_pubkey, authorized_pubkey, new_authority) {
2545
+ _assertClass(nonce_pubkey, Pubkey);
2546
+ _assertClass(authorized_pubkey, Pubkey);
2547
+ _assertClass(new_authority, Pubkey);
2548
+ const ret = wasm.systeminstruction_authorizeNonceAccount(nonce_pubkey.__wbg_ptr, authorized_pubkey.__wbg_ptr, new_authority.__wbg_ptr);
2549
+ return Instruction.__wrap(ret);
2550
+ }
2551
+ }
2552
+ if (Symbol.dispose) SystemInstruction.prototype[Symbol.dispose] = SystemInstruction.prototype.free;
2553
+
2554
+ const TransactionFinalization = (typeof FinalizationRegistry === 'undefined')
2555
+ ? { register: () => {}, unregister: () => {} }
2556
+ : new FinalizationRegistry(ptr => wasm.__wbg_transaction_free(ptr >>> 0, 1));
2557
+ /**
2558
+ * wasm-bindgen version of the Transaction struct.
2559
+ * This duplication is required until https://github.com/rustwasm/wasm-bindgen/issues/3671
2560
+ * is fixed. This must not diverge from the regular non-wasm Transaction struct.
2561
+ */
2562
+ export class Transaction {
2563
+
2564
+ static __wrap(ptr) {
2565
+ ptr = ptr >>> 0;
2566
+ const obj = Object.create(Transaction.prototype);
2567
+ obj.__wbg_ptr = ptr;
2568
+ TransactionFinalization.register(obj, obj.__wbg_ptr, obj);
2569
+ return obj;
2570
+ }
2571
+
2572
+ __destroy_into_raw() {
2573
+ const ptr = this.__wbg_ptr;
2574
+ this.__wbg_ptr = 0;
2575
+ TransactionFinalization.unregister(this);
2576
+ return ptr;
2577
+ }
2578
+
2579
+ free() {
2580
+ const ptr = this.__destroy_into_raw();
2581
+ wasm.__wbg_transaction_free(ptr, 0);
2582
+ }
2583
+ /**
2584
+ * Create a new `Transaction`
2585
+ * @param {Instructions} instructions
2586
+ * @param {Pubkey | null} [payer]
2587
+ */
2588
+ constructor(instructions, payer) {
2589
+ _assertClass(instructions, Instructions);
2590
+ var ptr0 = instructions.__destroy_into_raw();
2591
+ let ptr1 = 0;
2592
+ if (!isLikeNone(payer)) {
2593
+ _assertClass(payer, Pubkey);
2594
+ ptr1 = payer.__destroy_into_raw();
2595
+ }
2596
+ const ret = wasm.transaction_constructor(ptr0, ptr1);
2597
+ this.__wbg_ptr = ret >>> 0;
2598
+ TransactionFinalization.register(this, this.__wbg_ptr, this);
2599
+ return this;
2600
+ }
2601
+ /**
2602
+ * Return a message containing all data that should be signed.
2603
+ * @returns {Message}
2604
+ */
2605
+ message() {
2606
+ const ret = wasm.transaction_message(this.__wbg_ptr);
2607
+ return Message.__wrap(ret);
2608
+ }
2609
+ /**
2610
+ * Return the serialized message data to sign.
2611
+ * @returns {Uint8Array}
2612
+ */
2613
+ messageData() {
2614
+ try {
2615
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2616
+ wasm.transaction_messageData(retptr, this.__wbg_ptr);
2617
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2618
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2619
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
2620
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
2621
+ return v1;
2622
+ } finally {
2623
+ wasm.__wbindgen_add_to_stack_pointer(16);
2624
+ }
2625
+ }
2626
+ /**
2627
+ * Verify the transaction
2628
+ */
2629
+ verify() {
2630
+ try {
2631
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2632
+ wasm.transaction_verify(retptr, this.__wbg_ptr);
2633
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2634
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2635
+ if (r1) {
2636
+ throw takeObject(r0);
2637
+ }
2638
+ } finally {
2639
+ wasm.__wbindgen_add_to_stack_pointer(16);
2640
+ }
2641
+ }
2642
+ /**
2643
+ * @param {Keypair} keypair
2644
+ * @param {Hash} recent_blockhash
2645
+ */
2646
+ partialSign(keypair, recent_blockhash) {
2647
+ _assertClass(keypair, Keypair);
2648
+ _assertClass(recent_blockhash, Hash);
2649
+ wasm.transaction_partialSign(this.__wbg_ptr, keypair.__wbg_ptr, recent_blockhash.__wbg_ptr);
2650
+ }
2651
+ /**
2652
+ * @returns {boolean}
2653
+ */
2654
+ isSigned() {
2655
+ const ret = wasm.transaction_isSigned(this.__wbg_ptr);
2656
+ return ret !== 0;
2657
+ }
2658
+ /**
2659
+ * @returns {Uint8Array}
2660
+ */
2661
+ toBytes() {
2662
+ try {
2663
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2664
+ wasm.transaction_toBytes(retptr, this.__wbg_ptr);
2665
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2666
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2667
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
2668
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
2669
+ return v1;
2670
+ } finally {
2671
+ wasm.__wbindgen_add_to_stack_pointer(16);
2672
+ }
2673
+ }
2674
+ /**
2675
+ * @param {Uint8Array} bytes
2676
+ * @returns {Transaction}
2677
+ */
2678
+ static fromBytes(bytes) {
2679
+ try {
2680
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2681
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
2682
+ const len0 = WASM_VECTOR_LEN;
2683
+ wasm.transaction_fromBytes(retptr, ptr0, len0);
2684
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2685
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2686
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2687
+ if (r2) {
2688
+ throw takeObject(r1);
2689
+ }
2690
+ return Transaction.__wrap(r0);
2691
+ } finally {
2692
+ wasm.__wbindgen_add_to_stack_pointer(16);
2693
+ }
2694
+ }
2695
+ }
2696
+ if (Symbol.dispose) Transaction.prototype[Symbol.dispose] = Transaction.prototype.free;
2697
+
1759
2698
  export function __wbg_Error_e83987f665cf5504(arg0, arg1) {
1760
2699
  const ret = Error(getStringFromWasm0(arg0, arg1));
1761
2700
  return addHeapObject(ret);
@@ -1856,16 +2795,91 @@ export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
1856
2795
  throw new Error(getStringFromWasm0(arg0, arg1));
1857
2796
  };
1858
2797
 
2798
+ export function __wbg__wbg_cb_unref_2454a539ea5790d9(arg0) {
2799
+ getObject(arg0)._wbg_cb_unref();
2800
+ };
2801
+
2802
+ export function __wbg_abort_28ad55c5825b004d(arg0, arg1) {
2803
+ getObject(arg0).abort(getObject(arg1));
2804
+ };
2805
+
2806
+ export function __wbg_abort_e7eb059f72f9ed0c(arg0) {
2807
+ getObject(arg0).abort();
2808
+ };
2809
+
2810
+ export function __wbg_append_b577eb3a177bc0fa() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2811
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
2812
+ }, arguments) };
2813
+
2814
+ export function __wbg_arrayBuffer_b375eccb84b4ddf3() { return handleError(function (arg0) {
2815
+ const ret = getObject(arg0).arrayBuffer();
2816
+ return addHeapObject(ret);
2817
+ }, arguments) };
2818
+
2819
+ export function __wbg_call_525440f72fbfc0ea() { return handleError(function (arg0, arg1, arg2) {
2820
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2821
+ return addHeapObject(ret);
2822
+ }, arguments) };
2823
+
1859
2824
  export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg0, arg1) {
1860
2825
  const ret = getObject(arg0).call(getObject(arg1));
1861
2826
  return addHeapObject(ret);
1862
2827
  }, arguments) };
1863
2828
 
2829
+ export function __wbg_clearTimeout_7a42b49784aea641(arg0) {
2830
+ const ret = clearTimeout(takeObject(arg0));
2831
+ return addHeapObject(ret);
2832
+ };
2833
+
2834
+ export function __wbg_crypto_038798f665f985e2(arg0) {
2835
+ const ret = getObject(arg0).crypto;
2836
+ return addHeapObject(ret);
2837
+ };
2838
+
2839
+ export function __wbg_debug_f4b0c59db649db48(arg0) {
2840
+ console.debug(getObject(arg0));
2841
+ };
2842
+
1864
2843
  export function __wbg_done_2042aa2670fb1db1(arg0) {
1865
2844
  const ret = getObject(arg0).done;
1866
2845
  return ret;
1867
2846
  };
1868
2847
 
2848
+ export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
2849
+ let deferred0_0;
2850
+ let deferred0_1;
2851
+ try {
2852
+ deferred0_0 = arg0;
2853
+ deferred0_1 = arg1;
2854
+ console.error(getStringFromWasm0(arg0, arg1));
2855
+ } finally {
2856
+ wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
2857
+ }
2858
+ };
2859
+
2860
+ export function __wbg_error_a7f8fbb0523dae15(arg0) {
2861
+ console.error(getObject(arg0));
2862
+ };
2863
+
2864
+ export function __wbg_fetch_74a3e84ebd2c9a0e(arg0) {
2865
+ const ret = fetch(getObject(arg0));
2866
+ return addHeapObject(ret);
2867
+ };
2868
+
2869
+ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
2870
+ const ret = getObject(arg0).fetch(getObject(arg1));
2871
+ return addHeapObject(ret);
2872
+ };
2873
+
2874
+ export function __wbg_getRandomValues_371e7ade8bd92088(arg0, arg1) {
2875
+ getObject(arg0).getRandomValues(getObject(arg1));
2876
+ };
2877
+
2878
+ export function __wbg_getRandomValues_7dfe5bd1b67c9ca1(arg0) {
2879
+ const ret = getObject(arg0).getRandomValues;
2880
+ return addHeapObject(ret);
2881
+ };
2882
+
1869
2883
  export function __wbg_get_7bed016f185add81(arg0, arg1) {
1870
2884
  const ret = getObject(arg0)[arg1 >>> 0];
1871
2885
  return addHeapObject(ret);
@@ -1886,6 +2900,20 @@ export function __wbg_get_with_ref_key_6550b2c093d2eb18(arg0, arg1) {
1886
2900
  return addHeapObject(ret);
1887
2901
  };
1888
2902
 
2903
+ export function __wbg_has_787fafc980c3ccdb() { return handleError(function (arg0, arg1) {
2904
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
2905
+ return ret;
2906
+ }, arguments) };
2907
+
2908
+ export function __wbg_headers_b87d7eaba61c3278(arg0) {
2909
+ const ret = getObject(arg0).headers;
2910
+ return addHeapObject(ret);
2911
+ };
2912
+
2913
+ export function __wbg_info_e674a11f4f50cc0c(arg0) {
2914
+ console.info(getObject(arg0));
2915
+ };
2916
+
1889
2917
  export function __wbg_instanceof_ArrayBuffer_70beb1189ca63b38(arg0) {
1890
2918
  let result;
1891
2919
  try {
@@ -1897,6 +2925,17 @@ export function __wbg_instanceof_ArrayBuffer_70beb1189ca63b38(arg0) {
1897
2925
  return ret;
1898
2926
  };
1899
2927
 
2928
+ export function __wbg_instanceof_Response_f4f3e87e07f3135c(arg0) {
2929
+ let result;
2930
+ try {
2931
+ result = getObject(arg0) instanceof Response;
2932
+ } catch (_) {
2933
+ result = false;
2934
+ }
2935
+ const ret = result;
2936
+ return ret;
2937
+ };
2938
+
1900
2939
  export function __wbg_instanceof_Uint8Array_20c8e73002f7af98(arg0) {
1901
2940
  let result;
1902
2941
  try {
@@ -1908,6 +2947,11 @@ export function __wbg_instanceof_Uint8Array_20c8e73002f7af98(arg0) {
1908
2947
  return ret;
1909
2948
  };
1910
2949
 
2950
+ export function __wbg_instruction_new(arg0) {
2951
+ const ret = Instruction.__wrap(arg0);
2952
+ return addHeapObject(ret);
2953
+ };
2954
+
1911
2955
  export function __wbg_isArray_643fafc484312e19(arg0) {
1912
2956
  const ret = Array.isArray(getObject(arg0));
1913
2957
  return ret;
@@ -1938,16 +2982,89 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
1938
2982
  return ret;
1939
2983
  };
1940
2984
 
2985
+ export function __wbg_log_8cec76766b8c0e33(arg0) {
2986
+ console.log(getObject(arg0));
2987
+ };
2988
+
2989
+ export function __wbg_msCrypto_ff35fce085fab2a3(arg0) {
2990
+ const ret = getObject(arg0).msCrypto;
2991
+ return addHeapObject(ret);
2992
+ };
2993
+
1941
2994
  export function __wbg_new_1acc0b6eea89d040() {
1942
2995
  const ret = new Object();
1943
2996
  return addHeapObject(ret);
1944
2997
  };
1945
2998
 
2999
+ export function __wbg_new_2531773dac38ebb3() { return handleError(function () {
3000
+ const ret = new AbortController();
3001
+ return addHeapObject(ret);
3002
+ }, arguments) };
3003
+
3004
+ export function __wbg_new_3c3d849046688a66(arg0, arg1) {
3005
+ try {
3006
+ var state0 = {a: arg0, b: arg1};
3007
+ var cb0 = (arg0, arg1) => {
3008
+ const a = state0.a;
3009
+ state0.a = 0;
3010
+ try {
3011
+ return __wasm_bindgen_func_elem_480(a, state0.b, arg0, arg1);
3012
+ } finally {
3013
+ state0.a = a;
3014
+ }
3015
+ };
3016
+ const ret = new Promise(cb0);
3017
+ return addHeapObject(ret);
3018
+ } finally {
3019
+ state0.a = state0.b = 0;
3020
+ }
3021
+ };
3022
+
1946
3023
  export function __wbg_new_5a79be3ab53b8aa5(arg0) {
1947
3024
  const ret = new Uint8Array(getObject(arg0));
1948
3025
  return addHeapObject(ret);
1949
3026
  };
1950
3027
 
3028
+ export function __wbg_new_8a6f238a6ece86ea() {
3029
+ const ret = new Error();
3030
+ return addHeapObject(ret);
3031
+ };
3032
+
3033
+ export function __wbg_new_9edf9838a2def39c() { return handleError(function () {
3034
+ const ret = new Headers();
3035
+ return addHeapObject(ret);
3036
+ }, arguments) };
3037
+
3038
+ export function __wbg_new_e17d9f43105b08be() {
3039
+ const ret = new Array();
3040
+ return addHeapObject(ret);
3041
+ };
3042
+
3043
+ export function __wbg_new_from_slice_92f4d78ca282a2d2(arg0, arg1) {
3044
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
3045
+ return addHeapObject(ret);
3046
+ };
3047
+
3048
+ export function __wbg_new_no_args_ee98eee5275000a4(arg0, arg1) {
3049
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
3050
+ return addHeapObject(ret);
3051
+ };
3052
+
3053
+ export function __wbg_new_with_length_01aa0dc35aa13543(arg0) {
3054
+ const ret = new Uint8Array(arg0 >>> 0);
3055
+ return addHeapObject(ret);
3056
+ };
3057
+
3058
+ export function __wbg_new_with_length_31d2669cb75c5215(arg0) {
3059
+ const ret = new Array(arg0 >>> 0);
3060
+ return addHeapObject(ret);
3061
+ };
3062
+
3063
+ export function __wbg_new_with_str_and_init_0ae7728b6ec367b1() { return handleError(function (arg0, arg1, arg2) {
3064
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
3065
+ return addHeapObject(ret);
3066
+ }, arguments) };
3067
+
1951
3068
  export function __wbg_next_020810e0ae8ebcb0() { return handleError(function (arg0) {
1952
3069
  const ret = getObject(arg0).next();
1953
3070
  return addHeapObject(ret);
@@ -1962,15 +3079,185 @@ export function __wbg_prototypesetcall_2a6620b6922694b2(arg0, arg1, arg2) {
1962
3079
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
1963
3080
  };
1964
3081
 
3082
+ export function __wbg_pubkey_new(arg0) {
3083
+ const ret = Pubkey.__wrap(arg0);
3084
+ return addHeapObject(ret);
3085
+ };
3086
+
3087
+ export function __wbg_push_df81a39d04db858c(arg0, arg1) {
3088
+ const ret = getObject(arg0).push(getObject(arg1));
3089
+ return ret;
3090
+ };
3091
+
3092
+ export function __wbg_queueMicrotask_34d692c25c47d05b(arg0) {
3093
+ const ret = getObject(arg0).queueMicrotask;
3094
+ return addHeapObject(ret);
3095
+ };
3096
+
3097
+ export function __wbg_queueMicrotask_9d76cacb20c84d58(arg0) {
3098
+ queueMicrotask(getObject(arg0));
3099
+ };
3100
+
3101
+ export function __wbg_randomFillSync_994ac6d9ade7a695(arg0, arg1, arg2) {
3102
+ getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
3103
+ };
3104
+
3105
+ export function __wbg_require_0d6aeaec3c042c88(arg0, arg1, arg2) {
3106
+ const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
3107
+ return addHeapObject(ret);
3108
+ };
3109
+
3110
+ export function __wbg_resolve_caf97c30b83f7053(arg0) {
3111
+ const ret = Promise.resolve(getObject(arg0));
3112
+ return addHeapObject(ret);
3113
+ };
3114
+
3115
+ export function __wbg_self_25aabeb5a7b41685() { return handleError(function () {
3116
+ const ret = self.self;
3117
+ return addHeapObject(ret);
3118
+ }, arguments) };
3119
+
3120
+ export function __wbg_setTimeout_7bb3429662ab1e70(arg0, arg1) {
3121
+ const ret = setTimeout(getObject(arg0), arg1);
3122
+ return addHeapObject(ret);
3123
+ };
3124
+
1965
3125
  export function __wbg_set_3807d5f0bfc24aa7(arg0, arg1, arg2) {
1966
3126
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1967
3127
  };
1968
3128
 
3129
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
3130
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
3131
+ };
3132
+
3133
+ export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
3134
+ getObject(arg0).body = getObject(arg1);
3135
+ };
3136
+
3137
+ export function __wbg_set_c213c871859d6500(arg0, arg1, arg2) {
3138
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
3139
+ };
3140
+
3141
+ export function __wbg_set_cache_2f9deb19b92b81e3(arg0, arg1) {
3142
+ getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
3143
+ };
3144
+
3145
+ export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
3146
+ getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
3147
+ };
3148
+
3149
+ export function __wbg_set_headers_6926da238cd32ee4(arg0, arg1) {
3150
+ getObject(arg0).headers = getObject(arg1);
3151
+ };
3152
+
3153
+ export function __wbg_set_method_c02d8cbbe204ac2d(arg0, arg1, arg2) {
3154
+ getObject(arg0).method = getStringFromWasm0(arg1, arg2);
3155
+ };
3156
+
3157
+ export function __wbg_set_mode_52ef73cfa79639cb(arg0, arg1) {
3158
+ getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
3159
+ };
3160
+
3161
+ export function __wbg_set_signal_dda2cf7ccb6bee0f(arg0, arg1) {
3162
+ getObject(arg0).signal = getObject(arg1);
3163
+ };
3164
+
3165
+ export function __wbg_signal_4db5aa055bf9eb9a(arg0) {
3166
+ const ret = getObject(arg0).signal;
3167
+ return addHeapObject(ret);
3168
+ };
3169
+
3170
+ export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
3171
+ const ret = getObject(arg1).stack;
3172
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3173
+ const len1 = WASM_VECTOR_LEN;
3174
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3175
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3176
+ };
3177
+
3178
+ export function __wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e() {
3179
+ const ret = typeof global === 'undefined' ? null : global;
3180
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3181
+ };
3182
+
3183
+ export function __wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac() {
3184
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
3185
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3186
+ };
3187
+
3188
+ export function __wbg_static_accessor_MODULE_ef3aa2eb251158a5() {
3189
+ const ret = module;
3190
+ return addHeapObject(ret);
3191
+ };
3192
+
3193
+ export function __wbg_static_accessor_SELF_6fdf4b64710cc91b() {
3194
+ const ret = typeof self === 'undefined' ? null : self;
3195
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3196
+ };
3197
+
3198
+ export function __wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2() {
3199
+ const ret = typeof window === 'undefined' ? null : window;
3200
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3201
+ };
3202
+
3203
+ export function __wbg_status_de7eed5a7a5bfd5d(arg0) {
3204
+ const ret = getObject(arg0).status;
3205
+ return ret;
3206
+ };
3207
+
3208
+ export function __wbg_stringify_b5fb28f6465d9c3e() { return handleError(function (arg0) {
3209
+ const ret = JSON.stringify(getObject(arg0));
3210
+ return addHeapObject(ret);
3211
+ }, arguments) };
3212
+
3213
+ export function __wbg_subarray_480600f3d6a9f26c(arg0, arg1, arg2) {
3214
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
3215
+ return addHeapObject(ret);
3216
+ };
3217
+
3218
+ export function __wbg_text_dc33c15c17bdfb52() { return handleError(function (arg0) {
3219
+ const ret = getObject(arg0).text();
3220
+ return addHeapObject(ret);
3221
+ }, arguments) };
3222
+
3223
+ export function __wbg_then_4f46f6544e6b4a28(arg0, arg1) {
3224
+ const ret = getObject(arg0).then(getObject(arg1));
3225
+ return addHeapObject(ret);
3226
+ };
3227
+
3228
+ export function __wbg_then_70d05cf780a18d77(arg0, arg1, arg2) {
3229
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
3230
+ return addHeapObject(ret);
3231
+ };
3232
+
3233
+ export function __wbg_url_b36d2a5008eb056f(arg0, arg1) {
3234
+ const ret = getObject(arg1).url;
3235
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3236
+ const len1 = WASM_VECTOR_LEN;
3237
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3238
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3239
+ };
3240
+
1969
3241
  export function __wbg_value_692627309814bb8c(arg0) {
1970
3242
  const ret = getObject(arg0).value;
1971
3243
  return addHeapObject(ret);
1972
3244
  };
1973
3245
 
3246
+ export function __wbg_values_58a781304289144d(arg0) {
3247
+ const ret = getObject(arg0).values();
3248
+ return addHeapObject(ret);
3249
+ };
3250
+
3251
+ export function __wbg_warn_1d74dddbe2fd1dbb(arg0) {
3252
+ console.warn(getObject(arg0));
3253
+ };
3254
+
3255
+ export function __wbindgen_cast_2116c94cd3735b0a(arg0, arg1) {
3256
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 338, function: Function { arguments: [], shim_idx: 339, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3257
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3116, __wasm_bindgen_func_elem_3120);
3258
+ return addHeapObject(ret);
3259
+ };
3260
+
1974
3261
  export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
1975
3262
  // Cast intrinsic for `Ref(String) -> Externref`.
1976
3263
  const ret = getStringFromWasm0(arg0, arg1);
@@ -1989,6 +3276,12 @@ export function __wbindgen_cast_9ae0607507abb057(arg0) {
1989
3276
  return addHeapObject(ret);
1990
3277
  };
1991
3278
 
3279
+ export function __wbindgen_cast_a8271c97b58d323e(arg0, arg1) {
3280
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 360, function: Function { arguments: [Externref], shim_idx: 355, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3281
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3323, __wasm_bindgen_func_elem_3304);
3282
+ return addHeapObject(ret);
3283
+ };
3284
+
1992
3285
  export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
1993
3286
  // Cast intrinsic for `F64 -> Externref`.
1994
3287
  const ret = arg0;