@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.
- package/dist/browser/defituna_core_js_bindings.d.ts +207 -20
- package/dist/browser/defituna_core_js_bindings_bg.js +1347 -54
- package/dist/browser/defituna_core_js_bindings_bg.wasm +0 -0
- package/dist/browser/defituna_core_js_bindings_bg.wasm.d.ts +60 -3
- package/dist/nodejs/defituna_core_js_bindings.d.ts +207 -20
- package/dist/nodejs/defituna_core_js_bindings.js +1363 -54
- package/dist/nodejs/defituna_core_js_bindings_bg.wasm +0 -0
- package/dist/nodejs/defituna_core_js_bindings_bg.wasm.d.ts +60 -3
- package/package.json +2 -2
|
@@ -181,11 +181,6 @@ function handleError(f, args) {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
185
|
-
ptr = ptr >>> 0;
|
|
186
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
184
|
function dropObject(idx) {
|
|
190
185
|
if (idx < 132) return;
|
|
191
186
|
heap[idx] = heap_next;
|
|
@@ -197,6 +192,66 @@ function takeObject(idx) {
|
|
|
197
192
|
dropObject(idx);
|
|
198
193
|
return ret;
|
|
199
194
|
}
|
|
195
|
+
|
|
196
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
197
|
+
ptr = ptr >>> 0;
|
|
198
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
202
|
+
? { register: () => {}, unregister: () => {} }
|
|
203
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
204
|
+
|
|
205
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
206
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
207
|
+
const real = (...args) => {
|
|
208
|
+
|
|
209
|
+
// First up with a closure we increment the internal reference
|
|
210
|
+
// count. This ensures that the Rust closure environment won't
|
|
211
|
+
// be deallocated while we're invoking it.
|
|
212
|
+
state.cnt++;
|
|
213
|
+
const a = state.a;
|
|
214
|
+
state.a = 0;
|
|
215
|
+
try {
|
|
216
|
+
return f(a, state.b, ...args);
|
|
217
|
+
} finally {
|
|
218
|
+
state.a = a;
|
|
219
|
+
real._wbg_cb_unref();
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
real._wbg_cb_unref = () => {
|
|
223
|
+
if (--state.cnt === 0) {
|
|
224
|
+
state.dtor(state.a, state.b);
|
|
225
|
+
state.a = 0;
|
|
226
|
+
CLOSURE_DTORS.unregister(state);
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
230
|
+
return real;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function _assertClass(instance, klass) {
|
|
234
|
+
if (!(instance instanceof klass)) {
|
|
235
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
240
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
241
|
+
const mem = getDataViewMemory0();
|
|
242
|
+
for (let i = 0; i < array.length; i++) {
|
|
243
|
+
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
244
|
+
}
|
|
245
|
+
WASM_VECTOR_LEN = array.length;
|
|
246
|
+
return ptr;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
250
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
251
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
252
|
+
WASM_VECTOR_LEN = arg.length;
|
|
253
|
+
return ptr;
|
|
254
|
+
}
|
|
200
255
|
/**
|
|
201
256
|
* Get the first tick index in the tick array that contains the specified tick index.
|
|
202
257
|
*
|
|
@@ -1426,12 +1481,6 @@ exports._PROTOCOL_FEE_RATE_MUL_VALUE = function() {
|
|
|
1426
1481
|
return ret;
|
|
1427
1482
|
};
|
|
1428
1483
|
|
|
1429
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
1430
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
1431
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
1432
|
-
WASM_VECTOR_LEN = arg.length;
|
|
1433
|
-
return ptr;
|
|
1434
|
-
}
|
|
1435
1484
|
/**
|
|
1436
1485
|
* Get the first unoccupied position in a bundle
|
|
1437
1486
|
*
|
|
@@ -1596,18 +1645,6 @@ exports.swapQuoteByOutputToken = function(token_out, specified_token_a, slippage
|
|
|
1596
1645
|
}
|
|
1597
1646
|
};
|
|
1598
1647
|
|
|
1599
|
-
exports._INVALID_ARGUMENTS = function() {
|
|
1600
|
-
try {
|
|
1601
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1602
|
-
wasm._INVALID_ARGUMENTS(retptr);
|
|
1603
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1604
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1605
|
-
return getStringFromWasm0(r0, r1);
|
|
1606
|
-
} finally {
|
|
1607
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1608
|
-
}
|
|
1609
|
-
};
|
|
1610
|
-
|
|
1611
1648
|
/**
|
|
1612
1649
|
* Spot position increase quote
|
|
1613
1650
|
*
|
|
@@ -1619,26 +1656,21 @@ exports._INVALID_ARGUMENTS = function() {
|
|
|
1619
1656
|
* - `slippage_tolerance_bps`: An optional slippage tolerance in basis points. Defaults to the global slippage tolerance if not provided.
|
|
1620
1657
|
* - `protocol_fee_rate`: Protocol fee rate from a market account represented as hundredths of a basis point (0.01% = 100).
|
|
1621
1658
|
* - `protocol_fee_rate_on_collateral`: Protocol fee rate from a market account represented as hundredths of a basis point (0.01% = 100).
|
|
1659
|
+
* - `mint_a`: Token A mint address
|
|
1660
|
+
* - `mint_b`: Token B mint address
|
|
1622
1661
|
* - `fusion_pool`: Fusion pool.
|
|
1623
|
-
* - `tick_arrays`:
|
|
1662
|
+
* - `tick_arrays`: Optional five tick arrays around the current pool price. If not provided, the quote will be calculated using the Jupiter Aggregator.
|
|
1624
1663
|
*
|
|
1625
1664
|
* # Returns
|
|
1626
1665
|
* - `IncreaseSpotPositionQuoteResult`: quote result
|
|
1627
1666
|
*/
|
|
1628
|
-
exports.getIncreaseSpotPositionQuote = function(increase_amount, collateral_token, position_token, leverage, slippage_tolerance_bps, protocol_fee_rate, protocol_fee_rate_on_collateral, fusion_pool, tick_arrays) {
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
if (r2) {
|
|
1636
|
-
throw takeObject(r1);
|
|
1637
|
-
}
|
|
1638
|
-
return takeObject(r0);
|
|
1639
|
-
} finally {
|
|
1640
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1641
|
-
}
|
|
1667
|
+
exports.getIncreaseSpotPositionQuote = function(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) {
|
|
1668
|
+
_assertClass(mint_a, Pubkey);
|
|
1669
|
+
var ptr0 = mint_a.__destroy_into_raw();
|
|
1670
|
+
_assertClass(mint_b, Pubkey);
|
|
1671
|
+
var ptr1 = mint_b.__destroy_into_raw();
|
|
1672
|
+
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));
|
|
1673
|
+
return takeObject(ret);
|
|
1642
1674
|
};
|
|
1643
1675
|
|
|
1644
1676
|
/**
|
|
@@ -1656,25 +1688,18 @@ exports.getIncreaseSpotPositionQuote = function(increase_amount, collateral_toke
|
|
|
1656
1688
|
* - `protocol_fee_rate`: Protocol fee rate from a market account represented as hundredths of a basis point (0.01% = 100).
|
|
1657
1689
|
* - `protocol_fee_rate_on_collateral`: Protocol fee rate from a market account represented as hundredths of a basis point (0.01% = 100).
|
|
1658
1690
|
* - `fusion_pool`: Fusion pool.
|
|
1659
|
-
* - `tick_arrays`:
|
|
1691
|
+
* - `tick_arrays`: Optional five tick arrays around the current pool price. If not provided, the quote will be calculated using the Jupiter Aggregator.
|
|
1660
1692
|
*
|
|
1661
1693
|
* # Returns
|
|
1662
1694
|
* - `DecreaseSpotPositionQuoteResult`: quote result
|
|
1663
1695
|
*/
|
|
1664
|
-
exports.getDecreaseSpotPositionQuote = function(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) {
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
if (r2) {
|
|
1672
|
-
throw takeObject(r1);
|
|
1673
|
-
}
|
|
1674
|
-
return takeObject(r0);
|
|
1675
|
-
} finally {
|
|
1676
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1677
|
-
}
|
|
1696
|
+
exports.getDecreaseSpotPositionQuote = function(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) {
|
|
1697
|
+
_assertClass(mint_a, Pubkey);
|
|
1698
|
+
var ptr0 = mint_a.__destroy_into_raw();
|
|
1699
|
+
_assertClass(mint_b, Pubkey);
|
|
1700
|
+
var ptr1 = mint_b.__destroy_into_raw();
|
|
1701
|
+
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));
|
|
1702
|
+
return takeObject(ret);
|
|
1678
1703
|
};
|
|
1679
1704
|
|
|
1680
1705
|
/**
|
|
@@ -1728,7 +1753,7 @@ exports.getLiquidationPrice = function(position_token, amount, debt, liquidation
|
|
|
1728
1753
|
exports.getTradableAmount = function(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) {
|
|
1729
1754
|
try {
|
|
1730
1755
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1731
|
-
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));
|
|
1756
|
+
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));
|
|
1732
1757
|
var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
|
|
1733
1758
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1734
1759
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
@@ -1746,6 +1771,936 @@ exports.calculateTunaProtocolFee = function(collateral_token, borrowed_token, co
|
|
|
1746
1771
|
return takeObject(ret);
|
|
1747
1772
|
};
|
|
1748
1773
|
|
|
1774
|
+
exports._INVALID_ARGUMENTS = function() {
|
|
1775
|
+
try {
|
|
1776
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1777
|
+
wasm._INVALID_ARGUMENTS(retptr);
|
|
1778
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1779
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1780
|
+
return getStringFromWasm0(r0, r1);
|
|
1781
|
+
} finally {
|
|
1782
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1783
|
+
}
|
|
1784
|
+
};
|
|
1785
|
+
|
|
1786
|
+
exports._TICK_ARRAYS_NOT_PROVIDED = function() {
|
|
1787
|
+
try {
|
|
1788
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1789
|
+
wasm._TICK_ARRAYS_NOT_PROVIDED(retptr);
|
|
1790
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1791
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1792
|
+
return getStringFromWasm0(r0, r1);
|
|
1793
|
+
} finally {
|
|
1794
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1795
|
+
}
|
|
1796
|
+
};
|
|
1797
|
+
|
|
1798
|
+
exports._JUPITER_QUOTE_REQUEST_ERROR = function() {
|
|
1799
|
+
try {
|
|
1800
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1801
|
+
wasm._JUPITER_QUOTE_REQUEST_ERROR(retptr);
|
|
1802
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1803
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1804
|
+
return getStringFromWasm0(r0, r1);
|
|
1805
|
+
} finally {
|
|
1806
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1807
|
+
}
|
|
1808
|
+
};
|
|
1809
|
+
|
|
1810
|
+
exports._JUPITER_SWAP_INSTRUCTIONS_REQUEST_ERROR = function() {
|
|
1811
|
+
try {
|
|
1812
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1813
|
+
wasm._JUPITER_SWAP_INSTRUCTIONS_REQUEST_ERROR(retptr);
|
|
1814
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1815
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1816
|
+
return getStringFromWasm0(r0, r1);
|
|
1817
|
+
} finally {
|
|
1818
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1819
|
+
}
|
|
1820
|
+
};
|
|
1821
|
+
|
|
1822
|
+
/**
|
|
1823
|
+
* Initialize Javascript logging and panic handler
|
|
1824
|
+
*/
|
|
1825
|
+
exports.solana_program_init = function() {
|
|
1826
|
+
wasm.solana_program_init();
|
|
1827
|
+
};
|
|
1828
|
+
|
|
1829
|
+
function __wasm_bindgen_func_elem_3304(arg0, arg1, arg2) {
|
|
1830
|
+
wasm.__wasm_bindgen_func_elem_3304(arg0, arg1, addHeapObject(arg2));
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
function __wasm_bindgen_func_elem_3120(arg0, arg1) {
|
|
1834
|
+
wasm.__wasm_bindgen_func_elem_3120(arg0, arg1);
|
|
1835
|
+
}
|
|
1836
|
+
|
|
1837
|
+
function __wasm_bindgen_func_elem_480(arg0, arg1, arg2, arg3) {
|
|
1838
|
+
wasm.__wasm_bindgen_func_elem_480(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
1842
|
+
|
|
1843
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
1844
|
+
|
|
1845
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1846
|
+
|
|
1847
|
+
const HashFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1848
|
+
? { register: () => {}, unregister: () => {} }
|
|
1849
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_hash_free(ptr >>> 0, 1));
|
|
1850
|
+
/**
|
|
1851
|
+
* A hash; the 32-byte output of a hashing algorithm.
|
|
1852
|
+
*
|
|
1853
|
+
* This struct is used most often in `solana-sdk` and related crates to contain
|
|
1854
|
+
* a [SHA-256] hash, but may instead contain a [blake3] hash.
|
|
1855
|
+
*
|
|
1856
|
+
* [SHA-256]: https://en.wikipedia.org/wiki/SHA-2
|
|
1857
|
+
* [blake3]: https://github.com/BLAKE3-team/BLAKE3
|
|
1858
|
+
*/
|
|
1859
|
+
class Hash {
|
|
1860
|
+
|
|
1861
|
+
static __wrap(ptr) {
|
|
1862
|
+
ptr = ptr >>> 0;
|
|
1863
|
+
const obj = Object.create(Hash.prototype);
|
|
1864
|
+
obj.__wbg_ptr = ptr;
|
|
1865
|
+
HashFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1866
|
+
return obj;
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
__destroy_into_raw() {
|
|
1870
|
+
const ptr = this.__wbg_ptr;
|
|
1871
|
+
this.__wbg_ptr = 0;
|
|
1872
|
+
HashFinalization.unregister(this);
|
|
1873
|
+
return ptr;
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
free() {
|
|
1877
|
+
const ptr = this.__destroy_into_raw();
|
|
1878
|
+
wasm.__wbg_hash_free(ptr, 0);
|
|
1879
|
+
}
|
|
1880
|
+
/**
|
|
1881
|
+
* Create a new Hash object
|
|
1882
|
+
*
|
|
1883
|
+
* * `value` - optional hash as a base58 encoded string, `Uint8Array`, `[number]`
|
|
1884
|
+
* @param {any} value
|
|
1885
|
+
*/
|
|
1886
|
+
constructor(value) {
|
|
1887
|
+
try {
|
|
1888
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1889
|
+
wasm.hash_constructor(retptr, addHeapObject(value));
|
|
1890
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1891
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1892
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1893
|
+
if (r2) {
|
|
1894
|
+
throw takeObject(r1);
|
|
1895
|
+
}
|
|
1896
|
+
this.__wbg_ptr = r0 >>> 0;
|
|
1897
|
+
HashFinalization.register(this, this.__wbg_ptr, this);
|
|
1898
|
+
return this;
|
|
1899
|
+
} finally {
|
|
1900
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
/**
|
|
1904
|
+
* Return the base58 string representation of the hash
|
|
1905
|
+
* @returns {string}
|
|
1906
|
+
*/
|
|
1907
|
+
toString() {
|
|
1908
|
+
let deferred1_0;
|
|
1909
|
+
let deferred1_1;
|
|
1910
|
+
try {
|
|
1911
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1912
|
+
wasm.hash_toString(retptr, this.__wbg_ptr);
|
|
1913
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1914
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1915
|
+
deferred1_0 = r0;
|
|
1916
|
+
deferred1_1 = r1;
|
|
1917
|
+
return getStringFromWasm0(r0, r1);
|
|
1918
|
+
} finally {
|
|
1919
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1920
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
/**
|
|
1924
|
+
* Checks if two `Hash`s are equal
|
|
1925
|
+
* @param {Hash} other
|
|
1926
|
+
* @returns {boolean}
|
|
1927
|
+
*/
|
|
1928
|
+
equals(other) {
|
|
1929
|
+
_assertClass(other, Hash);
|
|
1930
|
+
const ret = wasm.hash_equals(this.__wbg_ptr, other.__wbg_ptr);
|
|
1931
|
+
return ret !== 0;
|
|
1932
|
+
}
|
|
1933
|
+
/**
|
|
1934
|
+
* Return the `Uint8Array` representation of the hash
|
|
1935
|
+
* @returns {Uint8Array}
|
|
1936
|
+
*/
|
|
1937
|
+
toBytes() {
|
|
1938
|
+
try {
|
|
1939
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1940
|
+
wasm.hash_toBytes(retptr, this.__wbg_ptr);
|
|
1941
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1942
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1943
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1944
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1945
|
+
return v1;
|
|
1946
|
+
} finally {
|
|
1947
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
if (Symbol.dispose) Hash.prototype[Symbol.dispose] = Hash.prototype.free;
|
|
1952
|
+
|
|
1953
|
+
exports.Hash = Hash;
|
|
1954
|
+
|
|
1955
|
+
const InstructionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1956
|
+
? { register: () => {}, unregister: () => {} }
|
|
1957
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_instruction_free(ptr >>> 0, 1));
|
|
1958
|
+
/**
|
|
1959
|
+
* wasm-bindgen version of the Instruction struct.
|
|
1960
|
+
* This duplication is required until https://github.com/rustwasm/wasm-bindgen/issues/3671
|
|
1961
|
+
* is fixed. This must not diverge from the regular non-wasm Instruction struct.
|
|
1962
|
+
*/
|
|
1963
|
+
class Instruction {
|
|
1964
|
+
|
|
1965
|
+
static __wrap(ptr) {
|
|
1966
|
+
ptr = ptr >>> 0;
|
|
1967
|
+
const obj = Object.create(Instruction.prototype);
|
|
1968
|
+
obj.__wbg_ptr = ptr;
|
|
1969
|
+
InstructionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1970
|
+
return obj;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
__destroy_into_raw() {
|
|
1974
|
+
const ptr = this.__wbg_ptr;
|
|
1975
|
+
this.__wbg_ptr = 0;
|
|
1976
|
+
InstructionFinalization.unregister(this);
|
|
1977
|
+
return ptr;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
free() {
|
|
1981
|
+
const ptr = this.__destroy_into_raw();
|
|
1982
|
+
wasm.__wbg_instruction_free(ptr, 0);
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
if (Symbol.dispose) Instruction.prototype[Symbol.dispose] = Instruction.prototype.free;
|
|
1986
|
+
|
|
1987
|
+
exports.Instruction = Instruction;
|
|
1988
|
+
|
|
1989
|
+
const InstructionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1990
|
+
? { register: () => {}, unregister: () => {} }
|
|
1991
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_instructions_free(ptr >>> 0, 1));
|
|
1992
|
+
|
|
1993
|
+
class Instructions {
|
|
1994
|
+
|
|
1995
|
+
__destroy_into_raw() {
|
|
1996
|
+
const ptr = this.__wbg_ptr;
|
|
1997
|
+
this.__wbg_ptr = 0;
|
|
1998
|
+
InstructionsFinalization.unregister(this);
|
|
1999
|
+
return ptr;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
free() {
|
|
2003
|
+
const ptr = this.__destroy_into_raw();
|
|
2004
|
+
wasm.__wbg_instructions_free(ptr, 0);
|
|
2005
|
+
}
|
|
2006
|
+
constructor() {
|
|
2007
|
+
const ret = wasm.instructions_constructor();
|
|
2008
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2009
|
+
InstructionsFinalization.register(this, this.__wbg_ptr, this);
|
|
2010
|
+
return this;
|
|
2011
|
+
}
|
|
2012
|
+
/**
|
|
2013
|
+
* @param {Instruction} instruction
|
|
2014
|
+
*/
|
|
2015
|
+
push(instruction) {
|
|
2016
|
+
_assertClass(instruction, Instruction);
|
|
2017
|
+
var ptr0 = instruction.__destroy_into_raw();
|
|
2018
|
+
wasm.instructions_push(this.__wbg_ptr, ptr0);
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
if (Symbol.dispose) Instructions.prototype[Symbol.dispose] = Instructions.prototype.free;
|
|
2022
|
+
|
|
2023
|
+
exports.Instructions = Instructions;
|
|
2024
|
+
|
|
2025
|
+
const KeypairFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2026
|
+
? { register: () => {}, unregister: () => {} }
|
|
2027
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr >>> 0, 1));
|
|
2028
|
+
/**
|
|
2029
|
+
* A vanilla Ed25519 key pair
|
|
2030
|
+
*/
|
|
2031
|
+
class Keypair {
|
|
2032
|
+
|
|
2033
|
+
static __wrap(ptr) {
|
|
2034
|
+
ptr = ptr >>> 0;
|
|
2035
|
+
const obj = Object.create(Keypair.prototype);
|
|
2036
|
+
obj.__wbg_ptr = ptr;
|
|
2037
|
+
KeypairFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2038
|
+
return obj;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
__destroy_into_raw() {
|
|
2042
|
+
const ptr = this.__wbg_ptr;
|
|
2043
|
+
this.__wbg_ptr = 0;
|
|
2044
|
+
KeypairFinalization.unregister(this);
|
|
2045
|
+
return ptr;
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
free() {
|
|
2049
|
+
const ptr = this.__destroy_into_raw();
|
|
2050
|
+
wasm.__wbg_keypair_free(ptr, 0);
|
|
2051
|
+
}
|
|
2052
|
+
/**
|
|
2053
|
+
* Create a new `Keypair `
|
|
2054
|
+
*/
|
|
2055
|
+
constructor() {
|
|
2056
|
+
const ret = wasm.keypair_constructor();
|
|
2057
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2058
|
+
KeypairFinalization.register(this, this.__wbg_ptr, this);
|
|
2059
|
+
return this;
|
|
2060
|
+
}
|
|
2061
|
+
/**
|
|
2062
|
+
* Convert a `Keypair` to a `Uint8Array`
|
|
2063
|
+
* @returns {Uint8Array}
|
|
2064
|
+
*/
|
|
2065
|
+
toBytes() {
|
|
2066
|
+
try {
|
|
2067
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2068
|
+
wasm.keypair_toBytes(retptr, this.__wbg_ptr);
|
|
2069
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2070
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2071
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
2072
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
2073
|
+
return v1;
|
|
2074
|
+
} finally {
|
|
2075
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
/**
|
|
2079
|
+
* Recover a `Keypair` from a `Uint8Array`
|
|
2080
|
+
* @param {Uint8Array} bytes
|
|
2081
|
+
* @returns {Keypair}
|
|
2082
|
+
*/
|
|
2083
|
+
static fromBytes(bytes) {
|
|
2084
|
+
try {
|
|
2085
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2086
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
2087
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2088
|
+
wasm.keypair_fromBytes(retptr, ptr0, len0);
|
|
2089
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2090
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2091
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2092
|
+
if (r2) {
|
|
2093
|
+
throw takeObject(r1);
|
|
2094
|
+
}
|
|
2095
|
+
return Keypair.__wrap(r0);
|
|
2096
|
+
} finally {
|
|
2097
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
/**
|
|
2101
|
+
* Return the `Pubkey` for this `Keypair`
|
|
2102
|
+
* @returns {Pubkey}
|
|
2103
|
+
*/
|
|
2104
|
+
pubkey() {
|
|
2105
|
+
const ret = wasm.keypair_pubkey(this.__wbg_ptr);
|
|
2106
|
+
return Pubkey.__wrap(ret);
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
if (Symbol.dispose) Keypair.prototype[Symbol.dispose] = Keypair.prototype.free;
|
|
2110
|
+
|
|
2111
|
+
exports.Keypair = Keypair;
|
|
2112
|
+
|
|
2113
|
+
const MessageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2114
|
+
? { register: () => {}, unregister: () => {} }
|
|
2115
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_message_free(ptr >>> 0, 1));
|
|
2116
|
+
/**
|
|
2117
|
+
* wasm-bindgen version of the Message struct.
|
|
2118
|
+
* This duplication is required until https://github.com/rustwasm/wasm-bindgen/issues/3671
|
|
2119
|
+
* is fixed. This must not diverge from the regular non-wasm Message struct.
|
|
2120
|
+
*/
|
|
2121
|
+
class Message {
|
|
2122
|
+
|
|
2123
|
+
static __wrap(ptr) {
|
|
2124
|
+
ptr = ptr >>> 0;
|
|
2125
|
+
const obj = Object.create(Message.prototype);
|
|
2126
|
+
obj.__wbg_ptr = ptr;
|
|
2127
|
+
MessageFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2128
|
+
return obj;
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
__destroy_into_raw() {
|
|
2132
|
+
const ptr = this.__wbg_ptr;
|
|
2133
|
+
this.__wbg_ptr = 0;
|
|
2134
|
+
MessageFinalization.unregister(this);
|
|
2135
|
+
return ptr;
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
free() {
|
|
2139
|
+
const ptr = this.__destroy_into_raw();
|
|
2140
|
+
wasm.__wbg_message_free(ptr, 0);
|
|
2141
|
+
}
|
|
2142
|
+
/**
|
|
2143
|
+
* The id of a recent ledger entry.
|
|
2144
|
+
* @returns {Hash}
|
|
2145
|
+
*/
|
|
2146
|
+
get recent_blockhash() {
|
|
2147
|
+
const ret = wasm.__wbg_get_message_recent_blockhash(this.__wbg_ptr);
|
|
2148
|
+
return Hash.__wrap(ret);
|
|
2149
|
+
}
|
|
2150
|
+
/**
|
|
2151
|
+
* The id of a recent ledger entry.
|
|
2152
|
+
* @param {Hash} arg0
|
|
2153
|
+
*/
|
|
2154
|
+
set recent_blockhash(arg0) {
|
|
2155
|
+
_assertClass(arg0, Hash);
|
|
2156
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
2157
|
+
wasm.__wbg_set_message_recent_blockhash(this.__wbg_ptr, ptr0);
|
|
2158
|
+
}
|
|
2159
|
+
}
|
|
2160
|
+
if (Symbol.dispose) Message.prototype[Symbol.dispose] = Message.prototype.free;
|
|
2161
|
+
|
|
2162
|
+
exports.Message = Message;
|
|
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 — as with [_program derived
|
|
2173
|
+
* addresses_][pdas] — 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
|
+
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
|
+
exports.Pubkey = Pubkey;
|
|
2363
|
+
|
|
2364
|
+
const SystemInstructionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2365
|
+
? { register: () => {}, unregister: () => {} }
|
|
2366
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_systeminstruction_free(ptr >>> 0, 1));
|
|
2367
|
+
|
|
2368
|
+
class SystemInstruction {
|
|
2369
|
+
|
|
2370
|
+
__destroy_into_raw() {
|
|
2371
|
+
const ptr = this.__wbg_ptr;
|
|
2372
|
+
this.__wbg_ptr = 0;
|
|
2373
|
+
SystemInstructionFinalization.unregister(this);
|
|
2374
|
+
return ptr;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
free() {
|
|
2378
|
+
const ptr = this.__destroy_into_raw();
|
|
2379
|
+
wasm.__wbg_systeminstruction_free(ptr, 0);
|
|
2380
|
+
}
|
|
2381
|
+
/**
|
|
2382
|
+
* @param {Pubkey} from_pubkey
|
|
2383
|
+
* @param {Pubkey} to_pubkey
|
|
2384
|
+
* @param {bigint} lamports
|
|
2385
|
+
* @param {bigint} space
|
|
2386
|
+
* @param {Pubkey} owner
|
|
2387
|
+
* @returns {Instruction}
|
|
2388
|
+
*/
|
|
2389
|
+
static createAccount(from_pubkey, to_pubkey, lamports, space, owner) {
|
|
2390
|
+
_assertClass(from_pubkey, Pubkey);
|
|
2391
|
+
_assertClass(to_pubkey, Pubkey);
|
|
2392
|
+
_assertClass(owner, Pubkey);
|
|
2393
|
+
const ret = wasm.systeminstruction_createAccount(from_pubkey.__wbg_ptr, to_pubkey.__wbg_ptr, lamports, space, owner.__wbg_ptr);
|
|
2394
|
+
return Instruction.__wrap(ret);
|
|
2395
|
+
}
|
|
2396
|
+
/**
|
|
2397
|
+
* @param {Pubkey} from_pubkey
|
|
2398
|
+
* @param {Pubkey} to_pubkey
|
|
2399
|
+
* @param {Pubkey} base
|
|
2400
|
+
* @param {string} seed
|
|
2401
|
+
* @param {bigint} lamports
|
|
2402
|
+
* @param {bigint} space
|
|
2403
|
+
* @param {Pubkey} owner
|
|
2404
|
+
* @returns {Instruction}
|
|
2405
|
+
*/
|
|
2406
|
+
static createAccountWithSeed(from_pubkey, to_pubkey, base, seed, lamports, space, owner) {
|
|
2407
|
+
_assertClass(from_pubkey, Pubkey);
|
|
2408
|
+
_assertClass(to_pubkey, Pubkey);
|
|
2409
|
+
_assertClass(base, Pubkey);
|
|
2410
|
+
const ptr0 = passStringToWasm0(seed, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2411
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2412
|
+
_assertClass(owner, Pubkey);
|
|
2413
|
+
const ret = wasm.systeminstruction_createAccountWithSeed(from_pubkey.__wbg_ptr, to_pubkey.__wbg_ptr, base.__wbg_ptr, ptr0, len0, lamports, space, owner.__wbg_ptr);
|
|
2414
|
+
return Instruction.__wrap(ret);
|
|
2415
|
+
}
|
|
2416
|
+
/**
|
|
2417
|
+
* @param {Pubkey} pubkey
|
|
2418
|
+
* @param {Pubkey} owner
|
|
2419
|
+
* @returns {Instruction}
|
|
2420
|
+
*/
|
|
2421
|
+
static assign(pubkey, owner) {
|
|
2422
|
+
_assertClass(pubkey, Pubkey);
|
|
2423
|
+
_assertClass(owner, Pubkey);
|
|
2424
|
+
const ret = wasm.systeminstruction_assign(pubkey.__wbg_ptr, owner.__wbg_ptr);
|
|
2425
|
+
return Instruction.__wrap(ret);
|
|
2426
|
+
}
|
|
2427
|
+
/**
|
|
2428
|
+
* @param {Pubkey} pubkey
|
|
2429
|
+
* @param {Pubkey} base
|
|
2430
|
+
* @param {string} seed
|
|
2431
|
+
* @param {Pubkey} owner
|
|
2432
|
+
* @returns {Instruction}
|
|
2433
|
+
*/
|
|
2434
|
+
static assignWithSeed(pubkey, base, seed, owner) {
|
|
2435
|
+
_assertClass(pubkey, Pubkey);
|
|
2436
|
+
_assertClass(base, Pubkey);
|
|
2437
|
+
const ptr0 = passStringToWasm0(seed, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2438
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2439
|
+
_assertClass(owner, Pubkey);
|
|
2440
|
+
const ret = wasm.systeminstruction_assignWithSeed(pubkey.__wbg_ptr, base.__wbg_ptr, ptr0, len0, owner.__wbg_ptr);
|
|
2441
|
+
return Instruction.__wrap(ret);
|
|
2442
|
+
}
|
|
2443
|
+
/**
|
|
2444
|
+
* @param {Pubkey} from_pubkey
|
|
2445
|
+
* @param {Pubkey} to_pubkey
|
|
2446
|
+
* @param {bigint} lamports
|
|
2447
|
+
* @returns {Instruction}
|
|
2448
|
+
*/
|
|
2449
|
+
static transfer(from_pubkey, to_pubkey, lamports) {
|
|
2450
|
+
_assertClass(from_pubkey, Pubkey);
|
|
2451
|
+
_assertClass(to_pubkey, Pubkey);
|
|
2452
|
+
const ret = wasm.systeminstruction_transfer(from_pubkey.__wbg_ptr, to_pubkey.__wbg_ptr, lamports);
|
|
2453
|
+
return Instruction.__wrap(ret);
|
|
2454
|
+
}
|
|
2455
|
+
/**
|
|
2456
|
+
* @param {Pubkey} from_pubkey
|
|
2457
|
+
* @param {Pubkey} from_base
|
|
2458
|
+
* @param {string} from_seed
|
|
2459
|
+
* @param {Pubkey} from_owner
|
|
2460
|
+
* @param {Pubkey} to_pubkey
|
|
2461
|
+
* @param {bigint} lamports
|
|
2462
|
+
* @returns {Instruction}
|
|
2463
|
+
*/
|
|
2464
|
+
static transferWithSeed(from_pubkey, from_base, from_seed, from_owner, to_pubkey, lamports) {
|
|
2465
|
+
_assertClass(from_pubkey, Pubkey);
|
|
2466
|
+
_assertClass(from_base, Pubkey);
|
|
2467
|
+
const ptr0 = passStringToWasm0(from_seed, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2468
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2469
|
+
_assertClass(from_owner, Pubkey);
|
|
2470
|
+
_assertClass(to_pubkey, Pubkey);
|
|
2471
|
+
const ret = wasm.systeminstruction_transferWithSeed(from_pubkey.__wbg_ptr, from_base.__wbg_ptr, ptr0, len0, from_owner.__wbg_ptr, to_pubkey.__wbg_ptr, lamports);
|
|
2472
|
+
return Instruction.__wrap(ret);
|
|
2473
|
+
}
|
|
2474
|
+
/**
|
|
2475
|
+
* @param {Pubkey} pubkey
|
|
2476
|
+
* @param {bigint} space
|
|
2477
|
+
* @returns {Instruction}
|
|
2478
|
+
*/
|
|
2479
|
+
static allocate(pubkey, space) {
|
|
2480
|
+
_assertClass(pubkey, Pubkey);
|
|
2481
|
+
const ret = wasm.systeminstruction_allocate(pubkey.__wbg_ptr, space);
|
|
2482
|
+
return Instruction.__wrap(ret);
|
|
2483
|
+
}
|
|
2484
|
+
/**
|
|
2485
|
+
* @param {Pubkey} address
|
|
2486
|
+
* @param {Pubkey} base
|
|
2487
|
+
* @param {string} seed
|
|
2488
|
+
* @param {bigint} space
|
|
2489
|
+
* @param {Pubkey} owner
|
|
2490
|
+
* @returns {Instruction}
|
|
2491
|
+
*/
|
|
2492
|
+
static allocateWithSeed(address, base, seed, space, owner) {
|
|
2493
|
+
_assertClass(address, Pubkey);
|
|
2494
|
+
_assertClass(base, Pubkey);
|
|
2495
|
+
const ptr0 = passStringToWasm0(seed, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2496
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2497
|
+
_assertClass(owner, Pubkey);
|
|
2498
|
+
const ret = wasm.systeminstruction_allocateWithSeed(address.__wbg_ptr, base.__wbg_ptr, ptr0, len0, space, owner.__wbg_ptr);
|
|
2499
|
+
return Instruction.__wrap(ret);
|
|
2500
|
+
}
|
|
2501
|
+
/**
|
|
2502
|
+
* @param {Pubkey} from_pubkey
|
|
2503
|
+
* @param {Pubkey} nonce_pubkey
|
|
2504
|
+
* @param {Pubkey} authority
|
|
2505
|
+
* @param {bigint} lamports
|
|
2506
|
+
* @returns {Array<any>}
|
|
2507
|
+
*/
|
|
2508
|
+
static createNonceAccount(from_pubkey, nonce_pubkey, authority, lamports) {
|
|
2509
|
+
_assertClass(from_pubkey, Pubkey);
|
|
2510
|
+
_assertClass(nonce_pubkey, Pubkey);
|
|
2511
|
+
_assertClass(authority, Pubkey);
|
|
2512
|
+
const ret = wasm.systeminstruction_createNonceAccount(from_pubkey.__wbg_ptr, nonce_pubkey.__wbg_ptr, authority.__wbg_ptr, lamports);
|
|
2513
|
+
return takeObject(ret);
|
|
2514
|
+
}
|
|
2515
|
+
/**
|
|
2516
|
+
* @param {Pubkey} nonce_pubkey
|
|
2517
|
+
* @param {Pubkey} authorized_pubkey
|
|
2518
|
+
* @returns {Instruction}
|
|
2519
|
+
*/
|
|
2520
|
+
static advanceNonceAccount(nonce_pubkey, authorized_pubkey) {
|
|
2521
|
+
_assertClass(nonce_pubkey, Pubkey);
|
|
2522
|
+
_assertClass(authorized_pubkey, Pubkey);
|
|
2523
|
+
const ret = wasm.systeminstruction_advanceNonceAccount(nonce_pubkey.__wbg_ptr, authorized_pubkey.__wbg_ptr);
|
|
2524
|
+
return Instruction.__wrap(ret);
|
|
2525
|
+
}
|
|
2526
|
+
/**
|
|
2527
|
+
* @param {Pubkey} nonce_pubkey
|
|
2528
|
+
* @param {Pubkey} authorized_pubkey
|
|
2529
|
+
* @param {Pubkey} to_pubkey
|
|
2530
|
+
* @param {bigint} lamports
|
|
2531
|
+
* @returns {Instruction}
|
|
2532
|
+
*/
|
|
2533
|
+
static withdrawNonceAccount(nonce_pubkey, authorized_pubkey, to_pubkey, lamports) {
|
|
2534
|
+
_assertClass(nonce_pubkey, Pubkey);
|
|
2535
|
+
_assertClass(authorized_pubkey, Pubkey);
|
|
2536
|
+
_assertClass(to_pubkey, Pubkey);
|
|
2537
|
+
const ret = wasm.systeminstruction_withdrawNonceAccount(nonce_pubkey.__wbg_ptr, authorized_pubkey.__wbg_ptr, to_pubkey.__wbg_ptr, lamports);
|
|
2538
|
+
return Instruction.__wrap(ret);
|
|
2539
|
+
}
|
|
2540
|
+
/**
|
|
2541
|
+
* @param {Pubkey} nonce_pubkey
|
|
2542
|
+
* @param {Pubkey} authorized_pubkey
|
|
2543
|
+
* @param {Pubkey} new_authority
|
|
2544
|
+
* @returns {Instruction}
|
|
2545
|
+
*/
|
|
2546
|
+
static authorizeNonceAccount(nonce_pubkey, authorized_pubkey, new_authority) {
|
|
2547
|
+
_assertClass(nonce_pubkey, Pubkey);
|
|
2548
|
+
_assertClass(authorized_pubkey, Pubkey);
|
|
2549
|
+
_assertClass(new_authority, Pubkey);
|
|
2550
|
+
const ret = wasm.systeminstruction_authorizeNonceAccount(nonce_pubkey.__wbg_ptr, authorized_pubkey.__wbg_ptr, new_authority.__wbg_ptr);
|
|
2551
|
+
return Instruction.__wrap(ret);
|
|
2552
|
+
}
|
|
2553
|
+
}
|
|
2554
|
+
if (Symbol.dispose) SystemInstruction.prototype[Symbol.dispose] = SystemInstruction.prototype.free;
|
|
2555
|
+
|
|
2556
|
+
exports.SystemInstruction = SystemInstruction;
|
|
2557
|
+
|
|
2558
|
+
const TransactionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2559
|
+
? { register: () => {}, unregister: () => {} }
|
|
2560
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_transaction_free(ptr >>> 0, 1));
|
|
2561
|
+
/**
|
|
2562
|
+
* wasm-bindgen version of the Transaction struct.
|
|
2563
|
+
* This duplication is required until https://github.com/rustwasm/wasm-bindgen/issues/3671
|
|
2564
|
+
* is fixed. This must not diverge from the regular non-wasm Transaction struct.
|
|
2565
|
+
*/
|
|
2566
|
+
class Transaction {
|
|
2567
|
+
|
|
2568
|
+
static __wrap(ptr) {
|
|
2569
|
+
ptr = ptr >>> 0;
|
|
2570
|
+
const obj = Object.create(Transaction.prototype);
|
|
2571
|
+
obj.__wbg_ptr = ptr;
|
|
2572
|
+
TransactionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2573
|
+
return obj;
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
__destroy_into_raw() {
|
|
2577
|
+
const ptr = this.__wbg_ptr;
|
|
2578
|
+
this.__wbg_ptr = 0;
|
|
2579
|
+
TransactionFinalization.unregister(this);
|
|
2580
|
+
return ptr;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
free() {
|
|
2584
|
+
const ptr = this.__destroy_into_raw();
|
|
2585
|
+
wasm.__wbg_transaction_free(ptr, 0);
|
|
2586
|
+
}
|
|
2587
|
+
/**
|
|
2588
|
+
* Create a new `Transaction`
|
|
2589
|
+
* @param {Instructions} instructions
|
|
2590
|
+
* @param {Pubkey | null} [payer]
|
|
2591
|
+
*/
|
|
2592
|
+
constructor(instructions, payer) {
|
|
2593
|
+
_assertClass(instructions, Instructions);
|
|
2594
|
+
var ptr0 = instructions.__destroy_into_raw();
|
|
2595
|
+
let ptr1 = 0;
|
|
2596
|
+
if (!isLikeNone(payer)) {
|
|
2597
|
+
_assertClass(payer, Pubkey);
|
|
2598
|
+
ptr1 = payer.__destroy_into_raw();
|
|
2599
|
+
}
|
|
2600
|
+
const ret = wasm.transaction_constructor(ptr0, ptr1);
|
|
2601
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2602
|
+
TransactionFinalization.register(this, this.__wbg_ptr, this);
|
|
2603
|
+
return this;
|
|
2604
|
+
}
|
|
2605
|
+
/**
|
|
2606
|
+
* Return a message containing all data that should be signed.
|
|
2607
|
+
* @returns {Message}
|
|
2608
|
+
*/
|
|
2609
|
+
message() {
|
|
2610
|
+
const ret = wasm.transaction_message(this.__wbg_ptr);
|
|
2611
|
+
return Message.__wrap(ret);
|
|
2612
|
+
}
|
|
2613
|
+
/**
|
|
2614
|
+
* Return the serialized message data to sign.
|
|
2615
|
+
* @returns {Uint8Array}
|
|
2616
|
+
*/
|
|
2617
|
+
messageData() {
|
|
2618
|
+
try {
|
|
2619
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2620
|
+
wasm.transaction_messageData(retptr, this.__wbg_ptr);
|
|
2621
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2622
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2623
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
2624
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
2625
|
+
return v1;
|
|
2626
|
+
} finally {
|
|
2627
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
/**
|
|
2631
|
+
* Verify the transaction
|
|
2632
|
+
*/
|
|
2633
|
+
verify() {
|
|
2634
|
+
try {
|
|
2635
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2636
|
+
wasm.transaction_verify(retptr, this.__wbg_ptr);
|
|
2637
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2638
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2639
|
+
if (r1) {
|
|
2640
|
+
throw takeObject(r0);
|
|
2641
|
+
}
|
|
2642
|
+
} finally {
|
|
2643
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2644
|
+
}
|
|
2645
|
+
}
|
|
2646
|
+
/**
|
|
2647
|
+
* @param {Keypair} keypair
|
|
2648
|
+
* @param {Hash} recent_blockhash
|
|
2649
|
+
*/
|
|
2650
|
+
partialSign(keypair, recent_blockhash) {
|
|
2651
|
+
_assertClass(keypair, Keypair);
|
|
2652
|
+
_assertClass(recent_blockhash, Hash);
|
|
2653
|
+
wasm.transaction_partialSign(this.__wbg_ptr, keypair.__wbg_ptr, recent_blockhash.__wbg_ptr);
|
|
2654
|
+
}
|
|
2655
|
+
/**
|
|
2656
|
+
* @returns {boolean}
|
|
2657
|
+
*/
|
|
2658
|
+
isSigned() {
|
|
2659
|
+
const ret = wasm.transaction_isSigned(this.__wbg_ptr);
|
|
2660
|
+
return ret !== 0;
|
|
2661
|
+
}
|
|
2662
|
+
/**
|
|
2663
|
+
* @returns {Uint8Array}
|
|
2664
|
+
*/
|
|
2665
|
+
toBytes() {
|
|
2666
|
+
try {
|
|
2667
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2668
|
+
wasm.transaction_toBytes(retptr, this.__wbg_ptr);
|
|
2669
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2670
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2671
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
2672
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
2673
|
+
return v1;
|
|
2674
|
+
} finally {
|
|
2675
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
/**
|
|
2679
|
+
* @param {Uint8Array} bytes
|
|
2680
|
+
* @returns {Transaction}
|
|
2681
|
+
*/
|
|
2682
|
+
static fromBytes(bytes) {
|
|
2683
|
+
try {
|
|
2684
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2685
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
2686
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2687
|
+
wasm.transaction_fromBytes(retptr, ptr0, len0);
|
|
2688
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2689
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2690
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2691
|
+
if (r2) {
|
|
2692
|
+
throw takeObject(r1);
|
|
2693
|
+
}
|
|
2694
|
+
return Transaction.__wrap(r0);
|
|
2695
|
+
} finally {
|
|
2696
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
if (Symbol.dispose) Transaction.prototype[Symbol.dispose] = Transaction.prototype.free;
|
|
2701
|
+
|
|
2702
|
+
exports.Transaction = Transaction;
|
|
2703
|
+
|
|
1749
2704
|
exports.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
|
|
1750
2705
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1751
2706
|
return addHeapObject(ret);
|
|
@@ -1846,16 +2801,91 @@ exports.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
|
|
|
1846
2801
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1847
2802
|
};
|
|
1848
2803
|
|
|
2804
|
+
exports.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
|
|
2805
|
+
getObject(arg0)._wbg_cb_unref();
|
|
2806
|
+
};
|
|
2807
|
+
|
|
2808
|
+
exports.__wbg_abort_28ad55c5825b004d = function(arg0, arg1) {
|
|
2809
|
+
getObject(arg0).abort(getObject(arg1));
|
|
2810
|
+
};
|
|
2811
|
+
|
|
2812
|
+
exports.__wbg_abort_e7eb059f72f9ed0c = function(arg0) {
|
|
2813
|
+
getObject(arg0).abort();
|
|
2814
|
+
};
|
|
2815
|
+
|
|
2816
|
+
exports.__wbg_append_b577eb3a177bc0fa = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2817
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
2818
|
+
}, arguments) };
|
|
2819
|
+
|
|
2820
|
+
exports.__wbg_arrayBuffer_b375eccb84b4ddf3 = function() { return handleError(function (arg0) {
|
|
2821
|
+
const ret = getObject(arg0).arrayBuffer();
|
|
2822
|
+
return addHeapObject(ret);
|
|
2823
|
+
}, arguments) };
|
|
2824
|
+
|
|
2825
|
+
exports.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2826
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
2827
|
+
return addHeapObject(ret);
|
|
2828
|
+
}, arguments) };
|
|
2829
|
+
|
|
1849
2830
|
exports.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
|
|
1850
2831
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
1851
2832
|
return addHeapObject(ret);
|
|
1852
2833
|
}, arguments) };
|
|
1853
2834
|
|
|
2835
|
+
exports.__wbg_clearTimeout_7a42b49784aea641 = function(arg0) {
|
|
2836
|
+
const ret = clearTimeout(takeObject(arg0));
|
|
2837
|
+
return addHeapObject(ret);
|
|
2838
|
+
};
|
|
2839
|
+
|
|
2840
|
+
exports.__wbg_crypto_038798f665f985e2 = function(arg0) {
|
|
2841
|
+
const ret = getObject(arg0).crypto;
|
|
2842
|
+
return addHeapObject(ret);
|
|
2843
|
+
};
|
|
2844
|
+
|
|
2845
|
+
exports.__wbg_debug_f4b0c59db649db48 = function(arg0) {
|
|
2846
|
+
console.debug(getObject(arg0));
|
|
2847
|
+
};
|
|
2848
|
+
|
|
1854
2849
|
exports.__wbg_done_2042aa2670fb1db1 = function(arg0) {
|
|
1855
2850
|
const ret = getObject(arg0).done;
|
|
1856
2851
|
return ret;
|
|
1857
2852
|
};
|
|
1858
2853
|
|
|
2854
|
+
exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
2855
|
+
let deferred0_0;
|
|
2856
|
+
let deferred0_1;
|
|
2857
|
+
try {
|
|
2858
|
+
deferred0_0 = arg0;
|
|
2859
|
+
deferred0_1 = arg1;
|
|
2860
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
2861
|
+
} finally {
|
|
2862
|
+
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
2863
|
+
}
|
|
2864
|
+
};
|
|
2865
|
+
|
|
2866
|
+
exports.__wbg_error_a7f8fbb0523dae15 = function(arg0) {
|
|
2867
|
+
console.error(getObject(arg0));
|
|
2868
|
+
};
|
|
2869
|
+
|
|
2870
|
+
exports.__wbg_fetch_74a3e84ebd2c9a0e = function(arg0) {
|
|
2871
|
+
const ret = fetch(getObject(arg0));
|
|
2872
|
+
return addHeapObject(ret);
|
|
2873
|
+
};
|
|
2874
|
+
|
|
2875
|
+
exports.__wbg_fetch_f8ba0e29a9d6de0d = function(arg0, arg1) {
|
|
2876
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
2877
|
+
return addHeapObject(ret);
|
|
2878
|
+
};
|
|
2879
|
+
|
|
2880
|
+
exports.__wbg_getRandomValues_371e7ade8bd92088 = function(arg0, arg1) {
|
|
2881
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
2882
|
+
};
|
|
2883
|
+
|
|
2884
|
+
exports.__wbg_getRandomValues_7dfe5bd1b67c9ca1 = function(arg0) {
|
|
2885
|
+
const ret = getObject(arg0).getRandomValues;
|
|
2886
|
+
return addHeapObject(ret);
|
|
2887
|
+
};
|
|
2888
|
+
|
|
1859
2889
|
exports.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
|
|
1860
2890
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1861
2891
|
return addHeapObject(ret);
|
|
@@ -1876,6 +2906,20 @@ exports.__wbg_get_with_ref_key_6550b2c093d2eb18 = function(arg0, arg1) {
|
|
|
1876
2906
|
return addHeapObject(ret);
|
|
1877
2907
|
};
|
|
1878
2908
|
|
|
2909
|
+
exports.__wbg_has_787fafc980c3ccdb = function() { return handleError(function (arg0, arg1) {
|
|
2910
|
+
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
2911
|
+
return ret;
|
|
2912
|
+
}, arguments) };
|
|
2913
|
+
|
|
2914
|
+
exports.__wbg_headers_b87d7eaba61c3278 = function(arg0) {
|
|
2915
|
+
const ret = getObject(arg0).headers;
|
|
2916
|
+
return addHeapObject(ret);
|
|
2917
|
+
};
|
|
2918
|
+
|
|
2919
|
+
exports.__wbg_info_e674a11f4f50cc0c = function(arg0) {
|
|
2920
|
+
console.info(getObject(arg0));
|
|
2921
|
+
};
|
|
2922
|
+
|
|
1879
2923
|
exports.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
|
|
1880
2924
|
let result;
|
|
1881
2925
|
try {
|
|
@@ -1887,6 +2931,17 @@ exports.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
|
|
|
1887
2931
|
return ret;
|
|
1888
2932
|
};
|
|
1889
2933
|
|
|
2934
|
+
exports.__wbg_instanceof_Response_f4f3e87e07f3135c = function(arg0) {
|
|
2935
|
+
let result;
|
|
2936
|
+
try {
|
|
2937
|
+
result = getObject(arg0) instanceof Response;
|
|
2938
|
+
} catch (_) {
|
|
2939
|
+
result = false;
|
|
2940
|
+
}
|
|
2941
|
+
const ret = result;
|
|
2942
|
+
return ret;
|
|
2943
|
+
};
|
|
2944
|
+
|
|
1890
2945
|
exports.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
|
|
1891
2946
|
let result;
|
|
1892
2947
|
try {
|
|
@@ -1898,6 +2953,11 @@ exports.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
|
|
|
1898
2953
|
return ret;
|
|
1899
2954
|
};
|
|
1900
2955
|
|
|
2956
|
+
exports.__wbg_instruction_new = function(arg0) {
|
|
2957
|
+
const ret = Instruction.__wrap(arg0);
|
|
2958
|
+
return addHeapObject(ret);
|
|
2959
|
+
};
|
|
2960
|
+
|
|
1901
2961
|
exports.__wbg_isArray_643fafc484312e19 = function(arg0) {
|
|
1902
2962
|
const ret = Array.isArray(getObject(arg0));
|
|
1903
2963
|
return ret;
|
|
@@ -1928,16 +2988,89 @@ exports.__wbg_length_cdd215e10d9dd507 = function(arg0) {
|
|
|
1928
2988
|
return ret;
|
|
1929
2989
|
};
|
|
1930
2990
|
|
|
2991
|
+
exports.__wbg_log_8cec76766b8c0e33 = function(arg0) {
|
|
2992
|
+
console.log(getObject(arg0));
|
|
2993
|
+
};
|
|
2994
|
+
|
|
2995
|
+
exports.__wbg_msCrypto_ff35fce085fab2a3 = function(arg0) {
|
|
2996
|
+
const ret = getObject(arg0).msCrypto;
|
|
2997
|
+
return addHeapObject(ret);
|
|
2998
|
+
};
|
|
2999
|
+
|
|
1931
3000
|
exports.__wbg_new_1acc0b6eea89d040 = function() {
|
|
1932
3001
|
const ret = new Object();
|
|
1933
3002
|
return addHeapObject(ret);
|
|
1934
3003
|
};
|
|
1935
3004
|
|
|
3005
|
+
exports.__wbg_new_2531773dac38ebb3 = function() { return handleError(function () {
|
|
3006
|
+
const ret = new AbortController();
|
|
3007
|
+
return addHeapObject(ret);
|
|
3008
|
+
}, arguments) };
|
|
3009
|
+
|
|
3010
|
+
exports.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
|
|
3011
|
+
try {
|
|
3012
|
+
var state0 = {a: arg0, b: arg1};
|
|
3013
|
+
var cb0 = (arg0, arg1) => {
|
|
3014
|
+
const a = state0.a;
|
|
3015
|
+
state0.a = 0;
|
|
3016
|
+
try {
|
|
3017
|
+
return __wasm_bindgen_func_elem_480(a, state0.b, arg0, arg1);
|
|
3018
|
+
} finally {
|
|
3019
|
+
state0.a = a;
|
|
3020
|
+
}
|
|
3021
|
+
};
|
|
3022
|
+
const ret = new Promise(cb0);
|
|
3023
|
+
return addHeapObject(ret);
|
|
3024
|
+
} finally {
|
|
3025
|
+
state0.a = state0.b = 0;
|
|
3026
|
+
}
|
|
3027
|
+
};
|
|
3028
|
+
|
|
1936
3029
|
exports.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
|
|
1937
3030
|
const ret = new Uint8Array(getObject(arg0));
|
|
1938
3031
|
return addHeapObject(ret);
|
|
1939
3032
|
};
|
|
1940
3033
|
|
|
3034
|
+
exports.__wbg_new_8a6f238a6ece86ea = function() {
|
|
3035
|
+
const ret = new Error();
|
|
3036
|
+
return addHeapObject(ret);
|
|
3037
|
+
};
|
|
3038
|
+
|
|
3039
|
+
exports.__wbg_new_9edf9838a2def39c = function() { return handleError(function () {
|
|
3040
|
+
const ret = new Headers();
|
|
3041
|
+
return addHeapObject(ret);
|
|
3042
|
+
}, arguments) };
|
|
3043
|
+
|
|
3044
|
+
exports.__wbg_new_e17d9f43105b08be = function() {
|
|
3045
|
+
const ret = new Array();
|
|
3046
|
+
return addHeapObject(ret);
|
|
3047
|
+
};
|
|
3048
|
+
|
|
3049
|
+
exports.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
|
|
3050
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
3051
|
+
return addHeapObject(ret);
|
|
3052
|
+
};
|
|
3053
|
+
|
|
3054
|
+
exports.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
|
|
3055
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
3056
|
+
return addHeapObject(ret);
|
|
3057
|
+
};
|
|
3058
|
+
|
|
3059
|
+
exports.__wbg_new_with_length_01aa0dc35aa13543 = function(arg0) {
|
|
3060
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
3061
|
+
return addHeapObject(ret);
|
|
3062
|
+
};
|
|
3063
|
+
|
|
3064
|
+
exports.__wbg_new_with_length_31d2669cb75c5215 = function(arg0) {
|
|
3065
|
+
const ret = new Array(arg0 >>> 0);
|
|
3066
|
+
return addHeapObject(ret);
|
|
3067
|
+
};
|
|
3068
|
+
|
|
3069
|
+
exports.__wbg_new_with_str_and_init_0ae7728b6ec367b1 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3070
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
3071
|
+
return addHeapObject(ret);
|
|
3072
|
+
}, arguments) };
|
|
3073
|
+
|
|
1941
3074
|
exports.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
|
|
1942
3075
|
const ret = getObject(arg0).next();
|
|
1943
3076
|
return addHeapObject(ret);
|
|
@@ -1952,15 +3085,185 @@ exports.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
|
|
|
1952
3085
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1953
3086
|
};
|
|
1954
3087
|
|
|
3088
|
+
exports.__wbg_pubkey_new = function(arg0) {
|
|
3089
|
+
const ret = Pubkey.__wrap(arg0);
|
|
3090
|
+
return addHeapObject(ret);
|
|
3091
|
+
};
|
|
3092
|
+
|
|
3093
|
+
exports.__wbg_push_df81a39d04db858c = function(arg0, arg1) {
|
|
3094
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
3095
|
+
return ret;
|
|
3096
|
+
};
|
|
3097
|
+
|
|
3098
|
+
exports.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
|
|
3099
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
3100
|
+
return addHeapObject(ret);
|
|
3101
|
+
};
|
|
3102
|
+
|
|
3103
|
+
exports.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
|
|
3104
|
+
queueMicrotask(getObject(arg0));
|
|
3105
|
+
};
|
|
3106
|
+
|
|
3107
|
+
exports.__wbg_randomFillSync_994ac6d9ade7a695 = function(arg0, arg1, arg2) {
|
|
3108
|
+
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
3109
|
+
};
|
|
3110
|
+
|
|
3111
|
+
exports.__wbg_require_0d6aeaec3c042c88 = function(arg0, arg1, arg2) {
|
|
3112
|
+
const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
|
|
3113
|
+
return addHeapObject(ret);
|
|
3114
|
+
};
|
|
3115
|
+
|
|
3116
|
+
exports.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
|
|
3117
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
3118
|
+
return addHeapObject(ret);
|
|
3119
|
+
};
|
|
3120
|
+
|
|
3121
|
+
exports.__wbg_self_25aabeb5a7b41685 = function() { return handleError(function () {
|
|
3122
|
+
const ret = self.self;
|
|
3123
|
+
return addHeapObject(ret);
|
|
3124
|
+
}, arguments) };
|
|
3125
|
+
|
|
3126
|
+
exports.__wbg_setTimeout_7bb3429662ab1e70 = function(arg0, arg1) {
|
|
3127
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
3128
|
+
return addHeapObject(ret);
|
|
3129
|
+
};
|
|
3130
|
+
|
|
1955
3131
|
exports.__wbg_set_3807d5f0bfc24aa7 = function(arg0, arg1, arg2) {
|
|
1956
3132
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1957
3133
|
};
|
|
1958
3134
|
|
|
3135
|
+
exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
3136
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
3137
|
+
};
|
|
3138
|
+
|
|
3139
|
+
exports.__wbg_set_body_3c365989753d61f4 = function(arg0, arg1) {
|
|
3140
|
+
getObject(arg0).body = getObject(arg1);
|
|
3141
|
+
};
|
|
3142
|
+
|
|
3143
|
+
exports.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
|
|
3144
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
3145
|
+
};
|
|
3146
|
+
|
|
3147
|
+
exports.__wbg_set_cache_2f9deb19b92b81e3 = function(arg0, arg1) {
|
|
3148
|
+
getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
|
|
3149
|
+
};
|
|
3150
|
+
|
|
3151
|
+
exports.__wbg_set_credentials_f621cd2d85c0c228 = function(arg0, arg1) {
|
|
3152
|
+
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
3153
|
+
};
|
|
3154
|
+
|
|
3155
|
+
exports.__wbg_set_headers_6926da238cd32ee4 = function(arg0, arg1) {
|
|
3156
|
+
getObject(arg0).headers = getObject(arg1);
|
|
3157
|
+
};
|
|
3158
|
+
|
|
3159
|
+
exports.__wbg_set_method_c02d8cbbe204ac2d = function(arg0, arg1, arg2) {
|
|
3160
|
+
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
3161
|
+
};
|
|
3162
|
+
|
|
3163
|
+
exports.__wbg_set_mode_52ef73cfa79639cb = function(arg0, arg1) {
|
|
3164
|
+
getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
|
|
3165
|
+
};
|
|
3166
|
+
|
|
3167
|
+
exports.__wbg_set_signal_dda2cf7ccb6bee0f = function(arg0, arg1) {
|
|
3168
|
+
getObject(arg0).signal = getObject(arg1);
|
|
3169
|
+
};
|
|
3170
|
+
|
|
3171
|
+
exports.__wbg_signal_4db5aa055bf9eb9a = function(arg0) {
|
|
3172
|
+
const ret = getObject(arg0).signal;
|
|
3173
|
+
return addHeapObject(ret);
|
|
3174
|
+
};
|
|
3175
|
+
|
|
3176
|
+
exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
3177
|
+
const ret = getObject(arg1).stack;
|
|
3178
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3179
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3180
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3181
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3182
|
+
};
|
|
3183
|
+
|
|
3184
|
+
exports.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
|
|
3185
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
3186
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
3187
|
+
};
|
|
3188
|
+
|
|
3189
|
+
exports.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
|
|
3190
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
3191
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
3192
|
+
};
|
|
3193
|
+
|
|
3194
|
+
exports.__wbg_static_accessor_MODULE_ef3aa2eb251158a5 = function() {
|
|
3195
|
+
const ret = module;
|
|
3196
|
+
return addHeapObject(ret);
|
|
3197
|
+
};
|
|
3198
|
+
|
|
3199
|
+
exports.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
|
|
3200
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
3201
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
3202
|
+
};
|
|
3203
|
+
|
|
3204
|
+
exports.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
|
|
3205
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
3206
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
3207
|
+
};
|
|
3208
|
+
|
|
3209
|
+
exports.__wbg_status_de7eed5a7a5bfd5d = function(arg0) {
|
|
3210
|
+
const ret = getObject(arg0).status;
|
|
3211
|
+
return ret;
|
|
3212
|
+
};
|
|
3213
|
+
|
|
3214
|
+
exports.__wbg_stringify_b5fb28f6465d9c3e = function() { return handleError(function (arg0) {
|
|
3215
|
+
const ret = JSON.stringify(getObject(arg0));
|
|
3216
|
+
return addHeapObject(ret);
|
|
3217
|
+
}, arguments) };
|
|
3218
|
+
|
|
3219
|
+
exports.__wbg_subarray_480600f3d6a9f26c = function(arg0, arg1, arg2) {
|
|
3220
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
3221
|
+
return addHeapObject(ret);
|
|
3222
|
+
};
|
|
3223
|
+
|
|
3224
|
+
exports.__wbg_text_dc33c15c17bdfb52 = function() { return handleError(function (arg0) {
|
|
3225
|
+
const ret = getObject(arg0).text();
|
|
3226
|
+
return addHeapObject(ret);
|
|
3227
|
+
}, arguments) };
|
|
3228
|
+
|
|
3229
|
+
exports.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
|
|
3230
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
3231
|
+
return addHeapObject(ret);
|
|
3232
|
+
};
|
|
3233
|
+
|
|
3234
|
+
exports.__wbg_then_70d05cf780a18d77 = function(arg0, arg1, arg2) {
|
|
3235
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
3236
|
+
return addHeapObject(ret);
|
|
3237
|
+
};
|
|
3238
|
+
|
|
3239
|
+
exports.__wbg_url_b36d2a5008eb056f = function(arg0, arg1) {
|
|
3240
|
+
const ret = getObject(arg1).url;
|
|
3241
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3242
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3243
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3244
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3245
|
+
};
|
|
3246
|
+
|
|
1959
3247
|
exports.__wbg_value_692627309814bb8c = function(arg0) {
|
|
1960
3248
|
const ret = getObject(arg0).value;
|
|
1961
3249
|
return addHeapObject(ret);
|
|
1962
3250
|
};
|
|
1963
3251
|
|
|
3252
|
+
exports.__wbg_values_58a781304289144d = function(arg0) {
|
|
3253
|
+
const ret = getObject(arg0).values();
|
|
3254
|
+
return addHeapObject(ret);
|
|
3255
|
+
};
|
|
3256
|
+
|
|
3257
|
+
exports.__wbg_warn_1d74dddbe2fd1dbb = function(arg0) {
|
|
3258
|
+
console.warn(getObject(arg0));
|
|
3259
|
+
};
|
|
3260
|
+
|
|
3261
|
+
exports.__wbindgen_cast_2116c94cd3735b0a = function(arg0, arg1) {
|
|
3262
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 338, function: Function { arguments: [], shim_idx: 339, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3263
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3116, __wasm_bindgen_func_elem_3120);
|
|
3264
|
+
return addHeapObject(ret);
|
|
3265
|
+
};
|
|
3266
|
+
|
|
1964
3267
|
exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
1965
3268
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1966
3269
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -1979,6 +3282,12 @@ exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
|
1979
3282
|
return addHeapObject(ret);
|
|
1980
3283
|
};
|
|
1981
3284
|
|
|
3285
|
+
exports.__wbindgen_cast_a8271c97b58d323e = function(arg0, arg1) {
|
|
3286
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 360, function: Function { arguments: [Externref], shim_idx: 355, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3287
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3323, __wasm_bindgen_func_elem_3304);
|
|
3288
|
+
return addHeapObject(ret);
|
|
3289
|
+
};
|
|
3290
|
+
|
|
1982
3291
|
exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
1983
3292
|
// Cast intrinsic for `F64 -> Externref`.
|
|
1984
3293
|
const ret = arg0;
|