@aladas-org/cryptocalc
Version:
Cryptocurrency wallet generator
345 lines (297 loc) • 13.1 kB
JavaScript
// ===================================================================================================================
// =============================================== const_blockchain.js ===============================================
// ===================================================================================================================
"use strict";
// up to 50 (coinmarketcap: https://coinmarketcap.com/)
// ETC : Ethereum Classic
// XLM: Stellar
// VET: VeChain
// 79 BSV: Bitcoin SV
// 98 EOS: EOS
const NULL_COIN = "Null-COIN";
const COIN = "Coin";
const COIN_TYPE = "coin_type";
const BLOCKCHAIN_EXPLORER = "Blockchain Explorer";
const MAINNET = "mainnet";
const TESTNET = "testnet";
const TESTNET_COIN = "Testnet";
const BITCOIN = "Bitcoin";
const ETHEREUM = "Ethereum";
const SOLANA = "Solana";
const RIPPLE = "Ripple";
const BITCOIN_CASH = "Bitcoin Cash";
const BITCOIN_SV = "Bitcoin SV";
const ETHEREUM_CLASSIC = "Ethereum Classic";
const BINANCE_BSC = "Binance Smart Chain";
const TON = "Toncoin";
const CARDANO = "Cardano";
const ADA_PURPOSE = "1852";
const STELLAR = "Stellar";
const SUI = "Sui";
const POLYGON = "Polygon";
const AVALANCHE = "Avalanche";
const DOGECOIN = "DogeCoin";
const TRON = "TRON";
const POLKADOT = "Polkadot";
const LITECOIN = "LiteCoin";
const FILECOIN = "Filecoin";
const EOS = "EOS";
// Monero mnemonic library (https://github.com/pywallet-cli/bip-utils)
// If you use the official Monero wallet, you'll probably notice that Monero generates
// mnemonic in its own way, which is different from BIP-0039. In fact, it uses different
// words lists (with 1626 words instead of 2048) and a different algorithm for
// encoding/decoding the mnemonic string
const MONERO = "Monero";
const TEZOS = "Tezos";
const VECHAIN = "VeChain";
const HORIZEN = "Horizen";
const DASH = "Dash";
const TERRA_LUNA = "Terra";
const RAVENCOIN = "Ravencoin";
const ZCASH = "ZCASH";
const FIRO = "Firo";
const ZILLIQA = "Zilliqa";
const KUSAMA = "Kusama";
const NAMECOIN = "Namecoin"; // Dead project
// NB: [NULL_COIN] syntax means NULL_COIN const is interpreted as its value ("None")
// else it would be interpreted as the const name "NULL_COIN" 8((
const COIN_ABBREVIATIONS = {
[] : "Null-Coin",
[] : "Testnet-Coin",
// ------------ https://coinmarketcap.com/ ------------
[] : "BTC",
[] : "ETH",
[]: "ETC",
[] : "TON",
[] : "BNB",
[] : "SOL",
[] : "XRP",
[] : "ADA",
[] : "XLM",
[] : "SUI",
[] : "POL",
[] : "AVAX",
[] : "DOGE",
[] : "TRX",
[] : "BCH",
[] : "BSV",
[] : "DOT",
[] : "POL",
[] : "LTC",
[] : "VET",
[] : "ZEN",
[] : "FIL",
[] : "XMR",
[] : "XTZ",
[] : "ZIL",
[] : "ZEC",
[] : "KSM",
[] : "LUNA",
[] : "RVN",
[] : "DASH",
[] : "EOS",
[] : "FIRO",
[] : "NMC" // Dead project
}; // COIN_ABBREVIATIONS
// coin_types:
// https://github.com/satoshilabs/slips/blob/master/slip-0044.md
const COIN_TYPES = {
[] : -1,
[] : 0,
[] : 1,
[] : 2,
[] : 3,
[] : 5,
[] : 7,
[] : 60,
[]: 61,
[] : 121,
[] : 128,
[] : 133,
[] : 136,
[] : 144,
[] : 145,
[] : 148,
[] : 175,
[] : 194,
[] : 195,
[] : 236,
[] : 313,
[] : 330,
[] : 434,
[] : 461,
[] : 501,
[] : 607,
[] : 714,
[] : 784,
[] : 818,
[] : 966,
[] : 1729,
[] : 1815,
[] : 9000
}; // COIN_TYPES
const FAUCET_URLs = {
[] : "Null-URL",
[] : "https://mumbaifaucet.com/",
[]: "Null-URL",
[] : "https://coinfaucet.eu/en/btc-testnet/",
[] : "https://solfaucet.com/",
[] : "https://docs.cardano.org/cardano-testnet/tools/faucet/",
[] : "Null-URL",
[] : "Null-URL",
[] : "Null-URL",
[] : "https://testnet-faucet.com/doge-testnet/",
[] : "Null-URL",
[] : "Null-URL",
[] : "Null-URL",
[] : "Null-URL",
[] : "Null-URL",
[] : "Null-URL",
[] : "Null-URL",
[] : "Null-URL",
[] : "Null-URL",
[] : "Null-URL",
[] : "Null-URL",
[] : "Null-URL",
[] : "Null-URL",
[] : "Null-URL",
[] : "https://litecointf.salmen.website/"
}; // FAUCET_URLs
// https://shardeum.org/blog/best-blockchain-explorers/
// 1. Blockchain
// 1. BlockCypher
const MAINNET_EXPLORER_URLs = {
[]: "Null-URL",
[]: "https://etherscan.io/address/",
[]: "https://www.oklink.com/fr/etc/address/",
[]: "https://www.blockchain.com/explorer/addresses/btc/",
[]: "https://explorer.solana.com/address/",
[]: "https://blockchair.com/fr/cardano/address/",
[]: "https://stellar.expert/explorer/public/account/",
[]: "https://polygonscan.com/address/",
[]: "https://mainnet.suivision.xyz/account/",
[]: "https://dogechain.info/address/",
[]: "https://bscscan.com/address/",
[]: "https://tonscan.org/address/",
[]: "https://snowtrace.io/address/",
[]: "https://tronscan.org/#/address/",
[]: "https://www.blockchain.com/fr/explorer/addresses/bch/",
[]: "https://whatsonchain.com/address/",
[]: "https://atomscan.com/terra2/accounts/",
[]: "https://explorer.rvn.zelcore.io/address/",
[]: "https://explorer.horizen.io/address/",
[]: "https://explorer.dash.org/insight/address/",
[]: "https://livenet.xrpl.org/accounts/",
[]: "Null-URL",
[]: "https://explore.vechain.org/accounts/",
[]: "https://www.blockexplorer.com/namecoin/address/",
[]: "https://explorer.firo.org/address/",
[]: "Null-URL",
[]: "https://live.blockcypher.com/ltc/address/"
}; // MAINNET_EXPLORER_URLs
const TESTNET_EXPLORER_URLs = {
[]: "Null-URL",
[]: "https://sepolia.etherscan.io/address/%ADDRESS%",
[]: "Null-URL",
[]: "https://live.blockcypher.com/btc-testnet/address/%ADDRESS%",
[]: "https://explorer.solana.com/%ADDRESS%/?cluster=testnet",
[]: "https://preprod.cardanoscan.io/address/%ADDRESS%",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "https://sochain.com/address/DOGETEST/%ADDRESS%",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "Null-URL",
[]: "https://sochain.com/address/LTCTEST/%ADDRESS%"
}; // TESTNET_EXPLORER_URLs
const COINMARKETCAP_URLs = {
[]: "Null-URL",
[]: "https://coinmarketcap.com/currencies/ethereum/",
[]: "https://coinmarketcap.com/currencies/ethereum-classic/",
[]: "https://coinmarketcap.com/currencies/bitcoin/",
[]: "https://coinmarketcap.com/currencies/solana/",
[]: "https://coinmarketcap.com/currencies/cardano/",
[]: "https://coinmarketcap.com/currencies/stellar/",
[]: "https://coinmarketcap.com/currencies/sui/",
[]: "https://coinmarketcap.com/currencies/polygon-ecosystem-token/",
[]: "https://coinmarketcap.com/currencies/dogecoin/",
[]: "https://coinmarketcap.com/currencies/bnb/",
[]: "https://coinmarketcap.com/currencies/toncoin/",
[]: "https://coinmarketcap.com/currencies/avalanche/",
[]: "https://coinmarketcap.com/currencies/tron/",
[]: "https://coinmarketcap.com/currencies/bitcoin-cash/",
[]: "https://coinmarketcap.com/currencies/bitcoin-sv/",
[]: "https://coinmarketcap.com/currencies/terra-luna-v2/",
[]: "https://coinmarketcap.com/currencies/ravencoin/",
[]: "https://coinmarketcap.com/currencies/horizen/",
[]: "https://coinmarketcap.com/currencies/dash/",
[]: "https://coinmarketcap.com/currencies/xrp/",
[]: "https://coinmarketcap.com/currencies/eos/",
[]: "https://coinmarketcap.com/currencies/vechain/",
[]: "https://coinmarketcap.com/currencies/namecoin/",
[]: "https://coinmarketcap.com/currencies/firo/",
[]: "https://coinmarketcap.com/currencies/zcash/",
[]: "https://coinmarketcap.com/currencies/litecoin/"
}; // COINMARKETCAP_URLs
if (typeof exports === 'object') {
exports.NULL_COIN = NULL_COIN
exports.COIN = COIN
exports.COIN_TYPE = COIN_TYPE
exports.BLOCKCHAIN_EXPLORER = BLOCKCHAIN_EXPLORER
exports.TESTNET_COIN = TESTNET_COIN
exports.COIN_ABBREVIATIONS = COIN_ABBREVIATIONS
exports.COIN_TYPES = COIN_TYPES
exports.BITCOIN = BITCOIN
exports.ETHEREUM = ETHEREUM
exports.BINANCE_BSC = BINANCE_BSC
exports.SOLANA = SOLANA
exports.RIPPLE = RIPPLE
exports.CARDANO = CARDANO
exports.ADA_PURPOSE = ADA_PURPOSE
exports.ETHEREUM_CLASSIC = ETHEREUM_CLASSIC
exports.TON = TON
exports.STELLAR = STELLAR
exports.SUI = SUI
exports.POLYGON = POLYGON
exports.AVALANCHE = AVALANCHE
exports.DOGECOIN = DOGECOIN
exports.TRON = TRON
exports.BITCOIN_CASH = BITCOIN_CASH
exports.POLKADOT = POLKADOT
exports.LITECOIN = LITECOIN
exports.MONERO = MONERO
exports.TEZOS = TEZOS
exports.ZILLIQA = ZILLIQA
exports.KUSAMA = KUSAMA
exports.EOS = EOS
exports.VECHAIN = VECHAIN
exports.TERRA_LUNA = TERRA_LUNA
exports.BITCOIN_SV = BITCOIN_SV
exports.RAVENCOIN = RAVENCOIN
exports.HORIZEN = HORIZEN
exports.DASH = DASH
exports.FILECOIN = FILECOIN
exports.ZCASH = ZCASH // Not supported ATM
exports.FIRO = FIRO
exports.NAMECOIN = NAMECOIN // Dead project
exports.MAINNET = MAINNET
exports.TESTNET = TESTNET
exports.FAUCET_URLs = FAUCET_URLs
exports.MAINNET_EXPLORER_URLs = MAINNET_EXPLORER_URLs
exports.TESTNET_EXPLORER_URLs = TESTNET_EXPLORER_URLs
exports.COINMARKETCAP_URLs = COINMARKETCAP_URLs
} // exports of const_blockchains.js