All files / app/constants index.ts

100% Statements 40/40
75% Branches 6/8
100% Functions 0/0
100% Lines 40/40

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 933x 3x 3x 3x       3x   3x   3x   3x   3x   3x   3x   3x   3x   3x   3x         3x   3x   3x   3x     3x     3x   3x   3x     3x   3x   3x   3x   3x   3x   3x   3x   3x   3x   3x   3x   3x   3x   3x   3x         3x            
import packageJson from '../../package.json';
import { stxToMicroStx } from '../utils/unit-convert';
import { TransactionVersion } from '@stacks/transactions';
import { whenNetwork } from '@utils/network-utils';
 
type Environments = 'development' | 'testing' | 'production';
 
export const NETWORK = CONFIG.STX_NETWORK;
 
export const ENV = (CONFIG.NODE_ENV ?? 'production') as Environments;
 
export const MNEMONIC_ENTROPY = 256;
 
export const STX_DECIMAL_PRECISION = 6;
 
export const STX_DERIVATION_PATH = `m/44'/5757'/0'/0/0` as const;
 
export const ENTITY_NAME = 'Leather';
 
export const FULL_ENTITY_NAME = 'Leather Wallet, LLC';
 
export const WALLET_VERSION = packageJson.version;
 
export const BUY_STX_URL = 'https://coinmarketcap.com/currencies/stacks/markets';
 
export const STATUS_PAGE_URL = 'http://status.test-blockstack.com';
 
export const DEFAULT_STACKS_NODE_URL = whenNetwork<string>({
  mainnet: 'https://api.hiro.so',
  testnet: process.env.DEFAULT_TESTNET_STACKS_NODE_URL ?? 'https://api.testnet.hiro.so',
});
 
export const EXPLORER_URL = 'https://explorer.hiro.so';
 
export const GITHUB_ORG = 'leather-wallet';
 
export const GITHUB_REPO = 'desktop';
 
export const TREZOR_HELP_URL =
  'https://www.hiro.so/questions/how-can-i-use-my-trezor-device-with-the-stacks-wallet';
 
export const STACKING_ADDRESS_FORMAT_HELP_URL =
  'https://www.hiro.so/questions/what-form-of-btc-addresses-can-i-use-for-proof-of-transfer-rewards';
 
export const STACKING_LEARN_MORE_URL = 'https://stacks.org/stacking-moves-us-forward';
 
export const STACKING_GUIDE_URL = 'https://blog.stacks.co/stacking-strategy';
 
export const STACKING_MINIMIUM_FOR_NEXT_CYCLE_URL =
  'https://stacking.club/cycles/next?tab=slot_minimum';
 
export const MAX_STACKING_CYCLES = 12;
 
export const MIN_STACKING_CYCLES = 1;
 
export const MIN_DELEGATED_STACKING_AMOUNT_USTX = 50_000_000;
 
export const UI_IMPOSED_MAX_STACKING_AMOUNT_USTX = stxToMicroStx(10_000_000_000);
 
export const STX_TRANSFER_TX_SIZE_BYTES = 180;
 
export const REVOKE_DELEGATION_TX_SIZE_BYTES = 165;
 
export const STACKING_CONTRACT_CALL_TX_BYTES = 260;
 
export const POOLED_STACKING_TX_SIZE_BYTES = 216;
 
export const SUPPORTED_BTC_ADDRESS_FORMATS = ['p2pkh', 'p2sh', 'p2wpkh', 'p2tr'] as const;
 
export const LATEST_LEDGER_VERSION_MAJOR = 0;
 
export const LATEST_LEDGER_VERSION_MINOR = 14;
 
export const EARLIEST_SUPPORTED_LEDGER_VERSION = '0.11.0';
 
export const FEE_RATE = 400;
 
export const DEFAULT_POLLING_INTERVAL = 10_000;
 
export const SEND_MANY_CONTRACT_ID = 'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.send-many-memo';
 
export const TRANSACTION_VERSION = whenNetwork({
  mainnet: TransactionVersion.Mainnet,
  testnet: TransactionVersion.Testnet,
});
 
export const features = {
  stacking: true,
  lifetimeRewards: false,
  txContentMenus: true,
  microblocks: true,
};