bitmask-core 0.7.0-beta.7 → 0.7.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bitcoin.d.ts +2 -0
- package/bitcoin.d.ts.map +1 -1
- package/bitcoin.ts +2 -0
- package/bitmask_core.d.ts +78 -44
- package/bitmask_core.js +185 -106
- package/bitmask_core_bg.wasm +0 -0
- package/bitmask_core_bg.wasm.d.ts +12 -7
- package/constants.js +1 -1
- package/constants.ts +1 -1
- package/package.json +1 -1
- package/rgb.d.ts +8 -1
- package/rgb.d.ts.map +1 -1
- package/rgb.js +11 -1
- package/rgb.ts +20 -1
- package/bitmask_core_bg.js +0 -1827
package/bitcoin.d.ts
CHANGED
package/bitcoin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bitcoin.d.ts","sourceRoot":"","sources":["bitcoin.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,aAAc,MAAM,WAAgC,CAAC;AAE9E,eAAO,MAAM,aAAa,SAClB,MAAM,wBACU,MAAM,KAC3B,QAAQ,KAAK,CACkD,CAAC;AAEnE,eAAO,MAAM,aAAa,SAClB,MAAM,wBACU,MAAM,4BAE3B,QAAQ,MAAM,CAGd,CAAC;AAEJ,eAAO,MAAM,WAAW,QAAa,QAAQ,IAAI,CAAuB,CAAC;AAEzE,eAAO,MAAM,SAAS,SACd,MAAM,gBACE,MAAM,KACnB,QAAQ,MAAM,CAAyD,CAAC;AAE3E,eAAO,MAAM,aAAa,aACd,MAAM,QACV,MAAM,gBACE,MAAM,KACnB,QAAQ,MAAM,CACmD,CAAC;AAErE,eAAO,MAAM,aAAa,eACZ,MAAM,qBACC,MAAM,KACxB,QAAQ,UAAU,CACgD,CAAC;AAEtE,eAAO,MAAM,aAAa,eACZ,MAAM,qBACC,MAAM,KACxB,QAAQ,MAAM,CACoD,CAAC;AAEtE,eAAO,MAAM,QAAQ,eACP,MAAM,oBAC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GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,EAAE,gBAAgB,CAAC;CACpC;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,aAAa,CAAC;IACvB,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
package/bitcoin.ts
CHANGED
package/bitmask_core.d.ts
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
+
* @returns {Promise<any>}
|
|
5
|
+
*/
|
|
6
|
+
export function get_network(): Promise<any>;
|
|
7
|
+
/**
|
|
8
|
+
* @param {string} network_str
|
|
9
|
+
* @returns {Promise<any>}
|
|
10
|
+
*/
|
|
11
|
+
export function switch_network(network_str: string): Promise<any>;
|
|
12
|
+
/**
|
|
13
|
+
* @param {string} key
|
|
14
|
+
* @returns {Promise<any>}
|
|
15
|
+
*/
|
|
16
|
+
export function get_env(key: string): Promise<any>;
|
|
17
|
+
/**
|
|
18
|
+
* @param {string} key
|
|
19
|
+
* @param {string} value
|
|
20
|
+
* @returns {Promise<any>}
|
|
21
|
+
*/
|
|
22
|
+
export function set_env(key: string, value: string): Promise<any>;
|
|
23
|
+
/**
|
|
24
|
+
* @param {number} ms
|
|
25
|
+
* @returns {Promise<any>}
|
|
26
|
+
*/
|
|
27
|
+
export function sleep(ms: number): Promise<any>;
|
|
28
|
+
/**
|
|
4
29
|
* @param {string} secret_key
|
|
5
30
|
* @param {string} name
|
|
6
31
|
* @param {Uint8Array} data
|
|
@@ -42,43 +67,6 @@ export function decode_hex(string: string): Uint8Array;
|
|
|
42
67
|
*/
|
|
43
68
|
export function decode_base64(string: string): Uint8Array;
|
|
44
69
|
/**
|
|
45
|
-
* @returns {Promise<any>}
|
|
46
|
-
*/
|
|
47
|
-
export function get_network(): Promise<any>;
|
|
48
|
-
/**
|
|
49
|
-
* @param {string} network_str
|
|
50
|
-
* @returns {Promise<any>}
|
|
51
|
-
*/
|
|
52
|
-
export function switch_network(network_str: string): Promise<any>;
|
|
53
|
-
/**
|
|
54
|
-
* @param {string} key
|
|
55
|
-
* @returns {Promise<any>}
|
|
56
|
-
*/
|
|
57
|
-
export function get_env(key: string): Promise<any>;
|
|
58
|
-
/**
|
|
59
|
-
* @param {string} key
|
|
60
|
-
* @param {string} value
|
|
61
|
-
* @returns {Promise<any>}
|
|
62
|
-
*/
|
|
63
|
-
export function set_env(key: string, value: string): Promise<any>;
|
|
64
|
-
/**
|
|
65
|
-
* @param {number} ms
|
|
66
|
-
* @returns {Promise<any>}
|
|
67
|
-
*/
|
|
68
|
-
export function sleep(ms: number): Promise<any>;
|
|
69
|
-
/**
|
|
70
|
-
* @param {string} pubkey
|
|
71
|
-
* @param {string} token
|
|
72
|
-
* @returns {Promise<any>}
|
|
73
|
-
*/
|
|
74
|
-
export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
75
|
-
/**
|
|
76
|
-
* @param {string} pubkey
|
|
77
|
-
* @param {string} token
|
|
78
|
-
* @returns {Promise<any>}
|
|
79
|
-
*/
|
|
80
|
-
export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
81
|
-
/**
|
|
82
70
|
* @param {string} password
|
|
83
71
|
* @returns {string}
|
|
84
72
|
*/
|
|
@@ -216,6 +204,18 @@ export function swap_btc_ln(token: string, ln_address?: string): Promise<any>;
|
|
|
216
204
|
*/
|
|
217
205
|
export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
|
|
218
206
|
/**
|
|
207
|
+
* @param {string} pubkey
|
|
208
|
+
* @param {string} token
|
|
209
|
+
* @returns {Promise<any>}
|
|
210
|
+
*/
|
|
211
|
+
export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
212
|
+
/**
|
|
213
|
+
* @param {string} pubkey
|
|
214
|
+
* @param {string} token
|
|
215
|
+
* @returns {Promise<any>}
|
|
216
|
+
*/
|
|
217
|
+
export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
218
|
+
/**
|
|
219
219
|
* @param {string} nostr_hex_sk
|
|
220
220
|
* @param {any} request
|
|
221
221
|
* @returns {Promise<any>}
|
|
@@ -458,11 +458,45 @@ export function get_media_metadata(media_id: string): Promise<any>;
|
|
|
458
458
|
* @returns {Promise<any>}
|
|
459
459
|
*/
|
|
460
460
|
export function import_uda_data(request: any): Promise<any>;
|
|
461
|
+
/**
|
|
462
|
+
* @param {bigint} amount
|
|
463
|
+
* @param {number} precision
|
|
464
|
+
* @returns {bigint}
|
|
465
|
+
*/
|
|
466
|
+
export function contract_amount(amount: bigint, precision: number): bigint;
|
|
467
|
+
/**
|
|
468
|
+
* @param {bigint} amount
|
|
469
|
+
* @param {number} precision
|
|
470
|
+
* @returns {string}
|
|
471
|
+
*/
|
|
472
|
+
export function contract_amount_str(amount: bigint, precision: number): string;
|
|
473
|
+
/**
|
|
474
|
+
* @param {string} amount
|
|
475
|
+
* @param {number} precision
|
|
476
|
+
* @returns {string}
|
|
477
|
+
*/
|
|
478
|
+
export function contract_amount_parse_str(amount: string, precision: number): string;
|
|
479
|
+
/**
|
|
480
|
+
* @param {string} amount
|
|
481
|
+
* @param {number} precision
|
|
482
|
+
* @returns {bigint}
|
|
483
|
+
*/
|
|
484
|
+
export function contract_amount_parse_value(amount: string, precision: number): bigint;
|
|
485
|
+
/**
|
|
486
|
+
* @param {string} amount
|
|
487
|
+
* @returns {bigint}
|
|
488
|
+
*/
|
|
489
|
+
export function contract_amount_parse_decimal_value(amount: string): bigint;
|
|
461
490
|
|
|
462
491
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
463
492
|
|
|
464
493
|
export interface InitOutput {
|
|
465
494
|
readonly memory: WebAssembly.Memory;
|
|
495
|
+
readonly switch_network: (a: number, b: number) => number;
|
|
496
|
+
readonly get_env: (a: number, b: number) => number;
|
|
497
|
+
readonly set_env: (a: number, b: number, c: number, d: number) => number;
|
|
498
|
+
readonly sleep: (a: number) => number;
|
|
499
|
+
readonly get_network: () => number;
|
|
466
500
|
readonly store: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
467
501
|
readonly retrieve: (a: number, b: number, c: number, d: number) => number;
|
|
468
502
|
readonly retrieve_metadata: (a: number, b: number, c: number, d: number) => number;
|
|
@@ -470,13 +504,6 @@ export interface InitOutput {
|
|
|
470
504
|
readonly encode_base64: (a: number, b: number, c: number) => void;
|
|
471
505
|
readonly decode_hex: (a: number, b: number, c: number) => void;
|
|
472
506
|
readonly decode_base64: (a: number, b: number, c: number) => void;
|
|
473
|
-
readonly switch_network: (a: number, b: number) => number;
|
|
474
|
-
readonly get_env: (a: number, b: number) => number;
|
|
475
|
-
readonly set_env: (a: number, b: number, c: number, d: number) => number;
|
|
476
|
-
readonly sleep: (a: number) => number;
|
|
477
|
-
readonly get_network: () => number;
|
|
478
|
-
readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => number;
|
|
479
|
-
readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => number;
|
|
480
507
|
readonly hash_password: (a: number, b: number, c: number) => void;
|
|
481
508
|
readonly new_mnemonic: (a: number, b: number) => number;
|
|
482
509
|
readonly decrypt_wallet: (a: number, b: number, c: number, d: number) => number;
|
|
@@ -498,6 +525,8 @@ export interface InitOutput {
|
|
|
498
525
|
readonly check_payment: (a: number, b: number) => number;
|
|
499
526
|
readonly swap_btc_ln: (a: number, b: number, c: number, d: number) => number;
|
|
500
527
|
readonly swap_ln_btc: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
528
|
+
readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => number;
|
|
529
|
+
readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => number;
|
|
501
530
|
readonly sync_wallets: () => number;
|
|
502
531
|
readonly issue_contract: (a: number, b: number, c: number) => number;
|
|
503
532
|
readonly reissue_contract: (a: number, b: number, c: number) => number;
|
|
@@ -539,6 +568,11 @@ export interface InitOutput {
|
|
|
539
568
|
readonly my_bids: (a: number, b: number) => number;
|
|
540
569
|
readonly get_consignment: (a: number, b: number) => number;
|
|
541
570
|
readonly get_media_metadata: (a: number, b: number) => number;
|
|
571
|
+
readonly contract_amount: (a: number, b: number) => number;
|
|
572
|
+
readonly contract_amount_str: (a: number, b: number, c: number) => void;
|
|
573
|
+
readonly contract_amount_parse_str: (a: number, b: number, c: number, d: number) => void;
|
|
574
|
+
readonly contract_amount_parse_value: (a: number, b: number, c: number) => number;
|
|
575
|
+
readonly contract_amount_parse_decimal_value: (a: number, b: number) => number;
|
|
542
576
|
readonly import_consignments: (a: number) => number;
|
|
543
577
|
readonly import_uda_data: (a: number) => number;
|
|
544
578
|
readonly rustsecp256k1zkp_v0_8_0_default_illegal_callback_fn: (a: number, b: number) => void;
|
package/bitmask_core.js
CHANGED
|
@@ -226,6 +226,59 @@ function __wbg_adapter_48(arg0, arg1, arg2) {
|
|
|
226
226
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6d05c64ec984f162(arg0, arg1, addHeapObject(arg2));
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
+
/**
|
|
230
|
+
* @returns {Promise<any>}
|
|
231
|
+
*/
|
|
232
|
+
export function get_network() {
|
|
233
|
+
const ret = wasm.get_network();
|
|
234
|
+
return takeObject(ret);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @param {string} network_str
|
|
239
|
+
* @returns {Promise<any>}
|
|
240
|
+
*/
|
|
241
|
+
export function switch_network(network_str) {
|
|
242
|
+
const ptr0 = passStringToWasm0(network_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
243
|
+
const len0 = WASM_VECTOR_LEN;
|
|
244
|
+
const ret = wasm.switch_network(ptr0, len0);
|
|
245
|
+
return takeObject(ret);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @param {string} key
|
|
250
|
+
* @returns {Promise<any>}
|
|
251
|
+
*/
|
|
252
|
+
export function get_env(key) {
|
|
253
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
254
|
+
const len0 = WASM_VECTOR_LEN;
|
|
255
|
+
const ret = wasm.get_env(ptr0, len0);
|
|
256
|
+
return takeObject(ret);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @param {string} key
|
|
261
|
+
* @param {string} value
|
|
262
|
+
* @returns {Promise<any>}
|
|
263
|
+
*/
|
|
264
|
+
export function set_env(key, value) {
|
|
265
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
266
|
+
const len0 = WASM_VECTOR_LEN;
|
|
267
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
268
|
+
const len1 = WASM_VECTOR_LEN;
|
|
269
|
+
const ret = wasm.set_env(ptr0, len0, ptr1, len1);
|
|
270
|
+
return takeObject(ret);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* @param {number} ms
|
|
275
|
+
* @returns {Promise<any>}
|
|
276
|
+
*/
|
|
277
|
+
export function sleep(ms) {
|
|
278
|
+
const ret = wasm.sleep(ms);
|
|
279
|
+
return takeObject(ret);
|
|
280
|
+
}
|
|
281
|
+
|
|
229
282
|
function passArray8ToWasm0(arg, malloc) {
|
|
230
283
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
231
284
|
getUint8Memory0().set(arg, ptr / 1);
|
|
@@ -381,87 +434,6 @@ export function decode_base64(string) {
|
|
|
381
434
|
}
|
|
382
435
|
}
|
|
383
436
|
|
|
384
|
-
/**
|
|
385
|
-
* @returns {Promise<any>}
|
|
386
|
-
*/
|
|
387
|
-
export function get_network() {
|
|
388
|
-
const ret = wasm.get_network();
|
|
389
|
-
return takeObject(ret);
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* @param {string} network_str
|
|
394
|
-
* @returns {Promise<any>}
|
|
395
|
-
*/
|
|
396
|
-
export function switch_network(network_str) {
|
|
397
|
-
const ptr0 = passStringToWasm0(network_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
398
|
-
const len0 = WASM_VECTOR_LEN;
|
|
399
|
-
const ret = wasm.switch_network(ptr0, len0);
|
|
400
|
-
return takeObject(ret);
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
/**
|
|
404
|
-
* @param {string} key
|
|
405
|
-
* @returns {Promise<any>}
|
|
406
|
-
*/
|
|
407
|
-
export function get_env(key) {
|
|
408
|
-
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
409
|
-
const len0 = WASM_VECTOR_LEN;
|
|
410
|
-
const ret = wasm.get_env(ptr0, len0);
|
|
411
|
-
return takeObject(ret);
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* @param {string} key
|
|
416
|
-
* @param {string} value
|
|
417
|
-
* @returns {Promise<any>}
|
|
418
|
-
*/
|
|
419
|
-
export function set_env(key, value) {
|
|
420
|
-
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
421
|
-
const len0 = WASM_VECTOR_LEN;
|
|
422
|
-
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
423
|
-
const len1 = WASM_VECTOR_LEN;
|
|
424
|
-
const ret = wasm.set_env(ptr0, len0, ptr1, len1);
|
|
425
|
-
return takeObject(ret);
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* @param {number} ms
|
|
430
|
-
* @returns {Promise<any>}
|
|
431
|
-
*/
|
|
432
|
-
export function sleep(ms) {
|
|
433
|
-
const ret = wasm.sleep(ms);
|
|
434
|
-
return takeObject(ret);
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
* @param {string} pubkey
|
|
439
|
-
* @param {string} token
|
|
440
|
-
* @returns {Promise<any>}
|
|
441
|
-
*/
|
|
442
|
-
export function new_nostr_pubkey(pubkey, token) {
|
|
443
|
-
const ptr0 = passStringToWasm0(pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
444
|
-
const len0 = WASM_VECTOR_LEN;
|
|
445
|
-
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
446
|
-
const len1 = WASM_VECTOR_LEN;
|
|
447
|
-
const ret = wasm.new_nostr_pubkey(ptr0, len0, ptr1, len1);
|
|
448
|
-
return takeObject(ret);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* @param {string} pubkey
|
|
453
|
-
* @param {string} token
|
|
454
|
-
* @returns {Promise<any>}
|
|
455
|
-
*/
|
|
456
|
-
export function update_nostr_pubkey(pubkey, token) {
|
|
457
|
-
const ptr0 = passStringToWasm0(pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
458
|
-
const len0 = WASM_VECTOR_LEN;
|
|
459
|
-
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
460
|
-
const len1 = WASM_VECTOR_LEN;
|
|
461
|
-
const ret = wasm.update_nostr_pubkey(ptr0, len0, ptr1, len1);
|
|
462
|
-
return takeObject(ret);
|
|
463
|
-
}
|
|
464
|
-
|
|
465
437
|
/**
|
|
466
438
|
* @param {string} password
|
|
467
439
|
* @returns {string}
|
|
@@ -785,6 +757,34 @@ export function swap_ln_btc(address, amount, token) {
|
|
|
785
757
|
return takeObject(ret);
|
|
786
758
|
}
|
|
787
759
|
|
|
760
|
+
/**
|
|
761
|
+
* @param {string} pubkey
|
|
762
|
+
* @param {string} token
|
|
763
|
+
* @returns {Promise<any>}
|
|
764
|
+
*/
|
|
765
|
+
export function new_nostr_pubkey(pubkey, token) {
|
|
766
|
+
const ptr0 = passStringToWasm0(pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
767
|
+
const len0 = WASM_VECTOR_LEN;
|
|
768
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
769
|
+
const len1 = WASM_VECTOR_LEN;
|
|
770
|
+
const ret = wasm.new_nostr_pubkey(ptr0, len0, ptr1, len1);
|
|
771
|
+
return takeObject(ret);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* @param {string} pubkey
|
|
776
|
+
* @param {string} token
|
|
777
|
+
* @returns {Promise<any>}
|
|
778
|
+
*/
|
|
779
|
+
export function update_nostr_pubkey(pubkey, token) {
|
|
780
|
+
const ptr0 = passStringToWasm0(pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
781
|
+
const len0 = WASM_VECTOR_LEN;
|
|
782
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
783
|
+
const len1 = WASM_VECTOR_LEN;
|
|
784
|
+
const ret = wasm.update_nostr_pubkey(ptr0, len0, ptr1, len1);
|
|
785
|
+
return takeObject(ret);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
788
|
/**
|
|
789
789
|
* @param {string} nostr_hex_sk
|
|
790
790
|
* @param {any} request
|
|
@@ -1306,6 +1306,85 @@ export function import_uda_data(request) {
|
|
|
1306
1306
|
return takeObject(ret);
|
|
1307
1307
|
}
|
|
1308
1308
|
|
|
1309
|
+
/**
|
|
1310
|
+
* @param {bigint} amount
|
|
1311
|
+
* @param {number} precision
|
|
1312
|
+
* @returns {bigint}
|
|
1313
|
+
*/
|
|
1314
|
+
export function contract_amount(amount, precision) {
|
|
1315
|
+
const ret = wasm.contract_amount(amount, precision);
|
|
1316
|
+
return BigInt.asUintN(64, ret);
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
/**
|
|
1320
|
+
* @param {bigint} amount
|
|
1321
|
+
* @param {number} precision
|
|
1322
|
+
* @returns {string}
|
|
1323
|
+
*/
|
|
1324
|
+
export function contract_amount_str(amount, precision) {
|
|
1325
|
+
let deferred1_0;
|
|
1326
|
+
let deferred1_1;
|
|
1327
|
+
try {
|
|
1328
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1329
|
+
wasm.contract_amount_str(retptr, amount, precision);
|
|
1330
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1331
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1332
|
+
deferred1_0 = r0;
|
|
1333
|
+
deferred1_1 = r1;
|
|
1334
|
+
return getStringFromWasm0(r0, r1);
|
|
1335
|
+
} finally {
|
|
1336
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1337
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* @param {string} amount
|
|
1343
|
+
* @param {number} precision
|
|
1344
|
+
* @returns {string}
|
|
1345
|
+
*/
|
|
1346
|
+
export function contract_amount_parse_str(amount, precision) {
|
|
1347
|
+
let deferred2_0;
|
|
1348
|
+
let deferred2_1;
|
|
1349
|
+
try {
|
|
1350
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1351
|
+
const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1352
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1353
|
+
wasm.contract_amount_parse_str(retptr, ptr0, len0, precision);
|
|
1354
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1355
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1356
|
+
deferred2_0 = r0;
|
|
1357
|
+
deferred2_1 = r1;
|
|
1358
|
+
return getStringFromWasm0(r0, r1);
|
|
1359
|
+
} finally {
|
|
1360
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1361
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* @param {string} amount
|
|
1367
|
+
* @param {number} precision
|
|
1368
|
+
* @returns {bigint}
|
|
1369
|
+
*/
|
|
1370
|
+
export function contract_amount_parse_value(amount, precision) {
|
|
1371
|
+
const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1372
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1373
|
+
const ret = wasm.contract_amount_parse_value(ptr0, len0, precision);
|
|
1374
|
+
return BigInt.asUintN(64, ret);
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
* @param {string} amount
|
|
1379
|
+
* @returns {bigint}
|
|
1380
|
+
*/
|
|
1381
|
+
export function contract_amount_parse_decimal_value(amount) {
|
|
1382
|
+
const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1383
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1384
|
+
const ret = wasm.contract_amount_parse_decimal_value(ptr0, len0);
|
|
1385
|
+
return BigInt.asUintN(64, ret);
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1309
1388
|
let cachedUint32Memory0 = null;
|
|
1310
1389
|
|
|
1311
1390
|
function getUint32Memory0() {
|
|
@@ -1333,7 +1412,7 @@ function handleError(f, args) {
|
|
|
1333
1412
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
1334
1413
|
}
|
|
1335
1414
|
}
|
|
1336
|
-
function
|
|
1415
|
+
function __wbg_adapter_278(arg0, arg1, arg2, arg3) {
|
|
1337
1416
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h3e5581f88d899d55(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1338
1417
|
}
|
|
1339
1418
|
|
|
@@ -1378,14 +1457,6 @@ function __wbg_get_imports() {
|
|
|
1378
1457
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1379
1458
|
return addHeapObject(ret);
|
|
1380
1459
|
};
|
|
1381
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
1382
|
-
const obj = getObject(arg1);
|
|
1383
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1384
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1385
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1386
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1387
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1388
|
-
};
|
|
1389
1460
|
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
1390
1461
|
const ret = arg0;
|
|
1391
1462
|
return addHeapObject(ret);
|
|
@@ -1394,10 +1465,27 @@ function __wbg_get_imports() {
|
|
|
1394
1465
|
const ret = getObject(arg0);
|
|
1395
1466
|
return addHeapObject(ret);
|
|
1396
1467
|
};
|
|
1468
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
1469
|
+
const obj = getObject(arg1);
|
|
1470
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1471
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1472
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1473
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1474
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1475
|
+
};
|
|
1397
1476
|
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
1398
1477
|
const ret = getObject(arg0) === undefined;
|
|
1399
1478
|
return ret;
|
|
1400
1479
|
};
|
|
1480
|
+
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
1481
|
+
const obj = takeObject(arg0).original;
|
|
1482
|
+
if (obj.cnt-- == 1) {
|
|
1483
|
+
obj.a = 0;
|
|
1484
|
+
return true;
|
|
1485
|
+
}
|
|
1486
|
+
const ret = false;
|
|
1487
|
+
return ret;
|
|
1488
|
+
};
|
|
1401
1489
|
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
1402
1490
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1403
1491
|
return addHeapObject(ret);
|
|
@@ -1414,6 +1502,11 @@ function __wbg_get_imports() {
|
|
|
1414
1502
|
const ret = getObject(arg0) === getObject(arg1);
|
|
1415
1503
|
return ret;
|
|
1416
1504
|
};
|
|
1505
|
+
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
1506
|
+
const v = getObject(arg0);
|
|
1507
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
1508
|
+
return ret;
|
|
1509
|
+
};
|
|
1417
1510
|
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
1418
1511
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
1419
1512
|
return ret;
|
|
@@ -1427,11 +1520,6 @@ function __wbg_get_imports() {
|
|
|
1427
1520
|
const ret = getObject(arg0) in getObject(arg1);
|
|
1428
1521
|
return ret;
|
|
1429
1522
|
};
|
|
1430
|
-
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
1431
|
-
const v = getObject(arg0);
|
|
1432
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
1433
|
-
return ret;
|
|
1434
|
-
};
|
|
1435
1523
|
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
1436
1524
|
const obj = getObject(arg1);
|
|
1437
1525
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
@@ -1442,15 +1530,6 @@ function __wbg_get_imports() {
|
|
|
1442
1530
|
const ret = BigInt.asUintN(64, arg0);
|
|
1443
1531
|
return addHeapObject(ret);
|
|
1444
1532
|
};
|
|
1445
|
-
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
1446
|
-
const obj = takeObject(arg0).original;
|
|
1447
|
-
if (obj.cnt-- == 1) {
|
|
1448
|
-
obj.a = 0;
|
|
1449
|
-
return true;
|
|
1450
|
-
}
|
|
1451
|
-
const ret = false;
|
|
1452
|
-
return ret;
|
|
1453
|
-
};
|
|
1454
1533
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
1455
1534
|
const ret = new Error();
|
|
1456
1535
|
return addHeapObject(ret);
|
|
@@ -1826,7 +1905,7 @@ function __wbg_get_imports() {
|
|
|
1826
1905
|
const a = state0.a;
|
|
1827
1906
|
state0.a = 0;
|
|
1828
1907
|
try {
|
|
1829
|
-
return
|
|
1908
|
+
return __wbg_adapter_278(a, state0.b, arg0, arg1);
|
|
1830
1909
|
} finally {
|
|
1831
1910
|
state0.a = a;
|
|
1832
1911
|
}
|
|
@@ -1926,7 +2005,7 @@ function __wbg_get_imports() {
|
|
|
1926
2005
|
const ret = wasm.memory;
|
|
1927
2006
|
return addHeapObject(ret);
|
|
1928
2007
|
};
|
|
1929
|
-
imports.wbg.
|
|
2008
|
+
imports.wbg.__wbindgen_closure_wrapper14351 = function(arg0, arg1, arg2) {
|
|
1930
2009
|
const ret = makeMutClosure(arg0, arg1, 3409, __wbg_adapter_48);
|
|
1931
2010
|
return addHeapObject(ret);
|
|
1932
2011
|
};
|
package/bitmask_core_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export function switch_network(a: number, b: number): number;
|
|
5
|
+
export function get_env(a: number, b: number): number;
|
|
6
|
+
export function set_env(a: number, b: number, c: number, d: number): number;
|
|
7
|
+
export function sleep(a: number): number;
|
|
8
|
+
export function get_network(): number;
|
|
4
9
|
export function store(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): number;
|
|
5
10
|
export function retrieve(a: number, b: number, c: number, d: number): number;
|
|
6
11
|
export function retrieve_metadata(a: number, b: number, c: number, d: number): number;
|
|
@@ -8,13 +13,6 @@ export function encode_hex(a: number, b: number, c: number): void;
|
|
|
8
13
|
export function encode_base64(a: number, b: number, c: number): void;
|
|
9
14
|
export function decode_hex(a: number, b: number, c: number): void;
|
|
10
15
|
export function decode_base64(a: number, b: number, c: number): void;
|
|
11
|
-
export function switch_network(a: number, b: number): number;
|
|
12
|
-
export function get_env(a: number, b: number): number;
|
|
13
|
-
export function set_env(a: number, b: number, c: number, d: number): number;
|
|
14
|
-
export function sleep(a: number): number;
|
|
15
|
-
export function get_network(): number;
|
|
16
|
-
export function new_nostr_pubkey(a: number, b: number, c: number, d: number): number;
|
|
17
|
-
export function update_nostr_pubkey(a: number, b: number, c: number, d: number): number;
|
|
18
16
|
export function hash_password(a: number, b: number, c: number): void;
|
|
19
17
|
export function new_mnemonic(a: number, b: number): number;
|
|
20
18
|
export function decrypt_wallet(a: number, b: number, c: number, d: number): number;
|
|
@@ -36,6 +34,8 @@ export function pay_invoice(a: number, b: number, c: number, d: number): number;
|
|
|
36
34
|
export function check_payment(a: number, b: number): number;
|
|
37
35
|
export function swap_btc_ln(a: number, b: number, c: number, d: number): number;
|
|
38
36
|
export function swap_ln_btc(a: number, b: number, c: number, d: number, e: number): number;
|
|
37
|
+
export function new_nostr_pubkey(a: number, b: number, c: number, d: number): number;
|
|
38
|
+
export function update_nostr_pubkey(a: number, b: number, c: number, d: number): number;
|
|
39
39
|
export function sync_wallets(): number;
|
|
40
40
|
export function issue_contract(a: number, b: number, c: number): number;
|
|
41
41
|
export function reissue_contract(a: number, b: number, c: number): number;
|
|
@@ -77,6 +77,11 @@ export function my_offers(a: number, b: number): number;
|
|
|
77
77
|
export function my_bids(a: number, b: number): number;
|
|
78
78
|
export function get_consignment(a: number, b: number): number;
|
|
79
79
|
export function get_media_metadata(a: number, b: number): number;
|
|
80
|
+
export function contract_amount(a: number, b: number): number;
|
|
81
|
+
export function contract_amount_str(a: number, b: number, c: number): void;
|
|
82
|
+
export function contract_amount_parse_str(a: number, b: number, c: number, d: number): void;
|
|
83
|
+
export function contract_amount_parse_value(a: number, b: number, c: number): number;
|
|
84
|
+
export function contract_amount_parse_decimal_value(a: number, b: number): number;
|
|
80
85
|
export function import_consignments(a: number): number;
|
|
81
86
|
export function import_uda_data(a: number): number;
|
|
82
87
|
export function rustsecp256k1zkp_v0_8_0_default_illegal_callback_fn(a: number, b: number): void;
|
package/constants.js
CHANGED
|
@@ -111,7 +111,7 @@ const init = (networkOverride) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
111
111
|
console.warn("Could not reach carbonado", carbonado, e);
|
|
112
112
|
}
|
|
113
113
|
try {
|
|
114
|
-
yield fetch(`${bitmask}/status`);
|
|
114
|
+
yield fetch(`${bitmask}/carbonado/status`);
|
|
115
115
|
exports.BITMASK = true;
|
|
116
116
|
console.debug(`${bitmask}/status successfully reached`);
|
|
117
117
|
}
|
package/constants.ts
CHANGED
|
@@ -88,7 +88,7 @@ export const init = async (networkOverride?: string) => {
|
|
|
88
88
|
console.warn("Could not reach carbonado", carbonado, e);
|
|
89
89
|
}
|
|
90
90
|
try {
|
|
91
|
-
await fetch(`${bitmask}/status`);
|
|
91
|
+
await fetch(`${bitmask}/carbonado/status`);
|
|
92
92
|
BITMASK = true;
|
|
93
93
|
console.debug(`${bitmask}/status successfully reached`);
|
|
94
94
|
} catch (e) {
|