bitmask-core 1.0.0-beta.2 → 1.0.0-beta.3
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/bitmask_core.d.ts +92 -92
- package/bitmask_core.js +602 -603
- package/bitmask_core_bg.wasm +0 -0
- package/bitmask_core_bg.wasm.d.ts +48 -48
- package/package.json +1 -11
- package/rgb.d.ts +7 -4
- package/rgb.d.ts.map +1 -1
- package/rgb.ts +9 -5
- package/bp.d.ts +0 -28
- package/bp.d.ts.map +0 -1
- package/bp.js +0 -51
- package/bp.ts +0 -72
- package/wallet.d.ts +0 -9
- package/wallet.d.ts.map +0 -1
- package/wallet.js +0 -51
- package/wallet.ts +0 -46
package/bitmask_core.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export function create_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
4
|
+
export function recover_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
5
|
+
export function destroy_watcher(nostr_hex_sk: string): Promise<any>;
|
|
6
|
+
export function destroy_recover_watcher(nostr_hex_sk: string): Promise<any>;
|
|
7
|
+
export function check_watcher(nostr_hex_sk: string): Promise<any>;
|
|
8
|
+
export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
|
|
9
|
+
export function watcher_next_utxo(nostr_hex_sk: string, request: string): Promise<any>;
|
|
10
|
+
export function watcher_unspent_utxos(nostr_hex_sk: string, request: string): Promise<any>;
|
|
3
11
|
export function store(secret_key: string, name: string, data: Uint8Array, force: boolean, metadata?: Uint8Array | null): Promise<any>;
|
|
4
12
|
export function retrieve(secret_key: string, name: string): Promise<any>;
|
|
5
13
|
export function retrieve_metadata(secret_key: string, name: string): Promise<any>;
|
|
@@ -7,42 +15,6 @@ export function encode_hex(bytes: Uint8Array): string;
|
|
|
7
15
|
export function encode_base64(bytes: Uint8Array): string;
|
|
8
16
|
export function decode_hex(string: string): Uint8Array;
|
|
9
17
|
export function decode_base64(string: string): Uint8Array;
|
|
10
|
-
export function get_network(): Promise<any>;
|
|
11
|
-
export function switch_network(network_str: string): Promise<any>;
|
|
12
|
-
export function get_env(key: string): Promise<any>;
|
|
13
|
-
export function set_env(key: string, value: string): Promise<any>;
|
|
14
|
-
export function sleep(ms: number): Promise<any>;
|
|
15
|
-
export function create_wallet(username: string, password: string): Promise<any>;
|
|
16
|
-
export function auth(username: string, password: string): Promise<any>;
|
|
17
|
-
export function ln_create_invoice(description: string, amount: number, token: string): Promise<any>;
|
|
18
|
-
export function get_balance(token: string): Promise<any>;
|
|
19
|
-
export function get_txs(token: string): Promise<any>;
|
|
20
|
-
export function pay_invoice(payment_request: string, token: string): Promise<any>;
|
|
21
|
-
export function check_payment(payment_hash: string): Promise<any>;
|
|
22
|
-
export function swap_btc_ln(token: string, ln_address?: string | null): Promise<any>;
|
|
23
|
-
export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
|
|
24
|
-
export function hash_password(password: string): string;
|
|
25
|
-
export function new_mnemonic(password: string): Promise<any>;
|
|
26
|
-
export function save_mnemonic(seed: string, password: string): Promise<any>;
|
|
27
|
-
export function decrypt_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
28
|
-
export function upgrade_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
29
|
-
export function new_wallet(hash: string, seed_password: string): Promise<any>;
|
|
30
|
-
export function encrypt_wallet(mnemonic: string, hash: string, seed_password: string): Promise<any>;
|
|
31
|
-
export function get_wallet_data(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
32
|
-
export function sync_wallets(): Promise<any>;
|
|
33
|
-
export function get_new_address(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
34
|
-
export function send_sats(descriptor: string, change_descriptor: string, destination: string, amount: bigint, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
35
|
-
export function fund_vault(descriptor: string, change_descriptor: string, rgb_address: string, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
36
|
-
export function get_assets_vault(rgb_descriptor_xpub: string): Promise<any>;
|
|
37
|
-
export function drain_wallet(destination: string, descriptor: string, change_descriptor?: string | null, fee_rate?: number | null): Promise<any>;
|
|
38
|
-
export function bump_fee(txid: string, fee_rate: number, descriptor: string, change_descriptor: string | null | undefined, broadcast: boolean): Promise<any>;
|
|
39
|
-
export function psbt_sign_and_publish_file(request: any): Promise<any>;
|
|
40
|
-
export function psbt_publish_file(request: any): Promise<any>;
|
|
41
|
-
export function convert_contract_amount_raw(decimal: string, precision: number): string;
|
|
42
|
-
export function convert_contract_amount_string(amount: bigint, precision: number): string;
|
|
43
|
-
export function parse_contract_amount(amount: string): any;
|
|
44
|
-
export function parse_contract_amount_precision(amount: string, precision: number): string;
|
|
45
|
-
export function version(): any;
|
|
46
18
|
export function fund_rgb_vault(sk: string, fee_rate: number, secrets: any, broadcast: boolean, fund_value: bigint | null | undefined, onetime_fee: boolean): Promise<any>;
|
|
47
19
|
export function transfer_sats(sk: string, address: string, sats: bigint, fee_rate: number, secrets: any): Promise<any>;
|
|
48
20
|
export function get_btc_wallet(sk: string): Promise<any>;
|
|
@@ -84,21 +56,57 @@ export function create_airdrop_claim(nostr_hex_sk: string, request: any): Promis
|
|
|
84
56
|
export function close_airdrop(nostr_hex_sk: string, request: any): Promise<any>;
|
|
85
57
|
export function backup_rgb_data(nostr_hex_sk: string): Promise<any>;
|
|
86
58
|
export function restore_rgb_data(nostr_hex_sk: string): Promise<any>;
|
|
87
|
-
export function
|
|
88
|
-
export function
|
|
89
|
-
export function
|
|
90
|
-
export function
|
|
91
|
-
export function
|
|
92
|
-
export function
|
|
93
|
-
export function
|
|
94
|
-
export function
|
|
59
|
+
export function convert_contract_amount_raw(decimal: string, precision: number): string;
|
|
60
|
+
export function convert_contract_amount_string(amount: bigint, precision: number): string;
|
|
61
|
+
export function parse_contract_amount(amount: string): any;
|
|
62
|
+
export function parse_contract_amount_precision(amount: string, precision: number): string;
|
|
63
|
+
export function version(): any;
|
|
64
|
+
export function hash_password(password: string): string;
|
|
65
|
+
export function new_mnemonic(password: string): Promise<any>;
|
|
66
|
+
export function save_mnemonic(seed: string, password: string): Promise<any>;
|
|
67
|
+
export function decrypt_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
68
|
+
export function upgrade_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
69
|
+
export function new_wallet(hash: string, seed_password: string): Promise<any>;
|
|
70
|
+
export function encrypt_wallet(mnemonic: string, hash: string, seed_password: string): Promise<any>;
|
|
71
|
+
export function get_wallet_data(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
72
|
+
export function sync_wallets(): Promise<any>;
|
|
73
|
+
export function get_new_address(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
74
|
+
export function send_sats(descriptor: string, change_descriptor: string, destination: string, amount: bigint, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
75
|
+
export function fund_vault(descriptor: string, change_descriptor: string, rgb_address: string, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
76
|
+
export function get_assets_vault(rgb_descriptor_xpub: string): Promise<any>;
|
|
77
|
+
export function drain_wallet(destination: string, descriptor: string, change_descriptor?: string | null, fee_rate?: number | null): Promise<any>;
|
|
78
|
+
export function bump_fee(txid: string, fee_rate: number, descriptor: string, change_descriptor: string | null | undefined, broadcast: boolean): Promise<any>;
|
|
79
|
+
export function psbt_sign_and_publish_file(request: any): Promise<any>;
|
|
80
|
+
export function psbt_publish_file(request: any): Promise<any>;
|
|
81
|
+
export function create_wallet(username: string, password: string): Promise<any>;
|
|
82
|
+
export function auth(username: string, password: string): Promise<any>;
|
|
83
|
+
export function ln_create_invoice(description: string, amount: number, token: string): Promise<any>;
|
|
84
|
+
export function get_balance(token: string): Promise<any>;
|
|
85
|
+
export function get_txs(token: string): Promise<any>;
|
|
86
|
+
export function pay_invoice(payment_request: string, token: string): Promise<any>;
|
|
87
|
+
export function check_payment(payment_hash: string): Promise<any>;
|
|
88
|
+
export function swap_btc_ln(token: string, ln_address?: string | null): Promise<any>;
|
|
89
|
+
export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
|
|
95
90
|
export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
96
91
|
export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
92
|
+
export function get_network(): Promise<any>;
|
|
93
|
+
export function switch_network(network_str: string): Promise<any>;
|
|
94
|
+
export function get_env(key: string): Promise<any>;
|
|
95
|
+
export function set_env(key: string, value: string): Promise<any>;
|
|
96
|
+
export function sleep(ms: number): 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 create_watcher: (a: number, b: number, c: any) => any;
|
|
103
|
+
readonly recover_watcher: (a: number, b: number, c: any) => any;
|
|
104
|
+
readonly destroy_watcher: (a: number, b: number) => any;
|
|
105
|
+
readonly destroy_recover_watcher: (a: number, b: number) => any;
|
|
106
|
+
readonly check_watcher: (a: number, b: number) => any;
|
|
107
|
+
readonly watcher_next_address: (a: number, b: number, c: number, d: number) => any;
|
|
108
|
+
readonly watcher_next_utxo: (a: number, b: number, c: number, d: number) => any;
|
|
109
|
+
readonly watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => any;
|
|
102
110
|
readonly store: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
103
111
|
readonly retrieve: (a: number, b: number, c: number, d: number) => any;
|
|
104
112
|
readonly retrieve_metadata: (a: number, b: number, c: number, d: number) => any;
|
|
@@ -106,42 +114,6 @@ export interface InitOutput {
|
|
|
106
114
|
readonly encode_base64: (a: number, b: number) => [number, number];
|
|
107
115
|
readonly decode_hex: (a: number, b: number) => [number, number, number, number];
|
|
108
116
|
readonly decode_base64: (a: number, b: number) => [number, number, number, number];
|
|
109
|
-
readonly switch_network: (a: number, b: number) => any;
|
|
110
|
-
readonly get_env: (a: number, b: number) => any;
|
|
111
|
-
readonly set_env: (a: number, b: number, c: number, d: number) => any;
|
|
112
|
-
readonly sleep: (a: number) => any;
|
|
113
|
-
readonly create_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
114
|
-
readonly auth: (a: number, b: number, c: number, d: number) => any;
|
|
115
|
-
readonly ln_create_invoice: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
116
|
-
readonly get_balance: (a: number, b: number) => any;
|
|
117
|
-
readonly get_txs: (a: number, b: number) => any;
|
|
118
|
-
readonly pay_invoice: (a: number, b: number, c: number, d: number) => any;
|
|
119
|
-
readonly check_payment: (a: number, b: number) => any;
|
|
120
|
-
readonly swap_btc_ln: (a: number, b: number, c: number, d: number) => any;
|
|
121
|
-
readonly swap_ln_btc: (a: number, b: number, c: bigint, d: number, e: number) => any;
|
|
122
|
-
readonly get_network: () => any;
|
|
123
|
-
readonly hash_password: (a: number, b: number) => [number, number];
|
|
124
|
-
readonly new_mnemonic: (a: number, b: number) => any;
|
|
125
|
-
readonly save_mnemonic: (a: number, b: number, c: number, d: number) => any;
|
|
126
|
-
readonly decrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
127
|
-
readonly upgrade_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
128
|
-
readonly new_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
129
|
-
readonly encrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
130
|
-
readonly get_wallet_data: (a: number, b: number, c: number, d: number) => any;
|
|
131
|
-
readonly get_new_address: (a: number, b: number, c: number, d: number) => any;
|
|
132
|
-
readonly send_sats: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number) => any;
|
|
133
|
-
readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
134
|
-
readonly get_assets_vault: (a: number, b: number) => any;
|
|
135
|
-
readonly drain_wallet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
136
|
-
readonly bump_fee: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
137
|
-
readonly convert_contract_amount_raw: (a: number, b: number, c: number) => [number, number];
|
|
138
|
-
readonly convert_contract_amount_string: (a: bigint, b: number) => [number, number];
|
|
139
|
-
readonly parse_contract_amount: (a: number, b: number) => any;
|
|
140
|
-
readonly parse_contract_amount_precision: (a: number, b: number, c: number) => [number, number];
|
|
141
|
-
readonly version: () => any;
|
|
142
|
-
readonly psbt_sign_and_publish_file: (a: any) => any;
|
|
143
|
-
readonly psbt_publish_file: (a: any) => any;
|
|
144
|
-
readonly sync_wallets: () => any;
|
|
145
117
|
readonly fund_rgb_vault: (a: number, b: number, c: number, d: any, e: number, f: number, g: bigint, h: number) => any;
|
|
146
118
|
readonly transfer_sats: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: any) => any;
|
|
147
119
|
readonly get_btc_wallet: (a: number, b: number) => any;
|
|
@@ -183,16 +155,44 @@ export interface InitOutput {
|
|
|
183
155
|
readonly close_airdrop: (a: number, b: number, c: any) => any;
|
|
184
156
|
readonly backup_rgb_data: (a: number, b: number) => any;
|
|
185
157
|
readonly restore_rgb_data: (a: number, b: number) => any;
|
|
186
|
-
readonly
|
|
187
|
-
readonly
|
|
188
|
-
readonly
|
|
189
|
-
readonly
|
|
190
|
-
readonly
|
|
191
|
-
readonly
|
|
192
|
-
readonly
|
|
193
|
-
readonly
|
|
158
|
+
readonly convert_contract_amount_raw: (a: number, b: number, c: number) => [number, number];
|
|
159
|
+
readonly convert_contract_amount_string: (a: bigint, b: number) => [number, number];
|
|
160
|
+
readonly parse_contract_amount: (a: number, b: number) => any;
|
|
161
|
+
readonly parse_contract_amount_precision: (a: number, b: number, c: number) => [number, number];
|
|
162
|
+
readonly version: () => any;
|
|
163
|
+
readonly hash_password: (a: number, b: number) => [number, number];
|
|
164
|
+
readonly new_mnemonic: (a: number, b: number) => any;
|
|
165
|
+
readonly save_mnemonic: (a: number, b: number, c: number, d: number) => any;
|
|
166
|
+
readonly decrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
167
|
+
readonly upgrade_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
168
|
+
readonly new_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
169
|
+
readonly encrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
170
|
+
readonly get_wallet_data: (a: number, b: number, c: number, d: number) => any;
|
|
171
|
+
readonly get_new_address: (a: number, b: number, c: number, d: number) => any;
|
|
172
|
+
readonly send_sats: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number) => any;
|
|
173
|
+
readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
174
|
+
readonly get_assets_vault: (a: number, b: number) => any;
|
|
175
|
+
readonly drain_wallet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
176
|
+
readonly bump_fee: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: 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;
|
|
194
186
|
readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
195
187
|
readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
188
|
+
readonly psbt_sign_and_publish_file: (a: any) => any;
|
|
189
|
+
readonly psbt_publish_file: (a: any) => any;
|
|
190
|
+
readonly sync_wallets: () => any;
|
|
191
|
+
readonly switch_network: (a: number, b: number) => any;
|
|
192
|
+
readonly get_env: (a: number, b: number) => any;
|
|
193
|
+
readonly set_env: (a: number, b: number, c: number, d: number) => any;
|
|
194
|
+
readonly sleep: (a: number) => any;
|
|
195
|
+
readonly get_network: () => 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,10 +218,10 @@ 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
|
|
221
|
+
readonly closure1298_externref_shim: (a: number, b: number, c: any) => void;
|
|
222
|
+
readonly closure1925_externref_shim: (a: number, b: number, c: any) => void;
|
|
223
|
+
readonly closure3787_externref_shim: (a: number, b: number, c: any) => void;
|
|
224
|
+
readonly closure4081_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
225
225
|
readonly __wbindgen_start: () => void;
|
|
226
226
|
}
|
|
227
227
|
|