Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / wasm / andromeda / index_bg.js
blob73395127567e32ba091b59666d297c94a4014b68
1 let wasm;
2 export function __wbg_set_wasm(val) {
3 wasm = val;
7 const heap = new Array(128).fill(undefined);
9 heap.push(undefined, null, true, false);
11 function getObject(idx) { return heap[idx]; }
13 let heap_next = heap.length;
15 function addHeapObject(obj) {
16 if (heap_next === heap.length) heap.push(heap.length + 1);
17 const idx = heap_next;
18 heap_next = heap[idx];
20 heap[idx] = obj;
21 return idx;
24 function dropObject(idx) {
25 if (idx < 132) return;
26 heap[idx] = heap_next;
27 heap_next = idx;
30 function takeObject(idx) {
31 const ret = getObject(idx);
32 dropObject(idx);
33 return ret;
36 const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
38 let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
40 cachedTextDecoder.decode();
42 let cachedUint8ArrayMemory0 = null;
44 function getUint8ArrayMemory0() {
45 if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
46 cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
48 return cachedUint8ArrayMemory0;
51 function getStringFromWasm0(ptr, len) {
52 ptr = ptr >>> 0;
53 return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
56 let WASM_VECTOR_LEN = 0;
58 const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
60 let cachedTextEncoder = new lTextEncoder('utf-8');
62 const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
63 ? function (arg, view) {
64 return cachedTextEncoder.encodeInto(arg, view);
66 : function (arg, view) {
67 const buf = cachedTextEncoder.encode(arg);
68 view.set(buf);
69 return {
70 read: arg.length,
71 written: buf.length
73 });
75 function passStringToWasm0(arg, malloc, realloc) {
77 if (realloc === undefined) {
78 const buf = cachedTextEncoder.encode(arg);
79 const ptr = malloc(buf.length, 1) >>> 0;
80 getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
81 WASM_VECTOR_LEN = buf.length;
82 return ptr;
85 let len = arg.length;
86 let ptr = malloc(len, 1) >>> 0;
88 const mem = getUint8ArrayMemory0();
90 let offset = 0;
92 for (; offset < len; offset++) {
93 const code = arg.charCodeAt(offset);
94 if (code > 0x7F) break;
95 mem[ptr + offset] = code;
98 if (offset !== len) {
99 if (offset !== 0) {
100 arg = arg.slice(offset);
102 ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
103 const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
104 const ret = encodeString(arg, view);
106 offset += ret.written;
107 ptr = realloc(ptr, len, offset, 1) >>> 0;
110 WASM_VECTOR_LEN = offset;
111 return ptr;
114 let cachedDataViewMemory0 = null;
116 function getDataViewMemory0() {
117 if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
118 cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
120 return cachedDataViewMemory0;
123 function isLikeNone(x) {
124 return x === undefined || x === null;
127 function debugString(val) {
128 // primitive types
129 const type = typeof val;
130 if (type == 'number' || type == 'boolean' || val == null) {
131 return `${val}`;
133 if (type == 'string') {
134 return `"${val}"`;
136 if (type == 'symbol') {
137 const description = val.description;
138 if (description == null) {
139 return 'Symbol';
140 } else {
141 return `Symbol(${description})`;
144 if (type == 'function') {
145 const name = val.name;
146 if (typeof name == 'string' && name.length > 0) {
147 return `Function(${name})`;
148 } else {
149 return 'Function';
152 // objects
153 if (Array.isArray(val)) {
154 const length = val.length;
155 let debug = '[';
156 if (length > 0) {
157 debug += debugString(val[0]);
159 for(let i = 1; i < length; i++) {
160 debug += ', ' + debugString(val[i]);
162 debug += ']';
163 return debug;
165 // Test for built-in
166 const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
167 let className;
168 if (builtInMatches.length > 1) {
169 className = builtInMatches[1];
170 } else {
171 // Failed to match the standard '[object ClassName]'
172 return toString.call(val);
174 if (className == 'Object') {
175 // we're a user defined class or Object
176 // JSON.stringify avoids problems with cycles, and is generally much
177 // easier than looping through ownProperties of `val`.
178 try {
179 return 'Object(' + JSON.stringify(val) + ')';
180 } catch (_) {
181 return 'Object';
184 // errors
185 if (val instanceof Error) {
186 return `${val.name}: ${val.message}\n${val.stack}`;
188 // TODO we could test for more things here, like `Set`s and `Map`s.
189 return className;
192 const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
193 ? { register: () => {}, unregister: () => {} }
194 : new FinalizationRegistry(state => {
195 wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b)
198 function makeMutClosure(arg0, arg1, dtor, f) {
199 const state = { a: arg0, b: arg1, cnt: 1, dtor };
200 const real = (...args) => {
201 // First up with a closure we increment the internal reference
202 // count. This ensures that the Rust closure environment won't
203 // be deallocated while we're invoking it.
204 state.cnt++;
205 const a = state.a;
206 state.a = 0;
207 try {
208 return f(a, state.b, ...args);
209 } finally {
210 if (--state.cnt === 0) {
211 wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
212 CLOSURE_DTORS.unregister(state);
213 } else {
214 state.a = a;
218 real.original = state;
219 CLOSURE_DTORS.register(real, state, state);
220 return real;
222 function __wbg_adapter_38(arg0, arg1, arg2) {
223 wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h68f19b82039db9c3(arg0, arg1, addHeapObject(arg2));
226 function __wbg_adapter_41(arg0, arg1) {
227 wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb627f62749543d8e(arg0, arg1);
230 function getArrayJsValueFromWasm0(ptr, len) {
231 ptr = ptr >>> 0;
232 const mem = getDataViewMemory0();
233 const result = [];
234 for (let i = ptr; i < ptr + 4 * len; i += 4) {
235 result.push(takeObject(mem.getUint32(i, true)));
237 return result;
240 function passArrayJsValueToWasm0(array, malloc) {
241 const ptr = malloc(array.length * 4, 4) >>> 0;
242 const mem = getDataViewMemory0();
243 for (let i = 0; i < array.length; i++) {
244 mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
246 WASM_VECTOR_LEN = array.length;
247 return ptr;
250 function _assertClass(instance, klass) {
251 if (!(instance instanceof klass)) {
252 throw new Error(`expected instance of ${klass.name}`);
254 return instance.ptr;
257 function getArrayU8FromWasm0(ptr, len) {
258 ptr = ptr >>> 0;
259 return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
262 function passArray8ToWasm0(arg, malloc) {
263 const ptr = malloc(arg.length * 1, 1) >>> 0;
264 getUint8ArrayMemory0().set(arg, ptr / 1);
265 WASM_VECTOR_LEN = arg.length;
266 return ptr;
269 * @param {WasmPsbt} psbt
270 * @param {WasmAccount} account
271 * @returns {Promise<WasmTransactionDetailsData>}
273 export function createTransactionFromPsbt(psbt, account) {
274 _assertClass(psbt, WasmPsbt);
275 _assertClass(account, WasmAccount);
276 const ret = wasm.createTransactionFromPsbt(psbt.__wbg_ptr, account.__wbg_ptr);
277 return takeObject(ret);
282 export function setPanicHook() {
283 wasm.setPanicHook();
287 * @param {string} word_start
288 * @returns {(string)[]}
290 export function getWordsAutocomplete(word_start) {
291 try {
292 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
293 const ptr0 = passStringToWasm0(word_start, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
294 const len0 = WASM_VECTOR_LEN;
295 wasm.getWordsAutocomplete(retptr, ptr0, len0);
296 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
297 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
298 var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
299 wasm.__wbindgen_free(r0, r1 * 4, 4);
300 return v2;
301 } finally {
302 wasm.__wbindgen_add_to_stack_pointer(16);
307 * @returns {number}
309 export function getDefaultStopGap() {
310 const ret = wasm.getDefaultStopGap();
311 return ret >>> 0;
314 function handleError(f, args) {
315 try {
316 return f.apply(this, args);
317 } catch (e) {
318 wasm.__wbindgen_exn_store(addHeapObject(e));
321 function __wbg_adapter_615(arg0, arg1, arg2, arg3) {
322 wasm.wasm_bindgen__convert__closures__invoke2_mut__h6b1d7e5a4d852872(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
327 export const WasmPaymentLinkKind = Object.freeze({ BitcoinAddress:0,"0":"BitcoinAddress",BitcoinURI:1,"1":"BitcoinURI",LightningURI:2,"2":"LightningURI",UnifiedURI:3,"3":"UnifiedURI", });
330 export const WasmNetwork = Object.freeze({
332 * Mainnet Bitcoin.
334 Bitcoin:0,"0":"Bitcoin",
336 * Bitcoin's testnet network.
338 Testnet:1,"1":"Testnet",
340 * Bitcoin's signet network.
342 Signet:2,"2":"Signet",
344 * Bitcoin's regtest network.
346 Regtest:3,"3":"Regtest", });
349 export const WasmScriptType = Object.freeze({ Legacy:1,"1":"Legacy",NestedSegwit:2,"2":"NestedSegwit",NativeSegwit:3,"3":"NativeSegwit",Taproot:4,"4":"Taproot", });
352 export const WasmWalletTransactionFlag = Object.freeze({ Suspicious:0,"0":"Suspicious",Private:1,"1":"Private", });
355 export const WasmLanguage = Object.freeze({ English:0,"0":"English",SimplifiedChinese:1,"1":"SimplifiedChinese",TraditionalChinese:2,"2":"TraditionalChinese",Czech:3,"3":"Czech",French:4,"4":"French",Italian:5,"5":"Italian",Japanese:6,"6":"Japanese",Korean:7,"7":"Korean",Spanish:8,"8":"Spanish", });
358 export const WasmChangeSpendPolicy = Object.freeze({ ChangeAllowed:0,"0":"ChangeAllowed",OnlyChange:1,"1":"OnlyChange",ChangeForbidden:2,"2":"ChangeForbidden", });
361 export const WasmWordCount = Object.freeze({ Words12:0,"0":"Words12",Words15:1,"1":"Words15",Words18:2,"2":"Words18",Words21:3,"3":"Words21",Words24:4,"4":"Words24", });
364 export const WasmCoinSelection = Object.freeze({ BranchAndBound:0,"0":"BranchAndBound",LargestFirst:1,"1":"LargestFirst",OldestFirst:2,"2":"OldestFirst",Manual:3,"3":"Manual", });
367 export const WasmSortOrder = Object.freeze({ Asc:0,"0":"Asc",Desc:1,"1":"Desc", });
370 export const WasmKeychainKind = Object.freeze({
372 * External keychain, used for deriving recipient addresses.
374 External:0,"0":"External",
376 * Internal keychain, used for deriving change addresses.
378 Internal:1,"1":"Internal", });
380 const WasmAccountFinalization = (typeof FinalizationRegistry === 'undefined')
381 ? { register: () => {}, unregister: () => {} }
382 : new FinalizationRegistry(ptr => wasm.__wbg_wasmaccount_free(ptr >>> 0, 1));
385 export class WasmAccount {
387 static __wrap(ptr) {
388 ptr = ptr >>> 0;
389 const obj = Object.create(WasmAccount.prototype);
390 obj.__wbg_ptr = ptr;
391 WasmAccountFinalization.register(obj, obj.__wbg_ptr, obj);
392 return obj;
395 __destroy_into_raw() {
396 const ptr = this.__wbg_ptr;
397 this.__wbg_ptr = 0;
398 WasmAccountFinalization.unregister(this);
399 return ptr;
402 free() {
403 const ptr = this.__destroy_into_raw();
404 wasm.__wbg_wasmaccount_free(ptr, 0);
407 * @param {WasmWallet} wallet
408 * @param {WasmScriptType} script_type
409 * @param {WasmDerivationPath} derivation_path
411 constructor(wallet, script_type, derivation_path) {
412 try {
413 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
414 _assertClass(wallet, WasmWallet);
415 _assertClass(derivation_path, WasmDerivationPath);
416 var ptr0 = derivation_path.__destroy_into_raw();
417 wasm.wasmaccount_new(retptr, wallet.__wbg_ptr, script_type, ptr0);
418 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
419 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
420 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
421 if (r2) {
422 throw takeObject(r1);
424 this.__wbg_ptr = r0 >>> 0;
425 WasmAccountFinalization.register(this, this.__wbg_ptr, this);
426 return this;
427 } finally {
428 wasm.__wbindgen_add_to_stack_pointer(16);
432 * @param {number} from
433 * @param {number | undefined} [to]
434 * @returns {Promise<void>}
436 markReceiveAddressesUsedTo(from, to) {
437 const ret = wasm.wasmaccount_markReceiveAddressesUsedTo(this.__wbg_ptr, from, !isLikeNone(to), isLikeNone(to) ? 0 : to);
438 return takeObject(ret);
441 * @returns {Promise<WasmAddressInfo>}
443 getNextReceiveAddress() {
444 const ret = wasm.wasmaccount_getNextReceiveAddress(this.__wbg_ptr);
445 return takeObject(ret);
448 * @param {number} index
449 * @returns {Promise<WasmAddressInfo>}
451 peekReceiveAddress(index) {
452 const ret = wasm.wasmaccount_peekReceiveAddress(this.__wbg_ptr, index);
453 return takeObject(ret);
456 * @param {WasmAddress} address
457 * @returns {Promise<boolean>}
459 owns(address) {
460 _assertClass(address, WasmAddress);
461 const ret = wasm.wasmaccount_owns(this.__wbg_ptr, address.__wbg_ptr);
462 return takeObject(ret);
465 * @returns {Promise<WasmBalanceWrapper>}
467 getBalance() {
468 const ret = wasm.wasmaccount_getBalance(this.__wbg_ptr);
469 return takeObject(ret);
472 * @returns {string}
474 getDerivationPath() {
475 let deferred2_0;
476 let deferred2_1;
477 try {
478 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
479 wasm.wasmaccount_getDerivationPath(retptr, this.__wbg_ptr);
480 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
481 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
482 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
483 var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
484 var ptr1 = r0;
485 var len1 = r1;
486 if (r3) {
487 ptr1 = 0; len1 = 0;
488 throw takeObject(r2);
490 deferred2_0 = ptr1;
491 deferred2_1 = len1;
492 return getStringFromWasm0(ptr1, len1);
493 } finally {
494 wasm.__wbindgen_add_to_stack_pointer(16);
495 wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
499 * @returns {Promise<WasmUtxoArray>}
501 getUtxos() {
502 const ret = wasm.wasmaccount_getUtxos(this.__wbg_ptr);
503 return takeObject(ret);
506 * @param {WasmPagination} pagination
507 * @param {WasmBlockchainClient} client
508 * @param {WasmKeychainKind} keychain
509 * @param {boolean | undefined} [force_sync]
510 * @returns {Promise<WasmAddressDetailsArray>}
512 getAddresses(pagination, client, keychain, force_sync) {
513 _assertClass(client, WasmBlockchainClient);
514 const ret = wasm.wasmaccount_getAddresses(this.__wbg_ptr, addHeapObject(pagination), client.__wbg_ptr, keychain, isLikeNone(force_sync) ? 0xFFFFFF : force_sync ? 1 : 0);
515 return takeObject(ret);
518 * @param {WasmPagination} pagination
519 * @param {WasmSortOrder | undefined} [sort]
520 * @returns {Promise<WasmTransactionDetailsArray>}
522 getTransactions(pagination, sort) {
523 const ret = wasm.wasmaccount_getTransactions(this.__wbg_ptr, addHeapObject(pagination), isLikeNone(sort) ? 2 : sort);
524 return takeObject(ret);
527 * @param {string} txid
528 * @returns {Promise<WasmTransactionDetailsData>}
530 getTransaction(txid) {
531 const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
532 const len0 = WASM_VECTOR_LEN;
533 const ret = wasm.wasmaccount_getTransaction(this.__wbg_ptr, ptr0, len0);
534 return takeObject(ret);
537 * @returns {Promise<boolean>}
539 hasSyncData() {
540 const ret = wasm.wasmaccount_hasSyncData(this.__wbg_ptr);
541 return takeObject(ret);
544 * @param {WasmPsbt} psbt
545 * @returns {Promise<void>}
547 insertUnconfirmedTransaction(psbt) {
548 _assertClass(psbt, WasmPsbt);
549 const ret = wasm.wasmaccount_insertUnconfirmedTransaction(this.__wbg_ptr, psbt.__wbg_ptr);
550 return takeObject(ret);
553 * @param {WasmNetwork} network
554 * @param {string} txid
555 * @param {bigint} fees
556 * @returns {Promise<WasmPsbt>}
558 bumpTransactionsFees(network, txid, fees) {
559 const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
560 const len0 = WASM_VECTOR_LEN;
561 const ret = wasm.wasmaccount_bumpTransactionsFees(this.__wbg_ptr, network, ptr0, len0, fees);
562 return takeObject(ret);
565 * @returns {Promise<void>}
567 clearStore() {
568 const ret = wasm.wasmaccount_clearStore(this.__wbg_ptr);
569 return takeObject(ret);
573 const WasmAddressFinalization = (typeof FinalizationRegistry === 'undefined')
574 ? { register: () => {}, unregister: () => {} }
575 : new FinalizationRegistry(ptr => wasm.__wbg_wasmaddress_free(ptr >>> 0, 1));
578 export class WasmAddress {
580 static __wrap(ptr) {
581 ptr = ptr >>> 0;
582 const obj = Object.create(WasmAddress.prototype);
583 obj.__wbg_ptr = ptr;
584 WasmAddressFinalization.register(obj, obj.__wbg_ptr, obj);
585 return obj;
588 __destroy_into_raw() {
589 const ptr = this.__wbg_ptr;
590 this.__wbg_ptr = 0;
591 WasmAddressFinalization.unregister(this);
592 return ptr;
595 free() {
596 const ptr = this.__destroy_into_raw();
597 wasm.__wbg_wasmaddress_free(ptr, 0);
600 * @param {string} str
601 * @param {WasmNetwork} network
603 constructor(str, network) {
604 try {
605 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
606 const ptr0 = passStringToWasm0(str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
607 const len0 = WASM_VECTOR_LEN;
608 wasm.wasmaddress_new(retptr, ptr0, len0, network);
609 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
610 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
611 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
612 if (r2) {
613 throw takeObject(r1);
615 this.__wbg_ptr = r0 >>> 0;
616 WasmAddressFinalization.register(this, this.__wbg_ptr, this);
617 return this;
618 } finally {
619 wasm.__wbindgen_add_to_stack_pointer(16);
623 * @param {WasmScript} value
624 * @param {WasmNetwork} network
625 * @returns {WasmAddress}
627 static fromScript(value, network) {
628 try {
629 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
630 _assertClass(value, WasmScript);
631 var ptr0 = value.__destroy_into_raw();
632 wasm.wasmaddress_fromScript(retptr, ptr0, network);
633 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
634 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
635 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
636 if (r2) {
637 throw takeObject(r1);
639 return WasmAddress.__wrap(r0);
640 } finally {
641 wasm.__wbindgen_add_to_stack_pointer(16);
645 * @returns {string}
647 toString() {
648 let deferred1_0;
649 let deferred1_1;
650 try {
651 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
652 wasm.wasmaddress_toString(retptr, this.__wbg_ptr);
653 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
654 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
655 deferred1_0 = r0;
656 deferred1_1 = r1;
657 return getStringFromWasm0(r0, r1);
658 } finally {
659 wasm.__wbindgen_add_to_stack_pointer(16);
660 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
664 * @returns {WasmScript}
666 intoScript() {
667 const ret = wasm.wasmaddress_intoScript(this.__wbg_ptr);
668 return WasmScript.__wrap(ret);
672 const WasmAddressDetailsArrayFinalization = (typeof FinalizationRegistry === 'undefined')
673 ? { register: () => {}, unregister: () => {} }
674 : new FinalizationRegistry(ptr => wasm.__wbg_wasmaddressdetailsarray_free(ptr >>> 0, 1));
677 export class WasmAddressDetailsArray {
679 static __wrap(ptr) {
680 ptr = ptr >>> 0;
681 const obj = Object.create(WasmAddressDetailsArray.prototype);
682 obj.__wbg_ptr = ptr;
683 WasmAddressDetailsArrayFinalization.register(obj, obj.__wbg_ptr, obj);
684 return obj;
687 __destroy_into_raw() {
688 const ptr = this.__wbg_ptr;
689 this.__wbg_ptr = 0;
690 WasmAddressDetailsArrayFinalization.unregister(this);
691 return ptr;
694 free() {
695 const ptr = this.__destroy_into_raw();
696 wasm.__wbg_wasmaddressdetailsarray_free(ptr, 0);
699 * @returns {(WasmAddressDetailsData)[]}
701 get 0() {
702 try {
703 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
704 wasm.__wbg_get_wasmaddressdetailsarray_0(retptr, this.__wbg_ptr);
705 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
706 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
707 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
708 wasm.__wbindgen_free(r0, r1 * 4, 4);
709 return v1;
710 } finally {
711 wasm.__wbindgen_add_to_stack_pointer(16);
715 * @param {(WasmAddressDetailsData)[]} arg0
717 set 0(arg0) {
718 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
719 const len0 = WASM_VECTOR_LEN;
720 wasm.__wbg_set_wasmaddressdetailsarray_0(this.__wbg_ptr, ptr0, len0);
724 const WasmAddressDetailsDataFinalization = (typeof FinalizationRegistry === 'undefined')
725 ? { register: () => {}, unregister: () => {} }
726 : new FinalizationRegistry(ptr => wasm.__wbg_wasmaddressdetailsdata_free(ptr >>> 0, 1));
729 export class WasmAddressDetailsData {
731 static __wrap(ptr) {
732 ptr = ptr >>> 0;
733 const obj = Object.create(WasmAddressDetailsData.prototype);
734 obj.__wbg_ptr = ptr;
735 WasmAddressDetailsDataFinalization.register(obj, obj.__wbg_ptr, obj);
736 return obj;
739 static __unwrap(jsValue) {
740 if (!(jsValue instanceof WasmAddressDetailsData)) {
741 return 0;
743 return jsValue.__destroy_into_raw();
746 __destroy_into_raw() {
747 const ptr = this.__wbg_ptr;
748 this.__wbg_ptr = 0;
749 WasmAddressDetailsDataFinalization.unregister(this);
750 return ptr;
753 free() {
754 const ptr = this.__destroy_into_raw();
755 wasm.__wbg_wasmaddressdetailsdata_free(ptr, 0);
758 * @returns {WasmAddressDetails}
760 get Data() {
761 const ret = wasm.__wbg_get_wasmaddressdetailsdata_Data(this.__wbg_ptr);
762 return takeObject(ret);
765 * @param {WasmAddressDetails} arg0
767 set Data(arg0) {
768 wasm.__wbg_set_wasmaddressdetailsdata_Data(this.__wbg_ptr, addHeapObject(arg0));
772 const WasmAddressInfoFinalization = (typeof FinalizationRegistry === 'undefined')
773 ? { register: () => {}, unregister: () => {} }
774 : new FinalizationRegistry(ptr => wasm.__wbg_wasmaddressinfo_free(ptr >>> 0, 1));
777 export class WasmAddressInfo {
779 static __wrap(ptr) {
780 ptr = ptr >>> 0;
781 const obj = Object.create(WasmAddressInfo.prototype);
782 obj.__wbg_ptr = ptr;
783 WasmAddressInfoFinalization.register(obj, obj.__wbg_ptr, obj);
784 return obj;
787 __destroy_into_raw() {
788 const ptr = this.__wbg_ptr;
789 this.__wbg_ptr = 0;
790 WasmAddressInfoFinalization.unregister(this);
791 return ptr;
794 free() {
795 const ptr = this.__destroy_into_raw();
796 wasm.__wbg_wasmaddressinfo_free(ptr, 0);
799 * Child index of this address
800 * @returns {number}
802 get index() {
803 const ret = wasm.__wbg_get_wasmaddressinfo_index(this.__wbg_ptr);
804 return ret >>> 0;
807 * Child index of this address
808 * @param {number} arg0
810 set index(arg0) {
811 wasm.__wbg_set_wasmaddressinfo_index(this.__wbg_ptr, arg0);
814 * Address
815 * @returns {string}
817 get address() {
818 let deferred1_0;
819 let deferred1_1;
820 try {
821 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
822 wasm.__wbg_get_wasmaddressinfo_address(retptr, this.__wbg_ptr);
823 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
824 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
825 deferred1_0 = r0;
826 deferred1_1 = r1;
827 return getStringFromWasm0(r0, r1);
828 } finally {
829 wasm.__wbindgen_add_to_stack_pointer(16);
830 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
834 * Address
835 * @param {string} arg0
837 set address(arg0) {
838 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
839 const len0 = WASM_VECTOR_LEN;
840 wasm.__wbg_set_wasmaddressinfo_address(this.__wbg_ptr, ptr0, len0);
843 * Type of keychain
844 * @returns {WasmKeychainKind}
846 get keychain() {
847 const ret = wasm.__wbg_get_wasmaddressinfo_keychain(this.__wbg_ptr);
848 return ret;
851 * Type of keychain
852 * @param {WasmKeychainKind} arg0
854 set keychain(arg0) {
855 wasm.__wbg_set_wasmaddressinfo_keychain(this.__wbg_ptr, arg0);
859 const WasmApiBitcoinAddressCreationPayloadDataFinalization = (typeof FinalizationRegistry === 'undefined')
860 ? { register: () => {}, unregister: () => {} }
861 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapibitcoinaddresscreationpayloaddata_free(ptr >>> 0, 1));
864 export class WasmApiBitcoinAddressCreationPayloadData {
866 static __wrap(ptr) {
867 ptr = ptr >>> 0;
868 const obj = Object.create(WasmApiBitcoinAddressCreationPayloadData.prototype);
869 obj.__wbg_ptr = ptr;
870 WasmApiBitcoinAddressCreationPayloadDataFinalization.register(obj, obj.__wbg_ptr, obj);
871 return obj;
874 static __unwrap(jsValue) {
875 if (!(jsValue instanceof WasmApiBitcoinAddressCreationPayloadData)) {
876 return 0;
878 return jsValue.__destroy_into_raw();
881 __destroy_into_raw() {
882 const ptr = this.__wbg_ptr;
883 this.__wbg_ptr = 0;
884 WasmApiBitcoinAddressCreationPayloadDataFinalization.unregister(this);
885 return ptr;
888 free() {
889 const ptr = this.__destroy_into_raw();
890 wasm.__wbg_wasmapibitcoinaddresscreationpayloaddata_free(ptr, 0);
893 * @returns {WasmApiBitcoinAddressCreationPayload}
895 get Data() {
896 const ret = wasm.__wbg_get_wasmapibitcoinaddresscreationpayloaddata_Data(this.__wbg_ptr);
897 return takeObject(ret);
900 * @param {WasmApiBitcoinAddressCreationPayload} arg0
902 set Data(arg0) {
903 wasm.__wbg_set_wasmapibitcoinaddresscreationpayloaddata_Data(this.__wbg_ptr, addHeapObject(arg0));
907 const WasmApiBitcoinAddressesCreationPayloadFinalization = (typeof FinalizationRegistry === 'undefined')
908 ? { register: () => {}, unregister: () => {} }
909 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapibitcoinaddressescreationpayload_free(ptr >>> 0, 1));
912 export class WasmApiBitcoinAddressesCreationPayload {
914 __destroy_into_raw() {
915 const ptr = this.__wbg_ptr;
916 this.__wbg_ptr = 0;
917 WasmApiBitcoinAddressesCreationPayloadFinalization.unregister(this);
918 return ptr;
921 free() {
922 const ptr = this.__destroy_into_raw();
923 wasm.__wbg_wasmapibitcoinaddressescreationpayload_free(ptr, 0);
926 * @returns {(WasmApiBitcoinAddressCreationPayloadData)[]}
928 get 0() {
929 try {
930 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
931 wasm.__wbg_get_wasmapibitcoinaddressescreationpayload_0(retptr, this.__wbg_ptr);
932 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
933 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
934 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
935 wasm.__wbindgen_free(r0, r1 * 4, 4);
936 return v1;
937 } finally {
938 wasm.__wbindgen_add_to_stack_pointer(16);
942 * @param {(WasmApiBitcoinAddressCreationPayloadData)[]} arg0
944 set 0(arg0) {
945 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
946 const len0 = WASM_VECTOR_LEN;
947 wasm.__wbg_set_wasmapibitcoinaddressescreationpayload_0(this.__wbg_ptr, ptr0, len0);
951 constructor() {
952 const ret = wasm.wasmapibitcoinaddressescreationpayload_new();
953 this.__wbg_ptr = ret >>> 0;
954 WasmApiBitcoinAddressesCreationPayloadFinalization.register(this, this.__wbg_ptr, this);
955 return this;
958 * @param {WasmApiBitcoinAddressCreationPayload} create_payload
960 push(create_payload) {
961 wasm.wasmapibitcoinaddressescreationpayload_push(this.__wbg_ptr, addHeapObject(create_payload));
965 const WasmApiClientsFinalization = (typeof FinalizationRegistry === 'undefined')
966 ? { register: () => {}, unregister: () => {} }
967 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiclients_free(ptr >>> 0, 1));
970 export class WasmApiClients {
972 static __wrap(ptr) {
973 ptr = ptr >>> 0;
974 const obj = Object.create(WasmApiClients.prototype);
975 obj.__wbg_ptr = ptr;
976 WasmApiClientsFinalization.register(obj, obj.__wbg_ptr, obj);
977 return obj;
980 __destroy_into_raw() {
981 const ptr = this.__wbg_ptr;
982 this.__wbg_ptr = 0;
983 WasmApiClientsFinalization.unregister(this);
984 return ptr;
987 free() {
988 const ptr = this.__destroy_into_raw();
989 wasm.__wbg_wasmapiclients_free(ptr, 0);
992 * @returns {WasmExchangeRateClient}
994 get exchange_rate() {
995 const ret = wasm.__wbg_get_wasmapiclients_exchange_rate(this.__wbg_ptr);
996 return WasmExchangeRateClient.__wrap(ret);
999 * @param {WasmExchangeRateClient} arg0
1001 set exchange_rate(arg0) {
1002 _assertClass(arg0, WasmExchangeRateClient);
1003 var ptr0 = arg0.__destroy_into_raw();
1004 wasm.__wbg_set_wasmapiclients_exchange_rate(this.__wbg_ptr, ptr0);
1007 * @returns {WasmEmailIntegrationClient}
1009 get email_integration() {
1010 const ret = wasm.__wbg_get_wasmapiclients_email_integration(this.__wbg_ptr);
1011 return WasmEmailIntegrationClient.__wrap(ret);
1014 * @param {WasmEmailIntegrationClient} arg0
1016 set email_integration(arg0) {
1017 _assertClass(arg0, WasmEmailIntegrationClient);
1018 var ptr0 = arg0.__destroy_into_raw();
1019 wasm.__wbg_set_wasmapiclients_email_integration(this.__wbg_ptr, ptr0);
1022 * @returns {WasmBitcoinAddressClient}
1024 get bitcoin_address() {
1025 const ret = wasm.__wbg_get_wasmapiclients_bitcoin_address(this.__wbg_ptr);
1026 return WasmBitcoinAddressClient.__wrap(ret);
1029 * @param {WasmBitcoinAddressClient} arg0
1031 set bitcoin_address(arg0) {
1032 _assertClass(arg0, WasmBitcoinAddressClient);
1033 var ptr0 = arg0.__destroy_into_raw();
1034 wasm.__wbg_set_wasmapiclients_bitcoin_address(this.__wbg_ptr, ptr0);
1037 * @returns {WasmPaymentGatewayClient}
1039 get payment_gateway() {
1040 const ret = wasm.__wbg_get_wasmapiclients_payment_gateway(this.__wbg_ptr);
1041 return WasmPaymentGatewayClient.__wrap(ret);
1044 * @param {WasmPaymentGatewayClient} arg0
1046 set payment_gateway(arg0) {
1047 _assertClass(arg0, WasmPaymentGatewayClient);
1048 var ptr0 = arg0.__destroy_into_raw();
1049 wasm.__wbg_set_wasmapiclients_payment_gateway(this.__wbg_ptr, ptr0);
1052 * @returns {WasmPriceGraphClient}
1054 get price_graph() {
1055 const ret = wasm.__wbg_get_wasmapiclients_price_graph(this.__wbg_ptr);
1056 return WasmPriceGraphClient.__wrap(ret);
1059 * @param {WasmPriceGraphClient} arg0
1061 set price_graph(arg0) {
1062 _assertClass(arg0, WasmPriceGraphClient);
1063 var ptr0 = arg0.__destroy_into_raw();
1064 wasm.__wbg_set_wasmapiclients_price_graph(this.__wbg_ptr, ptr0);
1067 * @returns {WasmSettingsClient}
1069 get settings() {
1070 const ret = wasm.__wbg_get_wasmapiclients_settings(this.__wbg_ptr);
1071 return WasmSettingsClient.__wrap(ret);
1074 * @param {WasmSettingsClient} arg0
1076 set settings(arg0) {
1077 _assertClass(arg0, WasmSettingsClient);
1078 var ptr0 = arg0.__destroy_into_raw();
1079 wasm.__wbg_set_wasmapiclients_settings(this.__wbg_ptr, ptr0);
1082 * @returns {WasmNetworkClient}
1084 get network() {
1085 const ret = wasm.__wbg_get_wasmapiclients_network(this.__wbg_ptr);
1086 return WasmNetworkClient.__wrap(ret);
1089 * @param {WasmNetworkClient} arg0
1091 set network(arg0) {
1092 _assertClass(arg0, WasmNetworkClient);
1093 var ptr0 = arg0.__destroy_into_raw();
1094 wasm.__wbg_set_wasmapiclients_network(this.__wbg_ptr, ptr0);
1097 * @returns {WasmInviteClient}
1099 get invite() {
1100 const ret = wasm.__wbg_get_wasmapiclients_invite(this.__wbg_ptr);
1101 return WasmInviteClient.__wrap(ret);
1104 * @param {WasmInviteClient} arg0
1106 set invite(arg0) {
1107 _assertClass(arg0, WasmInviteClient);
1108 var ptr0 = arg0.__destroy_into_raw();
1109 wasm.__wbg_set_wasmapiclients_invite(this.__wbg_ptr, ptr0);
1112 * @returns {WasmWalletClient}
1114 get wallet() {
1115 const ret = wasm.__wbg_get_wasmapiclients_wallet(this.__wbg_ptr);
1116 return WasmWalletClient.__wrap(ret);
1119 * @param {WasmWalletClient} arg0
1121 set wallet(arg0) {
1122 _assertClass(arg0, WasmWalletClient);
1123 var ptr0 = arg0.__destroy_into_raw();
1124 wasm.__wbg_set_wasmapiclients_wallet(this.__wbg_ptr, ptr0);
1128 const WasmApiExchangeRateDataFinalization = (typeof FinalizationRegistry === 'undefined')
1129 ? { register: () => {}, unregister: () => {} }
1130 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiexchangeratedata_free(ptr >>> 0, 1));
1133 export class WasmApiExchangeRateData {
1135 static __wrap(ptr) {
1136 ptr = ptr >>> 0;
1137 const obj = Object.create(WasmApiExchangeRateData.prototype);
1138 obj.__wbg_ptr = ptr;
1139 WasmApiExchangeRateDataFinalization.register(obj, obj.__wbg_ptr, obj);
1140 return obj;
1143 __destroy_into_raw() {
1144 const ptr = this.__wbg_ptr;
1145 this.__wbg_ptr = 0;
1146 WasmApiExchangeRateDataFinalization.unregister(this);
1147 return ptr;
1150 free() {
1151 const ptr = this.__destroy_into_raw();
1152 wasm.__wbg_wasmapiexchangeratedata_free(ptr, 0);
1155 * @returns {WasmApiExchangeRate}
1157 get Data() {
1158 const ret = wasm.__wbg_get_wasmapiexchangeratedata_Data(this.__wbg_ptr);
1159 return takeObject(ret);
1162 * @param {WasmApiExchangeRate} arg0
1164 set Data(arg0) {
1165 wasm.__wbg_set_wasmapiexchangeratedata_Data(this.__wbg_ptr, addHeapObject(arg0));
1169 const WasmApiFiatCurrenciesFinalization = (typeof FinalizationRegistry === 'undefined')
1170 ? { register: () => {}, unregister: () => {} }
1171 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapifiatcurrencies_free(ptr >>> 0, 1));
1174 export class WasmApiFiatCurrencies {
1176 static __wrap(ptr) {
1177 ptr = ptr >>> 0;
1178 const obj = Object.create(WasmApiFiatCurrencies.prototype);
1179 obj.__wbg_ptr = ptr;
1180 WasmApiFiatCurrenciesFinalization.register(obj, obj.__wbg_ptr, obj);
1181 return obj;
1184 __destroy_into_raw() {
1185 const ptr = this.__wbg_ptr;
1186 this.__wbg_ptr = 0;
1187 WasmApiFiatCurrenciesFinalization.unregister(this);
1188 return ptr;
1191 free() {
1192 const ptr = this.__destroy_into_raw();
1193 wasm.__wbg_wasmapifiatcurrencies_free(ptr, 0);
1196 * @returns {(WasmApiFiatCurrencyData)[]}
1198 get 0() {
1199 try {
1200 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1201 wasm.__wbg_get_wasmapifiatcurrencies_0(retptr, this.__wbg_ptr);
1202 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1203 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1204 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1205 wasm.__wbindgen_free(r0, r1 * 4, 4);
1206 return v1;
1207 } finally {
1208 wasm.__wbindgen_add_to_stack_pointer(16);
1212 * @param {(WasmApiFiatCurrencyData)[]} arg0
1214 set 0(arg0) {
1215 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
1216 const len0 = WASM_VECTOR_LEN;
1217 wasm.__wbg_set_wasmapifiatcurrencies_0(this.__wbg_ptr, ptr0, len0);
1221 const WasmApiFiatCurrencyDataFinalization = (typeof FinalizationRegistry === 'undefined')
1222 ? { register: () => {}, unregister: () => {} }
1223 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapifiatcurrencydata_free(ptr >>> 0, 1));
1226 export class WasmApiFiatCurrencyData {
1228 static __wrap(ptr) {
1229 ptr = ptr >>> 0;
1230 const obj = Object.create(WasmApiFiatCurrencyData.prototype);
1231 obj.__wbg_ptr = ptr;
1232 WasmApiFiatCurrencyDataFinalization.register(obj, obj.__wbg_ptr, obj);
1233 return obj;
1236 static __unwrap(jsValue) {
1237 if (!(jsValue instanceof WasmApiFiatCurrencyData)) {
1238 return 0;
1240 return jsValue.__destroy_into_raw();
1243 __destroy_into_raw() {
1244 const ptr = this.__wbg_ptr;
1245 this.__wbg_ptr = 0;
1246 WasmApiFiatCurrencyDataFinalization.unregister(this);
1247 return ptr;
1250 free() {
1251 const ptr = this.__destroy_into_raw();
1252 wasm.__wbg_wasmapifiatcurrencydata_free(ptr, 0);
1255 * @returns {WasmApiFiatCurrency}
1257 get Data() {
1258 const ret = wasm.__wbg_get_wasmapifiatcurrencydata_Data(this.__wbg_ptr);
1259 return takeObject(ret);
1262 * @param {WasmApiFiatCurrency} arg0
1264 set Data(arg0) {
1265 wasm.__wbg_set_wasmapifiatcurrencydata_Data(this.__wbg_ptr, addHeapObject(arg0));
1269 const WasmApiWalletAccountAddressesFinalization = (typeof FinalizationRegistry === 'undefined')
1270 ? { register: () => {}, unregister: () => {} }
1271 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletaccountaddresses_free(ptr >>> 0, 1));
1274 export class WasmApiWalletAccountAddresses {
1276 static __wrap(ptr) {
1277 ptr = ptr >>> 0;
1278 const obj = Object.create(WasmApiWalletAccountAddresses.prototype);
1279 obj.__wbg_ptr = ptr;
1280 WasmApiWalletAccountAddressesFinalization.register(obj, obj.__wbg_ptr, obj);
1281 return obj;
1284 __destroy_into_raw() {
1285 const ptr = this.__wbg_ptr;
1286 this.__wbg_ptr = 0;
1287 WasmApiWalletAccountAddressesFinalization.unregister(this);
1288 return ptr;
1291 free() {
1292 const ptr = this.__destroy_into_raw();
1293 wasm.__wbg_wasmapiwalletaccountaddresses_free(ptr, 0);
1296 * @returns {(WasmWalletAccountAddressData)[]}
1298 get 0() {
1299 try {
1300 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1301 wasm.__wbg_get_wasmapiwalletaccountaddresses_0(retptr, this.__wbg_ptr);
1302 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1303 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1304 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1305 wasm.__wbindgen_free(r0, r1 * 4, 4);
1306 return v1;
1307 } finally {
1308 wasm.__wbindgen_add_to_stack_pointer(16);
1312 * @param {(WasmWalletAccountAddressData)[]} arg0
1314 set 0(arg0) {
1315 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
1316 const len0 = WASM_VECTOR_LEN;
1317 wasm.__wbg_set_wasmapiwalletaccountaddresses_0(this.__wbg_ptr, ptr0, len0);
1321 const WasmApiWalletAccountsFinalization = (typeof FinalizationRegistry === 'undefined')
1322 ? { register: () => {}, unregister: () => {} }
1323 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletaccounts_free(ptr >>> 0, 1));
1326 export class WasmApiWalletAccounts {
1328 static __wrap(ptr) {
1329 ptr = ptr >>> 0;
1330 const obj = Object.create(WasmApiWalletAccounts.prototype);
1331 obj.__wbg_ptr = ptr;
1332 WasmApiWalletAccountsFinalization.register(obj, obj.__wbg_ptr, obj);
1333 return obj;
1336 __destroy_into_raw() {
1337 const ptr = this.__wbg_ptr;
1338 this.__wbg_ptr = 0;
1339 WasmApiWalletAccountsFinalization.unregister(this);
1340 return ptr;
1343 free() {
1344 const ptr = this.__destroy_into_raw();
1345 wasm.__wbg_wasmapiwalletaccounts_free(ptr, 0);
1348 * @returns {(WasmWalletAccountData)[]}
1350 get 0() {
1351 try {
1352 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1353 wasm.__wbg_get_wasmapiwalletaccounts_0(retptr, this.__wbg_ptr);
1354 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1355 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1356 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1357 wasm.__wbindgen_free(r0, r1 * 4, 4);
1358 return v1;
1359 } finally {
1360 wasm.__wbindgen_add_to_stack_pointer(16);
1364 * @param {(WasmWalletAccountData)[]} arg0
1366 set 0(arg0) {
1367 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
1368 const len0 = WASM_VECTOR_LEN;
1369 wasm.__wbg_set_wasmapiwalletaccounts_0(this.__wbg_ptr, ptr0, len0);
1373 const WasmApiWalletBitcoinAddressDataFinalization = (typeof FinalizationRegistry === 'undefined')
1374 ? { register: () => {}, unregister: () => {} }
1375 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletbitcoinaddressdata_free(ptr >>> 0, 1));
1378 export class WasmApiWalletBitcoinAddressData {
1380 static __wrap(ptr) {
1381 ptr = ptr >>> 0;
1382 const obj = Object.create(WasmApiWalletBitcoinAddressData.prototype);
1383 obj.__wbg_ptr = ptr;
1384 WasmApiWalletBitcoinAddressDataFinalization.register(obj, obj.__wbg_ptr, obj);
1385 return obj;
1388 static __unwrap(jsValue) {
1389 if (!(jsValue instanceof WasmApiWalletBitcoinAddressData)) {
1390 return 0;
1392 return jsValue.__destroy_into_raw();
1395 __destroy_into_raw() {
1396 const ptr = this.__wbg_ptr;
1397 this.__wbg_ptr = 0;
1398 WasmApiWalletBitcoinAddressDataFinalization.unregister(this);
1399 return ptr;
1402 free() {
1403 const ptr = this.__destroy_into_raw();
1404 wasm.__wbg_wasmapiwalletbitcoinaddressdata_free(ptr, 0);
1407 * @returns {WasmApiWalletBitcoinAddress}
1409 get Data() {
1410 const ret = wasm.__wbg_get_wasmapiwalletbitcoinaddressdata_Data(this.__wbg_ptr);
1411 return takeObject(ret);
1414 * @param {WasmApiWalletBitcoinAddress} arg0
1416 set Data(arg0) {
1417 wasm.__wbg_set_wasmapiwalletbitcoinaddressdata_Data(this.__wbg_ptr, addHeapObject(arg0));
1421 const WasmApiWalletBitcoinAddressLookupDataFinalization = (typeof FinalizationRegistry === 'undefined')
1422 ? { register: () => {}, unregister: () => {} }
1423 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletbitcoinaddresslookupdata_free(ptr >>> 0, 1));
1426 export class WasmApiWalletBitcoinAddressLookupData {
1428 static __wrap(ptr) {
1429 ptr = ptr >>> 0;
1430 const obj = Object.create(WasmApiWalletBitcoinAddressLookupData.prototype);
1431 obj.__wbg_ptr = ptr;
1432 WasmApiWalletBitcoinAddressLookupDataFinalization.register(obj, obj.__wbg_ptr, obj);
1433 return obj;
1436 __destroy_into_raw() {
1437 const ptr = this.__wbg_ptr;
1438 this.__wbg_ptr = 0;
1439 WasmApiWalletBitcoinAddressLookupDataFinalization.unregister(this);
1440 return ptr;
1443 free() {
1444 const ptr = this.__destroy_into_raw();
1445 wasm.__wbg_wasmapiwalletbitcoinaddresslookupdata_free(ptr, 0);
1448 * @returns {WasmApiWalletBitcoinAddressLookup}
1450 get Data() {
1451 const ret = wasm.__wbg_get_wasmapiwalletbitcoinaddresslookupdata_Data(this.__wbg_ptr);
1452 return takeObject(ret);
1455 * @param {WasmApiWalletBitcoinAddressLookup} arg0
1457 set Data(arg0) {
1458 wasm.__wbg_set_wasmapiwalletbitcoinaddresslookupdata_Data(this.__wbg_ptr, addHeapObject(arg0));
1462 const WasmApiWalletBitcoinAddressesFinalization = (typeof FinalizationRegistry === 'undefined')
1463 ? { register: () => {}, unregister: () => {} }
1464 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletbitcoinaddresses_free(ptr >>> 0, 1));
1467 export class WasmApiWalletBitcoinAddresses {
1469 static __wrap(ptr) {
1470 ptr = ptr >>> 0;
1471 const obj = Object.create(WasmApiWalletBitcoinAddresses.prototype);
1472 obj.__wbg_ptr = ptr;
1473 WasmApiWalletBitcoinAddressesFinalization.register(obj, obj.__wbg_ptr, obj);
1474 return obj;
1477 __destroy_into_raw() {
1478 const ptr = this.__wbg_ptr;
1479 this.__wbg_ptr = 0;
1480 WasmApiWalletBitcoinAddressesFinalization.unregister(this);
1481 return ptr;
1484 free() {
1485 const ptr = this.__destroy_into_raw();
1486 wasm.__wbg_wasmapiwalletbitcoinaddresses_free(ptr, 0);
1489 * @returns {(WasmApiWalletBitcoinAddressData)[]}
1491 get 0() {
1492 try {
1493 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1494 wasm.__wbg_get_wasmapiwalletbitcoinaddresses_0(retptr, this.__wbg_ptr);
1495 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1496 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1497 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1498 wasm.__wbindgen_free(r0, r1 * 4, 4);
1499 return v1;
1500 } finally {
1501 wasm.__wbindgen_add_to_stack_pointer(16);
1505 * @param {(WasmApiWalletBitcoinAddressData)[]} arg0
1507 set 0(arg0) {
1508 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
1509 const len0 = WASM_VECTOR_LEN;
1510 wasm.__wbg_set_wasmapiwalletbitcoinaddresses_0(this.__wbg_ptr, ptr0, len0);
1514 const WasmApiWalletDataFinalization = (typeof FinalizationRegistry === 'undefined')
1515 ? { register: () => {}, unregister: () => {} }
1516 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletdata_free(ptr >>> 0, 1));
1519 export class WasmApiWalletData {
1521 static __wrap(ptr) {
1522 ptr = ptr >>> 0;
1523 const obj = Object.create(WasmApiWalletData.prototype);
1524 obj.__wbg_ptr = ptr;
1525 WasmApiWalletDataFinalization.register(obj, obj.__wbg_ptr, obj);
1526 return obj;
1529 static __unwrap(jsValue) {
1530 if (!(jsValue instanceof WasmApiWalletData)) {
1531 return 0;
1533 return jsValue.__destroy_into_raw();
1536 __destroy_into_raw() {
1537 const ptr = this.__wbg_ptr;
1538 this.__wbg_ptr = 0;
1539 WasmApiWalletDataFinalization.unregister(this);
1540 return ptr;
1543 free() {
1544 const ptr = this.__destroy_into_raw();
1545 wasm.__wbg_wasmapiwalletdata_free(ptr, 0);
1548 * @returns {WasmApiWallet}
1550 get Wallet() {
1551 const ret = wasm.__wbg_get_wasmapiwalletdata_Wallet(this.__wbg_ptr);
1552 return takeObject(ret);
1555 * @param {WasmApiWallet} arg0
1557 set Wallet(arg0) {
1558 wasm.__wbg_set_wasmapiwalletdata_Wallet(this.__wbg_ptr, addHeapObject(arg0));
1561 * @returns {WasmApiWalletKey}
1563 get WalletKey() {
1564 const ret = wasm.__wbg_get_wasmapiwalletdata_WalletKey(this.__wbg_ptr);
1565 return takeObject(ret);
1568 * @param {WasmApiWalletKey} arg0
1570 set WalletKey(arg0) {
1571 wasm.__wbg_set_wasmapiwalletdata_WalletKey(this.__wbg_ptr, addHeapObject(arg0));
1574 * @returns {WasmApiWalletSettings}
1576 get WalletSettings() {
1577 const ret = wasm.__wbg_get_wasmapiwalletdata_WalletSettings(this.__wbg_ptr);
1578 return takeObject(ret);
1581 * @param {WasmApiWalletSettings} arg0
1583 set WalletSettings(arg0) {
1584 wasm.__wbg_set_wasmapiwalletdata_WalletSettings(this.__wbg_ptr, addHeapObject(arg0));
1587 * @param {WasmApiWallet} wallet
1588 * @param {WasmApiWalletKey} key
1589 * @param {WasmApiWalletSettings} settings
1590 * @returns {WasmApiWalletData}
1592 static from_parts(wallet, key, settings) {
1593 const ret = wasm.wasmapiwalletdata_from_parts(addHeapObject(wallet), addHeapObject(key), addHeapObject(settings));
1594 return WasmApiWalletData.__wrap(ret);
1598 const WasmApiWalletTransactionDataFinalization = (typeof FinalizationRegistry === 'undefined')
1599 ? { register: () => {}, unregister: () => {} }
1600 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwallettransactiondata_free(ptr >>> 0, 1));
1603 export class WasmApiWalletTransactionData {
1605 static __wrap(ptr) {
1606 ptr = ptr >>> 0;
1607 const obj = Object.create(WasmApiWalletTransactionData.prototype);
1608 obj.__wbg_ptr = ptr;
1609 WasmApiWalletTransactionDataFinalization.register(obj, obj.__wbg_ptr, obj);
1610 return obj;
1613 static __unwrap(jsValue) {
1614 if (!(jsValue instanceof WasmApiWalletTransactionData)) {
1615 return 0;
1617 return jsValue.__destroy_into_raw();
1620 __destroy_into_raw() {
1621 const ptr = this.__wbg_ptr;
1622 this.__wbg_ptr = 0;
1623 WasmApiWalletTransactionDataFinalization.unregister(this);
1624 return ptr;
1627 free() {
1628 const ptr = this.__destroy_into_raw();
1629 wasm.__wbg_wasmapiwallettransactiondata_free(ptr, 0);
1632 * @returns {WasmApiWalletTransaction}
1634 get Data() {
1635 const ret = wasm.__wbg_get_wasmapiwallettransactiondata_Data(this.__wbg_ptr);
1636 return takeObject(ret);
1639 * @param {WasmApiWalletTransaction} arg0
1641 set Data(arg0) {
1642 wasm.__wbg_set_wasmapiwallettransactiondata_Data(this.__wbg_ptr, addHeapObject(arg0));
1646 const WasmApiWalletTransactionsFinalization = (typeof FinalizationRegistry === 'undefined')
1647 ? { register: () => {}, unregister: () => {} }
1648 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwallettransactions_free(ptr >>> 0, 1));
1651 export class WasmApiWalletTransactions {
1653 static __wrap(ptr) {
1654 ptr = ptr >>> 0;
1655 const obj = Object.create(WasmApiWalletTransactions.prototype);
1656 obj.__wbg_ptr = ptr;
1657 WasmApiWalletTransactionsFinalization.register(obj, obj.__wbg_ptr, obj);
1658 return obj;
1661 __destroy_into_raw() {
1662 const ptr = this.__wbg_ptr;
1663 this.__wbg_ptr = 0;
1664 WasmApiWalletTransactionsFinalization.unregister(this);
1665 return ptr;
1668 free() {
1669 const ptr = this.__destroy_into_raw();
1670 wasm.__wbg_wasmapiwallettransactions_free(ptr, 0);
1673 * @returns {(WasmApiWalletTransactionData)[]}
1675 get 0() {
1676 try {
1677 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1678 wasm.__wbg_get_wasmapiwallettransactions_0(retptr, this.__wbg_ptr);
1679 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1680 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1681 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1682 wasm.__wbindgen_free(r0, r1 * 4, 4);
1683 return v1;
1684 } finally {
1685 wasm.__wbindgen_add_to_stack_pointer(16);
1689 * @param {(WasmApiWalletTransactionData)[]} arg0
1691 set 0(arg0) {
1692 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
1693 const len0 = WASM_VECTOR_LEN;
1694 wasm.__wbg_set_wasmapiwallettransactions_0(this.__wbg_ptr, ptr0, len0);
1698 const WasmApiWalletsDataFinalization = (typeof FinalizationRegistry === 'undefined')
1699 ? { register: () => {}, unregister: () => {} }
1700 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletsdata_free(ptr >>> 0, 1));
1703 export class WasmApiWalletsData {
1705 static __wrap(ptr) {
1706 ptr = ptr >>> 0;
1707 const obj = Object.create(WasmApiWalletsData.prototype);
1708 obj.__wbg_ptr = ptr;
1709 WasmApiWalletsDataFinalization.register(obj, obj.__wbg_ptr, obj);
1710 return obj;
1713 __destroy_into_raw() {
1714 const ptr = this.__wbg_ptr;
1715 this.__wbg_ptr = 0;
1716 WasmApiWalletsDataFinalization.unregister(this);
1717 return ptr;
1720 free() {
1721 const ptr = this.__destroy_into_raw();
1722 wasm.__wbg_wasmapiwalletsdata_free(ptr, 0);
1725 * @returns {(WasmApiWalletData)[]}
1727 get 0() {
1728 try {
1729 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1730 wasm.__wbg_get_wasmapiwalletsdata_0(retptr, this.__wbg_ptr);
1731 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1732 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1733 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1734 wasm.__wbindgen_free(r0, r1 * 4, 4);
1735 return v1;
1736 } finally {
1737 wasm.__wbindgen_add_to_stack_pointer(16);
1741 * @param {(WasmApiWalletData)[]} arg0
1743 set 0(arg0) {
1744 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
1745 const len0 = WASM_VECTOR_LEN;
1746 wasm.__wbg_set_wasmapiwalletsdata_0(this.__wbg_ptr, ptr0, len0);
1750 const WasmAuthDataFinalization = (typeof FinalizationRegistry === 'undefined')
1751 ? { register: () => {}, unregister: () => {} }
1752 : new FinalizationRegistry(ptr => wasm.__wbg_wasmauthdata_free(ptr >>> 0, 1));
1755 export class WasmAuthData {
1757 __destroy_into_raw() {
1758 const ptr = this.__wbg_ptr;
1759 this.__wbg_ptr = 0;
1760 WasmAuthDataFinalization.unregister(this);
1761 return ptr;
1764 free() {
1765 const ptr = this.__destroy_into_raw();
1766 wasm.__wbg_wasmauthdata_free(ptr, 0);
1769 * @returns {string}
1771 get uid() {
1772 let deferred1_0;
1773 let deferred1_1;
1774 try {
1775 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1776 wasm.__wbg_get_wasmaddressinfo_address(retptr, this.__wbg_ptr);
1777 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1778 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1779 deferred1_0 = r0;
1780 deferred1_1 = r1;
1781 return getStringFromWasm0(r0, r1);
1782 } finally {
1783 wasm.__wbindgen_add_to_stack_pointer(16);
1784 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1788 * @param {string} arg0
1790 set uid(arg0) {
1791 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1792 const len0 = WASM_VECTOR_LEN;
1793 wasm.__wbg_set_wasmaddressinfo_address(this.__wbg_ptr, ptr0, len0);
1796 * @returns {string}
1798 get access() {
1799 let deferred1_0;
1800 let deferred1_1;
1801 try {
1802 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1803 wasm.__wbg_get_wasmauthdata_access(retptr, this.__wbg_ptr);
1804 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1805 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1806 deferred1_0 = r0;
1807 deferred1_1 = r1;
1808 return getStringFromWasm0(r0, r1);
1809 } finally {
1810 wasm.__wbindgen_add_to_stack_pointer(16);
1811 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1815 * @param {string} arg0
1817 set access(arg0) {
1818 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1819 const len0 = WASM_VECTOR_LEN;
1820 wasm.__wbg_set_wasmauthdata_access(this.__wbg_ptr, ptr0, len0);
1823 * @returns {string}
1825 get refresh() {
1826 let deferred1_0;
1827 let deferred1_1;
1828 try {
1829 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1830 wasm.__wbg_get_wasmauthdata_refresh(retptr, this.__wbg_ptr);
1831 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1832 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1833 deferred1_0 = r0;
1834 deferred1_1 = r1;
1835 return getStringFromWasm0(r0, r1);
1836 } finally {
1837 wasm.__wbindgen_add_to_stack_pointer(16);
1838 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1842 * @param {string} arg0
1844 set refresh(arg0) {
1845 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1846 const len0 = WASM_VECTOR_LEN;
1847 wasm.__wbg_set_wasmauthdata_refresh(this.__wbg_ptr, ptr0, len0);
1850 * @returns {(string)[]}
1852 get scopes() {
1853 try {
1854 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1855 wasm.__wbg_get_wasmauthdata_scopes(retptr, this.__wbg_ptr);
1856 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1857 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1858 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1859 wasm.__wbindgen_free(r0, r1 * 4, 4);
1860 return v1;
1861 } finally {
1862 wasm.__wbindgen_add_to_stack_pointer(16);
1866 * @param {(string)[]} arg0
1868 set scopes(arg0) {
1869 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
1870 const len0 = WASM_VECTOR_LEN;
1871 wasm.__wbg_set_wasmauthdata_scopes(this.__wbg_ptr, ptr0, len0);
1875 const WasmBalanceWrapperFinalization = (typeof FinalizationRegistry === 'undefined')
1876 ? { register: () => {}, unregister: () => {} }
1877 : new FinalizationRegistry(ptr => wasm.__wbg_wasmbalancewrapper_free(ptr >>> 0, 1));
1880 export class WasmBalanceWrapper {
1882 static __wrap(ptr) {
1883 ptr = ptr >>> 0;
1884 const obj = Object.create(WasmBalanceWrapper.prototype);
1885 obj.__wbg_ptr = ptr;
1886 WasmBalanceWrapperFinalization.register(obj, obj.__wbg_ptr, obj);
1887 return obj;
1890 __destroy_into_raw() {
1891 const ptr = this.__wbg_ptr;
1892 this.__wbg_ptr = 0;
1893 WasmBalanceWrapperFinalization.unregister(this);
1894 return ptr;
1897 free() {
1898 const ptr = this.__destroy_into_raw();
1899 wasm.__wbg_wasmbalancewrapper_free(ptr, 0);
1902 * @returns {WasmBalance}
1904 get data() {
1905 const ret = wasm.__wbg_get_wasmbalancewrapper_data(this.__wbg_ptr);
1906 return takeObject(ret);
1909 * @param {WasmBalance} arg0
1911 set data(arg0) {
1912 wasm.__wbg_set_wasmbalancewrapper_data(this.__wbg_ptr, addHeapObject(arg0));
1916 const WasmBitcoinAddressClientFinalization = (typeof FinalizationRegistry === 'undefined')
1917 ? { register: () => {}, unregister: () => {} }
1918 : new FinalizationRegistry(ptr => wasm.__wbg_wasmbitcoinaddressclient_free(ptr >>> 0, 1));
1921 export class WasmBitcoinAddressClient {
1923 static __wrap(ptr) {
1924 ptr = ptr >>> 0;
1925 const obj = Object.create(WasmBitcoinAddressClient.prototype);
1926 obj.__wbg_ptr = ptr;
1927 WasmBitcoinAddressClientFinalization.register(obj, obj.__wbg_ptr, obj);
1928 return obj;
1931 __destroy_into_raw() {
1932 const ptr = this.__wbg_ptr;
1933 this.__wbg_ptr = 0;
1934 WasmBitcoinAddressClientFinalization.unregister(this);
1935 return ptr;
1938 free() {
1939 const ptr = this.__destroy_into_raw();
1940 wasm.__wbg_wasmbitcoinaddressclient_free(ptr, 0);
1943 * @param {string} wallet_id
1944 * @param {string} wallet_account_id
1945 * @param {number | undefined} [only_without_bitcoin_addresses]
1946 * @returns {Promise<WasmApiWalletBitcoinAddresses>}
1948 getBitcoinAddresses(wallet_id, wallet_account_id, only_without_bitcoin_addresses) {
1949 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1950 const len0 = WASM_VECTOR_LEN;
1951 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1952 const len1 = WASM_VECTOR_LEN;
1953 const ret = wasm.wasmbitcoinaddressclient_getBitcoinAddresses(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(only_without_bitcoin_addresses) ? 0xFFFFFF : only_without_bitcoin_addresses);
1954 return takeObject(ret);
1957 * @param {string} wallet_id
1958 * @param {string} wallet_account_id
1959 * @returns {Promise<bigint>}
1961 getBitcoinAddressHighestIndex(wallet_id, wallet_account_id) {
1962 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1963 const len0 = WASM_VECTOR_LEN;
1964 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1965 const len1 = WASM_VECTOR_LEN;
1966 const ret = wasm.wasmbitcoinaddressclient_getBitcoinAddressHighestIndex(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1967 return takeObject(ret);
1970 * @param {string} wallet_id
1971 * @param {string} wallet_account_id
1972 * @param {WasmApiBitcoinAddressesCreationPayload} bitcoin_addresses
1973 * @returns {Promise<WasmApiWalletBitcoinAddresses>}
1975 addBitcoinAddresses(wallet_id, wallet_account_id, bitcoin_addresses) {
1976 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1977 const len0 = WASM_VECTOR_LEN;
1978 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1979 const len1 = WASM_VECTOR_LEN;
1980 _assertClass(bitcoin_addresses, WasmApiBitcoinAddressesCreationPayload);
1981 var ptr2 = bitcoin_addresses.__destroy_into_raw();
1982 const ret = wasm.wasmbitcoinaddressclient_addBitcoinAddresses(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2);
1983 return takeObject(ret);
1986 * @param {string} wallet_id
1987 * @param {string} wallet_account_id
1988 * @param {string} wallet_account_bitcoin_address_id
1989 * @param {WasmApiBitcoinAddressCreationPayload} bitcoin_address
1990 * @returns {Promise<WasmApiWalletBitcoinAddressData>}
1992 updateBitcoinAddress(wallet_id, wallet_account_id, wallet_account_bitcoin_address_id, bitcoin_address) {
1993 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1994 const len0 = WASM_VECTOR_LEN;
1995 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1996 const len1 = WASM_VECTOR_LEN;
1997 const ptr2 = passStringToWasm0(wallet_account_bitcoin_address_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1998 const len2 = WASM_VECTOR_LEN;
1999 const ret = wasm.wasmbitcoinaddressclient_updateBitcoinAddress(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, addHeapObject(bitcoin_address));
2000 return takeObject(ret);
2004 const WasmBlockchainClientFinalization = (typeof FinalizationRegistry === 'undefined')
2005 ? { register: () => {}, unregister: () => {} }
2006 : new FinalizationRegistry(ptr => wasm.__wbg_wasmblockchainclient_free(ptr >>> 0, 1));
2009 export class WasmBlockchainClient {
2011 __destroy_into_raw() {
2012 const ptr = this.__wbg_ptr;
2013 this.__wbg_ptr = 0;
2014 WasmBlockchainClientFinalization.unregister(this);
2015 return ptr;
2018 free() {
2019 const ptr = this.__destroy_into_raw();
2020 wasm.__wbg_wasmblockchainclient_free(ptr, 0);
2023 * Generates a Mnemonic with a random entropy based on the given word
2024 * count.
2025 * @param {WasmProtonWalletApiClient} proton_api_client
2027 constructor(proton_api_client) {
2028 try {
2029 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2030 _assertClass(proton_api_client, WasmProtonWalletApiClient);
2031 wasm.wasmblockchainclient_new(retptr, proton_api_client.__wbg_ptr);
2032 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2033 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2034 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2035 if (r2) {
2036 throw takeObject(r1);
2038 this.__wbg_ptr = r0 >>> 0;
2039 WasmBlockchainClientFinalization.register(this, this.__wbg_ptr, this);
2040 return this;
2041 } finally {
2042 wasm.__wbindgen_add_to_stack_pointer(16);
2046 * @returns {Promise<Map<string, number>>}
2048 getFeesEstimation() {
2049 const ret = wasm.wasmblockchainclient_getFeesEstimation(this.__wbg_ptr);
2050 return takeObject(ret);
2053 * @returns {Promise<WasmMinimumFees>}
2055 getMininumFees() {
2056 const ret = wasm.wasmblockchainclient_getMininumFees(this.__wbg_ptr);
2057 return takeObject(ret);
2060 * @param {WasmAccount} account
2061 * @param {number | undefined} [stop_gap]
2062 * @returns {Promise<void>}
2064 fullSync(account, stop_gap) {
2065 _assertClass(account, WasmAccount);
2066 const ret = wasm.wasmblockchainclient_fullSync(this.__wbg_ptr, account.__wbg_ptr, !isLikeNone(stop_gap), isLikeNone(stop_gap) ? 0 : stop_gap);
2067 return takeObject(ret);
2070 * @param {WasmAccount} account
2071 * @returns {Promise<void>}
2073 partialSync(account) {
2074 _assertClass(account, WasmAccount);
2075 const ret = wasm.wasmblockchainclient_partialSync(this.__wbg_ptr, account.__wbg_ptr);
2076 return takeObject(ret);
2079 * @param {WasmAccount} account
2080 * @returns {Promise<boolean>}
2082 shouldSync(account) {
2083 _assertClass(account, WasmAccount);
2084 const ret = wasm.wasmblockchainclient_shouldSync(this.__wbg_ptr, account.__wbg_ptr);
2085 return takeObject(ret);
2088 * @param {WasmPsbt} psbt
2089 * @param {string} wallet_id
2090 * @param {string} wallet_account_id
2091 * @param {WasmTransactionData} transaction_data
2092 * @param {WasmEmailIntegrationData | undefined} [email_integration]
2093 * @returns {Promise<string>}
2095 broadcastPsbt(psbt, wallet_id, wallet_account_id, transaction_data, email_integration) {
2096 _assertClass(psbt, WasmPsbt);
2097 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2098 const len0 = WASM_VECTOR_LEN;
2099 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2100 const len1 = WASM_VECTOR_LEN;
2101 const ret = wasm.wasmblockchainclient_broadcastPsbt(this.__wbg_ptr, psbt.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(transaction_data), isLikeNone(email_integration) ? 0 : addHeapObject(email_integration));
2102 return takeObject(ret);
2106 const WasmCountriesAndProviderTuppleFinalization = (typeof FinalizationRegistry === 'undefined')
2107 ? { register: () => {}, unregister: () => {} }
2108 : new FinalizationRegistry(ptr => wasm.__wbg_wasmcountriesandprovidertupple_free(ptr >>> 0, 1));
2111 export class WasmCountriesAndProviderTupple {
2113 static __wrap(ptr) {
2114 ptr = ptr >>> 0;
2115 const obj = Object.create(WasmCountriesAndProviderTupple.prototype);
2116 obj.__wbg_ptr = ptr;
2117 WasmCountriesAndProviderTuppleFinalization.register(obj, obj.__wbg_ptr, obj);
2118 return obj;
2121 static __unwrap(jsValue) {
2122 if (!(jsValue instanceof WasmCountriesAndProviderTupple)) {
2123 return 0;
2125 return jsValue.__destroy_into_raw();
2128 __destroy_into_raw() {
2129 const ptr = this.__wbg_ptr;
2130 this.__wbg_ptr = 0;
2131 WasmCountriesAndProviderTuppleFinalization.unregister(this);
2132 return ptr;
2135 free() {
2136 const ptr = this.__destroy_into_raw();
2137 wasm.__wbg_wasmcountriesandprovidertupple_free(ptr, 0);
2140 * @returns {WasmGatewayProvider}
2142 get 0() {
2143 const ret = wasm.__wbg_get_wasmcountriesandprovidertupple_0(this.__wbg_ptr);
2144 return takeObject(ret);
2147 * @param {WasmGatewayProvider} arg0
2149 set 0(arg0) {
2150 wasm.__wbg_set_wasmcountriesandprovidertupple_0(this.__wbg_ptr, addHeapObject(arg0));
2153 * @returns {WasmCountries}
2155 get 1() {
2156 const ret = wasm.__wbg_get_wasmcountriesandprovidertupple_1(this.__wbg_ptr);
2157 return takeObject(ret);
2160 * @param {WasmCountries} arg0
2162 set 1(arg0) {
2163 wasm.__wbg_set_wasmcountriesandprovidertupple_1(this.__wbg_ptr, addHeapObject(arg0));
2167 const WasmCountriesByProviderFinalization = (typeof FinalizationRegistry === 'undefined')
2168 ? { register: () => {}, unregister: () => {} }
2169 : new FinalizationRegistry(ptr => wasm.__wbg_wasmcountriesbyprovider_free(ptr >>> 0, 1));
2172 export class WasmCountriesByProvider {
2174 static __wrap(ptr) {
2175 ptr = ptr >>> 0;
2176 const obj = Object.create(WasmCountriesByProvider.prototype);
2177 obj.__wbg_ptr = ptr;
2178 WasmCountriesByProviderFinalization.register(obj, obj.__wbg_ptr, obj);
2179 return obj;
2182 __destroy_into_raw() {
2183 const ptr = this.__wbg_ptr;
2184 this.__wbg_ptr = 0;
2185 WasmCountriesByProviderFinalization.unregister(this);
2186 return ptr;
2189 free() {
2190 const ptr = this.__destroy_into_raw();
2191 wasm.__wbg_wasmcountriesbyprovider_free(ptr, 0);
2194 * @returns {(WasmCountriesAndProviderTupple)[]}
2196 get data() {
2197 try {
2198 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2199 wasm.__wbg_get_wasmcountriesbyprovider_data(retptr, this.__wbg_ptr);
2200 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2201 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2202 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2203 wasm.__wbindgen_free(r0, r1 * 4, 4);
2204 return v1;
2205 } finally {
2206 wasm.__wbindgen_add_to_stack_pointer(16);
2210 * @param {(WasmCountriesAndProviderTupple)[]} arg0
2212 set data(arg0) {
2213 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
2214 const len0 = WASM_VECTOR_LEN;
2215 wasm.__wbg_set_wasmcountriesbyprovider_data(this.__wbg_ptr, ptr0, len0);
2219 const WasmDerivationPathFinalization = (typeof FinalizationRegistry === 'undefined')
2220 ? { register: () => {}, unregister: () => {} }
2221 : new FinalizationRegistry(ptr => wasm.__wbg_wasmderivationpath_free(ptr >>> 0, 1));
2224 export class WasmDerivationPath {
2226 static __wrap(ptr) {
2227 ptr = ptr >>> 0;
2228 const obj = Object.create(WasmDerivationPath.prototype);
2229 obj.__wbg_ptr = ptr;
2230 WasmDerivationPathFinalization.register(obj, obj.__wbg_ptr, obj);
2231 return obj;
2234 __destroy_into_raw() {
2235 const ptr = this.__wbg_ptr;
2236 this.__wbg_ptr = 0;
2237 WasmDerivationPathFinalization.unregister(this);
2238 return ptr;
2241 free() {
2242 const ptr = this.__destroy_into_raw();
2243 wasm.__wbg_wasmderivationpath_free(ptr, 0);
2246 * @param {string} path
2248 constructor(path) {
2249 try {
2250 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2251 const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2252 const len0 = WASM_VECTOR_LEN;
2253 wasm.wasmderivationpath_new(retptr, ptr0, len0);
2254 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2255 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2256 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2257 if (r2) {
2258 throw takeObject(r1);
2260 this.__wbg_ptr = r0 >>> 0;
2261 WasmDerivationPathFinalization.register(this, this.__wbg_ptr, this);
2262 return this;
2263 } finally {
2264 wasm.__wbindgen_add_to_stack_pointer(16);
2268 * @param {WasmScriptType} script_type
2269 * @param {WasmNetwork} network
2270 * @param {number} account_index
2271 * @returns {WasmDerivationPath}
2273 static fromParts(script_type, network, account_index) {
2274 const ret = wasm.wasmderivationpath_fromParts(script_type, network, account_index);
2275 return WasmDerivationPath.__wrap(ret);
2278 * @param {string} str
2279 * @returns {WasmDerivationPath}
2281 static fromString(str) {
2282 try {
2283 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2284 const ptr0 = passStringToWasm0(str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2285 const len0 = WASM_VECTOR_LEN;
2286 wasm.wasmderivationpath_fromString(retptr, ptr0, len0);
2287 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2288 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2289 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2290 if (r2) {
2291 throw takeObject(r1);
2293 return WasmDerivationPath.__wrap(r0);
2294 } finally {
2295 wasm.__wbindgen_add_to_stack_pointer(16);
2299 * @returns {string}
2301 toString() {
2302 let deferred1_0;
2303 let deferred1_1;
2304 try {
2305 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2306 wasm.wasmderivationpath_toString(retptr, this.__wbg_ptr);
2307 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2308 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2309 deferred1_0 = r0;
2310 deferred1_1 = r1;
2311 return getStringFromWasm0(r0, r1);
2312 } finally {
2313 wasm.__wbindgen_add_to_stack_pointer(16);
2314 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2319 const WasmDetailledTxInFinalization = (typeof FinalizationRegistry === 'undefined')
2320 ? { register: () => {}, unregister: () => {} }
2321 : new FinalizationRegistry(ptr => wasm.__wbg_wasmdetailledtxin_free(ptr >>> 0, 1));
2324 export class WasmDetailledTxIn {
2326 __destroy_into_raw() {
2327 const ptr = this.__wbg_ptr;
2328 this.__wbg_ptr = 0;
2329 WasmDetailledTxInFinalization.unregister(this);
2330 return ptr;
2333 free() {
2334 const ptr = this.__destroy_into_raw();
2335 wasm.__wbg_wasmdetailledtxin_free(ptr, 0);
2338 * @returns {WasmTxOut | undefined}
2340 get previous_output() {
2341 const ret = wasm.__wbg_get_wasmdetailledtxin_previous_output(this.__wbg_ptr);
2342 return ret === 0 ? undefined : WasmTxOut.__wrap(ret);
2345 * @param {WasmTxOut | undefined} [arg0]
2347 set previous_output(arg0) {
2348 let ptr0 = 0;
2349 if (!isLikeNone(arg0)) {
2350 _assertClass(arg0, WasmTxOut);
2351 ptr0 = arg0.__destroy_into_raw();
2353 wasm.__wbg_set_wasmdetailledtxin_previous_output(this.__wbg_ptr, ptr0);
2356 * @returns {WasmScript}
2358 get script_sig() {
2359 const ret = wasm.__wbg_get_wasmdetailledtxin_script_sig(this.__wbg_ptr);
2360 return WasmScript.__wrap(ret);
2363 * @param {WasmScript} arg0
2365 set script_sig(arg0) {
2366 _assertClass(arg0, WasmScript);
2367 var ptr0 = arg0.__destroy_into_raw();
2368 wasm.__wbg_set_wasmdetailledtxin_script_sig(this.__wbg_ptr, ptr0);
2371 * @returns {WasmSequence}
2373 get sequence() {
2374 const ret = wasm.__wbg_get_wasmdetailledtxin_sequence(this.__wbg_ptr);
2375 return WasmSequence.__wrap(ret);
2378 * @param {WasmSequence} arg0
2380 set sequence(arg0) {
2381 _assertClass(arg0, WasmSequence);
2382 var ptr0 = arg0.__destroy_into_raw();
2383 wasm.__wbg_set_wasmdetailledtxin_sequence(this.__wbg_ptr, ptr0);
2387 const WasmDiscoveredAccountFinalization = (typeof FinalizationRegistry === 'undefined')
2388 ? { register: () => {}, unregister: () => {} }
2389 : new FinalizationRegistry(ptr => wasm.__wbg_wasmdiscoveredaccount_free(ptr >>> 0, 1));
2392 export class WasmDiscoveredAccount {
2394 static __wrap(ptr) {
2395 ptr = ptr >>> 0;
2396 const obj = Object.create(WasmDiscoveredAccount.prototype);
2397 obj.__wbg_ptr = ptr;
2398 WasmDiscoveredAccountFinalization.register(obj, obj.__wbg_ptr, obj);
2399 return obj;
2402 static __unwrap(jsValue) {
2403 if (!(jsValue instanceof WasmDiscoveredAccount)) {
2404 return 0;
2406 return jsValue.__destroy_into_raw();
2409 __destroy_into_raw() {
2410 const ptr = this.__wbg_ptr;
2411 this.__wbg_ptr = 0;
2412 WasmDiscoveredAccountFinalization.unregister(this);
2413 return ptr;
2416 free() {
2417 const ptr = this.__destroy_into_raw();
2418 wasm.__wbg_wasmdiscoveredaccount_free(ptr, 0);
2421 * @returns {WasmScriptType}
2423 get 0() {
2424 const ret = wasm.__wbg_get_wasmdiscoveredaccount_0(this.__wbg_ptr);
2425 return ret;
2428 * @param {WasmScriptType} arg0
2430 set 0(arg0) {
2431 wasm.__wbg_set_wasmdiscoveredaccount_0(this.__wbg_ptr, arg0);
2434 * @returns {number}
2436 get 1() {
2437 const ret = wasm.__wbg_get_wasmdiscoveredaccount_1(this.__wbg_ptr);
2438 return ret >>> 0;
2441 * @param {number} arg0
2443 set 1(arg0) {
2444 wasm.__wbg_set_wasmdiscoveredaccount_1(this.__wbg_ptr, arg0);
2447 * @returns {WasmDerivationPath}
2449 get 2() {
2450 const ret = wasm.__wbg_get_wasmdiscoveredaccount_2(this.__wbg_ptr);
2451 return WasmDerivationPath.__wrap(ret);
2454 * @param {WasmDerivationPath} arg0
2456 set 2(arg0) {
2457 _assertClass(arg0, WasmDerivationPath);
2458 var ptr0 = arg0.__destroy_into_raw();
2459 wasm.__wbg_set_wasmdiscoveredaccount_2(this.__wbg_ptr, ptr0);
2463 const WasmDiscoveredAccountsFinalization = (typeof FinalizationRegistry === 'undefined')
2464 ? { register: () => {}, unregister: () => {} }
2465 : new FinalizationRegistry(ptr => wasm.__wbg_wasmdiscoveredaccounts_free(ptr >>> 0, 1));
2468 export class WasmDiscoveredAccounts {
2470 static __wrap(ptr) {
2471 ptr = ptr >>> 0;
2472 const obj = Object.create(WasmDiscoveredAccounts.prototype);
2473 obj.__wbg_ptr = ptr;
2474 WasmDiscoveredAccountsFinalization.register(obj, obj.__wbg_ptr, obj);
2475 return obj;
2478 __destroy_into_raw() {
2479 const ptr = this.__wbg_ptr;
2480 this.__wbg_ptr = 0;
2481 WasmDiscoveredAccountsFinalization.unregister(this);
2482 return ptr;
2485 free() {
2486 const ptr = this.__destroy_into_raw();
2487 wasm.__wbg_wasmdiscoveredaccounts_free(ptr, 0);
2490 * @returns {(WasmDiscoveredAccount)[]}
2492 get data() {
2493 try {
2494 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2495 wasm.__wbg_get_wasmdiscoveredaccounts_data(retptr, this.__wbg_ptr);
2496 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2497 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2498 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2499 wasm.__wbindgen_free(r0, r1 * 4, 4);
2500 return v1;
2501 } finally {
2502 wasm.__wbindgen_add_to_stack_pointer(16);
2506 * @param {(WasmDiscoveredAccount)[]} arg0
2508 set data(arg0) {
2509 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
2510 const len0 = WASM_VECTOR_LEN;
2511 wasm.__wbg_set_wasmdiscoveredaccounts_data(this.__wbg_ptr, ptr0, len0);
2515 const WasmEmailIntegrationClientFinalization = (typeof FinalizationRegistry === 'undefined')
2516 ? { register: () => {}, unregister: () => {} }
2517 : new FinalizationRegistry(ptr => wasm.__wbg_wasmemailintegrationclient_free(ptr >>> 0, 1));
2520 export class WasmEmailIntegrationClient {
2522 static __wrap(ptr) {
2523 ptr = ptr >>> 0;
2524 const obj = Object.create(WasmEmailIntegrationClient.prototype);
2525 obj.__wbg_ptr = ptr;
2526 WasmEmailIntegrationClientFinalization.register(obj, obj.__wbg_ptr, obj);
2527 return obj;
2530 __destroy_into_raw() {
2531 const ptr = this.__wbg_ptr;
2532 this.__wbg_ptr = 0;
2533 WasmEmailIntegrationClientFinalization.unregister(this);
2534 return ptr;
2537 free() {
2538 const ptr = this.__destroy_into_raw();
2539 wasm.__wbg_wasmemailintegrationclient_free(ptr, 0);
2542 * @param {string} email
2543 * @returns {Promise<WasmApiWalletBitcoinAddressLookupData>}
2545 lookupBitcoinAddress(email) {
2546 const ptr0 = passStringToWasm0(email, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2547 const len0 = WASM_VECTOR_LEN;
2548 const ret = wasm.wasmemailintegrationclient_lookupBitcoinAddress(this.__wbg_ptr, ptr0, len0);
2549 return takeObject(ret);
2552 * @param {string} email
2553 * @returns {Promise<void>}
2555 createBitcoinAddressesRequest(email) {
2556 const ptr0 = passStringToWasm0(email, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2557 const len0 = WASM_VECTOR_LEN;
2558 const ret = wasm.wasmemailintegrationclient_createBitcoinAddressesRequest(this.__wbg_ptr, ptr0, len0);
2559 return takeObject(ret);
2563 const WasmExchangeRateClientFinalization = (typeof FinalizationRegistry === 'undefined')
2564 ? { register: () => {}, unregister: () => {} }
2565 : new FinalizationRegistry(ptr => wasm.__wbg_wasmexchangerateclient_free(ptr >>> 0, 1));
2568 export class WasmExchangeRateClient {
2570 static __wrap(ptr) {
2571 ptr = ptr >>> 0;
2572 const obj = Object.create(WasmExchangeRateClient.prototype);
2573 obj.__wbg_ptr = ptr;
2574 WasmExchangeRateClientFinalization.register(obj, obj.__wbg_ptr, obj);
2575 return obj;
2578 __destroy_into_raw() {
2579 const ptr = this.__wbg_ptr;
2580 this.__wbg_ptr = 0;
2581 WasmExchangeRateClientFinalization.unregister(this);
2582 return ptr;
2585 free() {
2586 const ptr = this.__destroy_into_raw();
2587 wasm.__wbg_wasmexchangerateclient_free(ptr, 0);
2590 * @param {WasmFiatCurrencySymbol} fiat
2591 * @param {bigint | undefined} [time]
2592 * @returns {Promise<WasmApiExchangeRateData>}
2594 getExchangeRate(fiat, time) {
2595 const ret = wasm.wasmexchangerateclient_getExchangeRate(this.__wbg_ptr, addHeapObject(fiat), !isLikeNone(time), isLikeNone(time) ? BigInt(0) : time);
2596 return takeObject(ret);
2599 * @returns {Promise<WasmApiFiatCurrencies>}
2601 getAllFiatCurrencies() {
2602 const ret = wasm.wasmexchangerateclient_getAllFiatCurrencies(this.__wbg_ptr);
2603 return takeObject(ret);
2607 const WasmFiatCurrenciesAndProviderTuppleFinalization = (typeof FinalizationRegistry === 'undefined')
2608 ? { register: () => {}, unregister: () => {} }
2609 : new FinalizationRegistry(ptr => wasm.__wbg_wasmfiatcurrenciesandprovidertupple_free(ptr >>> 0, 1));
2612 export class WasmFiatCurrenciesAndProviderTupple {
2614 static __wrap(ptr) {
2615 ptr = ptr >>> 0;
2616 const obj = Object.create(WasmFiatCurrenciesAndProviderTupple.prototype);
2617 obj.__wbg_ptr = ptr;
2618 WasmFiatCurrenciesAndProviderTuppleFinalization.register(obj, obj.__wbg_ptr, obj);
2619 return obj;
2622 static __unwrap(jsValue) {
2623 if (!(jsValue instanceof WasmFiatCurrenciesAndProviderTupple)) {
2624 return 0;
2626 return jsValue.__destroy_into_raw();
2629 __destroy_into_raw() {
2630 const ptr = this.__wbg_ptr;
2631 this.__wbg_ptr = 0;
2632 WasmFiatCurrenciesAndProviderTuppleFinalization.unregister(this);
2633 return ptr;
2636 free() {
2637 const ptr = this.__destroy_into_raw();
2638 wasm.__wbg_wasmfiatcurrenciesandprovidertupple_free(ptr, 0);
2641 * @returns {WasmGatewayProvider}
2643 get 0() {
2644 const ret = wasm.__wbg_get_wasmcountriesandprovidertupple_0(this.__wbg_ptr);
2645 return takeObject(ret);
2648 * @param {WasmGatewayProvider} arg0
2650 set 0(arg0) {
2651 wasm.__wbg_set_wasmcountriesandprovidertupple_0(this.__wbg_ptr, addHeapObject(arg0));
2654 * @returns {WasmFiatCurrencies}
2656 get 1() {
2657 const ret = wasm.__wbg_get_wasmfiatcurrenciesandprovidertupple_1(this.__wbg_ptr);
2658 return takeObject(ret);
2661 * @param {WasmFiatCurrencies} arg0
2663 set 1(arg0) {
2664 wasm.__wbg_set_wasmfiatcurrenciesandprovidertupple_1(this.__wbg_ptr, addHeapObject(arg0));
2668 const WasmFiatCurrenciesByProviderFinalization = (typeof FinalizationRegistry === 'undefined')
2669 ? { register: () => {}, unregister: () => {} }
2670 : new FinalizationRegistry(ptr => wasm.__wbg_wasmfiatcurrenciesbyprovider_free(ptr >>> 0, 1));
2673 export class WasmFiatCurrenciesByProvider {
2675 static __wrap(ptr) {
2676 ptr = ptr >>> 0;
2677 const obj = Object.create(WasmFiatCurrenciesByProvider.prototype);
2678 obj.__wbg_ptr = ptr;
2679 WasmFiatCurrenciesByProviderFinalization.register(obj, obj.__wbg_ptr, obj);
2680 return obj;
2683 __destroy_into_raw() {
2684 const ptr = this.__wbg_ptr;
2685 this.__wbg_ptr = 0;
2686 WasmFiatCurrenciesByProviderFinalization.unregister(this);
2687 return ptr;
2690 free() {
2691 const ptr = this.__destroy_into_raw();
2692 wasm.__wbg_wasmfiatcurrenciesbyprovider_free(ptr, 0);
2695 * @returns {(WasmFiatCurrenciesAndProviderTupple)[]}
2697 get data() {
2698 try {
2699 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2700 wasm.__wbg_get_wasmfiatcurrenciesbyprovider_data(retptr, this.__wbg_ptr);
2701 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2702 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2703 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2704 wasm.__wbindgen_free(r0, r1 * 4, 4);
2705 return v1;
2706 } finally {
2707 wasm.__wbindgen_add_to_stack_pointer(16);
2711 * @param {(WasmFiatCurrenciesAndProviderTupple)[]} arg0
2713 set data(arg0) {
2714 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
2715 const len0 = WASM_VECTOR_LEN;
2716 wasm.__wbg_set_wasmfiatcurrenciesbyprovider_data(this.__wbg_ptr, ptr0, len0);
2720 const WasmInviteClientFinalization = (typeof FinalizationRegistry === 'undefined')
2721 ? { register: () => {}, unregister: () => {} }
2722 : new FinalizationRegistry(ptr => wasm.__wbg_wasminviteclient_free(ptr >>> 0, 1));
2725 export class WasmInviteClient {
2727 static __wrap(ptr) {
2728 ptr = ptr >>> 0;
2729 const obj = Object.create(WasmInviteClient.prototype);
2730 obj.__wbg_ptr = ptr;
2731 WasmInviteClientFinalization.register(obj, obj.__wbg_ptr, obj);
2732 return obj;
2735 __destroy_into_raw() {
2736 const ptr = this.__wbg_ptr;
2737 this.__wbg_ptr = 0;
2738 WasmInviteClientFinalization.unregister(this);
2739 return ptr;
2742 free() {
2743 const ptr = this.__destroy_into_raw();
2744 wasm.__wbg_wasminviteclient_free(ptr, 0);
2747 * @param {string} invitee_email
2748 * @param {string} inviter_address_id
2749 * @returns {Promise<void>}
2751 sendNewcomerInvite(invitee_email, inviter_address_id) {
2752 const ptr0 = passStringToWasm0(invitee_email, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2753 const len0 = WASM_VECTOR_LEN;
2754 const ptr1 = passStringToWasm0(inviter_address_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2755 const len1 = WASM_VECTOR_LEN;
2756 const ret = wasm.wasminviteclient_sendNewcomerInvite(this.__wbg_ptr, ptr0, len0, ptr1, len1);
2757 return takeObject(ret);
2760 * @param {string} invitee_email
2761 * @param {WasmInviteNotificationType} invite_notification_type
2762 * @param {string} inviter_address_id
2763 * @returns {Promise<number>}
2765 checkInviteStatus(invitee_email, invite_notification_type, inviter_address_id) {
2766 const ptr0 = passStringToWasm0(invitee_email, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2767 const len0 = WASM_VECTOR_LEN;
2768 const ptr1 = passStringToWasm0(inviter_address_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2769 const len1 = WASM_VECTOR_LEN;
2770 const ret = wasm.wasminviteclient_checkInviteStatus(this.__wbg_ptr, ptr0, len0, addHeapObject(invite_notification_type), ptr1, len1);
2771 return takeObject(ret);
2774 * @param {string} invitee_email
2775 * @param {string} inviter_address_id
2776 * @returns {Promise<void>}
2778 sendEmailIntegrationInvite(invitee_email, inviter_address_id) {
2779 const ptr0 = passStringToWasm0(invitee_email, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2780 const len0 = WASM_VECTOR_LEN;
2781 const ptr1 = passStringToWasm0(inviter_address_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2782 const len1 = WASM_VECTOR_LEN;
2783 const ret = wasm.wasminviteclient_sendEmailIntegrationInvite(this.__wbg_ptr, ptr0, len0, ptr1, len1);
2784 return takeObject(ret);
2787 * @returns {Promise<WasmRemainingMonthlyInvitations>}
2789 getRemainingMonthlyInvitation() {
2790 const ret = wasm.wasminviteclient_getRemainingMonthlyInvitation(this.__wbg_ptr);
2791 return takeObject(ret);
2795 const WasmLockTimeFinalization = (typeof FinalizationRegistry === 'undefined')
2796 ? { register: () => {}, unregister: () => {} }
2797 : new FinalizationRegistry(ptr => wasm.__wbg_wasmlocktime_free(ptr >>> 0, 1));
2800 export class WasmLockTime {
2802 static __wrap(ptr) {
2803 ptr = ptr >>> 0;
2804 const obj = Object.create(WasmLockTime.prototype);
2805 obj.__wbg_ptr = ptr;
2806 WasmLockTimeFinalization.register(obj, obj.__wbg_ptr, obj);
2807 return obj;
2810 __destroy_into_raw() {
2811 const ptr = this.__wbg_ptr;
2812 this.__wbg_ptr = 0;
2813 WasmLockTimeFinalization.unregister(this);
2814 return ptr;
2817 free() {
2818 const ptr = this.__destroy_into_raw();
2819 wasm.__wbg_wasmlocktime_free(ptr, 0);
2822 * @param {number} height
2823 * @returns {WasmLockTime}
2825 static fromHeight(height) {
2826 const ret = wasm.wasmlocktime_fromHeight(height);
2827 return WasmLockTime.__wrap(ret);
2830 * @param {number} seconds
2831 * @returns {WasmLockTime}
2833 static fromSeconds(seconds) {
2834 const ret = wasm.wasmlocktime_fromSeconds(seconds);
2835 return WasmLockTime.__wrap(ret);
2838 * @returns {boolean}
2840 isBlockHeight() {
2841 const ret = wasm.wasmlocktime_isBlockHeight(this.__wbg_ptr);
2842 return ret !== 0;
2845 * @returns {boolean}
2847 isBlockTime() {
2848 const ret = wasm.wasmlocktime_isBlockTime(this.__wbg_ptr);
2849 return ret !== 0;
2852 * @returns {number}
2854 toConsensusU32() {
2855 const ret = wasm.wasmlocktime_toConsensusU32(this.__wbg_ptr);
2856 return ret >>> 0;
2860 const WasmMigratedWalletAccountDataFinalization = (typeof FinalizationRegistry === 'undefined')
2861 ? { register: () => {}, unregister: () => {} }
2862 : new FinalizationRegistry(ptr => wasm.__wbg_wasmmigratedwalletaccountdata_free(ptr >>> 0, 1));
2865 export class WasmMigratedWalletAccountData {
2867 static __wrap(ptr) {
2868 ptr = ptr >>> 0;
2869 const obj = Object.create(WasmMigratedWalletAccountData.prototype);
2870 obj.__wbg_ptr = ptr;
2871 WasmMigratedWalletAccountDataFinalization.register(obj, obj.__wbg_ptr, obj);
2872 return obj;
2875 static __unwrap(jsValue) {
2876 if (!(jsValue instanceof WasmMigratedWalletAccountData)) {
2877 return 0;
2879 return jsValue.__destroy_into_raw();
2882 __destroy_into_raw() {
2883 const ptr = this.__wbg_ptr;
2884 this.__wbg_ptr = 0;
2885 WasmMigratedWalletAccountDataFinalization.unregister(this);
2886 return ptr;
2889 free() {
2890 const ptr = this.__destroy_into_raw();
2891 wasm.__wbg_wasmmigratedwalletaccountdata_free(ptr, 0);
2894 * @returns {WasmMigratedWalletAccount}
2896 get Data() {
2897 const ret = wasm.__wbg_get_wasmmigratedwalletaccountdata_Data(this.__wbg_ptr);
2898 return takeObject(ret);
2901 * @param {WasmMigratedWalletAccount} arg0
2903 set Data(arg0) {
2904 wasm.__wbg_set_wasmmigratedwalletaccountdata_Data(this.__wbg_ptr, addHeapObject(arg0));
2908 const WasmMigratedWalletAccountsFinalization = (typeof FinalizationRegistry === 'undefined')
2909 ? { register: () => {}, unregister: () => {} }
2910 : new FinalizationRegistry(ptr => wasm.__wbg_wasmmigratedwalletaccounts_free(ptr >>> 0, 1));
2913 export class WasmMigratedWalletAccounts {
2915 __destroy_into_raw() {
2916 const ptr = this.__wbg_ptr;
2917 this.__wbg_ptr = 0;
2918 WasmMigratedWalletAccountsFinalization.unregister(this);
2919 return ptr;
2922 free() {
2923 const ptr = this.__destroy_into_raw();
2924 wasm.__wbg_wasmmigratedwalletaccounts_free(ptr, 0);
2927 * @returns {(WasmMigratedWalletAccountData)[]}
2929 get 0() {
2930 try {
2931 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2932 wasm.__wbg_get_wasmmigratedwalletaccounts_0(retptr, this.__wbg_ptr);
2933 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2934 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2935 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2936 wasm.__wbindgen_free(r0, r1 * 4, 4);
2937 return v1;
2938 } finally {
2939 wasm.__wbindgen_add_to_stack_pointer(16);
2943 * @param {(WasmMigratedWalletAccountData)[]} arg0
2945 set 0(arg0) {
2946 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
2947 const len0 = WASM_VECTOR_LEN;
2948 wasm.__wbg_set_wasmmigratedwalletaccounts_0(this.__wbg_ptr, ptr0, len0);
2952 constructor() {
2953 const ret = wasm.wasmmigratedwalletaccounts_new();
2954 this.__wbg_ptr = ret >>> 0;
2955 WasmMigratedWalletAccountsFinalization.register(this, this.__wbg_ptr, this);
2956 return this;
2959 * @param {WasmMigratedWalletAccount} account_data
2961 push(account_data) {
2962 wasm.wasmmigratedwalletaccounts_push(this.__wbg_ptr, addHeapObject(account_data));
2966 const WasmMigratedWalletTransactionDataFinalization = (typeof FinalizationRegistry === 'undefined')
2967 ? { register: () => {}, unregister: () => {} }
2968 : new FinalizationRegistry(ptr => wasm.__wbg_wasmmigratedwallettransactiondata_free(ptr >>> 0, 1));
2971 export class WasmMigratedWalletTransactionData {
2973 static __wrap(ptr) {
2974 ptr = ptr >>> 0;
2975 const obj = Object.create(WasmMigratedWalletTransactionData.prototype);
2976 obj.__wbg_ptr = ptr;
2977 WasmMigratedWalletTransactionDataFinalization.register(obj, obj.__wbg_ptr, obj);
2978 return obj;
2981 static __unwrap(jsValue) {
2982 if (!(jsValue instanceof WasmMigratedWalletTransactionData)) {
2983 return 0;
2985 return jsValue.__destroy_into_raw();
2988 __destroy_into_raw() {
2989 const ptr = this.__wbg_ptr;
2990 this.__wbg_ptr = 0;
2991 WasmMigratedWalletTransactionDataFinalization.unregister(this);
2992 return ptr;
2995 free() {
2996 const ptr = this.__destroy_into_raw();
2997 wasm.__wbg_wasmmigratedwallettransactiondata_free(ptr, 0);
3000 * @returns {WasmMigratedWalletTransaction}
3002 get Data() {
3003 const ret = wasm.__wbg_get_wasmmigratedwallettransactiondata_Data(this.__wbg_ptr);
3004 return takeObject(ret);
3007 * @param {WasmMigratedWalletTransaction} arg0
3009 set Data(arg0) {
3010 wasm.__wbg_set_wasmmigratedwallettransactiondata_Data(this.__wbg_ptr, addHeapObject(arg0));
3014 const WasmMigratedWalletTransactionsFinalization = (typeof FinalizationRegistry === 'undefined')
3015 ? { register: () => {}, unregister: () => {} }
3016 : new FinalizationRegistry(ptr => wasm.__wbg_wasmmigratedwallettransactions_free(ptr >>> 0, 1));
3019 export class WasmMigratedWalletTransactions {
3021 __destroy_into_raw() {
3022 const ptr = this.__wbg_ptr;
3023 this.__wbg_ptr = 0;
3024 WasmMigratedWalletTransactionsFinalization.unregister(this);
3025 return ptr;
3028 free() {
3029 const ptr = this.__destroy_into_raw();
3030 wasm.__wbg_wasmmigratedwallettransactions_free(ptr, 0);
3033 * @returns {(WasmMigratedWalletTransactionData)[]}
3035 get 0() {
3036 try {
3037 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3038 wasm.__wbg_get_wasmmigratedwallettransactions_0(retptr, this.__wbg_ptr);
3039 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3040 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3041 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
3042 wasm.__wbindgen_free(r0, r1 * 4, 4);
3043 return v1;
3044 } finally {
3045 wasm.__wbindgen_add_to_stack_pointer(16);
3049 * @param {(WasmMigratedWalletTransactionData)[]} arg0
3051 set 0(arg0) {
3052 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
3053 const len0 = WASM_VECTOR_LEN;
3054 wasm.__wbg_set_wasmmigratedwallettransactions_0(this.__wbg_ptr, ptr0, len0);
3058 constructor() {
3059 const ret = wasm.wasmmigratedwallettransactions_new();
3060 this.__wbg_ptr = ret >>> 0;
3061 WasmMigratedWalletTransactionsFinalization.register(this, this.__wbg_ptr, this);
3062 return this;
3065 * @param {WasmMigratedWalletTransaction} account_data
3067 push(account_data) {
3068 wasm.wasmmigratedwallettransactions_push(this.__wbg_ptr, addHeapObject(account_data));
3072 const WasmMinimumFeesFinalization = (typeof FinalizationRegistry === 'undefined')
3073 ? { register: () => {}, unregister: () => {} }
3074 : new FinalizationRegistry(ptr => wasm.__wbg_wasmminimumfees_free(ptr >>> 0, 1));
3077 export class WasmMinimumFees {
3079 static __wrap(ptr) {
3080 ptr = ptr >>> 0;
3081 const obj = Object.create(WasmMinimumFees.prototype);
3082 obj.__wbg_ptr = ptr;
3083 WasmMinimumFeesFinalization.register(obj, obj.__wbg_ptr, obj);
3084 return obj;
3087 __destroy_into_raw() {
3088 const ptr = this.__wbg_ptr;
3089 this.__wbg_ptr = 0;
3090 WasmMinimumFeesFinalization.unregister(this);
3091 return ptr;
3094 free() {
3095 const ptr = this.__destroy_into_raw();
3096 wasm.__wbg_wasmminimumfees_free(ptr, 0);
3099 * @returns {number}
3101 get MinimumBroadcastFee() {
3102 const ret = wasm.__wbg_get_wasmminimumfees_MinimumBroadcastFee(this.__wbg_ptr);
3103 return ret;
3106 * @param {number} arg0
3108 set MinimumBroadcastFee(arg0) {
3109 wasm.__wbg_set_wasmminimumfees_MinimumBroadcastFee(this.__wbg_ptr, arg0);
3112 * @returns {number}
3114 get MinimumIncrementalFee() {
3115 const ret = wasm.__wbg_get_wasmminimumfees_MinimumIncrementalFee(this.__wbg_ptr);
3116 return ret;
3119 * @param {number} arg0
3121 set MinimumIncrementalFee(arg0) {
3122 wasm.__wbg_set_wasmminimumfees_MinimumIncrementalFee(this.__wbg_ptr, arg0);
3126 const WasmMnemonicFinalization = (typeof FinalizationRegistry === 'undefined')
3127 ? { register: () => {}, unregister: () => {} }
3128 : new FinalizationRegistry(ptr => wasm.__wbg_wasmmnemonic_free(ptr >>> 0, 1));
3131 export class WasmMnemonic {
3133 static __wrap(ptr) {
3134 ptr = ptr >>> 0;
3135 const obj = Object.create(WasmMnemonic.prototype);
3136 obj.__wbg_ptr = ptr;
3137 WasmMnemonicFinalization.register(obj, obj.__wbg_ptr, obj);
3138 return obj;
3141 __destroy_into_raw() {
3142 const ptr = this.__wbg_ptr;
3143 this.__wbg_ptr = 0;
3144 WasmMnemonicFinalization.unregister(this);
3145 return ptr;
3148 free() {
3149 const ptr = this.__destroy_into_raw();
3150 wasm.__wbg_wasmmnemonic_free(ptr, 0);
3153 * Generates a Mnemonic with a random entropy based on the given word
3154 * count.
3155 * @param {WasmWordCount} word_count
3157 constructor(word_count) {
3158 try {
3159 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3160 wasm.wasmmnemonic_new(retptr, word_count);
3161 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3162 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3163 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3164 if (r2) {
3165 throw takeObject(r1);
3167 this.__wbg_ptr = r0 >>> 0;
3168 WasmMnemonicFinalization.register(this, this.__wbg_ptr, this);
3169 return this;
3170 } finally {
3171 wasm.__wbindgen_add_to_stack_pointer(16);
3175 * Parse a Mnemonic with the given string.
3176 * @param {string} mnemonic
3177 * @returns {WasmMnemonic}
3179 static fromString(mnemonic) {
3180 try {
3181 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3182 const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3183 const len0 = WASM_VECTOR_LEN;
3184 wasm.wasmmnemonic_fromString(retptr, ptr0, len0);
3185 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3186 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3187 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3188 if (r2) {
3189 throw takeObject(r1);
3191 return WasmMnemonic.__wrap(r0);
3192 } finally {
3193 wasm.__wbindgen_add_to_stack_pointer(16);
3197 * Returns the Mnemonic as a string.
3198 * @returns {string}
3200 asString() {
3201 let deferred1_0;
3202 let deferred1_1;
3203 try {
3204 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3205 wasm.wasmmnemonic_asString(retptr, this.__wbg_ptr);
3206 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3207 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3208 deferred1_0 = r0;
3209 deferred1_1 = r1;
3210 return getStringFromWasm0(r0, r1);
3211 } finally {
3212 wasm.__wbindgen_add_to_stack_pointer(16);
3213 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3217 * @returns {(string)[]}
3219 asWords() {
3220 try {
3221 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3222 wasm.wasmmnemonic_asWords(retptr, this.__wbg_ptr);
3223 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3224 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3225 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
3226 wasm.__wbindgen_free(r0, r1 * 4, 4);
3227 return v1;
3228 } finally {
3229 wasm.__wbindgen_add_to_stack_pointer(16);
3234 const WasmNetworkClientFinalization = (typeof FinalizationRegistry === 'undefined')
3235 ? { register: () => {}, unregister: () => {} }
3236 : new FinalizationRegistry(ptr => wasm.__wbg_wasmnetworkclient_free(ptr >>> 0, 1));
3239 export class WasmNetworkClient {
3241 static __wrap(ptr) {
3242 ptr = ptr >>> 0;
3243 const obj = Object.create(WasmNetworkClient.prototype);
3244 obj.__wbg_ptr = ptr;
3245 WasmNetworkClientFinalization.register(obj, obj.__wbg_ptr, obj);
3246 return obj;
3249 __destroy_into_raw() {
3250 const ptr = this.__wbg_ptr;
3251 this.__wbg_ptr = 0;
3252 WasmNetworkClientFinalization.unregister(this);
3253 return ptr;
3256 free() {
3257 const ptr = this.__destroy_into_raw();
3258 wasm.__wbg_wasmnetworkclient_free(ptr, 0);
3261 * @returns {Promise<WasmNetwork>}
3263 getNetwork() {
3264 const ret = wasm.wasmnetworkclient_getNetwork(this.__wbg_ptr);
3265 return takeObject(ret);
3269 const WasmOnchainPaymentLinkFinalization = (typeof FinalizationRegistry === 'undefined')
3270 ? { register: () => {}, unregister: () => {} }
3271 : new FinalizationRegistry(ptr => wasm.__wbg_wasmonchainpaymentlink_free(ptr >>> 0, 1));
3274 export class WasmOnchainPaymentLink {
3276 static __wrap(ptr) {
3277 ptr = ptr >>> 0;
3278 const obj = Object.create(WasmOnchainPaymentLink.prototype);
3279 obj.__wbg_ptr = ptr;
3280 WasmOnchainPaymentLinkFinalization.register(obj, obj.__wbg_ptr, obj);
3281 return obj;
3284 __destroy_into_raw() {
3285 const ptr = this.__wbg_ptr;
3286 this.__wbg_ptr = 0;
3287 WasmOnchainPaymentLinkFinalization.unregister(this);
3288 return ptr;
3291 free() {
3292 const ptr = this.__destroy_into_raw();
3293 wasm.__wbg_wasmonchainpaymentlink_free(ptr, 0);
3296 * @returns {string | undefined}
3298 get address() {
3299 try {
3300 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3301 wasm.__wbg_get_wasmonchainpaymentlink_address(retptr, this.__wbg_ptr);
3302 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3303 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3304 let v1;
3305 if (r0 !== 0) {
3306 v1 = getStringFromWasm0(r0, r1).slice();
3307 wasm.__wbindgen_free(r0, r1 * 1, 1);
3309 return v1;
3310 } finally {
3311 wasm.__wbindgen_add_to_stack_pointer(16);
3315 * @param {string | undefined} [arg0]
3317 set address(arg0) {
3318 var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3319 var len0 = WASM_VECTOR_LEN;
3320 wasm.__wbg_set_wasmonchainpaymentlink_address(this.__wbg_ptr, ptr0, len0);
3323 * @returns {bigint | undefined}
3325 get amount() {
3326 try {
3327 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3328 wasm.__wbg_get_wasmonchainpaymentlink_amount(retptr, this.__wbg_ptr);
3329 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3330 var r2 = getDataViewMemory0().getBigInt64(retptr + 8 * 1, true);
3331 return r0 === 0 ? undefined : BigInt.asUintN(64, r2);
3332 } finally {
3333 wasm.__wbindgen_add_to_stack_pointer(16);
3337 * @param {bigint | undefined} [arg0]
3339 set amount(arg0) {
3340 wasm.__wbg_set_wasmonchainpaymentlink_amount(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3343 * @returns {string | undefined}
3345 get message() {
3346 try {
3347 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3348 wasm.__wbg_get_wasmonchainpaymentlink_message(retptr, this.__wbg_ptr);
3349 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3350 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3351 let v1;
3352 if (r0 !== 0) {
3353 v1 = getStringFromWasm0(r0, r1).slice();
3354 wasm.__wbindgen_free(r0, r1 * 1, 1);
3356 return v1;
3357 } finally {
3358 wasm.__wbindgen_add_to_stack_pointer(16);
3362 * @param {string | undefined} [arg0]
3364 set message(arg0) {
3365 var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3366 var len0 = WASM_VECTOR_LEN;
3367 wasm.__wbg_set_wasmonchainpaymentlink_message(this.__wbg_ptr, ptr0, len0);
3370 * @returns {string | undefined}
3372 get label() {
3373 try {
3374 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3375 wasm.__wbg_get_wasmonchainpaymentlink_label(retptr, this.__wbg_ptr);
3376 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3377 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3378 let v1;
3379 if (r0 !== 0) {
3380 v1 = getStringFromWasm0(r0, r1).slice();
3381 wasm.__wbindgen_free(r0, r1 * 1, 1);
3383 return v1;
3384 } finally {
3385 wasm.__wbindgen_add_to_stack_pointer(16);
3389 * @param {string | undefined} [arg0]
3391 set label(arg0) {
3392 var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3393 var len0 = WASM_VECTOR_LEN;
3394 wasm.__wbg_set_wasmonchainpaymentlink_label(this.__wbg_ptr, ptr0, len0);
3398 const WasmOutPointFinalization = (typeof FinalizationRegistry === 'undefined')
3399 ? { register: () => {}, unregister: () => {} }
3400 : new FinalizationRegistry(ptr => wasm.__wbg_wasmoutpoint_free(ptr >>> 0, 1));
3402 * Serialised Outpoint under the form <txid>:<index>
3404 export class WasmOutPoint {
3406 static __wrap(ptr) {
3407 ptr = ptr >>> 0;
3408 const obj = Object.create(WasmOutPoint.prototype);
3409 obj.__wbg_ptr = ptr;
3410 WasmOutPointFinalization.register(obj, obj.__wbg_ptr, obj);
3411 return obj;
3414 __destroy_into_raw() {
3415 const ptr = this.__wbg_ptr;
3416 this.__wbg_ptr = 0;
3417 WasmOutPointFinalization.unregister(this);
3418 return ptr;
3421 free() {
3422 const ptr = this.__destroy_into_raw();
3423 wasm.__wbg_wasmoutpoint_free(ptr, 0);
3426 * @returns {string}
3428 get 0() {
3429 let deferred1_0;
3430 let deferred1_1;
3431 try {
3432 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3433 wasm.__wbg_get_wasmoutpoint_0(retptr, this.__wbg_ptr);
3434 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3435 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3436 deferred1_0 = r0;
3437 deferred1_1 = r1;
3438 return getStringFromWasm0(r0, r1);
3439 } finally {
3440 wasm.__wbindgen_add_to_stack_pointer(16);
3441 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3445 * @param {string} arg0
3447 set 0(arg0) {
3448 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3449 const len0 = WASM_VECTOR_LEN;
3450 wasm.__wbg_set_wasmoutpoint_0(this.__wbg_ptr, ptr0, len0);
3453 * @param {string} str
3454 * @returns {WasmOutPoint}
3456 static fromString(str) {
3457 const ptr0 = passStringToWasm0(str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3458 const len0 = WASM_VECTOR_LEN;
3459 const ret = wasm.wasmoutpoint_fromString(ptr0, len0);
3460 return WasmOutPoint.__wrap(ret);
3464 const WasmPaymentGatewayClientFinalization = (typeof FinalizationRegistry === 'undefined')
3465 ? { register: () => {}, unregister: () => {} }
3466 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpaymentgatewayclient_free(ptr >>> 0, 1));
3469 export class WasmPaymentGatewayClient {
3471 static __wrap(ptr) {
3472 ptr = ptr >>> 0;
3473 const obj = Object.create(WasmPaymentGatewayClient.prototype);
3474 obj.__wbg_ptr = ptr;
3475 WasmPaymentGatewayClientFinalization.register(obj, obj.__wbg_ptr, obj);
3476 return obj;
3479 __destroy_into_raw() {
3480 const ptr = this.__wbg_ptr;
3481 this.__wbg_ptr = 0;
3482 WasmPaymentGatewayClientFinalization.unregister(this);
3483 return ptr;
3486 free() {
3487 const ptr = this.__destroy_into_raw();
3488 wasm.__wbg_wasmpaymentgatewayclient_free(ptr, 0);
3491 * @returns {Promise<WasmCountriesByProvider>}
3493 getCountries() {
3494 const ret = wasm.wasmpaymentgatewayclient_getCountries(this.__wbg_ptr);
3495 return takeObject(ret);
3498 * @returns {Promise<WasmFiatCurrenciesByProvider>}
3500 getFiatCurrencies() {
3501 const ret = wasm.wasmpaymentgatewayclient_getFiatCurrencies(this.__wbg_ptr);
3502 return takeObject(ret);
3505 * @param {string} fiat_currency
3506 * @returns {Promise<WasmPaymentMethodsByProvider>}
3508 getPaymentMethods(fiat_currency) {
3509 const ptr0 = passStringToWasm0(fiat_currency, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3510 const len0 = WASM_VECTOR_LEN;
3511 const ret = wasm.wasmpaymentgatewayclient_getPaymentMethods(this.__wbg_ptr, ptr0, len0);
3512 return takeObject(ret);
3515 * @param {number} amount
3516 * @param {string} fiat_currency
3517 * @param {WasmPaymentMethod | undefined} [payment_method]
3518 * @param {WasmGatewayProvider | undefined} [provider]
3519 * @returns {Promise<WasmQuotesByProvider>}
3521 getQuotes(amount, fiat_currency, payment_method, provider) {
3522 const ptr0 = passStringToWasm0(fiat_currency, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3523 const len0 = WASM_VECTOR_LEN;
3524 const ret = wasm.wasmpaymentgatewayclient_getQuotes(this.__wbg_ptr, amount, ptr0, len0, isLikeNone(payment_method) ? 0 : addHeapObject(payment_method), isLikeNone(provider) ? 0 : addHeapObject(provider));
3525 return takeObject(ret);
3528 * @param {string} amount
3529 * @param {string} btc_address
3530 * @param {string} fiat_currency
3531 * @param {WasmPaymentMethod} payment_method
3532 * @param {WasmGatewayProvider} provider
3533 * @param {string} order_id
3534 * @returns {Promise<string>}
3536 createOnRampCheckout(amount, btc_address, fiat_currency, payment_method, provider, order_id) {
3537 const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3538 const len0 = WASM_VECTOR_LEN;
3539 const ptr1 = passStringToWasm0(btc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3540 const len1 = WASM_VECTOR_LEN;
3541 const ptr2 = passStringToWasm0(fiat_currency, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3542 const len2 = WASM_VECTOR_LEN;
3543 const ptr3 = passStringToWasm0(order_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3544 const len3 = WASM_VECTOR_LEN;
3545 const ret = wasm.wasmpaymentgatewayclient_createOnRampCheckout(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, addHeapObject(payment_method), addHeapObject(provider), ptr3, len3);
3546 return takeObject(ret);
3549 * @param {string} url
3550 * @param {WasmGatewayProvider} provider
3551 * @returns {Promise<string>}
3553 signUrl(url, provider) {
3554 const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3555 const len0 = WASM_VECTOR_LEN;
3556 const ret = wasm.wasmpaymentgatewayclient_signUrl(this.__wbg_ptr, ptr0, len0, addHeapObject(provider));
3557 return takeObject(ret);
3560 * @param {WasmGatewayProvider} provider
3561 * @returns {Promise<string>}
3563 getPublicApiKey(provider) {
3564 const ret = wasm.wasmpaymentgatewayclient_getPublicApiKey(this.__wbg_ptr, addHeapObject(provider));
3565 return takeObject(ret);
3568 * @param {number} amount
3569 * @param {string} address
3570 * @param {string} fiat_currency
3571 * @param {WasmPaymentMethod} payment_method
3572 * @param {WasmGatewayProvider} provider
3573 * @returns {string}
3575 getCheckoutIframeSrc(amount, address, fiat_currency, payment_method, provider) {
3576 let deferred3_0;
3577 let deferred3_1;
3578 try {
3579 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3580 const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3581 const len0 = WASM_VECTOR_LEN;
3582 const ptr1 = passStringToWasm0(fiat_currency, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3583 const len1 = WASM_VECTOR_LEN;
3584 wasm.wasmpaymentgatewayclient_getCheckoutIframeSrc(retptr, this.__wbg_ptr, amount, ptr0, len0, ptr1, len1, addHeapObject(payment_method), addHeapObject(provider));
3585 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3586 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3587 deferred3_0 = r0;
3588 deferred3_1 = r1;
3589 return getStringFromWasm0(r0, r1);
3590 } finally {
3591 wasm.__wbindgen_add_to_stack_pointer(16);
3592 wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
3597 const WasmPaymentLinkFinalization = (typeof FinalizationRegistry === 'undefined')
3598 ? { register: () => {}, unregister: () => {} }
3599 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpaymentlink_free(ptr >>> 0, 1));
3602 export class WasmPaymentLink {
3604 static __wrap(ptr) {
3605 ptr = ptr >>> 0;
3606 const obj = Object.create(WasmPaymentLink.prototype);
3607 obj.__wbg_ptr = ptr;
3608 WasmPaymentLinkFinalization.register(obj, obj.__wbg_ptr, obj);
3609 return obj;
3612 __destroy_into_raw() {
3613 const ptr = this.__wbg_ptr;
3614 this.__wbg_ptr = 0;
3615 WasmPaymentLinkFinalization.unregister(this);
3616 return ptr;
3619 free() {
3620 const ptr = this.__destroy_into_raw();
3621 wasm.__wbg_wasmpaymentlink_free(ptr, 0);
3624 * @returns {string}
3626 toString() {
3627 let deferred1_0;
3628 let deferred1_1;
3629 try {
3630 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3631 wasm.wasmpaymentlink_toString(retptr, this.__wbg_ptr);
3632 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3633 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3634 deferred1_0 = r0;
3635 deferred1_1 = r1;
3636 return getStringFromWasm0(r0, r1);
3637 } finally {
3638 wasm.__wbindgen_add_to_stack_pointer(16);
3639 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3643 * @returns {string}
3645 toUri() {
3646 let deferred1_0;
3647 let deferred1_1;
3648 try {
3649 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3650 wasm.wasmpaymentlink_toUri(retptr, this.__wbg_ptr);
3651 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3652 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3653 deferred1_0 = r0;
3654 deferred1_1 = r1;
3655 return getStringFromWasm0(r0, r1);
3656 } finally {
3657 wasm.__wbindgen_add_to_stack_pointer(16);
3658 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3662 * @param {string} str
3663 * @param {WasmNetwork} network
3664 * @returns {WasmPaymentLink}
3666 static tryParse(str, network) {
3667 try {
3668 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3669 const ptr0 = passStringToWasm0(str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3670 const len0 = WASM_VECTOR_LEN;
3671 wasm.wasmpaymentlink_tryParse(retptr, ptr0, len0, network);
3672 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3673 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3674 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3675 if (r2) {
3676 throw takeObject(r1);
3678 return WasmPaymentLink.__wrap(r0);
3679 } finally {
3680 wasm.__wbindgen_add_to_stack_pointer(16);
3684 * @returns {WasmPaymentLinkKind}
3686 getKind() {
3687 const ret = wasm.wasmpaymentlink_getKind(this.__wbg_ptr);
3688 return ret;
3691 * @returns {WasmOnchainPaymentLink}
3693 assumeOnchain() {
3694 const ret = wasm.wasmpaymentlink_assumeOnchain(this.__wbg_ptr);
3695 return WasmOnchainPaymentLink.__wrap(ret);
3699 const WasmPaymentMethodsAndProviderTuppleFinalization = (typeof FinalizationRegistry === 'undefined')
3700 ? { register: () => {}, unregister: () => {} }
3701 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpaymentmethodsandprovidertupple_free(ptr >>> 0, 1));
3704 export class WasmPaymentMethodsAndProviderTupple {
3706 static __wrap(ptr) {
3707 ptr = ptr >>> 0;
3708 const obj = Object.create(WasmPaymentMethodsAndProviderTupple.prototype);
3709 obj.__wbg_ptr = ptr;
3710 WasmPaymentMethodsAndProviderTuppleFinalization.register(obj, obj.__wbg_ptr, obj);
3711 return obj;
3714 static __unwrap(jsValue) {
3715 if (!(jsValue instanceof WasmPaymentMethodsAndProviderTupple)) {
3716 return 0;
3718 return jsValue.__destroy_into_raw();
3721 __destroy_into_raw() {
3722 const ptr = this.__wbg_ptr;
3723 this.__wbg_ptr = 0;
3724 WasmPaymentMethodsAndProviderTuppleFinalization.unregister(this);
3725 return ptr;
3728 free() {
3729 const ptr = this.__destroy_into_raw();
3730 wasm.__wbg_wasmpaymentmethodsandprovidertupple_free(ptr, 0);
3733 * @returns {WasmGatewayProvider}
3735 get 0() {
3736 const ret = wasm.__wbg_get_wasmcountriesandprovidertupple_0(this.__wbg_ptr);
3737 return takeObject(ret);
3740 * @param {WasmGatewayProvider} arg0
3742 set 0(arg0) {
3743 wasm.__wbg_set_wasmcountriesandprovidertupple_0(this.__wbg_ptr, addHeapObject(arg0));
3746 * @returns {WasmPaymentMethods}
3748 get 1() {
3749 const ret = wasm.__wbg_get_wasmpaymentmethodsandprovidertupple_1(this.__wbg_ptr);
3750 return takeObject(ret);
3753 * @param {WasmPaymentMethods} arg0
3755 set 1(arg0) {
3756 wasm.__wbg_set_wasmpaymentmethodsandprovidertupple_1(this.__wbg_ptr, addHeapObject(arg0));
3760 const WasmPaymentMethodsByProviderFinalization = (typeof FinalizationRegistry === 'undefined')
3761 ? { register: () => {}, unregister: () => {} }
3762 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpaymentmethodsbyprovider_free(ptr >>> 0, 1));
3765 export class WasmPaymentMethodsByProvider {
3767 static __wrap(ptr) {
3768 ptr = ptr >>> 0;
3769 const obj = Object.create(WasmPaymentMethodsByProvider.prototype);
3770 obj.__wbg_ptr = ptr;
3771 WasmPaymentMethodsByProviderFinalization.register(obj, obj.__wbg_ptr, obj);
3772 return obj;
3775 __destroy_into_raw() {
3776 const ptr = this.__wbg_ptr;
3777 this.__wbg_ptr = 0;
3778 WasmPaymentMethodsByProviderFinalization.unregister(this);
3779 return ptr;
3782 free() {
3783 const ptr = this.__destroy_into_raw();
3784 wasm.__wbg_wasmpaymentmethodsbyprovider_free(ptr, 0);
3787 * @returns {(WasmPaymentMethodsAndProviderTupple)[]}
3789 get data() {
3790 try {
3791 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3792 wasm.__wbg_get_wasmpaymentmethodsbyprovider_data(retptr, this.__wbg_ptr);
3793 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3794 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3795 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
3796 wasm.__wbindgen_free(r0, r1 * 4, 4);
3797 return v1;
3798 } finally {
3799 wasm.__wbindgen_add_to_stack_pointer(16);
3803 * @param {(WasmPaymentMethodsAndProviderTupple)[]} arg0
3805 set data(arg0) {
3806 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
3807 const len0 = WASM_VECTOR_LEN;
3808 wasm.__wbg_set_wasmpaymentmethodsbyprovider_data(this.__wbg_ptr, ptr0, len0);
3812 const WasmPriceGraphClientFinalization = (typeof FinalizationRegistry === 'undefined')
3813 ? { register: () => {}, unregister: () => {} }
3814 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpricegraphclient_free(ptr >>> 0, 1));
3817 export class WasmPriceGraphClient {
3819 static __wrap(ptr) {
3820 ptr = ptr >>> 0;
3821 const obj = Object.create(WasmPriceGraphClient.prototype);
3822 obj.__wbg_ptr = ptr;
3823 WasmPriceGraphClientFinalization.register(obj, obj.__wbg_ptr, obj);
3824 return obj;
3827 __destroy_into_raw() {
3828 const ptr = this.__wbg_ptr;
3829 this.__wbg_ptr = 0;
3830 WasmPriceGraphClientFinalization.unregister(this);
3831 return ptr;
3834 free() {
3835 const ptr = this.__destroy_into_raw();
3836 wasm.__wbg_wasmpricegraphclient_free(ptr, 0);
3839 * @param {WasmFiatCurrencySymbol} fiat_currency
3840 * @param {WasmTimeframe} timeframe
3841 * @returns {Promise<WasmWrappedPriceGraph>}
3843 getGraphData(fiat_currency, timeframe) {
3844 const ret = wasm.wasmpricegraphclient_getGraphData(this.__wbg_ptr, addHeapObject(fiat_currency), addHeapObject(timeframe));
3845 return takeObject(ret);
3849 const WasmProtonWalletApiClientFinalization = (typeof FinalizationRegistry === 'undefined')
3850 ? { register: () => {}, unregister: () => {} }
3851 : new FinalizationRegistry(ptr => wasm.__wbg_wasmprotonwalletapiclient_free(ptr >>> 0, 1));
3854 export class WasmProtonWalletApiClient {
3856 __destroy_into_raw() {
3857 const ptr = this.__wbg_ptr;
3858 this.__wbg_ptr = 0;
3859 WasmProtonWalletApiClientFinalization.unregister(this);
3860 return ptr;
3863 free() {
3864 const ptr = this.__destroy_into_raw();
3865 wasm.__wbg_wasmprotonwalletapiclient_free(ptr, 0);
3868 * @param {string} app_version
3869 * @param {string} user_agent
3870 * @param {string | undefined} [uid_str]
3871 * @param {string | undefined} [origin]
3872 * @param {string | undefined} [url_prefix]
3874 constructor(app_version, user_agent, uid_str, origin, url_prefix) {
3875 try {
3876 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3877 const ptr0 = passStringToWasm0(app_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3878 const len0 = WASM_VECTOR_LEN;
3879 const ptr1 = passStringToWasm0(user_agent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3880 const len1 = WASM_VECTOR_LEN;
3881 var ptr2 = isLikeNone(uid_str) ? 0 : passStringToWasm0(uid_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3882 var len2 = WASM_VECTOR_LEN;
3883 var ptr3 = isLikeNone(origin) ? 0 : passStringToWasm0(origin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3884 var len3 = WASM_VECTOR_LEN;
3885 var ptr4 = isLikeNone(url_prefix) ? 0 : passStringToWasm0(url_prefix, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3886 var len4 = WASM_VECTOR_LEN;
3887 wasm.wasmprotonwalletapiclient_new(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
3888 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3889 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3890 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3891 if (r2) {
3892 throw takeObject(r1);
3894 this.__wbg_ptr = r0 >>> 0;
3895 WasmProtonWalletApiClientFinalization.register(this, this.__wbg_ptr, this);
3896 return this;
3897 } finally {
3898 wasm.__wbindgen_add_to_stack_pointer(16);
3902 * @returns {WasmApiClients}
3904 clients() {
3905 const ret = wasm.wasmprotonwalletapiclient_clients(this.__wbg_ptr);
3906 return WasmApiClients.__wrap(ret);
3910 const WasmPsbtFinalization = (typeof FinalizationRegistry === 'undefined')
3911 ? { register: () => {}, unregister: () => {} }
3912 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpsbt_free(ptr >>> 0, 1));
3915 export class WasmPsbt {
3917 static __wrap(ptr) {
3918 ptr = ptr >>> 0;
3919 const obj = Object.create(WasmPsbt.prototype);
3920 obj.__wbg_ptr = ptr;
3921 WasmPsbtFinalization.register(obj, obj.__wbg_ptr, obj);
3922 return obj;
3925 __destroy_into_raw() {
3926 const ptr = this.__wbg_ptr;
3927 this.__wbg_ptr = 0;
3928 WasmPsbtFinalization.unregister(this);
3929 return ptr;
3932 free() {
3933 const ptr = this.__destroy_into_raw();
3934 wasm.__wbg_wasmpsbt_free(ptr, 0);
3937 * @returns {(WasmPsbtRecipient)[]}
3939 get recipients() {
3940 try {
3941 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3942 wasm.__wbg_get_wasmpsbt_recipients(retptr, this.__wbg_ptr);
3943 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3944 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3945 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
3946 wasm.__wbindgen_free(r0, r1 * 4, 4);
3947 return v1;
3948 } finally {
3949 wasm.__wbindgen_add_to_stack_pointer(16);
3953 * @param {(WasmPsbtRecipient)[]} arg0
3955 set recipients(arg0) {
3956 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
3957 const len0 = WASM_VECTOR_LEN;
3958 wasm.__wbg_set_wasmpsbt_recipients(this.__wbg_ptr, ptr0, len0);
3961 * @returns {bigint}
3963 get total_fees() {
3964 const ret = wasm.__wbg_get_wasmpsbt_total_fees(this.__wbg_ptr);
3965 return BigInt.asUintN(64, ret);
3968 * @param {bigint} arg0
3970 set total_fees(arg0) {
3971 wasm.__wbg_set_wasmpsbt_total_fees(this.__wbg_ptr, arg0);
3974 * @param {WasmAccount} wasm_account
3975 * @param {WasmNetwork} network
3976 * @returns {Promise<WasmPsbt>}
3978 sign(wasm_account, network) {
3979 _assertClass(wasm_account, WasmAccount);
3980 const ret = wasm.wasmpsbt_sign(this.__wbg_ptr, wasm_account.__wbg_ptr, network);
3981 return takeObject(ret);
3984 * @returns {bigint}
3986 computeTxVbytes() {
3987 try {
3988 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3989 wasm.wasmpsbt_computeTxVbytes(retptr, this.__wbg_ptr);
3990 var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
3991 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3992 var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
3993 if (r3) {
3994 throw takeObject(r2);
3996 return BigInt.asUintN(64, r0);
3997 } finally {
3998 wasm.__wbindgen_add_to_stack_pointer(16);
4003 const WasmPsbtAndTxBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
4004 ? { register: () => {}, unregister: () => {} }
4005 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpsbtandtxbuilder_free(ptr >>> 0, 1));
4008 export class WasmPsbtAndTxBuilder {
4010 __destroy_into_raw() {
4011 const ptr = this.__wbg_ptr;
4012 this.__wbg_ptr = 0;
4013 WasmPsbtAndTxBuilderFinalization.unregister(this);
4014 return ptr;
4017 free() {
4018 const ptr = this.__destroy_into_raw();
4019 wasm.__wbg_wasmpsbtandtxbuilder_free(ptr, 0);
4022 * @returns {WasmPsbt}
4024 get 0() {
4025 const ret = wasm.__wbg_get_wasmpsbtandtxbuilder_0(this.__wbg_ptr);
4026 return WasmPsbt.__wrap(ret);
4029 * @param {WasmPsbt} arg0
4031 set 0(arg0) {
4032 _assertClass(arg0, WasmPsbt);
4033 var ptr0 = arg0.__destroy_into_raw();
4034 wasm.__wbg_set_wasmpsbtandtxbuilder_0(this.__wbg_ptr, ptr0);
4037 * @returns {WasmTxBuilder}
4039 get 1() {
4040 const ret = wasm.__wbg_get_wasmpsbtandtxbuilder_1(this.__wbg_ptr);
4041 return WasmTxBuilder.__wrap(ret);
4044 * @param {WasmTxBuilder} arg0
4046 set 1(arg0) {
4047 _assertClass(arg0, WasmTxBuilder);
4048 var ptr0 = arg0.__destroy_into_raw();
4049 wasm.__wbg_set_wasmpsbtandtxbuilder_1(this.__wbg_ptr, ptr0);
4053 const WasmPsbtRecipientFinalization = (typeof FinalizationRegistry === 'undefined')
4054 ? { register: () => {}, unregister: () => {} }
4055 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpsbtrecipient_free(ptr >>> 0, 1));
4058 export class WasmPsbtRecipient {
4060 static __wrap(ptr) {
4061 ptr = ptr >>> 0;
4062 const obj = Object.create(WasmPsbtRecipient.prototype);
4063 obj.__wbg_ptr = ptr;
4064 WasmPsbtRecipientFinalization.register(obj, obj.__wbg_ptr, obj);
4065 return obj;
4068 static __unwrap(jsValue) {
4069 if (!(jsValue instanceof WasmPsbtRecipient)) {
4070 return 0;
4072 return jsValue.__destroy_into_raw();
4075 __destroy_into_raw() {
4076 const ptr = this.__wbg_ptr;
4077 this.__wbg_ptr = 0;
4078 WasmPsbtRecipientFinalization.unregister(this);
4079 return ptr;
4082 free() {
4083 const ptr = this.__destroy_into_raw();
4084 wasm.__wbg_wasmpsbtrecipient_free(ptr, 0);
4087 * @returns {string}
4089 get 0() {
4090 let deferred1_0;
4091 let deferred1_1;
4092 try {
4093 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4094 wasm.__wbg_get_wasmpsbtrecipient_0(retptr, this.__wbg_ptr);
4095 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4096 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4097 deferred1_0 = r0;
4098 deferred1_1 = r1;
4099 return getStringFromWasm0(r0, r1);
4100 } finally {
4101 wasm.__wbindgen_add_to_stack_pointer(16);
4102 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
4106 * @param {string} arg0
4108 set 0(arg0) {
4109 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4110 const len0 = WASM_VECTOR_LEN;
4111 wasm.__wbg_set_wasmpsbtrecipient_0(this.__wbg_ptr, ptr0, len0);
4114 * @returns {bigint}
4116 get 1() {
4117 const ret = wasm.__wbg_get_wasmpsbt_total_fees(this.__wbg_ptr);
4118 return BigInt.asUintN(64, ret);
4121 * @param {bigint} arg0
4123 set 1(arg0) {
4124 wasm.__wbg_set_wasmpsbt_total_fees(this.__wbg_ptr, arg0);
4128 const WasmQuotesAndProviderTuppleFinalization = (typeof FinalizationRegistry === 'undefined')
4129 ? { register: () => {}, unregister: () => {} }
4130 : new FinalizationRegistry(ptr => wasm.__wbg_wasmquotesandprovidertupple_free(ptr >>> 0, 1));
4133 export class WasmQuotesAndProviderTupple {
4135 static __wrap(ptr) {
4136 ptr = ptr >>> 0;
4137 const obj = Object.create(WasmQuotesAndProviderTupple.prototype);
4138 obj.__wbg_ptr = ptr;
4139 WasmQuotesAndProviderTuppleFinalization.register(obj, obj.__wbg_ptr, obj);
4140 return obj;
4143 static __unwrap(jsValue) {
4144 if (!(jsValue instanceof WasmQuotesAndProviderTupple)) {
4145 return 0;
4147 return jsValue.__destroy_into_raw();
4150 __destroy_into_raw() {
4151 const ptr = this.__wbg_ptr;
4152 this.__wbg_ptr = 0;
4153 WasmQuotesAndProviderTuppleFinalization.unregister(this);
4154 return ptr;
4157 free() {
4158 const ptr = this.__destroy_into_raw();
4159 wasm.__wbg_wasmquotesandprovidertupple_free(ptr, 0);
4162 * @returns {WasmGatewayProvider}
4164 get 0() {
4165 const ret = wasm.__wbg_get_wasmcountriesandprovidertupple_0(this.__wbg_ptr);
4166 return takeObject(ret);
4169 * @param {WasmGatewayProvider} arg0
4171 set 0(arg0) {
4172 wasm.__wbg_set_wasmcountriesandprovidertupple_0(this.__wbg_ptr, addHeapObject(arg0));
4175 * @returns {WasmQuotes}
4177 get 1() {
4178 const ret = wasm.__wbg_get_wasmquotesandprovidertupple_1(this.__wbg_ptr);
4179 return takeObject(ret);
4182 * @param {WasmQuotes} arg0
4184 set 1(arg0) {
4185 wasm.__wbg_set_wasmquotesandprovidertupple_1(this.__wbg_ptr, addHeapObject(arg0));
4189 const WasmQuotesByProviderFinalization = (typeof FinalizationRegistry === 'undefined')
4190 ? { register: () => {}, unregister: () => {} }
4191 : new FinalizationRegistry(ptr => wasm.__wbg_wasmquotesbyprovider_free(ptr >>> 0, 1));
4194 export class WasmQuotesByProvider {
4196 static __wrap(ptr) {
4197 ptr = ptr >>> 0;
4198 const obj = Object.create(WasmQuotesByProvider.prototype);
4199 obj.__wbg_ptr = ptr;
4200 WasmQuotesByProviderFinalization.register(obj, obj.__wbg_ptr, obj);
4201 return obj;
4204 __destroy_into_raw() {
4205 const ptr = this.__wbg_ptr;
4206 this.__wbg_ptr = 0;
4207 WasmQuotesByProviderFinalization.unregister(this);
4208 return ptr;
4211 free() {
4212 const ptr = this.__destroy_into_raw();
4213 wasm.__wbg_wasmquotesbyprovider_free(ptr, 0);
4216 * @returns {(WasmQuotesAndProviderTupple)[]}
4218 get data() {
4219 try {
4220 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4221 wasm.__wbg_get_wasmquotesbyprovider_data(retptr, this.__wbg_ptr);
4222 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4223 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4224 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
4225 wasm.__wbindgen_free(r0, r1 * 4, 4);
4226 return v1;
4227 } finally {
4228 wasm.__wbindgen_add_to_stack_pointer(16);
4232 * @param {(WasmQuotesAndProviderTupple)[]} arg0
4234 set data(arg0) {
4235 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
4236 const len0 = WASM_VECTOR_LEN;
4237 wasm.__wbg_set_wasmquotesbyprovider_data(this.__wbg_ptr, ptr0, len0);
4241 const WasmRecipientFinalization = (typeof FinalizationRegistry === 'undefined')
4242 ? { register: () => {}, unregister: () => {} }
4243 : new FinalizationRegistry(ptr => wasm.__wbg_wasmrecipient_free(ptr >>> 0, 1));
4246 export class WasmRecipient {
4248 static __wrap(ptr) {
4249 ptr = ptr >>> 0;
4250 const obj = Object.create(WasmRecipient.prototype);
4251 obj.__wbg_ptr = ptr;
4252 WasmRecipientFinalization.register(obj, obj.__wbg_ptr, obj);
4253 return obj;
4256 __destroy_into_raw() {
4257 const ptr = this.__wbg_ptr;
4258 this.__wbg_ptr = 0;
4259 WasmRecipientFinalization.unregister(this);
4260 return ptr;
4263 free() {
4264 const ptr = this.__destroy_into_raw();
4265 wasm.__wbg_wasmrecipient_free(ptr, 0);
4268 * @returns {string}
4270 get 0() {
4271 let deferred1_0;
4272 let deferred1_1;
4273 try {
4274 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4275 wasm.__wbg_get_wasmrecipient_0(retptr, this.__wbg_ptr);
4276 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4277 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4278 deferred1_0 = r0;
4279 deferred1_1 = r1;
4280 return getStringFromWasm0(r0, r1);
4281 } finally {
4282 wasm.__wbindgen_add_to_stack_pointer(16);
4283 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
4287 * @param {string} arg0
4289 set 0(arg0) {
4290 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4291 const len0 = WASM_VECTOR_LEN;
4292 wasm.__wbg_set_wasmrecipient_0(this.__wbg_ptr, ptr0, len0);
4295 * @returns {string}
4297 get 1() {
4298 let deferred1_0;
4299 let deferred1_1;
4300 try {
4301 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4302 wasm.__wbg_get_wasmrecipient_1(retptr, this.__wbg_ptr);
4303 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4304 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4305 deferred1_0 = r0;
4306 deferred1_1 = r1;
4307 return getStringFromWasm0(r0, r1);
4308 } finally {
4309 wasm.__wbindgen_add_to_stack_pointer(16);
4310 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
4314 * @param {string} arg0
4316 set 1(arg0) {
4317 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4318 const len0 = WASM_VECTOR_LEN;
4319 wasm.__wbg_set_wasmrecipient_1(this.__wbg_ptr, ptr0, len0);
4322 * @returns {bigint}
4324 get 2() {
4325 const ret = wasm.__wbg_get_wasmrecipient_2(this.__wbg_ptr);
4326 return BigInt.asUintN(64, ret);
4329 * @param {bigint} arg0
4331 set 2(arg0) {
4332 wasm.__wbg_set_wasmrecipient_2(this.__wbg_ptr, arg0);
4336 const WasmRemainingMonthlyInvitationsFinalization = (typeof FinalizationRegistry === 'undefined')
4337 ? { register: () => {}, unregister: () => {} }
4338 : new FinalizationRegistry(ptr => wasm.__wbg_wasmremainingmonthlyinvitations_free(ptr >>> 0, 1));
4341 export class WasmRemainingMonthlyInvitations {
4343 static __wrap(ptr) {
4344 ptr = ptr >>> 0;
4345 const obj = Object.create(WasmRemainingMonthlyInvitations.prototype);
4346 obj.__wbg_ptr = ptr;
4347 WasmRemainingMonthlyInvitationsFinalization.register(obj, obj.__wbg_ptr, obj);
4348 return obj;
4351 __destroy_into_raw() {
4352 const ptr = this.__wbg_ptr;
4353 this.__wbg_ptr = 0;
4354 WasmRemainingMonthlyInvitationsFinalization.unregister(this);
4355 return ptr;
4358 free() {
4359 const ptr = this.__destroy_into_raw();
4360 wasm.__wbg_wasmremainingmonthlyinvitations_free(ptr, 0);
4363 * @returns {number}
4365 get Available() {
4366 const ret = wasm.__wbg_get_wasmremainingmonthlyinvitations_Available(this.__wbg_ptr);
4367 return ret;
4370 * @param {number} arg0
4372 set Available(arg0) {
4373 wasm.__wbg_set_wasmremainingmonthlyinvitations_Available(this.__wbg_ptr, arg0);
4376 * @returns {number}
4378 get Used() {
4379 const ret = wasm.__wbg_get_wasmremainingmonthlyinvitations_Used(this.__wbg_ptr);
4380 return ret;
4383 * @param {number} arg0
4385 set Used(arg0) {
4386 wasm.__wbg_set_wasmremainingmonthlyinvitations_Used(this.__wbg_ptr, arg0);
4390 const WasmScriptFinalization = (typeof FinalizationRegistry === 'undefined')
4391 ? { register: () => {}, unregister: () => {} }
4392 : new FinalizationRegistry(ptr => wasm.__wbg_wasmscript_free(ptr >>> 0, 1));
4395 export class WasmScript {
4397 static __wrap(ptr) {
4398 ptr = ptr >>> 0;
4399 const obj = Object.create(WasmScript.prototype);
4400 obj.__wbg_ptr = ptr;
4401 WasmScriptFinalization.register(obj, obj.__wbg_ptr, obj);
4402 return obj;
4405 __destroy_into_raw() {
4406 const ptr = this.__wbg_ptr;
4407 this.__wbg_ptr = 0;
4408 WasmScriptFinalization.unregister(this);
4409 return ptr;
4412 free() {
4413 const ptr = this.__destroy_into_raw();
4414 wasm.__wbg_wasmscript_free(ptr, 0);
4417 * @returns {Uint8Array}
4419 get 0() {
4420 try {
4421 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4422 wasm.__wbg_get_wasmscript_0(retptr, this.__wbg_ptr);
4423 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4424 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4425 var v1 = getArrayU8FromWasm0(r0, r1).slice();
4426 wasm.__wbindgen_free(r0, r1 * 1, 1);
4427 return v1;
4428 } finally {
4429 wasm.__wbindgen_add_to_stack_pointer(16);
4433 * @param {Uint8Array} arg0
4435 set 0(arg0) {
4436 const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
4437 const len0 = WASM_VECTOR_LEN;
4438 wasm.__wbg_set_wasmoutpoint_0(this.__wbg_ptr, ptr0, len0);
4441 * @param {WasmNetwork} network
4442 * @returns {WasmAddress}
4444 toAddress(network) {
4445 try {
4446 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4447 wasm.wasmscript_toAddress(retptr, this.__wbg_ptr, network);
4448 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4449 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4450 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4451 if (r2) {
4452 throw takeObject(r1);
4454 return WasmAddress.__wrap(r0);
4455 } finally {
4456 wasm.__wbindgen_add_to_stack_pointer(16);
4461 const WasmSequenceFinalization = (typeof FinalizationRegistry === 'undefined')
4462 ? { register: () => {}, unregister: () => {} }
4463 : new FinalizationRegistry(ptr => wasm.__wbg_wasmsequence_free(ptr >>> 0, 1));
4466 export class WasmSequence {
4468 static __wrap(ptr) {
4469 ptr = ptr >>> 0;
4470 const obj = Object.create(WasmSequence.prototype);
4471 obj.__wbg_ptr = ptr;
4472 WasmSequenceFinalization.register(obj, obj.__wbg_ptr, obj);
4473 return obj;
4476 __destroy_into_raw() {
4477 const ptr = this.__wbg_ptr;
4478 this.__wbg_ptr = 0;
4479 WasmSequenceFinalization.unregister(this);
4480 return ptr;
4483 free() {
4484 const ptr = this.__destroy_into_raw();
4485 wasm.__wbg_wasmsequence_free(ptr, 0);
4488 * @returns {number}
4490 get 0() {
4491 const ret = wasm.__wbg_get_wasmsequence_0(this.__wbg_ptr);
4492 return ret >>> 0;
4495 * @param {number} arg0
4497 set 0(arg0) {
4498 wasm.__wbg_set_wasmsequence_0(this.__wbg_ptr, arg0);
4502 const WasmSettingsClientFinalization = (typeof FinalizationRegistry === 'undefined')
4503 ? { register: () => {}, unregister: () => {} }
4504 : new FinalizationRegistry(ptr => wasm.__wbg_wasmsettingsclient_free(ptr >>> 0, 1));
4507 export class WasmSettingsClient {
4509 static __wrap(ptr) {
4510 ptr = ptr >>> 0;
4511 const obj = Object.create(WasmSettingsClient.prototype);
4512 obj.__wbg_ptr = ptr;
4513 WasmSettingsClientFinalization.register(obj, obj.__wbg_ptr, obj);
4514 return obj;
4517 __destroy_into_raw() {
4518 const ptr = this.__wbg_ptr;
4519 this.__wbg_ptr = 0;
4520 WasmSettingsClientFinalization.unregister(this);
4521 return ptr;
4524 free() {
4525 const ptr = this.__destroy_into_raw();
4526 wasm.__wbg_wasmsettingsclient_free(ptr, 0);
4529 * @returns {Promise<WasmUserSettingsData>}
4531 getUserSettings() {
4532 const ret = wasm.wasmsettingsclient_getUserSettings(this.__wbg_ptr);
4533 return takeObject(ret);
4536 * @param {WasmBitcoinUnit} symbol
4537 * @returns {Promise<WasmUserSettingsData>}
4539 setBitcoinUnit(symbol) {
4540 const ret = wasm.wasmsettingsclient_setBitcoinUnit(this.__wbg_ptr, addHeapObject(symbol));
4541 return takeObject(ret);
4544 * @param {WasmFiatCurrencySymbol} symbol
4545 * @returns {Promise<WasmUserSettingsData>}
4547 setFiatCurrency(symbol) {
4548 const ret = wasm.wasmsettingsclient_setFiatCurrency(this.__wbg_ptr, addHeapObject(symbol));
4549 return takeObject(ret);
4552 * @param {bigint} amount
4553 * @returns {Promise<WasmUserSettingsData>}
4555 setTwoFaThreshold(amount) {
4556 const ret = wasm.wasmsettingsclient_setTwoFaThreshold(this.__wbg_ptr, amount);
4557 return takeObject(ret);
4560 * @param {boolean} hide_empty_used_addresses
4561 * @returns {Promise<WasmUserSettingsData>}
4563 setHideEmptyUsedAddresses(hide_empty_used_addresses) {
4564 const ret = wasm.wasmsettingsclient_setHideEmptyUsedAddresses(this.__wbg_ptr, hide_empty_used_addresses);
4565 return takeObject(ret);
4568 * @param {WasmUserReceiveNotificationEmailTypes} email_type
4569 * @param {boolean} is_enable
4570 * @returns {Promise<WasmUserSettingsData>}
4572 setReceiveNotificationEmail(email_type, is_enable) {
4573 const ret = wasm.wasmsettingsclient_setReceiveNotificationEmail(this.__wbg_ptr, addHeapObject(email_type), is_enable);
4574 return takeObject(ret);
4577 * @returns {Promise<WasmUserSettingsData>}
4579 acceptTermsAndConditions() {
4580 const ret = wasm.wasmsettingsclient_acceptTermsAndConditions(this.__wbg_ptr);
4581 return takeObject(ret);
4584 * @returns {Promise<number>}
4586 getUserWalletEligibility() {
4587 const ret = wasm.wasmsettingsclient_getUserWalletEligibility(this.__wbg_ptr);
4588 return takeObject(ret);
4592 const WasmTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
4593 ? { register: () => {}, unregister: () => {} }
4594 : new FinalizationRegistry(ptr => wasm.__wbg_wasmtransaction_free(ptr >>> 0, 1));
4597 export class WasmTransaction {
4599 static __wrap(ptr) {
4600 ptr = ptr >>> 0;
4601 const obj = Object.create(WasmTransaction.prototype);
4602 obj.__wbg_ptr = ptr;
4603 WasmTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
4604 return obj;
4607 __destroy_into_raw() {
4608 const ptr = this.__wbg_ptr;
4609 this.__wbg_ptr = 0;
4610 WasmTransactionFinalization.unregister(this);
4611 return ptr;
4614 free() {
4615 const ptr = this.__destroy_into_raw();
4616 wasm.__wbg_wasmtransaction_free(ptr, 0);
4619 * @param {WasmPsbt} value
4620 * @returns {WasmTransaction}
4622 static fromPsbt(value) {
4623 try {
4624 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4625 _assertClass(value, WasmPsbt);
4626 var ptr0 = value.__destroy_into_raw();
4627 wasm.wasmtransaction_fromPsbt(retptr, ptr0);
4628 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4629 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4630 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4631 if (r2) {
4632 throw takeObject(r1);
4634 return WasmTransaction.__wrap(r0);
4635 } finally {
4636 wasm.__wbindgen_add_to_stack_pointer(16);
4641 const WasmTransactionDetailsArrayFinalization = (typeof FinalizationRegistry === 'undefined')
4642 ? { register: () => {}, unregister: () => {} }
4643 : new FinalizationRegistry(ptr => wasm.__wbg_wasmtransactiondetailsarray_free(ptr >>> 0, 1));
4646 export class WasmTransactionDetailsArray {
4648 static __wrap(ptr) {
4649 ptr = ptr >>> 0;
4650 const obj = Object.create(WasmTransactionDetailsArray.prototype);
4651 obj.__wbg_ptr = ptr;
4652 WasmTransactionDetailsArrayFinalization.register(obj, obj.__wbg_ptr, obj);
4653 return obj;
4656 __destroy_into_raw() {
4657 const ptr = this.__wbg_ptr;
4658 this.__wbg_ptr = 0;
4659 WasmTransactionDetailsArrayFinalization.unregister(this);
4660 return ptr;
4663 free() {
4664 const ptr = this.__destroy_into_raw();
4665 wasm.__wbg_wasmtransactiondetailsarray_free(ptr, 0);
4668 * @returns {(WasmTransactionDetailsData)[]}
4670 get 0() {
4671 try {
4672 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4673 wasm.__wbg_get_wasmtransactiondetailsarray_0(retptr, this.__wbg_ptr);
4674 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4675 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4676 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
4677 wasm.__wbindgen_free(r0, r1 * 4, 4);
4678 return v1;
4679 } finally {
4680 wasm.__wbindgen_add_to_stack_pointer(16);
4684 * @param {(WasmTransactionDetailsData)[]} arg0
4686 set 0(arg0) {
4687 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
4688 const len0 = WASM_VECTOR_LEN;
4689 wasm.__wbg_set_wasmtransactiondetailsarray_0(this.__wbg_ptr, ptr0, len0);
4693 const WasmTransactionDetailsDataFinalization = (typeof FinalizationRegistry === 'undefined')
4694 ? { register: () => {}, unregister: () => {} }
4695 : new FinalizationRegistry(ptr => wasm.__wbg_wasmtransactiondetailsdata_free(ptr >>> 0, 1));
4698 export class WasmTransactionDetailsData {
4700 static __wrap(ptr) {
4701 ptr = ptr >>> 0;
4702 const obj = Object.create(WasmTransactionDetailsData.prototype);
4703 obj.__wbg_ptr = ptr;
4704 WasmTransactionDetailsDataFinalization.register(obj, obj.__wbg_ptr, obj);
4705 return obj;
4708 static __unwrap(jsValue) {
4709 if (!(jsValue instanceof WasmTransactionDetailsData)) {
4710 return 0;
4712 return jsValue.__destroy_into_raw();
4715 __destroy_into_raw() {
4716 const ptr = this.__wbg_ptr;
4717 this.__wbg_ptr = 0;
4718 WasmTransactionDetailsDataFinalization.unregister(this);
4719 return ptr;
4722 free() {
4723 const ptr = this.__destroy_into_raw();
4724 wasm.__wbg_wasmtransactiondetailsdata_free(ptr, 0);
4727 * @returns {WasmTransactionDetails}
4729 get Data() {
4730 const ret = wasm.__wbg_get_wasmtransactiondetailsdata_Data(this.__wbg_ptr);
4731 return takeObject(ret);
4734 * @param {WasmTransactionDetails} arg0
4736 set Data(arg0) {
4737 wasm.__wbg_set_wasmtransactiondetailsdata_Data(this.__wbg_ptr, addHeapObject(arg0));
4741 const WasmTxBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
4742 ? { register: () => {}, unregister: () => {} }
4743 : new FinalizationRegistry(ptr => wasm.__wbg_wasmtxbuilder_free(ptr >>> 0, 1));
4746 export class WasmTxBuilder {
4748 static __wrap(ptr) {
4749 ptr = ptr >>> 0;
4750 const obj = Object.create(WasmTxBuilder.prototype);
4751 obj.__wbg_ptr = ptr;
4752 WasmTxBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
4753 return obj;
4756 __destroy_into_raw() {
4757 const ptr = this.__wbg_ptr;
4758 this.__wbg_ptr = 0;
4759 WasmTxBuilderFinalization.unregister(this);
4760 return ptr;
4763 free() {
4764 const ptr = this.__destroy_into_raw();
4765 wasm.__wbg_wasmtxbuilder_free(ptr, 0);
4769 constructor() {
4770 const ret = wasm.wasmtxbuilder_new();
4771 this.__wbg_ptr = ret >>> 0;
4772 WasmTxBuilderFinalization.register(this, this.__wbg_ptr, this);
4773 return this;
4776 * @param {WasmAccount} account
4777 * @returns {WasmTxBuilder}
4779 setAccount(account) {
4780 _assertClass(account, WasmAccount);
4781 const ret = wasm.wasmtxbuilder_setAccount(this.__wbg_ptr, account.__wbg_ptr);
4782 return WasmTxBuilder.__wrap(ret);
4785 * @returns {Promise<WasmTxBuilder>}
4787 constrainRecipientAmounts() {
4788 const ret = wasm.wasmtxbuilder_constrainRecipientAmounts(this.__wbg_ptr);
4789 return takeObject(ret);
4792 * @returns {WasmTxBuilder}
4794 clearRecipients() {
4795 const ret = wasm.wasmtxbuilder_clearRecipients(this.__wbg_ptr);
4796 return WasmTxBuilder.__wrap(ret);
4799 * @param {string | undefined} [address_str]
4800 * @param {bigint | undefined} [amount]
4801 * @returns {WasmTxBuilder}
4803 addRecipient(address_str, amount) {
4804 var ptr0 = isLikeNone(address_str) ? 0 : passStringToWasm0(address_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4805 var len0 = WASM_VECTOR_LEN;
4806 const ret = wasm.wasmtxbuilder_addRecipient(this.__wbg_ptr, ptr0, len0, !isLikeNone(amount), isLikeNone(amount) ? BigInt(0) : amount);
4807 return WasmTxBuilder.__wrap(ret);
4810 * @param {number} index
4811 * @returns {WasmTxBuilder}
4813 removeRecipient(index) {
4814 const ret = wasm.wasmtxbuilder_removeRecipient(this.__wbg_ptr, index);
4815 return WasmTxBuilder.__wrap(ret);
4818 * @param {number} index
4819 * @param {string | undefined} [address_str]
4820 * @param {bigint | undefined} [amount]
4821 * @returns {WasmTxBuilder}
4823 updateRecipient(index, address_str, amount) {
4824 try {
4825 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4826 var ptr0 = isLikeNone(address_str) ? 0 : passStringToWasm0(address_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4827 var len0 = WASM_VECTOR_LEN;
4828 wasm.wasmtxbuilder_updateRecipient(retptr, this.__wbg_ptr, index, ptr0, len0, !isLikeNone(amount), isLikeNone(amount) ? BigInt(0) : amount);
4829 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4830 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4831 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4832 if (r2) {
4833 throw takeObject(r1);
4835 return WasmTxBuilder.__wrap(r0);
4836 } finally {
4837 wasm.__wbindgen_add_to_stack_pointer(16);
4841 * @param {number} index
4842 * @returns {Promise<WasmTxBuilder>}
4844 updateRecipientAmountToMax(index) {
4845 const ret = wasm.wasmtxbuilder_updateRecipientAmountToMax(this.__wbg_ptr, index);
4846 return takeObject(ret);
4849 * @returns {(WasmRecipient)[]}
4851 getRecipients() {
4852 try {
4853 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4854 wasm.wasmtxbuilder_getRecipients(retptr, this.__wbg_ptr);
4855 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4856 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4857 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
4858 wasm.__wbindgen_free(r0, r1 * 4, 4);
4859 return v1;
4860 } finally {
4861 wasm.__wbindgen_add_to_stack_pointer(16);
4866 * * UTXOs
4868 * @param {WasmOutPoint} outpoint
4869 * @returns {WasmTxBuilder}
4871 addUtxoToSpend(outpoint) {
4872 try {
4873 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4874 _assertClass(outpoint, WasmOutPoint);
4875 var ptr0 = outpoint.__destroy_into_raw();
4876 wasm.wasmtxbuilder_addUtxoToSpend(retptr, this.__wbg_ptr, ptr0);
4877 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4878 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4879 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4880 if (r2) {
4881 throw takeObject(r1);
4883 return WasmTxBuilder.__wrap(r0);
4884 } finally {
4885 wasm.__wbindgen_add_to_stack_pointer(16);
4889 * @param {WasmOutPoint} outpoint
4890 * @returns {WasmTxBuilder}
4892 removeUtxoToSpend(outpoint) {
4893 try {
4894 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4895 _assertClass(outpoint, WasmOutPoint);
4896 var ptr0 = outpoint.__destroy_into_raw();
4897 wasm.wasmtxbuilder_removeUtxoToSpend(retptr, this.__wbg_ptr, ptr0);
4898 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4899 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4900 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4901 if (r2) {
4902 throw takeObject(r1);
4904 return WasmTxBuilder.__wrap(r0);
4905 } finally {
4906 wasm.__wbindgen_add_to_stack_pointer(16);
4910 * @returns {WasmTxBuilder}
4912 clearUtxosToSpend() {
4913 const ret = wasm.wasmtxbuilder_clearUtxosToSpend(this.__wbg_ptr);
4914 return WasmTxBuilder.__wrap(ret);
4917 * @returns {(WasmOutPoint)[]}
4919 getUtxosToSpend() {
4920 try {
4921 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4922 wasm.wasmtxbuilder_getUtxosToSpend(retptr, this.__wbg_ptr);
4923 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4924 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4925 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
4926 wasm.__wbindgen_free(r0, r1 * 4, 4);
4927 return v1;
4928 } finally {
4929 wasm.__wbindgen_add_to_stack_pointer(16);
4934 * * Coin selection enforcement
4936 * @param {WasmCoinSelection} coin_selection
4937 * @returns {WasmTxBuilder}
4939 setCoinSelection(coin_selection) {
4940 const ret = wasm.wasmtxbuilder_setCoinSelection(this.__wbg_ptr, coin_selection);
4941 return WasmTxBuilder.__wrap(ret);
4944 * @returns {WasmCoinSelection}
4946 getCoinSelection() {
4947 const ret = wasm.wasmtxbuilder_getCoinSelection(this.__wbg_ptr);
4948 return ret;
4952 * * RBF
4954 * @returns {WasmTxBuilder}
4956 enableRbf() {
4957 const ret = wasm.wasmtxbuilder_enableRbf(this.__wbg_ptr);
4958 return WasmTxBuilder.__wrap(ret);
4961 * @returns {WasmTxBuilder}
4963 disableRbf() {
4964 const ret = wasm.wasmtxbuilder_disableRbf(this.__wbg_ptr);
4965 return WasmTxBuilder.__wrap(ret);
4968 * @returns {boolean}
4970 getRbfEnabled() {
4971 const ret = wasm.wasmtxbuilder_getRbfEnabled(this.__wbg_ptr);
4972 return ret !== 0;
4976 * * Change policy
4978 * @param {WasmChangeSpendPolicy} change_policy
4979 * @returns {WasmTxBuilder}
4981 setChangePolicy(change_policy) {
4982 const ret = wasm.wasmtxbuilder_setChangePolicy(this.__wbg_ptr, change_policy);
4983 return WasmTxBuilder.__wrap(ret);
4986 * @returns {WasmChangeSpendPolicy}
4988 getChangePolicy() {
4989 const ret = wasm.wasmtxbuilder_getChangePolicy(this.__wbg_ptr);
4990 return ret;
4994 * * Fees
4996 * @param {bigint} sat_per_vb
4997 * @returns {WasmTxBuilder}
4999 setFeeRate(sat_per_vb) {
5000 const ret = wasm.wasmtxbuilder_setFeeRate(this.__wbg_ptr, sat_per_vb);
5001 return WasmTxBuilder.__wrap(ret);
5004 * @returns {bigint | undefined}
5006 getFeeRate() {
5007 try {
5008 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5009 wasm.wasmtxbuilder_getFeeRate(retptr, this.__wbg_ptr);
5010 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5011 var r2 = getDataViewMemory0().getBigInt64(retptr + 8 * 1, true);
5012 return r0 === 0 ? undefined : BigInt.asUintN(64, r2);
5013 } finally {
5014 wasm.__wbindgen_add_to_stack_pointer(16);
5019 * * Locktime
5021 * @param {WasmLockTime} locktime
5022 * @returns {WasmTxBuilder}
5024 addLocktime(locktime) {
5025 _assertClass(locktime, WasmLockTime);
5026 var ptr0 = locktime.__destroy_into_raw();
5027 const ret = wasm.wasmtxbuilder_addLocktime(this.__wbg_ptr, ptr0);
5028 return WasmTxBuilder.__wrap(ret);
5031 * @returns {WasmTxBuilder}
5033 removeLocktime() {
5034 const ret = wasm.wasmtxbuilder_removeLocktime(this.__wbg_ptr);
5035 return WasmTxBuilder.__wrap(ret);
5038 * @returns {WasmLockTime | undefined}
5040 getLocktime() {
5041 const ret = wasm.wasmtxbuilder_getLocktime(this.__wbg_ptr);
5042 return ret === 0 ? undefined : WasmLockTime.__wrap(ret);
5046 * * Final
5048 * @param {WasmNetwork} network
5049 * @returns {Promise<WasmPsbt>}
5051 createPsbt(network) {
5052 const ret = wasm.wasmtxbuilder_createPsbt(this.__wbg_ptr, network);
5053 return takeObject(ret);
5056 * @param {WasmNetwork} network
5057 * @param {boolean | undefined} [allow_dust]
5058 * @returns {Promise<WasmPsbt>}
5060 createDraftPsbt(network, allow_dust) {
5061 const ret = wasm.wasmtxbuilder_createDraftPsbt(this.__wbg_ptr, network, isLikeNone(allow_dust) ? 0xFFFFFF : allow_dust ? 1 : 0);
5062 return takeObject(ret);
5066 const WasmTxOutFinalization = (typeof FinalizationRegistry === 'undefined')
5067 ? { register: () => {}, unregister: () => {} }
5068 : new FinalizationRegistry(ptr => wasm.__wbg_wasmtxout_free(ptr >>> 0, 1));
5071 export class WasmTxOut {
5073 static __wrap(ptr) {
5074 ptr = ptr >>> 0;
5075 const obj = Object.create(WasmTxOut.prototype);
5076 obj.__wbg_ptr = ptr;
5077 WasmTxOutFinalization.register(obj, obj.__wbg_ptr, obj);
5078 return obj;
5081 __destroy_into_raw() {
5082 const ptr = this.__wbg_ptr;
5083 this.__wbg_ptr = 0;
5084 WasmTxOutFinalization.unregister(this);
5085 return ptr;
5088 free() {
5089 const ptr = this.__destroy_into_raw();
5090 wasm.__wbg_wasmtxout_free(ptr, 0);
5093 * @returns {bigint}
5095 get value() {
5096 const ret = wasm.__wbg_get_wasmtxout_value(this.__wbg_ptr);
5097 return BigInt.asUintN(64, ret);
5100 * @param {bigint} arg0
5102 set value(arg0) {
5103 wasm.__wbg_set_wasmtxout_value(this.__wbg_ptr, arg0);
5106 * @returns {WasmScript}
5108 get script_pubkey() {
5109 const ret = wasm.__wbg_get_wasmtxout_script_pubkey(this.__wbg_ptr);
5110 return WasmScript.__wrap(ret);
5113 * @param {WasmScript} arg0
5115 set script_pubkey(arg0) {
5116 _assertClass(arg0, WasmScript);
5117 var ptr0 = arg0.__destroy_into_raw();
5118 wasm.__wbg_set_wasmtxout_script_pubkey(this.__wbg_ptr, ptr0);
5121 * @returns {boolean}
5123 get is_mine() {
5124 const ret = wasm.__wbg_get_wasmtxout_is_mine(this.__wbg_ptr);
5125 return ret !== 0;
5128 * @param {boolean} arg0
5130 set is_mine(arg0) {
5131 wasm.__wbg_set_wasmtxout_is_mine(this.__wbg_ptr, arg0);
5134 * @returns {string | undefined}
5136 get address() {
5137 try {
5138 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5139 wasm.__wbg_get_wasmtxout_address(retptr, this.__wbg_ptr);
5140 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5141 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5142 let v1;
5143 if (r0 !== 0) {
5144 v1 = getStringFromWasm0(r0, r1).slice();
5145 wasm.__wbindgen_free(r0, r1 * 1, 1);
5147 return v1;
5148 } finally {
5149 wasm.__wbindgen_add_to_stack_pointer(16);
5153 * @param {string | undefined} [arg0]
5155 set address(arg0) {
5156 var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5157 var len0 = WASM_VECTOR_LEN;
5158 wasm.__wbg_set_wasmtxout_address(this.__wbg_ptr, ptr0, len0);
5162 const WasmUserSettingsDataFinalization = (typeof FinalizationRegistry === 'undefined')
5163 ? { register: () => {}, unregister: () => {} }
5164 : new FinalizationRegistry(ptr => wasm.__wbg_wasmusersettingsdata_free(ptr >>> 0, 1));
5167 export class WasmUserSettingsData {
5169 static __wrap(ptr) {
5170 ptr = ptr >>> 0;
5171 const obj = Object.create(WasmUserSettingsData.prototype);
5172 obj.__wbg_ptr = ptr;
5173 WasmUserSettingsDataFinalization.register(obj, obj.__wbg_ptr, obj);
5174 return obj;
5177 __destroy_into_raw() {
5178 const ptr = this.__wbg_ptr;
5179 this.__wbg_ptr = 0;
5180 WasmUserSettingsDataFinalization.unregister(this);
5181 return ptr;
5184 free() {
5185 const ptr = this.__destroy_into_raw();
5186 wasm.__wbg_wasmusersettingsdata_free(ptr, 0);
5189 * @returns {WasmUserSettings}
5191 get 0() {
5192 const ret = wasm.__wbg_get_wasmusersettingsdata_0(this.__wbg_ptr);
5193 return takeObject(ret);
5196 * @param {WasmUserSettings} arg0
5198 set 0(arg0) {
5199 wasm.__wbg_set_wasmusersettingsdata_0(this.__wbg_ptr, addHeapObject(arg0));
5203 const WasmUtxoFinalization = (typeof FinalizationRegistry === 'undefined')
5204 ? { register: () => {}, unregister: () => {} }
5205 : new FinalizationRegistry(ptr => wasm.__wbg_wasmutxo_free(ptr >>> 0, 1));
5208 export class WasmUtxo {
5210 static __wrap(ptr) {
5211 ptr = ptr >>> 0;
5212 const obj = Object.create(WasmUtxo.prototype);
5213 obj.__wbg_ptr = ptr;
5214 WasmUtxoFinalization.register(obj, obj.__wbg_ptr, obj);
5215 return obj;
5218 static __unwrap(jsValue) {
5219 if (!(jsValue instanceof WasmUtxo)) {
5220 return 0;
5222 return jsValue.__destroy_into_raw();
5225 __destroy_into_raw() {
5226 const ptr = this.__wbg_ptr;
5227 this.__wbg_ptr = 0;
5228 WasmUtxoFinalization.unregister(this);
5229 return ptr;
5232 free() {
5233 const ptr = this.__destroy_into_raw();
5234 wasm.__wbg_wasmutxo_free(ptr, 0);
5237 * @returns {bigint}
5239 get value() {
5240 const ret = wasm.__wbg_get_wasmtxout_value(this.__wbg_ptr);
5241 return BigInt.asUintN(64, ret);
5244 * @param {bigint} arg0
5246 set value(arg0) {
5247 wasm.__wbg_set_wasmtxout_value(this.__wbg_ptr, arg0);
5250 * @returns {WasmOutPoint}
5252 get outpoint() {
5253 const ret = wasm.__wbg_get_wasmutxo_outpoint(this.__wbg_ptr);
5254 return WasmOutPoint.__wrap(ret);
5257 * @param {WasmOutPoint} arg0
5259 set outpoint(arg0) {
5260 _assertClass(arg0, WasmOutPoint);
5261 var ptr0 = arg0.__destroy_into_raw();
5262 wasm.__wbg_set_wasmtxout_script_pubkey(this.__wbg_ptr, ptr0);
5265 * @returns {WasmScript}
5267 get script_pubkey() {
5268 const ret = wasm.__wbg_get_wasmutxo_script_pubkey(this.__wbg_ptr);
5269 return WasmScript.__wrap(ret);
5272 * @param {WasmScript} arg0
5274 set script_pubkey(arg0) {
5275 _assertClass(arg0, WasmScript);
5276 var ptr0 = arg0.__destroy_into_raw();
5277 wasm.__wbg_set_wasmutxo_script_pubkey(this.__wbg_ptr, ptr0);
5280 * @returns {WasmKeychainKind}
5282 get keychain() {
5283 const ret = wasm.__wbg_get_wasmutxo_keychain(this.__wbg_ptr);
5284 return ret;
5287 * @param {WasmKeychainKind} arg0
5289 set keychain(arg0) {
5290 wasm.__wbg_set_wasmutxo_keychain(this.__wbg_ptr, arg0);
5293 * @returns {boolean}
5295 get is_spent() {
5296 const ret = wasm.__wbg_get_wasmutxo_is_spent(this.__wbg_ptr);
5297 return ret !== 0;
5300 * @param {boolean} arg0
5302 set is_spent(arg0) {
5303 wasm.__wbg_set_wasmutxo_is_spent(this.__wbg_ptr, arg0);
5307 const WasmUtxoArrayFinalization = (typeof FinalizationRegistry === 'undefined')
5308 ? { register: () => {}, unregister: () => {} }
5309 : new FinalizationRegistry(ptr => wasm.__wbg_wasmutxoarray_free(ptr >>> 0, 1));
5312 export class WasmUtxoArray {
5314 static __wrap(ptr) {
5315 ptr = ptr >>> 0;
5316 const obj = Object.create(WasmUtxoArray.prototype);
5317 obj.__wbg_ptr = ptr;
5318 WasmUtxoArrayFinalization.register(obj, obj.__wbg_ptr, obj);
5319 return obj;
5322 __destroy_into_raw() {
5323 const ptr = this.__wbg_ptr;
5324 this.__wbg_ptr = 0;
5325 WasmUtxoArrayFinalization.unregister(this);
5326 return ptr;
5329 free() {
5330 const ptr = this.__destroy_into_raw();
5331 wasm.__wbg_wasmutxoarray_free(ptr, 0);
5334 * @returns {(WasmUtxo)[]}
5336 get 0() {
5337 try {
5338 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5339 wasm.__wbg_get_wasmutxoarray_0(retptr, this.__wbg_ptr);
5340 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5341 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5342 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
5343 wasm.__wbindgen_free(r0, r1 * 4, 4);
5344 return v1;
5345 } finally {
5346 wasm.__wbindgen_add_to_stack_pointer(16);
5350 * @param {(WasmUtxo)[]} arg0
5352 set 0(arg0) {
5353 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
5354 const len0 = WASM_VECTOR_LEN;
5355 wasm.__wbg_set_wasmutxoarray_0(this.__wbg_ptr, ptr0, len0);
5359 const WasmWalletFinalization = (typeof FinalizationRegistry === 'undefined')
5360 ? { register: () => {}, unregister: () => {} }
5361 : new FinalizationRegistry(ptr => wasm.__wbg_wasmwallet_free(ptr >>> 0, 1));
5364 export class WasmWallet {
5366 __destroy_into_raw() {
5367 const ptr = this.__wbg_ptr;
5368 this.__wbg_ptr = 0;
5369 WasmWalletFinalization.unregister(this);
5370 return ptr;
5373 free() {
5374 const ptr = this.__destroy_into_raw();
5375 wasm.__wbg_wasmwallet_free(ptr, 0);
5378 * @param {WasmNetwork} network
5379 * @param {string} bip39_mnemonic
5380 * @param {string | undefined} [bip38_passphrase]
5382 constructor(network, bip39_mnemonic, bip38_passphrase) {
5383 try {
5384 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5385 const ptr0 = passStringToWasm0(bip39_mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5386 const len0 = WASM_VECTOR_LEN;
5387 var ptr1 = isLikeNone(bip38_passphrase) ? 0 : passStringToWasm0(bip38_passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5388 var len1 = WASM_VECTOR_LEN;
5389 wasm.wasmwallet_new(retptr, network, ptr0, len0, ptr1, len1);
5390 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5391 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5392 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5393 if (r2) {
5394 throw takeObject(r1);
5396 this.__wbg_ptr = r0 >>> 0;
5397 WasmWalletFinalization.register(this, this.__wbg_ptr, this);
5398 return this;
5399 } finally {
5400 wasm.__wbindgen_add_to_stack_pointer(16);
5404 * @param {number} script_type
5405 * @param {string} derivation_path
5406 * @returns {WasmAccount}
5408 addAccount(script_type, derivation_path) {
5409 try {
5410 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5411 const ptr0 = passStringToWasm0(derivation_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5412 const len0 = WASM_VECTOR_LEN;
5413 wasm.wasmwallet_addAccount(retptr, this.__wbg_ptr, script_type, ptr0, len0);
5414 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5415 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5416 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5417 if (r2) {
5418 throw takeObject(r1);
5420 return WasmAccount.__wrap(r0);
5421 } finally {
5422 wasm.__wbindgen_add_to_stack_pointer(16);
5426 * @param {WasmProtonWalletApiClient} api_client
5427 * @returns {Promise<WasmDiscoveredAccounts>}
5429 discoverAccounts(api_client) {
5430 _assertClass(api_client, WasmProtonWalletApiClient);
5431 const ret = wasm.wasmwallet_discoverAccounts(this.__wbg_ptr, api_client.__wbg_ptr);
5432 return takeObject(ret);
5435 * @param {string} derivation_path
5436 * @returns {WasmAccount | undefined}
5438 getAccount(derivation_path) {
5439 const ptr0 = passStringToWasm0(derivation_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5440 const len0 = WASM_VECTOR_LEN;
5441 const ret = wasm.wasmwallet_getAccount(this.__wbg_ptr, ptr0, len0);
5442 return ret === 0 ? undefined : WasmAccount.__wrap(ret);
5445 * @returns {Promise<WasmBalanceWrapper>}
5447 getBalance() {
5448 const ret = wasm.wasmwallet_getBalance(this.__wbg_ptr);
5449 return takeObject(ret);
5452 * @param {WasmPagination | undefined} [pagination]
5453 * @param {WasmSortOrder | undefined} [sort]
5454 * @returns {Promise<WasmTransactionDetailsArray>}
5456 getTransactions(pagination, sort) {
5457 const ret = wasm.wasmwallet_getTransactions(this.__wbg_ptr, isLikeNone(pagination) ? 0 : addHeapObject(pagination), isLikeNone(sort) ? 2 : sort);
5458 return takeObject(ret);
5461 * @param {WasmDerivationPath} account_key
5462 * @param {string} txid
5463 * @returns {Promise<WasmTransactionDetailsData>}
5465 getTransaction(account_key, txid) {
5466 _assertClass(account_key, WasmDerivationPath);
5467 const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5468 const len0 = WASM_VECTOR_LEN;
5469 const ret = wasm.wasmwallet_getTransaction(this.__wbg_ptr, account_key.__wbg_ptr, ptr0, len0);
5470 return takeObject(ret);
5473 * @returns {string}
5475 getFingerprint() {
5476 let deferred1_0;
5477 let deferred1_1;
5478 try {
5479 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5480 wasm.wasmwallet_getFingerprint(retptr, this.__wbg_ptr);
5481 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5482 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5483 deferred1_0 = r0;
5484 deferred1_1 = r1;
5485 return getStringFromWasm0(r0, r1);
5486 } finally {
5487 wasm.__wbindgen_add_to_stack_pointer(16);
5488 wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
5493 clearStore() {
5494 try {
5495 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5496 wasm.wasmwallet_clearStore(retptr, this.__wbg_ptr);
5497 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5498 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5499 if (r1) {
5500 throw takeObject(r0);
5502 } finally {
5503 wasm.__wbindgen_add_to_stack_pointer(16);
5508 const WasmWalletAccountAddressDataFinalization = (typeof FinalizationRegistry === 'undefined')
5509 ? { register: () => {}, unregister: () => {} }
5510 : new FinalizationRegistry(ptr => wasm.__wbg_wasmwalletaccountaddressdata_free(ptr >>> 0, 1));
5513 export class WasmWalletAccountAddressData {
5515 static __wrap(ptr) {
5516 ptr = ptr >>> 0;
5517 const obj = Object.create(WasmWalletAccountAddressData.prototype);
5518 obj.__wbg_ptr = ptr;
5519 WasmWalletAccountAddressDataFinalization.register(obj, obj.__wbg_ptr, obj);
5520 return obj;
5523 static __unwrap(jsValue) {
5524 if (!(jsValue instanceof WasmWalletAccountAddressData)) {
5525 return 0;
5527 return jsValue.__destroy_into_raw();
5530 __destroy_into_raw() {
5531 const ptr = this.__wbg_ptr;
5532 this.__wbg_ptr = 0;
5533 WasmWalletAccountAddressDataFinalization.unregister(this);
5534 return ptr;
5537 free() {
5538 const ptr = this.__destroy_into_raw();
5539 wasm.__wbg_wasmwalletaccountaddressdata_free(ptr, 0);
5542 * @returns {WasmApiEmailAddress}
5544 get Data() {
5545 const ret = wasm.__wbg_get_wasmwalletaccountaddressdata_Data(this.__wbg_ptr);
5546 return takeObject(ret);
5549 * @param {WasmApiEmailAddress} arg0
5551 set Data(arg0) {
5552 wasm.__wbg_set_wasmwalletaccountaddressdata_Data(this.__wbg_ptr, addHeapObject(arg0));
5556 const WasmWalletAccountDataFinalization = (typeof FinalizationRegistry === 'undefined')
5557 ? { register: () => {}, unregister: () => {} }
5558 : new FinalizationRegistry(ptr => wasm.__wbg_wasmwalletaccountdata_free(ptr >>> 0, 1));
5561 export class WasmWalletAccountData {
5563 static __wrap(ptr) {
5564 ptr = ptr >>> 0;
5565 const obj = Object.create(WasmWalletAccountData.prototype);
5566 obj.__wbg_ptr = ptr;
5567 WasmWalletAccountDataFinalization.register(obj, obj.__wbg_ptr, obj);
5568 return obj;
5571 static __unwrap(jsValue) {
5572 if (!(jsValue instanceof WasmWalletAccountData)) {
5573 return 0;
5575 return jsValue.__destroy_into_raw();
5578 __destroy_into_raw() {
5579 const ptr = this.__wbg_ptr;
5580 this.__wbg_ptr = 0;
5581 WasmWalletAccountDataFinalization.unregister(this);
5582 return ptr;
5585 free() {
5586 const ptr = this.__destroy_into_raw();
5587 wasm.__wbg_wasmwalletaccountdata_free(ptr, 0);
5590 * @returns {WasmApiWalletAccount}
5592 get Data() {
5593 const ret = wasm.__wbg_get_wasmwalletaccountdata_Data(this.__wbg_ptr);
5594 return takeObject(ret);
5597 * @param {WasmApiWalletAccount} arg0
5599 set Data(arg0) {
5600 wasm.__wbg_set_wasmwalletaccountdata_Data(this.__wbg_ptr, addHeapObject(arg0));
5604 const WasmWalletClientFinalization = (typeof FinalizationRegistry === 'undefined')
5605 ? { register: () => {}, unregister: () => {} }
5606 : new FinalizationRegistry(ptr => wasm.__wbg_wasmwalletclient_free(ptr >>> 0, 1));
5609 export class WasmWalletClient {
5611 static __wrap(ptr) {
5612 ptr = ptr >>> 0;
5613 const obj = Object.create(WasmWalletClient.prototype);
5614 obj.__wbg_ptr = ptr;
5615 WasmWalletClientFinalization.register(obj, obj.__wbg_ptr, obj);
5616 return obj;
5619 __destroy_into_raw() {
5620 const ptr = this.__wbg_ptr;
5621 this.__wbg_ptr = 0;
5622 WasmWalletClientFinalization.unregister(this);
5623 return ptr;
5626 free() {
5627 const ptr = this.__destroy_into_raw();
5628 wasm.__wbg_wasmwalletclient_free(ptr, 0);
5631 * @returns {Promise<WasmApiWalletsData>}
5633 getWallets() {
5634 const ret = wasm.wasmwalletclient_getWallets(this.__wbg_ptr);
5635 return takeObject(ret);
5638 * @param {string} name
5639 * @param {boolean} is_imported
5640 * @param {number} wallet_type
5641 * @param {boolean} has_passphrase
5642 * @param {string} user_key_id
5643 * @param {string} wallet_key
5644 * @param {string} wallet_key_signature
5645 * @param {string | undefined} [mnemonic]
5646 * @param {string | undefined} [fingerprint]
5647 * @param {string | undefined} [public_key]
5648 * @param {boolean | undefined} [is_auto_created]
5649 * @returns {Promise<WasmApiWalletData>}
5651 createWallet(name, is_imported, wallet_type, has_passphrase, user_key_id, wallet_key, wallet_key_signature, mnemonic, fingerprint, public_key, is_auto_created) {
5652 const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5653 const len0 = WASM_VECTOR_LEN;
5654 const ptr1 = passStringToWasm0(user_key_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5655 const len1 = WASM_VECTOR_LEN;
5656 const ptr2 = passStringToWasm0(wallet_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5657 const len2 = WASM_VECTOR_LEN;
5658 const ptr3 = passStringToWasm0(wallet_key_signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5659 const len3 = WASM_VECTOR_LEN;
5660 var ptr4 = isLikeNone(mnemonic) ? 0 : passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5661 var len4 = WASM_VECTOR_LEN;
5662 var ptr5 = isLikeNone(fingerprint) ? 0 : passStringToWasm0(fingerprint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5663 var len5 = WASM_VECTOR_LEN;
5664 var ptr6 = isLikeNone(public_key) ? 0 : passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5665 var len6 = WASM_VECTOR_LEN;
5666 const ret = wasm.wasmwalletclient_createWallet(this.__wbg_ptr, ptr0, len0, is_imported, wallet_type, has_passphrase, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, isLikeNone(is_auto_created) ? 0xFFFFFF : is_auto_created ? 1 : 0);
5667 return takeObject(ret);
5670 * @param {string} wallet_id
5671 * @param {WasmMigratedWallet} migrated_wallet
5672 * @param {WasmMigratedWalletAccounts} migrated_wallet_accounts
5673 * @param {WasmMigratedWalletTransactions} migrated_wallet_transactions
5674 * @returns {Promise<void>}
5676 migrate(wallet_id, migrated_wallet, migrated_wallet_accounts, migrated_wallet_transactions) {
5677 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5678 const len0 = WASM_VECTOR_LEN;
5679 _assertClass(migrated_wallet_accounts, WasmMigratedWalletAccounts);
5680 var ptr1 = migrated_wallet_accounts.__destroy_into_raw();
5681 _assertClass(migrated_wallet_transactions, WasmMigratedWalletTransactions);
5682 var ptr2 = migrated_wallet_transactions.__destroy_into_raw();
5683 const ret = wasm.wasmwalletclient_migrate(this.__wbg_ptr, ptr0, len0, addHeapObject(migrated_wallet), ptr1, ptr2);
5684 return takeObject(ret);
5687 * @param {string} wallet_id
5688 * @param {string} name
5689 * @returns {Promise<void>}
5691 updateWalletName(wallet_id, name) {
5692 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5693 const len0 = WASM_VECTOR_LEN;
5694 const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5695 const len1 = WASM_VECTOR_LEN;
5696 const ret = wasm.wasmwalletclient_updateWalletName(this.__wbg_ptr, ptr0, len0, ptr1, len1);
5697 return takeObject(ret);
5700 * @param {string} wallet_id
5701 * @returns {Promise<void>}
5703 disableShowWalletRecovery(wallet_id) {
5704 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5705 const len0 = WASM_VECTOR_LEN;
5706 const ret = wasm.wasmwalletclient_disableShowWalletRecovery(this.__wbg_ptr, ptr0, len0);
5707 return takeObject(ret);
5710 * @param {string} wallet_id
5711 * @returns {Promise<void>}
5713 deleteWallet(wallet_id) {
5714 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5715 const len0 = WASM_VECTOR_LEN;
5716 const ret = wasm.wasmwalletclient_deleteWallet(this.__wbg_ptr, ptr0, len0);
5717 return takeObject(ret);
5720 * @param {string} wallet_id
5721 * @returns {Promise<WasmApiWalletAccounts>}
5723 getWalletAccounts(wallet_id) {
5724 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5725 const len0 = WASM_VECTOR_LEN;
5726 const ret = wasm.wasmwalletclient_getWalletAccounts(this.__wbg_ptr, ptr0, len0);
5727 return takeObject(ret);
5730 * @param {string} wallet_id
5731 * @param {string} wallet_account_id
5732 * @returns {Promise<WasmApiWalletAccountAddresses>}
5734 getWalletAccountAddresses(wallet_id, wallet_account_id) {
5735 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5736 const len0 = WASM_VECTOR_LEN;
5737 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5738 const len1 = WASM_VECTOR_LEN;
5739 const ret = wasm.wasmwalletclient_getWalletAccountAddresses(this.__wbg_ptr, ptr0, len0, ptr1, len1);
5740 return takeObject(ret);
5743 * @param {string} wallet_id
5744 * @param {WasmDerivationPath} derivation_path
5745 * @param {string} label
5746 * @param {WasmScriptType} script_type
5747 * @returns {Promise<WasmWalletAccountData>}
5749 createWalletAccount(wallet_id, derivation_path, label, script_type) {
5750 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5751 const len0 = WASM_VECTOR_LEN;
5752 _assertClass(derivation_path, WasmDerivationPath);
5753 var ptr1 = derivation_path.__destroy_into_raw();
5754 const ptr2 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5755 const len2 = WASM_VECTOR_LEN;
5756 const ret = wasm.wasmwalletclient_createWalletAccount(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, len2, script_type);
5757 return takeObject(ret);
5760 * @param {string} wallet_id
5761 * @param {string} wallet_account_id
5762 * @param {WasmFiatCurrencySymbol} symbol
5763 * @returns {Promise<WasmWalletAccountData>}
5765 updateWalletAccountFiatCurrency(wallet_id, wallet_account_id, symbol) {
5766 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5767 const len0 = WASM_VECTOR_LEN;
5768 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5769 const len1 = WASM_VECTOR_LEN;
5770 const ret = wasm.wasmwalletclient_updateWalletAccountFiatCurrency(this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(symbol));
5771 return takeObject(ret);
5774 * @param {string} wallet_id
5775 * @param {string} wallet_account_id
5776 * @param {string} label
5777 * @returns {Promise<WasmWalletAccountData>}
5779 updateWalletAccountLabel(wallet_id, wallet_account_id, label) {
5780 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5781 const len0 = WASM_VECTOR_LEN;
5782 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5783 const len1 = WASM_VECTOR_LEN;
5784 const ptr2 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5785 const len2 = WASM_VECTOR_LEN;
5786 const ret = wasm.wasmwalletclient_updateWalletAccountLabel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
5787 return takeObject(ret);
5790 * @param {string} wallet_id
5791 * @param {(string)[]} wallet_account_ids
5792 * @returns {Promise<WasmApiWalletAccounts>}
5794 updateWalletAccountsOrder(wallet_id, wallet_account_ids) {
5795 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5796 const len0 = WASM_VECTOR_LEN;
5797 const ptr1 = passArrayJsValueToWasm0(wallet_account_ids, wasm.__wbindgen_malloc);
5798 const len1 = WASM_VECTOR_LEN;
5799 const ret = wasm.wasmwalletclient_updateWalletAccountsOrder(this.__wbg_ptr, ptr0, len0, ptr1, len1);
5800 return takeObject(ret);
5803 * @param {string} wallet_id
5804 * @param {string} wallet_account_id
5805 * @param {number} last_used_index
5806 * @returns {Promise<WasmWalletAccountData>}
5808 updateWalletAccountLastUsedIndex(wallet_id, wallet_account_id, last_used_index) {
5809 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5810 const len0 = WASM_VECTOR_LEN;
5811 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5812 const len1 = WASM_VECTOR_LEN;
5813 const ret = wasm.wasmwalletclient_updateWalletAccountLastUsedIndex(this.__wbg_ptr, ptr0, len0, ptr1, len1, last_used_index);
5814 return takeObject(ret);
5817 * @param {string} wallet_id
5818 * @param {string} wallet_account_id
5819 * @param {string} email_address_id
5820 * @returns {Promise<WasmWalletAccountData>}
5822 addEmailAddress(wallet_id, wallet_account_id, email_address_id) {
5823 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5824 const len0 = WASM_VECTOR_LEN;
5825 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5826 const len1 = WASM_VECTOR_LEN;
5827 const ptr2 = passStringToWasm0(email_address_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5828 const len2 = WASM_VECTOR_LEN;
5829 const ret = wasm.wasmwalletclient_addEmailAddress(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
5830 return takeObject(ret);
5833 * @param {string} wallet_id
5834 * @param {string} wallet_account_id
5835 * @param {string} email_address_id
5836 * @returns {Promise<WasmWalletAccountData>}
5838 removeEmailAddress(wallet_id, wallet_account_id, email_address_id) {
5839 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5840 const len0 = WASM_VECTOR_LEN;
5841 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5842 const len1 = WASM_VECTOR_LEN;
5843 const ptr2 = passStringToWasm0(email_address_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5844 const len2 = WASM_VECTOR_LEN;
5845 const ret = wasm.wasmwalletclient_removeEmailAddress(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
5846 return takeObject(ret);
5849 * @param {string} wallet_id
5850 * @param {string} wallet_account_id
5851 * @returns {Promise<void>}
5853 deleteWalletAccount(wallet_id, wallet_account_id) {
5854 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5855 const len0 = WASM_VECTOR_LEN;
5856 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5857 const len1 = WASM_VECTOR_LEN;
5858 const ret = wasm.wasmwalletclient_deleteWalletAccount(this.__wbg_ptr, ptr0, len0, ptr1, len1);
5859 return takeObject(ret);
5862 * @param {string} wallet_id
5863 * @param {string | undefined} [wallet_account_id]
5864 * @param {(string)[] | undefined} [hashed_txids]
5865 * @returns {Promise<WasmApiWalletTransactions>}
5867 getWalletTransactions(wallet_id, wallet_account_id, hashed_txids) {
5868 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5869 const len0 = WASM_VECTOR_LEN;
5870 var ptr1 = isLikeNone(wallet_account_id) ? 0 : passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5871 var len1 = WASM_VECTOR_LEN;
5872 var ptr2 = isLikeNone(hashed_txids) ? 0 : passArrayJsValueToWasm0(hashed_txids, wasm.__wbindgen_malloc);
5873 var len2 = WASM_VECTOR_LEN;
5874 const ret = wasm.wasmwalletclient_getWalletTransactions(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
5875 return takeObject(ret);
5878 * @param {string} wallet_id
5879 * @param {string | undefined} [wallet_account_id]
5880 * @returns {Promise<WasmApiWalletTransactions>}
5882 getWalletTransactionsToHash(wallet_id, wallet_account_id) {
5883 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5884 const len0 = WASM_VECTOR_LEN;
5885 var ptr1 = isLikeNone(wallet_account_id) ? 0 : passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5886 var len1 = WASM_VECTOR_LEN;
5887 const ret = wasm.wasmwalletclient_getWalletTransactionsToHash(this.__wbg_ptr, ptr0, len0, ptr1, len1);
5888 return takeObject(ret);
5891 * @param {string} wallet_id
5892 * @param {string} wallet_account_id
5893 * @param {WasmCreateWalletTransactionPayload} payload
5894 * @returns {Promise<WasmApiWalletTransactionData>}
5896 createWalletTransaction(wallet_id, wallet_account_id, payload) {
5897 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5898 const len0 = WASM_VECTOR_LEN;
5899 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5900 const len1 = WASM_VECTOR_LEN;
5901 const ret = wasm.wasmwalletclient_createWalletTransaction(this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(payload));
5902 return takeObject(ret);
5905 * @param {string} wallet_id
5906 * @param {string} wallet_account_id
5907 * @param {string} wallet_transaction_id
5908 * @param {string} label
5909 * @returns {Promise<WasmApiWalletTransactionData>}
5911 updateWalletTransactionLabel(wallet_id, wallet_account_id, wallet_transaction_id, label) {
5912 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5913 const len0 = WASM_VECTOR_LEN;
5914 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5915 const len1 = WASM_VECTOR_LEN;
5916 const ptr2 = passStringToWasm0(wallet_transaction_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5917 const len2 = WASM_VECTOR_LEN;
5918 const ptr3 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5919 const len3 = WASM_VECTOR_LEN;
5920 const ret = wasm.wasmwalletclient_updateWalletTransactionLabel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
5921 return takeObject(ret);
5924 * @param {string} wallet_id
5925 * @param {string} wallet_account_id
5926 * @param {string} wallet_transaction_id
5927 * @param {string} hash_txid
5928 * @returns {Promise<WasmApiWalletTransactionData>}
5930 updateWalletTransactionHashedTxId(wallet_id, wallet_account_id, wallet_transaction_id, hash_txid) {
5931 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5932 const len0 = WASM_VECTOR_LEN;
5933 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5934 const len1 = WASM_VECTOR_LEN;
5935 const ptr2 = passStringToWasm0(wallet_transaction_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5936 const len2 = WASM_VECTOR_LEN;
5937 const ptr3 = passStringToWasm0(hash_txid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5938 const len3 = WASM_VECTOR_LEN;
5939 const ret = wasm.wasmwalletclient_updateWalletTransactionHashedTxId(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
5940 return takeObject(ret);
5943 * @param {string} wallet_id
5944 * @param {string} wallet_account_id
5945 * @param {string} wallet_transaction_id
5946 * @param {string} sender
5947 * @returns {Promise<WasmApiWalletTransactionData>}
5949 updateExternalWalletTransactionSender(wallet_id, wallet_account_id, wallet_transaction_id, sender) {
5950 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5951 const len0 = WASM_VECTOR_LEN;
5952 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5953 const len1 = WASM_VECTOR_LEN;
5954 const ptr2 = passStringToWasm0(wallet_transaction_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5955 const len2 = WASM_VECTOR_LEN;
5956 const ptr3 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5957 const len3 = WASM_VECTOR_LEN;
5958 const ret = wasm.wasmwalletclient_updateExternalWalletTransactionSender(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
5959 return takeObject(ret);
5962 * @param {string} wallet_id
5963 * @param {string} wallet_account_id
5964 * @param {string} wallet_transaction_id
5965 * @param {WasmWalletTransactionFlag} flag
5966 * @returns {Promise<WasmApiWalletTransactionData>}
5968 setWalletTransactionFlag(wallet_id, wallet_account_id, wallet_transaction_id, flag) {
5969 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5970 const len0 = WASM_VECTOR_LEN;
5971 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5972 const len1 = WASM_VECTOR_LEN;
5973 const ptr2 = passStringToWasm0(wallet_transaction_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5974 const len2 = WASM_VECTOR_LEN;
5975 const ret = wasm.wasmwalletclient_setWalletTransactionFlag(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, flag);
5976 return takeObject(ret);
5979 * @param {string} wallet_id
5980 * @param {string} wallet_account_id
5981 * @param {string} wallet_transaction_id
5982 * @param {WasmWalletTransactionFlag} flag
5983 * @returns {Promise<WasmApiWalletTransactionData>}
5985 deleteWalletTransactionFlag(wallet_id, wallet_account_id, wallet_transaction_id, flag) {
5986 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5987 const len0 = WASM_VECTOR_LEN;
5988 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5989 const len1 = WASM_VECTOR_LEN;
5990 const ptr2 = passStringToWasm0(wallet_transaction_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5991 const len2 = WASM_VECTOR_LEN;
5992 const ret = wasm.wasmwalletclient_deleteWalletTransactionFlag(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, flag);
5993 return takeObject(ret);
5996 * @param {string} wallet_id
5997 * @param {string} wallet_account_id
5998 * @param {string} wallet_transaction_id
5999 * @returns {Promise<void>}
6001 deleteWalletTransaction(wallet_id, wallet_account_id, wallet_transaction_id) {
6002 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6003 const len0 = WASM_VECTOR_LEN;
6004 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6005 const len1 = WASM_VECTOR_LEN;
6006 const ptr2 = passStringToWasm0(wallet_transaction_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6007 const len2 = WASM_VECTOR_LEN;
6008 const ret = wasm.wasmwalletclient_deleteWalletTransaction(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
6009 return takeObject(ret);
6013 const WasmWrappedPriceGraphFinalization = (typeof FinalizationRegistry === 'undefined')
6014 ? { register: () => {}, unregister: () => {} }
6015 : new FinalizationRegistry(ptr => wasm.__wbg_wasmwrappedpricegraph_free(ptr >>> 0, 1));
6018 export class WasmWrappedPriceGraph {
6020 static __wrap(ptr) {
6021 ptr = ptr >>> 0;
6022 const obj = Object.create(WasmWrappedPriceGraph.prototype);
6023 obj.__wbg_ptr = ptr;
6024 WasmWrappedPriceGraphFinalization.register(obj, obj.__wbg_ptr, obj);
6025 return obj;
6028 __destroy_into_raw() {
6029 const ptr = this.__wbg_ptr;
6030 this.__wbg_ptr = 0;
6031 WasmWrappedPriceGraphFinalization.unregister(this);
6032 return ptr;
6035 free() {
6036 const ptr = this.__destroy_into_raw();
6037 wasm.__wbg_wasmwrappedpricegraph_free(ptr, 0);
6040 * @returns {WasmPriceGraph}
6042 get data() {
6043 const ret = wasm.__wbg_get_wasmwrappedpricegraph_data(this.__wbg_ptr);
6044 return takeObject(ret);
6047 * @param {WasmPriceGraph} arg0
6049 set data(arg0) {
6050 wasm.__wbg_set_wasmwrappedpricegraph_data(this.__wbg_ptr, addHeapObject(arg0));
6054 export function __wbindgen_object_clone_ref(arg0) {
6055 const ret = getObject(arg0);
6056 return addHeapObject(ret);
6059 export function __wbindgen_object_drop_ref(arg0) {
6060 takeObject(arg0);
6063 export function __wbindgen_bigint_from_u64(arg0) {
6064 const ret = BigInt.asUintN(64, arg0);
6065 return addHeapObject(ret);
6068 export function __wbindgen_number_new(arg0) {
6069 const ret = arg0;
6070 return addHeapObject(ret);
6073 export function __wbg_wasmpsbt_new(arg0) {
6074 const ret = WasmPsbt.__wrap(arg0);
6075 return addHeapObject(ret);
6078 export function __wbg_wasmtxbuilder_new(arg0) {
6079 const ret = WasmTxBuilder.__wrap(arg0);
6080 return addHeapObject(ret);
6083 export function __wbg_wasmapifiatcurrencydata_new(arg0) {
6084 const ret = WasmApiFiatCurrencyData.__wrap(arg0);
6085 return addHeapObject(ret);
6088 export function __wbg_wasmapiwalletdata_new(arg0) {
6089 const ret = WasmApiWalletData.__wrap(arg0);
6090 return addHeapObject(ret);
6093 export function __wbg_wasmutxo_new(arg0) {
6094 const ret = WasmUtxo.__wrap(arg0);
6095 return addHeapObject(ret);
6098 export function __wbg_wasmpsbtrecipient_new(arg0) {
6099 const ret = WasmPsbtRecipient.__wrap(arg0);
6100 return addHeapObject(ret);
6103 export function __wbg_wasmremainingmonthlyinvitations_new(arg0) {
6104 const ret = WasmRemainingMonthlyInvitations.__wrap(arg0);
6105 return addHeapObject(ret);
6108 export function __wbg_wasmbalancewrapper_new(arg0) {
6109 const ret = WasmBalanceWrapper.__wrap(arg0);
6110 return addHeapObject(ret);
6113 export function __wbg_wasmtransactiondetailsdata_new(arg0) {
6114 const ret = WasmTransactionDetailsData.__wrap(arg0);
6115 return addHeapObject(ret);
6118 export function __wbg_wasmapiwallettransactiondata_new(arg0) {
6119 const ret = WasmApiWalletTransactionData.__wrap(arg0);
6120 return addHeapObject(ret);
6123 export function __wbg_wasmaddressdetailsdata_new(arg0) {
6124 const ret = WasmAddressDetailsData.__wrap(arg0);
6125 return addHeapObject(ret);
6128 export function __wbg_wasmapibitcoinaddresscreationpayloaddata_new(arg0) {
6129 const ret = WasmApiBitcoinAddressCreationPayloadData.__wrap(arg0);
6130 return addHeapObject(ret);
6133 export function __wbg_wasmrecipient_new(arg0) {
6134 const ret = WasmRecipient.__wrap(arg0);
6135 return addHeapObject(ret);
6138 export function __wbg_wasmusersettingsdata_new(arg0) {
6139 const ret = WasmUserSettingsData.__wrap(arg0);
6140 return addHeapObject(ret);
6143 export function __wbg_wasmapiexchangeratedata_new(arg0) {
6144 const ret = WasmApiExchangeRateData.__wrap(arg0);
6145 return addHeapObject(ret);
6148 export function __wbg_wasmapiwalletbitcoinaddressdata_new(arg0) {
6149 const ret = WasmApiWalletBitcoinAddressData.__wrap(arg0);
6150 return addHeapObject(ret);
6153 export function __wbg_wasmcountriesbyprovider_new(arg0) {
6154 const ret = WasmCountriesByProvider.__wrap(arg0);
6155 return addHeapObject(ret);
6158 export function __wbg_wasmapiwalletbitcoinaddresses_new(arg0) {
6159 const ret = WasmApiWalletBitcoinAddresses.__wrap(arg0);
6160 return addHeapObject(ret);
6163 export function __wbg_wasmapiwalletaccounts_new(arg0) {
6164 const ret = WasmApiWalletAccounts.__wrap(arg0);
6165 return addHeapObject(ret);
6168 export function __wbg_wasmwalletaccountdata_new(arg0) {
6169 const ret = WasmWalletAccountData.__wrap(arg0);
6170 return addHeapObject(ret);
6173 export function __wbg_wasmwrappedpricegraph_new(arg0) {
6174 const ret = WasmWrappedPriceGraph.__wrap(arg0);
6175 return addHeapObject(ret);
6178 export function __wbg_wasmmigratedwallettransactiondata_new(arg0) {
6179 const ret = WasmMigratedWalletTransactionData.__wrap(arg0);
6180 return addHeapObject(ret);
6183 export function __wbg_wasmutxoarray_new(arg0) {
6184 const ret = WasmUtxoArray.__wrap(arg0);
6185 return addHeapObject(ret);
6188 export function __wbg_wasmaddressinfo_new(arg0) {
6189 const ret = WasmAddressInfo.__wrap(arg0);
6190 return addHeapObject(ret);
6193 export function __wbg_wasmpaymentmethodsbyprovider_new(arg0) {
6194 const ret = WasmPaymentMethodsByProvider.__wrap(arg0);
6195 return addHeapObject(ret);
6198 export function __wbg_wasmtransactiondetailsarray_new(arg0) {
6199 const ret = WasmTransactionDetailsArray.__wrap(arg0);
6200 return addHeapObject(ret);
6203 export function __wbg_wasmapifiatcurrencies_new(arg0) {
6204 const ret = WasmApiFiatCurrencies.__wrap(arg0);
6205 return addHeapObject(ret);
6208 export function __wbg_wasmmigratedwalletaccountdata_new(arg0) {
6209 const ret = WasmMigratedWalletAccountData.__wrap(arg0);
6210 return addHeapObject(ret);
6213 export function __wbg_wasmapiwalletbitcoinaddresslookupdata_new(arg0) {
6214 const ret = WasmApiWalletBitcoinAddressLookupData.__wrap(arg0);
6215 return addHeapObject(ret);
6218 export function __wbg_wasmpaymentmethodsandprovidertupple_new(arg0) {
6219 const ret = WasmPaymentMethodsAndProviderTupple.__wrap(arg0);
6220 return addHeapObject(ret);
6223 export function __wbg_wasmoutpoint_new(arg0) {
6224 const ret = WasmOutPoint.__wrap(arg0);
6225 return addHeapObject(ret);
6228 export function __wbg_wasmdiscoveredaccount_new(arg0) {
6229 const ret = WasmDiscoveredAccount.__wrap(arg0);
6230 return addHeapObject(ret);
6233 export function __wbg_wasmdiscoveredaccounts_new(arg0) {
6234 const ret = WasmDiscoveredAccounts.__wrap(arg0);
6235 return addHeapObject(ret);
6238 export function __wbg_wasmcountriesandprovidertupple_new(arg0) {
6239 const ret = WasmCountriesAndProviderTupple.__wrap(arg0);
6240 return addHeapObject(ret);
6243 export function __wbg_wasmwalletaccountaddressdata_new(arg0) {
6244 const ret = WasmWalletAccountAddressData.__wrap(arg0);
6245 return addHeapObject(ret);
6248 export function __wbg_wasmquotesandprovidertupple_new(arg0) {
6249 const ret = WasmQuotesAndProviderTupple.__wrap(arg0);
6250 return addHeapObject(ret);
6253 export function __wbg_wasmquotesbyprovider_new(arg0) {
6254 const ret = WasmQuotesByProvider.__wrap(arg0);
6255 return addHeapObject(ret);
6258 export function __wbg_wasmapiwalletaccountaddresses_new(arg0) {
6259 const ret = WasmApiWalletAccountAddresses.__wrap(arg0);
6260 return addHeapObject(ret);
6263 export function __wbg_wasmapiwalletsdata_new(arg0) {
6264 const ret = WasmApiWalletsData.__wrap(arg0);
6265 return addHeapObject(ret);
6268 export function __wbg_wasmapiwallettransactions_new(arg0) {
6269 const ret = WasmApiWalletTransactions.__wrap(arg0);
6270 return addHeapObject(ret);
6273 export function __wbg_wasmaddressdetailsarray_new(arg0) {
6274 const ret = WasmAddressDetailsArray.__wrap(arg0);
6275 return addHeapObject(ret);
6278 export function __wbg_wasmfiatcurrenciesandprovidertupple_new(arg0) {
6279 const ret = WasmFiatCurrenciesAndProviderTupple.__wrap(arg0);
6280 return addHeapObject(ret);
6283 export function __wbg_wasmfiatcurrenciesbyprovider_new(arg0) {
6284 const ret = WasmFiatCurrenciesByProvider.__wrap(arg0);
6285 return addHeapObject(ret);
6288 export function __wbg_wasmminimumfees_new(arg0) {
6289 const ret = WasmMinimumFees.__wrap(arg0);
6290 return addHeapObject(ret);
6293 export function __wbg_wasmapiwalletbitcoinaddressdata_unwrap(arg0) {
6294 const ret = WasmApiWalletBitcoinAddressData.__unwrap(takeObject(arg0));
6295 return ret;
6298 export function __wbg_wasmapibitcoinaddresscreationpayloaddata_unwrap(arg0) {
6299 const ret = WasmApiBitcoinAddressCreationPayloadData.__unwrap(takeObject(arg0));
6300 return ret;
6303 export function __wbg_wasmapifiatcurrencydata_unwrap(arg0) {
6304 const ret = WasmApiFiatCurrencyData.__unwrap(takeObject(arg0));
6305 return ret;
6308 export function __wbg_wasmapiwalletdata_unwrap(arg0) {
6309 const ret = WasmApiWalletData.__unwrap(takeObject(arg0));
6310 return ret;
6313 export function __wbg_wasmwalletaccountdata_unwrap(arg0) {
6314 const ret = WasmWalletAccountData.__unwrap(takeObject(arg0));
6315 return ret;
6318 export function __wbg_wasmwalletaccountaddressdata_unwrap(arg0) {
6319 const ret = WasmWalletAccountAddressData.__unwrap(takeObject(arg0));
6320 return ret;
6323 export function __wbg_wasmmigratedwalletaccountdata_unwrap(arg0) {
6324 const ret = WasmMigratedWalletAccountData.__unwrap(takeObject(arg0));
6325 return ret;
6328 export function __wbg_wasmmigratedwallettransactiondata_unwrap(arg0) {
6329 const ret = WasmMigratedWalletTransactionData.__unwrap(takeObject(arg0));
6330 return ret;
6333 export function __wbg_wasmapiwallettransactiondata_unwrap(arg0) {
6334 const ret = WasmApiWalletTransactionData.__unwrap(takeObject(arg0));
6335 return ret;
6338 export function __wbg_wasmtransactiondetailsdata_unwrap(arg0) {
6339 const ret = WasmTransactionDetailsData.__unwrap(takeObject(arg0));
6340 return ret;
6343 export function __wbg_wasmutxo_unwrap(arg0) {
6344 const ret = WasmUtxo.__unwrap(takeObject(arg0));
6345 return ret;
6348 export function __wbindgen_string_new(arg0, arg1) {
6349 const ret = getStringFromWasm0(arg0, arg1);
6350 return addHeapObject(ret);
6353 export function __wbindgen_json_parse(arg0, arg1) {
6354 const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
6355 return addHeapObject(ret);
6358 export function __wbindgen_json_serialize(arg0, arg1) {
6359 const obj = getObject(arg1);
6360 const ret = JSON.stringify(obj === undefined ? null : obj);
6361 const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6362 const len1 = WASM_VECTOR_LEN;
6363 getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6364 getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6367 export function __wbg_wasmcountriesandprovidertupple_unwrap(arg0) {
6368 const ret = WasmCountriesAndProviderTupple.__unwrap(takeObject(arg0));
6369 return ret;
6372 export function __wbg_wasmfiatcurrenciesandprovidertupple_unwrap(arg0) {
6373 const ret = WasmFiatCurrenciesAndProviderTupple.__unwrap(takeObject(arg0));
6374 return ret;
6377 export function __wbg_wasmpaymentmethodsandprovidertupple_unwrap(arg0) {
6378 const ret = WasmPaymentMethodsAndProviderTupple.__unwrap(takeObject(arg0));
6379 return ret;
6382 export function __wbg_wasmquotesandprovidertupple_unwrap(arg0) {
6383 const ret = WasmQuotesAndProviderTupple.__unwrap(takeObject(arg0));
6384 return ret;
6387 export function __wbg_wasmpsbtrecipient_unwrap(arg0) {
6388 const ret = WasmPsbtRecipient.__unwrap(takeObject(arg0));
6389 return ret;
6392 export function __wbg_wasmdiscoveredaccount_unwrap(arg0) {
6393 const ret = WasmDiscoveredAccount.__unwrap(takeObject(arg0));
6394 return ret;
6397 export function __wbg_wasmaddressdetailsdata_unwrap(arg0) {
6398 const ret = WasmAddressDetailsData.__unwrap(takeObject(arg0));
6399 return ret;
6402 export function __wbindgen_error_new(arg0, arg1) {
6403 const ret = new Error(getStringFromWasm0(arg0, arg1));
6404 return addHeapObject(ret);
6407 export function __wbg_new_abda76e883ba8a5f() {
6408 const ret = new Error();
6409 return addHeapObject(ret);
6412 export function __wbg_stack_658279fe44541cf6(arg0, arg1) {
6413 const ret = getObject(arg1).stack;
6414 const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6415 const len1 = WASM_VECTOR_LEN;
6416 getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6417 getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6420 export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
6421 let deferred0_0;
6422 let deferred0_1;
6423 try {
6424 deferred0_0 = arg0;
6425 deferred0_1 = arg1;
6426 console.error(getStringFromWasm0(arg0, arg1));
6427 } finally {
6428 wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
6432 export function __wbindgen_is_object(arg0) {
6433 const val = getObject(arg0);
6434 const ret = typeof(val) === 'object' && val !== null;
6435 return ret;
6438 export function __wbindgen_string_get(arg0, arg1) {
6439 const obj = getObject(arg1);
6440 const ret = typeof(obj) === 'string' ? obj : undefined;
6441 var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6442 var len1 = WASM_VECTOR_LEN;
6443 getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6444 getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6447 export function __wbindgen_bigint_from_i64(arg0) {
6448 const ret = arg0;
6449 return addHeapObject(ret);
6452 export function __wbg_set_f975102236d3c502(arg0, arg1, arg2) {
6453 getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
6456 export function __wbindgen_cb_drop(arg0) {
6457 const obj = takeObject(arg0).original;
6458 if (obj.cnt-- == 1) {
6459 obj.a = 0;
6460 return true;
6462 const ret = false;
6463 return ret;
6466 export function __wbg_fetch_25e3a297f7b04639(arg0) {
6467 const ret = fetch(getObject(arg0));
6468 return addHeapObject(ret);
6471 export function __wbg_queueMicrotask_12a30234db4045d3(arg0) {
6472 queueMicrotask(getObject(arg0));
6475 export function __wbg_queueMicrotask_48421b3cc9052b68(arg0) {
6476 const ret = getObject(arg0).queueMicrotask;
6477 return addHeapObject(ret);
6480 export function __wbindgen_is_function(arg0) {
6481 const ret = typeof(getObject(arg0)) === 'function';
6482 return ret;
6485 export function __wbg_instanceof_Window_5012736c80a01584(arg0) {
6486 let result;
6487 try {
6488 result = getObject(arg0) instanceof Window;
6489 } catch (_) {
6490 result = false;
6492 const ret = result;
6493 return ret;
6496 export function __wbg_localStorage_90db5cb66e840248() { return handleError(function (arg0) {
6497 const ret = getObject(arg0).localStorage;
6498 return isLikeNone(ret) ? 0 : addHeapObject(ret);
6499 }, arguments) };
6501 export function __wbg_fetch_ba7fe179e527d942(arg0, arg1) {
6502 const ret = getObject(arg0).fetch(getObject(arg1));
6503 return addHeapObject(ret);
6506 export function __wbg_getItem_cab39762abab3e70() { return handleError(function (arg0, arg1, arg2, arg3) {
6507 const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3));
6508 var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6509 var len1 = WASM_VECTOR_LEN;
6510 getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6511 getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6512 }, arguments) };
6514 export function __wbg_set_e94f65b9d83f54b0() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
6515 getObject(arg0)[getStringFromWasm0(arg1, arg2)] = getStringFromWasm0(arg3, arg4);
6516 }, arguments) };
6518 export function __wbg_signal_41e46ccad44bb5e2(arg0) {
6519 const ret = getObject(arg0).signal;
6520 return addHeapObject(ret);
6523 export function __wbg_new_ebf2727385ee825c() { return handleError(function () {
6524 const ret = new AbortController();
6525 return addHeapObject(ret);
6526 }, arguments) };
6528 export function __wbg_abort_8659d889a7877ae3(arg0) {
6529 getObject(arg0).abort();
6532 export function __wbg_new_e27c93803e1acc42() { return handleError(function () {
6533 const ret = new Headers();
6534 return addHeapObject(ret);
6535 }, arguments) };
6537 export function __wbg_append_f3a4426bb50622c5() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
6538 getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
6539 }, arguments) };
6541 export function __wbg_setbody_734cb3d7ee8e6e96(arg0, arg1) {
6542 getObject(arg0).body = getObject(arg1);
6545 export function __wbg_setcredentials_2b67800db3f7b621(arg0, arg1) {
6546 getObject(arg0).credentials = ["omit","same-origin","include",][arg1];
6549 export function __wbg_setheaders_be10a5ab566fd06f(arg0, arg1) {
6550 getObject(arg0).headers = getObject(arg1);
6553 export function __wbg_setmethod_dc68a742c2db5c6a(arg0, arg1, arg2) {
6554 getObject(arg0).method = getStringFromWasm0(arg1, arg2);
6557 export function __wbg_setmode_a781aae2bd3df202(arg0, arg1) {
6558 getObject(arg0).mode = ["same-origin","no-cors","cors","navigate",][arg1];
6561 export function __wbg_setsignal_91c4e8ebd04eb935(arg0, arg1) {
6562 getObject(arg0).signal = getObject(arg1);
6565 export function __wbg_newwithstrandinit_a31c69e4cc337183() { return handleError(function (arg0, arg1, arg2) {
6566 const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
6567 return addHeapObject(ret);
6568 }, arguments) };
6570 export function __wbg_instanceof_Response_e91b7eb7c611a9ae(arg0) {
6571 let result;
6572 try {
6573 result = getObject(arg0) instanceof Response;
6574 } catch (_) {
6575 result = false;
6577 const ret = result;
6578 return ret;
6581 export function __wbg_url_1bf85c8abeb8c92d(arg0, arg1) {
6582 const ret = getObject(arg1).url;
6583 const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6584 const len1 = WASM_VECTOR_LEN;
6585 getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6586 getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6589 export function __wbg_status_ae8de515694c5c7c(arg0) {
6590 const ret = getObject(arg0).status;
6591 return ret;
6594 export function __wbg_headers_5e283e8345689121(arg0) {
6595 const ret = getObject(arg0).headers;
6596 return addHeapObject(ret);
6599 export function __wbg_arrayBuffer_a5fbad63cc7e663b() { return handleError(function (arg0) {
6600 const ret = getObject(arg0).arrayBuffer();
6601 return addHeapObject(ret);
6602 }, arguments) };
6604 export function __wbg_clearTimeout_76877dbc010e786d(arg0) {
6605 const ret = clearTimeout(takeObject(arg0));
6606 return addHeapObject(ret);
6609 export function __wbg_setTimeout_75cb9b6991a4031d() { return handleError(function (arg0, arg1) {
6610 const ret = setTimeout(getObject(arg0), arg1);
6611 return addHeapObject(ret);
6612 }, arguments) };
6614 export function __wbg_crypto_1d1f22824a6a080c(arg0) {
6615 const ret = getObject(arg0).crypto;
6616 return addHeapObject(ret);
6619 export function __wbg_process_4a72847cc503995b(arg0) {
6620 const ret = getObject(arg0).process;
6621 return addHeapObject(ret);
6624 export function __wbg_versions_f686565e586dd935(arg0) {
6625 const ret = getObject(arg0).versions;
6626 return addHeapObject(ret);
6629 export function __wbg_node_104a2ff8d6ea03a2(arg0) {
6630 const ret = getObject(arg0).node;
6631 return addHeapObject(ret);
6634 export function __wbindgen_is_string(arg0) {
6635 const ret = typeof(getObject(arg0)) === 'string';
6636 return ret;
6639 export function __wbg_require_cca90b1a94a0255b() { return handleError(function () {
6640 const ret = module.require;
6641 return addHeapObject(ret);
6642 }, arguments) };
6644 export function __wbg_msCrypto_eb05e62b530a1508(arg0) {
6645 const ret = getObject(arg0).msCrypto;
6646 return addHeapObject(ret);
6649 export function __wbg_randomFillSync_5c9c955aa56b6049() { return handleError(function (arg0, arg1) {
6650 getObject(arg0).randomFillSync(takeObject(arg1));
6651 }, arguments) };
6653 export function __wbg_getRandomValues_3aa56aa6edec874c() { return handleError(function (arg0, arg1) {
6654 getObject(arg0).getRandomValues(getObject(arg1));
6655 }, arguments) };
6657 export function __wbg_new_a220cf903aa02ca2() {
6658 const ret = new Array();
6659 return addHeapObject(ret);
6662 export function __wbg_newnoargs_76313bd6ff35d0f2(arg0, arg1) {
6663 const ret = new Function(getStringFromWasm0(arg0, arg1));
6664 return addHeapObject(ret);
6667 export function __wbg_new_8608a2b51a5f6737() {
6668 const ret = new Map();
6669 return addHeapObject(ret);
6672 export function __wbg_next_de3e9db4440638b2(arg0) {
6673 const ret = getObject(arg0).next;
6674 return addHeapObject(ret);
6677 export function __wbg_next_f9cb570345655b9a() { return handleError(function (arg0) {
6678 const ret = getObject(arg0).next();
6679 return addHeapObject(ret);
6680 }, arguments) };
6682 export function __wbg_done_bfda7aa8f252b39f(arg0) {
6683 const ret = getObject(arg0).done;
6684 return ret;
6687 export function __wbg_value_6d39332ab4788d86(arg0) {
6688 const ret = getObject(arg0).value;
6689 return addHeapObject(ret);
6692 export function __wbg_iterator_888179a48810a9fe() {
6693 const ret = Symbol.iterator;
6694 return addHeapObject(ret);
6697 export function __wbg_get_224d16597dbbfd96() { return handleError(function (arg0, arg1) {
6698 const ret = Reflect.get(getObject(arg0), getObject(arg1));
6699 return addHeapObject(ret);
6700 }, arguments) };
6702 export function __wbg_call_1084a111329e68ce() { return handleError(function (arg0, arg1) {
6703 const ret = getObject(arg0).call(getObject(arg1));
6704 return addHeapObject(ret);
6705 }, arguments) };
6707 export function __wbg_new_525245e2b9901204() {
6708 const ret = new Object();
6709 return addHeapObject(ret);
6712 export function __wbg_self_3093d5d1f7bcb682() { return handleError(function () {
6713 const ret = self.self;
6714 return addHeapObject(ret);
6715 }, arguments) };
6717 export function __wbg_window_3bcfc4d31bc012f8() { return handleError(function () {
6718 const ret = window.window;
6719 return addHeapObject(ret);
6720 }, arguments) };
6722 export function __wbg_globalThis_86b222e13bdf32ed() { return handleError(function () {
6723 const ret = globalThis.globalThis;
6724 return addHeapObject(ret);
6725 }, arguments) };
6727 export function __wbg_global_e5a3fe56f8be9485() { return handleError(function () {
6728 const ret = global.global;
6729 return addHeapObject(ret);
6730 }, arguments) };
6732 export function __wbindgen_is_undefined(arg0) {
6733 const ret = getObject(arg0) === undefined;
6734 return ret;
6737 export function __wbg_set_673dda6c73d19609(arg0, arg1, arg2) {
6738 getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
6741 export function __wbg_new_796382978dfd4fb0(arg0, arg1) {
6742 const ret = new Error(getStringFromWasm0(arg0, arg1));
6743 return addHeapObject(ret);
6746 export function __wbg_call_89af060b4e1523f2() { return handleError(function (arg0, arg1, arg2) {
6747 const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
6748 return addHeapObject(ret);
6749 }, arguments) };
6751 export function __wbg_set_49185437f0ab06f8(arg0, arg1, arg2) {
6752 const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
6753 return addHeapObject(ret);
6756 export function __wbg_now_b7a162010a9e75b4() {
6757 const ret = Date.now();
6758 return ret;
6761 export function __wbg_new_b85e72ed1bfd57f9(arg0, arg1) {
6762 try {
6763 var state0 = {a: arg0, b: arg1};
6764 var cb0 = (arg0, arg1) => {
6765 const a = state0.a;
6766 state0.a = 0;
6767 try {
6768 return __wbg_adapter_615(a, state0.b, arg0, arg1);
6769 } finally {
6770 state0.a = a;
6773 const ret = new Promise(cb0);
6774 return addHeapObject(ret);
6775 } finally {
6776 state0.a = state0.b = 0;
6780 export function __wbg_resolve_570458cb99d56a43(arg0) {
6781 const ret = Promise.resolve(getObject(arg0));
6782 return addHeapObject(ret);
6785 export function __wbg_then_95e6edc0f89b73b1(arg0, arg1) {
6786 const ret = getObject(arg0).then(getObject(arg1));
6787 return addHeapObject(ret);
6790 export function __wbg_then_876bb3c633745cc6(arg0, arg1, arg2) {
6791 const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
6792 return addHeapObject(ret);
6795 export function __wbg_buffer_b7b08af79b0b0974(arg0) {
6796 const ret = getObject(arg0).buffer;
6797 return addHeapObject(ret);
6800 export function __wbg_newwithbyteoffsetandlength_8a2cb9ca96b27ec9(arg0, arg1, arg2) {
6801 const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
6802 return addHeapObject(ret);
6805 export function __wbg_new_ea1883e1e5e86686(arg0) {
6806 const ret = new Uint8Array(getObject(arg0));
6807 return addHeapObject(ret);
6810 export function __wbg_set_d1e79e2388520f18(arg0, arg1, arg2) {
6811 getObject(arg0).set(getObject(arg1), arg2 >>> 0);
6814 export function __wbg_length_8339fcf5d8ecd12e(arg0) {
6815 const ret = getObject(arg0).length;
6816 return ret;
6819 export function __wbg_newwithlength_ec548f448387c968(arg0) {
6820 const ret = new Uint8Array(arg0 >>> 0);
6821 return addHeapObject(ret);
6824 export function __wbg_subarray_7c2e3576afe181d1(arg0, arg1, arg2) {
6825 const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
6826 return addHeapObject(ret);
6829 export function __wbg_has_4bfbc01db38743f7() { return handleError(function (arg0, arg1) {
6830 const ret = Reflect.has(getObject(arg0), getObject(arg1));
6831 return ret;
6832 }, arguments) };
6834 export function __wbg_stringify_bbf45426c92a6bf5() { return handleError(function (arg0) {
6835 const ret = JSON.stringify(getObject(arg0));
6836 return addHeapObject(ret);
6837 }, arguments) };
6839 export function __wbindgen_debug_string(arg0, arg1) {
6840 const ret = debugString(getObject(arg1));
6841 const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6842 const len1 = WASM_VECTOR_LEN;
6843 getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6844 getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6847 export function __wbindgen_throw(arg0, arg1) {
6848 throw new Error(getStringFromWasm0(arg0, arg1));
6851 export function __wbindgen_memory() {
6852 const ret = wasm.memory;
6853 return addHeapObject(ret);
6856 export function __wbindgen_closure_wrapper11100(arg0, arg1, arg2) {
6857 const ret = makeMutClosure(arg0, arg1, 1833, __wbg_adapter_38);
6858 return addHeapObject(ret);
6861 export function __wbindgen_closure_wrapper11733(arg0, arg1, arg2) {
6862 const ret = makeMutClosure(arg0, arg1, 1922, __wbg_adapter_41);
6863 return addHeapObject(ret);