bitmask-core 0.7.0-beta.3 → 0.7.0-beta.4
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.js +2 -2
- package/bitcoin.ts +0 -6
- package/bitmask_core.d.ts +4 -6
- package/bitmask_core.js +14 -20
- package/bitmask_core_bg.js +1827 -0
- package/bitmask_core_bg.wasm +0 -0
- package/package.json +1 -1
package/bitcoin.js
CHANGED
|
@@ -62,8 +62,8 @@ const drainWallet = (destination, descriptor, changeDescriptor, feeRate) => __aw
|
|
|
62
62
|
return JSON.parse(yield BMC.drain_wallet(destination, descriptor, changeDescriptor, feeRate));
|
|
63
63
|
});
|
|
64
64
|
exports.drainWallet = drainWallet;
|
|
65
|
-
const fundVault = (descriptor, changeDescriptor, assetAddress1,
|
|
66
|
-
return JSON.parse(yield BMC.fund_vault(descriptor, changeDescriptor, assetAddress1,
|
|
65
|
+
const fundVault = (descriptor, changeDescriptor, assetAddress1, udaAddress1, feeRate) => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
|
+
return JSON.parse(yield BMC.fund_vault(descriptor, changeDescriptor, assetAddress1, udaAddress1, feeRate));
|
|
67
67
|
});
|
|
68
68
|
exports.fundVault = fundVault;
|
|
69
69
|
const getAssetsVault = (rgbAssetsDescriptorXpub, rgbUdasDescriptorXpub) => __awaiter(void 0, void 0, void 0, function* () {
|
package/bitcoin.ts
CHANGED
|
@@ -71,9 +71,7 @@ export const fundVault = async (
|
|
|
71
71
|
descriptor: string,
|
|
72
72
|
changeDescriptor: string,
|
|
73
73
|
assetAddress1: string,
|
|
74
|
-
assetAddress2: string,
|
|
75
74
|
udaAddress1: string,
|
|
76
|
-
udaAddress2: string,
|
|
77
75
|
feeRate: number
|
|
78
76
|
): Promise<FundVaultDetails> =>
|
|
79
77
|
JSON.parse(
|
|
@@ -81,9 +79,7 @@ export const fundVault = async (
|
|
|
81
79
|
descriptor,
|
|
82
80
|
changeDescriptor,
|
|
83
81
|
assetAddress1,
|
|
84
|
-
assetAddress2,
|
|
85
82
|
udaAddress1,
|
|
86
|
-
udaAddress2,
|
|
87
83
|
feeRate
|
|
88
84
|
)
|
|
89
85
|
);
|
|
@@ -207,7 +203,5 @@ export interface WalletData {
|
|
|
207
203
|
|
|
208
204
|
export interface FundVaultDetails {
|
|
209
205
|
assetsOutput?: string;
|
|
210
|
-
assetsChangeOutput?: string;
|
|
211
206
|
udasOutput?: string;
|
|
212
|
-
udasChangeOutput?: string;
|
|
213
207
|
}
|
package/bitmask_core.d.ts
CHANGED
|
@@ -98,13 +98,11 @@ export function drain_wallet(destination: string, descriptor: string, change_des
|
|
|
98
98
|
* @param {string} descriptor
|
|
99
99
|
* @param {string} change_descriptor
|
|
100
100
|
* @param {string} asset_address_1
|
|
101
|
-
* @param {string} asset_address_2
|
|
102
101
|
* @param {string} uda_address_1
|
|
103
|
-
* @param {string} uda_address_2
|
|
104
102
|
* @param {number | undefined} fee_rate
|
|
105
103
|
* @returns {Promise<any>}
|
|
106
104
|
*/
|
|
107
|
-
export function fund_vault(descriptor: string, change_descriptor: string, asset_address_1: string,
|
|
105
|
+
export function fund_vault(descriptor: string, change_descriptor: string, asset_address_1: string, uda_address_1: string, fee_rate?: number): Promise<any>;
|
|
108
106
|
/**
|
|
109
107
|
* @param {string} rgb_assets_descriptor_xpub
|
|
110
108
|
* @param {string} rgb_udas_descriptor_xpub
|
|
@@ -479,7 +477,7 @@ export interface InitOutput {
|
|
|
479
477
|
readonly get_new_address: (a: number, b: number, c: number, d: number) => number;
|
|
480
478
|
readonly send_sats: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
481
479
|
readonly drain_wallet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
482
|
-
readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number
|
|
480
|
+
readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
|
|
483
481
|
readonly get_assets_vault: (a: number, b: number, c: number, d: number) => number;
|
|
484
482
|
readonly create_wallet: (a: number, b: number, c: number, d: number) => number;
|
|
485
483
|
readonly auth: (a: number, b: number, c: number, d: number) => number;
|
|
@@ -539,10 +537,10 @@ export interface InitOutput {
|
|
|
539
537
|
readonly my_bids: (a: number, b: number) => number;
|
|
540
538
|
readonly get_consignment: (a: number, b: number) => number;
|
|
541
539
|
readonly get_media: (a: number, b: number) => number;
|
|
542
|
-
readonly import_consignments: (a: number) => number;
|
|
543
|
-
readonly import_media: (a: number) => number;
|
|
544
540
|
readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => number;
|
|
545
541
|
readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => number;
|
|
542
|
+
readonly import_consignments: (a: number) => number;
|
|
543
|
+
readonly import_media: (a: number) => number;
|
|
546
544
|
readonly rustsecp256k1zkp_v0_8_0_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
547
545
|
readonly rustsecp256k1zkp_v0_8_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
548
546
|
readonly rustsecp256k1_v0_8_1_context_create: (a: number) => number;
|
package/bitmask_core.js
CHANGED
|
@@ -452,26 +452,20 @@ export function drain_wallet(destination, descriptor, change_descriptor, fee_rat
|
|
|
452
452
|
* @param {string} descriptor
|
|
453
453
|
* @param {string} change_descriptor
|
|
454
454
|
* @param {string} asset_address_1
|
|
455
|
-
* @param {string} asset_address_2
|
|
456
455
|
* @param {string} uda_address_1
|
|
457
|
-
* @param {string} uda_address_2
|
|
458
456
|
* @param {number | undefined} fee_rate
|
|
459
457
|
* @returns {Promise<any>}
|
|
460
458
|
*/
|
|
461
|
-
export function fund_vault(descriptor, change_descriptor, asset_address_1,
|
|
459
|
+
export function fund_vault(descriptor, change_descriptor, asset_address_1, uda_address_1, fee_rate) {
|
|
462
460
|
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
463
461
|
const len0 = WASM_VECTOR_LEN;
|
|
464
462
|
const ptr1 = passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
465
463
|
const len1 = WASM_VECTOR_LEN;
|
|
466
464
|
const ptr2 = passStringToWasm0(asset_address_1, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
467
465
|
const len2 = WASM_VECTOR_LEN;
|
|
468
|
-
const ptr3 = passStringToWasm0(
|
|
466
|
+
const ptr3 = passStringToWasm0(uda_address_1, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
469
467
|
const len3 = WASM_VECTOR_LEN;
|
|
470
|
-
const
|
|
471
|
-
const len4 = WASM_VECTOR_LEN;
|
|
472
|
-
const ptr5 = passStringToWasm0(uda_address_2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
473
|
-
const len5 = WASM_VECTOR_LEN;
|
|
474
|
-
const ret = wasm.fund_vault(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, !isLikeNone(fee_rate), isLikeNone(fee_rate) ? 0 : fee_rate);
|
|
468
|
+
const ret = wasm.fund_vault(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, !isLikeNone(fee_rate), isLikeNone(fee_rate) ? 0 : fee_rate);
|
|
475
469
|
return takeObject(ret);
|
|
476
470
|
}
|
|
477
471
|
|
|
@@ -1404,6 +1398,15 @@ function __wbg_get_imports() {
|
|
|
1404
1398
|
const ret = getObject(arg0) === undefined;
|
|
1405
1399
|
return ret;
|
|
1406
1400
|
};
|
|
1401
|
+
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
1402
|
+
const obj = takeObject(arg0).original;
|
|
1403
|
+
if (obj.cnt-- == 1) {
|
|
1404
|
+
obj.a = 0;
|
|
1405
|
+
return true;
|
|
1406
|
+
}
|
|
1407
|
+
const ret = false;
|
|
1408
|
+
return ret;
|
|
1409
|
+
};
|
|
1407
1410
|
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
1408
1411
|
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
1409
1412
|
return ret;
|
|
@@ -1448,15 +1451,6 @@ function __wbg_get_imports() {
|
|
|
1448
1451
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1449
1452
|
return addHeapObject(ret);
|
|
1450
1453
|
};
|
|
1451
|
-
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
1452
|
-
const obj = takeObject(arg0).original;
|
|
1453
|
-
if (obj.cnt-- == 1) {
|
|
1454
|
-
obj.a = 0;
|
|
1455
|
-
return true;
|
|
1456
|
-
}
|
|
1457
|
-
const ret = false;
|
|
1458
|
-
return ret;
|
|
1459
|
-
};
|
|
1460
1454
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
1461
1455
|
const ret = new Error();
|
|
1462
1456
|
return addHeapObject(ret);
|
|
@@ -1932,8 +1926,8 @@ function __wbg_get_imports() {
|
|
|
1932
1926
|
const ret = wasm.memory;
|
|
1933
1927
|
return addHeapObject(ret);
|
|
1934
1928
|
};
|
|
1935
|
-
imports.wbg.
|
|
1936
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1929
|
+
imports.wbg.__wbindgen_closure_wrapper14389 = function(arg0, arg1, arg2) {
|
|
1930
|
+
const ret = makeMutClosure(arg0, arg1, 3416, __wbg_adapter_48);
|
|
1937
1931
|
return addHeapObject(ret);
|
|
1938
1932
|
};
|
|
1939
1933
|
|