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 addHeapObject(obj
) {
16 if (heap_next
=== heap
.length
) heap
.push(heap
.length
+ 1);
17 const idx
= heap_next
;
18 heap_next
= heap
[idx
];
24 function dropObject(idx
) {
25 if (idx
< 132) return;
26 heap
[idx
] = heap_next
;
30 function takeObject(idx
) {
31 const ret
= getObject(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
._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h68f19b82039db9c3(arg0
, arg1
, addHeapObject(arg2
));
226 function __wbg_adapter_41(arg0
, arg1
) {
227 wasm
._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb627f62749543d8e(arg0
, arg1
);
230 function getArrayJsValueFromWasm0(ptr
, len
) {
232 const mem
= getDataViewMemory0();
234 for (let i
= ptr
; i
< ptr
+ 4 * len
; i
+= 4) {
235 result
.push(takeObject(mem
.getUint32(i
, true)));
240 function passArrayJsValueToWasm0(array
, malloc
) {
241 const ptr
= malloc(array
.length
* 4, 4) >>> 0;
242 const mem
= getDataViewMemory0();
243 for (let i
= 0; i
< array
.length
; i
++) {
244 mem
.setUint32(ptr
+ 4 * i
, addHeapObject(array
[i
]), true);
246 WASM_VECTOR_LEN
= array
.length
;
250 function _assertClass(instance
, klass
) {
251 if (!(instance
instanceof klass
)) {
252 throw new Error(`expected instance of ${klass.name}`);
257 function getArrayU8FromWasm0(ptr
, len
) {
259 return getUint8ArrayMemory0().subarray(ptr
/ 1, ptr
/ 1 + len
);
262 function passArray8ToWasm0(arg
, malloc
) {
263 const ptr
= malloc(arg
.length
* 1, 1) >>> 0;
264 getUint8ArrayMemory0().set(arg
, ptr
/ 1);
265 WASM_VECTOR_LEN
= arg
.length
;
269 * @param {WasmPsbt} psbt
270 * @param {WasmAccount} account
271 * @returns {Promise<WasmTransactionDetailsData>}
273 export function createTransactionFromPsbt(psbt
, account
) {
274 _assertClass(psbt
, WasmPsbt
);
275 _assertClass(account
, WasmAccount
);
276 const ret
= wasm
.createTransactionFromPsbt(psbt
.__wbg_ptr
, account
.__wbg_ptr
);
277 return takeObject(ret
);
282 export function setPanicHook() {
287 * @param {string} word_start
288 * @returns {(string)[]}
290 export function getWordsAutocomplete(word_start
) {
292 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
293 const ptr0
= passStringToWasm0(word_start
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
294 const len0
= WASM_VECTOR_LEN
;
295 wasm
.getWordsAutocomplete(retptr
, ptr0
, len0
);
296 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
297 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
298 var v2
= getArrayJsValueFromWasm0(r0
, r1
).slice();
299 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
302 wasm
.__wbindgen_add_to_stack_pointer(16);
309 export function getDefaultStopGap() {
310 const ret
= wasm
.getDefaultStopGap();
314 function handleError(f
, args
) {
316 return f
.apply(this, args
);
318 wasm
.__wbindgen_exn_store(addHeapObject(e
));
321 function __wbg_adapter_615(arg0
, arg1
, arg2
, arg3
) {
322 wasm
.wasm_bindgen__convert__closures__invoke2_mut__h6b1d7e5a4d852872(arg0
, arg1
, addHeapObject(arg2
), addHeapObject(arg3
));
327 export const WasmPaymentLinkKind
= Object
.freeze({ BitcoinAddress
:0,"0":"BitcoinAddress",BitcoinURI
:1,"1":"BitcoinURI",LightningURI
:2,"2":"LightningURI",UnifiedURI
:3,"3":"UnifiedURI", });
330 export const WasmNetwork
= Object
.freeze({
334 Bitcoin
:0,"0":"Bitcoin",
336 * Bitcoin's testnet network.
338 Testnet
:1,"1":"Testnet",
340 * Bitcoin's signet network.
342 Signet
:2,"2":"Signet",
344 * Bitcoin's regtest network.
346 Regtest
:3,"3":"Regtest", });
349 export const WasmScriptType
= Object
.freeze({ Legacy
:1,"1":"Legacy",NestedSegwit
:2,"2":"NestedSegwit",NativeSegwit
:3,"3":"NativeSegwit",Taproot
:4,"4":"Taproot", });
352 export const WasmWalletTransactionFlag
= Object
.freeze({ Suspicious
:0,"0":"Suspicious",Private
:1,"1":"Private", });
355 export const WasmLanguage
= Object
.freeze({ English
:0,"0":"English",SimplifiedChinese
:1,"1":"SimplifiedChinese",TraditionalChinese
:2,"2":"TraditionalChinese",Czech
:3,"3":"Czech",French
:4,"4":"French",Italian
:5,"5":"Italian",Japanese
:6,"6":"Japanese",Korean
:7,"7":"Korean",Spanish
:8,"8":"Spanish", });
358 export const WasmChangeSpendPolicy
= Object
.freeze({ ChangeAllowed
:0,"0":"ChangeAllowed",OnlyChange
:1,"1":"OnlyChange",ChangeForbidden
:2,"2":"ChangeForbidden", });
361 export const WasmWordCount
= Object
.freeze({ Words12
:0,"0":"Words12",Words15
:1,"1":"Words15",Words18
:2,"2":"Words18",Words21
:3,"3":"Words21",Words24
:4,"4":"Words24", });
364 export const WasmCoinSelection
= Object
.freeze({ BranchAndBound
:0,"0":"BranchAndBound",LargestFirst
:1,"1":"LargestFirst",OldestFirst
:2,"2":"OldestFirst",Manual
:3,"3":"Manual", });
367 export const WasmSortOrder
= Object
.freeze({ Asc
:0,"0":"Asc",Desc
:1,"1":"Desc", });
370 export const WasmKeychainKind
= Object
.freeze({
372 * External keychain, used for deriving recipient addresses.
374 External
:0,"0":"External",
376 * Internal keychain, used for deriving change addresses.
378 Internal
:1,"1":"Internal", });
380 const WasmAccountFinalization
= (typeof FinalizationRegistry
=== 'undefined')
381 ? { register
: () => {}, unregister
: () => {} }
382 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmaccount_free(ptr
>>> 0, 1));
385 export class WasmAccount
{
389 const obj
= Object
.create(WasmAccount
.prototype);
391 WasmAccountFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
395 __destroy_into_raw() {
396 const ptr
= this.__wbg_ptr
;
398 WasmAccountFinalization
.unregister(this);
403 const ptr
= this.__destroy_into_raw();
404 wasm
.__wbg_wasmaccount_free(ptr
, 0);
407 * @param {WasmWallet} wallet
408 * @param {WasmScriptType} script_type
409 * @param {WasmDerivationPath} derivation_path
411 constructor(wallet
, script_type
, derivation_path
) {
413 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
414 _assertClass(wallet
, WasmWallet
);
415 _assertClass(derivation_path
, WasmDerivationPath
);
416 var ptr0
= derivation_path
.__destroy_into_raw();
417 wasm
.wasmaccount_new(retptr
, wallet
.__wbg_ptr
, script_type
, ptr0
);
418 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
419 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
420 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
422 throw takeObject(r1
);
424 this.__wbg_ptr
= r0
>>> 0;
425 WasmAccountFinalization
.register(this, this.__wbg_ptr
, this);
428 wasm
.__wbindgen_add_to_stack_pointer(16);
432 * @param {number} from
433 * @param {number | undefined} [to]
434 * @returns {Promise<void>}
436 markReceiveAddressesUsedTo(from, to
) {
437 const ret
= wasm
.wasmaccount_markReceiveAddressesUsedTo(this.__wbg_ptr
, from, !isLikeNone(to
), isLikeNone(to
) ? 0 : to
);
438 return takeObject(ret
);
441 * @returns {Promise<WasmAddressInfo>}
443 getNextReceiveAddress() {
444 const ret
= wasm
.wasmaccount_getNextReceiveAddress(this.__wbg_ptr
);
445 return takeObject(ret
);
448 * @param {number} index
449 * @returns {Promise<WasmAddressInfo>}
451 peekReceiveAddress(index
) {
452 const ret
= wasm
.wasmaccount_peekReceiveAddress(this.__wbg_ptr
, index
);
453 return takeObject(ret
);
456 * @param {WasmAddress} address
457 * @returns {Promise<boolean>}
460 _assertClass(address
, WasmAddress
);
461 const ret
= wasm
.wasmaccount_owns(this.__wbg_ptr
, address
.__wbg_ptr
);
462 return takeObject(ret
);
465 * @returns {Promise<WasmBalanceWrapper>}
468 const ret
= wasm
.wasmaccount_getBalance(this.__wbg_ptr
);
469 return takeObject(ret
);
474 getDerivationPath() {
478 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
479 wasm
.wasmaccount_getDerivationPath(retptr
, this.__wbg_ptr
);
480 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
481 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
482 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
483 var r3
= getDataViewMemory0().getInt32(retptr
+ 4 * 3, true);
488 throw takeObject(r2
);
492 return getStringFromWasm0(ptr1
, len1
);
494 wasm
.__wbindgen_add_to_stack_pointer(16);
495 wasm
.__wbindgen_free(deferred2_0
, deferred2_1
, 1);
499 * @returns {Promise<WasmUtxoArray>}
502 const ret
= wasm
.wasmaccount_getUtxos(this.__wbg_ptr
);
503 return takeObject(ret
);
506 * @param {WasmPagination} pagination
507 * @param {WasmBlockchainClient} client
508 * @param {WasmKeychainKind} keychain
509 * @param {boolean | undefined} [force_sync]
510 * @returns {Promise<WasmAddressDetailsArray>}
512 getAddresses(pagination
, client
, keychain
, force_sync
) {
513 _assertClass(client
, WasmBlockchainClient
);
514 const ret
= wasm
.wasmaccount_getAddresses(this.__wbg_ptr
, addHeapObject(pagination
), client
.__wbg_ptr
, keychain
, isLikeNone(force_sync
) ? 0xFFFFFF : force_sync
? 1 : 0);
515 return takeObject(ret
);
518 * @param {WasmPagination} pagination
519 * @param {WasmSortOrder | undefined} [sort]
520 * @returns {Promise<WasmTransactionDetailsArray>}
522 getTransactions(pagination
, sort
) {
523 const ret
= wasm
.wasmaccount_getTransactions(this.__wbg_ptr
, addHeapObject(pagination
), isLikeNone(sort
) ? 2 : sort
);
524 return takeObject(ret
);
527 * @param {string} txid
528 * @returns {Promise<WasmTransactionDetailsData>}
530 getTransaction(txid
) {
531 const ptr0
= passStringToWasm0(txid
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
532 const len0
= WASM_VECTOR_LEN
;
533 const ret
= wasm
.wasmaccount_getTransaction(this.__wbg_ptr
, ptr0
, len0
);
534 return takeObject(ret
);
537 * @returns {Promise<boolean>}
540 const ret
= wasm
.wasmaccount_hasSyncData(this.__wbg_ptr
);
541 return takeObject(ret
);
544 * @param {WasmPsbt} psbt
545 * @returns {Promise<void>}
547 insertUnconfirmedTransaction(psbt
) {
548 _assertClass(psbt
, WasmPsbt
);
549 const ret
= wasm
.wasmaccount_insertUnconfirmedTransaction(this.__wbg_ptr
, psbt
.__wbg_ptr
);
550 return takeObject(ret
);
553 * @param {WasmNetwork} network
554 * @param {string} txid
555 * @param {bigint} fees
556 * @returns {Promise<WasmPsbt>}
558 bumpTransactionsFees(network
, txid
, fees
) {
559 const ptr0
= passStringToWasm0(txid
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
560 const len0
= WASM_VECTOR_LEN
;
561 const ret
= wasm
.wasmaccount_bumpTransactionsFees(this.__wbg_ptr
, network
, ptr0
, len0
, fees
);
562 return takeObject(ret
);
565 * @returns {Promise<void>}
568 const ret
= wasm
.wasmaccount_clearStore(this.__wbg_ptr
);
569 return takeObject(ret
);
573 const WasmAddressFinalization
= (typeof FinalizationRegistry
=== 'undefined')
574 ? { register
: () => {}, unregister
: () => {} }
575 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmaddress_free(ptr
>>> 0, 1));
578 export class WasmAddress
{
582 const obj
= Object
.create(WasmAddress
.prototype);
584 WasmAddressFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
588 __destroy_into_raw() {
589 const ptr
= this.__wbg_ptr
;
591 WasmAddressFinalization
.unregister(this);
596 const ptr
= this.__destroy_into_raw();
597 wasm
.__wbg_wasmaddress_free(ptr
, 0);
600 * @param {string} str
601 * @param {WasmNetwork} network
603 constructor(str
, network
) {
605 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
606 const ptr0
= passStringToWasm0(str
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
607 const len0
= WASM_VECTOR_LEN
;
608 wasm
.wasmaddress_new(retptr
, ptr0
, len0
, network
);
609 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
610 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
611 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
613 throw takeObject(r1
);
615 this.__wbg_ptr
= r0
>>> 0;
616 WasmAddressFinalization
.register(this, this.__wbg_ptr
, this);
619 wasm
.__wbindgen_add_to_stack_pointer(16);
623 * @param {WasmScript} value
624 * @param {WasmNetwork} network
625 * @returns {WasmAddress}
627 static fromScript(value
, network
) {
629 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
630 _assertClass(value
, WasmScript
);
631 var ptr0
= value
.__destroy_into_raw();
632 wasm
.wasmaddress_fromScript(retptr
, ptr0
, network
);
633 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
634 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
635 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
637 throw takeObject(r1
);
639 return WasmAddress
.__wrap(r0
);
641 wasm
.__wbindgen_add_to_stack_pointer(16);
651 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
652 wasm
.wasmaddress_toString(retptr
, this.__wbg_ptr
);
653 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
654 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
657 return getStringFromWasm0(r0
, r1
);
659 wasm
.__wbindgen_add_to_stack_pointer(16);
660 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
664 * @returns {WasmScript}
667 const ret
= wasm
.wasmaddress_intoScript(this.__wbg_ptr
);
668 return WasmScript
.__wrap(ret
);
672 const WasmAddressDetailsArrayFinalization
= (typeof FinalizationRegistry
=== 'undefined')
673 ? { register
: () => {}, unregister
: () => {} }
674 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmaddressdetailsarray_free(ptr
>>> 0, 1));
677 export class WasmAddressDetailsArray
{
681 const obj
= Object
.create(WasmAddressDetailsArray
.prototype);
683 WasmAddressDetailsArrayFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
687 __destroy_into_raw() {
688 const ptr
= this.__wbg_ptr
;
690 WasmAddressDetailsArrayFinalization
.unregister(this);
695 const ptr
= this.__destroy_into_raw();
696 wasm
.__wbg_wasmaddressdetailsarray_free(ptr
, 0);
699 * @returns {(WasmAddressDetailsData)[]}
703 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
704 wasm
.__wbg_get_wasmaddressdetailsarray_0(retptr
, this.__wbg_ptr
);
705 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
706 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
707 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
708 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
711 wasm
.__wbindgen_add_to_stack_pointer(16);
715 * @param {(WasmAddressDetailsData)[]} arg0
718 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
719 const len0
= WASM_VECTOR_LEN
;
720 wasm
.__wbg_set_wasmaddressdetailsarray_0(this.__wbg_ptr
, ptr0
, len0
);
724 const WasmAddressDetailsDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
725 ? { register
: () => {}, unregister
: () => {} }
726 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmaddressdetailsdata_free(ptr
>>> 0, 1));
729 export class WasmAddressDetailsData
{
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));
777 export class WasmAddressInfo
{
781 const obj
= Object
.create(WasmAddressInfo
.prototype);
783 WasmAddressInfoFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
787 __destroy_into_raw() {
788 const ptr
= this.__wbg_ptr
;
790 WasmAddressInfoFinalization
.unregister(this);
795 const ptr
= this.__destroy_into_raw();
796 wasm
.__wbg_wasmaddressinfo_free(ptr
, 0);
799 * Child index of this address
803 const ret
= wasm
.__wbg_get_wasmaddressinfo_index(this.__wbg_ptr
);
807 * Child index of this address
808 * @param {number} arg0
811 wasm
.__wbg_set_wasmaddressinfo_index(this.__wbg_ptr
, arg0
);
821 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
822 wasm
.__wbg_get_wasmaddressinfo_address(retptr
, this.__wbg_ptr
);
823 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
824 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
827 return getStringFromWasm0(r0
, r1
);
829 wasm
.__wbindgen_add_to_stack_pointer(16);
830 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
835 * @param {string} arg0
838 const ptr0
= passStringToWasm0(arg0
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
839 const len0
= WASM_VECTOR_LEN
;
840 wasm
.__wbg_set_wasmaddressinfo_address(this.__wbg_ptr
, ptr0
, len0
);
844 * @returns {WasmKeychainKind}
847 const ret
= wasm
.__wbg_get_wasmaddressinfo_keychain(this.__wbg_ptr
);
852 * @param {WasmKeychainKind} arg0
855 wasm
.__wbg_set_wasmaddressinfo_keychain(this.__wbg_ptr
, arg0
);
859 const WasmApiBitcoinAddressCreationPayloadDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
860 ? { register
: () => {}, unregister
: () => {} }
861 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapibitcoinaddresscreationpayloaddata_free(ptr
>>> 0, 1));
864 export class WasmApiBitcoinAddressCreationPayloadData
{
868 const obj
= Object
.create(WasmApiBitcoinAddressCreationPayloadData
.prototype);
870 WasmApiBitcoinAddressCreationPayloadDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
874 static __unwrap(jsValue
) {
875 if (!(jsValue
instanceof WasmApiBitcoinAddressCreationPayloadData
)) {
878 return jsValue
.__destroy_into_raw();
881 __destroy_into_raw() {
882 const ptr
= this.__wbg_ptr
;
884 WasmApiBitcoinAddressCreationPayloadDataFinalization
.unregister(this);
889 const ptr
= this.__destroy_into_raw();
890 wasm
.__wbg_wasmapibitcoinaddresscreationpayloaddata_free(ptr
, 0);
893 * @returns {WasmApiBitcoinAddressCreationPayload}
896 const ret
= wasm
.__wbg_get_wasmapibitcoinaddresscreationpayloaddata_Data(this.__wbg_ptr
);
897 return takeObject(ret
);
900 * @param {WasmApiBitcoinAddressCreationPayload} arg0
903 wasm
.__wbg_set_wasmapibitcoinaddresscreationpayloaddata_Data(this.__wbg_ptr
, addHeapObject(arg0
));
907 const WasmApiBitcoinAddressesCreationPayloadFinalization
= (typeof FinalizationRegistry
=== 'undefined')
908 ? { register
: () => {}, unregister
: () => {} }
909 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapibitcoinaddressescreationpayload_free(ptr
>>> 0, 1));
912 export class WasmApiBitcoinAddressesCreationPayload
{
914 __destroy_into_raw() {
915 const ptr
= this.__wbg_ptr
;
917 WasmApiBitcoinAddressesCreationPayloadFinalization
.unregister(this);
922 const ptr
= this.__destroy_into_raw();
923 wasm
.__wbg_wasmapibitcoinaddressescreationpayload_free(ptr
, 0);
926 * @returns {(WasmApiBitcoinAddressCreationPayloadData)[]}
930 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
931 wasm
.__wbg_get_wasmapibitcoinaddressescreationpayload_0(retptr
, this.__wbg_ptr
);
932 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
933 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
934 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
935 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
938 wasm
.__wbindgen_add_to_stack_pointer(16);
942 * @param {(WasmApiBitcoinAddressCreationPayloadData)[]} arg0
945 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
946 const len0
= WASM_VECTOR_LEN
;
947 wasm
.__wbg_set_wasmapibitcoinaddressescreationpayload_0(this.__wbg_ptr
, ptr0
, len0
);
952 const ret
= wasm
.wasmapibitcoinaddressescreationpayload_new();
953 this.__wbg_ptr
= ret
>>> 0;
954 WasmApiBitcoinAddressesCreationPayloadFinalization
.register(this, this.__wbg_ptr
, this);
958 * @param {WasmApiBitcoinAddressCreationPayload} create_payload
960 push(create_payload
) {
961 wasm
.wasmapibitcoinaddressescreationpayload_push(this.__wbg_ptr
, addHeapObject(create_payload
));
965 const WasmApiClientsFinalization
= (typeof FinalizationRegistry
=== 'undefined')
966 ? { register
: () => {}, unregister
: () => {} }
967 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapiclients_free(ptr
>>> 0, 1));
970 export class WasmApiClients
{
974 const obj
= Object
.create(WasmApiClients
.prototype);
976 WasmApiClientsFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
980 __destroy_into_raw() {
981 const ptr
= this.__wbg_ptr
;
983 WasmApiClientsFinalization
.unregister(this);
988 const ptr
= this.__destroy_into_raw();
989 wasm
.__wbg_wasmapiclients_free(ptr
, 0);
992 * @returns {WasmExchangeRateClient}
994 get exchange_rate() {
995 const ret
= wasm
.__wbg_get_wasmapiclients_exchange_rate(this.__wbg_ptr
);
996 return WasmExchangeRateClient
.__wrap(ret
);
999 * @param {WasmExchangeRateClient} arg0
1001 set exchange_rate(arg0
) {
1002 _assertClass(arg0
, WasmExchangeRateClient
);
1003 var ptr0
= arg0
.__destroy_into_raw();
1004 wasm
.__wbg_set_wasmapiclients_exchange_rate(this.__wbg_ptr
, ptr0
);
1007 * @returns {WasmEmailIntegrationClient}
1009 get email_integration() {
1010 const ret
= wasm
.__wbg_get_wasmapiclients_email_integration(this.__wbg_ptr
);
1011 return WasmEmailIntegrationClient
.__wrap(ret
);
1014 * @param {WasmEmailIntegrationClient} arg0
1016 set email_integration(arg0
) {
1017 _assertClass(arg0
, WasmEmailIntegrationClient
);
1018 var ptr0
= arg0
.__destroy_into_raw();
1019 wasm
.__wbg_set_wasmapiclients_email_integration(this.__wbg_ptr
, ptr0
);
1022 * @returns {WasmBitcoinAddressClient}
1024 get bitcoin_address() {
1025 const ret
= wasm
.__wbg_get_wasmapiclients_bitcoin_address(this.__wbg_ptr
);
1026 return WasmBitcoinAddressClient
.__wrap(ret
);
1029 * @param {WasmBitcoinAddressClient} arg0
1031 set bitcoin_address(arg0
) {
1032 _assertClass(arg0
, WasmBitcoinAddressClient
);
1033 var ptr0
= arg0
.__destroy_into_raw();
1034 wasm
.__wbg_set_wasmapiclients_bitcoin_address(this.__wbg_ptr
, ptr0
);
1037 * @returns {WasmPaymentGatewayClient}
1039 get payment_gateway() {
1040 const ret
= wasm
.__wbg_get_wasmapiclients_payment_gateway(this.__wbg_ptr
);
1041 return WasmPaymentGatewayClient
.__wrap(ret
);
1044 * @param {WasmPaymentGatewayClient} arg0
1046 set payment_gateway(arg0
) {
1047 _assertClass(arg0
, WasmPaymentGatewayClient
);
1048 var ptr0
= arg0
.__destroy_into_raw();
1049 wasm
.__wbg_set_wasmapiclients_payment_gateway(this.__wbg_ptr
, ptr0
);
1052 * @returns {WasmPriceGraphClient}
1055 const ret
= wasm
.__wbg_get_wasmapiclients_price_graph(this.__wbg_ptr
);
1056 return WasmPriceGraphClient
.__wrap(ret
);
1059 * @param {WasmPriceGraphClient} arg0
1061 set price_graph(arg0
) {
1062 _assertClass(arg0
, WasmPriceGraphClient
);
1063 var ptr0
= arg0
.__destroy_into_raw();
1064 wasm
.__wbg_set_wasmapiclients_price_graph(this.__wbg_ptr
, ptr0
);
1067 * @returns {WasmSettingsClient}
1070 const ret
= wasm
.__wbg_get_wasmapiclients_settings(this.__wbg_ptr
);
1071 return WasmSettingsClient
.__wrap(ret
);
1074 * @param {WasmSettingsClient} arg0
1076 set settings(arg0
) {
1077 _assertClass(arg0
, WasmSettingsClient
);
1078 var ptr0
= arg0
.__destroy_into_raw();
1079 wasm
.__wbg_set_wasmapiclients_settings(this.__wbg_ptr
, ptr0
);
1082 * @returns {WasmNetworkClient}
1085 const ret
= wasm
.__wbg_get_wasmapiclients_network(this.__wbg_ptr
);
1086 return WasmNetworkClient
.__wrap(ret
);
1089 * @param {WasmNetworkClient} arg0
1092 _assertClass(arg0
, WasmNetworkClient
);
1093 var ptr0
= arg0
.__destroy_into_raw();
1094 wasm
.__wbg_set_wasmapiclients_network(this.__wbg_ptr
, ptr0
);
1097 * @returns {WasmInviteClient}
1100 const ret
= wasm
.__wbg_get_wasmapiclients_invite(this.__wbg_ptr
);
1101 return WasmInviteClient
.__wrap(ret
);
1104 * @param {WasmInviteClient} arg0
1107 _assertClass(arg0
, WasmInviteClient
);
1108 var ptr0
= arg0
.__destroy_into_raw();
1109 wasm
.__wbg_set_wasmapiclients_invite(this.__wbg_ptr
, ptr0
);
1112 * @returns {WasmWalletClient}
1115 const ret
= wasm
.__wbg_get_wasmapiclients_wallet(this.__wbg_ptr
);
1116 return WasmWalletClient
.__wrap(ret
);
1119 * @param {WasmWalletClient} arg0
1122 _assertClass(arg0
, WasmWalletClient
);
1123 var ptr0
= arg0
.__destroy_into_raw();
1124 wasm
.__wbg_set_wasmapiclients_wallet(this.__wbg_ptr
, ptr0
);
1128 const WasmApiExchangeRateDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1129 ? { register
: () => {}, unregister
: () => {} }
1130 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapiexchangeratedata_free(ptr
>>> 0, 1));
1133 export class WasmApiExchangeRateData
{
1135 static __wrap(ptr
) {
1137 const obj
= Object
.create(WasmApiExchangeRateData
.prototype);
1138 obj
.__wbg_ptr
= ptr
;
1139 WasmApiExchangeRateDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1143 __destroy_into_raw() {
1144 const ptr
= this.__wbg_ptr
;
1146 WasmApiExchangeRateDataFinalization
.unregister(this);
1151 const ptr
= this.__destroy_into_raw();
1152 wasm
.__wbg_wasmapiexchangeratedata_free(ptr
, 0);
1155 * @returns {WasmApiExchangeRate}
1158 const ret
= wasm
.__wbg_get_wasmapiexchangeratedata_Data(this.__wbg_ptr
);
1159 return takeObject(ret
);
1162 * @param {WasmApiExchangeRate} arg0
1165 wasm
.__wbg_set_wasmapiexchangeratedata_Data(this.__wbg_ptr
, addHeapObject(arg0
));
1169 const WasmApiFiatCurrenciesFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1170 ? { register
: () => {}, unregister
: () => {} }
1171 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapifiatcurrencies_free(ptr
>>> 0, 1));
1174 export class WasmApiFiatCurrencies
{
1176 static __wrap(ptr
) {
1178 const obj
= Object
.create(WasmApiFiatCurrencies
.prototype);
1179 obj
.__wbg_ptr
= ptr
;
1180 WasmApiFiatCurrenciesFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1184 __destroy_into_raw() {
1185 const ptr
= this.__wbg_ptr
;
1187 WasmApiFiatCurrenciesFinalization
.unregister(this);
1192 const ptr
= this.__destroy_into_raw();
1193 wasm
.__wbg_wasmapifiatcurrencies_free(ptr
, 0);
1196 * @returns {(WasmApiFiatCurrencyData)[]}
1200 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
1201 wasm
.__wbg_get_wasmapifiatcurrencies_0(retptr
, this.__wbg_ptr
);
1202 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
1203 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
1204 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
1205 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
1208 wasm
.__wbindgen_add_to_stack_pointer(16);
1212 * @param {(WasmApiFiatCurrencyData)[]} arg0
1215 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
1216 const len0
= WASM_VECTOR_LEN
;
1217 wasm
.__wbg_set_wasmapifiatcurrencies_0(this.__wbg_ptr
, ptr0
, len0
);
1221 const WasmApiFiatCurrencyDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1222 ? { register
: () => {}, unregister
: () => {} }
1223 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapifiatcurrencydata_free(ptr
>>> 0, 1));
1226 export class WasmApiFiatCurrencyData
{
1228 static __wrap(ptr
) {
1230 const obj
= Object
.create(WasmApiFiatCurrencyData
.prototype);
1231 obj
.__wbg_ptr
= ptr
;
1232 WasmApiFiatCurrencyDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1236 static __unwrap(jsValue
) {
1237 if (!(jsValue
instanceof WasmApiFiatCurrencyData
)) {
1240 return jsValue
.__destroy_into_raw();
1243 __destroy_into_raw() {
1244 const ptr
= this.__wbg_ptr
;
1246 WasmApiFiatCurrencyDataFinalization
.unregister(this);
1251 const ptr
= this.__destroy_into_raw();
1252 wasm
.__wbg_wasmapifiatcurrencydata_free(ptr
, 0);
1255 * @returns {WasmApiFiatCurrency}
1258 const ret
= wasm
.__wbg_get_wasmapifiatcurrencydata_Data(this.__wbg_ptr
);
1259 return takeObject(ret
);
1262 * @param {WasmApiFiatCurrency} arg0
1265 wasm
.__wbg_set_wasmapifiatcurrencydata_Data(this.__wbg_ptr
, addHeapObject(arg0
));
1269 const WasmApiWalletAccountAddressesFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1270 ? { register
: () => {}, unregister
: () => {} }
1271 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapiwalletaccountaddresses_free(ptr
>>> 0, 1));
1274 export class WasmApiWalletAccountAddresses
{
1276 static __wrap(ptr
) {
1278 const obj
= Object
.create(WasmApiWalletAccountAddresses
.prototype);
1279 obj
.__wbg_ptr
= ptr
;
1280 WasmApiWalletAccountAddressesFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1284 __destroy_into_raw() {
1285 const ptr
= this.__wbg_ptr
;
1287 WasmApiWalletAccountAddressesFinalization
.unregister(this);
1292 const ptr
= this.__destroy_into_raw();
1293 wasm
.__wbg_wasmapiwalletaccountaddresses_free(ptr
, 0);
1296 * @returns {(WasmWalletAccountAddressData)[]}
1300 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
1301 wasm
.__wbg_get_wasmapiwalletaccountaddresses_0(retptr
, this.__wbg_ptr
);
1302 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
1303 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
1304 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
1305 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
1308 wasm
.__wbindgen_add_to_stack_pointer(16);
1312 * @param {(WasmWalletAccountAddressData)[]} arg0
1315 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
1316 const len0
= WASM_VECTOR_LEN
;
1317 wasm
.__wbg_set_wasmapiwalletaccountaddresses_0(this.__wbg_ptr
, ptr0
, len0
);
1321 const WasmApiWalletAccountsFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1322 ? { register
: () => {}, unregister
: () => {} }
1323 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapiwalletaccounts_free(ptr
>>> 0, 1));
1326 export class WasmApiWalletAccounts
{
1328 static __wrap(ptr
) {
1330 const obj
= Object
.create(WasmApiWalletAccounts
.prototype);
1331 obj
.__wbg_ptr
= ptr
;
1332 WasmApiWalletAccountsFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1336 __destroy_into_raw() {
1337 const ptr
= this.__wbg_ptr
;
1339 WasmApiWalletAccountsFinalization
.unregister(this);
1344 const ptr
= this.__destroy_into_raw();
1345 wasm
.__wbg_wasmapiwalletaccounts_free(ptr
, 0);
1348 * @returns {(WasmWalletAccountData)[]}
1352 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
1353 wasm
.__wbg_get_wasmapiwalletaccounts_0(retptr
, this.__wbg_ptr
);
1354 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
1355 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
1356 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
1357 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
1360 wasm
.__wbindgen_add_to_stack_pointer(16);
1364 * @param {(WasmWalletAccountData)[]} arg0
1367 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
1368 const len0
= WASM_VECTOR_LEN
;
1369 wasm
.__wbg_set_wasmapiwalletaccounts_0(this.__wbg_ptr
, ptr0
, len0
);
1373 const WasmApiWalletBitcoinAddressDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1374 ? { register
: () => {}, unregister
: () => {} }
1375 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapiwalletbitcoinaddressdata_free(ptr
>>> 0, 1));
1378 export class WasmApiWalletBitcoinAddressData
{
1380 static __wrap(ptr
) {
1382 const obj
= Object
.create(WasmApiWalletBitcoinAddressData
.prototype);
1383 obj
.__wbg_ptr
= ptr
;
1384 WasmApiWalletBitcoinAddressDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1388 static __unwrap(jsValue
) {
1389 if (!(jsValue
instanceof WasmApiWalletBitcoinAddressData
)) {
1392 return jsValue
.__destroy_into_raw();
1395 __destroy_into_raw() {
1396 const ptr
= this.__wbg_ptr
;
1398 WasmApiWalletBitcoinAddressDataFinalization
.unregister(this);
1403 const ptr
= this.__destroy_into_raw();
1404 wasm
.__wbg_wasmapiwalletbitcoinaddressdata_free(ptr
, 0);
1407 * @returns {WasmApiWalletBitcoinAddress}
1410 const ret
= wasm
.__wbg_get_wasmapiwalletbitcoinaddressdata_Data(this.__wbg_ptr
);
1411 return takeObject(ret
);
1414 * @param {WasmApiWalletBitcoinAddress} arg0
1417 wasm
.__wbg_set_wasmapiwalletbitcoinaddressdata_Data(this.__wbg_ptr
, addHeapObject(arg0
));
1421 const WasmApiWalletBitcoinAddressLookupDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1422 ? { register
: () => {}, unregister
: () => {} }
1423 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapiwalletbitcoinaddresslookupdata_free(ptr
>>> 0, 1));
1426 export class WasmApiWalletBitcoinAddressLookupData
{
1428 static __wrap(ptr
) {
1430 const obj
= Object
.create(WasmApiWalletBitcoinAddressLookupData
.prototype);
1431 obj
.__wbg_ptr
= ptr
;
1432 WasmApiWalletBitcoinAddressLookupDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1436 __destroy_into_raw() {
1437 const ptr
= this.__wbg_ptr
;
1439 WasmApiWalletBitcoinAddressLookupDataFinalization
.unregister(this);
1444 const ptr
= this.__destroy_into_raw();
1445 wasm
.__wbg_wasmapiwalletbitcoinaddresslookupdata_free(ptr
, 0);
1448 * @returns {WasmApiWalletBitcoinAddressLookup}
1451 const ret
= wasm
.__wbg_get_wasmapiwalletbitcoinaddresslookupdata_Data(this.__wbg_ptr
);
1452 return takeObject(ret
);
1455 * @param {WasmApiWalletBitcoinAddressLookup} arg0
1458 wasm
.__wbg_set_wasmapiwalletbitcoinaddresslookupdata_Data(this.__wbg_ptr
, addHeapObject(arg0
));
1462 const WasmApiWalletBitcoinAddressesFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1463 ? { register
: () => {}, unregister
: () => {} }
1464 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapiwalletbitcoinaddresses_free(ptr
>>> 0, 1));
1467 export class WasmApiWalletBitcoinAddresses
{
1469 static __wrap(ptr
) {
1471 const obj
= Object
.create(WasmApiWalletBitcoinAddresses
.prototype);
1472 obj
.__wbg_ptr
= ptr
;
1473 WasmApiWalletBitcoinAddressesFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1477 __destroy_into_raw() {
1478 const ptr
= this.__wbg_ptr
;
1480 WasmApiWalletBitcoinAddressesFinalization
.unregister(this);
1485 const ptr
= this.__destroy_into_raw();
1486 wasm
.__wbg_wasmapiwalletbitcoinaddresses_free(ptr
, 0);
1489 * @returns {(WasmApiWalletBitcoinAddressData)[]}
1493 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
1494 wasm
.__wbg_get_wasmapiwalletbitcoinaddresses_0(retptr
, this.__wbg_ptr
);
1495 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
1496 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
1497 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
1498 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
1501 wasm
.__wbindgen_add_to_stack_pointer(16);
1505 * @param {(WasmApiWalletBitcoinAddressData)[]} arg0
1508 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
1509 const len0
= WASM_VECTOR_LEN
;
1510 wasm
.__wbg_set_wasmapiwalletbitcoinaddresses_0(this.__wbg_ptr
, ptr0
, len0
);
1514 const WasmApiWalletDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1515 ? { register
: () => {}, unregister
: () => {} }
1516 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapiwalletdata_free(ptr
>>> 0, 1));
1519 export class WasmApiWalletData
{
1521 static __wrap(ptr
) {
1523 const obj
= Object
.create(WasmApiWalletData
.prototype);
1524 obj
.__wbg_ptr
= ptr
;
1525 WasmApiWalletDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1529 static __unwrap(jsValue
) {
1530 if (!(jsValue
instanceof WasmApiWalletData
)) {
1533 return jsValue
.__destroy_into_raw();
1536 __destroy_into_raw() {
1537 const ptr
= this.__wbg_ptr
;
1539 WasmApiWalletDataFinalization
.unregister(this);
1544 const ptr
= this.__destroy_into_raw();
1545 wasm
.__wbg_wasmapiwalletdata_free(ptr
, 0);
1548 * @returns {WasmApiWallet}
1551 const ret
= wasm
.__wbg_get_wasmapiwalletdata_Wallet(this.__wbg_ptr
);
1552 return takeObject(ret
);
1555 * @param {WasmApiWallet} arg0
1558 wasm
.__wbg_set_wasmapiwalletdata_Wallet(this.__wbg_ptr
, addHeapObject(arg0
));
1561 * @returns {WasmApiWalletKey}
1564 const ret
= wasm
.__wbg_get_wasmapiwalletdata_WalletKey(this.__wbg_ptr
);
1565 return takeObject(ret
);
1568 * @param {WasmApiWalletKey} arg0
1570 set WalletKey(arg0
) {
1571 wasm
.__wbg_set_wasmapiwalletdata_WalletKey(this.__wbg_ptr
, addHeapObject(arg0
));
1574 * @returns {WasmApiWalletSettings}
1576 get WalletSettings() {
1577 const ret
= wasm
.__wbg_get_wasmapiwalletdata_WalletSettings(this.__wbg_ptr
);
1578 return takeObject(ret
);
1581 * @param {WasmApiWalletSettings} arg0
1583 set WalletSettings(arg0
) {
1584 wasm
.__wbg_set_wasmapiwalletdata_WalletSettings(this.__wbg_ptr
, addHeapObject(arg0
));
1587 * @param {WasmApiWallet} wallet
1588 * @param {WasmApiWalletKey} key
1589 * @param {WasmApiWalletSettings} settings
1590 * @returns {WasmApiWalletData}
1592 static from_parts(wallet
, key
, settings
) {
1593 const ret
= wasm
.wasmapiwalletdata_from_parts(addHeapObject(wallet
), addHeapObject(key
), addHeapObject(settings
));
1594 return WasmApiWalletData
.__wrap(ret
);
1598 const WasmApiWalletTransactionDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1599 ? { register
: () => {}, unregister
: () => {} }
1600 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapiwallettransactiondata_free(ptr
>>> 0, 1));
1603 export class WasmApiWalletTransactionData
{
1605 static __wrap(ptr
) {
1607 const obj
= Object
.create(WasmApiWalletTransactionData
.prototype);
1608 obj
.__wbg_ptr
= ptr
;
1609 WasmApiWalletTransactionDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1613 static __unwrap(jsValue
) {
1614 if (!(jsValue
instanceof WasmApiWalletTransactionData
)) {
1617 return jsValue
.__destroy_into_raw();
1620 __destroy_into_raw() {
1621 const ptr
= this.__wbg_ptr
;
1623 WasmApiWalletTransactionDataFinalization
.unregister(this);
1628 const ptr
= this.__destroy_into_raw();
1629 wasm
.__wbg_wasmapiwallettransactiondata_free(ptr
, 0);
1632 * @returns {WasmApiWalletTransaction}
1635 const ret
= wasm
.__wbg_get_wasmapiwallettransactiondata_Data(this.__wbg_ptr
);
1636 return takeObject(ret
);
1639 * @param {WasmApiWalletTransaction} arg0
1642 wasm
.__wbg_set_wasmapiwallettransactiondata_Data(this.__wbg_ptr
, addHeapObject(arg0
));
1646 const WasmApiWalletTransactionsFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1647 ? { register
: () => {}, unregister
: () => {} }
1648 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapiwallettransactions_free(ptr
>>> 0, 1));
1651 export class WasmApiWalletTransactions
{
1653 static __wrap(ptr
) {
1655 const obj
= Object
.create(WasmApiWalletTransactions
.prototype);
1656 obj
.__wbg_ptr
= ptr
;
1657 WasmApiWalletTransactionsFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1661 __destroy_into_raw() {
1662 const ptr
= this.__wbg_ptr
;
1664 WasmApiWalletTransactionsFinalization
.unregister(this);
1669 const ptr
= this.__destroy_into_raw();
1670 wasm
.__wbg_wasmapiwallettransactions_free(ptr
, 0);
1673 * @returns {(WasmApiWalletTransactionData)[]}
1677 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
1678 wasm
.__wbg_get_wasmapiwallettransactions_0(retptr
, this.__wbg_ptr
);
1679 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
1680 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
1681 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
1682 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
1685 wasm
.__wbindgen_add_to_stack_pointer(16);
1689 * @param {(WasmApiWalletTransactionData)[]} arg0
1692 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
1693 const len0
= WASM_VECTOR_LEN
;
1694 wasm
.__wbg_set_wasmapiwallettransactions_0(this.__wbg_ptr
, ptr0
, len0
);
1698 const WasmApiWalletsDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1699 ? { register
: () => {}, unregister
: () => {} }
1700 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmapiwalletsdata_free(ptr
>>> 0, 1));
1703 export class WasmApiWalletsData
{
1705 static __wrap(ptr
) {
1707 const obj
= Object
.create(WasmApiWalletsData
.prototype);
1708 obj
.__wbg_ptr
= ptr
;
1709 WasmApiWalletsDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1713 __destroy_into_raw() {
1714 const ptr
= this.__wbg_ptr
;
1716 WasmApiWalletsDataFinalization
.unregister(this);
1721 const ptr
= this.__destroy_into_raw();
1722 wasm
.__wbg_wasmapiwalletsdata_free(ptr
, 0);
1725 * @returns {(WasmApiWalletData)[]}
1729 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
1730 wasm
.__wbg_get_wasmapiwalletsdata_0(retptr
, this.__wbg_ptr
);
1731 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
1732 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
1733 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
1734 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
1737 wasm
.__wbindgen_add_to_stack_pointer(16);
1741 * @param {(WasmApiWalletData)[]} arg0
1744 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
1745 const len0
= WASM_VECTOR_LEN
;
1746 wasm
.__wbg_set_wasmapiwalletsdata_0(this.__wbg_ptr
, ptr0
, len0
);
1750 const WasmAuthDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1751 ? { register
: () => {}, unregister
: () => {} }
1752 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmauthdata_free(ptr
>>> 0, 1));
1755 export class WasmAuthData
{
1757 __destroy_into_raw() {
1758 const ptr
= this.__wbg_ptr
;
1760 WasmAuthDataFinalization
.unregister(this);
1765 const ptr
= this.__destroy_into_raw();
1766 wasm
.__wbg_wasmauthdata_free(ptr
, 0);
1775 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
1776 wasm
.__wbg_get_wasmaddressinfo_address(retptr
, this.__wbg_ptr
);
1777 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
1778 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
1781 return getStringFromWasm0(r0
, r1
);
1783 wasm
.__wbindgen_add_to_stack_pointer(16);
1784 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
1788 * @param {string} arg0
1791 const ptr0
= passStringToWasm0(arg0
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
1792 const len0
= WASM_VECTOR_LEN
;
1793 wasm
.__wbg_set_wasmaddressinfo_address(this.__wbg_ptr
, ptr0
, len0
);
1802 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
1803 wasm
.__wbg_get_wasmauthdata_access(retptr
, this.__wbg_ptr
);
1804 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
1805 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
1808 return getStringFromWasm0(r0
, r1
);
1810 wasm
.__wbindgen_add_to_stack_pointer(16);
1811 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
1815 * @param {string} arg0
1818 const ptr0
= passStringToWasm0(arg0
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
1819 const len0
= WASM_VECTOR_LEN
;
1820 wasm
.__wbg_set_wasmauthdata_access(this.__wbg_ptr
, ptr0
, len0
);
1829 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
1830 wasm
.__wbg_get_wasmauthdata_refresh(retptr
, this.__wbg_ptr
);
1831 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
1832 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
1835 return getStringFromWasm0(r0
, r1
);
1837 wasm
.__wbindgen_add_to_stack_pointer(16);
1838 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
1842 * @param {string} arg0
1845 const ptr0
= passStringToWasm0(arg0
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
1846 const len0
= WASM_VECTOR_LEN
;
1847 wasm
.__wbg_set_wasmauthdata_refresh(this.__wbg_ptr
, ptr0
, len0
);
1850 * @returns {(string)[]}
1854 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
1855 wasm
.__wbg_get_wasmauthdata_scopes(retptr
, this.__wbg_ptr
);
1856 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
1857 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
1858 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
1859 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
1862 wasm
.__wbindgen_add_to_stack_pointer(16);
1866 * @param {(string)[]} arg0
1869 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
1870 const len0
= WASM_VECTOR_LEN
;
1871 wasm
.__wbg_set_wasmauthdata_scopes(this.__wbg_ptr
, ptr0
, len0
);
1875 const WasmBalanceWrapperFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1876 ? { register
: () => {}, unregister
: () => {} }
1877 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmbalancewrapper_free(ptr
>>> 0, 1));
1880 export class WasmBalanceWrapper
{
1882 static __wrap(ptr
) {
1884 const obj
= Object
.create(WasmBalanceWrapper
.prototype);
1885 obj
.__wbg_ptr
= ptr
;
1886 WasmBalanceWrapperFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1890 __destroy_into_raw() {
1891 const ptr
= this.__wbg_ptr
;
1893 WasmBalanceWrapperFinalization
.unregister(this);
1898 const ptr
= this.__destroy_into_raw();
1899 wasm
.__wbg_wasmbalancewrapper_free(ptr
, 0);
1902 * @returns {WasmBalance}
1905 const ret
= wasm
.__wbg_get_wasmbalancewrapper_data(this.__wbg_ptr
);
1906 return takeObject(ret
);
1909 * @param {WasmBalance} arg0
1912 wasm
.__wbg_set_wasmbalancewrapper_data(this.__wbg_ptr
, addHeapObject(arg0
));
1916 const WasmBitcoinAddressClientFinalization
= (typeof FinalizationRegistry
=== 'undefined')
1917 ? { register
: () => {}, unregister
: () => {} }
1918 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmbitcoinaddressclient_free(ptr
>>> 0, 1));
1921 export class WasmBitcoinAddressClient
{
1923 static __wrap(ptr
) {
1925 const obj
= Object
.create(WasmBitcoinAddressClient
.prototype);
1926 obj
.__wbg_ptr
= ptr
;
1927 WasmBitcoinAddressClientFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
1931 __destroy_into_raw() {
1932 const ptr
= this.__wbg_ptr
;
1934 WasmBitcoinAddressClientFinalization
.unregister(this);
1939 const ptr
= this.__destroy_into_raw();
1940 wasm
.__wbg_wasmbitcoinaddressclient_free(ptr
, 0);
1943 * @param {string} wallet_id
1944 * @param {string} wallet_account_id
1945 * @param {number | undefined} [only_without_bitcoin_addresses]
1946 * @returns {Promise<WasmApiWalletBitcoinAddresses>}
1948 getBitcoinAddresses(wallet_id
, wallet_account_id
, only_without_bitcoin_addresses
) {
1949 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
1950 const len0
= WASM_VECTOR_LEN
;
1951 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
1952 const len1
= WASM_VECTOR_LEN
;
1953 const ret
= wasm
.wasmbitcoinaddressclient_getBitcoinAddresses(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, isLikeNone(only_without_bitcoin_addresses
) ? 0xFFFFFF : only_without_bitcoin_addresses
);
1954 return takeObject(ret
);
1957 * @param {string} wallet_id
1958 * @param {string} wallet_account_id
1959 * @returns {Promise<bigint>}
1961 getBitcoinAddressHighestIndex(wallet_id
, wallet_account_id
) {
1962 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
1963 const len0
= WASM_VECTOR_LEN
;
1964 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
1965 const len1
= WASM_VECTOR_LEN
;
1966 const ret
= wasm
.wasmbitcoinaddressclient_getBitcoinAddressHighestIndex(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
);
1967 return takeObject(ret
);
1970 * @param {string} wallet_id
1971 * @param {string} wallet_account_id
1972 * @param {WasmApiBitcoinAddressesCreationPayload} bitcoin_addresses
1973 * @returns {Promise<WasmApiWalletBitcoinAddresses>}
1975 addBitcoinAddresses(wallet_id
, wallet_account_id
, bitcoin_addresses
) {
1976 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
1977 const len0
= WASM_VECTOR_LEN
;
1978 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
1979 const len1
= WASM_VECTOR_LEN
;
1980 _assertClass(bitcoin_addresses
, WasmApiBitcoinAddressesCreationPayload
);
1981 var ptr2
= bitcoin_addresses
.__destroy_into_raw();
1982 const ret
= wasm
.wasmbitcoinaddressclient_addBitcoinAddresses(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, ptr2
);
1983 return takeObject(ret
);
1986 * @param {string} wallet_id
1987 * @param {string} wallet_account_id
1988 * @param {string} wallet_account_bitcoin_address_id
1989 * @param {WasmApiBitcoinAddressCreationPayload} bitcoin_address
1990 * @returns {Promise<WasmApiWalletBitcoinAddressData>}
1992 updateBitcoinAddress(wallet_id
, wallet_account_id
, wallet_account_bitcoin_address_id
, bitcoin_address
) {
1993 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
1994 const len0
= WASM_VECTOR_LEN
;
1995 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
1996 const len1
= WASM_VECTOR_LEN
;
1997 const ptr2
= passStringToWasm0(wallet_account_bitcoin_address_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
1998 const len2
= WASM_VECTOR_LEN
;
1999 const ret
= wasm
.wasmbitcoinaddressclient_updateBitcoinAddress(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, ptr2
, len2
, addHeapObject(bitcoin_address
));
2000 return takeObject(ret
);
2004 const WasmBlockchainClientFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2005 ? { register
: () => {}, unregister
: () => {} }
2006 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmblockchainclient_free(ptr
>>> 0, 1));
2009 export class WasmBlockchainClient
{
2011 __destroy_into_raw() {
2012 const ptr
= this.__wbg_ptr
;
2014 WasmBlockchainClientFinalization
.unregister(this);
2019 const ptr
= this.__destroy_into_raw();
2020 wasm
.__wbg_wasmblockchainclient_free(ptr
, 0);
2023 * Generates a Mnemonic with a random entropy based on the given word
2025 * @param {WasmProtonWalletApiClient} proton_api_client
2027 constructor(proton_api_client
) {
2029 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
2030 _assertClass(proton_api_client
, WasmProtonWalletApiClient
);
2031 wasm
.wasmblockchainclient_new(retptr
, proton_api_client
.__wbg_ptr
);
2032 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
2033 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
2034 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
2036 throw takeObject(r1
);
2038 this.__wbg_ptr
= r0
>>> 0;
2039 WasmBlockchainClientFinalization
.register(this, this.__wbg_ptr
, this);
2042 wasm
.__wbindgen_add_to_stack_pointer(16);
2046 * @returns {Promise<Map<string, number>>}
2048 getFeesEstimation() {
2049 const ret
= wasm
.wasmblockchainclient_getFeesEstimation(this.__wbg_ptr
);
2050 return takeObject(ret
);
2053 * @returns {Promise<WasmMinimumFees>}
2056 const ret
= wasm
.wasmblockchainclient_getMininumFees(this.__wbg_ptr
);
2057 return takeObject(ret
);
2060 * @param {WasmAccount} account
2061 * @param {number | undefined} [stop_gap]
2062 * @returns {Promise<void>}
2064 fullSync(account
, stop_gap
) {
2065 _assertClass(account
, WasmAccount
);
2066 const ret
= wasm
.wasmblockchainclient_fullSync(this.__wbg_ptr
, account
.__wbg_ptr
, !isLikeNone(stop_gap
), isLikeNone(stop_gap
) ? 0 : stop_gap
);
2067 return takeObject(ret
);
2070 * @param {WasmAccount} account
2071 * @returns {Promise<void>}
2073 partialSync(account
) {
2074 _assertClass(account
, WasmAccount
);
2075 const ret
= wasm
.wasmblockchainclient_partialSync(this.__wbg_ptr
, account
.__wbg_ptr
);
2076 return takeObject(ret
);
2079 * @param {WasmAccount} account
2080 * @returns {Promise<boolean>}
2082 shouldSync(account
) {
2083 _assertClass(account
, WasmAccount
);
2084 const ret
= wasm
.wasmblockchainclient_shouldSync(this.__wbg_ptr
, account
.__wbg_ptr
);
2085 return takeObject(ret
);
2088 * @param {WasmPsbt} psbt
2089 * @param {string} wallet_id
2090 * @param {string} wallet_account_id
2091 * @param {WasmTransactionData} transaction_data
2092 * @param {WasmEmailIntegrationData | undefined} [email_integration]
2093 * @returns {Promise<string>}
2095 broadcastPsbt(psbt
, wallet_id
, wallet_account_id
, transaction_data
, email_integration
) {
2096 _assertClass(psbt
, WasmPsbt
);
2097 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
2098 const len0
= WASM_VECTOR_LEN
;
2099 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
2100 const len1
= WASM_VECTOR_LEN
;
2101 const ret
= wasm
.wasmblockchainclient_broadcastPsbt(this.__wbg_ptr
, psbt
.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, addHeapObject(transaction_data
), isLikeNone(email_integration
) ? 0 : addHeapObject(email_integration
));
2102 return takeObject(ret
);
2106 const WasmCountriesAndProviderTuppleFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2107 ? { register
: () => {}, unregister
: () => {} }
2108 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmcountriesandprovidertupple_free(ptr
>>> 0, 1));
2111 export class WasmCountriesAndProviderTupple
{
2113 static __wrap(ptr
) {
2115 const obj
= Object
.create(WasmCountriesAndProviderTupple
.prototype);
2116 obj
.__wbg_ptr
= ptr
;
2117 WasmCountriesAndProviderTuppleFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
2121 static __unwrap(jsValue
) {
2122 if (!(jsValue
instanceof WasmCountriesAndProviderTupple
)) {
2125 return jsValue
.__destroy_into_raw();
2128 __destroy_into_raw() {
2129 const ptr
= this.__wbg_ptr
;
2131 WasmCountriesAndProviderTuppleFinalization
.unregister(this);
2136 const ptr
= this.__destroy_into_raw();
2137 wasm
.__wbg_wasmcountriesandprovidertupple_free(ptr
, 0);
2140 * @returns {WasmGatewayProvider}
2143 const ret
= wasm
.__wbg_get_wasmcountriesandprovidertupple_0(this.__wbg_ptr
);
2144 return takeObject(ret
);
2147 * @param {WasmGatewayProvider} arg0
2150 wasm
.__wbg_set_wasmcountriesandprovidertupple_0(this.__wbg_ptr
, addHeapObject(arg0
));
2153 * @returns {WasmCountries}
2156 const ret
= wasm
.__wbg_get_wasmcountriesandprovidertupple_1(this.__wbg_ptr
);
2157 return takeObject(ret
);
2160 * @param {WasmCountries} arg0
2163 wasm
.__wbg_set_wasmcountriesandprovidertupple_1(this.__wbg_ptr
, addHeapObject(arg0
));
2167 const WasmCountriesByProviderFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2168 ? { register
: () => {}, unregister
: () => {} }
2169 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmcountriesbyprovider_free(ptr
>>> 0, 1));
2172 export class WasmCountriesByProvider
{
2174 static __wrap(ptr
) {
2176 const obj
= Object
.create(WasmCountriesByProvider
.prototype);
2177 obj
.__wbg_ptr
= ptr
;
2178 WasmCountriesByProviderFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
2182 __destroy_into_raw() {
2183 const ptr
= this.__wbg_ptr
;
2185 WasmCountriesByProviderFinalization
.unregister(this);
2190 const ptr
= this.__destroy_into_raw();
2191 wasm
.__wbg_wasmcountriesbyprovider_free(ptr
, 0);
2194 * @returns {(WasmCountriesAndProviderTupple)[]}
2198 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
2199 wasm
.__wbg_get_wasmcountriesbyprovider_data(retptr
, this.__wbg_ptr
);
2200 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
2201 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
2202 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
2203 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
2206 wasm
.__wbindgen_add_to_stack_pointer(16);
2210 * @param {(WasmCountriesAndProviderTupple)[]} arg0
2213 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
2214 const len0
= WASM_VECTOR_LEN
;
2215 wasm
.__wbg_set_wasmcountriesbyprovider_data(this.__wbg_ptr
, ptr0
, len0
);
2219 const WasmDerivationPathFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2220 ? { register
: () => {}, unregister
: () => {} }
2221 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmderivationpath_free(ptr
>>> 0, 1));
2224 export class WasmDerivationPath
{
2226 static __wrap(ptr
) {
2228 const obj
= Object
.create(WasmDerivationPath
.prototype);
2229 obj
.__wbg_ptr
= ptr
;
2230 WasmDerivationPathFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
2234 __destroy_into_raw() {
2235 const ptr
= this.__wbg_ptr
;
2237 WasmDerivationPathFinalization
.unregister(this);
2242 const ptr
= this.__destroy_into_raw();
2243 wasm
.__wbg_wasmderivationpath_free(ptr
, 0);
2246 * @param {string} path
2250 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
2251 const ptr0
= passStringToWasm0(path
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
2252 const len0
= WASM_VECTOR_LEN
;
2253 wasm
.wasmderivationpath_new(retptr
, ptr0
, len0
);
2254 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
2255 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
2256 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
2258 throw takeObject(r1
);
2260 this.__wbg_ptr
= r0
>>> 0;
2261 WasmDerivationPathFinalization
.register(this, this.__wbg_ptr
, this);
2264 wasm
.__wbindgen_add_to_stack_pointer(16);
2268 * @param {WasmScriptType} script_type
2269 * @param {WasmNetwork} network
2270 * @param {number} account_index
2271 * @returns {WasmDerivationPath}
2273 static fromParts(script_type
, network
, account_index
) {
2274 const ret
= wasm
.wasmderivationpath_fromParts(script_type
, network
, account_index
);
2275 return WasmDerivationPath
.__wrap(ret
);
2278 * @param {string} str
2279 * @returns {WasmDerivationPath}
2281 static fromString(str
) {
2283 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
2284 const ptr0
= passStringToWasm0(str
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
2285 const len0
= WASM_VECTOR_LEN
;
2286 wasm
.wasmderivationpath_fromString(retptr
, ptr0
, len0
);
2287 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
2288 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
2289 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
2291 throw takeObject(r1
);
2293 return WasmDerivationPath
.__wrap(r0
);
2295 wasm
.__wbindgen_add_to_stack_pointer(16);
2305 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
2306 wasm
.wasmderivationpath_toString(retptr
, this.__wbg_ptr
);
2307 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
2308 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
2311 return getStringFromWasm0(r0
, r1
);
2313 wasm
.__wbindgen_add_to_stack_pointer(16);
2314 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
2319 const WasmDetailledTxInFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2320 ? { register
: () => {}, unregister
: () => {} }
2321 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmdetailledtxin_free(ptr
>>> 0, 1));
2324 export class WasmDetailledTxIn
{
2326 __destroy_into_raw() {
2327 const ptr
= this.__wbg_ptr
;
2329 WasmDetailledTxInFinalization
.unregister(this);
2334 const ptr
= this.__destroy_into_raw();
2335 wasm
.__wbg_wasmdetailledtxin_free(ptr
, 0);
2338 * @returns {WasmTxOut | undefined}
2340 get previous_output() {
2341 const ret
= wasm
.__wbg_get_wasmdetailledtxin_previous_output(this.__wbg_ptr
);
2342 return ret
=== 0 ? undefined : WasmTxOut
.__wrap(ret
);
2345 * @param {WasmTxOut | undefined} [arg0]
2347 set previous_output(arg0
) {
2349 if (!isLikeNone(arg0
)) {
2350 _assertClass(arg0
, WasmTxOut
);
2351 ptr0
= arg0
.__destroy_into_raw();
2353 wasm
.__wbg_set_wasmdetailledtxin_previous_output(this.__wbg_ptr
, ptr0
);
2356 * @returns {WasmScript}
2359 const ret
= wasm
.__wbg_get_wasmdetailledtxin_script_sig(this.__wbg_ptr
);
2360 return WasmScript
.__wrap(ret
);
2363 * @param {WasmScript} arg0
2365 set script_sig(arg0
) {
2366 _assertClass(arg0
, WasmScript
);
2367 var ptr0
= arg0
.__destroy_into_raw();
2368 wasm
.__wbg_set_wasmdetailledtxin_script_sig(this.__wbg_ptr
, ptr0
);
2371 * @returns {WasmSequence}
2374 const ret
= wasm
.__wbg_get_wasmdetailledtxin_sequence(this.__wbg_ptr
);
2375 return WasmSequence
.__wrap(ret
);
2378 * @param {WasmSequence} arg0
2380 set sequence(arg0
) {
2381 _assertClass(arg0
, WasmSequence
);
2382 var ptr0
= arg0
.__destroy_into_raw();
2383 wasm
.__wbg_set_wasmdetailledtxin_sequence(this.__wbg_ptr
, ptr0
);
2387 const WasmDiscoveredAccountFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2388 ? { register
: () => {}, unregister
: () => {} }
2389 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmdiscoveredaccount_free(ptr
>>> 0, 1));
2392 export class WasmDiscoveredAccount
{
2394 static __wrap(ptr
) {
2396 const obj
= Object
.create(WasmDiscoveredAccount
.prototype);
2397 obj
.__wbg_ptr
= ptr
;
2398 WasmDiscoveredAccountFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
2402 static __unwrap(jsValue
) {
2403 if (!(jsValue
instanceof WasmDiscoveredAccount
)) {
2406 return jsValue
.__destroy_into_raw();
2409 __destroy_into_raw() {
2410 const ptr
= this.__wbg_ptr
;
2412 WasmDiscoveredAccountFinalization
.unregister(this);
2417 const ptr
= this.__destroy_into_raw();
2418 wasm
.__wbg_wasmdiscoveredaccount_free(ptr
, 0);
2421 * @returns {WasmScriptType}
2424 const ret
= wasm
.__wbg_get_wasmdiscoveredaccount_0(this.__wbg_ptr
);
2428 * @param {WasmScriptType} arg0
2431 wasm
.__wbg_set_wasmdiscoveredaccount_0(this.__wbg_ptr
, arg0
);
2437 const ret
= wasm
.__wbg_get_wasmdiscoveredaccount_1(this.__wbg_ptr
);
2441 * @param {number} arg0
2444 wasm
.__wbg_set_wasmdiscoveredaccount_1(this.__wbg_ptr
, arg0
);
2447 * @returns {WasmDerivationPath}
2450 const ret
= wasm
.__wbg_get_wasmdiscoveredaccount_2(this.__wbg_ptr
);
2451 return WasmDerivationPath
.__wrap(ret
);
2454 * @param {WasmDerivationPath} arg0
2457 _assertClass(arg0
, WasmDerivationPath
);
2458 var ptr0
= arg0
.__destroy_into_raw();
2459 wasm
.__wbg_set_wasmdiscoveredaccount_2(this.__wbg_ptr
, ptr0
);
2463 const WasmDiscoveredAccountsFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2464 ? { register
: () => {}, unregister
: () => {} }
2465 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmdiscoveredaccounts_free(ptr
>>> 0, 1));
2468 export class WasmDiscoveredAccounts
{
2470 static __wrap(ptr
) {
2472 const obj
= Object
.create(WasmDiscoveredAccounts
.prototype);
2473 obj
.__wbg_ptr
= ptr
;
2474 WasmDiscoveredAccountsFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
2478 __destroy_into_raw() {
2479 const ptr
= this.__wbg_ptr
;
2481 WasmDiscoveredAccountsFinalization
.unregister(this);
2486 const ptr
= this.__destroy_into_raw();
2487 wasm
.__wbg_wasmdiscoveredaccounts_free(ptr
, 0);
2490 * @returns {(WasmDiscoveredAccount)[]}
2494 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
2495 wasm
.__wbg_get_wasmdiscoveredaccounts_data(retptr
, this.__wbg_ptr
);
2496 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
2497 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
2498 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
2499 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
2502 wasm
.__wbindgen_add_to_stack_pointer(16);
2506 * @param {(WasmDiscoveredAccount)[]} arg0
2509 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
2510 const len0
= WASM_VECTOR_LEN
;
2511 wasm
.__wbg_set_wasmdiscoveredaccounts_data(this.__wbg_ptr
, ptr0
, len0
);
2515 const WasmEmailIntegrationClientFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2516 ? { register
: () => {}, unregister
: () => {} }
2517 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmemailintegrationclient_free(ptr
>>> 0, 1));
2520 export class WasmEmailIntegrationClient
{
2522 static __wrap(ptr
) {
2524 const obj
= Object
.create(WasmEmailIntegrationClient
.prototype);
2525 obj
.__wbg_ptr
= ptr
;
2526 WasmEmailIntegrationClientFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
2530 __destroy_into_raw() {
2531 const ptr
= this.__wbg_ptr
;
2533 WasmEmailIntegrationClientFinalization
.unregister(this);
2538 const ptr
= this.__destroy_into_raw();
2539 wasm
.__wbg_wasmemailintegrationclient_free(ptr
, 0);
2542 * @param {string} email
2543 * @returns {Promise<WasmApiWalletBitcoinAddressLookupData>}
2545 lookupBitcoinAddress(email
) {
2546 const ptr0
= passStringToWasm0(email
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
2547 const len0
= WASM_VECTOR_LEN
;
2548 const ret
= wasm
.wasmemailintegrationclient_lookupBitcoinAddress(this.__wbg_ptr
, ptr0
, len0
);
2549 return takeObject(ret
);
2552 * @param {string} email
2553 * @returns {Promise<void>}
2555 createBitcoinAddressesRequest(email
) {
2556 const ptr0
= passStringToWasm0(email
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
2557 const len0
= WASM_VECTOR_LEN
;
2558 const ret
= wasm
.wasmemailintegrationclient_createBitcoinAddressesRequest(this.__wbg_ptr
, ptr0
, len0
);
2559 return takeObject(ret
);
2563 const WasmExchangeRateClientFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2564 ? { register
: () => {}, unregister
: () => {} }
2565 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmexchangerateclient_free(ptr
>>> 0, 1));
2568 export class WasmExchangeRateClient
{
2570 static __wrap(ptr
) {
2572 const obj
= Object
.create(WasmExchangeRateClient
.prototype);
2573 obj
.__wbg_ptr
= ptr
;
2574 WasmExchangeRateClientFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
2578 __destroy_into_raw() {
2579 const ptr
= this.__wbg_ptr
;
2581 WasmExchangeRateClientFinalization
.unregister(this);
2586 const ptr
= this.__destroy_into_raw();
2587 wasm
.__wbg_wasmexchangerateclient_free(ptr
, 0);
2590 * @param {WasmFiatCurrencySymbol} fiat
2591 * @param {bigint | undefined} [time]
2592 * @returns {Promise<WasmApiExchangeRateData>}
2594 getExchangeRate(fiat
, time
) {
2595 const ret
= wasm
.wasmexchangerateclient_getExchangeRate(this.__wbg_ptr
, addHeapObject(fiat
), !isLikeNone(time
), isLikeNone(time
) ? BigInt(0) : time
);
2596 return takeObject(ret
);
2599 * @returns {Promise<WasmApiFiatCurrencies>}
2601 getAllFiatCurrencies() {
2602 const ret
= wasm
.wasmexchangerateclient_getAllFiatCurrencies(this.__wbg_ptr
);
2603 return takeObject(ret
);
2607 const WasmFiatCurrenciesAndProviderTuppleFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2608 ? { register
: () => {}, unregister
: () => {} }
2609 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmfiatcurrenciesandprovidertupple_free(ptr
>>> 0, 1));
2612 export class WasmFiatCurrenciesAndProviderTupple
{
2614 static __wrap(ptr
) {
2616 const obj
= Object
.create(WasmFiatCurrenciesAndProviderTupple
.prototype);
2617 obj
.__wbg_ptr
= ptr
;
2618 WasmFiatCurrenciesAndProviderTuppleFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
2622 static __unwrap(jsValue
) {
2623 if (!(jsValue
instanceof WasmFiatCurrenciesAndProviderTupple
)) {
2626 return jsValue
.__destroy_into_raw();
2629 __destroy_into_raw() {
2630 const ptr
= this.__wbg_ptr
;
2632 WasmFiatCurrenciesAndProviderTuppleFinalization
.unregister(this);
2637 const ptr
= this.__destroy_into_raw();
2638 wasm
.__wbg_wasmfiatcurrenciesandprovidertupple_free(ptr
, 0);
2641 * @returns {WasmGatewayProvider}
2644 const ret
= wasm
.__wbg_get_wasmcountriesandprovidertupple_0(this.__wbg_ptr
);
2645 return takeObject(ret
);
2648 * @param {WasmGatewayProvider} arg0
2651 wasm
.__wbg_set_wasmcountriesandprovidertupple_0(this.__wbg_ptr
, addHeapObject(arg0
));
2654 * @returns {WasmFiatCurrencies}
2657 const ret
= wasm
.__wbg_get_wasmfiatcurrenciesandprovidertupple_1(this.__wbg_ptr
);
2658 return takeObject(ret
);
2661 * @param {WasmFiatCurrencies} arg0
2664 wasm
.__wbg_set_wasmfiatcurrenciesandprovidertupple_1(this.__wbg_ptr
, addHeapObject(arg0
));
2668 const WasmFiatCurrenciesByProviderFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2669 ? { register
: () => {}, unregister
: () => {} }
2670 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmfiatcurrenciesbyprovider_free(ptr
>>> 0, 1));
2673 export class WasmFiatCurrenciesByProvider
{
2675 static __wrap(ptr
) {
2677 const obj
= Object
.create(WasmFiatCurrenciesByProvider
.prototype);
2678 obj
.__wbg_ptr
= ptr
;
2679 WasmFiatCurrenciesByProviderFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
2683 __destroy_into_raw() {
2684 const ptr
= this.__wbg_ptr
;
2686 WasmFiatCurrenciesByProviderFinalization
.unregister(this);
2691 const ptr
= this.__destroy_into_raw();
2692 wasm
.__wbg_wasmfiatcurrenciesbyprovider_free(ptr
, 0);
2695 * @returns {(WasmFiatCurrenciesAndProviderTupple)[]}
2699 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
2700 wasm
.__wbg_get_wasmfiatcurrenciesbyprovider_data(retptr
, this.__wbg_ptr
);
2701 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
2702 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
2703 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
2704 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
2707 wasm
.__wbindgen_add_to_stack_pointer(16);
2711 * @param {(WasmFiatCurrenciesAndProviderTupple)[]} arg0
2714 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
2715 const len0
= WASM_VECTOR_LEN
;
2716 wasm
.__wbg_set_wasmfiatcurrenciesbyprovider_data(this.__wbg_ptr
, ptr0
, len0
);
2720 const WasmInviteClientFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2721 ? { register
: () => {}, unregister
: () => {} }
2722 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasminviteclient_free(ptr
>>> 0, 1));
2725 export class WasmInviteClient
{
2727 static __wrap(ptr
) {
2729 const obj
= Object
.create(WasmInviteClient
.prototype);
2730 obj
.__wbg_ptr
= ptr
;
2731 WasmInviteClientFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
2735 __destroy_into_raw() {
2736 const ptr
= this.__wbg_ptr
;
2738 WasmInviteClientFinalization
.unregister(this);
2743 const ptr
= this.__destroy_into_raw();
2744 wasm
.__wbg_wasminviteclient_free(ptr
, 0);
2747 * @param {string} invitee_email
2748 * @param {string} inviter_address_id
2749 * @returns {Promise<void>}
2751 sendNewcomerInvite(invitee_email
, inviter_address_id
) {
2752 const ptr0
= passStringToWasm0(invitee_email
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
2753 const len0
= WASM_VECTOR_LEN
;
2754 const ptr1
= passStringToWasm0(inviter_address_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
2755 const len1
= WASM_VECTOR_LEN
;
2756 const ret
= wasm
.wasminviteclient_sendNewcomerInvite(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
);
2757 return takeObject(ret
);
2760 * @param {string} invitee_email
2761 * @param {WasmInviteNotificationType} invite_notification_type
2762 * @param {string} inviter_address_id
2763 * @returns {Promise<number>}
2765 checkInviteStatus(invitee_email
, invite_notification_type
, inviter_address_id
) {
2766 const ptr0
= passStringToWasm0(invitee_email
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
2767 const len0
= WASM_VECTOR_LEN
;
2768 const ptr1
= passStringToWasm0(inviter_address_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
2769 const len1
= WASM_VECTOR_LEN
;
2770 const ret
= wasm
.wasminviteclient_checkInviteStatus(this.__wbg_ptr
, ptr0
, len0
, addHeapObject(invite_notification_type
), ptr1
, len1
);
2771 return takeObject(ret
);
2774 * @param {string} invitee_email
2775 * @param {string} inviter_address_id
2776 * @returns {Promise<void>}
2778 sendEmailIntegrationInvite(invitee_email
, inviter_address_id
) {
2779 const ptr0
= passStringToWasm0(invitee_email
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
2780 const len0
= WASM_VECTOR_LEN
;
2781 const ptr1
= passStringToWasm0(inviter_address_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
2782 const len1
= WASM_VECTOR_LEN
;
2783 const ret
= wasm
.wasminviteclient_sendEmailIntegrationInvite(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
);
2784 return takeObject(ret
);
2787 * @returns {Promise<WasmRemainingMonthlyInvitations>}
2789 getRemainingMonthlyInvitation() {
2790 const ret
= wasm
.wasminviteclient_getRemainingMonthlyInvitation(this.__wbg_ptr
);
2791 return takeObject(ret
);
2795 const WasmLockTimeFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2796 ? { register
: () => {}, unregister
: () => {} }
2797 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmlocktime_free(ptr
>>> 0, 1));
2800 export class WasmLockTime
{
2802 static __wrap(ptr
) {
2804 const obj
= Object
.create(WasmLockTime
.prototype);
2805 obj
.__wbg_ptr
= ptr
;
2806 WasmLockTimeFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
2810 __destroy_into_raw() {
2811 const ptr
= this.__wbg_ptr
;
2813 WasmLockTimeFinalization
.unregister(this);
2818 const ptr
= this.__destroy_into_raw();
2819 wasm
.__wbg_wasmlocktime_free(ptr
, 0);
2822 * @param {number} height
2823 * @returns {WasmLockTime}
2825 static fromHeight(height
) {
2826 const ret
= wasm
.wasmlocktime_fromHeight(height
);
2827 return WasmLockTime
.__wrap(ret
);
2830 * @param {number} seconds
2831 * @returns {WasmLockTime}
2833 static fromSeconds(seconds
) {
2834 const ret
= wasm
.wasmlocktime_fromSeconds(seconds
);
2835 return WasmLockTime
.__wrap(ret
);
2838 * @returns {boolean}
2841 const ret
= wasm
.wasmlocktime_isBlockHeight(this.__wbg_ptr
);
2845 * @returns {boolean}
2848 const ret
= wasm
.wasmlocktime_isBlockTime(this.__wbg_ptr
);
2855 const ret
= wasm
.wasmlocktime_toConsensusU32(this.__wbg_ptr
);
2860 const WasmMigratedWalletAccountDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2861 ? { register
: () => {}, unregister
: () => {} }
2862 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmmigratedwalletaccountdata_free(ptr
>>> 0, 1));
2865 export class WasmMigratedWalletAccountData
{
2867 static __wrap(ptr
) {
2869 const obj
= Object
.create(WasmMigratedWalletAccountData
.prototype);
2870 obj
.__wbg_ptr
= ptr
;
2871 WasmMigratedWalletAccountDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
2875 static __unwrap(jsValue
) {
2876 if (!(jsValue
instanceof WasmMigratedWalletAccountData
)) {
2879 return jsValue
.__destroy_into_raw();
2882 __destroy_into_raw() {
2883 const ptr
= this.__wbg_ptr
;
2885 WasmMigratedWalletAccountDataFinalization
.unregister(this);
2890 const ptr
= this.__destroy_into_raw();
2891 wasm
.__wbg_wasmmigratedwalletaccountdata_free(ptr
, 0);
2894 * @returns {WasmMigratedWalletAccount}
2897 const ret
= wasm
.__wbg_get_wasmmigratedwalletaccountdata_Data(this.__wbg_ptr
);
2898 return takeObject(ret
);
2901 * @param {WasmMigratedWalletAccount} arg0
2904 wasm
.__wbg_set_wasmmigratedwalletaccountdata_Data(this.__wbg_ptr
, addHeapObject(arg0
));
2908 const WasmMigratedWalletAccountsFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2909 ? { register
: () => {}, unregister
: () => {} }
2910 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmmigratedwalletaccounts_free(ptr
>>> 0, 1));
2913 export class WasmMigratedWalletAccounts
{
2915 __destroy_into_raw() {
2916 const ptr
= this.__wbg_ptr
;
2918 WasmMigratedWalletAccountsFinalization
.unregister(this);
2923 const ptr
= this.__destroy_into_raw();
2924 wasm
.__wbg_wasmmigratedwalletaccounts_free(ptr
, 0);
2927 * @returns {(WasmMigratedWalletAccountData)[]}
2931 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
2932 wasm
.__wbg_get_wasmmigratedwalletaccounts_0(retptr
, this.__wbg_ptr
);
2933 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
2934 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
2935 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
2936 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
2939 wasm
.__wbindgen_add_to_stack_pointer(16);
2943 * @param {(WasmMigratedWalletAccountData)[]} arg0
2946 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
2947 const len0
= WASM_VECTOR_LEN
;
2948 wasm
.__wbg_set_wasmmigratedwalletaccounts_0(this.__wbg_ptr
, ptr0
, len0
);
2953 const ret
= wasm
.wasmmigratedwalletaccounts_new();
2954 this.__wbg_ptr
= ret
>>> 0;
2955 WasmMigratedWalletAccountsFinalization
.register(this, this.__wbg_ptr
, this);
2959 * @param {WasmMigratedWalletAccount} account_data
2961 push(account_data
) {
2962 wasm
.wasmmigratedwalletaccounts_push(this.__wbg_ptr
, addHeapObject(account_data
));
2966 const WasmMigratedWalletTransactionDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
2967 ? { register
: () => {}, unregister
: () => {} }
2968 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmmigratedwallettransactiondata_free(ptr
>>> 0, 1));
2971 export class WasmMigratedWalletTransactionData
{
2973 static __wrap(ptr
) {
2975 const obj
= Object
.create(WasmMigratedWalletTransactionData
.prototype);
2976 obj
.__wbg_ptr
= ptr
;
2977 WasmMigratedWalletTransactionDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
2981 static __unwrap(jsValue
) {
2982 if (!(jsValue
instanceof WasmMigratedWalletTransactionData
)) {
2985 return jsValue
.__destroy_into_raw();
2988 __destroy_into_raw() {
2989 const ptr
= this.__wbg_ptr
;
2991 WasmMigratedWalletTransactionDataFinalization
.unregister(this);
2996 const ptr
= this.__destroy_into_raw();
2997 wasm
.__wbg_wasmmigratedwallettransactiondata_free(ptr
, 0);
3000 * @returns {WasmMigratedWalletTransaction}
3003 const ret
= wasm
.__wbg_get_wasmmigratedwallettransactiondata_Data(this.__wbg_ptr
);
3004 return takeObject(ret
);
3007 * @param {WasmMigratedWalletTransaction} arg0
3010 wasm
.__wbg_set_wasmmigratedwallettransactiondata_Data(this.__wbg_ptr
, addHeapObject(arg0
));
3014 const WasmMigratedWalletTransactionsFinalization
= (typeof FinalizationRegistry
=== 'undefined')
3015 ? { register
: () => {}, unregister
: () => {} }
3016 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmmigratedwallettransactions_free(ptr
>>> 0, 1));
3019 export class WasmMigratedWalletTransactions
{
3021 __destroy_into_raw() {
3022 const ptr
= this.__wbg_ptr
;
3024 WasmMigratedWalletTransactionsFinalization
.unregister(this);
3029 const ptr
= this.__destroy_into_raw();
3030 wasm
.__wbg_wasmmigratedwallettransactions_free(ptr
, 0);
3033 * @returns {(WasmMigratedWalletTransactionData)[]}
3037 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3038 wasm
.__wbg_get_wasmmigratedwallettransactions_0(retptr
, this.__wbg_ptr
);
3039 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3040 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3041 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
3042 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
3045 wasm
.__wbindgen_add_to_stack_pointer(16);
3049 * @param {(WasmMigratedWalletTransactionData)[]} arg0
3052 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
3053 const len0
= WASM_VECTOR_LEN
;
3054 wasm
.__wbg_set_wasmmigratedwallettransactions_0(this.__wbg_ptr
, ptr0
, len0
);
3059 const ret
= wasm
.wasmmigratedwallettransactions_new();
3060 this.__wbg_ptr
= ret
>>> 0;
3061 WasmMigratedWalletTransactionsFinalization
.register(this, this.__wbg_ptr
, this);
3065 * @param {WasmMigratedWalletTransaction} account_data
3067 push(account_data
) {
3068 wasm
.wasmmigratedwallettransactions_push(this.__wbg_ptr
, addHeapObject(account_data
));
3072 const WasmMinimumFeesFinalization
= (typeof FinalizationRegistry
=== 'undefined')
3073 ? { register
: () => {}, unregister
: () => {} }
3074 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmminimumfees_free(ptr
>>> 0, 1));
3077 export class WasmMinimumFees
{
3079 static __wrap(ptr
) {
3081 const obj
= Object
.create(WasmMinimumFees
.prototype);
3082 obj
.__wbg_ptr
= ptr
;
3083 WasmMinimumFeesFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
3087 __destroy_into_raw() {
3088 const ptr
= this.__wbg_ptr
;
3090 WasmMinimumFeesFinalization
.unregister(this);
3095 const ptr
= this.__destroy_into_raw();
3096 wasm
.__wbg_wasmminimumfees_free(ptr
, 0);
3101 get MinimumBroadcastFee() {
3102 const ret
= wasm
.__wbg_get_wasmminimumfees_MinimumBroadcastFee(this.__wbg_ptr
);
3106 * @param {number} arg0
3108 set MinimumBroadcastFee(arg0
) {
3109 wasm
.__wbg_set_wasmminimumfees_MinimumBroadcastFee(this.__wbg_ptr
, arg0
);
3114 get MinimumIncrementalFee() {
3115 const ret
= wasm
.__wbg_get_wasmminimumfees_MinimumIncrementalFee(this.__wbg_ptr
);
3119 * @param {number} arg0
3121 set MinimumIncrementalFee(arg0
) {
3122 wasm
.__wbg_set_wasmminimumfees_MinimumIncrementalFee(this.__wbg_ptr
, arg0
);
3126 const WasmMnemonicFinalization
= (typeof FinalizationRegistry
=== 'undefined')
3127 ? { register
: () => {}, unregister
: () => {} }
3128 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmmnemonic_free(ptr
>>> 0, 1));
3131 export class WasmMnemonic
{
3133 static __wrap(ptr
) {
3135 const obj
= Object
.create(WasmMnemonic
.prototype);
3136 obj
.__wbg_ptr
= ptr
;
3137 WasmMnemonicFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
3141 __destroy_into_raw() {
3142 const ptr
= this.__wbg_ptr
;
3144 WasmMnemonicFinalization
.unregister(this);
3149 const ptr
= this.__destroy_into_raw();
3150 wasm
.__wbg_wasmmnemonic_free(ptr
, 0);
3153 * Generates a Mnemonic with a random entropy based on the given word
3155 * @param {WasmWordCount} word_count
3157 constructor(word_count
) {
3159 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3160 wasm
.wasmmnemonic_new(retptr
, word_count
);
3161 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3162 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3163 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
3165 throw takeObject(r1
);
3167 this.__wbg_ptr
= r0
>>> 0;
3168 WasmMnemonicFinalization
.register(this, this.__wbg_ptr
, this);
3171 wasm
.__wbindgen_add_to_stack_pointer(16);
3175 * Parse a Mnemonic with the given string.
3176 * @param {string} mnemonic
3177 * @returns {WasmMnemonic}
3179 static fromString(mnemonic
) {
3181 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3182 const ptr0
= passStringToWasm0(mnemonic
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3183 const len0
= WASM_VECTOR_LEN
;
3184 wasm
.wasmmnemonic_fromString(retptr
, ptr0
, len0
);
3185 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3186 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3187 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
3189 throw takeObject(r1
);
3191 return WasmMnemonic
.__wrap(r0
);
3193 wasm
.__wbindgen_add_to_stack_pointer(16);
3197 * Returns the Mnemonic as a string.
3204 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3205 wasm
.wasmmnemonic_asString(retptr
, this.__wbg_ptr
);
3206 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3207 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3210 return getStringFromWasm0(r0
, r1
);
3212 wasm
.__wbindgen_add_to_stack_pointer(16);
3213 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
3217 * @returns {(string)[]}
3221 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3222 wasm
.wasmmnemonic_asWords(retptr
, this.__wbg_ptr
);
3223 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3224 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3225 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
3226 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
3229 wasm
.__wbindgen_add_to_stack_pointer(16);
3234 const WasmNetworkClientFinalization
= (typeof FinalizationRegistry
=== 'undefined')
3235 ? { register
: () => {}, unregister
: () => {} }
3236 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmnetworkclient_free(ptr
>>> 0, 1));
3239 export class WasmNetworkClient
{
3241 static __wrap(ptr
) {
3243 const obj
= Object
.create(WasmNetworkClient
.prototype);
3244 obj
.__wbg_ptr
= ptr
;
3245 WasmNetworkClientFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
3249 __destroy_into_raw() {
3250 const ptr
= this.__wbg_ptr
;
3252 WasmNetworkClientFinalization
.unregister(this);
3257 const ptr
= this.__destroy_into_raw();
3258 wasm
.__wbg_wasmnetworkclient_free(ptr
, 0);
3261 * @returns {Promise<WasmNetwork>}
3264 const ret
= wasm
.wasmnetworkclient_getNetwork(this.__wbg_ptr
);
3265 return takeObject(ret
);
3269 const WasmOnchainPaymentLinkFinalization
= (typeof FinalizationRegistry
=== 'undefined')
3270 ? { register
: () => {}, unregister
: () => {} }
3271 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmonchainpaymentlink_free(ptr
>>> 0, 1));
3274 export class WasmOnchainPaymentLink
{
3276 static __wrap(ptr
) {
3278 const obj
= Object
.create(WasmOnchainPaymentLink
.prototype);
3279 obj
.__wbg_ptr
= ptr
;
3280 WasmOnchainPaymentLinkFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
3284 __destroy_into_raw() {
3285 const ptr
= this.__wbg_ptr
;
3287 WasmOnchainPaymentLinkFinalization
.unregister(this);
3292 const ptr
= this.__destroy_into_raw();
3293 wasm
.__wbg_wasmonchainpaymentlink_free(ptr
, 0);
3296 * @returns {string | undefined}
3300 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3301 wasm
.__wbg_get_wasmonchainpaymentlink_address(retptr
, this.__wbg_ptr
);
3302 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3303 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3306 v1
= getStringFromWasm0(r0
, r1
).slice();
3307 wasm
.__wbindgen_free(r0
, r1
* 1, 1);
3311 wasm
.__wbindgen_add_to_stack_pointer(16);
3315 * @param {string | undefined} [arg0]
3318 var ptr0
= isLikeNone(arg0
) ? 0 : passStringToWasm0(arg0
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3319 var len0
= WASM_VECTOR_LEN
;
3320 wasm
.__wbg_set_wasmonchainpaymentlink_address(this.__wbg_ptr
, ptr0
, len0
);
3323 * @returns {bigint | undefined}
3327 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3328 wasm
.__wbg_get_wasmonchainpaymentlink_amount(retptr
, this.__wbg_ptr
);
3329 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3330 var r2
= getDataViewMemory0().getBigInt64(retptr
+ 8 * 1, true);
3331 return r0
=== 0 ? undefined : BigInt
.asUintN(64, r2
);
3333 wasm
.__wbindgen_add_to_stack_pointer(16);
3337 * @param {bigint | undefined} [arg0]
3340 wasm
.__wbg_set_wasmonchainpaymentlink_amount(this.__wbg_ptr
, !isLikeNone(arg0
), isLikeNone(arg0
) ? BigInt(0) : arg0
);
3343 * @returns {string | undefined}
3347 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3348 wasm
.__wbg_get_wasmonchainpaymentlink_message(retptr
, this.__wbg_ptr
);
3349 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3350 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3353 v1
= getStringFromWasm0(r0
, r1
).slice();
3354 wasm
.__wbindgen_free(r0
, r1
* 1, 1);
3358 wasm
.__wbindgen_add_to_stack_pointer(16);
3362 * @param {string | undefined} [arg0]
3365 var ptr0
= isLikeNone(arg0
) ? 0 : passStringToWasm0(arg0
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3366 var len0
= WASM_VECTOR_LEN
;
3367 wasm
.__wbg_set_wasmonchainpaymentlink_message(this.__wbg_ptr
, ptr0
, len0
);
3370 * @returns {string | undefined}
3374 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3375 wasm
.__wbg_get_wasmonchainpaymentlink_label(retptr
, this.__wbg_ptr
);
3376 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3377 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3380 v1
= getStringFromWasm0(r0
, r1
).slice();
3381 wasm
.__wbindgen_free(r0
, r1
* 1, 1);
3385 wasm
.__wbindgen_add_to_stack_pointer(16);
3389 * @param {string | undefined} [arg0]
3392 var ptr0
= isLikeNone(arg0
) ? 0 : passStringToWasm0(arg0
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3393 var len0
= WASM_VECTOR_LEN
;
3394 wasm
.__wbg_set_wasmonchainpaymentlink_label(this.__wbg_ptr
, ptr0
, len0
);
3398 const WasmOutPointFinalization
= (typeof FinalizationRegistry
=== 'undefined')
3399 ? { register
: () => {}, unregister
: () => {} }
3400 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmoutpoint_free(ptr
>>> 0, 1));
3402 * Serialised Outpoint under the form <txid>:<index>
3404 export class WasmOutPoint
{
3406 static __wrap(ptr
) {
3408 const obj
= Object
.create(WasmOutPoint
.prototype);
3409 obj
.__wbg_ptr
= ptr
;
3410 WasmOutPointFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
3414 __destroy_into_raw() {
3415 const ptr
= this.__wbg_ptr
;
3417 WasmOutPointFinalization
.unregister(this);
3422 const ptr
= this.__destroy_into_raw();
3423 wasm
.__wbg_wasmoutpoint_free(ptr
, 0);
3432 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3433 wasm
.__wbg_get_wasmoutpoint_0(retptr
, this.__wbg_ptr
);
3434 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3435 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3438 return getStringFromWasm0(r0
, r1
);
3440 wasm
.__wbindgen_add_to_stack_pointer(16);
3441 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
3445 * @param {string} arg0
3448 const ptr0
= passStringToWasm0(arg0
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3449 const len0
= WASM_VECTOR_LEN
;
3450 wasm
.__wbg_set_wasmoutpoint_0(this.__wbg_ptr
, ptr0
, len0
);
3453 * @param {string} str
3454 * @returns {WasmOutPoint}
3456 static fromString(str
) {
3457 const ptr0
= passStringToWasm0(str
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3458 const len0
= WASM_VECTOR_LEN
;
3459 const ret
= wasm
.wasmoutpoint_fromString(ptr0
, len0
);
3460 return WasmOutPoint
.__wrap(ret
);
3464 const WasmPaymentGatewayClientFinalization
= (typeof FinalizationRegistry
=== 'undefined')
3465 ? { register
: () => {}, unregister
: () => {} }
3466 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmpaymentgatewayclient_free(ptr
>>> 0, 1));
3469 export class WasmPaymentGatewayClient
{
3471 static __wrap(ptr
) {
3473 const obj
= Object
.create(WasmPaymentGatewayClient
.prototype);
3474 obj
.__wbg_ptr
= ptr
;
3475 WasmPaymentGatewayClientFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
3479 __destroy_into_raw() {
3480 const ptr
= this.__wbg_ptr
;
3482 WasmPaymentGatewayClientFinalization
.unregister(this);
3487 const ptr
= this.__destroy_into_raw();
3488 wasm
.__wbg_wasmpaymentgatewayclient_free(ptr
, 0);
3491 * @returns {Promise<WasmCountriesByProvider>}
3494 const ret
= wasm
.wasmpaymentgatewayclient_getCountries(this.__wbg_ptr
);
3495 return takeObject(ret
);
3498 * @returns {Promise<WasmFiatCurrenciesByProvider>}
3500 getFiatCurrencies() {
3501 const ret
= wasm
.wasmpaymentgatewayclient_getFiatCurrencies(this.__wbg_ptr
);
3502 return takeObject(ret
);
3505 * @param {string} fiat_currency
3506 * @returns {Promise<WasmPaymentMethodsByProvider>}
3508 getPaymentMethods(fiat_currency
) {
3509 const ptr0
= passStringToWasm0(fiat_currency
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3510 const len0
= WASM_VECTOR_LEN
;
3511 const ret
= wasm
.wasmpaymentgatewayclient_getPaymentMethods(this.__wbg_ptr
, ptr0
, len0
);
3512 return takeObject(ret
);
3515 * @param {number} amount
3516 * @param {string} fiat_currency
3517 * @param {WasmPaymentMethod | undefined} [payment_method]
3518 * @param {WasmGatewayProvider | undefined} [provider]
3519 * @returns {Promise<WasmQuotesByProvider>}
3521 getQuotes(amount
, fiat_currency
, payment_method
, provider
) {
3522 const ptr0
= passStringToWasm0(fiat_currency
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3523 const len0
= WASM_VECTOR_LEN
;
3524 const ret
= wasm
.wasmpaymentgatewayclient_getQuotes(this.__wbg_ptr
, amount
, ptr0
, len0
, isLikeNone(payment_method
) ? 0 : addHeapObject(payment_method
), isLikeNone(provider
) ? 0 : addHeapObject(provider
));
3525 return takeObject(ret
);
3528 * @param {string} amount
3529 * @param {string} btc_address
3530 * @param {string} fiat_currency
3531 * @param {WasmPaymentMethod} payment_method
3532 * @param {WasmGatewayProvider} provider
3533 * @param {string} order_id
3534 * @returns {Promise<string>}
3536 createOnRampCheckout(amount
, btc_address
, fiat_currency
, payment_method
, provider
, order_id
) {
3537 const ptr0
= passStringToWasm0(amount
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3538 const len0
= WASM_VECTOR_LEN
;
3539 const ptr1
= passStringToWasm0(btc_address
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3540 const len1
= WASM_VECTOR_LEN
;
3541 const ptr2
= passStringToWasm0(fiat_currency
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3542 const len2
= WASM_VECTOR_LEN
;
3543 const ptr3
= passStringToWasm0(order_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3544 const len3
= WASM_VECTOR_LEN
;
3545 const ret
= wasm
.wasmpaymentgatewayclient_createOnRampCheckout(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, ptr2
, len2
, addHeapObject(payment_method
), addHeapObject(provider
), ptr3
, len3
);
3546 return takeObject(ret
);
3549 * @param {string} url
3550 * @param {WasmGatewayProvider} provider
3551 * @returns {Promise<string>}
3553 signUrl(url
, provider
) {
3554 const ptr0
= passStringToWasm0(url
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3555 const len0
= WASM_VECTOR_LEN
;
3556 const ret
= wasm
.wasmpaymentgatewayclient_signUrl(this.__wbg_ptr
, ptr0
, len0
, addHeapObject(provider
));
3557 return takeObject(ret
);
3560 * @param {WasmGatewayProvider} provider
3561 * @returns {Promise<string>}
3563 getPublicApiKey(provider
) {
3564 const ret
= wasm
.wasmpaymentgatewayclient_getPublicApiKey(this.__wbg_ptr
, addHeapObject(provider
));
3565 return takeObject(ret
);
3568 * @param {number} amount
3569 * @param {string} address
3570 * @param {string} fiat_currency
3571 * @param {WasmPaymentMethod} payment_method
3572 * @param {WasmGatewayProvider} provider
3575 getCheckoutIframeSrc(amount
, address
, fiat_currency
, payment_method
, provider
) {
3579 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3580 const ptr0
= passStringToWasm0(address
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3581 const len0
= WASM_VECTOR_LEN
;
3582 const ptr1
= passStringToWasm0(fiat_currency
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3583 const len1
= WASM_VECTOR_LEN
;
3584 wasm
.wasmpaymentgatewayclient_getCheckoutIframeSrc(retptr
, this.__wbg_ptr
, amount
, ptr0
, len0
, ptr1
, len1
, addHeapObject(payment_method
), addHeapObject(provider
));
3585 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3586 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3589 return getStringFromWasm0(r0
, r1
);
3591 wasm
.__wbindgen_add_to_stack_pointer(16);
3592 wasm
.__wbindgen_free(deferred3_0
, deferred3_1
, 1);
3597 const WasmPaymentLinkFinalization
= (typeof FinalizationRegistry
=== 'undefined')
3598 ? { register
: () => {}, unregister
: () => {} }
3599 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmpaymentlink_free(ptr
>>> 0, 1));
3602 export class WasmPaymentLink
{
3604 static __wrap(ptr
) {
3606 const obj
= Object
.create(WasmPaymentLink
.prototype);
3607 obj
.__wbg_ptr
= ptr
;
3608 WasmPaymentLinkFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
3612 __destroy_into_raw() {
3613 const ptr
= this.__wbg_ptr
;
3615 WasmPaymentLinkFinalization
.unregister(this);
3620 const ptr
= this.__destroy_into_raw();
3621 wasm
.__wbg_wasmpaymentlink_free(ptr
, 0);
3630 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3631 wasm
.wasmpaymentlink_toString(retptr
, this.__wbg_ptr
);
3632 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3633 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3636 return getStringFromWasm0(r0
, r1
);
3638 wasm
.__wbindgen_add_to_stack_pointer(16);
3639 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
3649 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3650 wasm
.wasmpaymentlink_toUri(retptr
, this.__wbg_ptr
);
3651 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3652 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3655 return getStringFromWasm0(r0
, r1
);
3657 wasm
.__wbindgen_add_to_stack_pointer(16);
3658 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
3662 * @param {string} str
3663 * @param {WasmNetwork} network
3664 * @returns {WasmPaymentLink}
3666 static tryParse(str
, network
) {
3668 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3669 const ptr0
= passStringToWasm0(str
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3670 const len0
= WASM_VECTOR_LEN
;
3671 wasm
.wasmpaymentlink_tryParse(retptr
, ptr0
, len0
, network
);
3672 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3673 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3674 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
3676 throw takeObject(r1
);
3678 return WasmPaymentLink
.__wrap(r0
);
3680 wasm
.__wbindgen_add_to_stack_pointer(16);
3684 * @returns {WasmPaymentLinkKind}
3687 const ret
= wasm
.wasmpaymentlink_getKind(this.__wbg_ptr
);
3691 * @returns {WasmOnchainPaymentLink}
3694 const ret
= wasm
.wasmpaymentlink_assumeOnchain(this.__wbg_ptr
);
3695 return WasmOnchainPaymentLink
.__wrap(ret
);
3699 const WasmPaymentMethodsAndProviderTuppleFinalization
= (typeof FinalizationRegistry
=== 'undefined')
3700 ? { register
: () => {}, unregister
: () => {} }
3701 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmpaymentmethodsandprovidertupple_free(ptr
>>> 0, 1));
3704 export class WasmPaymentMethodsAndProviderTupple
{
3706 static __wrap(ptr
) {
3708 const obj
= Object
.create(WasmPaymentMethodsAndProviderTupple
.prototype);
3709 obj
.__wbg_ptr
= ptr
;
3710 WasmPaymentMethodsAndProviderTuppleFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
3714 static __unwrap(jsValue
) {
3715 if (!(jsValue
instanceof WasmPaymentMethodsAndProviderTupple
)) {
3718 return jsValue
.__destroy_into_raw();
3721 __destroy_into_raw() {
3722 const ptr
= this.__wbg_ptr
;
3724 WasmPaymentMethodsAndProviderTuppleFinalization
.unregister(this);
3729 const ptr
= this.__destroy_into_raw();
3730 wasm
.__wbg_wasmpaymentmethodsandprovidertupple_free(ptr
, 0);
3733 * @returns {WasmGatewayProvider}
3736 const ret
= wasm
.__wbg_get_wasmcountriesandprovidertupple_0(this.__wbg_ptr
);
3737 return takeObject(ret
);
3740 * @param {WasmGatewayProvider} arg0
3743 wasm
.__wbg_set_wasmcountriesandprovidertupple_0(this.__wbg_ptr
, addHeapObject(arg0
));
3746 * @returns {WasmPaymentMethods}
3749 const ret
= wasm
.__wbg_get_wasmpaymentmethodsandprovidertupple_1(this.__wbg_ptr
);
3750 return takeObject(ret
);
3753 * @param {WasmPaymentMethods} arg0
3756 wasm
.__wbg_set_wasmpaymentmethodsandprovidertupple_1(this.__wbg_ptr
, addHeapObject(arg0
));
3760 const WasmPaymentMethodsByProviderFinalization
= (typeof FinalizationRegistry
=== 'undefined')
3761 ? { register
: () => {}, unregister
: () => {} }
3762 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmpaymentmethodsbyprovider_free(ptr
>>> 0, 1));
3765 export class WasmPaymentMethodsByProvider
{
3767 static __wrap(ptr
) {
3769 const obj
= Object
.create(WasmPaymentMethodsByProvider
.prototype);
3770 obj
.__wbg_ptr
= ptr
;
3771 WasmPaymentMethodsByProviderFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
3775 __destroy_into_raw() {
3776 const ptr
= this.__wbg_ptr
;
3778 WasmPaymentMethodsByProviderFinalization
.unregister(this);
3783 const ptr
= this.__destroy_into_raw();
3784 wasm
.__wbg_wasmpaymentmethodsbyprovider_free(ptr
, 0);
3787 * @returns {(WasmPaymentMethodsAndProviderTupple)[]}
3791 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3792 wasm
.__wbg_get_wasmpaymentmethodsbyprovider_data(retptr
, this.__wbg_ptr
);
3793 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3794 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3795 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
3796 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
3799 wasm
.__wbindgen_add_to_stack_pointer(16);
3803 * @param {(WasmPaymentMethodsAndProviderTupple)[]} arg0
3806 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
3807 const len0
= WASM_VECTOR_LEN
;
3808 wasm
.__wbg_set_wasmpaymentmethodsbyprovider_data(this.__wbg_ptr
, ptr0
, len0
);
3812 const WasmPriceGraphClientFinalization
= (typeof FinalizationRegistry
=== 'undefined')
3813 ? { register
: () => {}, unregister
: () => {} }
3814 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmpricegraphclient_free(ptr
>>> 0, 1));
3817 export class WasmPriceGraphClient
{
3819 static __wrap(ptr
) {
3821 const obj
= Object
.create(WasmPriceGraphClient
.prototype);
3822 obj
.__wbg_ptr
= ptr
;
3823 WasmPriceGraphClientFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
3827 __destroy_into_raw() {
3828 const ptr
= this.__wbg_ptr
;
3830 WasmPriceGraphClientFinalization
.unregister(this);
3835 const ptr
= this.__destroy_into_raw();
3836 wasm
.__wbg_wasmpricegraphclient_free(ptr
, 0);
3839 * @param {WasmFiatCurrencySymbol} fiat_currency
3840 * @param {WasmTimeframe} timeframe
3841 * @returns {Promise<WasmWrappedPriceGraph>}
3843 getGraphData(fiat_currency
, timeframe
) {
3844 const ret
= wasm
.wasmpricegraphclient_getGraphData(this.__wbg_ptr
, addHeapObject(fiat_currency
), addHeapObject(timeframe
));
3845 return takeObject(ret
);
3849 const WasmProtonWalletApiClientFinalization
= (typeof FinalizationRegistry
=== 'undefined')
3850 ? { register
: () => {}, unregister
: () => {} }
3851 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmprotonwalletapiclient_free(ptr
>>> 0, 1));
3854 export class WasmProtonWalletApiClient
{
3856 __destroy_into_raw() {
3857 const ptr
= this.__wbg_ptr
;
3859 WasmProtonWalletApiClientFinalization
.unregister(this);
3864 const ptr
= this.__destroy_into_raw();
3865 wasm
.__wbg_wasmprotonwalletapiclient_free(ptr
, 0);
3868 * @param {string} app_version
3869 * @param {string} user_agent
3870 * @param {string | undefined} [uid_str]
3871 * @param {string | undefined} [origin]
3872 * @param {string | undefined} [url_prefix]
3874 constructor(app_version
, user_agent
, uid_str
, origin
, url_prefix
) {
3876 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3877 const ptr0
= passStringToWasm0(app_version
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3878 const len0
= WASM_VECTOR_LEN
;
3879 const ptr1
= passStringToWasm0(user_agent
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3880 const len1
= WASM_VECTOR_LEN
;
3881 var ptr2
= isLikeNone(uid_str
) ? 0 : passStringToWasm0(uid_str
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3882 var len2
= WASM_VECTOR_LEN
;
3883 var ptr3
= isLikeNone(origin
) ? 0 : passStringToWasm0(origin
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3884 var len3
= WASM_VECTOR_LEN
;
3885 var ptr4
= isLikeNone(url_prefix
) ? 0 : passStringToWasm0(url_prefix
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
3886 var len4
= WASM_VECTOR_LEN
;
3887 wasm
.wasmprotonwalletapiclient_new(retptr
, ptr0
, len0
, ptr1
, len1
, ptr2
, len2
, ptr3
, len3
, ptr4
, len4
);
3888 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3889 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3890 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
3892 throw takeObject(r1
);
3894 this.__wbg_ptr
= r0
>>> 0;
3895 WasmProtonWalletApiClientFinalization
.register(this, this.__wbg_ptr
, this);
3898 wasm
.__wbindgen_add_to_stack_pointer(16);
3902 * @returns {WasmApiClients}
3905 const ret
= wasm
.wasmprotonwalletapiclient_clients(this.__wbg_ptr
);
3906 return WasmApiClients
.__wrap(ret
);
3910 const WasmPsbtFinalization
= (typeof FinalizationRegistry
=== 'undefined')
3911 ? { register
: () => {}, unregister
: () => {} }
3912 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmpsbt_free(ptr
>>> 0, 1));
3915 export class WasmPsbt
{
3917 static __wrap(ptr
) {
3919 const obj
= Object
.create(WasmPsbt
.prototype);
3920 obj
.__wbg_ptr
= ptr
;
3921 WasmPsbtFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
3925 __destroy_into_raw() {
3926 const ptr
= this.__wbg_ptr
;
3928 WasmPsbtFinalization
.unregister(this);
3933 const ptr
= this.__destroy_into_raw();
3934 wasm
.__wbg_wasmpsbt_free(ptr
, 0);
3937 * @returns {(WasmPsbtRecipient)[]}
3941 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3942 wasm
.__wbg_get_wasmpsbt_recipients(retptr
, this.__wbg_ptr
);
3943 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
3944 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
3945 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
3946 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
3949 wasm
.__wbindgen_add_to_stack_pointer(16);
3953 * @param {(WasmPsbtRecipient)[]} arg0
3955 set recipients(arg0
) {
3956 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
3957 const len0
= WASM_VECTOR_LEN
;
3958 wasm
.__wbg_set_wasmpsbt_recipients(this.__wbg_ptr
, ptr0
, len0
);
3964 const ret
= wasm
.__wbg_get_wasmpsbt_total_fees(this.__wbg_ptr
);
3965 return BigInt
.asUintN(64, ret
);
3968 * @param {bigint} arg0
3970 set total_fees(arg0
) {
3971 wasm
.__wbg_set_wasmpsbt_total_fees(this.__wbg_ptr
, arg0
);
3974 * @param {WasmAccount} wasm_account
3975 * @param {WasmNetwork} network
3976 * @returns {Promise<WasmPsbt>}
3978 sign(wasm_account
, network
) {
3979 _assertClass(wasm_account
, WasmAccount
);
3980 const ret
= wasm
.wasmpsbt_sign(this.__wbg_ptr
, wasm_account
.__wbg_ptr
, network
);
3981 return takeObject(ret
);
3988 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
3989 wasm
.wasmpsbt_computeTxVbytes(retptr
, this.__wbg_ptr
);
3990 var r0
= getDataViewMemory0().getBigInt64(retptr
+ 8 * 0, true);
3991 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
3992 var r3
= getDataViewMemory0().getInt32(retptr
+ 4 * 3, true);
3994 throw takeObject(r2
);
3996 return BigInt
.asUintN(64, r0
);
3998 wasm
.__wbindgen_add_to_stack_pointer(16);
4003 const WasmPsbtAndTxBuilderFinalization
= (typeof FinalizationRegistry
=== 'undefined')
4004 ? { register
: () => {}, unregister
: () => {} }
4005 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmpsbtandtxbuilder_free(ptr
>>> 0, 1));
4008 export class WasmPsbtAndTxBuilder
{
4010 __destroy_into_raw() {
4011 const ptr
= this.__wbg_ptr
;
4013 WasmPsbtAndTxBuilderFinalization
.unregister(this);
4018 const ptr
= this.__destroy_into_raw();
4019 wasm
.__wbg_wasmpsbtandtxbuilder_free(ptr
, 0);
4022 * @returns {WasmPsbt}
4025 const ret
= wasm
.__wbg_get_wasmpsbtandtxbuilder_0(this.__wbg_ptr
);
4026 return WasmPsbt
.__wrap(ret
);
4029 * @param {WasmPsbt} arg0
4032 _assertClass(arg0
, WasmPsbt
);
4033 var ptr0
= arg0
.__destroy_into_raw();
4034 wasm
.__wbg_set_wasmpsbtandtxbuilder_0(this.__wbg_ptr
, ptr0
);
4037 * @returns {WasmTxBuilder}
4040 const ret
= wasm
.__wbg_get_wasmpsbtandtxbuilder_1(this.__wbg_ptr
);
4041 return WasmTxBuilder
.__wrap(ret
);
4044 * @param {WasmTxBuilder} arg0
4047 _assertClass(arg0
, WasmTxBuilder
);
4048 var ptr0
= arg0
.__destroy_into_raw();
4049 wasm
.__wbg_set_wasmpsbtandtxbuilder_1(this.__wbg_ptr
, ptr0
);
4053 const WasmPsbtRecipientFinalization
= (typeof FinalizationRegistry
=== 'undefined')
4054 ? { register
: () => {}, unregister
: () => {} }
4055 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmpsbtrecipient_free(ptr
>>> 0, 1));
4058 export class WasmPsbtRecipient
{
4060 static __wrap(ptr
) {
4062 const obj
= Object
.create(WasmPsbtRecipient
.prototype);
4063 obj
.__wbg_ptr
= ptr
;
4064 WasmPsbtRecipientFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
4068 static __unwrap(jsValue
) {
4069 if (!(jsValue
instanceof WasmPsbtRecipient
)) {
4072 return jsValue
.__destroy_into_raw();
4075 __destroy_into_raw() {
4076 const ptr
= this.__wbg_ptr
;
4078 WasmPsbtRecipientFinalization
.unregister(this);
4083 const ptr
= this.__destroy_into_raw();
4084 wasm
.__wbg_wasmpsbtrecipient_free(ptr
, 0);
4093 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
4094 wasm
.__wbg_get_wasmpsbtrecipient_0(retptr
, this.__wbg_ptr
);
4095 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
4096 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
4099 return getStringFromWasm0(r0
, r1
);
4101 wasm
.__wbindgen_add_to_stack_pointer(16);
4102 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
4106 * @param {string} arg0
4109 const ptr0
= passStringToWasm0(arg0
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
4110 const len0
= WASM_VECTOR_LEN
;
4111 wasm
.__wbg_set_wasmpsbtrecipient_0(this.__wbg_ptr
, ptr0
, len0
);
4117 const ret
= wasm
.__wbg_get_wasmpsbt_total_fees(this.__wbg_ptr
);
4118 return BigInt
.asUintN(64, ret
);
4121 * @param {bigint} arg0
4124 wasm
.__wbg_set_wasmpsbt_total_fees(this.__wbg_ptr
, arg0
);
4128 const WasmQuotesAndProviderTuppleFinalization
= (typeof FinalizationRegistry
=== 'undefined')
4129 ? { register
: () => {}, unregister
: () => {} }
4130 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmquotesandprovidertupple_free(ptr
>>> 0, 1));
4133 export class WasmQuotesAndProviderTupple
{
4135 static __wrap(ptr
) {
4137 const obj
= Object
.create(WasmQuotesAndProviderTupple
.prototype);
4138 obj
.__wbg_ptr
= ptr
;
4139 WasmQuotesAndProviderTuppleFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
4143 static __unwrap(jsValue
) {
4144 if (!(jsValue
instanceof WasmQuotesAndProviderTupple
)) {
4147 return jsValue
.__destroy_into_raw();
4150 __destroy_into_raw() {
4151 const ptr
= this.__wbg_ptr
;
4153 WasmQuotesAndProviderTuppleFinalization
.unregister(this);
4158 const ptr
= this.__destroy_into_raw();
4159 wasm
.__wbg_wasmquotesandprovidertupple_free(ptr
, 0);
4162 * @returns {WasmGatewayProvider}
4165 const ret
= wasm
.__wbg_get_wasmcountriesandprovidertupple_0(this.__wbg_ptr
);
4166 return takeObject(ret
);
4169 * @param {WasmGatewayProvider} arg0
4172 wasm
.__wbg_set_wasmcountriesandprovidertupple_0(this.__wbg_ptr
, addHeapObject(arg0
));
4175 * @returns {WasmQuotes}
4178 const ret
= wasm
.__wbg_get_wasmquotesandprovidertupple_1(this.__wbg_ptr
);
4179 return takeObject(ret
);
4182 * @param {WasmQuotes} arg0
4185 wasm
.__wbg_set_wasmquotesandprovidertupple_1(this.__wbg_ptr
, addHeapObject(arg0
));
4189 const WasmQuotesByProviderFinalization
= (typeof FinalizationRegistry
=== 'undefined')
4190 ? { register
: () => {}, unregister
: () => {} }
4191 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmquotesbyprovider_free(ptr
>>> 0, 1));
4194 export class WasmQuotesByProvider
{
4196 static __wrap(ptr
) {
4198 const obj
= Object
.create(WasmQuotesByProvider
.prototype);
4199 obj
.__wbg_ptr
= ptr
;
4200 WasmQuotesByProviderFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
4204 __destroy_into_raw() {
4205 const ptr
= this.__wbg_ptr
;
4207 WasmQuotesByProviderFinalization
.unregister(this);
4212 const ptr
= this.__destroy_into_raw();
4213 wasm
.__wbg_wasmquotesbyprovider_free(ptr
, 0);
4216 * @returns {(WasmQuotesAndProviderTupple)[]}
4220 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
4221 wasm
.__wbg_get_wasmquotesbyprovider_data(retptr
, this.__wbg_ptr
);
4222 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
4223 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
4224 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
4225 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
4228 wasm
.__wbindgen_add_to_stack_pointer(16);
4232 * @param {(WasmQuotesAndProviderTupple)[]} arg0
4235 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
4236 const len0
= WASM_VECTOR_LEN
;
4237 wasm
.__wbg_set_wasmquotesbyprovider_data(this.__wbg_ptr
, ptr0
, len0
);
4241 const WasmRecipientFinalization
= (typeof FinalizationRegistry
=== 'undefined')
4242 ? { register
: () => {}, unregister
: () => {} }
4243 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmrecipient_free(ptr
>>> 0, 1));
4246 export class WasmRecipient
{
4248 static __wrap(ptr
) {
4250 const obj
= Object
.create(WasmRecipient
.prototype);
4251 obj
.__wbg_ptr
= ptr
;
4252 WasmRecipientFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
4256 __destroy_into_raw() {
4257 const ptr
= this.__wbg_ptr
;
4259 WasmRecipientFinalization
.unregister(this);
4264 const ptr
= this.__destroy_into_raw();
4265 wasm
.__wbg_wasmrecipient_free(ptr
, 0);
4274 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
4275 wasm
.__wbg_get_wasmrecipient_0(retptr
, this.__wbg_ptr
);
4276 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
4277 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
4280 return getStringFromWasm0(r0
, r1
);
4282 wasm
.__wbindgen_add_to_stack_pointer(16);
4283 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
4287 * @param {string} arg0
4290 const ptr0
= passStringToWasm0(arg0
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
4291 const len0
= WASM_VECTOR_LEN
;
4292 wasm
.__wbg_set_wasmrecipient_0(this.__wbg_ptr
, ptr0
, len0
);
4301 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
4302 wasm
.__wbg_get_wasmrecipient_1(retptr
, this.__wbg_ptr
);
4303 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
4304 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
4307 return getStringFromWasm0(r0
, r1
);
4309 wasm
.__wbindgen_add_to_stack_pointer(16);
4310 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
4314 * @param {string} arg0
4317 const ptr0
= passStringToWasm0(arg0
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
4318 const len0
= WASM_VECTOR_LEN
;
4319 wasm
.__wbg_set_wasmrecipient_1(this.__wbg_ptr
, ptr0
, len0
);
4325 const ret
= wasm
.__wbg_get_wasmrecipient_2(this.__wbg_ptr
);
4326 return BigInt
.asUintN(64, ret
);
4329 * @param {bigint} arg0
4332 wasm
.__wbg_set_wasmrecipient_2(this.__wbg_ptr
, arg0
);
4336 const WasmRemainingMonthlyInvitationsFinalization
= (typeof FinalizationRegistry
=== 'undefined')
4337 ? { register
: () => {}, unregister
: () => {} }
4338 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmremainingmonthlyinvitations_free(ptr
>>> 0, 1));
4341 export class WasmRemainingMonthlyInvitations
{
4343 static __wrap(ptr
) {
4345 const obj
= Object
.create(WasmRemainingMonthlyInvitations
.prototype);
4346 obj
.__wbg_ptr
= ptr
;
4347 WasmRemainingMonthlyInvitationsFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
4351 __destroy_into_raw() {
4352 const ptr
= this.__wbg_ptr
;
4354 WasmRemainingMonthlyInvitationsFinalization
.unregister(this);
4359 const ptr
= this.__destroy_into_raw();
4360 wasm
.__wbg_wasmremainingmonthlyinvitations_free(ptr
, 0);
4366 const ret
= wasm
.__wbg_get_wasmremainingmonthlyinvitations_Available(this.__wbg_ptr
);
4370 * @param {number} arg0
4372 set Available(arg0
) {
4373 wasm
.__wbg_set_wasmremainingmonthlyinvitations_Available(this.__wbg_ptr
, arg0
);
4379 const ret
= wasm
.__wbg_get_wasmremainingmonthlyinvitations_Used(this.__wbg_ptr
);
4383 * @param {number} arg0
4386 wasm
.__wbg_set_wasmremainingmonthlyinvitations_Used(this.__wbg_ptr
, arg0
);
4390 const WasmScriptFinalization
= (typeof FinalizationRegistry
=== 'undefined')
4391 ? { register
: () => {}, unregister
: () => {} }
4392 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmscript_free(ptr
>>> 0, 1));
4395 export class WasmScript
{
4397 static __wrap(ptr
) {
4399 const obj
= Object
.create(WasmScript
.prototype);
4400 obj
.__wbg_ptr
= ptr
;
4401 WasmScriptFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
4405 __destroy_into_raw() {
4406 const ptr
= this.__wbg_ptr
;
4408 WasmScriptFinalization
.unregister(this);
4413 const ptr
= this.__destroy_into_raw();
4414 wasm
.__wbg_wasmscript_free(ptr
, 0);
4417 * @returns {Uint8Array}
4421 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
4422 wasm
.__wbg_get_wasmscript_0(retptr
, this.__wbg_ptr
);
4423 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
4424 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
4425 var v1
= getArrayU8FromWasm0(r0
, r1
).slice();
4426 wasm
.__wbindgen_free(r0
, r1
* 1, 1);
4429 wasm
.__wbindgen_add_to_stack_pointer(16);
4433 * @param {Uint8Array} arg0
4436 const ptr0
= passArray8ToWasm0(arg0
, wasm
.__wbindgen_malloc
);
4437 const len0
= WASM_VECTOR_LEN
;
4438 wasm
.__wbg_set_wasmoutpoint_0(this.__wbg_ptr
, ptr0
, len0
);
4441 * @param {WasmNetwork} network
4442 * @returns {WasmAddress}
4444 toAddress(network
) {
4446 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
4447 wasm
.wasmscript_toAddress(retptr
, this.__wbg_ptr
, network
);
4448 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
4449 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
4450 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
4452 throw takeObject(r1
);
4454 return WasmAddress
.__wrap(r0
);
4456 wasm
.__wbindgen_add_to_stack_pointer(16);
4461 const WasmSequenceFinalization
= (typeof FinalizationRegistry
=== 'undefined')
4462 ? { register
: () => {}, unregister
: () => {} }
4463 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmsequence_free(ptr
>>> 0, 1));
4466 export class WasmSequence
{
4468 static __wrap(ptr
) {
4470 const obj
= Object
.create(WasmSequence
.prototype);
4471 obj
.__wbg_ptr
= ptr
;
4472 WasmSequenceFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
4476 __destroy_into_raw() {
4477 const ptr
= this.__wbg_ptr
;
4479 WasmSequenceFinalization
.unregister(this);
4484 const ptr
= this.__destroy_into_raw();
4485 wasm
.__wbg_wasmsequence_free(ptr
, 0);
4491 const ret
= wasm
.__wbg_get_wasmsequence_0(this.__wbg_ptr
);
4495 * @param {number} arg0
4498 wasm
.__wbg_set_wasmsequence_0(this.__wbg_ptr
, arg0
);
4502 const WasmSettingsClientFinalization
= (typeof FinalizationRegistry
=== 'undefined')
4503 ? { register
: () => {}, unregister
: () => {} }
4504 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmsettingsclient_free(ptr
>>> 0, 1));
4507 export class WasmSettingsClient
{
4509 static __wrap(ptr
) {
4511 const obj
= Object
.create(WasmSettingsClient
.prototype);
4512 obj
.__wbg_ptr
= ptr
;
4513 WasmSettingsClientFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
4517 __destroy_into_raw() {
4518 const ptr
= this.__wbg_ptr
;
4520 WasmSettingsClientFinalization
.unregister(this);
4525 const ptr
= this.__destroy_into_raw();
4526 wasm
.__wbg_wasmsettingsclient_free(ptr
, 0);
4529 * @returns {Promise<WasmUserSettingsData>}
4532 const ret
= wasm
.wasmsettingsclient_getUserSettings(this.__wbg_ptr
);
4533 return takeObject(ret
);
4536 * @param {WasmBitcoinUnit} symbol
4537 * @returns {Promise<WasmUserSettingsData>}
4539 setBitcoinUnit(symbol
) {
4540 const ret
= wasm
.wasmsettingsclient_setBitcoinUnit(this.__wbg_ptr
, addHeapObject(symbol
));
4541 return takeObject(ret
);
4544 * @param {WasmFiatCurrencySymbol} symbol
4545 * @returns {Promise<WasmUserSettingsData>}
4547 setFiatCurrency(symbol
) {
4548 const ret
= wasm
.wasmsettingsclient_setFiatCurrency(this.__wbg_ptr
, addHeapObject(symbol
));
4549 return takeObject(ret
);
4552 * @param {bigint} amount
4553 * @returns {Promise<WasmUserSettingsData>}
4555 setTwoFaThreshold(amount
) {
4556 const ret
= wasm
.wasmsettingsclient_setTwoFaThreshold(this.__wbg_ptr
, amount
);
4557 return takeObject(ret
);
4560 * @param {boolean} hide_empty_used_addresses
4561 * @returns {Promise<WasmUserSettingsData>}
4563 setHideEmptyUsedAddresses(hide_empty_used_addresses
) {
4564 const ret
= wasm
.wasmsettingsclient_setHideEmptyUsedAddresses(this.__wbg_ptr
, hide_empty_used_addresses
);
4565 return takeObject(ret
);
4568 * @param {WasmUserReceiveNotificationEmailTypes} email_type
4569 * @param {boolean} is_enable
4570 * @returns {Promise<WasmUserSettingsData>}
4572 setReceiveNotificationEmail(email_type
, is_enable
) {
4573 const ret
= wasm
.wasmsettingsclient_setReceiveNotificationEmail(this.__wbg_ptr
, addHeapObject(email_type
), is_enable
);
4574 return takeObject(ret
);
4577 * @returns {Promise<WasmUserSettingsData>}
4579 acceptTermsAndConditions() {
4580 const ret
= wasm
.wasmsettingsclient_acceptTermsAndConditions(this.__wbg_ptr
);
4581 return takeObject(ret
);
4584 * @returns {Promise<number>}
4586 getUserWalletEligibility() {
4587 const ret
= wasm
.wasmsettingsclient_getUserWalletEligibility(this.__wbg_ptr
);
4588 return takeObject(ret
);
4592 const WasmTransactionFinalization
= (typeof FinalizationRegistry
=== 'undefined')
4593 ? { register
: () => {}, unregister
: () => {} }
4594 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmtransaction_free(ptr
>>> 0, 1));
4597 export class WasmTransaction
{
4599 static __wrap(ptr
) {
4601 const obj
= Object
.create(WasmTransaction
.prototype);
4602 obj
.__wbg_ptr
= ptr
;
4603 WasmTransactionFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
4607 __destroy_into_raw() {
4608 const ptr
= this.__wbg_ptr
;
4610 WasmTransactionFinalization
.unregister(this);
4615 const ptr
= this.__destroy_into_raw();
4616 wasm
.__wbg_wasmtransaction_free(ptr
, 0);
4619 * @param {WasmPsbt} value
4620 * @returns {WasmTransaction}
4622 static fromPsbt(value
) {
4624 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
4625 _assertClass(value
, WasmPsbt
);
4626 var ptr0
= value
.__destroy_into_raw();
4627 wasm
.wasmtransaction_fromPsbt(retptr
, ptr0
);
4628 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
4629 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
4630 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
4632 throw takeObject(r1
);
4634 return WasmTransaction
.__wrap(r0
);
4636 wasm
.__wbindgen_add_to_stack_pointer(16);
4641 const WasmTransactionDetailsArrayFinalization
= (typeof FinalizationRegistry
=== 'undefined')
4642 ? { register
: () => {}, unregister
: () => {} }
4643 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmtransactiondetailsarray_free(ptr
>>> 0, 1));
4646 export class WasmTransactionDetailsArray
{
4648 static __wrap(ptr
) {
4650 const obj
= Object
.create(WasmTransactionDetailsArray
.prototype);
4651 obj
.__wbg_ptr
= ptr
;
4652 WasmTransactionDetailsArrayFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
4656 __destroy_into_raw() {
4657 const ptr
= this.__wbg_ptr
;
4659 WasmTransactionDetailsArrayFinalization
.unregister(this);
4664 const ptr
= this.__destroy_into_raw();
4665 wasm
.__wbg_wasmtransactiondetailsarray_free(ptr
, 0);
4668 * @returns {(WasmTransactionDetailsData)[]}
4672 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
4673 wasm
.__wbg_get_wasmtransactiondetailsarray_0(retptr
, this.__wbg_ptr
);
4674 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
4675 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
4676 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
4677 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
4680 wasm
.__wbindgen_add_to_stack_pointer(16);
4684 * @param {(WasmTransactionDetailsData)[]} arg0
4687 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
4688 const len0
= WASM_VECTOR_LEN
;
4689 wasm
.__wbg_set_wasmtransactiondetailsarray_0(this.__wbg_ptr
, ptr0
, len0
);
4693 const WasmTransactionDetailsDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
4694 ? { register
: () => {}, unregister
: () => {} }
4695 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmtransactiondetailsdata_free(ptr
>>> 0, 1));
4698 export class WasmTransactionDetailsData
{
4700 static __wrap(ptr
) {
4702 const obj
= Object
.create(WasmTransactionDetailsData
.prototype);
4703 obj
.__wbg_ptr
= ptr
;
4704 WasmTransactionDetailsDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
4708 static __unwrap(jsValue
) {
4709 if (!(jsValue
instanceof WasmTransactionDetailsData
)) {
4712 return jsValue
.__destroy_into_raw();
4715 __destroy_into_raw() {
4716 const ptr
= this.__wbg_ptr
;
4718 WasmTransactionDetailsDataFinalization
.unregister(this);
4723 const ptr
= this.__destroy_into_raw();
4724 wasm
.__wbg_wasmtransactiondetailsdata_free(ptr
, 0);
4727 * @returns {WasmTransactionDetails}
4730 const ret
= wasm
.__wbg_get_wasmtransactiondetailsdata_Data(this.__wbg_ptr
);
4731 return takeObject(ret
);
4734 * @param {WasmTransactionDetails} arg0
4737 wasm
.__wbg_set_wasmtransactiondetailsdata_Data(this.__wbg_ptr
, addHeapObject(arg0
));
4741 const WasmTxBuilderFinalization
= (typeof FinalizationRegistry
=== 'undefined')
4742 ? { register
: () => {}, unregister
: () => {} }
4743 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmtxbuilder_free(ptr
>>> 0, 1));
4746 export class WasmTxBuilder
{
4748 static __wrap(ptr
) {
4750 const obj
= Object
.create(WasmTxBuilder
.prototype);
4751 obj
.__wbg_ptr
= ptr
;
4752 WasmTxBuilderFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
4756 __destroy_into_raw() {
4757 const ptr
= this.__wbg_ptr
;
4759 WasmTxBuilderFinalization
.unregister(this);
4764 const ptr
= this.__destroy_into_raw();
4765 wasm
.__wbg_wasmtxbuilder_free(ptr
, 0);
4770 const ret
= wasm
.wasmtxbuilder_new();
4771 this.__wbg_ptr
= ret
>>> 0;
4772 WasmTxBuilderFinalization
.register(this, this.__wbg_ptr
, this);
4776 * @param {WasmAccount} account
4777 * @returns {WasmTxBuilder}
4779 setAccount(account
) {
4780 _assertClass(account
, WasmAccount
);
4781 const ret
= wasm
.wasmtxbuilder_setAccount(this.__wbg_ptr
, account
.__wbg_ptr
);
4782 return WasmTxBuilder
.__wrap(ret
);
4785 * @returns {Promise<WasmTxBuilder>}
4787 constrainRecipientAmounts() {
4788 const ret
= wasm
.wasmtxbuilder_constrainRecipientAmounts(this.__wbg_ptr
);
4789 return takeObject(ret
);
4792 * @returns {WasmTxBuilder}
4795 const ret
= wasm
.wasmtxbuilder_clearRecipients(this.__wbg_ptr
);
4796 return WasmTxBuilder
.__wrap(ret
);
4799 * @param {string | undefined} [address_str]
4800 * @param {bigint | undefined} [amount]
4801 * @returns {WasmTxBuilder}
4803 addRecipient(address_str
, amount
) {
4804 var ptr0
= isLikeNone(address_str
) ? 0 : passStringToWasm0(address_str
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
4805 var len0
= WASM_VECTOR_LEN
;
4806 const ret
= wasm
.wasmtxbuilder_addRecipient(this.__wbg_ptr
, ptr0
, len0
, !isLikeNone(amount
), isLikeNone(amount
) ? BigInt(0) : amount
);
4807 return WasmTxBuilder
.__wrap(ret
);
4810 * @param {number} index
4811 * @returns {WasmTxBuilder}
4813 removeRecipient(index
) {
4814 const ret
= wasm
.wasmtxbuilder_removeRecipient(this.__wbg_ptr
, index
);
4815 return WasmTxBuilder
.__wrap(ret
);
4818 * @param {number} index
4819 * @param {string | undefined} [address_str]
4820 * @param {bigint | undefined} [amount]
4821 * @returns {WasmTxBuilder}
4823 updateRecipient(index
, address_str
, amount
) {
4825 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
4826 var ptr0
= isLikeNone(address_str
) ? 0 : passStringToWasm0(address_str
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
4827 var len0
= WASM_VECTOR_LEN
;
4828 wasm
.wasmtxbuilder_updateRecipient(retptr
, this.__wbg_ptr
, index
, ptr0
, len0
, !isLikeNone(amount
), isLikeNone(amount
) ? BigInt(0) : amount
);
4829 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
4830 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
4831 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
4833 throw takeObject(r1
);
4835 return WasmTxBuilder
.__wrap(r0
);
4837 wasm
.__wbindgen_add_to_stack_pointer(16);
4841 * @param {number} index
4842 * @returns {Promise<WasmTxBuilder>}
4844 updateRecipientAmountToMax(index
) {
4845 const ret
= wasm
.wasmtxbuilder_updateRecipientAmountToMax(this.__wbg_ptr
, index
);
4846 return takeObject(ret
);
4849 * @returns {(WasmRecipient)[]}
4853 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
4854 wasm
.wasmtxbuilder_getRecipients(retptr
, this.__wbg_ptr
);
4855 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
4856 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
4857 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
4858 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
4861 wasm
.__wbindgen_add_to_stack_pointer(16);
4868 * @param {WasmOutPoint} outpoint
4869 * @returns {WasmTxBuilder}
4871 addUtxoToSpend(outpoint
) {
4873 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
4874 _assertClass(outpoint
, WasmOutPoint
);
4875 var ptr0
= outpoint
.__destroy_into_raw();
4876 wasm
.wasmtxbuilder_addUtxoToSpend(retptr
, this.__wbg_ptr
, ptr0
);
4877 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
4878 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
4879 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
4881 throw takeObject(r1
);
4883 return WasmTxBuilder
.__wrap(r0
);
4885 wasm
.__wbindgen_add_to_stack_pointer(16);
4889 * @param {WasmOutPoint} outpoint
4890 * @returns {WasmTxBuilder}
4892 removeUtxoToSpend(outpoint
) {
4894 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
4895 _assertClass(outpoint
, WasmOutPoint
);
4896 var ptr0
= outpoint
.__destroy_into_raw();
4897 wasm
.wasmtxbuilder_removeUtxoToSpend(retptr
, this.__wbg_ptr
, ptr0
);
4898 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
4899 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
4900 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
4902 throw takeObject(r1
);
4904 return WasmTxBuilder
.__wrap(r0
);
4906 wasm
.__wbindgen_add_to_stack_pointer(16);
4910 * @returns {WasmTxBuilder}
4912 clearUtxosToSpend() {
4913 const ret
= wasm
.wasmtxbuilder_clearUtxosToSpend(this.__wbg_ptr
);
4914 return WasmTxBuilder
.__wrap(ret
);
4917 * @returns {(WasmOutPoint)[]}
4921 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
4922 wasm
.wasmtxbuilder_getUtxosToSpend(retptr
, this.__wbg_ptr
);
4923 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
4924 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
4925 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
4926 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
4929 wasm
.__wbindgen_add_to_stack_pointer(16);
4934 * * Coin selection enforcement
4936 * @param {WasmCoinSelection} coin_selection
4937 * @returns {WasmTxBuilder}
4939 setCoinSelection(coin_selection
) {
4940 const ret
= wasm
.wasmtxbuilder_setCoinSelection(this.__wbg_ptr
, coin_selection
);
4941 return WasmTxBuilder
.__wrap(ret
);
4944 * @returns {WasmCoinSelection}
4946 getCoinSelection() {
4947 const ret
= wasm
.wasmtxbuilder_getCoinSelection(this.__wbg_ptr
);
4954 * @returns {WasmTxBuilder}
4957 const ret
= wasm
.wasmtxbuilder_enableRbf(this.__wbg_ptr
);
4958 return WasmTxBuilder
.__wrap(ret
);
4961 * @returns {WasmTxBuilder}
4964 const ret
= wasm
.wasmtxbuilder_disableRbf(this.__wbg_ptr
);
4965 return WasmTxBuilder
.__wrap(ret
);
4968 * @returns {boolean}
4971 const ret
= wasm
.wasmtxbuilder_getRbfEnabled(this.__wbg_ptr
);
4978 * @param {WasmChangeSpendPolicy} change_policy
4979 * @returns {WasmTxBuilder}
4981 setChangePolicy(change_policy
) {
4982 const ret
= wasm
.wasmtxbuilder_setChangePolicy(this.__wbg_ptr
, change_policy
);
4983 return WasmTxBuilder
.__wrap(ret
);
4986 * @returns {WasmChangeSpendPolicy}
4989 const ret
= wasm
.wasmtxbuilder_getChangePolicy(this.__wbg_ptr
);
4996 * @param {bigint} sat_per_vb
4997 * @returns {WasmTxBuilder}
4999 setFeeRate(sat_per_vb
) {
5000 const ret
= wasm
.wasmtxbuilder_setFeeRate(this.__wbg_ptr
, sat_per_vb
);
5001 return WasmTxBuilder
.__wrap(ret
);
5004 * @returns {bigint | undefined}
5008 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
5009 wasm
.wasmtxbuilder_getFeeRate(retptr
, this.__wbg_ptr
);
5010 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
5011 var r2
= getDataViewMemory0().getBigInt64(retptr
+ 8 * 1, true);
5012 return r0
=== 0 ? undefined : BigInt
.asUintN(64, r2
);
5014 wasm
.__wbindgen_add_to_stack_pointer(16);
5021 * @param {WasmLockTime} locktime
5022 * @returns {WasmTxBuilder}
5024 addLocktime(locktime
) {
5025 _assertClass(locktime
, WasmLockTime
);
5026 var ptr0
= locktime
.__destroy_into_raw();
5027 const ret
= wasm
.wasmtxbuilder_addLocktime(this.__wbg_ptr
, ptr0
);
5028 return WasmTxBuilder
.__wrap(ret
);
5031 * @returns {WasmTxBuilder}
5034 const ret
= wasm
.wasmtxbuilder_removeLocktime(this.__wbg_ptr
);
5035 return WasmTxBuilder
.__wrap(ret
);
5038 * @returns {WasmLockTime | undefined}
5041 const ret
= wasm
.wasmtxbuilder_getLocktime(this.__wbg_ptr
);
5042 return ret
=== 0 ? undefined : WasmLockTime
.__wrap(ret
);
5048 * @param {WasmNetwork} network
5049 * @returns {Promise<WasmPsbt>}
5051 createPsbt(network
) {
5052 const ret
= wasm
.wasmtxbuilder_createPsbt(this.__wbg_ptr
, network
);
5053 return takeObject(ret
);
5056 * @param {WasmNetwork} network
5057 * @param {boolean | undefined} [allow_dust]
5058 * @returns {Promise<WasmPsbt>}
5060 createDraftPsbt(network
, allow_dust
) {
5061 const ret
= wasm
.wasmtxbuilder_createDraftPsbt(this.__wbg_ptr
, network
, isLikeNone(allow_dust
) ? 0xFFFFFF : allow_dust
? 1 : 0);
5062 return takeObject(ret
);
5066 const WasmTxOutFinalization
= (typeof FinalizationRegistry
=== 'undefined')
5067 ? { register
: () => {}, unregister
: () => {} }
5068 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmtxout_free(ptr
>>> 0, 1));
5071 export class WasmTxOut
{
5073 static __wrap(ptr
) {
5075 const obj
= Object
.create(WasmTxOut
.prototype);
5076 obj
.__wbg_ptr
= ptr
;
5077 WasmTxOutFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
5081 __destroy_into_raw() {
5082 const ptr
= this.__wbg_ptr
;
5084 WasmTxOutFinalization
.unregister(this);
5089 const ptr
= this.__destroy_into_raw();
5090 wasm
.__wbg_wasmtxout_free(ptr
, 0);
5096 const ret
= wasm
.__wbg_get_wasmtxout_value(this.__wbg_ptr
);
5097 return BigInt
.asUintN(64, ret
);
5100 * @param {bigint} arg0
5103 wasm
.__wbg_set_wasmtxout_value(this.__wbg_ptr
, arg0
);
5106 * @returns {WasmScript}
5108 get script_pubkey() {
5109 const ret
= wasm
.__wbg_get_wasmtxout_script_pubkey(this.__wbg_ptr
);
5110 return WasmScript
.__wrap(ret
);
5113 * @param {WasmScript} arg0
5115 set script_pubkey(arg0
) {
5116 _assertClass(arg0
, WasmScript
);
5117 var ptr0
= arg0
.__destroy_into_raw();
5118 wasm
.__wbg_set_wasmtxout_script_pubkey(this.__wbg_ptr
, ptr0
);
5121 * @returns {boolean}
5124 const ret
= wasm
.__wbg_get_wasmtxout_is_mine(this.__wbg_ptr
);
5128 * @param {boolean} arg0
5131 wasm
.__wbg_set_wasmtxout_is_mine(this.__wbg_ptr
, arg0
);
5134 * @returns {string | undefined}
5138 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
5139 wasm
.__wbg_get_wasmtxout_address(retptr
, this.__wbg_ptr
);
5140 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
5141 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
5144 v1
= getStringFromWasm0(r0
, r1
).slice();
5145 wasm
.__wbindgen_free(r0
, r1
* 1, 1);
5149 wasm
.__wbindgen_add_to_stack_pointer(16);
5153 * @param {string | undefined} [arg0]
5156 var ptr0
= isLikeNone(arg0
) ? 0 : passStringToWasm0(arg0
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5157 var len0
= WASM_VECTOR_LEN
;
5158 wasm
.__wbg_set_wasmtxout_address(this.__wbg_ptr
, ptr0
, len0
);
5162 const WasmUserSettingsDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
5163 ? { register
: () => {}, unregister
: () => {} }
5164 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmusersettingsdata_free(ptr
>>> 0, 1));
5167 export class WasmUserSettingsData
{
5169 static __wrap(ptr
) {
5171 const obj
= Object
.create(WasmUserSettingsData
.prototype);
5172 obj
.__wbg_ptr
= ptr
;
5173 WasmUserSettingsDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
5177 __destroy_into_raw() {
5178 const ptr
= this.__wbg_ptr
;
5180 WasmUserSettingsDataFinalization
.unregister(this);
5185 const ptr
= this.__destroy_into_raw();
5186 wasm
.__wbg_wasmusersettingsdata_free(ptr
, 0);
5189 * @returns {WasmUserSettings}
5192 const ret
= wasm
.__wbg_get_wasmusersettingsdata_0(this.__wbg_ptr
);
5193 return takeObject(ret
);
5196 * @param {WasmUserSettings} arg0
5199 wasm
.__wbg_set_wasmusersettingsdata_0(this.__wbg_ptr
, addHeapObject(arg0
));
5203 const WasmUtxoFinalization
= (typeof FinalizationRegistry
=== 'undefined')
5204 ? { register
: () => {}, unregister
: () => {} }
5205 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmutxo_free(ptr
>>> 0, 1));
5208 export class WasmUtxo
{
5210 static __wrap(ptr
) {
5212 const obj
= Object
.create(WasmUtxo
.prototype);
5213 obj
.__wbg_ptr
= ptr
;
5214 WasmUtxoFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
5218 static __unwrap(jsValue
) {
5219 if (!(jsValue
instanceof WasmUtxo
)) {
5222 return jsValue
.__destroy_into_raw();
5225 __destroy_into_raw() {
5226 const ptr
= this.__wbg_ptr
;
5228 WasmUtxoFinalization
.unregister(this);
5233 const ptr
= this.__destroy_into_raw();
5234 wasm
.__wbg_wasmutxo_free(ptr
, 0);
5240 const ret
= wasm
.__wbg_get_wasmtxout_value(this.__wbg_ptr
);
5241 return BigInt
.asUintN(64, ret
);
5244 * @param {bigint} arg0
5247 wasm
.__wbg_set_wasmtxout_value(this.__wbg_ptr
, arg0
);
5250 * @returns {WasmOutPoint}
5253 const ret
= wasm
.__wbg_get_wasmutxo_outpoint(this.__wbg_ptr
);
5254 return WasmOutPoint
.__wrap(ret
);
5257 * @param {WasmOutPoint} arg0
5259 set outpoint(arg0
) {
5260 _assertClass(arg0
, WasmOutPoint
);
5261 var ptr0
= arg0
.__destroy_into_raw();
5262 wasm
.__wbg_set_wasmtxout_script_pubkey(this.__wbg_ptr
, ptr0
);
5265 * @returns {WasmScript}
5267 get script_pubkey() {
5268 const ret
= wasm
.__wbg_get_wasmutxo_script_pubkey(this.__wbg_ptr
);
5269 return WasmScript
.__wrap(ret
);
5272 * @param {WasmScript} arg0
5274 set script_pubkey(arg0
) {
5275 _assertClass(arg0
, WasmScript
);
5276 var ptr0
= arg0
.__destroy_into_raw();
5277 wasm
.__wbg_set_wasmutxo_script_pubkey(this.__wbg_ptr
, ptr0
);
5280 * @returns {WasmKeychainKind}
5283 const ret
= wasm
.__wbg_get_wasmutxo_keychain(this.__wbg_ptr
);
5287 * @param {WasmKeychainKind} arg0
5289 set keychain(arg0
) {
5290 wasm
.__wbg_set_wasmutxo_keychain(this.__wbg_ptr
, arg0
);
5293 * @returns {boolean}
5296 const ret
= wasm
.__wbg_get_wasmutxo_is_spent(this.__wbg_ptr
);
5300 * @param {boolean} arg0
5302 set is_spent(arg0
) {
5303 wasm
.__wbg_set_wasmutxo_is_spent(this.__wbg_ptr
, arg0
);
5307 const WasmUtxoArrayFinalization
= (typeof FinalizationRegistry
=== 'undefined')
5308 ? { register
: () => {}, unregister
: () => {} }
5309 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmutxoarray_free(ptr
>>> 0, 1));
5312 export class WasmUtxoArray
{
5314 static __wrap(ptr
) {
5316 const obj
= Object
.create(WasmUtxoArray
.prototype);
5317 obj
.__wbg_ptr
= ptr
;
5318 WasmUtxoArrayFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
5322 __destroy_into_raw() {
5323 const ptr
= this.__wbg_ptr
;
5325 WasmUtxoArrayFinalization
.unregister(this);
5330 const ptr
= this.__destroy_into_raw();
5331 wasm
.__wbg_wasmutxoarray_free(ptr
, 0);
5334 * @returns {(WasmUtxo)[]}
5338 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
5339 wasm
.__wbg_get_wasmutxoarray_0(retptr
, this.__wbg_ptr
);
5340 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
5341 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
5342 var v1
= getArrayJsValueFromWasm0(r0
, r1
).slice();
5343 wasm
.__wbindgen_free(r0
, r1
* 4, 4);
5346 wasm
.__wbindgen_add_to_stack_pointer(16);
5350 * @param {(WasmUtxo)[]} arg0
5353 const ptr0
= passArrayJsValueToWasm0(arg0
, wasm
.__wbindgen_malloc
);
5354 const len0
= WASM_VECTOR_LEN
;
5355 wasm
.__wbg_set_wasmutxoarray_0(this.__wbg_ptr
, ptr0
, len0
);
5359 const WasmWalletFinalization
= (typeof FinalizationRegistry
=== 'undefined')
5360 ? { register
: () => {}, unregister
: () => {} }
5361 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmwallet_free(ptr
>>> 0, 1));
5364 export class WasmWallet
{
5366 __destroy_into_raw() {
5367 const ptr
= this.__wbg_ptr
;
5369 WasmWalletFinalization
.unregister(this);
5374 const ptr
= this.__destroy_into_raw();
5375 wasm
.__wbg_wasmwallet_free(ptr
, 0);
5378 * @param {WasmNetwork} network
5379 * @param {string} bip39_mnemonic
5380 * @param {string | undefined} [bip38_passphrase]
5382 constructor(network
, bip39_mnemonic
, bip38_passphrase
) {
5384 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
5385 const ptr0
= passStringToWasm0(bip39_mnemonic
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5386 const len0
= WASM_VECTOR_LEN
;
5387 var ptr1
= isLikeNone(bip38_passphrase
) ? 0 : passStringToWasm0(bip38_passphrase
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5388 var len1
= WASM_VECTOR_LEN
;
5389 wasm
.wasmwallet_new(retptr
, network
, ptr0
, len0
, ptr1
, len1
);
5390 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
5391 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
5392 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
5394 throw takeObject(r1
);
5396 this.__wbg_ptr
= r0
>>> 0;
5397 WasmWalletFinalization
.register(this, this.__wbg_ptr
, this);
5400 wasm
.__wbindgen_add_to_stack_pointer(16);
5404 * @param {number} script_type
5405 * @param {string} derivation_path
5406 * @returns {WasmAccount}
5408 addAccount(script_type
, derivation_path
) {
5410 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
5411 const ptr0
= passStringToWasm0(derivation_path
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5412 const len0
= WASM_VECTOR_LEN
;
5413 wasm
.wasmwallet_addAccount(retptr
, this.__wbg_ptr
, script_type
, ptr0
, len0
);
5414 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
5415 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
5416 var r2
= getDataViewMemory0().getInt32(retptr
+ 4 * 2, true);
5418 throw takeObject(r1
);
5420 return WasmAccount
.__wrap(r0
);
5422 wasm
.__wbindgen_add_to_stack_pointer(16);
5426 * @param {WasmProtonWalletApiClient} api_client
5427 * @returns {Promise<WasmDiscoveredAccounts>}
5429 discoverAccounts(api_client
) {
5430 _assertClass(api_client
, WasmProtonWalletApiClient
);
5431 const ret
= wasm
.wasmwallet_discoverAccounts(this.__wbg_ptr
, api_client
.__wbg_ptr
);
5432 return takeObject(ret
);
5435 * @param {string} derivation_path
5436 * @returns {WasmAccount | undefined}
5438 getAccount(derivation_path
) {
5439 const ptr0
= passStringToWasm0(derivation_path
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5440 const len0
= WASM_VECTOR_LEN
;
5441 const ret
= wasm
.wasmwallet_getAccount(this.__wbg_ptr
, ptr0
, len0
);
5442 return ret
=== 0 ? undefined : WasmAccount
.__wrap(ret
);
5445 * @returns {Promise<WasmBalanceWrapper>}
5448 const ret
= wasm
.wasmwallet_getBalance(this.__wbg_ptr
);
5449 return takeObject(ret
);
5452 * @param {WasmPagination | undefined} [pagination]
5453 * @param {WasmSortOrder | undefined} [sort]
5454 * @returns {Promise<WasmTransactionDetailsArray>}
5456 getTransactions(pagination
, sort
) {
5457 const ret
= wasm
.wasmwallet_getTransactions(this.__wbg_ptr
, isLikeNone(pagination
) ? 0 : addHeapObject(pagination
), isLikeNone(sort
) ? 2 : sort
);
5458 return takeObject(ret
);
5461 * @param {WasmDerivationPath} account_key
5462 * @param {string} txid
5463 * @returns {Promise<WasmTransactionDetailsData>}
5465 getTransaction(account_key
, txid
) {
5466 _assertClass(account_key
, WasmDerivationPath
);
5467 const ptr0
= passStringToWasm0(txid
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5468 const len0
= WASM_VECTOR_LEN
;
5469 const ret
= wasm
.wasmwallet_getTransaction(this.__wbg_ptr
, account_key
.__wbg_ptr
, ptr0
, len0
);
5470 return takeObject(ret
);
5479 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
5480 wasm
.wasmwallet_getFingerprint(retptr
, this.__wbg_ptr
);
5481 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
5482 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
5485 return getStringFromWasm0(r0
, r1
);
5487 wasm
.__wbindgen_add_to_stack_pointer(16);
5488 wasm
.__wbindgen_free(deferred1_0
, deferred1_1
, 1);
5495 const retptr
= wasm
.__wbindgen_add_to_stack_pointer(-16);
5496 wasm
.wasmwallet_clearStore(retptr
, this.__wbg_ptr
);
5497 var r0
= getDataViewMemory0().getInt32(retptr
+ 4 * 0, true);
5498 var r1
= getDataViewMemory0().getInt32(retptr
+ 4 * 1, true);
5500 throw takeObject(r0
);
5503 wasm
.__wbindgen_add_to_stack_pointer(16);
5508 const WasmWalletAccountAddressDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
5509 ? { register
: () => {}, unregister
: () => {} }
5510 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmwalletaccountaddressdata_free(ptr
>>> 0, 1));
5513 export class WasmWalletAccountAddressData
{
5515 static __wrap(ptr
) {
5517 const obj
= Object
.create(WasmWalletAccountAddressData
.prototype);
5518 obj
.__wbg_ptr
= ptr
;
5519 WasmWalletAccountAddressDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
5523 static __unwrap(jsValue
) {
5524 if (!(jsValue
instanceof WasmWalletAccountAddressData
)) {
5527 return jsValue
.__destroy_into_raw();
5530 __destroy_into_raw() {
5531 const ptr
= this.__wbg_ptr
;
5533 WasmWalletAccountAddressDataFinalization
.unregister(this);
5538 const ptr
= this.__destroy_into_raw();
5539 wasm
.__wbg_wasmwalletaccountaddressdata_free(ptr
, 0);
5542 * @returns {WasmApiEmailAddress}
5545 const ret
= wasm
.__wbg_get_wasmwalletaccountaddressdata_Data(this.__wbg_ptr
);
5546 return takeObject(ret
);
5549 * @param {WasmApiEmailAddress} arg0
5552 wasm
.__wbg_set_wasmwalletaccountaddressdata_Data(this.__wbg_ptr
, addHeapObject(arg0
));
5556 const WasmWalletAccountDataFinalization
= (typeof FinalizationRegistry
=== 'undefined')
5557 ? { register
: () => {}, unregister
: () => {} }
5558 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmwalletaccountdata_free(ptr
>>> 0, 1));
5561 export class WasmWalletAccountData
{
5563 static __wrap(ptr
) {
5565 const obj
= Object
.create(WasmWalletAccountData
.prototype);
5566 obj
.__wbg_ptr
= ptr
;
5567 WasmWalletAccountDataFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
5571 static __unwrap(jsValue
) {
5572 if (!(jsValue
instanceof WasmWalletAccountData
)) {
5575 return jsValue
.__destroy_into_raw();
5578 __destroy_into_raw() {
5579 const ptr
= this.__wbg_ptr
;
5581 WasmWalletAccountDataFinalization
.unregister(this);
5586 const ptr
= this.__destroy_into_raw();
5587 wasm
.__wbg_wasmwalletaccountdata_free(ptr
, 0);
5590 * @returns {WasmApiWalletAccount}
5593 const ret
= wasm
.__wbg_get_wasmwalletaccountdata_Data(this.__wbg_ptr
);
5594 return takeObject(ret
);
5597 * @param {WasmApiWalletAccount} arg0
5600 wasm
.__wbg_set_wasmwalletaccountdata_Data(this.__wbg_ptr
, addHeapObject(arg0
));
5604 const WasmWalletClientFinalization
= (typeof FinalizationRegistry
=== 'undefined')
5605 ? { register
: () => {}, unregister
: () => {} }
5606 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmwalletclient_free(ptr
>>> 0, 1));
5609 export class WasmWalletClient
{
5611 static __wrap(ptr
) {
5613 const obj
= Object
.create(WasmWalletClient
.prototype);
5614 obj
.__wbg_ptr
= ptr
;
5615 WasmWalletClientFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
5619 __destroy_into_raw() {
5620 const ptr
= this.__wbg_ptr
;
5622 WasmWalletClientFinalization
.unregister(this);
5627 const ptr
= this.__destroy_into_raw();
5628 wasm
.__wbg_wasmwalletclient_free(ptr
, 0);
5631 * @returns {Promise<WasmApiWalletsData>}
5634 const ret
= wasm
.wasmwalletclient_getWallets(this.__wbg_ptr
);
5635 return takeObject(ret
);
5638 * @param {string} name
5639 * @param {boolean} is_imported
5640 * @param {number} wallet_type
5641 * @param {boolean} has_passphrase
5642 * @param {string} user_key_id
5643 * @param {string} wallet_key
5644 * @param {string} wallet_key_signature
5645 * @param {string | undefined} [mnemonic]
5646 * @param {string | undefined} [fingerprint]
5647 * @param {string | undefined} [public_key]
5648 * @param {boolean | undefined} [is_auto_created]
5649 * @returns {Promise<WasmApiWalletData>}
5651 createWallet(name
, is_imported
, wallet_type
, has_passphrase
, user_key_id
, wallet_key
, wallet_key_signature
, mnemonic
, fingerprint
, public_key
, is_auto_created
) {
5652 const ptr0
= passStringToWasm0(name
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5653 const len0
= WASM_VECTOR_LEN
;
5654 const ptr1
= passStringToWasm0(user_key_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5655 const len1
= WASM_VECTOR_LEN
;
5656 const ptr2
= passStringToWasm0(wallet_key
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5657 const len2
= WASM_VECTOR_LEN
;
5658 const ptr3
= passStringToWasm0(wallet_key_signature
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5659 const len3
= WASM_VECTOR_LEN
;
5660 var ptr4
= isLikeNone(mnemonic
) ? 0 : passStringToWasm0(mnemonic
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5661 var len4
= WASM_VECTOR_LEN
;
5662 var ptr5
= isLikeNone(fingerprint
) ? 0 : passStringToWasm0(fingerprint
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5663 var len5
= WASM_VECTOR_LEN
;
5664 var ptr6
= isLikeNone(public_key
) ? 0 : passStringToWasm0(public_key
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5665 var len6
= WASM_VECTOR_LEN
;
5666 const ret
= wasm
.wasmwalletclient_createWallet(this.__wbg_ptr
, ptr0
, len0
, is_imported
, wallet_type
, has_passphrase
, ptr1
, len1
, ptr2
, len2
, ptr3
, len3
, ptr4
, len4
, ptr5
, len5
, ptr6
, len6
, isLikeNone(is_auto_created
) ? 0xFFFFFF : is_auto_created
? 1 : 0);
5667 return takeObject(ret
);
5670 * @param {string} wallet_id
5671 * @param {WasmMigratedWallet} migrated_wallet
5672 * @param {WasmMigratedWalletAccounts} migrated_wallet_accounts
5673 * @param {WasmMigratedWalletTransactions} migrated_wallet_transactions
5674 * @returns {Promise<void>}
5676 migrate(wallet_id
, migrated_wallet
, migrated_wallet_accounts
, migrated_wallet_transactions
) {
5677 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5678 const len0
= WASM_VECTOR_LEN
;
5679 _assertClass(migrated_wallet_accounts
, WasmMigratedWalletAccounts
);
5680 var ptr1
= migrated_wallet_accounts
.__destroy_into_raw();
5681 _assertClass(migrated_wallet_transactions
, WasmMigratedWalletTransactions
);
5682 var ptr2
= migrated_wallet_transactions
.__destroy_into_raw();
5683 const ret
= wasm
.wasmwalletclient_migrate(this.__wbg_ptr
, ptr0
, len0
, addHeapObject(migrated_wallet
), ptr1
, ptr2
);
5684 return takeObject(ret
);
5687 * @param {string} wallet_id
5688 * @param {string} name
5689 * @returns {Promise<void>}
5691 updateWalletName(wallet_id
, name
) {
5692 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5693 const len0
= WASM_VECTOR_LEN
;
5694 const ptr1
= passStringToWasm0(name
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5695 const len1
= WASM_VECTOR_LEN
;
5696 const ret
= wasm
.wasmwalletclient_updateWalletName(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
);
5697 return takeObject(ret
);
5700 * @param {string} wallet_id
5701 * @returns {Promise<void>}
5703 disableShowWalletRecovery(wallet_id
) {
5704 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5705 const len0
= WASM_VECTOR_LEN
;
5706 const ret
= wasm
.wasmwalletclient_disableShowWalletRecovery(this.__wbg_ptr
, ptr0
, len0
);
5707 return takeObject(ret
);
5710 * @param {string} wallet_id
5711 * @returns {Promise<void>}
5713 deleteWallet(wallet_id
) {
5714 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5715 const len0
= WASM_VECTOR_LEN
;
5716 const ret
= wasm
.wasmwalletclient_deleteWallet(this.__wbg_ptr
, ptr0
, len0
);
5717 return takeObject(ret
);
5720 * @param {string} wallet_id
5721 * @returns {Promise<WasmApiWalletAccounts>}
5723 getWalletAccounts(wallet_id
) {
5724 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5725 const len0
= WASM_VECTOR_LEN
;
5726 const ret
= wasm
.wasmwalletclient_getWalletAccounts(this.__wbg_ptr
, ptr0
, len0
);
5727 return takeObject(ret
);
5730 * @param {string} wallet_id
5731 * @param {string} wallet_account_id
5732 * @returns {Promise<WasmApiWalletAccountAddresses>}
5734 getWalletAccountAddresses(wallet_id
, wallet_account_id
) {
5735 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5736 const len0
= WASM_VECTOR_LEN
;
5737 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5738 const len1
= WASM_VECTOR_LEN
;
5739 const ret
= wasm
.wasmwalletclient_getWalletAccountAddresses(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
);
5740 return takeObject(ret
);
5743 * @param {string} wallet_id
5744 * @param {WasmDerivationPath} derivation_path
5745 * @param {string} label
5746 * @param {WasmScriptType} script_type
5747 * @returns {Promise<WasmWalletAccountData>}
5749 createWalletAccount(wallet_id
, derivation_path
, label
, script_type
) {
5750 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5751 const len0
= WASM_VECTOR_LEN
;
5752 _assertClass(derivation_path
, WasmDerivationPath
);
5753 var ptr1
= derivation_path
.__destroy_into_raw();
5754 const ptr2
= passStringToWasm0(label
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5755 const len2
= WASM_VECTOR_LEN
;
5756 const ret
= wasm
.wasmwalletclient_createWalletAccount(this.__wbg_ptr
, ptr0
, len0
, ptr1
, ptr2
, len2
, script_type
);
5757 return takeObject(ret
);
5760 * @param {string} wallet_id
5761 * @param {string} wallet_account_id
5762 * @param {WasmFiatCurrencySymbol} symbol
5763 * @returns {Promise<WasmWalletAccountData>}
5765 updateWalletAccountFiatCurrency(wallet_id
, wallet_account_id
, symbol
) {
5766 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5767 const len0
= WASM_VECTOR_LEN
;
5768 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5769 const len1
= WASM_VECTOR_LEN
;
5770 const ret
= wasm
.wasmwalletclient_updateWalletAccountFiatCurrency(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, addHeapObject(symbol
));
5771 return takeObject(ret
);
5774 * @param {string} wallet_id
5775 * @param {string} wallet_account_id
5776 * @param {string} label
5777 * @returns {Promise<WasmWalletAccountData>}
5779 updateWalletAccountLabel(wallet_id
, wallet_account_id
, label
) {
5780 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5781 const len0
= WASM_VECTOR_LEN
;
5782 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5783 const len1
= WASM_VECTOR_LEN
;
5784 const ptr2
= passStringToWasm0(label
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5785 const len2
= WASM_VECTOR_LEN
;
5786 const ret
= wasm
.wasmwalletclient_updateWalletAccountLabel(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, ptr2
, len2
);
5787 return takeObject(ret
);
5790 * @param {string} wallet_id
5791 * @param {(string)[]} wallet_account_ids
5792 * @returns {Promise<WasmApiWalletAccounts>}
5794 updateWalletAccountsOrder(wallet_id
, wallet_account_ids
) {
5795 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5796 const len0
= WASM_VECTOR_LEN
;
5797 const ptr1
= passArrayJsValueToWasm0(wallet_account_ids
, wasm
.__wbindgen_malloc
);
5798 const len1
= WASM_VECTOR_LEN
;
5799 const ret
= wasm
.wasmwalletclient_updateWalletAccountsOrder(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
);
5800 return takeObject(ret
);
5803 * @param {string} wallet_id
5804 * @param {string} wallet_account_id
5805 * @param {number} last_used_index
5806 * @returns {Promise<WasmWalletAccountData>}
5808 updateWalletAccountLastUsedIndex(wallet_id
, wallet_account_id
, last_used_index
) {
5809 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5810 const len0
= WASM_VECTOR_LEN
;
5811 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5812 const len1
= WASM_VECTOR_LEN
;
5813 const ret
= wasm
.wasmwalletclient_updateWalletAccountLastUsedIndex(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, last_used_index
);
5814 return takeObject(ret
);
5817 * @param {string} wallet_id
5818 * @param {string} wallet_account_id
5819 * @param {string} email_address_id
5820 * @returns {Promise<WasmWalletAccountData>}
5822 addEmailAddress(wallet_id
, wallet_account_id
, email_address_id
) {
5823 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5824 const len0
= WASM_VECTOR_LEN
;
5825 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5826 const len1
= WASM_VECTOR_LEN
;
5827 const ptr2
= passStringToWasm0(email_address_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5828 const len2
= WASM_VECTOR_LEN
;
5829 const ret
= wasm
.wasmwalletclient_addEmailAddress(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, ptr2
, len2
);
5830 return takeObject(ret
);
5833 * @param {string} wallet_id
5834 * @param {string} wallet_account_id
5835 * @param {string} email_address_id
5836 * @returns {Promise<WasmWalletAccountData>}
5838 removeEmailAddress(wallet_id
, wallet_account_id
, email_address_id
) {
5839 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5840 const len0
= WASM_VECTOR_LEN
;
5841 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5842 const len1
= WASM_VECTOR_LEN
;
5843 const ptr2
= passStringToWasm0(email_address_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5844 const len2
= WASM_VECTOR_LEN
;
5845 const ret
= wasm
.wasmwalletclient_removeEmailAddress(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, ptr2
, len2
);
5846 return takeObject(ret
);
5849 * @param {string} wallet_id
5850 * @param {string} wallet_account_id
5851 * @returns {Promise<void>}
5853 deleteWalletAccount(wallet_id
, wallet_account_id
) {
5854 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5855 const len0
= WASM_VECTOR_LEN
;
5856 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5857 const len1
= WASM_VECTOR_LEN
;
5858 const ret
= wasm
.wasmwalletclient_deleteWalletAccount(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
);
5859 return takeObject(ret
);
5862 * @param {string} wallet_id
5863 * @param {string | undefined} [wallet_account_id]
5864 * @param {(string)[] | undefined} [hashed_txids]
5865 * @returns {Promise<WasmApiWalletTransactions>}
5867 getWalletTransactions(wallet_id
, wallet_account_id
, hashed_txids
) {
5868 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5869 const len0
= WASM_VECTOR_LEN
;
5870 var ptr1
= isLikeNone(wallet_account_id
) ? 0 : passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5871 var len1
= WASM_VECTOR_LEN
;
5872 var ptr2
= isLikeNone(hashed_txids
) ? 0 : passArrayJsValueToWasm0(hashed_txids
, wasm
.__wbindgen_malloc
);
5873 var len2
= WASM_VECTOR_LEN
;
5874 const ret
= wasm
.wasmwalletclient_getWalletTransactions(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, ptr2
, len2
);
5875 return takeObject(ret
);
5878 * @param {string} wallet_id
5879 * @param {string | undefined} [wallet_account_id]
5880 * @returns {Promise<WasmApiWalletTransactions>}
5882 getWalletTransactionsToHash(wallet_id
, wallet_account_id
) {
5883 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5884 const len0
= WASM_VECTOR_LEN
;
5885 var ptr1
= isLikeNone(wallet_account_id
) ? 0 : passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5886 var len1
= WASM_VECTOR_LEN
;
5887 const ret
= wasm
.wasmwalletclient_getWalletTransactionsToHash(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
);
5888 return takeObject(ret
);
5891 * @param {string} wallet_id
5892 * @param {string} wallet_account_id
5893 * @param {WasmCreateWalletTransactionPayload} payload
5894 * @returns {Promise<WasmApiWalletTransactionData>}
5896 createWalletTransaction(wallet_id
, wallet_account_id
, payload
) {
5897 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5898 const len0
= WASM_VECTOR_LEN
;
5899 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5900 const len1
= WASM_VECTOR_LEN
;
5901 const ret
= wasm
.wasmwalletclient_createWalletTransaction(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, addHeapObject(payload
));
5902 return takeObject(ret
);
5905 * @param {string} wallet_id
5906 * @param {string} wallet_account_id
5907 * @param {string} wallet_transaction_id
5908 * @param {string} label
5909 * @returns {Promise<WasmApiWalletTransactionData>}
5911 updateWalletTransactionLabel(wallet_id
, wallet_account_id
, wallet_transaction_id
, label
) {
5912 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5913 const len0
= WASM_VECTOR_LEN
;
5914 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5915 const len1
= WASM_VECTOR_LEN
;
5916 const ptr2
= passStringToWasm0(wallet_transaction_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5917 const len2
= WASM_VECTOR_LEN
;
5918 const ptr3
= passStringToWasm0(label
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5919 const len3
= WASM_VECTOR_LEN
;
5920 const ret
= wasm
.wasmwalletclient_updateWalletTransactionLabel(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, ptr2
, len2
, ptr3
, len3
);
5921 return takeObject(ret
);
5924 * @param {string} wallet_id
5925 * @param {string} wallet_account_id
5926 * @param {string} wallet_transaction_id
5927 * @param {string} hash_txid
5928 * @returns {Promise<WasmApiWalletTransactionData>}
5930 updateWalletTransactionHashedTxId(wallet_id
, wallet_account_id
, wallet_transaction_id
, hash_txid
) {
5931 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5932 const len0
= WASM_VECTOR_LEN
;
5933 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5934 const len1
= WASM_VECTOR_LEN
;
5935 const ptr2
= passStringToWasm0(wallet_transaction_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5936 const len2
= WASM_VECTOR_LEN
;
5937 const ptr3
= passStringToWasm0(hash_txid
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5938 const len3
= WASM_VECTOR_LEN
;
5939 const ret
= wasm
.wasmwalletclient_updateWalletTransactionHashedTxId(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, ptr2
, len2
, ptr3
, len3
);
5940 return takeObject(ret
);
5943 * @param {string} wallet_id
5944 * @param {string} wallet_account_id
5945 * @param {string} wallet_transaction_id
5946 * @param {string} sender
5947 * @returns {Promise<WasmApiWalletTransactionData>}
5949 updateExternalWalletTransactionSender(wallet_id
, wallet_account_id
, wallet_transaction_id
, sender
) {
5950 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5951 const len0
= WASM_VECTOR_LEN
;
5952 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5953 const len1
= WASM_VECTOR_LEN
;
5954 const ptr2
= passStringToWasm0(wallet_transaction_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5955 const len2
= WASM_VECTOR_LEN
;
5956 const ptr3
= passStringToWasm0(sender
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5957 const len3
= WASM_VECTOR_LEN
;
5958 const ret
= wasm
.wasmwalletclient_updateExternalWalletTransactionSender(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, ptr2
, len2
, ptr3
, len3
);
5959 return takeObject(ret
);
5962 * @param {string} wallet_id
5963 * @param {string} wallet_account_id
5964 * @param {string} wallet_transaction_id
5965 * @param {WasmWalletTransactionFlag} flag
5966 * @returns {Promise<WasmApiWalletTransactionData>}
5968 setWalletTransactionFlag(wallet_id
, wallet_account_id
, wallet_transaction_id
, flag
) {
5969 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5970 const len0
= WASM_VECTOR_LEN
;
5971 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5972 const len1
= WASM_VECTOR_LEN
;
5973 const ptr2
= passStringToWasm0(wallet_transaction_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5974 const len2
= WASM_VECTOR_LEN
;
5975 const ret
= wasm
.wasmwalletclient_setWalletTransactionFlag(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, ptr2
, len2
, flag
);
5976 return takeObject(ret
);
5979 * @param {string} wallet_id
5980 * @param {string} wallet_account_id
5981 * @param {string} wallet_transaction_id
5982 * @param {WasmWalletTransactionFlag} flag
5983 * @returns {Promise<WasmApiWalletTransactionData>}
5985 deleteWalletTransactionFlag(wallet_id
, wallet_account_id
, wallet_transaction_id
, flag
) {
5986 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5987 const len0
= WASM_VECTOR_LEN
;
5988 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5989 const len1
= WASM_VECTOR_LEN
;
5990 const ptr2
= passStringToWasm0(wallet_transaction_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
5991 const len2
= WASM_VECTOR_LEN
;
5992 const ret
= wasm
.wasmwalletclient_deleteWalletTransactionFlag(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, ptr2
, len2
, flag
);
5993 return takeObject(ret
);
5996 * @param {string} wallet_id
5997 * @param {string} wallet_account_id
5998 * @param {string} wallet_transaction_id
5999 * @returns {Promise<void>}
6001 deleteWalletTransaction(wallet_id
, wallet_account_id
, wallet_transaction_id
) {
6002 const ptr0
= passStringToWasm0(wallet_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
6003 const len0
= WASM_VECTOR_LEN
;
6004 const ptr1
= passStringToWasm0(wallet_account_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
6005 const len1
= WASM_VECTOR_LEN
;
6006 const ptr2
= passStringToWasm0(wallet_transaction_id
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
6007 const len2
= WASM_VECTOR_LEN
;
6008 const ret
= wasm
.wasmwalletclient_deleteWalletTransaction(this.__wbg_ptr
, ptr0
, len0
, ptr1
, len1
, ptr2
, len2
);
6009 return takeObject(ret
);
6013 const WasmWrappedPriceGraphFinalization
= (typeof FinalizationRegistry
=== 'undefined')
6014 ? { register
: () => {}, unregister
: () => {} }
6015 : new FinalizationRegistry(ptr
=> wasm
.__wbg_wasmwrappedpricegraph_free(ptr
>>> 0, 1));
6018 export class WasmWrappedPriceGraph
{
6020 static __wrap(ptr
) {
6022 const obj
= Object
.create(WasmWrappedPriceGraph
.prototype);
6023 obj
.__wbg_ptr
= ptr
;
6024 WasmWrappedPriceGraphFinalization
.register(obj
, obj
.__wbg_ptr
, obj
);
6028 __destroy_into_raw() {
6029 const ptr
= this.__wbg_ptr
;
6031 WasmWrappedPriceGraphFinalization
.unregister(this);
6036 const ptr
= this.__destroy_into_raw();
6037 wasm
.__wbg_wasmwrappedpricegraph_free(ptr
, 0);
6040 * @returns {WasmPriceGraph}
6043 const ret
= wasm
.__wbg_get_wasmwrappedpricegraph_data(this.__wbg_ptr
);
6044 return takeObject(ret
);
6047 * @param {WasmPriceGraph} arg0
6050 wasm
.__wbg_set_wasmwrappedpricegraph_data(this.__wbg_ptr
, addHeapObject(arg0
));
6054 export function __wbindgen_object_clone_ref(arg0
) {
6055 const ret
= getObject(arg0
);
6056 return addHeapObject(ret
);
6059 export function __wbindgen_object_drop_ref(arg0
) {
6063 export function __wbindgen_bigint_from_u64(arg0
) {
6064 const ret
= BigInt
.asUintN(64, arg0
);
6065 return addHeapObject(ret
);
6068 export function __wbindgen_number_new(arg0
) {
6070 return addHeapObject(ret
);
6073 export function __wbg_wasmpsbt_new(arg0
) {
6074 const ret
= WasmPsbt
.__wrap(arg0
);
6075 return addHeapObject(ret
);
6078 export function __wbg_wasmtxbuilder_new(arg0
) {
6079 const ret
= WasmTxBuilder
.__wrap(arg0
);
6080 return addHeapObject(ret
);
6083 export function __wbg_wasmapifiatcurrencydata_new(arg0
) {
6084 const ret
= WasmApiFiatCurrencyData
.__wrap(arg0
);
6085 return addHeapObject(ret
);
6088 export function __wbg_wasmapiwalletdata_new(arg0
) {
6089 const ret
= WasmApiWalletData
.__wrap(arg0
);
6090 return addHeapObject(ret
);
6093 export function __wbg_wasmutxo_new(arg0
) {
6094 const ret
= WasmUtxo
.__wrap(arg0
);
6095 return addHeapObject(ret
);
6098 export function __wbg_wasmpsbtrecipient_new(arg0
) {
6099 const ret
= WasmPsbtRecipient
.__wrap(arg0
);
6100 return addHeapObject(ret
);
6103 export function __wbg_wasmremainingmonthlyinvitations_new(arg0
) {
6104 const ret
= WasmRemainingMonthlyInvitations
.__wrap(arg0
);
6105 return addHeapObject(ret
);
6108 export function __wbg_wasmbalancewrapper_new(arg0
) {
6109 const ret
= WasmBalanceWrapper
.__wrap(arg0
);
6110 return addHeapObject(ret
);
6113 export function __wbg_wasmtransactiondetailsdata_new(arg0
) {
6114 const ret
= WasmTransactionDetailsData
.__wrap(arg0
);
6115 return addHeapObject(ret
);
6118 export function __wbg_wasmapiwallettransactiondata_new(arg0
) {
6119 const ret
= WasmApiWalletTransactionData
.__wrap(arg0
);
6120 return addHeapObject(ret
);
6123 export function __wbg_wasmaddressdetailsdata_new(arg0
) {
6124 const ret
= WasmAddressDetailsData
.__wrap(arg0
);
6125 return addHeapObject(ret
);
6128 export function __wbg_wasmapibitcoinaddresscreationpayloaddata_new(arg0
) {
6129 const ret
= WasmApiBitcoinAddressCreationPayloadData
.__wrap(arg0
);
6130 return addHeapObject(ret
);
6133 export function __wbg_wasmrecipient_new(arg0
) {
6134 const ret
= WasmRecipient
.__wrap(arg0
);
6135 return addHeapObject(ret
);
6138 export function __wbg_wasmusersettingsdata_new(arg0
) {
6139 const ret
= WasmUserSettingsData
.__wrap(arg0
);
6140 return addHeapObject(ret
);
6143 export function __wbg_wasmapiexchangeratedata_new(arg0
) {
6144 const ret
= WasmApiExchangeRateData
.__wrap(arg0
);
6145 return addHeapObject(ret
);
6148 export function __wbg_wasmapiwalletbitcoinaddressdata_new(arg0
) {
6149 const ret
= WasmApiWalletBitcoinAddressData
.__wrap(arg0
);
6150 return addHeapObject(ret
);
6153 export function __wbg_wasmcountriesbyprovider_new(arg0
) {
6154 const ret
= WasmCountriesByProvider
.__wrap(arg0
);
6155 return addHeapObject(ret
);
6158 export function __wbg_wasmapiwalletbitcoinaddresses_new(arg0
) {
6159 const ret
= WasmApiWalletBitcoinAddresses
.__wrap(arg0
);
6160 return addHeapObject(ret
);
6163 export function __wbg_wasmapiwalletaccounts_new(arg0
) {
6164 const ret
= WasmApiWalletAccounts
.__wrap(arg0
);
6165 return addHeapObject(ret
);
6168 export function __wbg_wasmwalletaccountdata_new(arg0
) {
6169 const ret
= WasmWalletAccountData
.__wrap(arg0
);
6170 return addHeapObject(ret
);
6173 export function __wbg_wasmwrappedpricegraph_new(arg0
) {
6174 const ret
= WasmWrappedPriceGraph
.__wrap(arg0
);
6175 return addHeapObject(ret
);
6178 export function __wbg_wasmmigratedwallettransactiondata_new(arg0
) {
6179 const ret
= WasmMigratedWalletTransactionData
.__wrap(arg0
);
6180 return addHeapObject(ret
);
6183 export function __wbg_wasmutxoarray_new(arg0
) {
6184 const ret
= WasmUtxoArray
.__wrap(arg0
);
6185 return addHeapObject(ret
);
6188 export function __wbg_wasmaddressinfo_new(arg0
) {
6189 const ret
= WasmAddressInfo
.__wrap(arg0
);
6190 return addHeapObject(ret
);
6193 export function __wbg_wasmpaymentmethodsbyprovider_new(arg0
) {
6194 const ret
= WasmPaymentMethodsByProvider
.__wrap(arg0
);
6195 return addHeapObject(ret
);
6198 export function __wbg_wasmtransactiondetailsarray_new(arg0
) {
6199 const ret
= WasmTransactionDetailsArray
.__wrap(arg0
);
6200 return addHeapObject(ret
);
6203 export function __wbg_wasmapifiatcurrencies_new(arg0
) {
6204 const ret
= WasmApiFiatCurrencies
.__wrap(arg0
);
6205 return addHeapObject(ret
);
6208 export function __wbg_wasmmigratedwalletaccountdata_new(arg0
) {
6209 const ret
= WasmMigratedWalletAccountData
.__wrap(arg0
);
6210 return addHeapObject(ret
);
6213 export function __wbg_wasmapiwalletbitcoinaddresslookupdata_new(arg0
) {
6214 const ret
= WasmApiWalletBitcoinAddressLookupData
.__wrap(arg0
);
6215 return addHeapObject(ret
);
6218 export function __wbg_wasmpaymentmethodsandprovidertupple_new(arg0
) {
6219 const ret
= WasmPaymentMethodsAndProviderTupple
.__wrap(arg0
);
6220 return addHeapObject(ret
);
6223 export function __wbg_wasmoutpoint_new(arg0
) {
6224 const ret
= WasmOutPoint
.__wrap(arg0
);
6225 return addHeapObject(ret
);
6228 export function __wbg_wasmdiscoveredaccount_new(arg0
) {
6229 const ret
= WasmDiscoveredAccount
.__wrap(arg0
);
6230 return addHeapObject(ret
);
6233 export function __wbg_wasmdiscoveredaccounts_new(arg0
) {
6234 const ret
= WasmDiscoveredAccounts
.__wrap(arg0
);
6235 return addHeapObject(ret
);
6238 export function __wbg_wasmcountriesandprovidertupple_new(arg0
) {
6239 const ret
= WasmCountriesAndProviderTupple
.__wrap(arg0
);
6240 return addHeapObject(ret
);
6243 export function __wbg_wasmwalletaccountaddressdata_new(arg0
) {
6244 const ret
= WasmWalletAccountAddressData
.__wrap(arg0
);
6245 return addHeapObject(ret
);
6248 export function __wbg_wasmquotesandprovidertupple_new(arg0
) {
6249 const ret
= WasmQuotesAndProviderTupple
.__wrap(arg0
);
6250 return addHeapObject(ret
);
6253 export function __wbg_wasmquotesbyprovider_new(arg0
) {
6254 const ret
= WasmQuotesByProvider
.__wrap(arg0
);
6255 return addHeapObject(ret
);
6258 export function __wbg_wasmapiwalletaccountaddresses_new(arg0
) {
6259 const ret
= WasmApiWalletAccountAddresses
.__wrap(arg0
);
6260 return addHeapObject(ret
);
6263 export function __wbg_wasmapiwalletsdata_new(arg0
) {
6264 const ret
= WasmApiWalletsData
.__wrap(arg0
);
6265 return addHeapObject(ret
);
6268 export function __wbg_wasmapiwallettransactions_new(arg0
) {
6269 const ret
= WasmApiWalletTransactions
.__wrap(arg0
);
6270 return addHeapObject(ret
);
6273 export function __wbg_wasmaddressdetailsarray_new(arg0
) {
6274 const ret
= WasmAddressDetailsArray
.__wrap(arg0
);
6275 return addHeapObject(ret
);
6278 export function __wbg_wasmfiatcurrenciesandprovidertupple_new(arg0
) {
6279 const ret
= WasmFiatCurrenciesAndProviderTupple
.__wrap(arg0
);
6280 return addHeapObject(ret
);
6283 export function __wbg_wasmfiatcurrenciesbyprovider_new(arg0
) {
6284 const ret
= WasmFiatCurrenciesByProvider
.__wrap(arg0
);
6285 return addHeapObject(ret
);
6288 export function __wbg_wasmminimumfees_new(arg0
) {
6289 const ret
= WasmMinimumFees
.__wrap(arg0
);
6290 return addHeapObject(ret
);
6293 export function __wbg_wasmapiwalletbitcoinaddressdata_unwrap(arg0
) {
6294 const ret
= WasmApiWalletBitcoinAddressData
.__unwrap(takeObject(arg0
));
6298 export function __wbg_wasmapibitcoinaddresscreationpayloaddata_unwrap(arg0
) {
6299 const ret
= WasmApiBitcoinAddressCreationPayloadData
.__unwrap(takeObject(arg0
));
6303 export function __wbg_wasmapifiatcurrencydata_unwrap(arg0
) {
6304 const ret
= WasmApiFiatCurrencyData
.__unwrap(takeObject(arg0
));
6308 export function __wbg_wasmapiwalletdata_unwrap(arg0
) {
6309 const ret
= WasmApiWalletData
.__unwrap(takeObject(arg0
));
6313 export function __wbg_wasmwalletaccountdata_unwrap(arg0
) {
6314 const ret
= WasmWalletAccountData
.__unwrap(takeObject(arg0
));
6318 export function __wbg_wasmwalletaccountaddressdata_unwrap(arg0
) {
6319 const ret
= WasmWalletAccountAddressData
.__unwrap(takeObject(arg0
));
6323 export function __wbg_wasmmigratedwalletaccountdata_unwrap(arg0
) {
6324 const ret
= WasmMigratedWalletAccountData
.__unwrap(takeObject(arg0
));
6328 export function __wbg_wasmmigratedwallettransactiondata_unwrap(arg0
) {
6329 const ret
= WasmMigratedWalletTransactionData
.__unwrap(takeObject(arg0
));
6333 export function __wbg_wasmapiwallettransactiondata_unwrap(arg0
) {
6334 const ret
= WasmApiWalletTransactionData
.__unwrap(takeObject(arg0
));
6338 export function __wbg_wasmtransactiondetailsdata_unwrap(arg0
) {
6339 const ret
= WasmTransactionDetailsData
.__unwrap(takeObject(arg0
));
6343 export function __wbg_wasmutxo_unwrap(arg0
) {
6344 const ret
= WasmUtxo
.__unwrap(takeObject(arg0
));
6348 export function __wbindgen_string_new(arg0
, arg1
) {
6349 const ret
= getStringFromWasm0(arg0
, arg1
);
6350 return addHeapObject(ret
);
6353 export function __wbindgen_json_parse(arg0
, arg1
) {
6354 const ret
= JSON
.parse(getStringFromWasm0(arg0
, arg1
));
6355 return addHeapObject(ret
);
6358 export function __wbindgen_json_serialize(arg0
, arg1
) {
6359 const obj
= getObject(arg1
);
6360 const ret
= JSON
.stringify(obj
=== undefined ? null : obj
);
6361 const ptr1
= passStringToWasm0(ret
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
6362 const len1
= WASM_VECTOR_LEN
;
6363 getDataViewMemory0().setInt32(arg0
+ 4 * 1, len1
, true);
6364 getDataViewMemory0().setInt32(arg0
+ 4 * 0, ptr1
, true);
6367 export function __wbg_wasmcountriesandprovidertupple_unwrap(arg0
) {
6368 const ret
= WasmCountriesAndProviderTupple
.__unwrap(takeObject(arg0
));
6372 export function __wbg_wasmfiatcurrenciesandprovidertupple_unwrap(arg0
) {
6373 const ret
= WasmFiatCurrenciesAndProviderTupple
.__unwrap(takeObject(arg0
));
6377 export function __wbg_wasmpaymentmethodsandprovidertupple_unwrap(arg0
) {
6378 const ret
= WasmPaymentMethodsAndProviderTupple
.__unwrap(takeObject(arg0
));
6382 export function __wbg_wasmquotesandprovidertupple_unwrap(arg0
) {
6383 const ret
= WasmQuotesAndProviderTupple
.__unwrap(takeObject(arg0
));
6387 export function __wbg_wasmpsbtrecipient_unwrap(arg0
) {
6388 const ret
= WasmPsbtRecipient
.__unwrap(takeObject(arg0
));
6392 export function __wbg_wasmdiscoveredaccount_unwrap(arg0
) {
6393 const ret
= WasmDiscoveredAccount
.__unwrap(takeObject(arg0
));
6397 export function __wbg_wasmaddressdetailsdata_unwrap(arg0
) {
6398 const ret
= WasmAddressDetailsData
.__unwrap(takeObject(arg0
));
6402 export function __wbindgen_error_new(arg0
, arg1
) {
6403 const ret
= new Error(getStringFromWasm0(arg0
, arg1
));
6404 return addHeapObject(ret
);
6407 export function __wbg_new_abda76e883ba8a5f() {
6408 const ret
= new Error();
6409 return addHeapObject(ret
);
6412 export function __wbg_stack_658279fe44541cf6(arg0
, arg1
) {
6413 const ret
= getObject(arg1
).stack
;
6414 const ptr1
= passStringToWasm0(ret
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
6415 const len1
= WASM_VECTOR_LEN
;
6416 getDataViewMemory0().setInt32(arg0
+ 4 * 1, len1
, true);
6417 getDataViewMemory0().setInt32(arg0
+ 4 * 0, ptr1
, true);
6420 export function __wbg_error_f851667af71bcfc6(arg0
, arg1
) {
6426 console
.error(getStringFromWasm0(arg0
, arg1
));
6428 wasm
.__wbindgen_free(deferred0_0
, deferred0_1
, 1);
6432 export function __wbindgen_is_object(arg0
) {
6433 const val
= getObject(arg0
);
6434 const ret
= typeof(val
) === 'object' && val
!== null;
6438 export function __wbindgen_string_get(arg0
, arg1
) {
6439 const obj
= getObject(arg1
);
6440 const ret
= typeof(obj
) === 'string' ? obj
: undefined;
6441 var ptr1
= isLikeNone(ret
) ? 0 : passStringToWasm0(ret
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
6442 var len1
= WASM_VECTOR_LEN
;
6443 getDataViewMemory0().setInt32(arg0
+ 4 * 1, len1
, true);
6444 getDataViewMemory0().setInt32(arg0
+ 4 * 0, ptr1
, true);
6447 export function __wbindgen_bigint_from_i64(arg0
) {
6449 return addHeapObject(ret
);
6452 export function __wbg_set_f975102236d3c502(arg0
, arg1
, arg2
) {
6453 getObject(arg0
)[takeObject(arg1
)] = takeObject(arg2
);
6456 export function __wbindgen_cb_drop(arg0
) {
6457 const obj
= takeObject(arg0
).original
;
6458 if (obj
.cnt
-- == 1) {
6466 export function __wbg_fetch_25e3a297f7b04639(arg0
) {
6467 const ret
= fetch(getObject(arg0
));
6468 return addHeapObject(ret
);
6471 export function __wbg_queueMicrotask_12a30234db4045d3(arg0
) {
6472 queueMicrotask(getObject(arg0
));
6475 export function __wbg_queueMicrotask_48421b3cc9052b68(arg0
) {
6476 const ret
= getObject(arg0
).queueMicrotask
;
6477 return addHeapObject(ret
);
6480 export function __wbindgen_is_function(arg0
) {
6481 const ret
= typeof(getObject(arg0
)) === 'function';
6485 export function __wbg_instanceof_Window_5012736c80a01584(arg0
) {
6488 result
= getObject(arg0
) instanceof Window
;
6496 export function __wbg_localStorage_90db5cb66e840248() { return handleError(function (arg0
) {
6497 const ret
= getObject(arg0
).localStorage
;
6498 return isLikeNone(ret
) ? 0 : addHeapObject(ret
);
6501 export function __wbg_fetch_ba7fe179e527d942(arg0
, arg1
) {
6502 const ret
= getObject(arg0
).fetch(getObject(arg1
));
6503 return addHeapObject(ret
);
6506 export function __wbg_getItem_cab39762abab3e70() { return handleError(function (arg0
, arg1
, arg2
, arg3
) {
6507 const ret
= getObject(arg1
).getItem(getStringFromWasm0(arg2
, arg3
));
6508 var ptr1
= isLikeNone(ret
) ? 0 : passStringToWasm0(ret
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
6509 var len1
= WASM_VECTOR_LEN
;
6510 getDataViewMemory0().setInt32(arg0
+ 4 * 1, len1
, true);
6511 getDataViewMemory0().setInt32(arg0
+ 4 * 0, ptr1
, true);
6514 export function __wbg_set_e94f65b9d83f54b0() { return handleError(function (arg0
, arg1
, arg2
, arg3
, arg4
) {
6515 getObject(arg0
)[getStringFromWasm0(arg1
, arg2
)] = getStringFromWasm0(arg3
, arg4
);
6518 export function __wbg_signal_41e46ccad44bb5e2(arg0
) {
6519 const ret
= getObject(arg0
).signal
;
6520 return addHeapObject(ret
);
6523 export function __wbg_new_ebf2727385ee825c() { return handleError(function () {
6524 const ret
= new AbortController();
6525 return addHeapObject(ret
);
6528 export function __wbg_abort_8659d889a7877ae3(arg0
) {
6529 getObject(arg0
).abort();
6532 export function __wbg_new_e27c93803e1acc42() { return handleError(function () {
6533 const ret
= new Headers();
6534 return addHeapObject(ret
);
6537 export function __wbg_append_f3a4426bb50622c5() { return handleError(function (arg0
, arg1
, arg2
, arg3
, arg4
) {
6538 getObject(arg0
).append(getStringFromWasm0(arg1
, arg2
), getStringFromWasm0(arg3
, arg4
));
6541 export function __wbg_setbody_734cb3d7ee8e6e96(arg0
, arg1
) {
6542 getObject(arg0
).body
= getObject(arg1
);
6545 export function __wbg_setcredentials_2b67800db3f7b621(arg0
, arg1
) {
6546 getObject(arg0
).credentials
= ["omit","same-origin","include",][arg1
];
6549 export function __wbg_setheaders_be10a5ab566fd06f(arg0
, arg1
) {
6550 getObject(arg0
).headers
= getObject(arg1
);
6553 export function __wbg_setmethod_dc68a742c2db5c6a(arg0
, arg1
, arg2
) {
6554 getObject(arg0
).method
= getStringFromWasm0(arg1
, arg2
);
6557 export function __wbg_setmode_a781aae2bd3df202(arg0
, arg1
) {
6558 getObject(arg0
).mode
= ["same-origin","no-cors","cors","navigate",][arg1
];
6561 export function __wbg_setsignal_91c4e8ebd04eb935(arg0
, arg1
) {
6562 getObject(arg0
).signal
= getObject(arg1
);
6565 export function __wbg_newwithstrandinit_a31c69e4cc337183() { return handleError(function (arg0
, arg1
, arg2
) {
6566 const ret
= new Request(getStringFromWasm0(arg0
, arg1
), getObject(arg2
));
6567 return addHeapObject(ret
);
6570 export function __wbg_instanceof_Response_e91b7eb7c611a9ae(arg0
) {
6573 result
= getObject(arg0
) instanceof Response
;
6581 export function __wbg_url_1bf85c8abeb8c92d(arg0
, arg1
) {
6582 const ret
= getObject(arg1
).url
;
6583 const ptr1
= passStringToWasm0(ret
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
6584 const len1
= WASM_VECTOR_LEN
;
6585 getDataViewMemory0().setInt32(arg0
+ 4 * 1, len1
, true);
6586 getDataViewMemory0().setInt32(arg0
+ 4 * 0, ptr1
, true);
6589 export function __wbg_status_ae8de515694c5c7c(arg0
) {
6590 const ret
= getObject(arg0
).status
;
6594 export function __wbg_headers_5e283e8345689121(arg0
) {
6595 const ret
= getObject(arg0
).headers
;
6596 return addHeapObject(ret
);
6599 export function __wbg_arrayBuffer_a5fbad63cc7e663b() { return handleError(function (arg0
) {
6600 const ret
= getObject(arg0
).arrayBuffer();
6601 return addHeapObject(ret
);
6604 export function __wbg_clearTimeout_76877dbc010e786d(arg0
) {
6605 const ret
= clearTimeout(takeObject(arg0
));
6606 return addHeapObject(ret
);
6609 export function __wbg_setTimeout_75cb9b6991a4031d() { return handleError(function (arg0
, arg1
) {
6610 const ret
= setTimeout(getObject(arg0
), arg1
);
6611 return addHeapObject(ret
);
6614 export function __wbg_crypto_1d1f22824a6a080c(arg0
) {
6615 const ret
= getObject(arg0
).crypto
;
6616 return addHeapObject(ret
);
6619 export function __wbg_process_4a72847cc503995b(arg0
) {
6620 const ret
= getObject(arg0
).process
;
6621 return addHeapObject(ret
);
6624 export function __wbg_versions_f686565e586dd935(arg0
) {
6625 const ret
= getObject(arg0
).versions
;
6626 return addHeapObject(ret
);
6629 export function __wbg_node_104a2ff8d6ea03a2(arg0
) {
6630 const ret
= getObject(arg0
).node
;
6631 return addHeapObject(ret
);
6634 export function __wbindgen_is_string(arg0
) {
6635 const ret
= typeof(getObject(arg0
)) === 'string';
6639 export function __wbg_require_cca90b1a94a0255b() { return handleError(function () {
6640 const ret
= module
.require
;
6641 return addHeapObject(ret
);
6644 export function __wbg_msCrypto_eb05e62b530a1508(arg0
) {
6645 const ret
= getObject(arg0
).msCrypto
;
6646 return addHeapObject(ret
);
6649 export function __wbg_randomFillSync_5c9c955aa56b6049() { return handleError(function (arg0
, arg1
) {
6650 getObject(arg0
).randomFillSync(takeObject(arg1
));
6653 export function __wbg_getRandomValues_3aa56aa6edec874c() { return handleError(function (arg0
, arg1
) {
6654 getObject(arg0
).getRandomValues(getObject(arg1
));
6657 export function __wbg_new_a220cf903aa02ca2() {
6658 const ret
= new Array();
6659 return addHeapObject(ret
);
6662 export function __wbg_newnoargs_76313bd6ff35d0f2(arg0
, arg1
) {
6663 const ret
= new Function(getStringFromWasm0(arg0
, arg1
));
6664 return addHeapObject(ret
);
6667 export function __wbg_new_8608a2b51a5f6737() {
6668 const ret
= new Map();
6669 return addHeapObject(ret
);
6672 export function __wbg_next_de3e9db4440638b2(arg0
) {
6673 const ret
= getObject(arg0
).next
;
6674 return addHeapObject(ret
);
6677 export function __wbg_next_f9cb570345655b9a() { return handleError(function (arg0
) {
6678 const ret
= getObject(arg0
).next();
6679 return addHeapObject(ret
);
6682 export function __wbg_done_bfda7aa8f252b39f(arg0
) {
6683 const ret
= getObject(arg0
).done
;
6687 export function __wbg_value_6d39332ab4788d86(arg0
) {
6688 const ret
= getObject(arg0
).value
;
6689 return addHeapObject(ret
);
6692 export function __wbg_iterator_888179a48810a9fe() {
6693 const ret
= Symbol
.iterator
;
6694 return addHeapObject(ret
);
6697 export function __wbg_get_224d16597dbbfd96() { return handleError(function (arg0
, arg1
) {
6698 const ret
= Reflect
.get(getObject(arg0
), getObject(arg1
));
6699 return addHeapObject(ret
);
6702 export function __wbg_call_1084a111329e68ce() { return handleError(function (arg0
, arg1
) {
6703 const ret
= getObject(arg0
).call(getObject(arg1
));
6704 return addHeapObject(ret
);
6707 export function __wbg_new_525245e2b9901204() {
6708 const ret
= new Object();
6709 return addHeapObject(ret
);
6712 export function __wbg_self_3093d5d1f7bcb682() { return handleError(function () {
6713 const ret
= self
.self
;
6714 return addHeapObject(ret
);
6717 export function __wbg_window_3bcfc4d31bc012f8() { return handleError(function () {
6718 const ret
= window
.window
;
6719 return addHeapObject(ret
);
6722 export function __wbg_globalThis_86b222e13bdf32ed() { return handleError(function () {
6723 const ret
= globalThis
.globalThis
;
6724 return addHeapObject(ret
);
6727 export function __wbg_global_e5a3fe56f8be9485() { return handleError(function () {
6728 const ret
= global
.global
;
6729 return addHeapObject(ret
);
6732 export function __wbindgen_is_undefined(arg0
) {
6733 const ret
= getObject(arg0
) === undefined;
6737 export function __wbg_set_673dda6c73d19609(arg0
, arg1
, arg2
) {
6738 getObject(arg0
)[arg1
>>> 0] = takeObject(arg2
);
6741 export function __wbg_new_796382978dfd4fb0(arg0
, arg1
) {
6742 const ret
= new Error(getStringFromWasm0(arg0
, arg1
));
6743 return addHeapObject(ret
);
6746 export function __wbg_call_89af060b4e1523f2() { return handleError(function (arg0
, arg1
, arg2
) {
6747 const ret
= getObject(arg0
).call(getObject(arg1
), getObject(arg2
));
6748 return addHeapObject(ret
);
6751 export function __wbg_set_49185437f0ab06f8(arg0
, arg1
, arg2
) {
6752 const ret
= getObject(arg0
).set(getObject(arg1
), getObject(arg2
));
6753 return addHeapObject(ret
);
6756 export function __wbg_now_b7a162010a9e75b4() {
6757 const ret
= Date
.now();
6761 export function __wbg_new_b85e72ed1bfd57f9(arg0
, arg1
) {
6763 var state0
= {a
: arg0
, b
: arg1
};
6764 var cb0
= (arg0
, arg1
) => {
6768 return __wbg_adapter_615(a
, state0
.b
, arg0
, arg1
);
6773 const ret
= new Promise(cb0
);
6774 return addHeapObject(ret
);
6776 state0
.a
= state0
.b
= 0;
6780 export function __wbg_resolve_570458cb99d56a43(arg0
) {
6781 const ret
= Promise
.resolve(getObject(arg0
));
6782 return addHeapObject(ret
);
6785 export function __wbg_then_95e6edc0f89b73b1(arg0
, arg1
) {
6786 const ret
= getObject(arg0
).then(getObject(arg1
));
6787 return addHeapObject(ret
);
6790 export function __wbg_then_876bb3c633745cc6(arg0
, arg1
, arg2
) {
6791 const ret
= getObject(arg0
).then(getObject(arg1
), getObject(arg2
));
6792 return addHeapObject(ret
);
6795 export function __wbg_buffer_b7b08af79b0b0974(arg0
) {
6796 const ret
= getObject(arg0
).buffer
;
6797 return addHeapObject(ret
);
6800 export function __wbg_newwithbyteoffsetandlength_8a2cb9ca96b27ec9(arg0
, arg1
, arg2
) {
6801 const ret
= new Uint8Array(getObject(arg0
), arg1
>>> 0, arg2
>>> 0);
6802 return addHeapObject(ret
);
6805 export function __wbg_new_ea1883e1e5e86686(arg0
) {
6806 const ret
= new Uint8Array(getObject(arg0
));
6807 return addHeapObject(ret
);
6810 export function __wbg_set_d1e79e2388520f18(arg0
, arg1
, arg2
) {
6811 getObject(arg0
).set(getObject(arg1
), arg2
>>> 0);
6814 export function __wbg_length_8339fcf5d8ecd12e(arg0
) {
6815 const ret
= getObject(arg0
).length
;
6819 export function __wbg_newwithlength_ec548f448387c968(arg0
) {
6820 const ret
= new Uint8Array(arg0
>>> 0);
6821 return addHeapObject(ret
);
6824 export function __wbg_subarray_7c2e3576afe181d1(arg0
, arg1
, arg2
) {
6825 const ret
= getObject(arg0
).subarray(arg1
>>> 0, arg2
>>> 0);
6826 return addHeapObject(ret
);
6829 export function __wbg_has_4bfbc01db38743f7() { return handleError(function (arg0
, arg1
) {
6830 const ret
= Reflect
.has(getObject(arg0
), getObject(arg1
));
6834 export function __wbg_stringify_bbf45426c92a6bf5() { return handleError(function (arg0
) {
6835 const ret
= JSON
.stringify(getObject(arg0
));
6836 return addHeapObject(ret
);
6839 export function __wbindgen_debug_string(arg0
, arg1
) {
6840 const ret
= debugString(getObject(arg1
));
6841 const ptr1
= passStringToWasm0(ret
, wasm
.__wbindgen_malloc
, wasm
.__wbindgen_realloc
);
6842 const len1
= WASM_VECTOR_LEN
;
6843 getDataViewMemory0().setInt32(arg0
+ 4 * 1, len1
, true);
6844 getDataViewMemory0().setInt32(arg0
+ 4 * 0, ptr1
, true);
6847 export function __wbindgen_throw(arg0
, arg1
) {
6848 throw new Error(getStringFromWasm0(arg0
, arg1
));
6851 export function __wbindgen_memory() {
6852 const ret
= wasm
.memory
;
6853 return addHeapObject(ret
);
6856 export function __wbindgen_closure_wrapper11100(arg0
, arg1
, arg2
) {
6857 const ret
= makeMutClosure(arg0
, arg1
, 1833, __wbg_adapter_38
);
6858 return addHeapObject(ret
);
6861 export function __wbindgen_closure_wrapper11733(arg0
, arg1
, arg2
) {
6862 const ret
= makeMutClosure(arg0
, arg1
, 1922, __wbg_adapter_41
);
6863 return addHeapObject(ret
);