bitmask-core 1.0.0-beta.9 → 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.js +31 -16
- package/bitmask_core.d.ts +79 -79
- package/bitmask_core.js +445 -441
- package/bitmask_core_bg.js +1701 -1378
- package/bitmask_core_bg.wasm +0 -0
- package/bitmask_core_bg.wasm.d.ts +42 -42
- package/bp.js +17 -7
- 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 -317
- 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/bitmask_core_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
4
|
+
export const get_network: () => any;
|
|
5
|
+
export const switch_network: (a: number, b: number) => any;
|
|
6
|
+
export const get_env: (a: number, b: number) => any;
|
|
7
|
+
export const set_env: (a: number, b: number, c: number, d: number) => any;
|
|
8
|
+
export const sleep: (a: number) => any;
|
|
9
|
+
export const create_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
10
|
+
export const auth: (a: number, b: number, c: number, d: number) => any;
|
|
11
|
+
export const ln_create_invoice: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
12
|
+
export const get_balance: (a: number, b: number) => any;
|
|
13
|
+
export const get_txs: (a: number, b: number) => any;
|
|
14
|
+
export const pay_invoice: (a: number, b: number, c: number, d: number) => any;
|
|
15
|
+
export const check_payment: (a: number, b: number) => any;
|
|
16
|
+
export const swap_btc_ln: (a: number, b: number, c: number, d: number) => any;
|
|
17
|
+
export const swap_ln_btc: (a: number, b: number, c: bigint, d: number, e: number) => any;
|
|
18
|
+
export const new_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
19
|
+
export const update_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
11
20
|
export const get_rgb_version: () => [number, number];
|
|
12
21
|
export const get_rgb_wallet: (a: number, b: number) => any;
|
|
13
22
|
export const get_contract: (a: number, b: number, c: number, d: number) => any;
|
|
@@ -43,36 +52,13 @@ export const create_airdrop_claim: (a: number, b: number, c: any) => any;
|
|
|
43
52
|
export const close_airdrop: (a: number, b: number, c: any) => any;
|
|
44
53
|
export const backup_rgb_data: (a: number, b: number) => any;
|
|
45
54
|
export const restore_rgb_data: (a: number, b: number) => any;
|
|
46
|
-
export const
|
|
47
|
-
export const
|
|
48
|
-
export const
|
|
49
|
-
export const
|
|
50
|
-
export const
|
|
51
|
-
export const
|
|
52
|
-
export const
|
|
53
|
-
export const watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => any;
|
|
54
|
-
export const get_network: () => any;
|
|
55
|
-
export const switch_network: (a: number, b: number) => any;
|
|
56
|
-
export const get_env: (a: number, b: number) => any;
|
|
57
|
-
export const set_env: (a: number, b: number, c: number, d: number) => any;
|
|
58
|
-
export const sleep: (a: number) => any;
|
|
59
|
-
export const create_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
60
|
-
export const auth: (a: number, b: number, c: number, d: number) => any;
|
|
61
|
-
export const ln_create_invoice: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
62
|
-
export const get_balance: (a: number, b: number) => any;
|
|
63
|
-
export const get_txs: (a: number, b: number) => any;
|
|
64
|
-
export const pay_invoice: (a: number, b: number, c: number, d: number) => any;
|
|
65
|
-
export const check_payment: (a: number, b: number) => any;
|
|
66
|
-
export const swap_btc_ln: (a: number, b: number, c: number, d: number) => any;
|
|
67
|
-
export const swap_ln_btc: (a: number, b: number, c: bigint, d: number, e: number) => any;
|
|
68
|
-
export const fund_rgb_vault: (a: number, b: number, c: number, d: any, e: number, f: number, g: bigint, h: number) => any;
|
|
69
|
-
export const transfer_sats: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: any) => any;
|
|
70
|
-
export const get_btc_wallet: (a: number, b: number) => any;
|
|
71
|
-
export const backup_btc_data: (a: number, b: number) => any;
|
|
72
|
-
export const recover_funds_from_bad_wallets: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
73
|
-
export const restore_btc_data: (a: number, b: number) => any;
|
|
74
|
-
export const new_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
75
|
-
export const update_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
55
|
+
export const store: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
56
|
+
export const retrieve: (a: number, b: number, c: number, d: number) => any;
|
|
57
|
+
export const retrieve_metadata: (a: number, b: number, c: number, d: number) => any;
|
|
58
|
+
export const encode_hex: (a: number, b: number) => [number, number];
|
|
59
|
+
export const encode_base64: (a: number, b: number) => [number, number];
|
|
60
|
+
export const decode_hex: (a: number, b: number) => [number, number, number, number];
|
|
61
|
+
export const decode_base64: (a: number, b: number) => [number, number, number, number];
|
|
76
62
|
export const hash_password: (a: number, b: number) => [number, number];
|
|
77
63
|
export const new_mnemonic: (a: number, b: number) => any;
|
|
78
64
|
export const save_mnemonic: (a: number, b: number, c: number, d: number) => any;
|
|
@@ -90,11 +76,25 @@ export const drain_wallet: (a: number, b: number, c: number, d: number, e: numbe
|
|
|
90
76
|
export const bump_fee: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
91
77
|
export const psbt_sign_and_publish_file: (a: any) => any;
|
|
92
78
|
export const psbt_publish_file: (a: any) => any;
|
|
79
|
+
export const fund_rgb_vault: (a: number, b: number, c: number, d: any, e: number, f: number, g: bigint, h: number) => any;
|
|
80
|
+
export const transfer_sats: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: any) => any;
|
|
81
|
+
export const get_btc_wallet: (a: number, b: number) => any;
|
|
82
|
+
export const backup_btc_data: (a: number, b: number) => any;
|
|
83
|
+
export const recover_funds_from_bad_wallets: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
84
|
+
export const restore_btc_data: (a: number, b: number) => any;
|
|
93
85
|
export const convert_contract_amount_raw: (a: number, b: number, c: number) => [number, number];
|
|
94
86
|
export const convert_contract_amount_string: (a: bigint, b: number) => [number, number];
|
|
95
87
|
export const parse_contract_amount: (a: number, b: number) => any;
|
|
96
88
|
export const parse_contract_amount_precision: (a: number, b: number, c: number) => [number, number];
|
|
97
89
|
export const version: () => any;
|
|
90
|
+
export const create_watcher: (a: number, b: number, c: any) => any;
|
|
91
|
+
export const recover_watcher: (a: number, b: number, c: any) => any;
|
|
92
|
+
export const destroy_watcher: (a: number, b: number) => any;
|
|
93
|
+
export const destroy_recover_watcher: (a: number, b: number) => any;
|
|
94
|
+
export const check_watcher: (a: number, b: number) => any;
|
|
95
|
+
export const watcher_next_address: (a: number, b: number, c: number, d: number) => any;
|
|
96
|
+
export const watcher_next_utxo: (a: number, b: number, c: number, d: number) => any;
|
|
97
|
+
export const watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => any;
|
|
98
98
|
export const rustsecp256k1_v0_9_2_context_create: (a: number) => number;
|
|
99
99
|
export const rustsecp256k1_v0_9_2_context_destroy: (a: number) => void;
|
|
100
100
|
export const rustsecp256k1_v0_9_2_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
@@ -120,9 +120,9 @@ export const __externref_drop_slice: (a: number, b: number) => void;
|
|
|
120
120
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
121
121
|
export const __wbindgen_export_7: WebAssembly.Table;
|
|
122
122
|
export const __externref_table_dealloc: (a: number) => void;
|
|
123
|
-
export const
|
|
124
|
-
export const
|
|
125
|
-
export const
|
|
126
|
-
export const
|
|
127
|
-
export const
|
|
123
|
+
export const closure1237_externref_shim: (a: number, b: number, c: any) => void;
|
|
124
|
+
export const closure1999_externref_shim: (a: number, b: number, c: any) => void;
|
|
125
|
+
export const closure2670_externref_shim: (a: number, b: number, c: any) => void;
|
|
126
|
+
export const closure3841_externref_shim: (a: number, b: number, c: any) => void;
|
|
127
|
+
export const closure4133_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
128
128
|
export const __wbindgen_start: () => void;
|
package/bp.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
package/carbonado.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) {
|
package/constants.d.ts
CHANGED
|
@@ -9,8 +9,13 @@ export declare enum Network {
|
|
|
9
9
|
regtest = "regtest"
|
|
10
10
|
}
|
|
11
11
|
export declare const DISABLE_LN: string | boolean;
|
|
12
|
-
export declare
|
|
13
|
-
export declare
|
|
14
|
-
export declare
|
|
12
|
+
export declare const LNDHUBX = false;
|
|
13
|
+
export declare const CARBONADO = false;
|
|
14
|
+
export declare const BITMASK = false;
|
|
15
|
+
export declare const STATUS: {
|
|
16
|
+
LNDHUBX: boolean;
|
|
17
|
+
CARBONADO: boolean;
|
|
18
|
+
BITMASK: boolean;
|
|
19
|
+
};
|
|
15
20
|
export declare const init: (networkOverride?: string) => Promise<void>;
|
|
16
21
|
//# sourceMappingURL=constants.d.ts.map
|
package/constants.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) {
|
|
@@ -35,7 +45,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
35
45
|
};
|
|
36
46
|
var _a;
|
|
37
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.init = exports.BITMASK = exports.CARBONADO = exports.LNDHUBX = exports.DISABLE_LN = exports.Network = exports.setEnv = exports.getEnv = exports.switchNetwork = exports.getNetwork = void 0;
|
|
48
|
+
exports.init = exports.STATUS = exports.BITMASK = exports.CARBONADO = exports.LNDHUBX = exports.DISABLE_LN = exports.Network = exports.setEnv = exports.getEnv = exports.switchNetwork = exports.getNetwork = void 0;
|
|
39
49
|
const bitmask_core_1 = __importStar(require("./bitmask_core")), BMC = bitmask_core_1;
|
|
40
50
|
const getNetwork = () => __awaiter(void 0, void 0, void 0, function* () { return JSON.parse(yield BMC.get_network()); });
|
|
41
51
|
exports.getNetwork = getNetwork;
|
|
@@ -53,9 +63,23 @@ var Network;
|
|
|
53
63
|
Network["regtest"] = "regtest";
|
|
54
64
|
})(Network || (exports.Network = Network = {}));
|
|
55
65
|
exports.DISABLE_LN = ((_a = process.env) === null || _a === void 0 ? void 0 : _a.DISABLE_LN) === "true" ? true : false || "";
|
|
66
|
+
// Public const exports - these MUST be const, not functions
|
|
56
67
|
exports.LNDHUBX = false;
|
|
57
68
|
exports.CARBONADO = false;
|
|
58
69
|
exports.BITMASK = false;
|
|
70
|
+
// Private mutable variables for internal state
|
|
71
|
+
let _LNDHUBX = false;
|
|
72
|
+
let _CARBONADO = false;
|
|
73
|
+
let _BITMASK = false;
|
|
74
|
+
// Public const object with getters/setters (for mutable access)
|
|
75
|
+
exports.STATUS = {
|
|
76
|
+
get LNDHUBX() { return _LNDHUBX; },
|
|
77
|
+
set LNDHUBX(val) { _LNDHUBX = val; },
|
|
78
|
+
get CARBONADO() { return _CARBONADO; },
|
|
79
|
+
set CARBONADO(val) { _CARBONADO = val; },
|
|
80
|
+
get BITMASK() { return _BITMASK; },
|
|
81
|
+
set BITMASK(val) { _BITMASK = val; }
|
|
82
|
+
};
|
|
59
83
|
const init = (networkOverride) => __awaiter(void 0, void 0, void 0, function* () {
|
|
60
84
|
try {
|
|
61
85
|
if (networkOverride) {
|
|
@@ -81,6 +105,9 @@ const init = (networkOverride) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
81
105
|
if (process.env.BITCOIN_EXPLORER_API_TESTNET) {
|
|
82
106
|
yield (0, exports.setEnv)("BITCOIN_EXPLORER_API_TESTNET", process.env.BITCOIN_EXPLORER_API_TESTNET);
|
|
83
107
|
}
|
|
108
|
+
if (process.env.BITCOIN_EXPLORER_API_SIGNET) {
|
|
109
|
+
yield (0, exports.setEnv)("BITCOIN_EXPLORER_API_SIGNET", process.env.BITCOIN_EXPLORER_API_SIGNET);
|
|
110
|
+
}
|
|
84
111
|
}
|
|
85
112
|
catch (err) {
|
|
86
113
|
console.error("Error in setEnv", err);
|
|
@@ -91,30 +118,30 @@ const init = (networkOverride) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
91
118
|
try {
|
|
92
119
|
if (!exports.DISABLE_LN) {
|
|
93
120
|
yield fetch(`${lndhubx}/nodeinfo`);
|
|
94
|
-
exports.LNDHUBX = true;
|
|
121
|
+
exports.STATUS.LNDHUBX = true;
|
|
95
122
|
console.debug(`${lndhubx}/nodeinfo successfully reached`);
|
|
96
123
|
}
|
|
97
124
|
}
|
|
98
125
|
catch (e) {
|
|
99
|
-
exports.LNDHUBX = false;
|
|
126
|
+
exports.STATUS.LNDHUBX = false;
|
|
100
127
|
console.warn("Could not reach lndhubx", lndhubx, e);
|
|
101
128
|
}
|
|
102
129
|
try {
|
|
103
130
|
yield fetch(`${carbonado}/status`);
|
|
104
|
-
exports.CARBONADO = true;
|
|
131
|
+
exports.STATUS.CARBONADO = true;
|
|
105
132
|
console.debug(`${carbonado}/status successfully reached`);
|
|
106
133
|
}
|
|
107
134
|
catch (e) {
|
|
108
|
-
exports.CARBONADO = false;
|
|
135
|
+
exports.STATUS.CARBONADO = false;
|
|
109
136
|
console.warn("Could not reach carbonado", carbonado, e);
|
|
110
137
|
}
|
|
111
138
|
try {
|
|
112
139
|
yield fetch(`${bitmask}/carbonado/status`);
|
|
113
|
-
exports.BITMASK = true;
|
|
140
|
+
exports.STATUS.BITMASK = true;
|
|
114
141
|
console.debug(`${bitmask}/status successfully reached`);
|
|
115
142
|
}
|
|
116
143
|
catch (e) {
|
|
117
|
-
exports.BITMASK = false;
|
|
144
|
+
exports.STATUS.BITMASK = false;
|
|
118
145
|
console.warn("Could not reach bitmask", bitmask, e);
|
|
119
146
|
}
|
|
120
147
|
console.debug(BMC.version(), "initialized");
|
|
@@ -125,7 +152,7 @@ const init = (networkOverride) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
125
152
|
exports.init = init;
|
|
126
153
|
const networkOverride = process.env.NETWORK_OVERRIDE;
|
|
127
154
|
if (networkOverride) {
|
|
128
|
-
const network = Network[networkOverride.toLowerCase()];
|
|
155
|
+
const network = Network[networkOverride === null || networkOverride === void 0 ? void 0 : networkOverride.toLowerCase()];
|
|
129
156
|
(0, exports.init)(network);
|
|
130
157
|
}
|
|
131
158
|
else {
|
package/index.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
package/lightning.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) {
|
package/nostr.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) {
|
package/package.json
CHANGED
|
@@ -1,158 +1,98 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bitmask-core",
|
|
3
3
|
"collaborators": [
|
|
4
|
+
"DIBA Team <team@diba.io>",
|
|
4
5
|
"Jose Diego Robles <jose@diba.io>",
|
|
5
6
|
"Hunter Trujillo <hunter@diba.io>",
|
|
6
7
|
"Francisco Calderón <francisco@diba.io>",
|
|
7
|
-
"
|
|
8
|
+
"Trevor O'Farrell <trevor@diba.io>",
|
|
9
|
+
"Stanley Arua <stanarua@aol.com>"
|
|
8
10
|
],
|
|
9
11
|
"description": "Core functionality for the BitMask wallet",
|
|
10
|
-
"version": "1.0.
|
|
11
|
-
"license": "MIT",
|
|
12
|
+
"version": "1.0.1-beta",
|
|
13
|
+
"license": "MIT/Apache-2.0",
|
|
12
14
|
"repository": {
|
|
13
15
|
"type": "git",
|
|
14
|
-
"url": "
|
|
16
|
+
"url": "https://github.com/diba-io/bitmask-core"
|
|
15
17
|
},
|
|
16
18
|
"files": [
|
|
17
|
-
"
|
|
19
|
+
"bitmask_core_bg.wasm",
|
|
20
|
+
"bitmask_core_bg.wasm.d.ts",
|
|
21
|
+
"bitmask_core_bg.js",
|
|
22
|
+
"bitmask_core.js",
|
|
23
|
+
"bitmask_core.d.ts",
|
|
18
24
|
"bitcoin.js",
|
|
19
|
-
"carbonado.js",
|
|
20
|
-
"constants.js",
|
|
21
|
-
"lightning.js",
|
|
22
|
-
"nostr.js",
|
|
23
|
-
"rgb.js",
|
|
24
|
-
"wallet.js",
|
|
25
|
-
"bp.js",
|
|
26
|
-
"index.ts",
|
|
27
|
-
"bitcoin.ts",
|
|
28
|
-
"carbonado.ts",
|
|
29
|
-
"constants.ts",
|
|
30
|
-
"lightning.ts",
|
|
31
|
-
"nostr.ts",
|
|
32
|
-
"rgb.ts",
|
|
33
|
-
"wallet.ts",
|
|
34
|
-
"bp.ts",
|
|
35
|
-
"index.ts",
|
|
36
|
-
"index.d.ts",
|
|
37
|
-
"index.d.ts.map",
|
|
38
|
-
"bitcoin.ts",
|
|
39
25
|
"bitcoin.d.ts",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
26
|
+
"bp.js",
|
|
27
|
+
"bp.d.ts",
|
|
28
|
+
"carbonado.js",
|
|
42
29
|
"carbonado.d.ts",
|
|
43
|
-
"
|
|
44
|
-
"constants.ts",
|
|
30
|
+
"constants.js",
|
|
45
31
|
"constants.d.ts",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
32
|
+
"index.js",
|
|
33
|
+
"index.d.ts",
|
|
34
|
+
"lightning.js",
|
|
48
35
|
"lightning.d.ts",
|
|
49
|
-
"
|
|
50
|
-
"nostr.ts",
|
|
36
|
+
"nostr.js",
|
|
51
37
|
"nostr.d.ts",
|
|
52
|
-
"
|
|
53
|
-
"rgb.ts",
|
|
38
|
+
"rgb.js",
|
|
54
39
|
"rgb.d.ts",
|
|
55
|
-
"
|
|
40
|
+
"wallet.js",
|
|
56
41
|
"wallet.d.ts",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"bp.d.ts.map",
|
|
60
|
-
"bitmask_core_bg.wasm",
|
|
61
|
-
"bitmask_core_bg.wasm.d.ts",
|
|
62
|
-
"bitmask_core.js",
|
|
63
|
-
"bitmask_core_bg.js",
|
|
64
|
-
"bitmask_core.d.ts",
|
|
65
|
-
"LICENSE-APACHE",
|
|
66
|
-
"LICENSE-MIT"
|
|
42
|
+
"LICENSE-MIT",
|
|
43
|
+
"LICENSE-APACHE"
|
|
67
44
|
],
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"module": "index.js",
|
|
45
|
+
"main": "index.js",
|
|
46
|
+
"homepage": "https://bitmask.app",
|
|
47
|
+
"types": "index.d.ts",
|
|
72
48
|
"exports": {
|
|
73
49
|
".": {
|
|
74
|
-
"
|
|
50
|
+
"require": "./index.js",
|
|
75
51
|
"import": "./index.js",
|
|
76
|
-
"
|
|
52
|
+
"types": "./index.d.ts"
|
|
77
53
|
},
|
|
78
54
|
"./bitcoin": {
|
|
79
|
-
"
|
|
55
|
+
"require": "./bitcoin.js",
|
|
80
56
|
"import": "./bitcoin.js",
|
|
81
|
-
"
|
|
57
|
+
"types": "./bitcoin.d.ts"
|
|
58
|
+
},
|
|
59
|
+
"./bp": {
|
|
60
|
+
"require": "./bp.js",
|
|
61
|
+
"import": "./bp.js",
|
|
62
|
+
"types": "./bp.d.ts"
|
|
82
63
|
},
|
|
83
64
|
"./carbonado": {
|
|
84
|
-
"
|
|
65
|
+
"require": "./carbonado.js",
|
|
85
66
|
"import": "./carbonado.js",
|
|
86
|
-
"
|
|
67
|
+
"types": "./carbonado.d.ts"
|
|
87
68
|
},
|
|
88
69
|
"./constants": {
|
|
89
|
-
"
|
|
70
|
+
"require": "./constants.js",
|
|
90
71
|
"import": "./constants.js",
|
|
91
|
-
"
|
|
72
|
+
"types": "./constants.d.ts"
|
|
92
73
|
},
|
|
93
74
|
"./lightning": {
|
|
94
|
-
"
|
|
75
|
+
"require": "./lightning.js",
|
|
95
76
|
"import": "./lightning.js",
|
|
96
|
-
"
|
|
77
|
+
"types": "./lightning.d.ts"
|
|
97
78
|
},
|
|
98
79
|
"./nostr": {
|
|
99
|
-
"
|
|
80
|
+
"require": "./nostr.js",
|
|
100
81
|
"import": "./nostr.js",
|
|
101
|
-
"
|
|
82
|
+
"types": "./nostr.d.ts"
|
|
102
83
|
},
|
|
103
84
|
"./rgb": {
|
|
104
|
-
"
|
|
85
|
+
"require": "./rgb.js",
|
|
105
86
|
"import": "./rgb.js",
|
|
106
|
-
"
|
|
87
|
+
"types": "./rgb.d.ts"
|
|
107
88
|
},
|
|
108
89
|
"./wallet": {
|
|
109
|
-
"
|
|
90
|
+
"require": "./wallet.js",
|
|
110
91
|
"import": "./wallet.js",
|
|
111
|
-
"
|
|
112
|
-
},
|
|
113
|
-
"./bp": {
|
|
114
|
-
"types": "./bp.d.ts",
|
|
115
|
-
"import": "./bp.js",
|
|
116
|
-
"require": "./bp.js"
|
|
117
|
-
},
|
|
118
|
-
"./bitmask_core": {
|
|
119
|
-
"types": "./bitmask_core.d.ts",
|
|
120
|
-
"import": "./bitmask_core.js",
|
|
121
|
-
"require": "./bitmask_core.js"
|
|
92
|
+
"types": "./wallet.d.ts"
|
|
122
93
|
}
|
|
123
94
|
},
|
|
124
|
-
"homepage": "https://bitmask.app",
|
|
125
|
-
"types": "index.d.ts",
|
|
126
|
-
"devDependencies": {
|
|
127
|
-
"@types/node": "^20.8.2",
|
|
128
|
-
"typescript": "^5.2.2"
|
|
129
|
-
},
|
|
130
95
|
"sideEffects": [
|
|
131
|
-
"./bitmask_core.js",
|
|
132
96
|
"./snippets/*"
|
|
133
|
-
],
|
|
134
|
-
"keywords": [
|
|
135
|
-
"bitmask",
|
|
136
|
-
"bitcoin",
|
|
137
|
-
"wallet",
|
|
138
|
-
"crypto",
|
|
139
|
-
"web3",
|
|
140
|
-
"diba",
|
|
141
|
-
"nostr",
|
|
142
|
-
"bitmask.js",
|
|
143
|
-
"bitmaskjs",
|
|
144
|
-
"wasm",
|
|
145
|
-
"rust",
|
|
146
|
-
"typescript",
|
|
147
|
-
"lightning",
|
|
148
|
-
"network",
|
|
149
|
-
"rgb",
|
|
150
|
-
"tokens",
|
|
151
|
-
"contracts",
|
|
152
|
-
"nft",
|
|
153
|
-
"protocol",
|
|
154
|
-
"satoshi",
|
|
155
|
-
"nakamoto",
|
|
156
|
-
"carbonado"
|
|
157
97
|
]
|
|
158
98
|
}
|
package/rgb.d.ts
CHANGED