bitmask-core 0.7.0-beta.13 → 0.7.0-beta.14

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 CHANGED
@@ -7,16 +7,15 @@ export declare const encryptWallet: (mnemonic: string, hash: string, seedPasswor
7
7
  export declare const getWalletData: (descriptor: string, changeDescriptor?: string) => Promise<WalletData>;
8
8
  export declare const getNewAddress: (descriptor: string, changeDescriptor?: string) => Promise<string>;
9
9
  export declare const sendSats: (descriptor: string, changeDescriptor: string, address: string, amount: bigint, feeRate: number) => Promise<TransactionData>;
10
- export declare const fundVault: (descriptor: string, changeDescriptor: string, assetAddress1: string, udaAddress1: string, feeRate: number) => Promise<FundVaultDetails>;
11
- export declare const getAssetsVault: (rgbAssetsDescriptorXpub: string, rgbUdasDescriptorXpub: string) => Promise<FundVaultDetails>;
10
+ export declare const fundVault: (descriptor: string, changeDescriptor: string, rgbAddress: string, feeRate?: number) => Promise<FundVaultDetails>;
11
+ export declare const getAssetsVault: (rgbDescriptorXpub: string) => Promise<FundVaultDetails>;
12
12
  export declare const drainWallet: (destination: string, descriptor: string, changeDescriptor?: string, feeRate?: number) => Promise<TransactionData>;
13
13
  export declare const bumpFee: (txid: string, feeRate: number, broadcast: boolean, descriptor: string, changeDescriptor?: string) => Promise<TransactionData>;
14
14
  export interface PrivateWalletData {
15
15
  xprvkh: string;
16
16
  btcDescriptorXprv: string;
17
17
  btcChangeDescriptorXprv: string;
18
- rgbAssetsDescriptorXprv: string;
19
- rgbUdasDescriptorXprv: string;
18
+ rgbDescriptorXprv: string;
20
19
  nostrPrv: string;
21
20
  nostrNsec: string;
22
21
  }
@@ -26,8 +25,7 @@ export interface PublicWalletData {
26
25
  watcherXpub: string;
27
26
  btcDescriptorXpub: string;
28
27
  btcChangeDescriptorXpub: string;
29
- rgbAssetsDescriptorXpub: string;
30
- rgbUdasDescriptorXpub: string;
28
+ rgbDescriptorXpub: string;
31
29
  nostrPub: string;
32
30
  nostrNpub: string;
33
31
  }
@@ -114,8 +112,7 @@ export interface WalletData {
114
112
  utxos: string[];
115
113
  }
116
114
  export interface FundVaultDetails {
117
- assetsOutput?: string;
118
- udasOutput?: string;
115
+ rgbOutput?: string;
119
116
  isFunded: boolean;
120
117
  fundTxid: string;
121
118
  }
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,4BAE3B,QAAQ,KAAK,CAGb,CAAC;AAEJ,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,oBACA,MAAM,WACf,MAAM,UACP,MAAM,WACL,MAAM,KACd,QAAQ,eAAe,CAGvB,CAAC;AAEJ,eAAO,MAAM,SAAS,eACR,MAAM,oBACA,MAAM,iBACT,MAAM,eACR,MAAM,WACV,MAAM,KACd,QAAQ,gBAAgB,CASxB,CAAC;AAEJ,eAAO,MAAM,cAAc,4BACA,MAAM,yBACR,MAAM,KAC5B,QAAQ,gBAAgB,CAGxB,CAAC;AAEJ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,CAAC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;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,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
package/bitcoin.js CHANGED
@@ -60,13 +60,11 @@ const sendSats = (descriptor, changeDescriptor, address, amount, feeRate) => __a
60
60
  return JSON.parse(yield BMC.send_sats(descriptor, changeDescriptor, address, amount, feeRate));
61
61
  });
62
62
  exports.sendSats = sendSats;
63
- const fundVault = (descriptor, changeDescriptor, assetAddress1, udaAddress1, feeRate) => __awaiter(void 0, void 0, void 0, function* () {
64
- return JSON.parse(yield BMC.fund_vault(descriptor, changeDescriptor, assetAddress1, udaAddress1, feeRate));
63
+ const fundVault = (descriptor, changeDescriptor, rgbAddress, feeRate) => __awaiter(void 0, void 0, void 0, function* () {
64
+ return JSON.parse(yield BMC.fund_vault(descriptor, changeDescriptor, rgbAddress, feeRate));
65
65
  });
66
66
  exports.fundVault = fundVault;
67
- const getAssetsVault = (rgbAssetsDescriptorXpub, rgbUdasDescriptorXpub) => __awaiter(void 0, void 0, void 0, function* () {
68
- return JSON.parse(yield BMC.get_assets_vault(rgbAssetsDescriptorXpub, rgbUdasDescriptorXpub));
69
- });
67
+ const getAssetsVault = (rgbDescriptorXpub) => __awaiter(void 0, void 0, void 0, function* () { return JSON.parse(yield BMC.get_assets_vault(rgbDescriptorXpub)); });
70
68
  exports.getAssetsVault = getAssetsVault;
71
69
  const drainWallet = (destination, descriptor, changeDescriptor, feeRate) => __awaiter(void 0, void 0, void 0, function* () {
72
70
  return JSON.parse(yield BMC.drain_wallet(destination, descriptor, changeDescriptor, feeRate));
package/bitcoin.ts CHANGED
@@ -63,27 +63,17 @@ export const sendSats = async (
63
63
  export const fundVault = async (
64
64
  descriptor: string,
65
65
  changeDescriptor: string,
66
- assetAddress1: string,
67
- udaAddress1: string,
68
- feeRate: number
66
+ rgbAddress: string,
67
+ feeRate?: number
69
68
  ): Promise<FundVaultDetails> =>
70
69
  JSON.parse(
71
- await BMC.fund_vault(
72
- descriptor,
73
- changeDescriptor,
74
- assetAddress1,
75
- udaAddress1,
76
- feeRate
77
- )
70
+ await BMC.fund_vault(descriptor, changeDescriptor, rgbAddress, feeRate)
78
71
  );
79
72
 
80
73
  export const getAssetsVault = async (
81
- rgbAssetsDescriptorXpub: string,
82
- rgbUdasDescriptorXpub: string
74
+ rgbDescriptorXpub: string
83
75
  ): Promise<FundVaultDetails> =>
84
- JSON.parse(
85
- await BMC.get_assets_vault(rgbAssetsDescriptorXpub, rgbUdasDescriptorXpub)
86
- );
76
+ JSON.parse(await BMC.get_assets_vault(rgbDescriptorXpub));
87
77
 
88
78
  export const drainWallet = async (
89
79
  destination: string,
@@ -113,8 +103,7 @@ export interface PrivateWalletData {
113
103
  xprvkh: string;
114
104
  btcDescriptorXprv: string;
115
105
  btcChangeDescriptorXprv: string;
116
- rgbAssetsDescriptorXprv: string;
117
- rgbUdasDescriptorXprv: string;
106
+ rgbDescriptorXprv: string;
118
107
  nostrPrv: string;
119
108
  nostrNsec: string;
120
109
  }
@@ -125,8 +114,7 @@ export interface PublicWalletData {
125
114
  watcherXpub: string;
126
115
  btcDescriptorXpub: string;
127
116
  btcChangeDescriptorXpub: string;
128
- rgbAssetsDescriptorXpub: string;
129
- rgbUdasDescriptorXpub: string;
117
+ rgbDescriptorXpub: string;
130
118
  nostrPub: string;
131
119
  nostrNpub: string;
132
120
  }
@@ -224,8 +212,7 @@ export interface WalletData {
224
212
  }
225
213
 
226
214
  export interface FundVaultDetails {
227
- assetsOutput?: string;
228
- udasOutput?: string;
215
+ rgbOutput?: string;
229
216
  isFunded: boolean;
230
217
  fundTxid: string;
231
218
  }
package/bitmask_core.d.ts CHANGED
@@ -1,6 +1,18 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
+ * @param {string} pubkey
5
+ * @param {string} token
6
+ * @returns {Promise<any>}
7
+ */
8
+ export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
9
+ /**
10
+ * @param {string} pubkey
11
+ * @param {string} token
12
+ * @returns {Promise<any>}
13
+ */
14
+ export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
15
+ /**
4
16
  * @returns {Promise<any>}
5
17
  */
6
18
  export function get_network(): Promise<any>;
@@ -96,18 +108,16 @@ export function send_sats(descriptor: string, change_descriptor: string, destina
96
108
  /**
97
109
  * @param {string} descriptor
98
110
  * @param {string} change_descriptor
99
- * @param {string} asset_address
100
- * @param {string} uda_address
111
+ * @param {string} rgb_address
101
112
  * @param {number | undefined} [fee_rate]
102
113
  * @returns {Promise<any>}
103
114
  */
104
- export function fund_vault(descriptor: string, change_descriptor: string, asset_address: string, uda_address: string, fee_rate?: number): Promise<any>;
115
+ export function fund_vault(descriptor: string, change_descriptor: string, rgb_address: string, fee_rate?: number): Promise<any>;
105
116
  /**
106
- * @param {string} rgb_assets_descriptor_xpub
107
- * @param {string} rgb_udas_descriptor_xpub
117
+ * @param {string} rgb_descriptor_xpub
108
118
  * @returns {Promise<any>}
109
119
  */
110
- export function get_assets_vault(rgb_assets_descriptor_xpub: string, rgb_udas_descriptor_xpub: string): Promise<any>;
120
+ export function get_assets_vault(rgb_descriptor_xpub: string): Promise<any>;
111
121
  /**
112
122
  * @param {string} destination
113
123
  * @param {string} descriptor
@@ -314,23 +324,13 @@ export function decode_hex(string: string): Uint8Array;
314
324
  * @returns {Uint8Array}
315
325
  */
316
326
  export function decode_base64(string: string): Uint8Array;
317
- /**
318
- * @param {string} pubkey
319
- * @param {string} token
320
- * @returns {Promise<any>}
321
- */
322
- export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
323
- /**
324
- * @param {string} pubkey
325
- * @param {string} token
326
- * @returns {Promise<any>}
327
- */
328
- export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
329
327
 
330
328
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
331
329
 
332
330
  export interface InitOutput {
333
331
  readonly memory: WebAssembly.Memory;
332
+ readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => number;
333
+ readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => number;
334
334
  readonly get_network: () => number;
335
335
  readonly switch_network: (a: number, b: number) => number;
336
336
  readonly get_env: (a: number, b: number) => number;
@@ -347,8 +347,8 @@ export interface InitOutput {
347
347
  readonly sync_wallets: () => number;
348
348
  readonly get_new_address: (a: number, b: number, c: number, d: number) => number;
349
349
  readonly send_sats: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
350
- readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
351
- readonly get_assets_vault: (a: number, b: number, c: number, d: number) => number;
350
+ readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
351
+ readonly get_assets_vault: (a: number, b: number) => number;
352
352
  readonly drain_wallet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
353
353
  readonly bump_fee: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
354
354
  readonly list_contracts: (a: number, b: number, c: number) => number;
@@ -383,8 +383,6 @@ export interface InitOutput {
383
383
  readonly encode_base64: (a: number, b: number, c: number) => void;
384
384
  readonly decode_hex: (a: number, b: number, c: number) => void;
385
385
  readonly decode_base64: (a: number, b: number, c: number) => void;
386
- readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => number;
387
- readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => number;
388
386
  readonly rustsecp256k1zkp_v0_8_0_default_illegal_callback_fn: (a: number, b: number) => void;
389
387
  readonly rustsecp256k1zkp_v0_8_0_default_error_callback_fn: (a: number, b: number) => void;
390
388
  readonly rustsecp256k1_v0_9_2_context_create: (a: number) => number;
package/bitmask_core.js CHANGED
@@ -97,15 +97,6 @@ function takeObject(idx) {
97
97
  return ret;
98
98
  }
99
99
 
100
- let cachedFloat64Memory0 = null;
101
-
102
- function getFloat64Memory0() {
103
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
104
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
105
- }
106
- return cachedFloat64Memory0;
107
- }
108
-
109
100
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
110
101
 
111
102
  if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
@@ -124,6 +115,15 @@ function addHeapObject(obj) {
124
115
  return idx;
125
116
  }
126
117
 
118
+ let cachedFloat64Memory0 = null;
119
+
120
+ function getFloat64Memory0() {
121
+ if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
122
+ cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
123
+ }
124
+ return cachedFloat64Memory0;
125
+ }
126
+
127
127
  let cachedBigInt64Memory0 = null;
128
128
 
129
129
  function getBigInt64Memory0() {
@@ -226,6 +226,34 @@ function __wbg_adapter_50(arg0, arg1, arg2) {
226
226
  wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd2916c78a3f765d4(arg0, arg1, addHeapObject(arg2));
227
227
  }
228
228
 
229
+ /**
230
+ * @param {string} pubkey
231
+ * @param {string} token
232
+ * @returns {Promise<any>}
233
+ */
234
+ export function new_nostr_pubkey(pubkey, token) {
235
+ const ptr0 = passStringToWasm0(pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
236
+ const len0 = WASM_VECTOR_LEN;
237
+ const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
238
+ const len1 = WASM_VECTOR_LEN;
239
+ const ret = wasm.new_nostr_pubkey(ptr0, len0, ptr1, len1);
240
+ return takeObject(ret);
241
+ }
242
+
243
+ /**
244
+ * @param {string} pubkey
245
+ * @param {string} token
246
+ * @returns {Promise<any>}
247
+ */
248
+ export function update_nostr_pubkey(pubkey, token) {
249
+ const ptr0 = passStringToWasm0(pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
250
+ const len0 = WASM_VECTOR_LEN;
251
+ const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
252
+ const len1 = WASM_VECTOR_LEN;
253
+ const ret = wasm.update_nostr_pubkey(ptr0, len0, ptr1, len1);
254
+ return takeObject(ret);
255
+ }
256
+
229
257
  /**
230
258
  * @returns {Promise<any>}
231
259
  */
@@ -450,35 +478,29 @@ export function send_sats(descriptor, change_descriptor, destination, amount, fe
450
478
  /**
451
479
  * @param {string} descriptor
452
480
  * @param {string} change_descriptor
453
- * @param {string} asset_address
454
- * @param {string} uda_address
481
+ * @param {string} rgb_address
455
482
  * @param {number | undefined} [fee_rate]
456
483
  * @returns {Promise<any>}
457
484
  */
458
- export function fund_vault(descriptor, change_descriptor, asset_address, uda_address, fee_rate) {
485
+ export function fund_vault(descriptor, change_descriptor, rgb_address, fee_rate) {
459
486
  const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
460
487
  const len0 = WASM_VECTOR_LEN;
461
488
  const ptr1 = passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
462
489
  const len1 = WASM_VECTOR_LEN;
463
- const ptr2 = passStringToWasm0(asset_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
490
+ const ptr2 = passStringToWasm0(rgb_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
464
491
  const len2 = WASM_VECTOR_LEN;
465
- const ptr3 = passStringToWasm0(uda_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
466
- const len3 = WASM_VECTOR_LEN;
467
- const ret = wasm.fund_vault(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, !isLikeNone(fee_rate), isLikeNone(fee_rate) ? 0 : fee_rate);
492
+ const ret = wasm.fund_vault(ptr0, len0, ptr1, len1, ptr2, len2, !isLikeNone(fee_rate), isLikeNone(fee_rate) ? 0 : fee_rate);
468
493
  return takeObject(ret);
469
494
  }
470
495
 
471
496
  /**
472
- * @param {string} rgb_assets_descriptor_xpub
473
- * @param {string} rgb_udas_descriptor_xpub
497
+ * @param {string} rgb_descriptor_xpub
474
498
  * @returns {Promise<any>}
475
499
  */
476
- export function get_assets_vault(rgb_assets_descriptor_xpub, rgb_udas_descriptor_xpub) {
477
- const ptr0 = passStringToWasm0(rgb_assets_descriptor_xpub, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
500
+ export function get_assets_vault(rgb_descriptor_xpub) {
501
+ const ptr0 = passStringToWasm0(rgb_descriptor_xpub, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
478
502
  const len0 = WASM_VECTOR_LEN;
479
- const ptr1 = passStringToWasm0(rgb_udas_descriptor_xpub, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
480
- const len1 = WASM_VECTOR_LEN;
481
- const ret = wasm.get_assets_vault(ptr0, len0, ptr1, len1);
503
+ const ret = wasm.get_assets_vault(ptr0, len0);
482
504
  return takeObject(ret);
483
505
  }
484
506
 
@@ -992,34 +1014,6 @@ export function decode_base64(string) {
992
1014
  }
993
1015
  }
994
1016
 
995
- /**
996
- * @param {string} pubkey
997
- * @param {string} token
998
- * @returns {Promise<any>}
999
- */
1000
- export function new_nostr_pubkey(pubkey, token) {
1001
- const ptr0 = passStringToWasm0(pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1002
- const len0 = WASM_VECTOR_LEN;
1003
- const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1004
- const len1 = WASM_VECTOR_LEN;
1005
- const ret = wasm.new_nostr_pubkey(ptr0, len0, ptr1, len1);
1006
- return takeObject(ret);
1007
- }
1008
-
1009
- /**
1010
- * @param {string} pubkey
1011
- * @param {string} token
1012
- * @returns {Promise<any>}
1013
- */
1014
- export function update_nostr_pubkey(pubkey, token) {
1015
- const ptr0 = passStringToWasm0(pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1016
- const len0 = WASM_VECTOR_LEN;
1017
- const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1018
- const len1 = WASM_VECTOR_LEN;
1019
- const ret = wasm.update_nostr_pubkey(ptr0, len0, ptr1, len1);
1020
- return takeObject(ret);
1021
- }
1022
-
1023
1017
  let cachedUint32Memory0 = null;
1024
1018
 
1025
1019
  function getUint32Memory0() {
@@ -1096,9 +1090,20 @@ function __wbg_get_imports() {
1096
1090
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
1097
1091
  takeObject(arg0);
1098
1092
  };
1099
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
1100
- const v = getObject(arg0);
1101
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
1093
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
1094
+ const ret = getStringFromWasm0(arg0, arg1);
1095
+ return addHeapObject(ret);
1096
+ };
1097
+ imports.wbg.__wbindgen_number_new = function(arg0) {
1098
+ const ret = arg0;
1099
+ return addHeapObject(ret);
1100
+ };
1101
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1102
+ const ret = getObject(arg0);
1103
+ return addHeapObject(ret);
1104
+ };
1105
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
1106
+ const ret = getObject(arg0) === undefined;
1102
1107
  return ret;
1103
1108
  };
1104
1109
  imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
@@ -1120,9 +1125,10 @@ function __wbg_get_imports() {
1120
1125
  const ret = false;
1121
1126
  return ret;
1122
1127
  };
1123
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
1124
- const ret = getStringFromWasm0(arg0, arg1);
1125
- return addHeapObject(ret);
1128
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
1129
+ const v = getObject(arg0);
1130
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
1131
+ return ret;
1126
1132
  };
1127
1133
  imports.wbg.__wbindgen_is_string = function(arg0) {
1128
1134
  const ret = typeof(getObject(arg0)) === 'string';
@@ -1145,10 +1151,6 @@ function __wbg_get_imports() {
1145
1151
  const ret = typeof(val) === 'object' && val !== null;
1146
1152
  return ret;
1147
1153
  };
1148
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
1149
- const ret = getObject(arg0) === undefined;
1150
- return ret;
1151
- };
1152
1154
  imports.wbg.__wbindgen_in = function(arg0, arg1) {
1153
1155
  const ret = getObject(arg0) in getObject(arg1);
1154
1156
  return ret;
@@ -1157,14 +1159,6 @@ function __wbg_get_imports() {
1157
1159
  const ret = BigInt.asUintN(64, arg0);
1158
1160
  return addHeapObject(ret);
1159
1161
  };
1160
- imports.wbg.__wbindgen_number_new = function(arg0) {
1161
- const ret = arg0;
1162
- return addHeapObject(ret);
1163
- };
1164
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1165
- const ret = getObject(arg0);
1166
- return addHeapObject(ret);
1167
- };
1168
1162
  imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
1169
1163
  const ret = new Error();
1170
1164
  return addHeapObject(ret);
@@ -1651,7 +1645,7 @@ function __wbg_get_imports() {
1651
1645
  const ret = wasm.memory;
1652
1646
  return addHeapObject(ret);
1653
1647
  };
1654
- imports.wbg.__wbindgen_closure_wrapper14837 = function(arg0, arg1, arg2) {
1648
+ imports.wbg.__wbindgen_closure_wrapper14831 = function(arg0, arg1, arg2) {
1655
1649
  const ret = makeMutClosure(arg0, arg1, 3752, __wbg_adapter_50);
1656
1650
  return addHeapObject(ret);
1657
1651
  };
Binary file
@@ -1,6 +1,8 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export function new_nostr_pubkey(a: number, b: number, c: number, d: number): number;
5
+ export function update_nostr_pubkey(a: number, b: number, c: number, d: number): number;
4
6
  export function get_network(): number;
5
7
  export function switch_network(a: number, b: number): number;
6
8
  export function get_env(a: number, b: number): number;
@@ -17,8 +19,8 @@ export function get_wallet_data(a: number, b: number, c: number, d: number): num
17
19
  export function sync_wallets(): number;
18
20
  export function get_new_address(a: number, b: number, c: number, d: number): number;
19
21
  export function send_sats(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): number;
20
- export function fund_vault(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number): number;
21
- export function get_assets_vault(a: number, b: number, c: number, d: number): number;
22
+ export function fund_vault(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
23
+ export function get_assets_vault(a: number, b: number): number;
22
24
  export function drain_wallet(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
23
25
  export function bump_fee(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
24
26
  export function list_contracts(a: number, b: number, c: number): number;
@@ -53,8 +55,6 @@ export function encode_hex(a: number, b: number, c: number): void;
53
55
  export function encode_base64(a: number, b: number, c: number): void;
54
56
  export function decode_hex(a: number, b: number, c: number): void;
55
57
  export function decode_base64(a: number, b: number, c: number): void;
56
- export function new_nostr_pubkey(a: number, b: number, c: number, d: number): number;
57
- export function update_nostr_pubkey(a: number, b: number, c: number, d: number): number;
58
58
  export function rustsecp256k1zkp_v0_8_0_default_illegal_callback_fn(a: number, b: number): void;
59
59
  export function rustsecp256k1zkp_v0_8_0_default_error_callback_fn(a: number, b: number): void;
60
60
  export function rustsecp256k1_v0_9_2_context_create(a: number): number;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "Armando Dutra <armando@diba.io>"
8
8
  ],
9
9
  "description": "Core functionality for the BitMask wallet",
10
- "version": "0.7.0-beta.13",
10
+ "version": "0.7.0-beta.14",
11
11
  "license": "MIT",
12
12
  "repository": {
13
13
  "type": "git",