Page MenuHomePhabricator

config.ts
No OneTemporary

config.ts

// Copyright (c) 2024 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
import { SendMessageOptions } from 'node-telegram-bot-api';
interface CryptoSlug {
coingeckoSlug: string;
ticker: string;
}
export type FiatCode = 'usd' | 'eur' | 'gbp' | 'jpy';
export interface HeraldPriceApi {
apiBase: string;
cryptos: CryptoSlug[];
fiat: FiatCode;
precision: number;
}
export interface HeraldConfig {
cacheTtlMsecs: number;
xecSendDisplayCount: number;
chronik: string[];
blockExplorer: string;
tokenLandingBase: string;
priceApi: HeraldPriceApi;
fiatReference: { usd: string; jpy: string; eur: string; gbp: string };
stakingRewardApiUrl: string;
ifpAddress: string;
tgMsgOptions: SendMessageOptions;
whaleSats: {
bigWhale: number;
// 10 billion xec
modestWhale: number;
// 5 billion xec
shark: number;
// 1 billion xec
swordfish: number;
// 700 million xec
barracuda: number;
// 500 million xec
octopus: number;
// 250 million xec
piranha: number;
// 100 million xec
crab: number;
// anything under 100 million xec
shrimp: number;
};
emojis: {
agora: string;
volume: string;
agoraBuy: string;
agoraList: string;
agoraCancel: string;
alias: string;
alp: string;
invalid: string;
nft: string;
mintvault: string;
block: string;
miner: string;
staker: string;
stakingNode: string;
xecSend: string;
arrowRight: string;
tokenBurn: string;
tokenGenesis: string;
tokenSend: string;
tokenMint: string;
tokenFixed: string;
gift: string;
bank: string;
app: string;
token: string;
fusion: string;
cashtabMsg: string;
cashtabEncrypted: string;
payButton: string;
swap: string;
airdrop: string;
paywall: string;
authentication: string;
unknown: string;
memo: string;
bigWhale: string;
modestWhale: string;
shark: string;
swordfish: string;
barracuda: string;
octopus: string;
piranha: string;
crab: string;
shrimp: string;
priceUp: string;
priceDown: string;
};
}
const config: HeraldConfig = {
cacheTtlMsecs: 1000 * 60 * 60 * 4, // 4 hours
xecSendDisplayCount: 12,
/**
* chronik servers must be indexed with agora.py plugin
* for full herald functionality
*/
chronik: [
'https://chronik-native1.fabien.cash',
'https://chronik-native2.fabien.cash',
'https://chronik.pay2stay.com/xec2',
],
blockExplorer: 'https://explorer.e.cash',
tokenLandingBase: 'https://cashtab.com/#/token',
priceApi: {
apiBase: 'https://api.coingecko.com/api/v3/simple/price',
cryptos: [
{ coingeckoSlug: 'ecash', ticker: 'XEC' },
{ coingeckoSlug: 'bitcoin', ticker: 'BTC' },
{ coingeckoSlug: 'ethereum', ticker: 'ETH' },
],
fiat: 'usd',
precision: 8,
},
fiatReference: { usd: '$', jpy: 'ยฅ', eur: 'โ‚ฌ', gbp: 'ยฃ' },
stakingRewardApiUrl: 'https://avalanche.cash/api/nextstakingreward',
ifpAddress: 'ecash:prfhcnyqnl5cgrnmlfmms675w93ld7mvvqd0y8lz07',
tgMsgOptions: {
parse_mode: 'HTML',
disable_web_page_preview: true,
},
whaleSats: {
// 20 billion xec
bigWhale: 2000000000000,
// 10 billion xec
modestWhale: 1000000000000,
// 5 billion xec
shark: 500000000000,
// 1 billion xec
swordfish: 100000000000,
// 700 million xec
barracuda: 70000000000,
// 500 million xec
octopus: 50000000000,
// 250 million xec
piranha: 25000000000,
// 100 million xec
crab: 10000000000,
// anything under 100 million xec
shrimp: 0,
},
emojis: {
agora: '๐Ÿ›',
volume: '๐Ÿ”Š',
agoraBuy: '๐Ÿ’ฐ',
agoraList: '๐Ÿท',
agoraCancel: 'โŒ',
alias: '๐Ÿ‘พ',
alp: '๐Ÿ—ป',
invalid: 'โŒ',
nft: '๐Ÿ–ผ',
mintvault: '๐Ÿงฉ',
block: '๐Ÿ“ฆ',
miner: 'โ›๏ธ',
staker: '๐Ÿ’ฐ',
stakingNode: '๐Ÿงฎ',
xecSend: '๐Ÿ’ธ',
arrowRight: 'โžก๏ธ',
tokenBurn: '๐Ÿ”ฅ',
tokenGenesis: '๐Ÿงช',
tokenSend: '๐ŸŽŸ',
tokenMint: '๐Ÿ”จ',
tokenFixed: '๐Ÿ”’',
gift: '๐ŸŽ',
bank: '๐Ÿฆ',
app: '๐Ÿ“ฑ',
token: '๐Ÿช™',
fusion: 'โš›๏ธ',
cashtabMsg: '๐Ÿ–‹',
cashtabEncrypted: '๐Ÿ”',
payButton: '๐Ÿ›’',
swap: '๐Ÿคณ',
airdrop: '๐Ÿช‚',
paywall: '๐Ÿ’ธ',
authentication: '๐Ÿ”“',
unknown: 'โ“',
memo: '๐Ÿ—ž',
bigWhale: '๐Ÿ‹',
modestWhale: '๐Ÿณ',
shark: '๐Ÿฆˆ',
swordfish: '๐Ÿฌ',
barracuda: '๐Ÿ ',
octopus: '๐Ÿ™',
piranha: '๐Ÿก',
crab: '๐Ÿฆ€',
// Most addresses seen by the app are shrimp, so use empty string
shrimp: '',
priceUp: '๐Ÿ“ˆ',
priceDown: '๐Ÿ“‰',
},
};
export default config;

File Metadata

Mime Type
text/x-java
Expires
Wed, May 21, 23:10 (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5866137
Default Alt Text
config.ts (5 KB)

Event Timeline