1 import type { WasmBitcoinUnit } from '@proton/andromeda';
2 import { WasmScriptType, WasmWordCount } from '@proton/andromeda';
4 export const SATOSHI = 1;
5 export const BITCOIN = 100000000 * SATOSHI;
6 export const mBITCOIN = BITCOIN / 1000;
8 export const CENTS_BY_BITCOIN_UNIT: Record<WasmBitcoinUnit, number> = {
14 export const DEFAULT_INDEX = 0;
17 * Bitcoin unit used for amount compute
19 export const COMPUTE_BITCOIN_UNIT: WasmBitcoinUnit = 'SATS';
21 * Default bitcoin to be displayed to the user
23 export const DEFAULT_DISPLAY_BITCOIN_UNIT: WasmBitcoinUnit = 'BTC';
25 export const DEFAULT_FIAT_CURRENCY = 'USD';
27 export const DEFAULT_FIRST_ACCOUNT_LABEL = 'Primary Account';
28 export const DEFAULT_FIRST_ACCOUNT_INDEX = 0;
29 export const DEFAULT_FIRST_BVE_ACCOUNT_LABEL = 'Bitcoin via Email';
30 export const DEFAULT_FIRST_BVE_ACCOUNT_INDEX = 1;
31 export const DEFAULT_SCRIPT_TYPE = WasmScriptType.NativeSegwit;
33 export const BASE_INDEX_OPTIONS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'custom'];
35 export const SCRIPT_TYPES = [
36 WasmScriptType.Legacy,
37 WasmScriptType.NestedSegwit,
38 WasmScriptType.NativeSegwit,
39 WasmScriptType.Taproot,
42 export const MIN_FEE_RATE = 1;
44 export const HIGH_PRIORITY_TARGET_BLOCK = 1;
45 export const MEDIAN_PRIORITY_TARGET_BLOCK = 3;
46 export const LOW_PRIORITY_TARGET_BLOCK = 6;
47 export const MAX_BLOCK_TARGET = 25;
49 export const AVERAGE_TIMEGAP_BETWEEN_BLOCKS = 10;
51 export const BITCOIN_ADDRESS_INDEX_GAP_BEFORE_WARNING = 10;
53 export const wordCountToNumber: Record<WasmWordCount, number> = {
54 [WasmWordCount.Words12]: 12,
55 [WasmWordCount.Words15]: 15,
56 [WasmWordCount.Words18]: 18,
57 [WasmWordCount.Words21]: 21,
58 [WasmWordCount.Words24]: 24,
61 export const FIRST_INDEX = 0;
63 export const BITCOIN_CURRENCY = {
64 Symbol: 'BTC' as WasmBitcoinUnit,
72 export const SATS_CURRENCY = {
73 Symbol: 'SATS' as WasmBitcoinUnit,