bitmask-core 1.0.0-beta.8 → 1.0.1-beta
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 +0 -11
- package/bitcoin.js +33 -27
- package/bitmask_core.d.ts +100 -100
- package/bitmask_core.js +637 -622
- package/bitmask_core_bg.js +1495 -1535
- package/bitmask_core_bg.wasm +0 -0
- package/bitmask_core_bg.wasm.d.ts +53 -53
- package/bp.d.ts +1 -1
- package/bp.js +19 -9
- package/carbonado.js +17 -7
- package/constants.d.ts +8 -3
- package/constants.js +42 -15
- package/index.js +17 -7
- package/lightning.js +17 -7
- package/nostr.js +17 -7
- package/package.json +47 -107
- package/rgb.d.ts +1 -1
- package/rgb.js +17 -7
- package/wallet.js +17 -7
- package/bitcoin.d.ts.map +0 -1
- package/bitcoin.ts +0 -332
- package/bp.d.ts.map +0 -1
- package/bp.ts +0 -72
- package/carbonado.d.ts.map +0 -1
- package/carbonado.ts +0 -34
- package/constants.d.ts.map +0 -1
- package/constants.ts +0 -112
- package/index.d.ts.map +0 -1
- package/index.ts +0 -33
- package/lightning.d.ts.map +0 -1
- package/lightning.ts +0 -165
- package/nostr.d.ts.map +0 -1
- package/nostr.ts +0 -19
- package/rgb.d.ts.map +0 -1
- package/rgb.ts +0 -710
- package/wallet.d.ts.map +0 -1
- package/wallet.ts +0 -46
package/bitcoin.d.ts
CHANGED
|
@@ -115,19 +115,8 @@ export interface FundVaultDetails {
|
|
|
115
115
|
fundTxid?: string;
|
|
116
116
|
fundFee?: number;
|
|
117
117
|
}
|
|
118
|
-
/**
|
|
119
|
-
* Fetch current fee estimates (sat/vB) from the configured Esplora endpoint.
|
|
120
|
-
* Esplora returns a JSON object keyed by confirmation target (e.g., "1","2","3","6",...)
|
|
121
|
-
* with floating-point sat/vB values.
|
|
122
|
-
* Example:
|
|
123
|
-
* { "1": 9.2, "2": 7.8, "3": 6.5, "6": 3.1, "144": 1.01 }
|
|
124
|
-
*/
|
|
125
118
|
export type FeeEstimates = Record<string, number>;
|
|
126
119
|
export declare function fetchFeeEstimates(): Promise<FeeEstimates>;
|
|
127
|
-
/**
|
|
128
|
-
* Compute absolute fee in sats from a sat/vB rate and an estimated vsize.
|
|
129
|
-
* Always ceil so we don't underpay policy minimums.
|
|
130
|
-
*/
|
|
131
120
|
export declare function feeFromRate(vbytes: number, satPerVb: number): number;
|
|
132
121
|
/**
|
|
133
122
|
* Rough vbytes guesser for swap/bid PSBTs when you don't yet know exact inputs/outputs.
|
package/bitcoin.js
CHANGED
|
@@ -17,13 +17,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
17
17
|
}) : function(o, v) {
|
|
18
18
|
o["default"] = v;
|
|
19
19
|
});
|
|
20
|
-
var __importStar = (this && this.__importStar) || function (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
20
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
21
|
+
var ownKeys = function(o) {
|
|
22
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
23
|
+
var ar = [];
|
|
24
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
25
|
+
return ar;
|
|
26
|
+
};
|
|
27
|
+
return ownKeys(o);
|
|
28
|
+
};
|
|
29
|
+
return function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
27
37
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
28
38
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29
39
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -34,16 +44,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
44
|
});
|
|
35
45
|
};
|
|
36
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.
|
|
47
|
+
exports.bumpFee = exports.drainWallet = exports.getAssetsVault = exports.fundVault = exports.sendSats = exports.getNewAddress = exports.getWalletData = exports.encryptWallet = exports.newWallet = exports.syncWallets = exports.upgradeWallet = exports.decryptWallet = exports.hashPassword = void 0;
|
|
48
|
+
exports.fetchFeeEstimates = fetchFeeEstimates;
|
|
49
|
+
exports.feeFromRate = feeFromRate;
|
|
50
|
+
exports.guessSwapVbytes = guessSwapVbytes;
|
|
51
|
+
exports.quoteSwapFeeSats = quoteSwapFeeSats;
|
|
38
52
|
const BMC = __importStar(require("./bitmask_core"));
|
|
39
53
|
const constants_1 = require("./constants");
|
|
40
|
-
const hashPassword = (password) =>
|
|
54
|
+
const hashPassword = (password) => {
|
|
55
|
+
if (typeof BMC.hash_password !== 'function') {
|
|
56
|
+
throw new Error('WASM module not initialized: hash_password not available');
|
|
57
|
+
}
|
|
58
|
+
return BMC.hash_password(password);
|
|
59
|
+
};
|
|
41
60
|
exports.hashPassword = hashPassword;
|
|
42
|
-
const decryptWallet = (
|
|
61
|
+
const decryptWallet = (hash_1, encryptedDescriptors_1, ...args_1) => __awaiter(void 0, [hash_1, encryptedDescriptors_1, ...args_1], void 0, function* (hash, encryptedDescriptors, seedPassword = "") {
|
|
43
62
|
return JSON.parse(yield BMC.decrypt_wallet(hash, encryptedDescriptors, seedPassword));
|
|
44
63
|
});
|
|
45
64
|
exports.decryptWallet = decryptWallet;
|
|
46
|
-
const upgradeWallet = (
|
|
65
|
+
const upgradeWallet = (hash_1, encryptedDescriptors_1, ...args_1) => __awaiter(void 0, [hash_1, encryptedDescriptors_1, ...args_1], void 0, function* (hash, encryptedDescriptors, seedPassword = "") {
|
|
47
66
|
return JSON.parse(yield BMC.upgrade_wallet(hash, encryptedDescriptors, seedPassword));
|
|
48
67
|
});
|
|
49
68
|
exports.upgradeWallet = upgradeWallet;
|
|
@@ -78,11 +97,6 @@ exports.bumpFee = bumpFee;
|
|
|
78
97
|
function fetchFeeEstimates() {
|
|
79
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
80
99
|
const net = yield (0, constants_1.getNetwork)();
|
|
81
|
-
// Map exact network to explicit env key as requested
|
|
82
|
-
// bitcoin -> BITCOIN_EXPLORER_API_MAINNET
|
|
83
|
-
// testnet -> BITCOIN_EXPLORER_API_TESTNET
|
|
84
|
-
// signet -> BITCOIN_EXPLORER_API_SIGNET
|
|
85
|
-
// regtest -> BITCOIN_EXPLORER_API_REGTEST
|
|
86
100
|
let envKey;
|
|
87
101
|
switch (net) {
|
|
88
102
|
case "bitcoin":
|
|
@@ -98,8 +112,8 @@ function fetchFeeEstimates() {
|
|
|
98
112
|
envKey = "BITCOIN_EXPLORER_API_REGTEST";
|
|
99
113
|
break;
|
|
100
114
|
default:
|
|
101
|
-
// Fallback to
|
|
102
|
-
envKey = "
|
|
115
|
+
// Fallback to signet if unknown string is returned
|
|
116
|
+
envKey = "BITCOIN_EXPLORER_API_SIGNET";
|
|
103
117
|
break;
|
|
104
118
|
}
|
|
105
119
|
const base = yield (0, constants_1.getEnv)(envKey);
|
|
@@ -116,15 +130,9 @@ function fetchFeeEstimates() {
|
|
|
116
130
|
return (yield resp.json());
|
|
117
131
|
});
|
|
118
132
|
}
|
|
119
|
-
exports.fetchFeeEstimates = fetchFeeEstimates;
|
|
120
|
-
/**
|
|
121
|
-
* Compute absolute fee in sats from a sat/vB rate and an estimated vsize.
|
|
122
|
-
* Always ceil so we don't underpay policy minimums.
|
|
123
|
-
*/
|
|
124
133
|
function feeFromRate(vbytes, satPerVb) {
|
|
125
134
|
return Math.ceil(vbytes * satPerVb);
|
|
126
135
|
}
|
|
127
|
-
exports.feeFromRate = feeFromRate;
|
|
128
136
|
/**
|
|
129
137
|
* Rough vbytes guesser for swap/bid PSBTs when you don't yet know exact inputs/outputs.
|
|
130
138
|
* Prefer passing a conservative bound to avoid underpaying relays:
|
|
@@ -143,7 +151,6 @@ function guessSwapVbytes(inputs = 2, outputs = 3, taprootHeavy = true) {
|
|
|
143
151
|
const est = inputs * perIn + outputs * perOut + overhead;
|
|
144
152
|
return Math.max(est, 300);
|
|
145
153
|
}
|
|
146
|
-
exports.guessSwapVbytes = guessSwapVbytes;
|
|
147
154
|
/**
|
|
148
155
|
* Convenience: get a safe absolute fee quote for a swap given a target confirmation bucket.
|
|
149
156
|
* - bucket can be "1","2","3","6","144", etc., matching Esplora keys.
|
|
@@ -151,8 +158,8 @@ exports.guessSwapVbytes = guessSwapVbytes;
|
|
|
151
158
|
* - Adds a small 10% safety margin on the feerate to reduce min-relay rejections.
|
|
152
159
|
*/
|
|
153
160
|
function quoteSwapFeeSats(bucket, vbytesEstimate) {
|
|
154
|
-
var _a, _b;
|
|
155
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
var _a, _b;
|
|
156
163
|
const estimates = yield fetchFeeEstimates();
|
|
157
164
|
const satPerVb = (_b = (_a = estimates[bucket]) !== null && _a !== void 0 ? _a : estimates["6"]) !== null && _b !== void 0 ? _b : 1.0;
|
|
158
165
|
const paddedRate = Math.max(1.0, satPerVb * 1.1); // 10% headroom
|
|
@@ -160,4 +167,3 @@ function quoteSwapFeeSats(bucket, vbytesEstimate) {
|
|
|
160
167
|
return { rate: paddedRate, fee };
|
|
161
168
|
});
|
|
162
169
|
}
|
|
163
|
-
exports.quoteSwapFeeSats = quoteSwapFeeSats;
|
package/bitmask_core.d.ts
CHANGED
|
@@ -1,46 +1,21 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function hash_password(password: string): string;
|
|
4
|
-
export function new_mnemonic(password: string): Promise<any>;
|
|
5
|
-
export function save_mnemonic(seed: string, password: string): Promise<any>;
|
|
6
|
-
export function decrypt_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
7
|
-
export function upgrade_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
8
|
-
export function new_wallet(hash: string, seed_password: string): Promise<any>;
|
|
9
|
-
export function encrypt_wallet(mnemonic: string, hash: string, seed_password: string): Promise<any>;
|
|
10
|
-
export function get_wallet_data(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
11
|
-
export function sync_wallets(): Promise<any>;
|
|
12
|
-
export function get_new_address(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
13
|
-
export function send_sats(descriptor: string, change_descriptor: string, destination: string, amount: bigint, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
14
|
-
export function fund_vault(descriptor: string, change_descriptor: string, rgb_address: string, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
15
|
-
export function get_assets_vault(rgb_descriptor_xpub: string): Promise<any>;
|
|
16
|
-
export function drain_wallet(destination: string, descriptor: string, change_descriptor?: string | null, fee_rate?: number | null): Promise<any>;
|
|
17
|
-
export function bump_fee(txid: string, fee_rate: number, descriptor: string, change_descriptor: string | null | undefined, broadcast: boolean): Promise<any>;
|
|
18
|
-
export function psbt_sign_and_publish_file(request: any): Promise<any>;
|
|
19
|
-
export function psbt_publish_file(request: any): Promise<any>;
|
|
20
|
-
export function convert_contract_amount_raw(decimal: string, precision: number): string;
|
|
21
|
-
export function convert_contract_amount_string(amount: bigint, precision: number): string;
|
|
22
|
-
export function parse_contract_amount(amount: string): any;
|
|
23
|
-
export function parse_contract_amount_precision(amount: string, precision: number): string;
|
|
24
|
-
export function version(): any;
|
|
25
3
|
export function get_network(): Promise<any>;
|
|
26
4
|
export function switch_network(network_str: string): Promise<any>;
|
|
27
5
|
export function get_env(key: string): Promise<any>;
|
|
28
6
|
export function set_env(key: string, value: string): Promise<any>;
|
|
29
7
|
export function sleep(ms: number): Promise<any>;
|
|
30
|
-
export function
|
|
31
|
-
export function
|
|
32
|
-
export function
|
|
33
|
-
export function
|
|
34
|
-
export function
|
|
35
|
-
export function
|
|
36
|
-
export function
|
|
37
|
-
export function
|
|
38
|
-
export function
|
|
39
|
-
export function
|
|
40
|
-
export function
|
|
41
|
-
export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
|
|
42
|
-
export function watcher_next_utxo(nostr_hex_sk: string, request: string): Promise<any>;
|
|
43
|
-
export function watcher_unspent_utxos(nostr_hex_sk: string, request: string): Promise<any>;
|
|
8
|
+
export function create_wallet(username: string, password: string): Promise<any>;
|
|
9
|
+
export function auth(username: string, password: string): Promise<any>;
|
|
10
|
+
export function ln_create_invoice(description: string, amount: number, token: string): Promise<any>;
|
|
11
|
+
export function get_balance(token: string): Promise<any>;
|
|
12
|
+
export function get_txs(token: string): Promise<any>;
|
|
13
|
+
export function pay_invoice(payment_request: string, token: string): Promise<any>;
|
|
14
|
+
export function check_payment(payment_hash: string): Promise<any>;
|
|
15
|
+
export function swap_btc_ln(token: string, ln_address?: string | null): Promise<any>;
|
|
16
|
+
export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
|
|
17
|
+
export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
18
|
+
export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
44
19
|
export function get_rgb_version(): string;
|
|
45
20
|
export function get_rgb_wallet(nostr_hex_sk: string): Promise<any>;
|
|
46
21
|
export function get_contract(nostr_hex_sk: string, request: string): Promise<any>;
|
|
@@ -76,15 +51,6 @@ export function create_airdrop_claim(nostr_hex_sk: string, request: any): Promis
|
|
|
76
51
|
export function close_airdrop(nostr_hex_sk: string, request: any): Promise<any>;
|
|
77
52
|
export function backup_rgb_data(nostr_hex_sk: string): Promise<any>;
|
|
78
53
|
export function restore_rgb_data(nostr_hex_sk: string): Promise<any>;
|
|
79
|
-
export function create_wallet(username: string, password: string): Promise<any>;
|
|
80
|
-
export function auth(username: string, password: string): Promise<any>;
|
|
81
|
-
export function ln_create_invoice(description: string, amount: number, token: string): Promise<any>;
|
|
82
|
-
export function get_balance(token: string): Promise<any>;
|
|
83
|
-
export function get_txs(token: string): Promise<any>;
|
|
84
|
-
export function pay_invoice(payment_request: string, token: string): Promise<any>;
|
|
85
|
-
export function check_payment(payment_hash: string): Promise<any>;
|
|
86
|
-
export function swap_btc_ln(token: string, ln_address?: string | null): Promise<any>;
|
|
87
|
-
export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
|
|
88
54
|
export function store(secret_key: string, name: string, data: Uint8Array, force: boolean, metadata?: Uint8Array | null): Promise<any>;
|
|
89
55
|
export function retrieve(secret_key: string, name: string): Promise<any>;
|
|
90
56
|
export function retrieve_metadata(secret_key: string, name: string): Promise<any>;
|
|
@@ -92,53 +58,63 @@ export function encode_hex(bytes: Uint8Array): string;
|
|
|
92
58
|
export function encode_base64(bytes: Uint8Array): string;
|
|
93
59
|
export function decode_hex(string: string): Uint8Array;
|
|
94
60
|
export function decode_base64(string: string): Uint8Array;
|
|
95
|
-
export function
|
|
96
|
-
export function
|
|
61
|
+
export function hash_password(password: string): string;
|
|
62
|
+
export function new_mnemonic(password: string): Promise<any>;
|
|
63
|
+
export function save_mnemonic(seed: string, password: string): Promise<any>;
|
|
64
|
+
export function decrypt_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
65
|
+
export function upgrade_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
66
|
+
export function new_wallet(hash: string, seed_password: string): Promise<any>;
|
|
67
|
+
export function encrypt_wallet(mnemonic: string, hash: string, seed_password: string): Promise<any>;
|
|
68
|
+
export function get_wallet_data(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
69
|
+
export function sync_wallets(): Promise<any>;
|
|
70
|
+
export function get_new_address(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
71
|
+
export function send_sats(descriptor: string, change_descriptor: string, destination: string, amount: bigint, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
72
|
+
export function fund_vault(descriptor: string, change_descriptor: string, rgb_address: string, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
73
|
+
export function get_assets_vault(rgb_descriptor_xpub: string): Promise<any>;
|
|
74
|
+
export function drain_wallet(destination: string, descriptor: string, change_descriptor?: string | null, fee_rate?: number | null): Promise<any>;
|
|
75
|
+
export function bump_fee(txid: string, fee_rate: number, descriptor: string, change_descriptor: string | null | undefined, broadcast: boolean): Promise<any>;
|
|
76
|
+
export function psbt_sign_and_publish_file(request: any): Promise<any>;
|
|
77
|
+
export function psbt_publish_file(request: any): Promise<any>;
|
|
78
|
+
export function fund_rgb_vault(sk: string, fee_rate: number, secrets: any, broadcast: boolean, fund_value: bigint | null | undefined, coordinator_fee: boolean): Promise<any>;
|
|
79
|
+
export function transfer_sats(sk: string, address: string, sats: bigint, fee_rate: number, secrets: any): Promise<any>;
|
|
80
|
+
export function get_btc_wallet(sk: string): Promise<any>;
|
|
81
|
+
export function backup_btc_data(nostr_hex_sk: string): Promise<any>;
|
|
82
|
+
export function recover_funds_from_bad_wallets(seed: string, pass_phrase: string, recover_address: string): Promise<any>;
|
|
83
|
+
export function restore_btc_data(nostr_hex_sk: string): Promise<any>;
|
|
84
|
+
export function convert_contract_amount_raw(decimal: string, precision: number): string;
|
|
85
|
+
export function convert_contract_amount_string(amount: bigint, precision: number): string;
|
|
86
|
+
export function parse_contract_amount(amount: string): any;
|
|
87
|
+
export function parse_contract_amount_precision(amount: string, precision: number): string;
|
|
88
|
+
export function version(): any;
|
|
89
|
+
export function create_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
90
|
+
export function recover_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
91
|
+
export function destroy_watcher(nostr_hex_sk: string): Promise<any>;
|
|
92
|
+
export function destroy_recover_watcher(nostr_hex_sk: string): Promise<any>;
|
|
93
|
+
export function check_watcher(nostr_hex_sk: string): Promise<any>;
|
|
94
|
+
export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
|
|
95
|
+
export function watcher_next_utxo(nostr_hex_sk: string, request: string): Promise<any>;
|
|
96
|
+
export function watcher_unspent_utxos(nostr_hex_sk: string, request: string): Promise<any>;
|
|
97
97
|
|
|
98
98
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
99
99
|
|
|
100
100
|
export interface InitOutput {
|
|
101
101
|
readonly memory: WebAssembly.Memory;
|
|
102
|
-
readonly
|
|
103
|
-
readonly new_mnemonic: (a: number, b: number) => any;
|
|
104
|
-
readonly save_mnemonic: (a: number, b: number, c: number, d: number) => any;
|
|
105
|
-
readonly decrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
106
|
-
readonly upgrade_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
107
|
-
readonly new_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
108
|
-
readonly encrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
109
|
-
readonly get_wallet_data: (a: number, b: number, c: number, d: number) => any;
|
|
110
|
-
readonly get_new_address: (a: number, b: number, c: number, d: number) => any;
|
|
111
|
-
readonly send_sats: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number) => any;
|
|
112
|
-
readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
113
|
-
readonly get_assets_vault: (a: number, b: number) => any;
|
|
114
|
-
readonly drain_wallet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
115
|
-
readonly bump_fee: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
116
|
-
readonly convert_contract_amount_raw: (a: number, b: number, c: number) => [number, number];
|
|
117
|
-
readonly convert_contract_amount_string: (a: bigint, b: number) => [number, number];
|
|
118
|
-
readonly parse_contract_amount: (a: number, b: number) => any;
|
|
119
|
-
readonly parse_contract_amount_precision: (a: number, b: number, c: number) => [number, number];
|
|
120
|
-
readonly version: () => any;
|
|
121
|
-
readonly psbt_sign_and_publish_file: (a: any) => any;
|
|
122
|
-
readonly psbt_publish_file: (a: any) => any;
|
|
123
|
-
readonly sync_wallets: () => any;
|
|
102
|
+
readonly get_network: () => any;
|
|
124
103
|
readonly switch_network: (a: number, b: number) => any;
|
|
125
104
|
readonly get_env: (a: number, b: number) => any;
|
|
126
105
|
readonly set_env: (a: number, b: number, c: number, d: number) => any;
|
|
127
106
|
readonly sleep: (a: number) => any;
|
|
128
|
-
readonly
|
|
129
|
-
readonly
|
|
130
|
-
readonly
|
|
131
|
-
readonly
|
|
132
|
-
readonly
|
|
133
|
-
readonly
|
|
134
|
-
readonly
|
|
135
|
-
readonly
|
|
136
|
-
readonly
|
|
137
|
-
readonly
|
|
138
|
-
readonly
|
|
139
|
-
readonly watcher_next_address: (a: number, b: number, c: number, d: number) => any;
|
|
140
|
-
readonly watcher_next_utxo: (a: number, b: number, c: number, d: number) => any;
|
|
141
|
-
readonly watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => any;
|
|
107
|
+
readonly create_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
108
|
+
readonly auth: (a: number, b: number, c: number, d: number) => any;
|
|
109
|
+
readonly ln_create_invoice: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
110
|
+
readonly get_balance: (a: number, b: number) => any;
|
|
111
|
+
readonly get_txs: (a: number, b: number) => any;
|
|
112
|
+
readonly pay_invoice: (a: number, b: number, c: number, d: number) => any;
|
|
113
|
+
readonly check_payment: (a: number, b: number) => any;
|
|
114
|
+
readonly swap_btc_ln: (a: number, b: number, c: number, d: number) => any;
|
|
115
|
+
readonly swap_ln_btc: (a: number, b: number, c: bigint, d: number, e: number) => any;
|
|
116
|
+
readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
117
|
+
readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
142
118
|
readonly get_rgb_version: () => [number, number];
|
|
143
119
|
readonly get_rgb_wallet: (a: number, b: number) => any;
|
|
144
120
|
readonly get_contract: (a: number, b: number, c: number, d: number) => any;
|
|
@@ -174,15 +150,6 @@ export interface InitOutput {
|
|
|
174
150
|
readonly close_airdrop: (a: number, b: number, c: any) => any;
|
|
175
151
|
readonly backup_rgb_data: (a: number, b: number) => any;
|
|
176
152
|
readonly restore_rgb_data: (a: number, b: number) => any;
|
|
177
|
-
readonly create_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
178
|
-
readonly auth: (a: number, b: number, c: number, d: number) => any;
|
|
179
|
-
readonly ln_create_invoice: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
180
|
-
readonly get_balance: (a: number, b: number) => any;
|
|
181
|
-
readonly get_txs: (a: number, b: number) => any;
|
|
182
|
-
readonly pay_invoice: (a: number, b: number, c: number, d: number) => any;
|
|
183
|
-
readonly check_payment: (a: number, b: number) => any;
|
|
184
|
-
readonly swap_btc_ln: (a: number, b: number, c: number, d: number) => any;
|
|
185
|
-
readonly swap_ln_btc: (a: number, b: number, c: bigint, d: number, e: number) => any;
|
|
186
153
|
readonly store: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
187
154
|
readonly retrieve: (a: number, b: number, c: number, d: number) => any;
|
|
188
155
|
readonly retrieve_metadata: (a: number, b: number, c: number, d: number) => any;
|
|
@@ -190,9 +157,42 @@ export interface InitOutput {
|
|
|
190
157
|
readonly encode_base64: (a: number, b: number) => [number, number];
|
|
191
158
|
readonly decode_hex: (a: number, b: number) => [number, number, number, number];
|
|
192
159
|
readonly decode_base64: (a: number, b: number) => [number, number, number, number];
|
|
193
|
-
readonly
|
|
194
|
-
readonly
|
|
195
|
-
readonly
|
|
160
|
+
readonly hash_password: (a: number, b: number) => [number, number];
|
|
161
|
+
readonly new_mnemonic: (a: number, b: number) => any;
|
|
162
|
+
readonly save_mnemonic: (a: number, b: number, c: number, d: number) => any;
|
|
163
|
+
readonly decrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
164
|
+
readonly upgrade_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
165
|
+
readonly new_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
166
|
+
readonly encrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
167
|
+
readonly get_wallet_data: (a: number, b: number, c: number, d: number) => any;
|
|
168
|
+
readonly sync_wallets: () => any;
|
|
169
|
+
readonly get_new_address: (a: number, b: number, c: number, d: number) => any;
|
|
170
|
+
readonly send_sats: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number) => any;
|
|
171
|
+
readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
172
|
+
readonly get_assets_vault: (a: number, b: number) => any;
|
|
173
|
+
readonly drain_wallet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
174
|
+
readonly bump_fee: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
175
|
+
readonly psbt_sign_and_publish_file: (a: any) => any;
|
|
176
|
+
readonly psbt_publish_file: (a: any) => any;
|
|
177
|
+
readonly fund_rgb_vault: (a: number, b: number, c: number, d: any, e: number, f: number, g: bigint, h: number) => any;
|
|
178
|
+
readonly transfer_sats: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: any) => any;
|
|
179
|
+
readonly get_btc_wallet: (a: number, b: number) => any;
|
|
180
|
+
readonly backup_btc_data: (a: number, b: number) => any;
|
|
181
|
+
readonly recover_funds_from_bad_wallets: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
182
|
+
readonly restore_btc_data: (a: number, b: number) => any;
|
|
183
|
+
readonly convert_contract_amount_raw: (a: number, b: number, c: number) => [number, number];
|
|
184
|
+
readonly convert_contract_amount_string: (a: bigint, b: number) => [number, number];
|
|
185
|
+
readonly parse_contract_amount: (a: number, b: number) => any;
|
|
186
|
+
readonly parse_contract_amount_precision: (a: number, b: number, c: number) => [number, number];
|
|
187
|
+
readonly version: () => any;
|
|
188
|
+
readonly create_watcher: (a: number, b: number, c: any) => any;
|
|
189
|
+
readonly recover_watcher: (a: number, b: number, c: any) => any;
|
|
190
|
+
readonly destroy_watcher: (a: number, b: number) => any;
|
|
191
|
+
readonly destroy_recover_watcher: (a: number, b: number) => any;
|
|
192
|
+
readonly check_watcher: (a: number, b: number) => any;
|
|
193
|
+
readonly watcher_next_address: (a: number, b: number, c: number, d: number) => any;
|
|
194
|
+
readonly watcher_next_utxo: (a: number, b: number, c: number, d: number) => any;
|
|
195
|
+
readonly watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => any;
|
|
196
196
|
readonly rustsecp256k1_v0_9_2_context_create: (a: number) => number;
|
|
197
197
|
readonly rustsecp256k1_v0_9_2_context_destroy: (a: number) => void;
|
|
198
198
|
readonly rustsecp256k1_v0_9_2_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
@@ -218,11 +218,11 @@ export interface InitOutput {
|
|
|
218
218
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
219
219
|
readonly __wbindgen_export_7: WebAssembly.Table;
|
|
220
220
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
221
|
-
readonly
|
|
222
|
-
readonly
|
|
223
|
-
readonly
|
|
224
|
-
readonly
|
|
225
|
-
readonly
|
|
221
|
+
readonly closure1237_externref_shim: (a: number, b: number, c: any) => void;
|
|
222
|
+
readonly closure1999_externref_shim: (a: number, b: number, c: any) => void;
|
|
223
|
+
readonly closure2670_externref_shim: (a: number, b: number, c: any) => void;
|
|
224
|
+
readonly closure3841_externref_shim: (a: number, b: number, c: any) => void;
|
|
225
|
+
readonly closure4133_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
226
226
|
readonly __wbindgen_start: () => void;
|
|
227
227
|
}
|
|
228
228
|
|