2 export function __wbg_set_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 dropObject(idx) {
16 if (idx < 132) return;
17 heap[idx] = heap_next;
21 function takeObject(idx) {
22 const ret = getObject(idx);
27 function addHeapObject(obj) {
28 if (heap_next === heap.length) heap.push(heap.length + 1);
29 const idx = heap_next;
30 heap_next = heap[idx];
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) {
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);
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;
86 let ptr = malloc(len, 1) >>> 0;
88 const mem = getUint8ArrayMemory0();
92 for (; offset < len; offset++) {
93 const code = arg.charCodeAt(offset);
94 if (code > 0x7F) break;
95 mem[ptr + offset] = code;
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;
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) {
129 const type = typeof val;
130 if (type == 'number' || type == 'boolean' || val == null) {
133 if (type == 'string') {
136 if (type == 'symbol') {
137 const description = val.description;
138 if (description == null) {
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})`;
153 if (Array.isArray(val)) {
154 const length = val.length;
157 debug += debugString(val[0]);
159 for(let i = 1; i < length; i++) {
160 debug += ', ' + debugString(val[i]);
166 const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
168 if (builtInMatches.length > 1) {
169 className = builtInMatches[1];
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`.
179 return 'Object(' + JSON.stringify(val) + ')';
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.
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.
208 return f(a, state.b, ...args);
210 if (--state.cnt === 0) {
211 wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
212 CLOSURE_DTORS.unregister(state);
218 real.original = state;
219 CLOSURE_DTORS.register(real, state, state);
222 function __wbg_adapter_38(arg0, arg1, arg2) {
223 wasm.__wbindgen_export_3(arg0, arg1, addHeapObject(arg2));
226 function __wbg_adapter_41(arg0, arg1) {
227 wasm.__wbindgen_export_4(arg0, arg1);
230 function getArrayJsValueFromWasm0(ptr, len) {
232 const mem = getDataViewMemory0();
234 for (let i = ptr; i < ptr + 4 * len; i += 4) {
235 result.push(takeObject(mem.getUint32(i, true)));
240 * @param {string} word_start
241 * @returns {(string)[]}
243 export function getWordsAutocomplete(word_start) {
245 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
246 const ptr0 = passStringToWasm0(word_start, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
247 const len0 = WASM_VECTOR_LEN;
248 wasm.getWordsAutocomplete(retptr, ptr0, len0);
249 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
250 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
251 var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
252 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
255 wasm.__wbindgen_add_to_stack_pointer(16);
259 function _assertClass(instance, klass) {
260 if (!(instance instanceof klass)) {
261 throw new Error(`expected instance of ${klass.name}`);
266 function passArrayJsValueToWasm0(array, malloc) {
267 const ptr = malloc(array.length * 4, 4) >>> 0;
268 const mem = getDataViewMemory0();
269 for (let i = 0; i < array.length; i++) {
270 mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
272 WASM_VECTOR_LEN = array.length;
276 export function setPanicHook() {
280 function getArrayU8FromWasm0(ptr, len) {
282 return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
285 function passArray8ToWasm0(arg, malloc) {
286 const ptr = malloc(arg.length * 1, 1) >>> 0;
287 getUint8ArrayMemory0().set(arg, ptr / 1);
288 WASM_VECTOR_LEN = arg.length;
292 * @param {WasmPsbt} psbt
293 * @param {WasmAccount} account
294 * @returns {Promise<WasmTransactionDetailsData>}
296 export function createTransactionFromPsbt(psbt, account) {
297 _assertClass(psbt, WasmPsbt);
298 _assertClass(account, WasmAccount);
299 const ret = wasm.createTransactionFromPsbt(psbt.__wbg_ptr, account.__wbg_ptr);
300 return takeObject(ret);
306 export function getDefaultStopGap() {
307 const ret = wasm.getDefaultStopGap();
311 function handleError(f, args) {
313 return f.apply(this, args);
315 wasm.__wbindgen_export_6(addHeapObject(e));
318 function __wbg_adapter_616(arg0, arg1, arg2, arg3) {
319 wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
322 export const WasmChangeSpendPolicy = Object.freeze({ ChangeAllowed:0,"0":"ChangeAllowed",OnlyChange:1,"1":"OnlyChange",ChangeForbidden:2,"2":"ChangeForbidden", });
324 export const WasmCoinSelection = Object.freeze({ BranchAndBound:0,"0":"BranchAndBound",LargestFirst:1,"1":"LargestFirst",OldestFirst:2,"2":"OldestFirst",Manual:3,"3":"Manual", });
326 export const WasmKeychainKind = Object.freeze({
328 * External keychain, used for deriving recipient addresses.
330 External:0,"0":"External",
332 * Internal keychain, used for deriving change addresses.
334 Internal:1,"1":"Internal", });
336 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", });
338 export const WasmNetwork = Object.freeze({
342 Bitcoin:0,"0":"Bitcoin",
344 * Bitcoin's testnet network.
346 Testnet:1,"1":"Testnet",
348 * Bitcoin's signet network.
350 Signet:2,"2":"Signet",
352 * Bitcoin's regtest network.
354 Regtest:3,"3":"Regtest", });
356 export const WasmPaymentLinkKind = Object.freeze({ BitcoinAddress:0,"0":"BitcoinAddress",BitcoinURI:1,"1":"BitcoinURI",LightningURI:2,"2":"LightningURI",UnifiedURI:3,"3":"UnifiedURI", });
358 export const WasmScriptType = Object.freeze({ Legacy:1,"1":"Legacy",NestedSegwit:2,"2":"NestedSegwit",NativeSegwit:3,"3":"NativeSegwit",Taproot:4,"4":"Taproot", });
360 export const WasmSortOrder = Object.freeze({ Asc:0,"0":"Asc",Desc:1,"1":"Desc", });
362 export const WasmWalletTransactionFlag = Object.freeze({ Suspicious:0,"0":"Suspicious",Private:1,"1":"Private", });
364 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", });
366 const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
368 const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
370 const WasmAccountFinalization = (typeof FinalizationRegistry === 'undefined')
371 ? { register: () => {}, unregister: () => {} }
372 : new FinalizationRegistry(ptr => wasm.__wbg_wasmaccount_free(ptr >>> 0, 1));
374 export class WasmAccount {
378 const obj = Object.create(WasmAccount.prototype);
380 WasmAccountFinalization.register(obj, obj.__wbg_ptr, obj);
384 __destroy_into_raw() {
385 const ptr = this.__wbg_ptr;
387 WasmAccountFinalization.unregister(this);
392 const ptr = this.__destroy_into_raw();
393 wasm.__wbg_wasmaccount_free(ptr, 0);
396 * @param {WasmWallet} wallet
397 * @param {WasmScriptType} script_type
398 * @param {WasmDerivationPath} derivation_path
400 constructor(wallet, script_type, derivation_path) {
402 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
403 _assertClass(wallet, WasmWallet);
404 _assertClass(derivation_path, WasmDerivationPath);
405 var ptr0 = derivation_path.__destroy_into_raw();
406 wasm.wasmaccount_new(retptr, wallet.__wbg_ptr, script_type, ptr0);
407 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
408 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
409 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
411 throw takeObject(r1);
413 this.__wbg_ptr = r0 >>> 0;
414 WasmAccountFinalization.register(this, this.__wbg_ptr, this);
417 wasm.__wbindgen_add_to_stack_pointer(16);
421 * @param {number} from
422 * @param {number | undefined} [to]
423 * @returns {Promise<void>}
425 markReceiveAddressesUsedTo(from, to) {
426 const ret = wasm.wasmaccount_markReceiveAddressesUsedTo(this.__wbg_ptr, from, !isLikeNone(to), isLikeNone(to) ? 0 : to);
427 return takeObject(ret);
430 * @returns {Promise<WasmAddressInfo>}
432 getNextReceiveAddress() {
433 const ret = wasm.wasmaccount_getNextReceiveAddress(this.__wbg_ptr);
434 return takeObject(ret);
437 * @param {number} index
438 * @returns {Promise<WasmAddressInfo>}
440 peekReceiveAddress(index) {
441 const ret = wasm.wasmaccount_peekReceiveAddress(this.__wbg_ptr, index);
442 return takeObject(ret);
445 * @param {WasmAddress} address
446 * @returns {Promise<boolean>}
449 _assertClass(address, WasmAddress);
450 const ret = wasm.wasmaccount_owns(this.__wbg_ptr, address.__wbg_ptr);
451 return takeObject(ret);
454 * @returns {Promise<WasmBalanceWrapper>}
457 const ret = wasm.wasmaccount_getBalance(this.__wbg_ptr);
458 return takeObject(ret);
463 getDerivationPath() {
467 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
468 wasm.wasmaccount_getDerivationPath(retptr, this.__wbg_ptr);
469 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
470 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
471 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
472 var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
477 throw takeObject(r2);
481 return getStringFromWasm0(ptr1, len1);
483 wasm.__wbindgen_add_to_stack_pointer(16);
484 wasm.__wbindgen_export_5(deferred2_0, deferred2_1, 1);
488 * @returns {Promise<WasmUtxoArray>}
491 const ret = wasm.wasmaccount_getUtxos(this.__wbg_ptr);
492 return takeObject(ret);
495 * @param {WasmNetwork} network
496 * @param {string} address_str
497 * @param {WasmBlockchainClient} client
498 * @param {boolean | undefined} [force_sync]
499 * @returns {Promise<WasmAddressDetailsData | undefined>}
501 getAddress(network, address_str, client, force_sync) {
502 const ptr0 = passStringToWasm0(address_str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
503 const len0 = WASM_VECTOR_LEN;
504 _assertClass(client, WasmBlockchainClient);
505 const ret = wasm.wasmaccount_getAddress(this.__wbg_ptr, network, ptr0, len0, client.__wbg_ptr, isLikeNone(force_sync) ? 0xFFFFFF : force_sync ? 1 : 0);
506 return takeObject(ret);
509 * @param {WasmPagination} pagination
510 * @param {WasmBlockchainClient} client
511 * @param {WasmKeychainKind} keychain
512 * @param {boolean | undefined} [force_sync]
513 * @returns {Promise<WasmAddressDetailsArray>}
515 getAddresses(pagination, client, keychain, force_sync) {
516 _assertClass(client, WasmBlockchainClient);
517 const ret = wasm.wasmaccount_getAddresses(this.__wbg_ptr, addHeapObject(pagination), client.__wbg_ptr, keychain, isLikeNone(force_sync) ? 0xFFFFFF : force_sync ? 1 : 0);
518 return takeObject(ret);
521 * @param {WasmPagination} pagination
522 * @param {WasmSortOrder | undefined} [sort]
523 * @returns {Promise<WasmTransactionDetailsArray>}
525 getTransactions(pagination, sort) {
526 const ret = wasm.wasmaccount_getTransactions(this.__wbg_ptr, addHeapObject(pagination), isLikeNone(sort) ? 2 : sort);
527 return takeObject(ret);
530 * @param {string} txid
531 * @returns {Promise<WasmTransactionDetailsData>}
533 getTransaction(txid) {
534 const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
535 const len0 = WASM_VECTOR_LEN;
536 const ret = wasm.wasmaccount_getTransaction(this.__wbg_ptr, ptr0, len0);
537 return takeObject(ret);
540 * @returns {Promise<boolean>}
543 const ret = wasm.wasmaccount_hasSyncData(this.__wbg_ptr);
544 return takeObject(ret);
547 * @param {WasmPsbt} psbt
548 * @returns {Promise<void>}
550 insertUnconfirmedTransaction(psbt) {
551 _assertClass(psbt, WasmPsbt);
552 const ret = wasm.wasmaccount_insertUnconfirmedTransaction(this.__wbg_ptr, psbt.__wbg_ptr);
553 return takeObject(ret);
556 * @param {WasmNetwork} network
557 * @param {string} txid
558 * @param {bigint} fees
559 * @returns {Promise<WasmPsbt>}
561 bumpTransactionsFees(network, txid, fees) {
562 const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
563 const len0 = WASM_VECTOR_LEN;
564 const ret = wasm.wasmaccount_bumpTransactionsFees(this.__wbg_ptr, network, ptr0, len0, fees);
565 return takeObject(ret);
568 * @returns {Promise<void>}
571 const ret = wasm.wasmaccount_clearStore(this.__wbg_ptr);
572 return takeObject(ret);
576 const WasmAddressFinalization = (typeof FinalizationRegistry === 'undefined')
577 ? { register: () => {}, unregister: () => {} }
578 : new FinalizationRegistry(ptr => wasm.__wbg_wasmaddress_free(ptr >>> 0, 1));
580 export class WasmAddress {
584 const obj = Object.create(WasmAddress.prototype);
586 WasmAddressFinalization.register(obj, obj.__wbg_ptr, obj);
590 __destroy_into_raw() {
591 const ptr = this.__wbg_ptr;
593 WasmAddressFinalization.unregister(this);
598 const ptr = this.__destroy_into_raw();
599 wasm.__wbg_wasmaddress_free(ptr, 0);
602 * @param {string} str
603 * @param {WasmNetwork} network
605 constructor(str, network) {
607 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
608 const ptr0 = passStringToWasm0(str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
609 const len0 = WASM_VECTOR_LEN;
610 wasm.wasmaddress_new(retptr, ptr0, len0, network);
611 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
612 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
613 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
615 throw takeObject(r1);
617 this.__wbg_ptr = r0 >>> 0;
618 WasmAddressFinalization.register(this, this.__wbg_ptr, this);
621 wasm.__wbindgen_add_to_stack_pointer(16);
625 * @param {WasmScript} value
626 * @param {WasmNetwork} network
627 * @returns {WasmAddress}
629 static fromScript(value, network) {
631 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
632 _assertClass(value, WasmScript);
633 var ptr0 = value.__destroy_into_raw();
634 wasm.wasmaddress_fromScript(retptr, ptr0, network);
635 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
636 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
637 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
639 throw takeObject(r1);
641 return WasmAddress.__wrap(r0);
643 wasm.__wbindgen_add_to_stack_pointer(16);
653 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
654 wasm.wasmaddress_toString(retptr, this.__wbg_ptr);
655 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
656 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
659 return getStringFromWasm0(r0, r1);
661 wasm.__wbindgen_add_to_stack_pointer(16);
662 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
666 * @returns {WasmScript}
669 const ret = wasm.wasmaddress_intoScript(this.__wbg_ptr);
670 return WasmScript.__wrap(ret);
674 const WasmAddressDetailsArrayFinalization = (typeof FinalizationRegistry === 'undefined')
675 ? { register: () => {}, unregister: () => {} }
676 : new FinalizationRegistry(ptr => wasm.__wbg_wasmaddressdetailsarray_free(ptr >>> 0, 1));
678 export class WasmAddressDetailsArray {
682 const obj = Object.create(WasmAddressDetailsArray.prototype);
684 WasmAddressDetailsArrayFinalization.register(obj, obj.__wbg_ptr, obj);
688 __destroy_into_raw() {
689 const ptr = this.__wbg_ptr;
691 WasmAddressDetailsArrayFinalization.unregister(this);
696 const ptr = this.__destroy_into_raw();
697 wasm.__wbg_wasmaddressdetailsarray_free(ptr, 0);
700 * @returns {(WasmAddressDetailsData)[]}
704 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
705 wasm.__wbg_get_wasmaddressdetailsarray_0(retptr, this.__wbg_ptr);
706 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
707 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
708 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
709 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
712 wasm.__wbindgen_add_to_stack_pointer(16);
716 * @param {(WasmAddressDetailsData)[]} arg0
719 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
720 const len0 = WASM_VECTOR_LEN;
721 wasm.__wbg_set_wasmaddressdetailsarray_0(this.__wbg_ptr, ptr0, len0);
725 const WasmAddressDetailsDataFinalization = (typeof FinalizationRegistry === 'undefined')
726 ? { register: () => {}, unregister: () => {} }
727 : new FinalizationRegistry(ptr => wasm.__wbg_wasmaddressdetailsdata_free(ptr >>> 0, 1));
729 export class WasmAddressDetailsData {
733 const obj = Object.create(WasmAddressDetailsData.prototype);
735 WasmAddressDetailsDataFinalization.register(obj, obj.__wbg_ptr, obj);
739 static __unwrap(jsValue) {
740 if (!(jsValue instanceof WasmAddressDetailsData)) {
743 return jsValue.__destroy_into_raw();
746 __destroy_into_raw() {
747 const ptr = this.__wbg_ptr;
749 WasmAddressDetailsDataFinalization.unregister(this);
754 const ptr = this.__destroy_into_raw();
755 wasm.__wbg_wasmaddressdetailsdata_free(ptr, 0);
758 * @returns {WasmAddressDetails}
761 const ret = wasm.__wbg_get_wasmaddressdetailsdata_Data(this.__wbg_ptr);
762 return takeObject(ret);
765 * @param {WasmAddressDetails} 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));
776 export class WasmAddressInfo {
780 const obj = Object.create(WasmAddressInfo.prototype);
782 WasmAddressInfoFinalization.register(obj, obj.__wbg_ptr, obj);
786 __destroy_into_raw() {
787 const ptr = this.__wbg_ptr;
789 WasmAddressInfoFinalization.unregister(this);
794 const ptr = this.__destroy_into_raw();
795 wasm.__wbg_wasmaddressinfo_free(ptr, 0);
798 * Child index of this address
802 const ret = wasm.__wbg_get_wasmaddressinfo_index(this.__wbg_ptr);
806 * Child index of this address
807 * @param {number} arg0
810 wasm.__wbg_set_wasmaddressinfo_index(this.__wbg_ptr, arg0);
820 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
821 wasm.__wbg_get_wasmaddressinfo_address(retptr, this.__wbg_ptr);
822 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
823 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
826 return getStringFromWasm0(r0, r1);
828 wasm.__wbindgen_add_to_stack_pointer(16);
829 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
834 * @param {string} arg0
837 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
838 const len0 = WASM_VECTOR_LEN;
839 wasm.__wbg_set_wasmaddressinfo_address(this.__wbg_ptr, ptr0, len0);
843 * @returns {WasmKeychainKind}
846 const ret = wasm.__wbg_get_wasmaddressinfo_keychain(this.__wbg_ptr);
851 * @param {WasmKeychainKind} arg0
854 wasm.__wbg_set_wasmaddressinfo_keychain(this.__wbg_ptr, arg0);
858 const WasmApiBitcoinAddressCreationPayloadDataFinalization = (typeof FinalizationRegistry === 'undefined')
859 ? { register: () => {}, unregister: () => {} }
860 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapibitcoinaddresscreationpayloaddata_free(ptr >>> 0, 1));
862 export class WasmApiBitcoinAddressCreationPayloadData {
866 const obj = Object.create(WasmApiBitcoinAddressCreationPayloadData.prototype);
868 WasmApiBitcoinAddressCreationPayloadDataFinalization.register(obj, obj.__wbg_ptr, obj);
872 static __unwrap(jsValue) {
873 if (!(jsValue instanceof WasmApiBitcoinAddressCreationPayloadData)) {
876 return jsValue.__destroy_into_raw();
879 __destroy_into_raw() {
880 const ptr = this.__wbg_ptr;
882 WasmApiBitcoinAddressCreationPayloadDataFinalization.unregister(this);
887 const ptr = this.__destroy_into_raw();
888 wasm.__wbg_wasmapibitcoinaddresscreationpayloaddata_free(ptr, 0);
891 * @returns {WasmApiBitcoinAddressCreationPayload}
894 const ret = wasm.__wbg_get_wasmapibitcoinaddresscreationpayloaddata_Data(this.__wbg_ptr);
895 return takeObject(ret);
898 * @param {WasmApiBitcoinAddressCreationPayload} arg0
901 wasm.__wbg_set_wasmapibitcoinaddresscreationpayloaddata_Data(this.__wbg_ptr, addHeapObject(arg0));
905 const WasmApiBitcoinAddressesCreationPayloadFinalization = (typeof FinalizationRegistry === 'undefined')
906 ? { register: () => {}, unregister: () => {} }
907 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapibitcoinaddressescreationpayload_free(ptr >>> 0, 1));
909 export class WasmApiBitcoinAddressesCreationPayload {
911 __destroy_into_raw() {
912 const ptr = this.__wbg_ptr;
914 WasmApiBitcoinAddressesCreationPayloadFinalization.unregister(this);
919 const ptr = this.__destroy_into_raw();
920 wasm.__wbg_wasmapibitcoinaddressescreationpayload_free(ptr, 0);
923 * @returns {(WasmApiBitcoinAddressCreationPayloadData)[]}
927 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
928 wasm.__wbg_get_wasmapibitcoinaddressescreationpayload_0(retptr, this.__wbg_ptr);
929 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
930 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
931 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
932 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
935 wasm.__wbindgen_add_to_stack_pointer(16);
939 * @param {(WasmApiBitcoinAddressCreationPayloadData)[]} arg0
942 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
943 const len0 = WASM_VECTOR_LEN;
944 wasm.__wbg_set_wasmapibitcoinaddressescreationpayload_0(this.__wbg_ptr, ptr0, len0);
947 const ret = wasm.wasmapibitcoinaddressescreationpayload_new();
948 this.__wbg_ptr = ret >>> 0;
949 WasmApiBitcoinAddressesCreationPayloadFinalization.register(this, this.__wbg_ptr, this);
953 * @param {WasmApiBitcoinAddressCreationPayload} create_payload
955 push(create_payload) {
956 wasm.wasmapibitcoinaddressescreationpayload_push(this.__wbg_ptr, addHeapObject(create_payload));
960 const WasmApiClientsFinalization = (typeof FinalizationRegistry === 'undefined')
961 ? { register: () => {}, unregister: () => {} }
962 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiclients_free(ptr >>> 0, 1));
964 export class WasmApiClients {
968 const obj = Object.create(WasmApiClients.prototype);
970 WasmApiClientsFinalization.register(obj, obj.__wbg_ptr, obj);
974 __destroy_into_raw() {
975 const ptr = this.__wbg_ptr;
977 WasmApiClientsFinalization.unregister(this);
982 const ptr = this.__destroy_into_raw();
983 wasm.__wbg_wasmapiclients_free(ptr, 0);
986 * @returns {WasmExchangeRateClient}
988 get exchange_rate() {
989 const ret = wasm.__wbg_get_wasmapiclients_exchange_rate(this.__wbg_ptr);
990 return WasmExchangeRateClient.__wrap(ret);
993 * @param {WasmExchangeRateClient} arg0
995 set exchange_rate(arg0) {
996 _assertClass(arg0, WasmExchangeRateClient);
997 var ptr0 = arg0.__destroy_into_raw();
998 wasm.__wbg_set_wasmapiclients_exchange_rate(this.__wbg_ptr, ptr0);
1001 * @returns {WasmEmailIntegrationClient}
1003 get email_integration() {
1004 const ret = wasm.__wbg_get_wasmapiclients_email_integration(this.__wbg_ptr);
1005 return WasmEmailIntegrationClient.__wrap(ret);
1008 * @param {WasmEmailIntegrationClient} arg0
1010 set email_integration(arg0) {
1011 _assertClass(arg0, WasmEmailIntegrationClient);
1012 var ptr0 = arg0.__destroy_into_raw();
1013 wasm.__wbg_set_wasmapiclients_email_integration(this.__wbg_ptr, ptr0);
1016 * @returns {WasmBitcoinAddressClient}
1018 get bitcoin_address() {
1019 const ret = wasm.__wbg_get_wasmapiclients_bitcoin_address(this.__wbg_ptr);
1020 return WasmBitcoinAddressClient.__wrap(ret);
1023 * @param {WasmBitcoinAddressClient} arg0
1025 set bitcoin_address(arg0) {
1026 _assertClass(arg0, WasmBitcoinAddressClient);
1027 var ptr0 = arg0.__destroy_into_raw();
1028 wasm.__wbg_set_wasmapiclients_bitcoin_address(this.__wbg_ptr, ptr0);
1031 * @returns {WasmPaymentGatewayClient}
1033 get payment_gateway() {
1034 const ret = wasm.__wbg_get_wasmapiclients_payment_gateway(this.__wbg_ptr);
1035 return WasmPaymentGatewayClient.__wrap(ret);
1038 * @param {WasmPaymentGatewayClient} arg0
1040 set payment_gateway(arg0) {
1041 _assertClass(arg0, WasmPaymentGatewayClient);
1042 var ptr0 = arg0.__destroy_into_raw();
1043 wasm.__wbg_set_wasmapiclients_payment_gateway(this.__wbg_ptr, ptr0);
1046 * @returns {WasmPriceGraphClient}
1049 const ret = wasm.__wbg_get_wasmapiclients_price_graph(this.__wbg_ptr);
1050 return WasmPriceGraphClient.__wrap(ret);
1053 * @param {WasmPriceGraphClient} arg0
1055 set price_graph(arg0) {
1056 _assertClass(arg0, WasmPriceGraphClient);
1057 var ptr0 = arg0.__destroy_into_raw();
1058 wasm.__wbg_set_wasmapiclients_price_graph(this.__wbg_ptr, ptr0);
1061 * @returns {WasmSettingsClient}
1064 const ret = wasm.__wbg_get_wasmapiclients_settings(this.__wbg_ptr);
1065 return WasmSettingsClient.__wrap(ret);
1068 * @param {WasmSettingsClient} arg0
1070 set settings(arg0) {
1071 _assertClass(arg0, WasmSettingsClient);
1072 var ptr0 = arg0.__destroy_into_raw();
1073 wasm.__wbg_set_wasmapiclients_settings(this.__wbg_ptr, ptr0);
1076 * @returns {WasmNetworkClient}
1079 const ret = wasm.__wbg_get_wasmapiclients_network(this.__wbg_ptr);
1080 return WasmNetworkClient.__wrap(ret);
1083 * @param {WasmNetworkClient} arg0
1086 _assertClass(arg0, WasmNetworkClient);
1087 var ptr0 = arg0.__destroy_into_raw();
1088 wasm.__wbg_set_wasmapiclients_network(this.__wbg_ptr, ptr0);
1091 * @returns {WasmInviteClient}
1094 const ret = wasm.__wbg_get_wasmapiclients_invite(this.__wbg_ptr);
1095 return WasmInviteClient.__wrap(ret);
1098 * @param {WasmInviteClient} arg0
1101 _assertClass(arg0, WasmInviteClient);
1102 var ptr0 = arg0.__destroy_into_raw();
1103 wasm.__wbg_set_wasmapiclients_invite(this.__wbg_ptr, ptr0);
1106 * @returns {WasmWalletClient}
1109 const ret = wasm.__wbg_get_wasmapiclients_wallet(this.__wbg_ptr);
1110 return WasmWalletClient.__wrap(ret);
1113 * @param {WasmWalletClient} arg0
1116 _assertClass(arg0, WasmWalletClient);
1117 var ptr0 = arg0.__destroy_into_raw();
1118 wasm.__wbg_set_wasmapiclients_wallet(this.__wbg_ptr, ptr0);
1122 const WasmApiExchangeRateDataFinalization = (typeof FinalizationRegistry === 'undefined')
1123 ? { register: () => {}, unregister: () => {} }
1124 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiexchangeratedata_free(ptr >>> 0, 1));
1126 export class WasmApiExchangeRateData {
1128 static __wrap(ptr) {
1130 const obj = Object.create(WasmApiExchangeRateData.prototype);
1131 obj.__wbg_ptr = ptr;
1132 WasmApiExchangeRateDataFinalization.register(obj, obj.__wbg_ptr, obj);
1136 __destroy_into_raw() {
1137 const ptr = this.__wbg_ptr;
1139 WasmApiExchangeRateDataFinalization.unregister(this);
1144 const ptr = this.__destroy_into_raw();
1145 wasm.__wbg_wasmapiexchangeratedata_free(ptr, 0);
1148 * @returns {WasmApiExchangeRate}
1151 const ret = wasm.__wbg_get_wasmapiexchangeratedata_Data(this.__wbg_ptr);
1152 return takeObject(ret);
1155 * @param {WasmApiExchangeRate} arg0
1158 wasm.__wbg_set_wasmapiexchangeratedata_Data(this.__wbg_ptr, addHeapObject(arg0));
1162 const WasmApiFiatCurrenciesFinalization = (typeof FinalizationRegistry === 'undefined')
1163 ? { register: () => {}, unregister: () => {} }
1164 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapifiatcurrencies_free(ptr >>> 0, 1));
1166 export class WasmApiFiatCurrencies {
1168 static __wrap(ptr) {
1170 const obj = Object.create(WasmApiFiatCurrencies.prototype);
1171 obj.__wbg_ptr = ptr;
1172 WasmApiFiatCurrenciesFinalization.register(obj, obj.__wbg_ptr, obj);
1176 __destroy_into_raw() {
1177 const ptr = this.__wbg_ptr;
1179 WasmApiFiatCurrenciesFinalization.unregister(this);
1184 const ptr = this.__destroy_into_raw();
1185 wasm.__wbg_wasmapifiatcurrencies_free(ptr, 0);
1188 * @returns {(WasmApiFiatCurrencyData)[]}
1192 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1193 wasm.__wbg_get_wasmapifiatcurrencies_0(retptr, this.__wbg_ptr);
1194 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1195 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1196 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1197 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
1200 wasm.__wbindgen_add_to_stack_pointer(16);
1204 * @param {(WasmApiFiatCurrencyData)[]} arg0
1207 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
1208 const len0 = WASM_VECTOR_LEN;
1209 wasm.__wbg_set_wasmapifiatcurrencies_0(this.__wbg_ptr, ptr0, len0);
1213 const WasmApiFiatCurrencyDataFinalization = (typeof FinalizationRegistry === 'undefined')
1214 ? { register: () => {}, unregister: () => {} }
1215 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapifiatcurrencydata_free(ptr >>> 0, 1));
1217 export class WasmApiFiatCurrencyData {
1219 static __wrap(ptr) {
1221 const obj = Object.create(WasmApiFiatCurrencyData.prototype);
1222 obj.__wbg_ptr = ptr;
1223 WasmApiFiatCurrencyDataFinalization.register(obj, obj.__wbg_ptr, obj);
1227 static __unwrap(jsValue) {
1228 if (!(jsValue instanceof WasmApiFiatCurrencyData)) {
1231 return jsValue.__destroy_into_raw();
1234 __destroy_into_raw() {
1235 const ptr = this.__wbg_ptr;
1237 WasmApiFiatCurrencyDataFinalization.unregister(this);
1242 const ptr = this.__destroy_into_raw();
1243 wasm.__wbg_wasmapifiatcurrencydata_free(ptr, 0);
1246 * @returns {WasmApiFiatCurrency}
1249 const ret = wasm.__wbg_get_wasmapifiatcurrencydata_Data(this.__wbg_ptr);
1250 return takeObject(ret);
1253 * @param {WasmApiFiatCurrency} arg0
1256 wasm.__wbg_set_wasmapifiatcurrencydata_Data(this.__wbg_ptr, addHeapObject(arg0));
1260 const WasmApiWalletAccountAddressesFinalization = (typeof FinalizationRegistry === 'undefined')
1261 ? { register: () => {}, unregister: () => {} }
1262 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletaccountaddresses_free(ptr >>> 0, 1));
1264 export class WasmApiWalletAccountAddresses {
1266 static __wrap(ptr) {
1268 const obj = Object.create(WasmApiWalletAccountAddresses.prototype);
1269 obj.__wbg_ptr = ptr;
1270 WasmApiWalletAccountAddressesFinalization.register(obj, obj.__wbg_ptr, obj);
1274 __destroy_into_raw() {
1275 const ptr = this.__wbg_ptr;
1277 WasmApiWalletAccountAddressesFinalization.unregister(this);
1282 const ptr = this.__destroy_into_raw();
1283 wasm.__wbg_wasmapiwalletaccountaddresses_free(ptr, 0);
1286 * @returns {(WasmWalletAccountAddressData)[]}
1290 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1291 wasm.__wbg_get_wasmapiwalletaccountaddresses_0(retptr, this.__wbg_ptr);
1292 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1293 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1294 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1295 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
1298 wasm.__wbindgen_add_to_stack_pointer(16);
1302 * @param {(WasmWalletAccountAddressData)[]} arg0
1305 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
1306 const len0 = WASM_VECTOR_LEN;
1307 wasm.__wbg_set_wasmapiwalletaccountaddresses_0(this.__wbg_ptr, ptr0, len0);
1311 const WasmApiWalletAccountsFinalization = (typeof FinalizationRegistry === 'undefined')
1312 ? { register: () => {}, unregister: () => {} }
1313 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletaccounts_free(ptr >>> 0, 1));
1315 export class WasmApiWalletAccounts {
1317 static __wrap(ptr) {
1319 const obj = Object.create(WasmApiWalletAccounts.prototype);
1320 obj.__wbg_ptr = ptr;
1321 WasmApiWalletAccountsFinalization.register(obj, obj.__wbg_ptr, obj);
1325 __destroy_into_raw() {
1326 const ptr = this.__wbg_ptr;
1328 WasmApiWalletAccountsFinalization.unregister(this);
1333 const ptr = this.__destroy_into_raw();
1334 wasm.__wbg_wasmapiwalletaccounts_free(ptr, 0);
1337 * @returns {(WasmWalletAccountData)[]}
1341 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1342 wasm.__wbg_get_wasmapiwalletaccounts_0(retptr, this.__wbg_ptr);
1343 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1344 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1345 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1346 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
1349 wasm.__wbindgen_add_to_stack_pointer(16);
1353 * @param {(WasmWalletAccountData)[]} arg0
1356 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
1357 const len0 = WASM_VECTOR_LEN;
1358 wasm.__wbg_set_wasmapiwalletaccounts_0(this.__wbg_ptr, ptr0, len0);
1362 const WasmApiWalletBitcoinAddressDataFinalization = (typeof FinalizationRegistry === 'undefined')
1363 ? { register: () => {}, unregister: () => {} }
1364 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletbitcoinaddressdata_free(ptr >>> 0, 1));
1366 export class WasmApiWalletBitcoinAddressData {
1368 static __wrap(ptr) {
1370 const obj = Object.create(WasmApiWalletBitcoinAddressData.prototype);
1371 obj.__wbg_ptr = ptr;
1372 WasmApiWalletBitcoinAddressDataFinalization.register(obj, obj.__wbg_ptr, obj);
1376 static __unwrap(jsValue) {
1377 if (!(jsValue instanceof WasmApiWalletBitcoinAddressData)) {
1380 return jsValue.__destroy_into_raw();
1383 __destroy_into_raw() {
1384 const ptr = this.__wbg_ptr;
1386 WasmApiWalletBitcoinAddressDataFinalization.unregister(this);
1391 const ptr = this.__destroy_into_raw();
1392 wasm.__wbg_wasmapiwalletbitcoinaddressdata_free(ptr, 0);
1395 * @returns {WasmApiWalletBitcoinAddress}
1398 const ret = wasm.__wbg_get_wasmapiwalletbitcoinaddressdata_Data(this.__wbg_ptr);
1399 return takeObject(ret);
1402 * @param {WasmApiWalletBitcoinAddress} arg0
1405 wasm.__wbg_set_wasmapiwalletbitcoinaddressdata_Data(this.__wbg_ptr, addHeapObject(arg0));
1409 const WasmApiWalletBitcoinAddressLookupDataFinalization = (typeof FinalizationRegistry === 'undefined')
1410 ? { register: () => {}, unregister: () => {} }
1411 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletbitcoinaddresslookupdata_free(ptr >>> 0, 1));
1413 export class WasmApiWalletBitcoinAddressLookupData {
1415 static __wrap(ptr) {
1417 const obj = Object.create(WasmApiWalletBitcoinAddressLookupData.prototype);
1418 obj.__wbg_ptr = ptr;
1419 WasmApiWalletBitcoinAddressLookupDataFinalization.register(obj, obj.__wbg_ptr, obj);
1423 __destroy_into_raw() {
1424 const ptr = this.__wbg_ptr;
1426 WasmApiWalletBitcoinAddressLookupDataFinalization.unregister(this);
1431 const ptr = this.__destroy_into_raw();
1432 wasm.__wbg_wasmapiwalletbitcoinaddresslookupdata_free(ptr, 0);
1435 * @returns {WasmApiWalletBitcoinAddressLookup}
1438 const ret = wasm.__wbg_get_wasmapiwalletbitcoinaddresslookupdata_Data(this.__wbg_ptr);
1439 return takeObject(ret);
1442 * @param {WasmApiWalletBitcoinAddressLookup} arg0
1445 wasm.__wbg_set_wasmapiwalletbitcoinaddresslookupdata_Data(this.__wbg_ptr, addHeapObject(arg0));
1449 const WasmApiWalletBitcoinAddressesFinalization = (typeof FinalizationRegistry === 'undefined')
1450 ? { register: () => {}, unregister: () => {} }
1451 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletbitcoinaddresses_free(ptr >>> 0, 1));
1453 export class WasmApiWalletBitcoinAddresses {
1455 static __wrap(ptr) {
1457 const obj = Object.create(WasmApiWalletBitcoinAddresses.prototype);
1458 obj.__wbg_ptr = ptr;
1459 WasmApiWalletBitcoinAddressesFinalization.register(obj, obj.__wbg_ptr, obj);
1463 __destroy_into_raw() {
1464 const ptr = this.__wbg_ptr;
1466 WasmApiWalletBitcoinAddressesFinalization.unregister(this);
1471 const ptr = this.__destroy_into_raw();
1472 wasm.__wbg_wasmapiwalletbitcoinaddresses_free(ptr, 0);
1475 * @returns {(WasmApiWalletBitcoinAddressData)[]}
1479 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1480 wasm.__wbg_get_wasmapiwalletbitcoinaddresses_0(retptr, this.__wbg_ptr);
1481 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1482 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1483 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1484 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
1487 wasm.__wbindgen_add_to_stack_pointer(16);
1491 * @param {(WasmApiWalletBitcoinAddressData)[]} arg0
1494 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
1495 const len0 = WASM_VECTOR_LEN;
1496 wasm.__wbg_set_wasmapiwalletbitcoinaddresses_0(this.__wbg_ptr, ptr0, len0);
1500 const WasmApiWalletDataFinalization = (typeof FinalizationRegistry === 'undefined')
1501 ? { register: () => {}, unregister: () => {} }
1502 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletdata_free(ptr >>> 0, 1));
1504 export class WasmApiWalletData {
1506 static __wrap(ptr) {
1508 const obj = Object.create(WasmApiWalletData.prototype);
1509 obj.__wbg_ptr = ptr;
1510 WasmApiWalletDataFinalization.register(obj, obj.__wbg_ptr, obj);
1514 static __unwrap(jsValue) {
1515 if (!(jsValue instanceof WasmApiWalletData)) {
1518 return jsValue.__destroy_into_raw();
1521 __destroy_into_raw() {
1522 const ptr = this.__wbg_ptr;
1524 WasmApiWalletDataFinalization.unregister(this);
1529 const ptr = this.__destroy_into_raw();
1530 wasm.__wbg_wasmapiwalletdata_free(ptr, 0);
1533 * @returns {WasmApiWallet}
1536 const ret = wasm.__wbg_get_wasmapiwalletdata_Wallet(this.__wbg_ptr);
1537 return takeObject(ret);
1540 * @param {WasmApiWallet} arg0
1543 wasm.__wbg_set_wasmapiwalletdata_Wallet(this.__wbg_ptr, addHeapObject(arg0));
1546 * @returns {WasmApiWalletKey}
1549 const ret = wasm.__wbg_get_wasmapiwalletdata_WalletKey(this.__wbg_ptr);
1550 return takeObject(ret);
1553 * @param {WasmApiWalletKey} arg0
1555 set WalletKey(arg0) {
1556 wasm.__wbg_set_wasmapiwalletdata_WalletKey(this.__wbg_ptr, addHeapObject(arg0));
1559 * @returns {WasmApiWalletSettings}
1561 get WalletSettings() {
1562 const ret = wasm.__wbg_get_wasmapiwalletdata_WalletSettings(this.__wbg_ptr);
1563 return takeObject(ret);
1566 * @param {WasmApiWalletSettings} arg0
1568 set WalletSettings(arg0) {
1569 wasm.__wbg_set_wasmapiwalletdata_WalletSettings(this.__wbg_ptr, addHeapObject(arg0));
1572 * @param {WasmApiWallet} wallet
1573 * @param {WasmApiWalletKey} key
1574 * @param {WasmApiWalletSettings} settings
1575 * @returns {WasmApiWalletData}
1577 static from_parts(wallet, key, settings) {
1578 const ret = wasm.wasmapiwalletdata_from_parts(addHeapObject(wallet), addHeapObject(key), addHeapObject(settings));
1579 return WasmApiWalletData.__wrap(ret);
1583 const WasmApiWalletTransactionDataFinalization = (typeof FinalizationRegistry === 'undefined')
1584 ? { register: () => {}, unregister: () => {} }
1585 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwallettransactiondata_free(ptr >>> 0, 1));
1587 export class WasmApiWalletTransactionData {
1589 static __wrap(ptr) {
1591 const obj = Object.create(WasmApiWalletTransactionData.prototype);
1592 obj.__wbg_ptr = ptr;
1593 WasmApiWalletTransactionDataFinalization.register(obj, obj.__wbg_ptr, obj);
1597 static __unwrap(jsValue) {
1598 if (!(jsValue instanceof WasmApiWalletTransactionData)) {
1601 return jsValue.__destroy_into_raw();
1604 __destroy_into_raw() {
1605 const ptr = this.__wbg_ptr;
1607 WasmApiWalletTransactionDataFinalization.unregister(this);
1612 const ptr = this.__destroy_into_raw();
1613 wasm.__wbg_wasmapiwallettransactiondata_free(ptr, 0);
1616 * @returns {WasmApiWalletTransaction}
1619 const ret = wasm.__wbg_get_wasmapiwallettransactiondata_Data(this.__wbg_ptr);
1620 return takeObject(ret);
1623 * @param {WasmApiWalletTransaction} arg0
1626 wasm.__wbg_set_wasmapiwallettransactiondata_Data(this.__wbg_ptr, addHeapObject(arg0));
1630 const WasmApiWalletTransactionsFinalization = (typeof FinalizationRegistry === 'undefined')
1631 ? { register: () => {}, unregister: () => {} }
1632 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwallettransactions_free(ptr >>> 0, 1));
1634 export class WasmApiWalletTransactions {
1636 static __wrap(ptr) {
1638 const obj = Object.create(WasmApiWalletTransactions.prototype);
1639 obj.__wbg_ptr = ptr;
1640 WasmApiWalletTransactionsFinalization.register(obj, obj.__wbg_ptr, obj);
1644 __destroy_into_raw() {
1645 const ptr = this.__wbg_ptr;
1647 WasmApiWalletTransactionsFinalization.unregister(this);
1652 const ptr = this.__destroy_into_raw();
1653 wasm.__wbg_wasmapiwallettransactions_free(ptr, 0);
1656 * @returns {(WasmApiWalletTransactionData)[]}
1660 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1661 wasm.__wbg_get_wasmapiwallettransactions_0(retptr, this.__wbg_ptr);
1662 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1663 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1664 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1665 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
1668 wasm.__wbindgen_add_to_stack_pointer(16);
1672 * @param {(WasmApiWalletTransactionData)[]} arg0
1675 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
1676 const len0 = WASM_VECTOR_LEN;
1677 wasm.__wbg_set_wasmapiwallettransactions_0(this.__wbg_ptr, ptr0, len0);
1681 const WasmApiWalletsDataFinalization = (typeof FinalizationRegistry === 'undefined')
1682 ? { register: () => {}, unregister: () => {} }
1683 : new FinalizationRegistry(ptr => wasm.__wbg_wasmapiwalletsdata_free(ptr >>> 0, 1));
1685 export class WasmApiWalletsData {
1687 static __wrap(ptr) {
1689 const obj = Object.create(WasmApiWalletsData.prototype);
1690 obj.__wbg_ptr = ptr;
1691 WasmApiWalletsDataFinalization.register(obj, obj.__wbg_ptr, obj);
1695 __destroy_into_raw() {
1696 const ptr = this.__wbg_ptr;
1698 WasmApiWalletsDataFinalization.unregister(this);
1703 const ptr = this.__destroy_into_raw();
1704 wasm.__wbg_wasmapiwalletsdata_free(ptr, 0);
1707 * @returns {(WasmApiWalletData)[]}
1711 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1712 wasm.__wbg_get_wasmapiwalletsdata_0(retptr, this.__wbg_ptr);
1713 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1714 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1715 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1716 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
1719 wasm.__wbindgen_add_to_stack_pointer(16);
1723 * @param {(WasmApiWalletData)[]} arg0
1726 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
1727 const len0 = WASM_VECTOR_LEN;
1728 wasm.__wbg_set_wasmapiwalletsdata_0(this.__wbg_ptr, ptr0, len0);
1732 const WasmAuthDataFinalization = (typeof FinalizationRegistry === 'undefined')
1733 ? { register: () => {}, unregister: () => {} }
1734 : new FinalizationRegistry(ptr => wasm.__wbg_wasmauthdata_free(ptr >>> 0, 1));
1736 export class WasmAuthData {
1738 __destroy_into_raw() {
1739 const ptr = this.__wbg_ptr;
1741 WasmAuthDataFinalization.unregister(this);
1746 const ptr = this.__destroy_into_raw();
1747 wasm.__wbg_wasmauthdata_free(ptr, 0);
1756 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1757 wasm.__wbg_get_wasmauthdata_uid(retptr, this.__wbg_ptr);
1758 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1759 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1762 return getStringFromWasm0(r0, r1);
1764 wasm.__wbindgen_add_to_stack_pointer(16);
1765 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
1769 * @param {string} arg0
1772 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1773 const len0 = WASM_VECTOR_LEN;
1774 wasm.__wbg_set_wasmauthdata_uid(this.__wbg_ptr, ptr0, len0);
1783 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1784 wasm.__wbg_get_wasmauthdata_access(retptr, this.__wbg_ptr);
1785 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1786 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1789 return getStringFromWasm0(r0, r1);
1791 wasm.__wbindgen_add_to_stack_pointer(16);
1792 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
1796 * @param {string} arg0
1799 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1800 const len0 = WASM_VECTOR_LEN;
1801 wasm.__wbg_set_wasmauthdata_access(this.__wbg_ptr, ptr0, len0);
1810 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1811 wasm.__wbg_get_wasmauthdata_refresh(retptr, this.__wbg_ptr);
1812 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1813 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1816 return getStringFromWasm0(r0, r1);
1818 wasm.__wbindgen_add_to_stack_pointer(16);
1819 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
1823 * @param {string} arg0
1826 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1827 const len0 = WASM_VECTOR_LEN;
1828 wasm.__wbg_set_wasmauthdata_refresh(this.__wbg_ptr, ptr0, len0);
1831 * @returns {(string)[]}
1835 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1836 wasm.__wbg_get_wasmauthdata_scopes(retptr, this.__wbg_ptr);
1837 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1838 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1839 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1840 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
1843 wasm.__wbindgen_add_to_stack_pointer(16);
1847 * @param {(string)[]} arg0
1850 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
1851 const len0 = WASM_VECTOR_LEN;
1852 wasm.__wbg_set_wasmauthdata_scopes(this.__wbg_ptr, ptr0, len0);
1856 const WasmBalanceWrapperFinalization = (typeof FinalizationRegistry === 'undefined')
1857 ? { register: () => {}, unregister: () => {} }
1858 : new FinalizationRegistry(ptr => wasm.__wbg_wasmbalancewrapper_free(ptr >>> 0, 1));
1860 export class WasmBalanceWrapper {
1862 static __wrap(ptr) {
1864 const obj = Object.create(WasmBalanceWrapper.prototype);
1865 obj.__wbg_ptr = ptr;
1866 WasmBalanceWrapperFinalization.register(obj, obj.__wbg_ptr, obj);
1870 __destroy_into_raw() {
1871 const ptr = this.__wbg_ptr;
1873 WasmBalanceWrapperFinalization.unregister(this);
1878 const ptr = this.__destroy_into_raw();
1879 wasm.__wbg_wasmbalancewrapper_free(ptr, 0);
1882 * @returns {WasmBalance}
1885 const ret = wasm.__wbg_get_wasmbalancewrapper_data(this.__wbg_ptr);
1886 return takeObject(ret);
1889 * @param {WasmBalance} arg0
1892 wasm.__wbg_set_wasmbalancewrapper_data(this.__wbg_ptr, addHeapObject(arg0));
1896 const WasmBitcoinAddressClientFinalization = (typeof FinalizationRegistry === 'undefined')
1897 ? { register: () => {}, unregister: () => {} }
1898 : new FinalizationRegistry(ptr => wasm.__wbg_wasmbitcoinaddressclient_free(ptr >>> 0, 1));
1900 export class WasmBitcoinAddressClient {
1902 static __wrap(ptr) {
1904 const obj = Object.create(WasmBitcoinAddressClient.prototype);
1905 obj.__wbg_ptr = ptr;
1906 WasmBitcoinAddressClientFinalization.register(obj, obj.__wbg_ptr, obj);
1910 __destroy_into_raw() {
1911 const ptr = this.__wbg_ptr;
1913 WasmBitcoinAddressClientFinalization.unregister(this);
1918 const ptr = this.__destroy_into_raw();
1919 wasm.__wbg_wasmbitcoinaddressclient_free(ptr, 0);
1922 * @param {string} wallet_id
1923 * @param {string} wallet_account_id
1924 * @param {number | undefined} [only_without_bitcoin_addresses]
1925 * @returns {Promise<WasmApiWalletBitcoinAddresses>}
1927 getBitcoinAddresses(wallet_id, wallet_account_id, only_without_bitcoin_addresses) {
1928 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1929 const len0 = WASM_VECTOR_LEN;
1930 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1931 const len1 = WASM_VECTOR_LEN;
1932 const ret = wasm.wasmbitcoinaddressclient_getBitcoinAddresses(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(only_without_bitcoin_addresses) ? 0xFFFFFF : only_without_bitcoin_addresses);
1933 return takeObject(ret);
1936 * @param {string} wallet_id
1937 * @param {string} wallet_account_id
1938 * @returns {Promise<bigint>}
1940 getBitcoinAddressHighestIndex(wallet_id, wallet_account_id) {
1941 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1942 const len0 = WASM_VECTOR_LEN;
1943 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1944 const len1 = WASM_VECTOR_LEN;
1945 const ret = wasm.wasmbitcoinaddressclient_getBitcoinAddressHighestIndex(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1946 return takeObject(ret);
1949 * @param {string} wallet_id
1950 * @param {string} wallet_account_id
1951 * @param {WasmApiBitcoinAddressesCreationPayload} bitcoin_addresses
1952 * @returns {Promise<WasmApiWalletBitcoinAddresses>}
1954 addBitcoinAddresses(wallet_id, wallet_account_id, bitcoin_addresses) {
1955 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1956 const len0 = WASM_VECTOR_LEN;
1957 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1958 const len1 = WASM_VECTOR_LEN;
1959 _assertClass(bitcoin_addresses, WasmApiBitcoinAddressesCreationPayload);
1960 var ptr2 = bitcoin_addresses.__destroy_into_raw();
1961 const ret = wasm.wasmbitcoinaddressclient_addBitcoinAddresses(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2);
1962 return takeObject(ret);
1965 * @param {string} wallet_id
1966 * @param {string} wallet_account_id
1967 * @param {string} wallet_account_bitcoin_address_id
1968 * @param {WasmApiBitcoinAddressCreationPayload} bitcoin_address
1969 * @returns {Promise<WasmApiWalletBitcoinAddressData>}
1971 updateBitcoinAddress(wallet_id, wallet_account_id, wallet_account_bitcoin_address_id, bitcoin_address) {
1972 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1973 const len0 = WASM_VECTOR_LEN;
1974 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1975 const len1 = WASM_VECTOR_LEN;
1976 const ptr2 = passStringToWasm0(wallet_account_bitcoin_address_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1977 const len2 = WASM_VECTOR_LEN;
1978 const ret = wasm.wasmbitcoinaddressclient_updateBitcoinAddress(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, addHeapObject(bitcoin_address));
1979 return takeObject(ret);
1983 const WasmBlockchainClientFinalization = (typeof FinalizationRegistry === 'undefined')
1984 ? { register: () => {}, unregister: () => {} }
1985 : new FinalizationRegistry(ptr => wasm.__wbg_wasmblockchainclient_free(ptr >>> 0, 1));
1987 export class WasmBlockchainClient {
1989 __destroy_into_raw() {
1990 const ptr = this.__wbg_ptr;
1992 WasmBlockchainClientFinalization.unregister(this);
1997 const ptr = this.__destroy_into_raw();
1998 wasm.__wbg_wasmblockchainclient_free(ptr, 0);
2001 * Generates a Mnemonic with a random entropy based on the given word
2003 * @param {WasmProtonWalletApiClient} proton_api_client
2005 constructor(proton_api_client) {
2007 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2008 _assertClass(proton_api_client, WasmProtonWalletApiClient);
2009 wasm.wasmblockchainclient_new(retptr, proton_api_client.__wbg_ptr);
2010 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2011 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2012 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2014 throw takeObject(r1);
2016 this.__wbg_ptr = r0 >>> 0;
2017 WasmBlockchainClientFinalization.register(this, this.__wbg_ptr, this);
2020 wasm.__wbindgen_add_to_stack_pointer(16);
2024 * @returns {Promise<Map<string, number>>}
2026 getFeesEstimation() {
2027 const ret = wasm.wasmblockchainclient_getFeesEstimation(this.__wbg_ptr);
2028 return takeObject(ret);
2031 * @returns {Promise<WasmMinimumFees>}
2034 const ret = wasm.wasmblockchainclient_getMininumFees(this.__wbg_ptr);
2035 return takeObject(ret);
2038 * @param {WasmAccount} account
2039 * @param {number | undefined} [stop_gap]
2040 * @returns {Promise<void>}
2042 fullSync(account, stop_gap) {
2043 _assertClass(account, WasmAccount);
2044 const ret = wasm.wasmblockchainclient_fullSync(this.__wbg_ptr, account.__wbg_ptr, !isLikeNone(stop_gap), isLikeNone(stop_gap) ? 0 : stop_gap);
2045 return takeObject(ret);
2048 * @param {WasmAccount} account
2049 * @returns {Promise<void>}
2051 partialSync(account) {
2052 _assertClass(account, WasmAccount);
2053 const ret = wasm.wasmblockchainclient_partialSync(this.__wbg_ptr, account.__wbg_ptr);
2054 return takeObject(ret);
2057 * @param {WasmAccount} account
2058 * @returns {Promise<boolean>}
2060 shouldSync(account) {
2061 _assertClass(account, WasmAccount);
2062 const ret = wasm.wasmblockchainclient_shouldSync(this.__wbg_ptr, account.__wbg_ptr);
2063 return takeObject(ret);
2066 * @param {WasmPsbt} psbt
2067 * @param {string} wallet_id
2068 * @param {string} wallet_account_id
2069 * @param {WasmTransactionData} transaction_data
2070 * @param {WasmEmailIntegrationData | undefined} [email_integration]
2071 * @returns {Promise<string>}
2073 broadcastPsbt(psbt, wallet_id, wallet_account_id, transaction_data, email_integration) {
2074 _assertClass(psbt, WasmPsbt);
2075 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2076 const len0 = WASM_VECTOR_LEN;
2077 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2078 const len1 = WASM_VECTOR_LEN;
2079 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));
2080 return takeObject(ret);
2084 const WasmCountriesAndProviderTuppleFinalization = (typeof FinalizationRegistry === 'undefined')
2085 ? { register: () => {}, unregister: () => {} }
2086 : new FinalizationRegistry(ptr => wasm.__wbg_wasmcountriesandprovidertupple_free(ptr >>> 0, 1));
2088 export class WasmCountriesAndProviderTupple {
2090 static __wrap(ptr) {
2092 const obj = Object.create(WasmCountriesAndProviderTupple.prototype);
2093 obj.__wbg_ptr = ptr;
2094 WasmCountriesAndProviderTuppleFinalization.register(obj, obj.__wbg_ptr, obj);
2098 static __unwrap(jsValue) {
2099 if (!(jsValue instanceof WasmCountriesAndProviderTupple)) {
2102 return jsValue.__destroy_into_raw();
2105 __destroy_into_raw() {
2106 const ptr = this.__wbg_ptr;
2108 WasmCountriesAndProviderTuppleFinalization.unregister(this);
2113 const ptr = this.__destroy_into_raw();
2114 wasm.__wbg_wasmcountriesandprovidertupple_free(ptr, 0);
2117 * @returns {WasmGatewayProvider}
2120 const ret = wasm.__wbg_get_wasmcountriesandprovidertupple_0(this.__wbg_ptr);
2121 return takeObject(ret);
2124 * @param {WasmGatewayProvider} arg0
2127 wasm.__wbg_set_wasmcountriesandprovidertupple_0(this.__wbg_ptr, addHeapObject(arg0));
2130 * @returns {WasmCountries}
2133 const ret = wasm.__wbg_get_wasmcountriesandprovidertupple_1(this.__wbg_ptr);
2134 return takeObject(ret);
2137 * @param {WasmCountries} arg0
2140 wasm.__wbg_set_wasmcountriesandprovidertupple_1(this.__wbg_ptr, addHeapObject(arg0));
2144 const WasmCountriesByProviderFinalization = (typeof FinalizationRegistry === 'undefined')
2145 ? { register: () => {}, unregister: () => {} }
2146 : new FinalizationRegistry(ptr => wasm.__wbg_wasmcountriesbyprovider_free(ptr >>> 0, 1));
2148 export class WasmCountriesByProvider {
2150 static __wrap(ptr) {
2152 const obj = Object.create(WasmCountriesByProvider.prototype);
2153 obj.__wbg_ptr = ptr;
2154 WasmCountriesByProviderFinalization.register(obj, obj.__wbg_ptr, obj);
2158 __destroy_into_raw() {
2159 const ptr = this.__wbg_ptr;
2161 WasmCountriesByProviderFinalization.unregister(this);
2166 const ptr = this.__destroy_into_raw();
2167 wasm.__wbg_wasmcountriesbyprovider_free(ptr, 0);
2170 * @returns {(WasmCountriesAndProviderTupple)[]}
2174 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2175 wasm.__wbg_get_wasmcountriesbyprovider_data(retptr, this.__wbg_ptr);
2176 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2177 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2178 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2179 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
2182 wasm.__wbindgen_add_to_stack_pointer(16);
2186 * @param {(WasmCountriesAndProviderTupple)[]} arg0
2189 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
2190 const len0 = WASM_VECTOR_LEN;
2191 wasm.__wbg_set_wasmcountriesbyprovider_data(this.__wbg_ptr, ptr0, len0);
2195 const WasmDerivationPathFinalization = (typeof FinalizationRegistry === 'undefined')
2196 ? { register: () => {}, unregister: () => {} }
2197 : new FinalizationRegistry(ptr => wasm.__wbg_wasmderivationpath_free(ptr >>> 0, 1));
2199 export class WasmDerivationPath {
2201 static __wrap(ptr) {
2203 const obj = Object.create(WasmDerivationPath.prototype);
2204 obj.__wbg_ptr = ptr;
2205 WasmDerivationPathFinalization.register(obj, obj.__wbg_ptr, obj);
2209 __destroy_into_raw() {
2210 const ptr = this.__wbg_ptr;
2212 WasmDerivationPathFinalization.unregister(this);
2217 const ptr = this.__destroy_into_raw();
2218 wasm.__wbg_wasmderivationpath_free(ptr, 0);
2221 * @param {string} path
2225 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2226 const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2227 const len0 = WASM_VECTOR_LEN;
2228 wasm.wasmderivationpath_new(retptr, ptr0, len0);
2229 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2230 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2231 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2233 throw takeObject(r1);
2235 this.__wbg_ptr = r0 >>> 0;
2236 WasmDerivationPathFinalization.register(this, this.__wbg_ptr, this);
2239 wasm.__wbindgen_add_to_stack_pointer(16);
2243 * @param {WasmScriptType} script_type
2244 * @param {WasmNetwork} network
2245 * @param {number} account_index
2246 * @returns {WasmDerivationPath}
2248 static fromParts(script_type, network, account_index) {
2249 const ret = wasm.wasmderivationpath_fromParts(script_type, network, account_index);
2250 return WasmDerivationPath.__wrap(ret);
2253 * @param {string} str
2254 * @returns {WasmDerivationPath}
2256 static fromString(str) {
2258 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2259 const ptr0 = passStringToWasm0(str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2260 const len0 = WASM_VECTOR_LEN;
2261 wasm.wasmderivationpath_fromString(retptr, ptr0, len0);
2262 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2263 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2264 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2266 throw takeObject(r1);
2268 return WasmDerivationPath.__wrap(r0);
2270 wasm.__wbindgen_add_to_stack_pointer(16);
2280 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2281 wasm.wasmderivationpath_toString(retptr, this.__wbg_ptr);
2282 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2283 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2286 return getStringFromWasm0(r0, r1);
2288 wasm.__wbindgen_add_to_stack_pointer(16);
2289 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
2294 const WasmDetailledTxInFinalization = (typeof FinalizationRegistry === 'undefined')
2295 ? { register: () => {}, unregister: () => {} }
2296 : new FinalizationRegistry(ptr => wasm.__wbg_wasmdetailledtxin_free(ptr >>> 0, 1));
2298 export class WasmDetailledTxIn {
2300 __destroy_into_raw() {
2301 const ptr = this.__wbg_ptr;
2303 WasmDetailledTxInFinalization.unregister(this);
2308 const ptr = this.__destroy_into_raw();
2309 wasm.__wbg_wasmdetailledtxin_free(ptr, 0);
2312 * @returns {WasmTxOut | undefined}
2314 get previous_output() {
2315 const ret = wasm.__wbg_get_wasmdetailledtxin_previous_output(this.__wbg_ptr);
2316 return ret === 0 ? undefined : WasmTxOut.__wrap(ret);
2319 * @param {WasmTxOut | undefined} [arg0]
2321 set previous_output(arg0) {
2323 if (!isLikeNone(arg0)) {
2324 _assertClass(arg0, WasmTxOut);
2325 ptr0 = arg0.__destroy_into_raw();
2327 wasm.__wbg_set_wasmdetailledtxin_previous_output(this.__wbg_ptr, ptr0);
2330 * @returns {WasmScript}
2333 const ret = wasm.__wbg_get_wasmdetailledtxin_script_sig(this.__wbg_ptr);
2334 return WasmScript.__wrap(ret);
2337 * @param {WasmScript} arg0
2339 set script_sig(arg0) {
2340 _assertClass(arg0, WasmScript);
2341 var ptr0 = arg0.__destroy_into_raw();
2342 wasm.__wbg_set_wasmdetailledtxin_script_sig(this.__wbg_ptr, ptr0);
2345 * @returns {WasmSequence}
2348 const ret = wasm.__wbg_get_wasmdetailledtxin_sequence(this.__wbg_ptr);
2349 return WasmSequence.__wrap(ret);
2352 * @param {WasmSequence} arg0
2354 set sequence(arg0) {
2355 _assertClass(arg0, WasmSequence);
2356 var ptr0 = arg0.__destroy_into_raw();
2357 wasm.__wbg_set_wasmdetailledtxin_sequence(this.__wbg_ptr, ptr0);
2361 const WasmDiscoveredAccountFinalization = (typeof FinalizationRegistry === 'undefined')
2362 ? { register: () => {}, unregister: () => {} }
2363 : new FinalizationRegistry(ptr => wasm.__wbg_wasmdiscoveredaccount_free(ptr >>> 0, 1));
2365 export class WasmDiscoveredAccount {
2367 static __wrap(ptr) {
2369 const obj = Object.create(WasmDiscoveredAccount.prototype);
2370 obj.__wbg_ptr = ptr;
2371 WasmDiscoveredAccountFinalization.register(obj, obj.__wbg_ptr, obj);
2375 static __unwrap(jsValue) {
2376 if (!(jsValue instanceof WasmDiscoveredAccount)) {
2379 return jsValue.__destroy_into_raw();
2382 __destroy_into_raw() {
2383 const ptr = this.__wbg_ptr;
2385 WasmDiscoveredAccountFinalization.unregister(this);
2390 const ptr = this.__destroy_into_raw();
2391 wasm.__wbg_wasmdiscoveredaccount_free(ptr, 0);
2394 * @returns {WasmScriptType}
2397 const ret = wasm.__wbg_get_wasmdiscoveredaccount_0(this.__wbg_ptr);
2401 * @param {WasmScriptType} arg0
2404 wasm.__wbg_set_wasmdiscoveredaccount_0(this.__wbg_ptr, arg0);
2410 const ret = wasm.__wbg_get_wasmdiscoveredaccount_1(this.__wbg_ptr);
2414 * @param {number} arg0
2417 wasm.__wbg_set_wasmdiscoveredaccount_1(this.__wbg_ptr, arg0);
2420 * @returns {WasmDerivationPath}
2423 const ret = wasm.__wbg_get_wasmdiscoveredaccount_2(this.__wbg_ptr);
2424 return WasmDerivationPath.__wrap(ret);
2427 * @param {WasmDerivationPath} arg0
2430 _assertClass(arg0, WasmDerivationPath);
2431 var ptr0 = arg0.__destroy_into_raw();
2432 wasm.__wbg_set_wasmdiscoveredaccount_2(this.__wbg_ptr, ptr0);
2436 const WasmDiscoveredAccountsFinalization = (typeof FinalizationRegistry === 'undefined')
2437 ? { register: () => {}, unregister: () => {} }
2438 : new FinalizationRegistry(ptr => wasm.__wbg_wasmdiscoveredaccounts_free(ptr >>> 0, 1));
2440 export class WasmDiscoveredAccounts {
2442 static __wrap(ptr) {
2444 const obj = Object.create(WasmDiscoveredAccounts.prototype);
2445 obj.__wbg_ptr = ptr;
2446 WasmDiscoveredAccountsFinalization.register(obj, obj.__wbg_ptr, obj);
2450 __destroy_into_raw() {
2451 const ptr = this.__wbg_ptr;
2453 WasmDiscoveredAccountsFinalization.unregister(this);
2458 const ptr = this.__destroy_into_raw();
2459 wasm.__wbg_wasmdiscoveredaccounts_free(ptr, 0);
2462 * @returns {(WasmDiscoveredAccount)[]}
2466 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2467 wasm.__wbg_get_wasmdiscoveredaccounts_data(retptr, this.__wbg_ptr);
2468 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2469 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2470 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2471 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
2474 wasm.__wbindgen_add_to_stack_pointer(16);
2478 * @param {(WasmDiscoveredAccount)[]} arg0
2481 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
2482 const len0 = WASM_VECTOR_LEN;
2483 wasm.__wbg_set_wasmdiscoveredaccounts_data(this.__wbg_ptr, ptr0, len0);
2487 const WasmEmailIntegrationClientFinalization = (typeof FinalizationRegistry === 'undefined')
2488 ? { register: () => {}, unregister: () => {} }
2489 : new FinalizationRegistry(ptr => wasm.__wbg_wasmemailintegrationclient_free(ptr >>> 0, 1));
2491 export class WasmEmailIntegrationClient {
2493 static __wrap(ptr) {
2495 const obj = Object.create(WasmEmailIntegrationClient.prototype);
2496 obj.__wbg_ptr = ptr;
2497 WasmEmailIntegrationClientFinalization.register(obj, obj.__wbg_ptr, obj);
2501 __destroy_into_raw() {
2502 const ptr = this.__wbg_ptr;
2504 WasmEmailIntegrationClientFinalization.unregister(this);
2509 const ptr = this.__destroy_into_raw();
2510 wasm.__wbg_wasmemailintegrationclient_free(ptr, 0);
2513 * @param {string} email
2514 * @returns {Promise<WasmApiWalletBitcoinAddressLookupData>}
2516 lookupBitcoinAddress(email) {
2517 const ptr0 = passStringToWasm0(email, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2518 const len0 = WASM_VECTOR_LEN;
2519 const ret = wasm.wasmemailintegrationclient_lookupBitcoinAddress(this.__wbg_ptr, ptr0, len0);
2520 return takeObject(ret);
2523 * @param {string} email
2524 * @returns {Promise<void>}
2526 createBitcoinAddressesRequest(email) {
2527 const ptr0 = passStringToWasm0(email, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2528 const len0 = WASM_VECTOR_LEN;
2529 const ret = wasm.wasmemailintegrationclient_createBitcoinAddressesRequest(this.__wbg_ptr, ptr0, len0);
2530 return takeObject(ret);
2534 const WasmExchangeRateClientFinalization = (typeof FinalizationRegistry === 'undefined')
2535 ? { register: () => {}, unregister: () => {} }
2536 : new FinalizationRegistry(ptr => wasm.__wbg_wasmexchangerateclient_free(ptr >>> 0, 1));
2538 export class WasmExchangeRateClient {
2540 static __wrap(ptr) {
2542 const obj = Object.create(WasmExchangeRateClient.prototype);
2543 obj.__wbg_ptr = ptr;
2544 WasmExchangeRateClientFinalization.register(obj, obj.__wbg_ptr, obj);
2548 __destroy_into_raw() {
2549 const ptr = this.__wbg_ptr;
2551 WasmExchangeRateClientFinalization.unregister(this);
2556 const ptr = this.__destroy_into_raw();
2557 wasm.__wbg_wasmexchangerateclient_free(ptr, 0);
2560 * @param {WasmFiatCurrencySymbol} fiat
2561 * @param {bigint | undefined} [time]
2562 * @returns {Promise<WasmApiExchangeRateData>}
2564 getExchangeRate(fiat, time) {
2565 const ret = wasm.wasmexchangerateclient_getExchangeRate(this.__wbg_ptr, addHeapObject(fiat), !isLikeNone(time), isLikeNone(time) ? BigInt(0) : time);
2566 return takeObject(ret);
2569 * @returns {Promise<WasmApiFiatCurrencies>}
2571 getAllFiatCurrencies() {
2572 const ret = wasm.wasmexchangerateclient_getAllFiatCurrencies(this.__wbg_ptr);
2573 return takeObject(ret);
2577 const WasmFiatCurrenciesAndProviderTuppleFinalization = (typeof FinalizationRegistry === 'undefined')
2578 ? { register: () => {}, unregister: () => {} }
2579 : new FinalizationRegistry(ptr => wasm.__wbg_wasmfiatcurrenciesandprovidertupple_free(ptr >>> 0, 1));
2581 export class WasmFiatCurrenciesAndProviderTupple {
2583 static __wrap(ptr) {
2585 const obj = Object.create(WasmFiatCurrenciesAndProviderTupple.prototype);
2586 obj.__wbg_ptr = ptr;
2587 WasmFiatCurrenciesAndProviderTuppleFinalization.register(obj, obj.__wbg_ptr, obj);
2591 static __unwrap(jsValue) {
2592 if (!(jsValue instanceof WasmFiatCurrenciesAndProviderTupple)) {
2595 return jsValue.__destroy_into_raw();
2598 __destroy_into_raw() {
2599 const ptr = this.__wbg_ptr;
2601 WasmFiatCurrenciesAndProviderTuppleFinalization.unregister(this);
2606 const ptr = this.__destroy_into_raw();
2607 wasm.__wbg_wasmfiatcurrenciesandprovidertupple_free(ptr, 0);
2610 * @returns {WasmGatewayProvider}
2613 const ret = wasm.__wbg_get_wasmcountriesandprovidertupple_0(this.__wbg_ptr);
2614 return takeObject(ret);
2617 * @param {WasmGatewayProvider} arg0
2620 wasm.__wbg_set_wasmcountriesandprovidertupple_0(this.__wbg_ptr, addHeapObject(arg0));
2623 * @returns {WasmFiatCurrencies}
2626 const ret = wasm.__wbg_get_wasmfiatcurrenciesandprovidertupple_1(this.__wbg_ptr);
2627 return takeObject(ret);
2630 * @param {WasmFiatCurrencies} arg0
2633 wasm.__wbg_set_wasmfiatcurrenciesandprovidertupple_1(this.__wbg_ptr, addHeapObject(arg0));
2637 const WasmFiatCurrenciesByProviderFinalization = (typeof FinalizationRegistry === 'undefined')
2638 ? { register: () => {}, unregister: () => {} }
2639 : new FinalizationRegistry(ptr => wasm.__wbg_wasmfiatcurrenciesbyprovider_free(ptr >>> 0, 1));
2641 export class WasmFiatCurrenciesByProvider {
2643 static __wrap(ptr) {
2645 const obj = Object.create(WasmFiatCurrenciesByProvider.prototype);
2646 obj.__wbg_ptr = ptr;
2647 WasmFiatCurrenciesByProviderFinalization.register(obj, obj.__wbg_ptr, obj);
2651 __destroy_into_raw() {
2652 const ptr = this.__wbg_ptr;
2654 WasmFiatCurrenciesByProviderFinalization.unregister(this);
2659 const ptr = this.__destroy_into_raw();
2660 wasm.__wbg_wasmfiatcurrenciesbyprovider_free(ptr, 0);
2663 * @returns {(WasmFiatCurrenciesAndProviderTupple)[]}
2667 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2668 wasm.__wbg_get_wasmfiatcurrenciesbyprovider_data(retptr, this.__wbg_ptr);
2669 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2670 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2671 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2672 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
2675 wasm.__wbindgen_add_to_stack_pointer(16);
2679 * @param {(WasmFiatCurrenciesAndProviderTupple)[]} arg0
2682 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
2683 const len0 = WASM_VECTOR_LEN;
2684 wasm.__wbg_set_wasmfiatcurrenciesbyprovider_data(this.__wbg_ptr, ptr0, len0);
2688 const WasmInviteClientFinalization = (typeof FinalizationRegistry === 'undefined')
2689 ? { register: () => {}, unregister: () => {} }
2690 : new FinalizationRegistry(ptr => wasm.__wbg_wasminviteclient_free(ptr >>> 0, 1));
2692 export class WasmInviteClient {
2694 static __wrap(ptr) {
2696 const obj = Object.create(WasmInviteClient.prototype);
2697 obj.__wbg_ptr = ptr;
2698 WasmInviteClientFinalization.register(obj, obj.__wbg_ptr, obj);
2702 __destroy_into_raw() {
2703 const ptr = this.__wbg_ptr;
2705 WasmInviteClientFinalization.unregister(this);
2710 const ptr = this.__destroy_into_raw();
2711 wasm.__wbg_wasminviteclient_free(ptr, 0);
2714 * @param {string} invitee_email
2715 * @param {string} inviter_address_id
2716 * @returns {Promise<void>}
2718 sendNewcomerInvite(invitee_email, inviter_address_id) {
2719 const ptr0 = passStringToWasm0(invitee_email, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2720 const len0 = WASM_VECTOR_LEN;
2721 const ptr1 = passStringToWasm0(inviter_address_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2722 const len1 = WASM_VECTOR_LEN;
2723 const ret = wasm.wasminviteclient_sendNewcomerInvite(this.__wbg_ptr, ptr0, len0, ptr1, len1);
2724 return takeObject(ret);
2727 * @param {string} invitee_email
2728 * @param {WasmInviteNotificationType} invite_notification_type
2729 * @param {string} inviter_address_id
2730 * @returns {Promise<number>}
2732 checkInviteStatus(invitee_email, invite_notification_type, inviter_address_id) {
2733 const ptr0 = passStringToWasm0(invitee_email, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2734 const len0 = WASM_VECTOR_LEN;
2735 const ptr1 = passStringToWasm0(inviter_address_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2736 const len1 = WASM_VECTOR_LEN;
2737 const ret = wasm.wasminviteclient_checkInviteStatus(this.__wbg_ptr, ptr0, len0, addHeapObject(invite_notification_type), ptr1, len1);
2738 return takeObject(ret);
2741 * @param {string} invitee_email
2742 * @param {string} inviter_address_id
2743 * @returns {Promise<void>}
2745 sendEmailIntegrationInvite(invitee_email, inviter_address_id) {
2746 const ptr0 = passStringToWasm0(invitee_email, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2747 const len0 = WASM_VECTOR_LEN;
2748 const ptr1 = passStringToWasm0(inviter_address_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2749 const len1 = WASM_VECTOR_LEN;
2750 const ret = wasm.wasminviteclient_sendEmailIntegrationInvite(this.__wbg_ptr, ptr0, len0, ptr1, len1);
2751 return takeObject(ret);
2754 * @returns {Promise<WasmRemainingMonthlyInvitations>}
2756 getRemainingMonthlyInvitation() {
2757 const ret = wasm.wasminviteclient_getRemainingMonthlyInvitation(this.__wbg_ptr);
2758 return takeObject(ret);
2762 const WasmLockTimeFinalization = (typeof FinalizationRegistry === 'undefined')
2763 ? { register: () => {}, unregister: () => {} }
2764 : new FinalizationRegistry(ptr => wasm.__wbg_wasmlocktime_free(ptr >>> 0, 1));
2766 export class WasmLockTime {
2768 static __wrap(ptr) {
2770 const obj = Object.create(WasmLockTime.prototype);
2771 obj.__wbg_ptr = ptr;
2772 WasmLockTimeFinalization.register(obj, obj.__wbg_ptr, obj);
2776 __destroy_into_raw() {
2777 const ptr = this.__wbg_ptr;
2779 WasmLockTimeFinalization.unregister(this);
2784 const ptr = this.__destroy_into_raw();
2785 wasm.__wbg_wasmlocktime_free(ptr, 0);
2788 * @param {number} height
2789 * @returns {WasmLockTime}
2791 static fromHeight(height) {
2792 const ret = wasm.wasmlocktime_fromHeight(height);
2793 return WasmLockTime.__wrap(ret);
2796 * @param {number} seconds
2797 * @returns {WasmLockTime}
2799 static fromSeconds(seconds) {
2800 const ret = wasm.wasmlocktime_fromSeconds(seconds);
2801 return WasmLockTime.__wrap(ret);
2804 * @returns {boolean}
2807 const ret = wasm.wasmlocktime_isBlockHeight(this.__wbg_ptr);
2811 * @returns {boolean}
2814 const ret = wasm.wasmlocktime_isBlockTime(this.__wbg_ptr);
2821 const ret = wasm.wasmlocktime_toConsensusU32(this.__wbg_ptr);
2826 const WasmMigratedWalletAccountDataFinalization = (typeof FinalizationRegistry === 'undefined')
2827 ? { register: () => {}, unregister: () => {} }
2828 : new FinalizationRegistry(ptr => wasm.__wbg_wasmmigratedwalletaccountdata_free(ptr >>> 0, 1));
2830 export class WasmMigratedWalletAccountData {
2832 static __wrap(ptr) {
2834 const obj = Object.create(WasmMigratedWalletAccountData.prototype);
2835 obj.__wbg_ptr = ptr;
2836 WasmMigratedWalletAccountDataFinalization.register(obj, obj.__wbg_ptr, obj);
2840 static __unwrap(jsValue) {
2841 if (!(jsValue instanceof WasmMigratedWalletAccountData)) {
2844 return jsValue.__destroy_into_raw();
2847 __destroy_into_raw() {
2848 const ptr = this.__wbg_ptr;
2850 WasmMigratedWalletAccountDataFinalization.unregister(this);
2855 const ptr = this.__destroy_into_raw();
2856 wasm.__wbg_wasmmigratedwalletaccountdata_free(ptr, 0);
2859 * @returns {WasmMigratedWalletAccount}
2862 const ret = wasm.__wbg_get_wasmmigratedwalletaccountdata_Data(this.__wbg_ptr);
2863 return takeObject(ret);
2866 * @param {WasmMigratedWalletAccount} arg0
2869 wasm.__wbg_set_wasmmigratedwalletaccountdata_Data(this.__wbg_ptr, addHeapObject(arg0));
2873 const WasmMigratedWalletAccountsFinalization = (typeof FinalizationRegistry === 'undefined')
2874 ? { register: () => {}, unregister: () => {} }
2875 : new FinalizationRegistry(ptr => wasm.__wbg_wasmmigratedwalletaccounts_free(ptr >>> 0, 1));
2877 export class WasmMigratedWalletAccounts {
2879 __destroy_into_raw() {
2880 const ptr = this.__wbg_ptr;
2882 WasmMigratedWalletAccountsFinalization.unregister(this);
2887 const ptr = this.__destroy_into_raw();
2888 wasm.__wbg_wasmmigratedwalletaccounts_free(ptr, 0);
2891 * @returns {(WasmMigratedWalletAccountData)[]}
2895 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2896 wasm.__wbg_get_wasmmigratedwalletaccounts_0(retptr, this.__wbg_ptr);
2897 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2898 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2899 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2900 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
2903 wasm.__wbindgen_add_to_stack_pointer(16);
2907 * @param {(WasmMigratedWalletAccountData)[]} arg0
2910 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
2911 const len0 = WASM_VECTOR_LEN;
2912 wasm.__wbg_set_wasmmigratedwalletaccounts_0(this.__wbg_ptr, ptr0, len0);
2915 const ret = wasm.wasmmigratedwalletaccounts_new();
2916 this.__wbg_ptr = ret >>> 0;
2917 WasmMigratedWalletAccountsFinalization.register(this, this.__wbg_ptr, this);
2921 * @param {WasmMigratedWalletAccount} account_data
2923 push(account_data) {
2924 wasm.wasmmigratedwalletaccounts_push(this.__wbg_ptr, addHeapObject(account_data));
2928 const WasmMigratedWalletTransactionDataFinalization = (typeof FinalizationRegistry === 'undefined')
2929 ? { register: () => {}, unregister: () => {} }
2930 : new FinalizationRegistry(ptr => wasm.__wbg_wasmmigratedwallettransactiondata_free(ptr >>> 0, 1));
2932 export class WasmMigratedWalletTransactionData {
2934 static __wrap(ptr) {
2936 const obj = Object.create(WasmMigratedWalletTransactionData.prototype);
2937 obj.__wbg_ptr = ptr;
2938 WasmMigratedWalletTransactionDataFinalization.register(obj, obj.__wbg_ptr, obj);
2942 static __unwrap(jsValue) {
2943 if (!(jsValue instanceof WasmMigratedWalletTransactionData)) {
2946 return jsValue.__destroy_into_raw();
2949 __destroy_into_raw() {
2950 const ptr = this.__wbg_ptr;
2952 WasmMigratedWalletTransactionDataFinalization.unregister(this);
2957 const ptr = this.__destroy_into_raw();
2958 wasm.__wbg_wasmmigratedwallettransactiondata_free(ptr, 0);
2961 * @returns {WasmMigratedWalletTransaction}
2964 const ret = wasm.__wbg_get_wasmmigratedwallettransactiondata_Data(this.__wbg_ptr);
2965 return takeObject(ret);
2968 * @param {WasmMigratedWalletTransaction} arg0
2971 wasm.__wbg_set_wasmmigratedwallettransactiondata_Data(this.__wbg_ptr, addHeapObject(arg0));
2975 const WasmMigratedWalletTransactionsFinalization = (typeof FinalizationRegistry === 'undefined')
2976 ? { register: () => {}, unregister: () => {} }
2977 : new FinalizationRegistry(ptr => wasm.__wbg_wasmmigratedwallettransactions_free(ptr >>> 0, 1));
2979 export class WasmMigratedWalletTransactions {
2981 __destroy_into_raw() {
2982 const ptr = this.__wbg_ptr;
2984 WasmMigratedWalletTransactionsFinalization.unregister(this);
2989 const ptr = this.__destroy_into_raw();
2990 wasm.__wbg_wasmmigratedwallettransactions_free(ptr, 0);
2993 * @returns {(WasmMigratedWalletTransactionData)[]}
2997 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2998 wasm.__wbg_get_wasmmigratedwallettransactions_0(retptr, this.__wbg_ptr);
2999 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3000 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3001 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
3002 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
3005 wasm.__wbindgen_add_to_stack_pointer(16);
3009 * @param {(WasmMigratedWalletTransactionData)[]} arg0
3012 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
3013 const len0 = WASM_VECTOR_LEN;
3014 wasm.__wbg_set_wasmmigratedwallettransactions_0(this.__wbg_ptr, ptr0, len0);
3017 const ret = wasm.wasmmigratedwallettransactions_new();
3018 this.__wbg_ptr = ret >>> 0;
3019 WasmMigratedWalletTransactionsFinalization.register(this, this.__wbg_ptr, this);
3023 * @param {WasmMigratedWalletTransaction} account_data
3025 push(account_data) {
3026 wasm.wasmmigratedwallettransactions_push(this.__wbg_ptr, addHeapObject(account_data));
3030 const WasmMinimumFeesFinalization = (typeof FinalizationRegistry === 'undefined')
3031 ? { register: () => {}, unregister: () => {} }
3032 : new FinalizationRegistry(ptr => wasm.__wbg_wasmminimumfees_free(ptr >>> 0, 1));
3034 export class WasmMinimumFees {
3036 static __wrap(ptr) {
3038 const obj = Object.create(WasmMinimumFees.prototype);
3039 obj.__wbg_ptr = ptr;
3040 WasmMinimumFeesFinalization.register(obj, obj.__wbg_ptr, obj);
3044 __destroy_into_raw() {
3045 const ptr = this.__wbg_ptr;
3047 WasmMinimumFeesFinalization.unregister(this);
3052 const ptr = this.__destroy_into_raw();
3053 wasm.__wbg_wasmminimumfees_free(ptr, 0);
3058 get MinimumBroadcastFee() {
3059 const ret = wasm.__wbg_get_wasmminimumfees_MinimumBroadcastFee(this.__wbg_ptr);
3063 * @param {number} arg0
3065 set MinimumBroadcastFee(arg0) {
3066 wasm.__wbg_set_wasmminimumfees_MinimumBroadcastFee(this.__wbg_ptr, arg0);
3071 get MinimumIncrementalFee() {
3072 const ret = wasm.__wbg_get_wasmminimumfees_MinimumIncrementalFee(this.__wbg_ptr);
3076 * @param {number} arg0
3078 set MinimumIncrementalFee(arg0) {
3079 wasm.__wbg_set_wasmminimumfees_MinimumIncrementalFee(this.__wbg_ptr, arg0);
3083 const WasmMnemonicFinalization = (typeof FinalizationRegistry === 'undefined')
3084 ? { register: () => {}, unregister: () => {} }
3085 : new FinalizationRegistry(ptr => wasm.__wbg_wasmmnemonic_free(ptr >>> 0, 1));
3087 export class WasmMnemonic {
3089 static __wrap(ptr) {
3091 const obj = Object.create(WasmMnemonic.prototype);
3092 obj.__wbg_ptr = ptr;
3093 WasmMnemonicFinalization.register(obj, obj.__wbg_ptr, obj);
3097 __destroy_into_raw() {
3098 const ptr = this.__wbg_ptr;
3100 WasmMnemonicFinalization.unregister(this);
3105 const ptr = this.__destroy_into_raw();
3106 wasm.__wbg_wasmmnemonic_free(ptr, 0);
3109 * Generates a Mnemonic with a random entropy based on the given word
3111 * @param {WasmWordCount} word_count
3113 constructor(word_count) {
3115 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3116 wasm.wasmmnemonic_new(retptr, word_count);
3117 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3118 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3119 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3121 throw takeObject(r1);
3123 this.__wbg_ptr = r0 >>> 0;
3124 WasmMnemonicFinalization.register(this, this.__wbg_ptr, this);
3127 wasm.__wbindgen_add_to_stack_pointer(16);
3131 * Parse a Mnemonic with the given string.
3132 * @param {string} mnemonic
3133 * @returns {WasmMnemonic}
3135 static fromString(mnemonic) {
3137 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3138 const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3139 const len0 = WASM_VECTOR_LEN;
3140 wasm.wasmmnemonic_fromString(retptr, ptr0, len0);
3141 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3142 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3143 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3145 throw takeObject(r1);
3147 return WasmMnemonic.__wrap(r0);
3149 wasm.__wbindgen_add_to_stack_pointer(16);
3153 * Returns the Mnemonic as a string.
3160 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3161 wasm.wasmmnemonic_asString(retptr, this.__wbg_ptr);
3162 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3163 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3166 return getStringFromWasm0(r0, r1);
3168 wasm.__wbindgen_add_to_stack_pointer(16);
3169 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
3173 * @returns {(string)[]}
3177 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3178 wasm.wasmmnemonic_asWords(retptr, this.__wbg_ptr);
3179 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3180 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3181 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
3182 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
3185 wasm.__wbindgen_add_to_stack_pointer(16);
3190 const WasmNetworkClientFinalization = (typeof FinalizationRegistry === 'undefined')
3191 ? { register: () => {}, unregister: () => {} }
3192 : new FinalizationRegistry(ptr => wasm.__wbg_wasmnetworkclient_free(ptr >>> 0, 1));
3194 export class WasmNetworkClient {
3196 static __wrap(ptr) {
3198 const obj = Object.create(WasmNetworkClient.prototype);
3199 obj.__wbg_ptr = ptr;
3200 WasmNetworkClientFinalization.register(obj, obj.__wbg_ptr, obj);
3204 __destroy_into_raw() {
3205 const ptr = this.__wbg_ptr;
3207 WasmNetworkClientFinalization.unregister(this);
3212 const ptr = this.__destroy_into_raw();
3213 wasm.__wbg_wasmnetworkclient_free(ptr, 0);
3216 * @returns {Promise<WasmNetwork>}
3219 const ret = wasm.wasmnetworkclient_getNetwork(this.__wbg_ptr);
3220 return takeObject(ret);
3224 const WasmOnchainPaymentLinkFinalization = (typeof FinalizationRegistry === 'undefined')
3225 ? { register: () => {}, unregister: () => {} }
3226 : new FinalizationRegistry(ptr => wasm.__wbg_wasmonchainpaymentlink_free(ptr >>> 0, 1));
3228 export class WasmOnchainPaymentLink {
3230 static __wrap(ptr) {
3232 const obj = Object.create(WasmOnchainPaymentLink.prototype);
3233 obj.__wbg_ptr = ptr;
3234 WasmOnchainPaymentLinkFinalization.register(obj, obj.__wbg_ptr, obj);
3238 __destroy_into_raw() {
3239 const ptr = this.__wbg_ptr;
3241 WasmOnchainPaymentLinkFinalization.unregister(this);
3246 const ptr = this.__destroy_into_raw();
3247 wasm.__wbg_wasmonchainpaymentlink_free(ptr, 0);
3250 * @returns {string | undefined}
3254 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3255 wasm.__wbg_get_wasmonchainpaymentlink_address(retptr, this.__wbg_ptr);
3256 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3257 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3260 v1 = getStringFromWasm0(r0, r1).slice();
3261 wasm.__wbindgen_export_5(r0, r1 * 1, 1);
3265 wasm.__wbindgen_add_to_stack_pointer(16);
3269 * @param {string | undefined} [arg0]
3272 var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3273 var len0 = WASM_VECTOR_LEN;
3274 wasm.__wbg_set_wasmonchainpaymentlink_address(this.__wbg_ptr, ptr0, len0);
3277 * @returns {bigint | undefined}
3281 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3282 wasm.__wbg_get_wasmonchainpaymentlink_amount(retptr, this.__wbg_ptr);
3283 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3284 var r2 = getDataViewMemory0().getBigInt64(retptr + 8 * 1, true);
3285 return r0 === 0 ? undefined : BigInt.asUintN(64, r2);
3287 wasm.__wbindgen_add_to_stack_pointer(16);
3291 * @param {bigint | undefined} [arg0]
3294 wasm.__wbg_set_wasmonchainpaymentlink_amount(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3297 * @returns {string | undefined}
3301 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3302 wasm.__wbg_get_wasmonchainpaymentlink_message(retptr, this.__wbg_ptr);
3303 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3304 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3307 v1 = getStringFromWasm0(r0, r1).slice();
3308 wasm.__wbindgen_export_5(r0, r1 * 1, 1);
3312 wasm.__wbindgen_add_to_stack_pointer(16);
3316 * @param {string | undefined} [arg0]
3319 var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3320 var len0 = WASM_VECTOR_LEN;
3321 wasm.__wbg_set_wasmonchainpaymentlink_message(this.__wbg_ptr, ptr0, len0);
3324 * @returns {string | undefined}
3328 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3329 wasm.__wbg_get_wasmonchainpaymentlink_label(retptr, this.__wbg_ptr);
3330 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3331 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3334 v1 = getStringFromWasm0(r0, r1).slice();
3335 wasm.__wbindgen_export_5(r0, r1 * 1, 1);
3339 wasm.__wbindgen_add_to_stack_pointer(16);
3343 * @param {string | undefined} [arg0]
3346 var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3347 var len0 = WASM_VECTOR_LEN;
3348 wasm.__wbg_set_wasmonchainpaymentlink_label(this.__wbg_ptr, ptr0, len0);
3352 const WasmOutPointFinalization = (typeof FinalizationRegistry === 'undefined')
3353 ? { register: () => {}, unregister: () => {} }
3354 : new FinalizationRegistry(ptr => wasm.__wbg_wasmoutpoint_free(ptr >>> 0, 1));
3356 * Serialised Outpoint under the form <txid>:<index>
3358 export class WasmOutPoint {
3360 static __wrap(ptr) {
3362 const obj = Object.create(WasmOutPoint.prototype);
3363 obj.__wbg_ptr = ptr;
3364 WasmOutPointFinalization.register(obj, obj.__wbg_ptr, obj);
3368 __destroy_into_raw() {
3369 const ptr = this.__wbg_ptr;
3371 WasmOutPointFinalization.unregister(this);
3376 const ptr = this.__destroy_into_raw();
3377 wasm.__wbg_wasmoutpoint_free(ptr, 0);
3386 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3387 wasm.__wbg_get_wasmoutpoint_0(retptr, this.__wbg_ptr);
3388 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3389 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3392 return getStringFromWasm0(r0, r1);
3394 wasm.__wbindgen_add_to_stack_pointer(16);
3395 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
3399 * @param {string} arg0
3402 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3403 const len0 = WASM_VECTOR_LEN;
3404 wasm.__wbg_set_wasmoutpoint_0(this.__wbg_ptr, ptr0, len0);
3407 * @param {string} str
3408 * @returns {WasmOutPoint}
3410 static fromString(str) {
3411 const ptr0 = passStringToWasm0(str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3412 const len0 = WASM_VECTOR_LEN;
3413 const ret = wasm.wasmoutpoint_fromString(ptr0, len0);
3414 return WasmOutPoint.__wrap(ret);
3418 const WasmPaymentGatewayClientFinalization = (typeof FinalizationRegistry === 'undefined')
3419 ? { register: () => {}, unregister: () => {} }
3420 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpaymentgatewayclient_free(ptr >>> 0, 1));
3422 export class WasmPaymentGatewayClient {
3424 static __wrap(ptr) {
3426 const obj = Object.create(WasmPaymentGatewayClient.prototype);
3427 obj.__wbg_ptr = ptr;
3428 WasmPaymentGatewayClientFinalization.register(obj, obj.__wbg_ptr, obj);
3432 __destroy_into_raw() {
3433 const ptr = this.__wbg_ptr;
3435 WasmPaymentGatewayClientFinalization.unregister(this);
3440 const ptr = this.__destroy_into_raw();
3441 wasm.__wbg_wasmpaymentgatewayclient_free(ptr, 0);
3444 * @returns {Promise<WasmCountriesByProvider>}
3447 const ret = wasm.wasmpaymentgatewayclient_getCountries(this.__wbg_ptr);
3448 return takeObject(ret);
3451 * @returns {Promise<WasmFiatCurrenciesByProvider>}
3453 getFiatCurrencies() {
3454 const ret = wasm.wasmpaymentgatewayclient_getFiatCurrencies(this.__wbg_ptr);
3455 return takeObject(ret);
3458 * @param {string} fiat_currency
3459 * @returns {Promise<WasmPaymentMethodsByProvider>}
3461 getPaymentMethods(fiat_currency) {
3462 const ptr0 = passStringToWasm0(fiat_currency, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3463 const len0 = WASM_VECTOR_LEN;
3464 const ret = wasm.wasmpaymentgatewayclient_getPaymentMethods(this.__wbg_ptr, ptr0, len0);
3465 return takeObject(ret);
3468 * @param {number} amount
3469 * @param {string} fiat_currency
3470 * @param {WasmPaymentMethod | undefined} [payment_method]
3471 * @param {WasmGatewayProvider | undefined} [provider]
3472 * @returns {Promise<WasmQuotesByProvider>}
3474 getQuotes(amount, fiat_currency, payment_method, provider) {
3475 const ptr0 = passStringToWasm0(fiat_currency, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3476 const len0 = WASM_VECTOR_LEN;
3477 const ret = wasm.wasmpaymentgatewayclient_getQuotes(this.__wbg_ptr, amount, ptr0, len0, isLikeNone(payment_method) ? 0 : addHeapObject(payment_method), isLikeNone(provider) ? 0 : addHeapObject(provider));
3478 return takeObject(ret);
3481 * @param {string} amount
3482 * @param {string} btc_address
3483 * @param {string} fiat_currency
3484 * @param {WasmPaymentMethod} payment_method
3485 * @param {WasmGatewayProvider} provider
3486 * @param {string} order_id
3487 * @returns {Promise<string>}
3489 createOnRampCheckout(amount, btc_address, fiat_currency, payment_method, provider, order_id) {
3490 const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3491 const len0 = WASM_VECTOR_LEN;
3492 const ptr1 = passStringToWasm0(btc_address, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3493 const len1 = WASM_VECTOR_LEN;
3494 const ptr2 = passStringToWasm0(fiat_currency, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3495 const len2 = WASM_VECTOR_LEN;
3496 const ptr3 = passStringToWasm0(order_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3497 const len3 = WASM_VECTOR_LEN;
3498 const ret = wasm.wasmpaymentgatewayclient_createOnRampCheckout(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, addHeapObject(payment_method), addHeapObject(provider), ptr3, len3);
3499 return takeObject(ret);
3502 * @param {string} url
3503 * @param {WasmGatewayProvider} provider
3504 * @returns {Promise<string>}
3506 signUrl(url, provider) {
3507 const ptr0 = passStringToWasm0(url, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3508 const len0 = WASM_VECTOR_LEN;
3509 const ret = wasm.wasmpaymentgatewayclient_signUrl(this.__wbg_ptr, ptr0, len0, addHeapObject(provider));
3510 return takeObject(ret);
3513 * @param {WasmGatewayProvider} provider
3514 * @returns {Promise<string>}
3516 getPublicApiKey(provider) {
3517 const ret = wasm.wasmpaymentgatewayclient_getPublicApiKey(this.__wbg_ptr, addHeapObject(provider));
3518 return takeObject(ret);
3521 * @param {number} amount
3522 * @param {string} address
3523 * @param {string} fiat_currency
3524 * @param {WasmPaymentMethod} payment_method
3525 * @param {WasmGatewayProvider} provider
3528 getCheckoutIframeSrc(amount, address, fiat_currency, payment_method, provider) {
3532 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3533 const ptr0 = passStringToWasm0(address, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3534 const len0 = WASM_VECTOR_LEN;
3535 const ptr1 = passStringToWasm0(fiat_currency, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3536 const len1 = WASM_VECTOR_LEN;
3537 wasm.wasmpaymentgatewayclient_getCheckoutIframeSrc(retptr, this.__wbg_ptr, amount, ptr0, len0, ptr1, len1, addHeapObject(payment_method), addHeapObject(provider));
3538 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3539 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3542 return getStringFromWasm0(r0, r1);
3544 wasm.__wbindgen_add_to_stack_pointer(16);
3545 wasm.__wbindgen_export_5(deferred3_0, deferred3_1, 1);
3550 const WasmPaymentLinkFinalization = (typeof FinalizationRegistry === 'undefined')
3551 ? { register: () => {}, unregister: () => {} }
3552 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpaymentlink_free(ptr >>> 0, 1));
3554 export class WasmPaymentLink {
3556 static __wrap(ptr) {
3558 const obj = Object.create(WasmPaymentLink.prototype);
3559 obj.__wbg_ptr = ptr;
3560 WasmPaymentLinkFinalization.register(obj, obj.__wbg_ptr, obj);
3564 __destroy_into_raw() {
3565 const ptr = this.__wbg_ptr;
3567 WasmPaymentLinkFinalization.unregister(this);
3572 const ptr = this.__destroy_into_raw();
3573 wasm.__wbg_wasmpaymentlink_free(ptr, 0);
3582 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3583 wasm.wasmpaymentlink_toString(retptr, this.__wbg_ptr);
3584 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3585 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3588 return getStringFromWasm0(r0, r1);
3590 wasm.__wbindgen_add_to_stack_pointer(16);
3591 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
3601 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3602 wasm.wasmpaymentlink_toUri(retptr, this.__wbg_ptr);
3603 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3604 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3607 return getStringFromWasm0(r0, r1);
3609 wasm.__wbindgen_add_to_stack_pointer(16);
3610 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
3614 * @param {string} str
3615 * @param {WasmNetwork} network
3616 * @returns {WasmPaymentLink}
3618 static tryParse(str, network) {
3620 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3621 const ptr0 = passStringToWasm0(str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3622 const len0 = WASM_VECTOR_LEN;
3623 wasm.wasmpaymentlink_tryParse(retptr, ptr0, len0, network);
3624 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3625 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3626 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3628 throw takeObject(r1);
3630 return WasmPaymentLink.__wrap(r0);
3632 wasm.__wbindgen_add_to_stack_pointer(16);
3636 * @returns {WasmPaymentLinkKind}
3639 const ret = wasm.wasmpaymentlink_getKind(this.__wbg_ptr);
3643 * @returns {WasmOnchainPaymentLink}
3646 const ret = wasm.wasmpaymentlink_assumeOnchain(this.__wbg_ptr);
3647 return WasmOnchainPaymentLink.__wrap(ret);
3651 const WasmPaymentMethodsAndProviderTuppleFinalization = (typeof FinalizationRegistry === 'undefined')
3652 ? { register: () => {}, unregister: () => {} }
3653 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpaymentmethodsandprovidertupple_free(ptr >>> 0, 1));
3655 export class WasmPaymentMethodsAndProviderTupple {
3657 static __wrap(ptr) {
3659 const obj = Object.create(WasmPaymentMethodsAndProviderTupple.prototype);
3660 obj.__wbg_ptr = ptr;
3661 WasmPaymentMethodsAndProviderTuppleFinalization.register(obj, obj.__wbg_ptr, obj);
3665 static __unwrap(jsValue) {
3666 if (!(jsValue instanceof WasmPaymentMethodsAndProviderTupple)) {
3669 return jsValue.__destroy_into_raw();
3672 __destroy_into_raw() {
3673 const ptr = this.__wbg_ptr;
3675 WasmPaymentMethodsAndProviderTuppleFinalization.unregister(this);
3680 const ptr = this.__destroy_into_raw();
3681 wasm.__wbg_wasmpaymentmethodsandprovidertupple_free(ptr, 0);
3684 * @returns {WasmGatewayProvider}
3687 const ret = wasm.__wbg_get_wasmcountriesandprovidertupple_0(this.__wbg_ptr);
3688 return takeObject(ret);
3691 * @param {WasmGatewayProvider} arg0
3694 wasm.__wbg_set_wasmcountriesandprovidertupple_0(this.__wbg_ptr, addHeapObject(arg0));
3697 * @returns {WasmPaymentMethods}
3700 const ret = wasm.__wbg_get_wasmpaymentmethodsandprovidertupple_1(this.__wbg_ptr);
3701 return takeObject(ret);
3704 * @param {WasmPaymentMethods} arg0
3707 wasm.__wbg_set_wasmpaymentmethodsandprovidertupple_1(this.__wbg_ptr, addHeapObject(arg0));
3711 const WasmPaymentMethodsByProviderFinalization = (typeof FinalizationRegistry === 'undefined')
3712 ? { register: () => {}, unregister: () => {} }
3713 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpaymentmethodsbyprovider_free(ptr >>> 0, 1));
3715 export class WasmPaymentMethodsByProvider {
3717 static __wrap(ptr) {
3719 const obj = Object.create(WasmPaymentMethodsByProvider.prototype);
3720 obj.__wbg_ptr = ptr;
3721 WasmPaymentMethodsByProviderFinalization.register(obj, obj.__wbg_ptr, obj);
3725 __destroy_into_raw() {
3726 const ptr = this.__wbg_ptr;
3728 WasmPaymentMethodsByProviderFinalization.unregister(this);
3733 const ptr = this.__destroy_into_raw();
3734 wasm.__wbg_wasmpaymentmethodsbyprovider_free(ptr, 0);
3737 * @returns {(WasmPaymentMethodsAndProviderTupple)[]}
3741 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3742 wasm.__wbg_get_wasmpaymentmethodsbyprovider_data(retptr, this.__wbg_ptr);
3743 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3744 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3745 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
3746 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
3749 wasm.__wbindgen_add_to_stack_pointer(16);
3753 * @param {(WasmPaymentMethodsAndProviderTupple)[]} arg0
3756 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
3757 const len0 = WASM_VECTOR_LEN;
3758 wasm.__wbg_set_wasmpaymentmethodsbyprovider_data(this.__wbg_ptr, ptr0, len0);
3762 const WasmPriceGraphClientFinalization = (typeof FinalizationRegistry === 'undefined')
3763 ? { register: () => {}, unregister: () => {} }
3764 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpricegraphclient_free(ptr >>> 0, 1));
3766 export class WasmPriceGraphClient {
3768 static __wrap(ptr) {
3770 const obj = Object.create(WasmPriceGraphClient.prototype);
3771 obj.__wbg_ptr = ptr;
3772 WasmPriceGraphClientFinalization.register(obj, obj.__wbg_ptr, obj);
3776 __destroy_into_raw() {
3777 const ptr = this.__wbg_ptr;
3779 WasmPriceGraphClientFinalization.unregister(this);
3784 const ptr = this.__destroy_into_raw();
3785 wasm.__wbg_wasmpricegraphclient_free(ptr, 0);
3788 * @param {WasmFiatCurrencySymbol} fiat_currency
3789 * @param {WasmTimeframe} timeframe
3790 * @returns {Promise<WasmWrappedPriceGraph>}
3792 getGraphData(fiat_currency, timeframe) {
3793 const ret = wasm.wasmpricegraphclient_getGraphData(this.__wbg_ptr, addHeapObject(fiat_currency), addHeapObject(timeframe));
3794 return takeObject(ret);
3798 const WasmProtonWalletApiClientFinalization = (typeof FinalizationRegistry === 'undefined')
3799 ? { register: () => {}, unregister: () => {} }
3800 : new FinalizationRegistry(ptr => wasm.__wbg_wasmprotonwalletapiclient_free(ptr >>> 0, 1));
3802 export class WasmProtonWalletApiClient {
3804 __destroy_into_raw() {
3805 const ptr = this.__wbg_ptr;
3807 WasmProtonWalletApiClientFinalization.unregister(this);
3812 const ptr = this.__destroy_into_raw();
3813 wasm.__wbg_wasmprotonwalletapiclient_free(ptr, 0);
3816 * @param {string} app_version
3817 * @param {string} user_agent
3818 * @param {string | undefined} [uid_str]
3819 * @param {string | undefined} [origin]
3820 * @param {string | undefined} [url_prefix]
3822 constructor(app_version, user_agent, uid_str, origin, url_prefix) {
3824 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3825 const ptr0 = passStringToWasm0(app_version, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3826 const len0 = WASM_VECTOR_LEN;
3827 const ptr1 = passStringToWasm0(user_agent, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3828 const len1 = WASM_VECTOR_LEN;
3829 var ptr2 = isLikeNone(uid_str) ? 0 : passStringToWasm0(uid_str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3830 var len2 = WASM_VECTOR_LEN;
3831 var ptr3 = isLikeNone(origin) ? 0 : passStringToWasm0(origin, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3832 var len3 = WASM_VECTOR_LEN;
3833 var ptr4 = isLikeNone(url_prefix) ? 0 : passStringToWasm0(url_prefix, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3834 var len4 = WASM_VECTOR_LEN;
3835 wasm.wasmprotonwalletapiclient_new(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
3836 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3837 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3838 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3840 throw takeObject(r1);
3842 this.__wbg_ptr = r0 >>> 0;
3843 WasmProtonWalletApiClientFinalization.register(this, this.__wbg_ptr, this);
3846 wasm.__wbindgen_add_to_stack_pointer(16);
3850 * @returns {WasmApiClients}
3853 const ret = wasm.wasmprotonwalletapiclient_clients(this.__wbg_ptr);
3854 return WasmApiClients.__wrap(ret);
3858 const WasmPsbtFinalization = (typeof FinalizationRegistry === 'undefined')
3859 ? { register: () => {}, unregister: () => {} }
3860 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpsbt_free(ptr >>> 0, 1));
3862 export class WasmPsbt {
3864 static __wrap(ptr) {
3866 const obj = Object.create(WasmPsbt.prototype);
3867 obj.__wbg_ptr = ptr;
3868 WasmPsbtFinalization.register(obj, obj.__wbg_ptr, obj);
3872 __destroy_into_raw() {
3873 const ptr = this.__wbg_ptr;
3875 WasmPsbtFinalization.unregister(this);
3880 const ptr = this.__destroy_into_raw();
3881 wasm.__wbg_wasmpsbt_free(ptr, 0);
3884 * @returns {(WasmPsbtRecipient)[]}
3888 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3889 wasm.__wbg_get_wasmpsbt_recipients(retptr, this.__wbg_ptr);
3890 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3891 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3892 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
3893 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
3896 wasm.__wbindgen_add_to_stack_pointer(16);
3900 * @param {(WasmPsbtRecipient)[]} arg0
3902 set recipients(arg0) {
3903 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
3904 const len0 = WASM_VECTOR_LEN;
3905 wasm.__wbg_set_wasmpsbt_recipients(this.__wbg_ptr, ptr0, len0);
3911 const ret = wasm.__wbg_get_wasmpsbt_total_fees(this.__wbg_ptr);
3912 return BigInt.asUintN(64, ret);
3915 * @param {bigint} arg0
3917 set total_fees(arg0) {
3918 wasm.__wbg_set_wasmpsbt_total_fees(this.__wbg_ptr, arg0);
3921 * @param {WasmAccount} wasm_account
3922 * @param {WasmNetwork} network
3923 * @returns {Promise<WasmPsbt>}
3925 sign(wasm_account, network) {
3926 _assertClass(wasm_account, WasmAccount);
3927 const ret = wasm.wasmpsbt_sign(this.__wbg_ptr, wasm_account.__wbg_ptr, network);
3928 return takeObject(ret);
3935 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3936 wasm.wasmpsbt_computeTxVbytes(retptr, this.__wbg_ptr);
3937 var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
3938 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3939 var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
3941 throw takeObject(r2);
3943 return BigInt.asUintN(64, r0);
3945 wasm.__wbindgen_add_to_stack_pointer(16);
3950 const WasmPsbtAndTxBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
3951 ? { register: () => {}, unregister: () => {} }
3952 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpsbtandtxbuilder_free(ptr >>> 0, 1));
3954 export class WasmPsbtAndTxBuilder {
3956 __destroy_into_raw() {
3957 const ptr = this.__wbg_ptr;
3959 WasmPsbtAndTxBuilderFinalization.unregister(this);
3964 const ptr = this.__destroy_into_raw();
3965 wasm.__wbg_wasmpsbtandtxbuilder_free(ptr, 0);
3968 * @returns {WasmPsbt}
3971 const ret = wasm.__wbg_get_wasmpsbtandtxbuilder_0(this.__wbg_ptr);
3972 return WasmPsbt.__wrap(ret);
3975 * @param {WasmPsbt} arg0
3978 _assertClass(arg0, WasmPsbt);
3979 var ptr0 = arg0.__destroy_into_raw();
3980 wasm.__wbg_set_wasmpsbtandtxbuilder_0(this.__wbg_ptr, ptr0);
3983 * @returns {WasmTxBuilder}
3986 const ret = wasm.__wbg_get_wasmpsbtandtxbuilder_1(this.__wbg_ptr);
3987 return WasmTxBuilder.__wrap(ret);
3990 * @param {WasmTxBuilder} arg0
3993 _assertClass(arg0, WasmTxBuilder);
3994 var ptr0 = arg0.__destroy_into_raw();
3995 wasm.__wbg_set_wasmpsbtandtxbuilder_1(this.__wbg_ptr, ptr0);
3999 const WasmPsbtRecipientFinalization = (typeof FinalizationRegistry === 'undefined')
4000 ? { register: () => {}, unregister: () => {} }
4001 : new FinalizationRegistry(ptr => wasm.__wbg_wasmpsbtrecipient_free(ptr >>> 0, 1));
4003 export class WasmPsbtRecipient {
4005 static __wrap(ptr) {
4007 const obj = Object.create(WasmPsbtRecipient.prototype);
4008 obj.__wbg_ptr = ptr;
4009 WasmPsbtRecipientFinalization.register(obj, obj.__wbg_ptr, obj);
4013 static __unwrap(jsValue) {
4014 if (!(jsValue instanceof WasmPsbtRecipient)) {
4017 return jsValue.__destroy_into_raw();
4020 __destroy_into_raw() {
4021 const ptr = this.__wbg_ptr;
4023 WasmPsbtRecipientFinalization.unregister(this);
4028 const ptr = this.__destroy_into_raw();
4029 wasm.__wbg_wasmpsbtrecipient_free(ptr, 0);
4038 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4039 wasm.__wbg_get_wasmauthdata_access(retptr, this.__wbg_ptr);
4040 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4041 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4044 return getStringFromWasm0(r0, r1);
4046 wasm.__wbindgen_add_to_stack_pointer(16);
4047 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
4051 * @param {string} arg0
4054 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
4055 const len0 = WASM_VECTOR_LEN;
4056 wasm.__wbg_set_wasmpsbtrecipient_0(this.__wbg_ptr, ptr0, len0);
4062 const ret = wasm.__wbg_get_wasmpsbt_total_fees(this.__wbg_ptr);
4063 return BigInt.asUintN(64, ret);
4066 * @param {bigint} arg0
4069 wasm.__wbg_set_wasmpsbt_total_fees(this.__wbg_ptr, arg0);
4073 const WasmQuotesAndProviderTuppleFinalization = (typeof FinalizationRegistry === 'undefined')
4074 ? { register: () => {}, unregister: () => {} }
4075 : new FinalizationRegistry(ptr => wasm.__wbg_wasmquotesandprovidertupple_free(ptr >>> 0, 1));
4077 export class WasmQuotesAndProviderTupple {
4079 static __wrap(ptr) {
4081 const obj = Object.create(WasmQuotesAndProviderTupple.prototype);
4082 obj.__wbg_ptr = ptr;
4083 WasmQuotesAndProviderTuppleFinalization.register(obj, obj.__wbg_ptr, obj);
4087 static __unwrap(jsValue) {
4088 if (!(jsValue instanceof WasmQuotesAndProviderTupple)) {
4091 return jsValue.__destroy_into_raw();
4094 __destroy_into_raw() {
4095 const ptr = this.__wbg_ptr;
4097 WasmQuotesAndProviderTuppleFinalization.unregister(this);
4102 const ptr = this.__destroy_into_raw();
4103 wasm.__wbg_wasmquotesandprovidertupple_free(ptr, 0);
4106 * @returns {WasmGatewayProvider}
4109 const ret = wasm.__wbg_get_wasmcountriesandprovidertupple_0(this.__wbg_ptr);
4110 return takeObject(ret);
4113 * @param {WasmGatewayProvider} arg0
4116 wasm.__wbg_set_wasmcountriesandprovidertupple_0(this.__wbg_ptr, addHeapObject(arg0));
4119 * @returns {WasmQuotes}
4122 const ret = wasm.__wbg_get_wasmquotesandprovidertupple_1(this.__wbg_ptr);
4123 return takeObject(ret);
4126 * @param {WasmQuotes} arg0
4129 wasm.__wbg_set_wasmquotesandprovidertupple_1(this.__wbg_ptr, addHeapObject(arg0));
4133 const WasmQuotesByProviderFinalization = (typeof FinalizationRegistry === 'undefined')
4134 ? { register: () => {}, unregister: () => {} }
4135 : new FinalizationRegistry(ptr => wasm.__wbg_wasmquotesbyprovider_free(ptr >>> 0, 1));
4137 export class WasmQuotesByProvider {
4139 static __wrap(ptr) {
4141 const obj = Object.create(WasmQuotesByProvider.prototype);
4142 obj.__wbg_ptr = ptr;
4143 WasmQuotesByProviderFinalization.register(obj, obj.__wbg_ptr, obj);
4147 __destroy_into_raw() {
4148 const ptr = this.__wbg_ptr;
4150 WasmQuotesByProviderFinalization.unregister(this);
4155 const ptr = this.__destroy_into_raw();
4156 wasm.__wbg_wasmquotesbyprovider_free(ptr, 0);
4159 * @returns {(WasmQuotesAndProviderTupple)[]}
4163 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4164 wasm.__wbg_get_wasmquotesbyprovider_data(retptr, this.__wbg_ptr);
4165 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4166 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4167 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
4168 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
4171 wasm.__wbindgen_add_to_stack_pointer(16);
4175 * @param {(WasmQuotesAndProviderTupple)[]} arg0
4178 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
4179 const len0 = WASM_VECTOR_LEN;
4180 wasm.__wbg_set_wasmquotesbyprovider_data(this.__wbg_ptr, ptr0, len0);
4184 const WasmRecipientFinalization = (typeof FinalizationRegistry === 'undefined')
4185 ? { register: () => {}, unregister: () => {} }
4186 : new FinalizationRegistry(ptr => wasm.__wbg_wasmrecipient_free(ptr >>> 0, 1));
4188 export class WasmRecipient {
4190 static __wrap(ptr) {
4192 const obj = Object.create(WasmRecipient.prototype);
4193 obj.__wbg_ptr = ptr;
4194 WasmRecipientFinalization.register(obj, obj.__wbg_ptr, obj);
4198 __destroy_into_raw() {
4199 const ptr = this.__wbg_ptr;
4201 WasmRecipientFinalization.unregister(this);
4206 const ptr = this.__destroy_into_raw();
4207 wasm.__wbg_wasmrecipient_free(ptr, 0);
4216 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4217 wasm.__wbg_get_wasmrecipient_0(retptr, this.__wbg_ptr);
4218 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4219 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4222 return getStringFromWasm0(r0, r1);
4224 wasm.__wbindgen_add_to_stack_pointer(16);
4225 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
4229 * @param {string} arg0
4232 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
4233 const len0 = WASM_VECTOR_LEN;
4234 wasm.__wbg_set_wasmrecipient_0(this.__wbg_ptr, ptr0, len0);
4243 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4244 wasm.__wbg_get_wasmrecipient_1(retptr, this.__wbg_ptr);
4245 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4246 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4249 return getStringFromWasm0(r0, r1);
4251 wasm.__wbindgen_add_to_stack_pointer(16);
4252 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
4256 * @param {string} arg0
4259 const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
4260 const len0 = WASM_VECTOR_LEN;
4261 wasm.__wbg_set_wasmrecipient_1(this.__wbg_ptr, ptr0, len0);
4267 const ret = wasm.__wbg_get_wasmrecipient_2(this.__wbg_ptr);
4268 return BigInt.asUintN(64, ret);
4271 * @param {bigint} arg0
4274 wasm.__wbg_set_wasmrecipient_2(this.__wbg_ptr, arg0);
4278 const WasmRemainingMonthlyInvitationsFinalization = (typeof FinalizationRegistry === 'undefined')
4279 ? { register: () => {}, unregister: () => {} }
4280 : new FinalizationRegistry(ptr => wasm.__wbg_wasmremainingmonthlyinvitations_free(ptr >>> 0, 1));
4282 export class WasmRemainingMonthlyInvitations {
4284 static __wrap(ptr) {
4286 const obj = Object.create(WasmRemainingMonthlyInvitations.prototype);
4287 obj.__wbg_ptr = ptr;
4288 WasmRemainingMonthlyInvitationsFinalization.register(obj, obj.__wbg_ptr, obj);
4292 __destroy_into_raw() {
4293 const ptr = this.__wbg_ptr;
4295 WasmRemainingMonthlyInvitationsFinalization.unregister(this);
4300 const ptr = this.__destroy_into_raw();
4301 wasm.__wbg_wasmremainingmonthlyinvitations_free(ptr, 0);
4307 const ret = wasm.__wbg_get_wasmremainingmonthlyinvitations_Available(this.__wbg_ptr);
4311 * @param {number} arg0
4313 set Available(arg0) {
4314 wasm.__wbg_set_wasmremainingmonthlyinvitations_Available(this.__wbg_ptr, arg0);
4320 const ret = wasm.__wbg_get_wasmremainingmonthlyinvitations_Used(this.__wbg_ptr);
4324 * @param {number} arg0
4327 wasm.__wbg_set_wasmremainingmonthlyinvitations_Used(this.__wbg_ptr, arg0);
4331 const WasmScriptFinalization = (typeof FinalizationRegistry === 'undefined')
4332 ? { register: () => {}, unregister: () => {} }
4333 : new FinalizationRegistry(ptr => wasm.__wbg_wasmscript_free(ptr >>> 0, 1));
4335 export class WasmScript {
4337 static __wrap(ptr) {
4339 const obj = Object.create(WasmScript.prototype);
4340 obj.__wbg_ptr = ptr;
4341 WasmScriptFinalization.register(obj, obj.__wbg_ptr, obj);
4345 __destroy_into_raw() {
4346 const ptr = this.__wbg_ptr;
4348 WasmScriptFinalization.unregister(this);
4353 const ptr = this.__destroy_into_raw();
4354 wasm.__wbg_wasmscript_free(ptr, 0);
4357 * @returns {Uint8Array}
4361 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4362 wasm.__wbg_get_wasmscript_0(retptr, this.__wbg_ptr);
4363 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4364 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4365 var v1 = getArrayU8FromWasm0(r0, r1).slice();
4366 wasm.__wbindgen_export_5(r0, r1 * 1, 1);
4369 wasm.__wbindgen_add_to_stack_pointer(16);
4373 * @param {Uint8Array} arg0
4376 const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_export_0);
4377 const len0 = WASM_VECTOR_LEN;
4378 wasm.__wbg_set_wasmoutpoint_0(this.__wbg_ptr, ptr0, len0);
4381 * @param {WasmNetwork} network
4382 * @returns {WasmAddress}
4384 toAddress(network) {
4386 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4387 wasm.wasmscript_toAddress(retptr, this.__wbg_ptr, network);
4388 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4389 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4390 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4392 throw takeObject(r1);
4394 return WasmAddress.__wrap(r0);
4396 wasm.__wbindgen_add_to_stack_pointer(16);
4401 const WasmSequenceFinalization = (typeof FinalizationRegistry === 'undefined')
4402 ? { register: () => {}, unregister: () => {} }
4403 : new FinalizationRegistry(ptr => wasm.__wbg_wasmsequence_free(ptr >>> 0, 1));
4405 export class WasmSequence {
4407 static __wrap(ptr) {
4409 const obj = Object.create(WasmSequence.prototype);
4410 obj.__wbg_ptr = ptr;
4411 WasmSequenceFinalization.register(obj, obj.__wbg_ptr, obj);
4415 __destroy_into_raw() {
4416 const ptr = this.__wbg_ptr;
4418 WasmSequenceFinalization.unregister(this);
4423 const ptr = this.__destroy_into_raw();
4424 wasm.__wbg_wasmsequence_free(ptr, 0);
4430 const ret = wasm.__wbg_get_wasmsequence_0(this.__wbg_ptr);
4434 * @param {number} arg0
4437 wasm.__wbg_set_wasmsequence_0(this.__wbg_ptr, arg0);
4441 const WasmSettingsClientFinalization = (typeof FinalizationRegistry === 'undefined')
4442 ? { register: () => {}, unregister: () => {} }
4443 : new FinalizationRegistry(ptr => wasm.__wbg_wasmsettingsclient_free(ptr >>> 0, 1));
4445 export class WasmSettingsClient {
4447 static __wrap(ptr) {
4449 const obj = Object.create(WasmSettingsClient.prototype);
4450 obj.__wbg_ptr = ptr;
4451 WasmSettingsClientFinalization.register(obj, obj.__wbg_ptr, obj);
4455 __destroy_into_raw() {
4456 const ptr = this.__wbg_ptr;
4458 WasmSettingsClientFinalization.unregister(this);
4463 const ptr = this.__destroy_into_raw();
4464 wasm.__wbg_wasmsettingsclient_free(ptr, 0);
4467 * @returns {Promise<WasmUserSettingsData>}
4470 const ret = wasm.wasmsettingsclient_getUserSettings(this.__wbg_ptr);
4471 return takeObject(ret);
4474 * @param {WasmBitcoinUnit} symbol
4475 * @returns {Promise<WasmUserSettingsData>}
4477 setBitcoinUnit(symbol) {
4478 const ret = wasm.wasmsettingsclient_setBitcoinUnit(this.__wbg_ptr, addHeapObject(symbol));
4479 return takeObject(ret);
4482 * @param {WasmFiatCurrencySymbol} symbol
4483 * @returns {Promise<WasmUserSettingsData>}
4485 setFiatCurrency(symbol) {
4486 const ret = wasm.wasmsettingsclient_setFiatCurrency(this.__wbg_ptr, addHeapObject(symbol));
4487 return takeObject(ret);
4490 * @param {bigint} amount
4491 * @returns {Promise<WasmUserSettingsData>}
4493 setTwoFaThreshold(amount) {
4494 const ret = wasm.wasmsettingsclient_setTwoFaThreshold(this.__wbg_ptr, amount);
4495 return takeObject(ret);
4498 * @param {boolean} hide_empty_used_addresses
4499 * @returns {Promise<WasmUserSettingsData>}
4501 setHideEmptyUsedAddresses(hide_empty_used_addresses) {
4502 const ret = wasm.wasmsettingsclient_setHideEmptyUsedAddresses(this.__wbg_ptr, hide_empty_used_addresses);
4503 return takeObject(ret);
4506 * @param {WasmUserReceiveNotificationEmailTypes} email_type
4507 * @param {boolean} is_enable
4508 * @returns {Promise<WasmUserSettingsData>}
4510 setReceiveNotificationEmail(email_type, is_enable) {
4511 const ret = wasm.wasmsettingsclient_setReceiveNotificationEmail(this.__wbg_ptr, addHeapObject(email_type), is_enable);
4512 return takeObject(ret);
4515 * @returns {Promise<WasmUserSettingsData>}
4517 acceptTermsAndConditions() {
4518 const ret = wasm.wasmsettingsclient_acceptTermsAndConditions(this.__wbg_ptr);
4519 return takeObject(ret);
4522 * @returns {Promise<number>}
4524 getUserWalletEligibility() {
4525 const ret = wasm.wasmsettingsclient_getUserWalletEligibility(this.__wbg_ptr);
4526 return takeObject(ret);
4530 const WasmTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
4531 ? { register: () => {}, unregister: () => {} }
4532 : new FinalizationRegistry(ptr => wasm.__wbg_wasmtransaction_free(ptr >>> 0, 1));
4534 export class WasmTransaction {
4536 static __wrap(ptr) {
4538 const obj = Object.create(WasmTransaction.prototype);
4539 obj.__wbg_ptr = ptr;
4540 WasmTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
4544 __destroy_into_raw() {
4545 const ptr = this.__wbg_ptr;
4547 WasmTransactionFinalization.unregister(this);
4552 const ptr = this.__destroy_into_raw();
4553 wasm.__wbg_wasmtransaction_free(ptr, 0);
4556 * @param {WasmPsbt} value
4557 * @returns {WasmTransaction}
4559 static fromPsbt(value) {
4561 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4562 _assertClass(value, WasmPsbt);
4563 var ptr0 = value.__destroy_into_raw();
4564 wasm.wasmtransaction_fromPsbt(retptr, ptr0);
4565 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4566 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4567 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4569 throw takeObject(r1);
4571 return WasmTransaction.__wrap(r0);
4573 wasm.__wbindgen_add_to_stack_pointer(16);
4578 const WasmTransactionDetailsArrayFinalization = (typeof FinalizationRegistry === 'undefined')
4579 ? { register: () => {}, unregister: () => {} }
4580 : new FinalizationRegistry(ptr => wasm.__wbg_wasmtransactiondetailsarray_free(ptr >>> 0, 1));
4582 export class WasmTransactionDetailsArray {
4584 static __wrap(ptr) {
4586 const obj = Object.create(WasmTransactionDetailsArray.prototype);
4587 obj.__wbg_ptr = ptr;
4588 WasmTransactionDetailsArrayFinalization.register(obj, obj.__wbg_ptr, obj);
4592 __destroy_into_raw() {
4593 const ptr = this.__wbg_ptr;
4595 WasmTransactionDetailsArrayFinalization.unregister(this);
4600 const ptr = this.__destroy_into_raw();
4601 wasm.__wbg_wasmtransactiondetailsarray_free(ptr, 0);
4604 * @returns {(WasmTransactionDetailsData)[]}
4608 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4609 wasm.__wbg_get_wasmtransactiondetailsarray_0(retptr, this.__wbg_ptr);
4610 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4611 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4612 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
4613 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
4616 wasm.__wbindgen_add_to_stack_pointer(16);
4620 * @param {(WasmTransactionDetailsData)[]} arg0
4623 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
4624 const len0 = WASM_VECTOR_LEN;
4625 wasm.__wbg_set_wasmtransactiondetailsarray_0(this.__wbg_ptr, ptr0, len0);
4629 const WasmTransactionDetailsDataFinalization = (typeof FinalizationRegistry === 'undefined')
4630 ? { register: () => {}, unregister: () => {} }
4631 : new FinalizationRegistry(ptr => wasm.__wbg_wasmtransactiondetailsdata_free(ptr >>> 0, 1));
4633 export class WasmTransactionDetailsData {
4635 static __wrap(ptr) {
4637 const obj = Object.create(WasmTransactionDetailsData.prototype);
4638 obj.__wbg_ptr = ptr;
4639 WasmTransactionDetailsDataFinalization.register(obj, obj.__wbg_ptr, obj);
4643 static __unwrap(jsValue) {
4644 if (!(jsValue instanceof WasmTransactionDetailsData)) {
4647 return jsValue.__destroy_into_raw();
4650 __destroy_into_raw() {
4651 const ptr = this.__wbg_ptr;
4653 WasmTransactionDetailsDataFinalization.unregister(this);
4658 const ptr = this.__destroy_into_raw();
4659 wasm.__wbg_wasmtransactiondetailsdata_free(ptr, 0);
4662 * @returns {WasmTransactionDetails}
4665 const ret = wasm.__wbg_get_wasmtransactiondetailsdata_Data(this.__wbg_ptr);
4666 return takeObject(ret);
4669 * @param {WasmTransactionDetails} arg0
4672 wasm.__wbg_set_wasmtransactiondetailsdata_Data(this.__wbg_ptr, addHeapObject(arg0));
4676 const WasmTxBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
4677 ? { register: () => {}, unregister: () => {} }
4678 : new FinalizationRegistry(ptr => wasm.__wbg_wasmtxbuilder_free(ptr >>> 0, 1));
4680 export class WasmTxBuilder {
4682 static __wrap(ptr) {
4684 const obj = Object.create(WasmTxBuilder.prototype);
4685 obj.__wbg_ptr = ptr;
4686 WasmTxBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
4690 __destroy_into_raw() {
4691 const ptr = this.__wbg_ptr;
4693 WasmTxBuilderFinalization.unregister(this);
4698 const ptr = this.__destroy_into_raw();
4699 wasm.__wbg_wasmtxbuilder_free(ptr, 0);
4702 const ret = wasm.wasmtxbuilder_new();
4703 this.__wbg_ptr = ret >>> 0;
4704 WasmTxBuilderFinalization.register(this, this.__wbg_ptr, this);
4708 * @param {WasmAccount} account
4709 * @returns {WasmTxBuilder}
4711 setAccount(account) {
4712 _assertClass(account, WasmAccount);
4713 const ret = wasm.wasmtxbuilder_setAccount(this.__wbg_ptr, account.__wbg_ptr);
4714 return WasmTxBuilder.__wrap(ret);
4717 * @returns {Promise<WasmTxBuilder>}
4719 constrainRecipientAmounts() {
4720 const ret = wasm.wasmtxbuilder_constrainRecipientAmounts(this.__wbg_ptr);
4721 return takeObject(ret);
4724 * @returns {WasmTxBuilder}
4727 const ret = wasm.wasmtxbuilder_clearRecipients(this.__wbg_ptr);
4728 return WasmTxBuilder.__wrap(ret);
4731 * @param {string | undefined} [address_str]
4732 * @param {bigint | undefined} [amount]
4733 * @returns {WasmTxBuilder}
4735 addRecipient(address_str, amount) {
4736 var ptr0 = isLikeNone(address_str) ? 0 : passStringToWasm0(address_str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
4737 var len0 = WASM_VECTOR_LEN;
4738 const ret = wasm.wasmtxbuilder_addRecipient(this.__wbg_ptr, ptr0, len0, !isLikeNone(amount), isLikeNone(amount) ? BigInt(0) : amount);
4739 return WasmTxBuilder.__wrap(ret);
4742 * @param {number} index
4743 * @returns {WasmTxBuilder}
4745 removeRecipient(index) {
4746 const ret = wasm.wasmtxbuilder_removeRecipient(this.__wbg_ptr, index);
4747 return WasmTxBuilder.__wrap(ret);
4750 * @param {number} index
4751 * @param {string | undefined} [address_str]
4752 * @param {bigint | undefined} [amount]
4753 * @returns {WasmTxBuilder}
4755 updateRecipient(index, address_str, amount) {
4757 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4758 var ptr0 = isLikeNone(address_str) ? 0 : passStringToWasm0(address_str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
4759 var len0 = WASM_VECTOR_LEN;
4760 wasm.wasmtxbuilder_updateRecipient(retptr, this.__wbg_ptr, index, ptr0, len0, !isLikeNone(amount), isLikeNone(amount) ? BigInt(0) : amount);
4761 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4762 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4763 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4765 throw takeObject(r1);
4767 return WasmTxBuilder.__wrap(r0);
4769 wasm.__wbindgen_add_to_stack_pointer(16);
4773 * @param {number} index
4774 * @returns {Promise<WasmTxBuilder>}
4776 updateRecipientAmountToMax(index) {
4777 const ret = wasm.wasmtxbuilder_updateRecipientAmountToMax(this.__wbg_ptr, index);
4778 return takeObject(ret);
4781 * @returns {(WasmRecipient)[]}
4785 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4786 wasm.wasmtxbuilder_getRecipients(retptr, this.__wbg_ptr);
4787 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4788 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4789 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
4790 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
4793 wasm.__wbindgen_add_to_stack_pointer(16);
4800 * @param {WasmOutPoint} outpoint
4801 * @returns {WasmTxBuilder}
4803 addUtxoToSpend(outpoint) {
4805 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4806 _assertClass(outpoint, WasmOutPoint);
4807 var ptr0 = outpoint.__destroy_into_raw();
4808 wasm.wasmtxbuilder_addUtxoToSpend(retptr, this.__wbg_ptr, ptr0);
4809 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4810 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4811 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4813 throw takeObject(r1);
4815 return WasmTxBuilder.__wrap(r0);
4817 wasm.__wbindgen_add_to_stack_pointer(16);
4821 * @param {WasmOutPoint} outpoint
4822 * @returns {WasmTxBuilder}
4824 removeUtxoToSpend(outpoint) {
4826 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4827 _assertClass(outpoint, WasmOutPoint);
4828 var ptr0 = outpoint.__destroy_into_raw();
4829 wasm.wasmtxbuilder_removeUtxoToSpend(retptr, this.__wbg_ptr, ptr0);
4830 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4831 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4832 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4834 throw takeObject(r1);
4836 return WasmTxBuilder.__wrap(r0);
4838 wasm.__wbindgen_add_to_stack_pointer(16);
4842 * @returns {WasmTxBuilder}
4844 clearUtxosToSpend() {
4845 const ret = wasm.wasmtxbuilder_clearUtxosToSpend(this.__wbg_ptr);
4846 return WasmTxBuilder.__wrap(ret);
4849 * @returns {(WasmOutPoint)[]}
4853 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4854 wasm.wasmtxbuilder_getUtxosToSpend(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_export_5(r0, r1 * 4, 4);
4861 wasm.__wbindgen_add_to_stack_pointer(16);
4866 * * Coin selection enforcement
4868 * @param {WasmCoinSelection} coin_selection
4869 * @returns {WasmTxBuilder}
4871 setCoinSelection(coin_selection) {
4872 const ret = wasm.wasmtxbuilder_setCoinSelection(this.__wbg_ptr, coin_selection);
4873 return WasmTxBuilder.__wrap(ret);
4876 * @returns {WasmCoinSelection}
4878 getCoinSelection() {
4879 const ret = wasm.wasmtxbuilder_getCoinSelection(this.__wbg_ptr);
4886 * @returns {WasmTxBuilder}
4889 const ret = wasm.wasmtxbuilder_enableRbf(this.__wbg_ptr);
4890 return WasmTxBuilder.__wrap(ret);
4893 * @returns {WasmTxBuilder}
4896 const ret = wasm.wasmtxbuilder_disableRbf(this.__wbg_ptr);
4897 return WasmTxBuilder.__wrap(ret);
4900 * @returns {boolean}
4903 const ret = wasm.wasmtxbuilder_getRbfEnabled(this.__wbg_ptr);
4910 * @param {WasmChangeSpendPolicy} change_policy
4911 * @returns {WasmTxBuilder}
4913 setChangePolicy(change_policy) {
4914 const ret = wasm.wasmtxbuilder_setChangePolicy(this.__wbg_ptr, change_policy);
4915 return WasmTxBuilder.__wrap(ret);
4918 * @returns {WasmChangeSpendPolicy}
4921 const ret = wasm.wasmtxbuilder_getChangePolicy(this.__wbg_ptr);
4928 * @param {bigint} sat_per_vb
4929 * @returns {WasmTxBuilder}
4931 setFeeRate(sat_per_vb) {
4932 const ret = wasm.wasmtxbuilder_setFeeRate(this.__wbg_ptr, sat_per_vb);
4933 return WasmTxBuilder.__wrap(ret);
4936 * @returns {bigint | undefined}
4940 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4941 wasm.wasmtxbuilder_getFeeRate(retptr, this.__wbg_ptr);
4942 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4943 var r2 = getDataViewMemory0().getBigInt64(retptr + 8 * 1, true);
4944 return r0 === 0 ? undefined : BigInt.asUintN(64, r2);
4946 wasm.__wbindgen_add_to_stack_pointer(16);
4953 * @param {WasmLockTime} locktime
4954 * @returns {WasmTxBuilder}
4956 addLocktime(locktime) {
4957 _assertClass(locktime, WasmLockTime);
4958 var ptr0 = locktime.__destroy_into_raw();
4959 const ret = wasm.wasmtxbuilder_addLocktime(this.__wbg_ptr, ptr0);
4960 return WasmTxBuilder.__wrap(ret);
4963 * @returns {WasmTxBuilder}
4966 const ret = wasm.wasmtxbuilder_removeLocktime(this.__wbg_ptr);
4967 return WasmTxBuilder.__wrap(ret);
4970 * @returns {WasmLockTime | undefined}
4973 const ret = wasm.wasmtxbuilder_getLocktime(this.__wbg_ptr);
4974 return ret === 0 ? undefined : WasmLockTime.__wrap(ret);
4980 * @param {WasmNetwork} network
4981 * @returns {Promise<WasmPsbt>}
4983 createPsbt(network) {
4984 const ret = wasm.wasmtxbuilder_createPsbt(this.__wbg_ptr, network);
4985 return takeObject(ret);
4988 * @param {WasmNetwork} network
4989 * @param {boolean | undefined} [allow_dust]
4990 * @returns {Promise<WasmPsbt>}
4992 createDraftPsbt(network, allow_dust) {
4993 const ret = wasm.wasmtxbuilder_createDraftPsbt(this.__wbg_ptr, network, isLikeNone(allow_dust) ? 0xFFFFFF : allow_dust ? 1 : 0);
4994 return takeObject(ret);
4998 const WasmTxOutFinalization = (typeof FinalizationRegistry === 'undefined')
4999 ? { register: () => {}, unregister: () => {} }
5000 : new FinalizationRegistry(ptr => wasm.__wbg_wasmtxout_free(ptr >>> 0, 1));
5002 export class WasmTxOut {
5004 static __wrap(ptr) {
5006 const obj = Object.create(WasmTxOut.prototype);
5007 obj.__wbg_ptr = ptr;
5008 WasmTxOutFinalization.register(obj, obj.__wbg_ptr, obj);
5012 __destroy_into_raw() {
5013 const ptr = this.__wbg_ptr;
5015 WasmTxOutFinalization.unregister(this);
5020 const ptr = this.__destroy_into_raw();
5021 wasm.__wbg_wasmtxout_free(ptr, 0);
5027 const ret = wasm.__wbg_get_wasmtxout_value(this.__wbg_ptr);
5028 return BigInt.asUintN(64, ret);
5031 * @param {bigint} arg0
5034 wasm.__wbg_set_wasmtxout_value(this.__wbg_ptr, arg0);
5037 * @returns {WasmScript}
5039 get script_pubkey() {
5040 const ret = wasm.__wbg_get_wasmtxout_script_pubkey(this.__wbg_ptr);
5041 return WasmScript.__wrap(ret);
5044 * @param {WasmScript} arg0
5046 set script_pubkey(arg0) {
5047 _assertClass(arg0, WasmScript);
5048 var ptr0 = arg0.__destroy_into_raw();
5049 wasm.__wbg_set_wasmtxout_script_pubkey(this.__wbg_ptr, ptr0);
5052 * @returns {boolean}
5055 const ret = wasm.__wbg_get_wasmtxout_is_mine(this.__wbg_ptr);
5059 * @param {boolean} arg0
5062 wasm.__wbg_set_wasmtxout_is_mine(this.__wbg_ptr, arg0);
5065 * @returns {string | undefined}
5069 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5070 wasm.__wbg_get_wasmtxout_address(retptr, this.__wbg_ptr);
5071 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5072 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5075 v1 = getStringFromWasm0(r0, r1).slice();
5076 wasm.__wbindgen_export_5(r0, r1 * 1, 1);
5080 wasm.__wbindgen_add_to_stack_pointer(16);
5084 * @param {string | undefined} [arg0]
5087 var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5088 var len0 = WASM_VECTOR_LEN;
5089 wasm.__wbg_set_wasmtxout_address(this.__wbg_ptr, ptr0, len0);
5093 const WasmUserSettingsDataFinalization = (typeof FinalizationRegistry === 'undefined')
5094 ? { register: () => {}, unregister: () => {} }
5095 : new FinalizationRegistry(ptr => wasm.__wbg_wasmusersettingsdata_free(ptr >>> 0, 1));
5097 export class WasmUserSettingsData {
5099 static __wrap(ptr) {
5101 const obj = Object.create(WasmUserSettingsData.prototype);
5102 obj.__wbg_ptr = ptr;
5103 WasmUserSettingsDataFinalization.register(obj, obj.__wbg_ptr, obj);
5107 __destroy_into_raw() {
5108 const ptr = this.__wbg_ptr;
5110 WasmUserSettingsDataFinalization.unregister(this);
5115 const ptr = this.__destroy_into_raw();
5116 wasm.__wbg_wasmusersettingsdata_free(ptr, 0);
5119 * @returns {WasmUserSettings}
5122 const ret = wasm.__wbg_get_wasmusersettingsdata_0(this.__wbg_ptr);
5123 return takeObject(ret);
5126 * @param {WasmUserSettings} arg0
5129 wasm.__wbg_set_wasmusersettingsdata_0(this.__wbg_ptr, addHeapObject(arg0));
5133 const WasmUtxoFinalization = (typeof FinalizationRegistry === 'undefined')
5134 ? { register: () => {}, unregister: () => {} }
5135 : new FinalizationRegistry(ptr => wasm.__wbg_wasmutxo_free(ptr >>> 0, 1));
5137 export class WasmUtxo {
5139 static __wrap(ptr) {
5141 const obj = Object.create(WasmUtxo.prototype);
5142 obj.__wbg_ptr = ptr;
5143 WasmUtxoFinalization.register(obj, obj.__wbg_ptr, obj);
5147 static __unwrap(jsValue) {
5148 if (!(jsValue instanceof WasmUtxo)) {
5151 return jsValue.__destroy_into_raw();
5154 __destroy_into_raw() {
5155 const ptr = this.__wbg_ptr;
5157 WasmUtxoFinalization.unregister(this);
5162 const ptr = this.__destroy_into_raw();
5163 wasm.__wbg_wasmutxo_free(ptr, 0);
5169 const ret = wasm.__wbg_get_wasmutxo_value(this.__wbg_ptr);
5170 return BigInt.asUintN(64, ret);
5173 * @param {bigint} arg0
5176 wasm.__wbg_set_wasmutxo_value(this.__wbg_ptr, arg0);
5179 * @returns {WasmOutPoint}
5182 const ret = wasm.__wbg_get_wasmutxo_outpoint(this.__wbg_ptr);
5183 return WasmOutPoint.__wrap(ret);
5186 * @param {WasmOutPoint} arg0
5188 set outpoint(arg0) {
5189 _assertClass(arg0, WasmOutPoint);
5190 var ptr0 = arg0.__destroy_into_raw();
5191 wasm.__wbg_set_wasmutxo_outpoint(this.__wbg_ptr, ptr0);
5194 * @returns {WasmScript}
5196 get script_pubkey() {
5197 const ret = wasm.__wbg_get_wasmutxo_script_pubkey(this.__wbg_ptr);
5198 return WasmScript.__wrap(ret);
5201 * @param {WasmScript} arg0
5203 set script_pubkey(arg0) {
5204 _assertClass(arg0, WasmScript);
5205 var ptr0 = arg0.__destroy_into_raw();
5206 wasm.__wbg_set_wasmutxo_script_pubkey(this.__wbg_ptr, ptr0);
5209 * @returns {WasmKeychainKind}
5212 const ret = wasm.__wbg_get_wasmutxo_keychain(this.__wbg_ptr);
5216 * @param {WasmKeychainKind} arg0
5218 set keychain(arg0) {
5219 wasm.__wbg_set_wasmutxo_keychain(this.__wbg_ptr, arg0);
5222 * @returns {boolean}
5225 const ret = wasm.__wbg_get_wasmutxo_is_spent(this.__wbg_ptr);
5229 * @param {boolean} arg0
5231 set is_spent(arg0) {
5232 wasm.__wbg_set_wasmutxo_is_spent(this.__wbg_ptr, arg0);
5236 const WasmUtxoArrayFinalization = (typeof FinalizationRegistry === 'undefined')
5237 ? { register: () => {}, unregister: () => {} }
5238 : new FinalizationRegistry(ptr => wasm.__wbg_wasmutxoarray_free(ptr >>> 0, 1));
5240 export class WasmUtxoArray {
5242 static __wrap(ptr) {
5244 const obj = Object.create(WasmUtxoArray.prototype);
5245 obj.__wbg_ptr = ptr;
5246 WasmUtxoArrayFinalization.register(obj, obj.__wbg_ptr, obj);
5250 __destroy_into_raw() {
5251 const ptr = this.__wbg_ptr;
5253 WasmUtxoArrayFinalization.unregister(this);
5258 const ptr = this.__destroy_into_raw();
5259 wasm.__wbg_wasmutxoarray_free(ptr, 0);
5262 * @returns {(WasmUtxo)[]}
5266 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5267 wasm.__wbg_get_wasmutxoarray_0(retptr, this.__wbg_ptr);
5268 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5269 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5270 var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
5271 wasm.__wbindgen_export_5(r0, r1 * 4, 4);
5274 wasm.__wbindgen_add_to_stack_pointer(16);
5278 * @param {(WasmUtxo)[]} arg0
5281 const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export_0);
5282 const len0 = WASM_VECTOR_LEN;
5283 wasm.__wbg_set_wasmutxoarray_0(this.__wbg_ptr, ptr0, len0);
5287 const WasmWalletFinalization = (typeof FinalizationRegistry === 'undefined')
5288 ? { register: () => {}, unregister: () => {} }
5289 : new FinalizationRegistry(ptr => wasm.__wbg_wasmwallet_free(ptr >>> 0, 1));
5291 export class WasmWallet {
5293 __destroy_into_raw() {
5294 const ptr = this.__wbg_ptr;
5296 WasmWalletFinalization.unregister(this);
5301 const ptr = this.__destroy_into_raw();
5302 wasm.__wbg_wasmwallet_free(ptr, 0);
5305 * @param {WasmNetwork} network
5306 * @param {string} bip39_mnemonic
5307 * @param {string | undefined} [bip38_passphrase]
5309 constructor(network, bip39_mnemonic, bip38_passphrase) {
5311 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5312 const ptr0 = passStringToWasm0(bip39_mnemonic, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5313 const len0 = WASM_VECTOR_LEN;
5314 var ptr1 = isLikeNone(bip38_passphrase) ? 0 : passStringToWasm0(bip38_passphrase, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5315 var len1 = WASM_VECTOR_LEN;
5316 wasm.wasmwallet_new(retptr, network, ptr0, len0, ptr1, len1);
5317 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5318 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5319 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5321 throw takeObject(r1);
5323 this.__wbg_ptr = r0 >>> 0;
5324 WasmWalletFinalization.register(this, this.__wbg_ptr, this);
5327 wasm.__wbindgen_add_to_stack_pointer(16);
5331 * @param {number} script_type
5332 * @param {string} derivation_path
5333 * @returns {WasmAccount}
5335 addAccount(script_type, derivation_path) {
5337 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5338 const ptr0 = passStringToWasm0(derivation_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5339 const len0 = WASM_VECTOR_LEN;
5340 wasm.wasmwallet_addAccount(retptr, this.__wbg_ptr, script_type, ptr0, len0);
5341 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5342 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5343 var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5345 throw takeObject(r1);
5347 return WasmAccount.__wrap(r0);
5349 wasm.__wbindgen_add_to_stack_pointer(16);
5353 * @param {WasmProtonWalletApiClient} api_client
5354 * @returns {Promise<WasmDiscoveredAccounts>}
5356 discoverAccounts(api_client) {
5357 _assertClass(api_client, WasmProtonWalletApiClient);
5358 const ret = wasm.wasmwallet_discoverAccounts(this.__wbg_ptr, api_client.__wbg_ptr);
5359 return takeObject(ret);
5362 * @param {string} derivation_path
5363 * @returns {WasmAccount | undefined}
5365 getAccount(derivation_path) {
5366 const ptr0 = passStringToWasm0(derivation_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5367 const len0 = WASM_VECTOR_LEN;
5368 const ret = wasm.wasmwallet_getAccount(this.__wbg_ptr, ptr0, len0);
5369 return ret === 0 ? undefined : WasmAccount.__wrap(ret);
5372 * @returns {Promise<WasmBalanceWrapper>}
5375 const ret = wasm.wasmwallet_getBalance(this.__wbg_ptr);
5376 return takeObject(ret);
5379 * @param {WasmPagination | undefined} [pagination]
5380 * @param {WasmSortOrder | undefined} [sort]
5381 * @returns {Promise<WasmTransactionDetailsArray>}
5383 getTransactions(pagination, sort) {
5384 const ret = wasm.wasmwallet_getTransactions(this.__wbg_ptr, isLikeNone(pagination) ? 0 : addHeapObject(pagination), isLikeNone(sort) ? 2 : sort);
5385 return takeObject(ret);
5388 * @param {WasmDerivationPath} account_key
5389 * @param {string} txid
5390 * @returns {Promise<WasmTransactionDetailsData>}
5392 getTransaction(account_key, txid) {
5393 _assertClass(account_key, WasmDerivationPath);
5394 const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5395 const len0 = WASM_VECTOR_LEN;
5396 const ret = wasm.wasmwallet_getTransaction(this.__wbg_ptr, account_key.__wbg_ptr, ptr0, len0);
5397 return takeObject(ret);
5406 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5407 wasm.wasmwallet_getFingerprint(retptr, this.__wbg_ptr);
5408 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5409 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5412 return getStringFromWasm0(r0, r1);
5414 wasm.__wbindgen_add_to_stack_pointer(16);
5415 wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
5420 const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5421 wasm.wasmwallet_clearStore(retptr, this.__wbg_ptr);
5422 var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5423 var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5425 throw takeObject(r0);
5428 wasm.__wbindgen_add_to_stack_pointer(16);
5433 const WasmWalletAccountAddressDataFinalization = (typeof FinalizationRegistry === 'undefined')
5434 ? { register: () => {}, unregister: () => {} }
5435 : new FinalizationRegistry(ptr => wasm.__wbg_wasmwalletaccountaddressdata_free(ptr >>> 0, 1));
5437 export class WasmWalletAccountAddressData {
5439 static __wrap(ptr) {
5441 const obj = Object.create(WasmWalletAccountAddressData.prototype);
5442 obj.__wbg_ptr = ptr;
5443 WasmWalletAccountAddressDataFinalization.register(obj, obj.__wbg_ptr, obj);
5447 static __unwrap(jsValue) {
5448 if (!(jsValue instanceof WasmWalletAccountAddressData)) {
5451 return jsValue.__destroy_into_raw();
5454 __destroy_into_raw() {
5455 const ptr = this.__wbg_ptr;
5457 WasmWalletAccountAddressDataFinalization.unregister(this);
5462 const ptr = this.__destroy_into_raw();
5463 wasm.__wbg_wasmwalletaccountaddressdata_free(ptr, 0);
5466 * @returns {WasmApiEmailAddress}
5469 const ret = wasm.__wbg_get_wasmwalletaccountaddressdata_Data(this.__wbg_ptr);
5470 return takeObject(ret);
5473 * @param {WasmApiEmailAddress} arg0
5476 wasm.__wbg_set_wasmwalletaccountaddressdata_Data(this.__wbg_ptr, addHeapObject(arg0));
5480 const WasmWalletAccountDataFinalization = (typeof FinalizationRegistry === 'undefined')
5481 ? { register: () => {}, unregister: () => {} }
5482 : new FinalizationRegistry(ptr => wasm.__wbg_wasmwalletaccountdata_free(ptr >>> 0, 1));
5484 export class WasmWalletAccountData {
5486 static __wrap(ptr) {
5488 const obj = Object.create(WasmWalletAccountData.prototype);
5489 obj.__wbg_ptr = ptr;
5490 WasmWalletAccountDataFinalization.register(obj, obj.__wbg_ptr, obj);
5494 static __unwrap(jsValue) {
5495 if (!(jsValue instanceof WasmWalletAccountData)) {
5498 return jsValue.__destroy_into_raw();
5501 __destroy_into_raw() {
5502 const ptr = this.__wbg_ptr;
5504 WasmWalletAccountDataFinalization.unregister(this);
5509 const ptr = this.__destroy_into_raw();
5510 wasm.__wbg_wasmwalletaccountdata_free(ptr, 0);
5513 * @returns {WasmApiWalletAccount}
5516 const ret = wasm.__wbg_get_wasmwalletaccountdata_Data(this.__wbg_ptr);
5517 return takeObject(ret);
5520 * @param {WasmApiWalletAccount} arg0
5523 wasm.__wbg_set_wasmwalletaccountdata_Data(this.__wbg_ptr, addHeapObject(arg0));
5527 const WasmWalletClientFinalization = (typeof FinalizationRegistry === 'undefined')
5528 ? { register: () => {}, unregister: () => {} }
5529 : new FinalizationRegistry(ptr => wasm.__wbg_wasmwalletclient_free(ptr >>> 0, 1));
5531 export class WasmWalletClient {
5533 static __wrap(ptr) {
5535 const obj = Object.create(WasmWalletClient.prototype);
5536 obj.__wbg_ptr = ptr;
5537 WasmWalletClientFinalization.register(obj, obj.__wbg_ptr, obj);
5541 __destroy_into_raw() {
5542 const ptr = this.__wbg_ptr;
5544 WasmWalletClientFinalization.unregister(this);
5549 const ptr = this.__destroy_into_raw();
5550 wasm.__wbg_wasmwalletclient_free(ptr, 0);
5553 * @returns {Promise<WasmApiWalletsData>}
5556 const ret = wasm.wasmwalletclient_getWallets(this.__wbg_ptr);
5557 return takeObject(ret);
5560 * @param {string} name
5561 * @param {boolean} is_imported
5562 * @param {number} wallet_type
5563 * @param {boolean} has_passphrase
5564 * @param {string} user_key_id
5565 * @param {string} wallet_key
5566 * @param {string} wallet_key_signature
5567 * @param {string | undefined} [mnemonic]
5568 * @param {string | undefined} [fingerprint]
5569 * @param {string | undefined} [public_key]
5570 * @param {boolean | undefined} [is_auto_created]
5571 * @returns {Promise<WasmApiWalletData>}
5573 createWallet(name, is_imported, wallet_type, has_passphrase, user_key_id, wallet_key, wallet_key_signature, mnemonic, fingerprint, public_key, is_auto_created) {
5574 const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5575 const len0 = WASM_VECTOR_LEN;
5576 const ptr1 = passStringToWasm0(user_key_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5577 const len1 = WASM_VECTOR_LEN;
5578 const ptr2 = passStringToWasm0(wallet_key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5579 const len2 = WASM_VECTOR_LEN;
5580 const ptr3 = passStringToWasm0(wallet_key_signature, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5581 const len3 = WASM_VECTOR_LEN;
5582 var ptr4 = isLikeNone(mnemonic) ? 0 : passStringToWasm0(mnemonic, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5583 var len4 = WASM_VECTOR_LEN;
5584 var ptr5 = isLikeNone(fingerprint) ? 0 : passStringToWasm0(fingerprint, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5585 var len5 = WASM_VECTOR_LEN;
5586 var ptr6 = isLikeNone(public_key) ? 0 : passStringToWasm0(public_key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5587 var len6 = WASM_VECTOR_LEN;
5588 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);
5589 return takeObject(ret);
5592 * @param {string} wallet_id
5593 * @param {WasmMigratedWallet} migrated_wallet
5594 * @param {WasmMigratedWalletAccounts} migrated_wallet_accounts
5595 * @param {WasmMigratedWalletTransactions} migrated_wallet_transactions
5596 * @returns {Promise<void>}
5598 migrate(wallet_id, migrated_wallet, migrated_wallet_accounts, migrated_wallet_transactions) {
5599 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5600 const len0 = WASM_VECTOR_LEN;
5601 _assertClass(migrated_wallet_accounts, WasmMigratedWalletAccounts);
5602 var ptr1 = migrated_wallet_accounts.__destroy_into_raw();
5603 _assertClass(migrated_wallet_transactions, WasmMigratedWalletTransactions);
5604 var ptr2 = migrated_wallet_transactions.__destroy_into_raw();
5605 const ret = wasm.wasmwalletclient_migrate(this.__wbg_ptr, ptr0, len0, addHeapObject(migrated_wallet), ptr1, ptr2);
5606 return takeObject(ret);
5609 * @param {string} wallet_id
5610 * @param {string} name
5611 * @returns {Promise<void>}
5613 updateWalletName(wallet_id, name) {
5614 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5615 const len0 = WASM_VECTOR_LEN;
5616 const ptr1 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5617 const len1 = WASM_VECTOR_LEN;
5618 const ret = wasm.wasmwalletclient_updateWalletName(this.__wbg_ptr, ptr0, len0, ptr1, len1);
5619 return takeObject(ret);
5622 * @param {string} wallet_id
5623 * @returns {Promise<void>}
5625 disableShowWalletRecovery(wallet_id) {
5626 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5627 const len0 = WASM_VECTOR_LEN;
5628 const ret = wasm.wasmwalletclient_disableShowWalletRecovery(this.__wbg_ptr, ptr0, len0);
5629 return takeObject(ret);
5632 * @param {string} wallet_id
5633 * @returns {Promise<void>}
5635 deleteWallet(wallet_id) {
5636 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5637 const len0 = WASM_VECTOR_LEN;
5638 const ret = wasm.wasmwalletclient_deleteWallet(this.__wbg_ptr, ptr0, len0);
5639 return takeObject(ret);
5642 * @param {string} wallet_id
5643 * @returns {Promise<WasmApiWalletAccounts>}
5645 getWalletAccounts(wallet_id) {
5646 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5647 const len0 = WASM_VECTOR_LEN;
5648 const ret = wasm.wasmwalletclient_getWalletAccounts(this.__wbg_ptr, ptr0, len0);
5649 return takeObject(ret);
5652 * @param {string} wallet_id
5653 * @param {string} wallet_account_id
5654 * @returns {Promise<WasmApiWalletAccountAddresses>}
5656 getWalletAccountAddresses(wallet_id, wallet_account_id) {
5657 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5658 const len0 = WASM_VECTOR_LEN;
5659 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5660 const len1 = WASM_VECTOR_LEN;
5661 const ret = wasm.wasmwalletclient_getWalletAccountAddresses(this.__wbg_ptr, ptr0, len0, ptr1, len1);
5662 return takeObject(ret);
5665 * @param {string} wallet_id
5666 * @param {WasmDerivationPath} derivation_path
5667 * @param {string} label
5668 * @param {WasmScriptType} script_type
5669 * @returns {Promise<WasmWalletAccountData>}
5671 createWalletAccount(wallet_id, derivation_path, label, script_type) {
5672 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5673 const len0 = WASM_VECTOR_LEN;
5674 _assertClass(derivation_path, WasmDerivationPath);
5675 var ptr1 = derivation_path.__destroy_into_raw();
5676 const ptr2 = passStringToWasm0(label, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5677 const len2 = WASM_VECTOR_LEN;
5678 const ret = wasm.wasmwalletclient_createWalletAccount(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, len2, script_type);
5679 return takeObject(ret);
5682 * @param {string} wallet_id
5683 * @param {string} wallet_account_id
5684 * @param {WasmFiatCurrencySymbol} symbol
5685 * @returns {Promise<WasmWalletAccountData>}
5687 updateWalletAccountFiatCurrency(wallet_id, wallet_account_id, symbol) {
5688 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5689 const len0 = WASM_VECTOR_LEN;
5690 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5691 const len1 = WASM_VECTOR_LEN;
5692 const ret = wasm.wasmwalletclient_updateWalletAccountFiatCurrency(this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(symbol));
5693 return takeObject(ret);
5696 * @param {string} wallet_id
5697 * @param {string} wallet_account_id
5698 * @param {string} label
5699 * @returns {Promise<WasmWalletAccountData>}
5701 updateWalletAccountLabel(wallet_id, wallet_account_id, label) {
5702 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5703 const len0 = WASM_VECTOR_LEN;
5704 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5705 const len1 = WASM_VECTOR_LEN;
5706 const ptr2 = passStringToWasm0(label, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5707 const len2 = WASM_VECTOR_LEN;
5708 const ret = wasm.wasmwalletclient_updateWalletAccountLabel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
5709 return takeObject(ret);
5712 * @param {string} wallet_id
5713 * @param {(string)[]} wallet_account_ids
5714 * @returns {Promise<WasmApiWalletAccounts>}
5716 updateWalletAccountsOrder(wallet_id, wallet_account_ids) {
5717 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5718 const len0 = WASM_VECTOR_LEN;
5719 const ptr1 = passArrayJsValueToWasm0(wallet_account_ids, wasm.__wbindgen_export_0);
5720 const len1 = WASM_VECTOR_LEN;
5721 const ret = wasm.wasmwalletclient_updateWalletAccountsOrder(this.__wbg_ptr, ptr0, len0, ptr1, len1);
5722 return takeObject(ret);
5725 * @param {string} wallet_id
5726 * @param {string} wallet_account_id
5727 * @param {number} last_used_index
5728 * @returns {Promise<WasmWalletAccountData>}
5730 updateWalletAccountLastUsedIndex(wallet_id, wallet_account_id, last_used_index) {
5731 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5732 const len0 = WASM_VECTOR_LEN;
5733 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5734 const len1 = WASM_VECTOR_LEN;
5735 const ret = wasm.wasmwalletclient_updateWalletAccountLastUsedIndex(this.__wbg_ptr, ptr0, len0, ptr1, len1, last_used_index);
5736 return takeObject(ret);
5739 * @param {string} wallet_id
5740 * @param {string} wallet_account_id
5741 * @param {string} email_address_id
5742 * @returns {Promise<WasmWalletAccountData>}
5744 addEmailAddress(wallet_id, wallet_account_id, email_address_id) {
5745 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5746 const len0 = WASM_VECTOR_LEN;
5747 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5748 const len1 = WASM_VECTOR_LEN;
5749 const ptr2 = passStringToWasm0(email_address_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5750 const len2 = WASM_VECTOR_LEN;
5751 const ret = wasm.wasmwalletclient_addEmailAddress(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
5752 return takeObject(ret);
5755 * @param {string} wallet_id
5756 * @param {string} wallet_account_id
5757 * @param {string} email_address_id
5758 * @returns {Promise<WasmWalletAccountData>}
5760 removeEmailAddress(wallet_id, wallet_account_id, email_address_id) {
5761 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5762 const len0 = WASM_VECTOR_LEN;
5763 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5764 const len1 = WASM_VECTOR_LEN;
5765 const ptr2 = passStringToWasm0(email_address_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5766 const len2 = WASM_VECTOR_LEN;
5767 const ret = wasm.wasmwalletclient_removeEmailAddress(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
5768 return takeObject(ret);
5771 * @param {string} wallet_id
5772 * @param {string} wallet_account_id
5773 * @returns {Promise<void>}
5775 deleteWalletAccount(wallet_id, wallet_account_id) {
5776 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5777 const len0 = WASM_VECTOR_LEN;
5778 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5779 const len1 = WASM_VECTOR_LEN;
5780 const ret = wasm.wasmwalletclient_deleteWalletAccount(this.__wbg_ptr, ptr0, len0, ptr1, len1);
5781 return takeObject(ret);
5784 * @param {string} wallet_id
5785 * @param {string | undefined} [wallet_account_id]
5786 * @param {(string)[] | undefined} [hashed_txids]
5787 * @returns {Promise<WasmApiWalletTransactions>}
5789 getWalletTransactions(wallet_id, wallet_account_id, hashed_txids) {
5790 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5791 const len0 = WASM_VECTOR_LEN;
5792 var ptr1 = isLikeNone(wallet_account_id) ? 0 : passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5793 var len1 = WASM_VECTOR_LEN;
5794 var ptr2 = isLikeNone(hashed_txids) ? 0 : passArrayJsValueToWasm0(hashed_txids, wasm.__wbindgen_export_0);
5795 var len2 = WASM_VECTOR_LEN;
5796 const ret = wasm.wasmwalletclient_getWalletTransactions(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
5797 return takeObject(ret);
5800 * @param {string} wallet_id
5801 * @param {string | undefined} [wallet_account_id]
5802 * @returns {Promise<WasmApiWalletTransactions>}
5804 getWalletTransactionsToHash(wallet_id, wallet_account_id) {
5805 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5806 const len0 = WASM_VECTOR_LEN;
5807 var ptr1 = isLikeNone(wallet_account_id) ? 0 : passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5808 var len1 = WASM_VECTOR_LEN;
5809 const ret = wasm.wasmwalletclient_getWalletTransactionsToHash(this.__wbg_ptr, ptr0, len0, ptr1, len1);
5810 return takeObject(ret);
5813 * @param {string} wallet_id
5814 * @param {string} wallet_account_id
5815 * @param {WasmCreateWalletTransactionPayload} payload
5816 * @returns {Promise<WasmApiWalletTransactionData>}
5818 createWalletTransaction(wallet_id, wallet_account_id, payload) {
5819 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5820 const len0 = WASM_VECTOR_LEN;
5821 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5822 const len1 = WASM_VECTOR_LEN;
5823 const ret = wasm.wasmwalletclient_createWalletTransaction(this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(payload));
5824 return takeObject(ret);
5827 * @param {string} wallet_id
5828 * @param {string} wallet_account_id
5829 * @param {string} wallet_transaction_id
5830 * @param {string} label
5831 * @returns {Promise<WasmApiWalletTransactionData>}
5833 updateWalletTransactionLabel(wallet_id, wallet_account_id, wallet_transaction_id, label) {
5834 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5835 const len0 = WASM_VECTOR_LEN;
5836 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5837 const len1 = WASM_VECTOR_LEN;
5838 const ptr2 = passStringToWasm0(wallet_transaction_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5839 const len2 = WASM_VECTOR_LEN;
5840 const ptr3 = passStringToWasm0(label, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5841 const len3 = WASM_VECTOR_LEN;
5842 const ret = wasm.wasmwalletclient_updateWalletTransactionLabel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
5843 return takeObject(ret);
5846 * @param {string} wallet_id
5847 * @param {string} wallet_account_id
5848 * @param {string} wallet_transaction_id
5849 * @param {string} hash_txid
5850 * @returns {Promise<WasmApiWalletTransactionData>}
5852 updateWalletTransactionHashedTxId(wallet_id, wallet_account_id, wallet_transaction_id, hash_txid) {
5853 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5854 const len0 = WASM_VECTOR_LEN;
5855 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5856 const len1 = WASM_VECTOR_LEN;
5857 const ptr2 = passStringToWasm0(wallet_transaction_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5858 const len2 = WASM_VECTOR_LEN;
5859 const ptr3 = passStringToWasm0(hash_txid, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5860 const len3 = WASM_VECTOR_LEN;
5861 const ret = wasm.wasmwalletclient_updateWalletTransactionHashedTxId(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
5862 return takeObject(ret);
5865 * @param {string} wallet_id
5866 * @param {string} wallet_account_id
5867 * @param {string} wallet_transaction_id
5868 * @param {string} sender
5869 * @returns {Promise<WasmApiWalletTransactionData>}
5871 updateExternalWalletTransactionSender(wallet_id, wallet_account_id, wallet_transaction_id, sender) {
5872 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5873 const len0 = WASM_VECTOR_LEN;
5874 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5875 const len1 = WASM_VECTOR_LEN;
5876 const ptr2 = passStringToWasm0(wallet_transaction_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5877 const len2 = WASM_VECTOR_LEN;
5878 const ptr3 = passStringToWasm0(sender, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5879 const len3 = WASM_VECTOR_LEN;
5880 const ret = wasm.wasmwalletclient_updateExternalWalletTransactionSender(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
5881 return takeObject(ret);
5884 * @param {string} wallet_id
5885 * @param {string} wallet_account_id
5886 * @param {string} wallet_transaction_id
5887 * @param {WasmWalletTransactionFlag} flag
5888 * @returns {Promise<WasmApiWalletTransactionData>}
5890 setWalletTransactionFlag(wallet_id, wallet_account_id, wallet_transaction_id, flag) {
5891 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5892 const len0 = WASM_VECTOR_LEN;
5893 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5894 const len1 = WASM_VECTOR_LEN;
5895 const ptr2 = passStringToWasm0(wallet_transaction_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5896 const len2 = WASM_VECTOR_LEN;
5897 const ret = wasm.wasmwalletclient_setWalletTransactionFlag(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, flag);
5898 return takeObject(ret);
5901 * @param {string} wallet_id
5902 * @param {string} wallet_account_id
5903 * @param {string} wallet_transaction_id
5904 * @param {WasmWalletTransactionFlag} flag
5905 * @returns {Promise<WasmApiWalletTransactionData>}
5907 deleteWalletTransactionFlag(wallet_id, wallet_account_id, wallet_transaction_id, flag) {
5908 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5909 const len0 = WASM_VECTOR_LEN;
5910 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5911 const len1 = WASM_VECTOR_LEN;
5912 const ptr2 = passStringToWasm0(wallet_transaction_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5913 const len2 = WASM_VECTOR_LEN;
5914 const ret = wasm.wasmwalletclient_deleteWalletTransactionFlag(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, flag);
5915 return takeObject(ret);
5918 * @param {string} wallet_id
5919 * @param {string} wallet_account_id
5920 * @param {string} wallet_transaction_id
5921 * @returns {Promise<void>}
5923 deleteWalletTransaction(wallet_id, wallet_account_id, wallet_transaction_id) {
5924 const ptr0 = passStringToWasm0(wallet_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5925 const len0 = WASM_VECTOR_LEN;
5926 const ptr1 = passStringToWasm0(wallet_account_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5927 const len1 = WASM_VECTOR_LEN;
5928 const ptr2 = passStringToWasm0(wallet_transaction_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
5929 const len2 = WASM_VECTOR_LEN;
5930 const ret = wasm.wasmwalletclient_deleteWalletTransaction(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
5931 return takeObject(ret);
5935 const WasmWrappedPriceGraphFinalization = (typeof FinalizationRegistry === 'undefined')
5936 ? { register: () => {}, unregister: () => {} }
5937 : new FinalizationRegistry(ptr => wasm.__wbg_wasmwrappedpricegraph_free(ptr >>> 0, 1));
5939 export class WasmWrappedPriceGraph {
5941 static __wrap(ptr) {
5943 const obj = Object.create(WasmWrappedPriceGraph.prototype);
5944 obj.__wbg_ptr = ptr;
5945 WasmWrappedPriceGraphFinalization.register(obj, obj.__wbg_ptr, obj);
5949 __destroy_into_raw() {
5950 const ptr = this.__wbg_ptr;
5952 WasmWrappedPriceGraphFinalization.unregister(this);
5957 const ptr = this.__destroy_into_raw();
5958 wasm.__wbg_wasmwrappedpricegraph_free(ptr, 0);
5961 * @returns {WasmPriceGraph}
5964 const ret = wasm.__wbg_get_wasmwrappedpricegraph_data(this.__wbg_ptr);
5965 return takeObject(ret);
5968 * @param {WasmPriceGraph} arg0
5971 wasm.__wbg_set_wasmwrappedpricegraph_data(this.__wbg_ptr, addHeapObject(arg0));
5975 export function __wbindgen_object_drop_ref(arg0) {
5979 export function __wbindgen_object_clone_ref(arg0) {
5980 const ret = getObject(arg0);
5981 return addHeapObject(ret);
5984 export function __wbindgen_number_new(arg0) {
5986 return addHeapObject(ret);
5989 export function __wbindgen_bigint_from_u64(arg0) {
5990 const ret = BigInt.asUintN(64, arg0);
5991 return addHeapObject(ret);
5994 export function __wbg_wasmaddressdetailsdata_new(arg0) {
5995 const ret = WasmAddressDetailsData.__wrap(arg0);
5996 return addHeapObject(ret);
5999 export function __wbg_wasmtxbuilder_new(arg0) {
6000 const ret = WasmTxBuilder.__wrap(arg0);
6001 return addHeapObject(ret);
6004 export function __wbg_wasmpsbtrecipient_new(arg0) {
6005 const ret = WasmPsbtRecipient.__wrap(arg0);
6006 return addHeapObject(ret);
6009 export function __wbg_wasmremainingmonthlyinvitations_new(arg0) {
6010 const ret = WasmRemainingMonthlyInvitations.__wrap(arg0);
6011 return addHeapObject(ret);
6014 export function __wbg_wasmusersettingsdata_new(arg0) {
6015 const ret = WasmUserSettingsData.__wrap(arg0);
6016 return addHeapObject(ret);
6019 export function __wbg_wasmapiwallettransactiondata_new(arg0) {
6020 const ret = WasmApiWalletTransactionData.__wrap(arg0);
6021 return addHeapObject(ret);
6024 export function __wbg_wasmapifiatcurrencydata_new(arg0) {
6025 const ret = WasmApiFiatCurrencyData.__wrap(arg0);
6026 return addHeapObject(ret);
6029 export function __wbg_wasmbalancewrapper_new(arg0) {
6030 const ret = WasmBalanceWrapper.__wrap(arg0);
6031 return addHeapObject(ret);
6034 export function __wbg_wasmtransactiondetailsdata_new(arg0) {
6035 const ret = WasmTransactionDetailsData.__wrap(arg0);
6036 return addHeapObject(ret);
6039 export function __wbg_wasmpsbt_new(arg0) {
6040 const ret = WasmPsbt.__wrap(arg0);
6041 return addHeapObject(ret);
6044 export function __wbg_wasmapiwalletbitcoinaddressdata_new(arg0) {
6045 const ret = WasmApiWalletBitcoinAddressData.__wrap(arg0);
6046 return addHeapObject(ret);
6049 export function __wbg_wasmapiexchangeratedata_new(arg0) {
6050 const ret = WasmApiExchangeRateData.__wrap(arg0);
6051 return addHeapObject(ret);
6054 export function __wbg_wasmapiwalletdata_new(arg0) {
6055 const ret = WasmApiWalletData.__wrap(arg0);
6056 return addHeapObject(ret);
6059 export function __wbg_wasmutxo_new(arg0) {
6060 const ret = WasmUtxo.__wrap(arg0);
6061 return addHeapObject(ret);
6064 export function __wbg_wasmrecipient_new(arg0) {
6065 const ret = WasmRecipient.__wrap(arg0);
6066 return addHeapObject(ret);
6069 export function __wbg_wasmapibitcoinaddresscreationpayloaddata_new(arg0) {
6070 const ret = WasmApiBitcoinAddressCreationPayloadData.__wrap(arg0);
6071 return addHeapObject(ret);
6074 export function __wbg_wasmutxoarray_new(arg0) {
6075 const ret = WasmUtxoArray.__wrap(arg0);
6076 return addHeapObject(ret);
6079 export function __wbg_wasmfiatcurrenciesbyprovider_new(arg0) {
6080 const ret = WasmFiatCurrenciesByProvider.__wrap(arg0);
6081 return addHeapObject(ret);
6084 export function __wbg_wasmapiwalletbitcoinaddresslookupdata_new(arg0) {
6085 const ret = WasmApiWalletBitcoinAddressLookupData.__wrap(arg0);
6086 return addHeapObject(ret);
6089 export function __wbg_wasmmigratedwalletaccountdata_new(arg0) {
6090 const ret = WasmMigratedWalletAccountData.__wrap(arg0);
6091 return addHeapObject(ret);
6094 export function __wbg_wasmcountriesandprovidertupple_new(arg0) {
6095 const ret = WasmCountriesAndProviderTupple.__wrap(arg0);
6096 return addHeapObject(ret);
6099 export function __wbg_wasmapifiatcurrencies_new(arg0) {
6100 const ret = WasmApiFiatCurrencies.__wrap(arg0);
6101 return addHeapObject(ret);
6104 export function __wbg_wasmcountriesbyprovider_new(arg0) {
6105 const ret = WasmCountriesByProvider.__wrap(arg0);
6106 return addHeapObject(ret);
6109 export function __wbg_wasmapiwalletaccounts_new(arg0) {
6110 const ret = WasmApiWalletAccounts.__wrap(arg0);
6111 return addHeapObject(ret);
6114 export function __wbg_wasmpaymentmethodsbyprovider_new(arg0) {
6115 const ret = WasmPaymentMethodsByProvider.__wrap(arg0);
6116 return addHeapObject(ret);
6119 export function __wbg_wasmapiwallettransactions_new(arg0) {
6120 const ret = WasmApiWalletTransactions.__wrap(arg0);
6121 return addHeapObject(ret);
6124 export function __wbg_wasmwrappedpricegraph_new(arg0) {
6125 const ret = WasmWrappedPriceGraph.__wrap(arg0);
6126 return addHeapObject(ret);
6129 export function __wbg_wasmoutpoint_new(arg0) {
6130 const ret = WasmOutPoint.__wrap(arg0);
6131 return addHeapObject(ret);
6134 export function __wbg_wasmapiwalletbitcoinaddresses_new(arg0) {
6135 const ret = WasmApiWalletBitcoinAddresses.__wrap(arg0);
6136 return addHeapObject(ret);
6139 export function __wbg_wasmdiscoveredaccount_new(arg0) {
6140 const ret = WasmDiscoveredAccount.__wrap(arg0);
6141 return addHeapObject(ret);
6144 export function __wbg_wasmdiscoveredaccounts_new(arg0) {
6145 const ret = WasmDiscoveredAccounts.__wrap(arg0);
6146 return addHeapObject(ret);
6149 export function __wbg_wasmaddressinfo_new(arg0) {
6150 const ret = WasmAddressInfo.__wrap(arg0);
6151 return addHeapObject(ret);
6154 export function __wbg_wasmfiatcurrenciesandprovidertupple_new(arg0) {
6155 const ret = WasmFiatCurrenciesAndProviderTupple.__wrap(arg0);
6156 return addHeapObject(ret);
6159 export function __wbg_wasmaddressdetailsarray_new(arg0) {
6160 const ret = WasmAddressDetailsArray.__wrap(arg0);
6161 return addHeapObject(ret);
6164 export function __wbg_wasmapiwalletsdata_new(arg0) {
6165 const ret = WasmApiWalletsData.__wrap(arg0);
6166 return addHeapObject(ret);
6169 export function __wbg_wasmtransactiondetailsarray_new(arg0) {
6170 const ret = WasmTransactionDetailsArray.__wrap(arg0);
6171 return addHeapObject(ret);
6174 export function __wbg_wasmapiwalletaccountaddresses_new(arg0) {
6175 const ret = WasmApiWalletAccountAddresses.__wrap(arg0);
6176 return addHeapObject(ret);
6179 export function __wbg_wasmwalletaccountdata_new(arg0) {
6180 const ret = WasmWalletAccountData.__wrap(arg0);
6181 return addHeapObject(ret);
6184 export function __wbg_wasmwalletaccountaddressdata_new(arg0) {
6185 const ret = WasmWalletAccountAddressData.__wrap(arg0);
6186 return addHeapObject(ret);
6189 export function __wbg_wasmquotesandprovidertupple_new(arg0) {
6190 const ret = WasmQuotesAndProviderTupple.__wrap(arg0);
6191 return addHeapObject(ret);
6194 export function __wbg_wasmmigratedwallettransactiondata_new(arg0) {
6195 const ret = WasmMigratedWalletTransactionData.__wrap(arg0);
6196 return addHeapObject(ret);
6199 export function __wbg_wasmpaymentmethodsandprovidertupple_new(arg0) {
6200 const ret = WasmPaymentMethodsAndProviderTupple.__wrap(arg0);
6201 return addHeapObject(ret);
6204 export function __wbg_wasmquotesbyprovider_new(arg0) {
6205 const ret = WasmQuotesByProvider.__wrap(arg0);
6206 return addHeapObject(ret);
6209 export function __wbg_wasmminimumfees_new(arg0) {
6210 const ret = WasmMinimumFees.__wrap(arg0);
6211 return addHeapObject(ret);
6214 export function __wbindgen_error_new(arg0, arg1) {
6215 const ret = new Error(getStringFromWasm0(arg0, arg1));
6216 return addHeapObject(ret);
6219 export function __wbg_wasmutxo_unwrap(arg0) {
6220 const ret = WasmUtxo.__unwrap(takeObject(arg0));
6224 export function __wbindgen_json_parse(arg0, arg1) {
6225 const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
6226 return addHeapObject(ret);
6229 export function __wbindgen_json_serialize(arg0, arg1) {
6230 const obj = getObject(arg1);
6231 const ret = JSON.stringify(obj === undefined ? null : obj);
6232 const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
6233 const len1 = WASM_VECTOR_LEN;
6234 getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6235 getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6238 export function __wbg_wasmapiwalletbitcoinaddressdata_unwrap(arg0) {
6239 const ret = WasmApiWalletBitcoinAddressData.__unwrap(takeObject(arg0));
6243 export function __wbg_wasmapibitcoinaddresscreationpayloaddata_unwrap(arg0) {
6244 const ret = WasmApiBitcoinAddressCreationPayloadData.__unwrap(takeObject(arg0));
6248 export function __wbg_wasmapifiatcurrencydata_unwrap(arg0) {
6249 const ret = WasmApiFiatCurrencyData.__unwrap(takeObject(arg0));
6253 export function __wbg_wasmapiwalletdata_unwrap(arg0) {
6254 const ret = WasmApiWalletData.__unwrap(takeObject(arg0));
6258 export function __wbg_wasmwalletaccountdata_unwrap(arg0) {
6259 const ret = WasmWalletAccountData.__unwrap(takeObject(arg0));
6263 export function __wbg_wasmwalletaccountaddressdata_unwrap(arg0) {
6264 const ret = WasmWalletAccountAddressData.__unwrap(takeObject(arg0));
6268 export function __wbg_wasmmigratedwalletaccountdata_unwrap(arg0) {
6269 const ret = WasmMigratedWalletAccountData.__unwrap(takeObject(arg0));
6273 export function __wbg_wasmmigratedwallettransactiondata_unwrap(arg0) {
6274 const ret = WasmMigratedWalletTransactionData.__unwrap(takeObject(arg0));
6278 export function __wbg_wasmapiwallettransactiondata_unwrap(arg0) {
6279 const ret = WasmApiWalletTransactionData.__unwrap(takeObject(arg0));
6283 export function __wbg_wasmcountriesandprovidertupple_unwrap(arg0) {
6284 const ret = WasmCountriesAndProviderTupple.__unwrap(takeObject(arg0));
6288 export function __wbg_wasmfiatcurrenciesandprovidertupple_unwrap(arg0) {
6289 const ret = WasmFiatCurrenciesAndProviderTupple.__unwrap(takeObject(arg0));
6293 export function __wbg_wasmpaymentmethodsandprovidertupple_unwrap(arg0) {
6294 const ret = WasmPaymentMethodsAndProviderTupple.__unwrap(takeObject(arg0));
6298 export function __wbg_wasmquotesandprovidertupple_unwrap(arg0) {
6299 const ret = WasmQuotesAndProviderTupple.__unwrap(takeObject(arg0));
6303 export function __wbg_wasmaddressdetailsdata_unwrap(arg0) {
6304 const ret = WasmAddressDetailsData.__unwrap(takeObject(arg0));
6308 export function __wbg_wasmtransactiondetailsdata_unwrap(arg0) {
6309 const ret = WasmTransactionDetailsData.__unwrap(takeObject(arg0));
6313 export function __wbg_wasmdiscoveredaccount_unwrap(arg0) {
6314 const ret = WasmDiscoveredAccount.__unwrap(takeObject(arg0));
6318 export function __wbindgen_string_new(arg0, arg1) {
6319 const ret = getStringFromWasm0(arg0, arg1);
6320 return addHeapObject(ret);
6323 export function __wbg_wasmpsbtrecipient_unwrap(arg0) {
6324 const ret = WasmPsbtRecipient.__unwrap(takeObject(arg0));
6328 export function __wbg_new_abda76e883ba8a5f() {
6329 const ret = new Error();
6330 return addHeapObject(ret);
6333 export function __wbg_stack_658279fe44541cf6(arg0, arg1) {
6334 const ret = getObject(arg1).stack;
6335 const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
6336 const len1 = WASM_VECTOR_LEN;
6337 getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6338 getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6341 export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
6347 console.error(getStringFromWasm0(arg0, arg1));
6349 wasm.__wbindgen_export_5(deferred0_0, deferred0_1, 1);
6353 export function __wbindgen_is_object(arg0) {
6354 const val = getObject(arg0);
6355 const ret = typeof(val) === 'object' && val !== null;
6359 export function __wbindgen_string_get(arg0, arg1) {
6360 const obj = getObject(arg1);
6361 const ret = typeof(obj) === 'string' ? obj : undefined;
6362 var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
6363 var len1 = WASM_VECTOR_LEN;
6364 getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6365 getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6368 export function __wbindgen_bigint_from_i64(arg0) {
6370 return addHeapObject(ret);
6373 export function __wbg_set_f975102236d3c502(arg0, arg1, arg2) {
6374 getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
6377 export function __wbg_fetch_9b133f5ec268a7b8(arg0) {
6378 const ret = fetch(getObject(arg0));
6379 return addHeapObject(ret);
6382 export function __wbg_queueMicrotask_848aa4969108a57e(arg0) {
6383 const ret = getObject(arg0).queueMicrotask;
6384 return addHeapObject(ret);
6387 export function __wbindgen_is_function(arg0) {
6388 const ret = typeof(getObject(arg0)) === 'function';
6392 export function __wbindgen_cb_drop(arg0) {
6393 const obj = takeObject(arg0).original;
6394 if (obj.cnt-- == 1) {
6402 export function __wbg_queueMicrotask_c5419c06eab41e73(arg0) {
6403 queueMicrotask(getObject(arg0));
6406 export function __wbg_instanceof_Window_6575cd7f1322f82f(arg0) {
6409 result = getObject(arg0) instanceof Window;
6417 export function __wbg_localStorage_6026615061e890bf() { return handleError(function (arg0) {
6418 const ret = getObject(arg0).localStorage;
6419 return isLikeNone(ret) ? 0 : addHeapObject(ret);
6422 export function __wbg_fetch_1fdc4448ed9eec00(arg0, arg1) {
6423 const ret = getObject(arg0).fetch(getObject(arg1));
6424 return addHeapObject(ret);
6427 export function __wbg_signal_9acfcec9e7dffc22(arg0) {
6428 const ret = getObject(arg0).signal;
6429 return addHeapObject(ret);
6432 export function __wbg_new_75169ae5a9683c55() { return handleError(function () {
6433 const ret = new AbortController();
6434 return addHeapObject(ret);
6437 export function __wbg_abort_c57daab47a6c1215(arg0) {
6438 getObject(arg0).abort();
6441 export function __wbg_getItem_cc312d333f535f07() { return handleError(function (arg0, arg1, arg2, arg3) {
6442 const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3));
6443 var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
6444 var len1 = WASM_VECTOR_LEN;
6445 getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6446 getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6449 export function __wbg_set_3992eb5ebf27cbdc() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
6450 getObject(arg0)[getStringFromWasm0(arg1, arg2)] = getStringFromWasm0(arg3, arg4);
6453 export function __wbg_new_a9ae04a5200606a5() { return handleError(function () {
6454 const ret = new Headers();
6455 return addHeapObject(ret);
6458 export function __wbg_append_8b3e7f74a47ea7d5() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
6459 getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
6462 export function __wbg_instanceof_Response_3c0e210a57ff751d(arg0) {
6465 result = getObject(arg0) instanceof Response;
6473 export function __wbg_url_58af972663531d16(arg0, arg1) {
6474 const ret = getObject(arg1).url;
6475 const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
6476 const len1 = WASM_VECTOR_LEN;
6477 getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6478 getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6481 export function __wbg_status_5f4e900d22140a18(arg0) {
6482 const ret = getObject(arg0).status;
6486 export function __wbg_headers_1b9bf90c73fae600(arg0) {
6487 const ret = getObject(arg0).headers;
6488 return addHeapObject(ret);
6491 export function __wbg_arrayBuffer_144729e09879650e() { return handleError(function (arg0) {
6492 const ret = getObject(arg0).arrayBuffer();
6493 return addHeapObject(ret);
6496 export function __wbg_setbody_aa8b691bec428bf4(arg0, arg1) {
6497 getObject(arg0).body = getObject(arg1);
6500 export function __wbg_setcredentials_a4e661320cdb9738(arg0, arg1) {
6501 getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
6504 export function __wbg_setheaders_f5205d36e423a544(arg0, arg1) {
6505 getObject(arg0).headers = getObject(arg1);
6508 export function __wbg_setmethod_ce2da76000b02f6a(arg0, arg1, arg2) {
6509 getObject(arg0).method = getStringFromWasm0(arg1, arg2);
6512 export function __wbg_setmode_4919fd636102c586(arg0, arg1) {
6513 getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
6516 export function __wbg_setsignal_812ccb8269a7fd90(arg0, arg1) {
6517 getObject(arg0).signal = getObject(arg1);
6520 export function __wbg_newwithstrandinit_4b92c89af0a8e383() { return handleError(function (arg0, arg1, arg2) {
6521 const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
6522 return addHeapObject(ret);
6525 export function __wbg_clearTimeout_76877dbc010e786d(arg0) {
6526 const ret = clearTimeout(takeObject(arg0));
6527 return addHeapObject(ret);
6530 export function __wbg_setTimeout_75cb9b6991a4031d() { return handleError(function (arg0, arg1) {
6531 const ret = setTimeout(getObject(arg0), arg1);
6532 return addHeapObject(ret);
6535 export function __wbg_crypto_1d1f22824a6a080c(arg0) {
6536 const ret = getObject(arg0).crypto;
6537 return addHeapObject(ret);
6540 export function __wbg_process_4a72847cc503995b(arg0) {
6541 const ret = getObject(arg0).process;
6542 return addHeapObject(ret);
6545 export function __wbg_versions_f686565e586dd935(arg0) {
6546 const ret = getObject(arg0).versions;
6547 return addHeapObject(ret);
6550 export function __wbg_node_104a2ff8d6ea03a2(arg0) {
6551 const ret = getObject(arg0).node;
6552 return addHeapObject(ret);
6555 export function __wbindgen_is_string(arg0) {
6556 const ret = typeof(getObject(arg0)) === 'string';
6560 export function __wbg_require_cca90b1a94a0255b() { return handleError(function () {
6561 const ret = module.require;
6562 return addHeapObject(ret);
6565 export function __wbg_msCrypto_eb05e62b530a1508(arg0) {
6566 const ret = getObject(arg0).msCrypto;
6567 return addHeapObject(ret);
6570 export function __wbg_getRandomValues_3aa56aa6edec874c() { return handleError(function (arg0, arg1) {
6571 getObject(arg0).getRandomValues(getObject(arg1));
6574 export function __wbg_randomFillSync_5c9c955aa56b6049() { return handleError(function (arg0, arg1) {
6575 getObject(arg0).randomFillSync(takeObject(arg1));
6578 export function __wbg_new_034f913e7636e987() {
6579 const ret = new Array();
6580 return addHeapObject(ret);
6583 export function __wbg_newnoargs_1ede4bf2ebbaaf43(arg0, arg1) {
6584 const ret = new Function(getStringFromWasm0(arg0, arg1));
6585 return addHeapObject(ret);
6588 export function __wbg_new_7a87a0376e40533b() {
6589 const ret = new Map();
6590 return addHeapObject(ret);
6593 export function __wbg_next_13b477da1eaa3897(arg0) {
6594 const ret = getObject(arg0).next;
6595 return addHeapObject(ret);
6598 export function __wbg_next_b06e115d1b01e10b() { return handleError(function (arg0) {
6599 const ret = getObject(arg0).next();
6600 return addHeapObject(ret);
6603 export function __wbg_done_983b5ffcaec8c583(arg0) {
6604 const ret = getObject(arg0).done;
6608 export function __wbg_value_2ab8a198c834c26a(arg0) {
6609 const ret = getObject(arg0).value;
6610 return addHeapObject(ret);
6613 export function __wbg_iterator_695d699a44d6234c() {
6614 const ret = Symbol.iterator;
6615 return addHeapObject(ret);
6618 export function __wbg_get_ef828680c64da212() { return handleError(function (arg0, arg1) {
6619 const ret = Reflect.get(getObject(arg0), getObject(arg1));
6620 return addHeapObject(ret);
6623 export function __wbg_call_a9ef466721e824f2() { return handleError(function (arg0, arg1) {
6624 const ret = getObject(arg0).call(getObject(arg1));
6625 return addHeapObject(ret);
6628 export function __wbg_new_e69b5f66fda8f13c() {
6629 const ret = new Object();
6630 return addHeapObject(ret);
6633 export function __wbg_self_bf91bf94d9e04084() { return handleError(function () {
6634 const ret = self.self;
6635 return addHeapObject(ret);
6638 export function __wbg_window_52dd9f07d03fd5f8() { return handleError(function () {
6639 const ret = window.window;
6640 return addHeapObject(ret);
6643 export function __wbg_globalThis_05c129bf37fcf1be() { return handleError(function () {
6644 const ret = globalThis.globalThis;
6645 return addHeapObject(ret);
6648 export function __wbg_global_3eca19bb09e9c484() { return handleError(function () {
6649 const ret = global.global;
6650 return addHeapObject(ret);
6653 export function __wbindgen_is_undefined(arg0) {
6654 const ret = getObject(arg0) === undefined;
6658 export function __wbg_set_425e70f7c64ac962(arg0, arg1, arg2) {
6659 getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
6662 export function __wbg_new_70a2f23d1565c04c(arg0, arg1) {
6663 const ret = new Error(getStringFromWasm0(arg0, arg1));
6664 return addHeapObject(ret);
6667 export function __wbg_call_3bfa248576352471() { return handleError(function (arg0, arg1, arg2) {
6668 const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
6669 return addHeapObject(ret);
6672 export function __wbg_set_277a63e77c89279f(arg0, arg1, arg2) {
6673 const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
6674 return addHeapObject(ret);
6677 export function __wbg_now_70af4fe37a792251() {
6678 const ret = Date.now();
6682 export function __wbg_new_1073970097e5a420(arg0, arg1) {
6684 var state0 = {a: arg0, b: arg1};
6685 var cb0 = (arg0, arg1) => {
6689 return __wbg_adapter_616(a, state0.b, arg0, arg1);
6694 const ret = new Promise(cb0);
6695 return addHeapObject(ret);
6697 state0.a = state0.b = 0;
6701 export function __wbg_resolve_0aad7c1484731c99(arg0) {
6702 const ret = Promise.resolve(getObject(arg0));
6703 return addHeapObject(ret);
6706 export function __wbg_then_748f75edfb032440(arg0, arg1) {
6707 const ret = getObject(arg0).then(getObject(arg1));
6708 return addHeapObject(ret);
6711 export function __wbg_then_4866a7d9f55d8f3e(arg0, arg1, arg2) {
6712 const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
6713 return addHeapObject(ret);
6716 export function __wbg_buffer_ccaed51a635d8a2d(arg0) {
6717 const ret = getObject(arg0).buffer;
6718 return addHeapObject(ret);
6721 export function __wbg_newwithbyteoffsetandlength_7e3eb787208af730(arg0, arg1, arg2) {
6722 const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
6723 return addHeapObject(ret);
6726 export function __wbg_new_fec2611eb9180f95(arg0) {
6727 const ret = new Uint8Array(getObject(arg0));
6728 return addHeapObject(ret);
6731 export function __wbg_set_ec2fcf81bc573fd9(arg0, arg1, arg2) {
6732 getObject(arg0).set(getObject(arg1), arg2 >>> 0);
6735 export function __wbg_length_9254c4bd3b9f23c4(arg0) {
6736 const ret = getObject(arg0).length;
6740 export function __wbg_newwithlength_76462a666eca145f(arg0) {
6741 const ret = new Uint8Array(arg0 >>> 0);
6742 return addHeapObject(ret);
6745 export function __wbg_subarray_975a06f9dbd16995(arg0, arg1, arg2) {
6746 const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
6747 return addHeapObject(ret);
6750 export function __wbg_has_bd717f25f195f23d() { return handleError(function (arg0, arg1) {
6751 const ret = Reflect.has(getObject(arg0), getObject(arg1));
6755 export function __wbg_stringify_eead5648c09faaf8() { return handleError(function (arg0) {
6756 const ret = JSON.stringify(getObject(arg0));
6757 return addHeapObject(ret);
6760 export function __wbindgen_debug_string(arg0, arg1) {
6761 const ret = debugString(getObject(arg1));
6762 const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
6763 const len1 = WASM_VECTOR_LEN;
6764 getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6765 getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6768 export function __wbindgen_throw(arg0, arg1) {
6769 throw new Error(getStringFromWasm0(arg0, arg1));
6772 export function __wbindgen_memory() {
6773 const ret = wasm.memory;
6774 return addHeapObject(ret);
6777 export function __wbindgen_closure_wrapper10932(arg0, arg1, arg2) {
6778 const ret = makeMutClosure(arg0, arg1, 1829, __wbg_adapter_38);
6779 return addHeapObject(ret);
6782 export function __wbindgen_closure_wrapper11570(arg0, arg1, arg2) {
6783 const ret = makeMutClosure(arg0, arg1, 1911, __wbg_adapter_41);
6784 return addHeapObject(ret);