Skip to content

Commit c04e3c3

Browse files
feat: add chains and tokens
* Add token tracking for L2 tokens of chains including: Meowcoin, Ravencoin, Evrmore, and Neoxa. * Add basic chain support for 5gcash, bitcoincandy, bitcoinz, bzedge, cloreai, commercium, dogecash, dynamo, firo, flits, frenchdigital, frencoin, gemlink, horizen, ilcoin, komodo, litecoinz, pivx, raptoreum, ravencoin-classic, satoxcoin, veruscoin, zelcash, and zero. * Add type MainNetBasic to allow for basic defintion of coin pending upcoming additions of network definitions. v1.10.0
1 parent 5dce20d commit c04e3c3

File tree

128 files changed

+1103
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+1103
-16
lines changed

src/chains/5gcash/base.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Common } from '../../types/base';
2+
3+
export const common: Common = {
4+
name: '5gcash',
5+
// https://github.com/5G-Cash/5G/blob/b9f3ae4a6f4c24e744fbbb3dea035d473ef905e8/src/amount.h#L17
6+
decimalPlaces: 1e8,
7+
// https://github.com/5G-Cash/5G/blob/b9f3ae4a6f4c24e744fbbb3dea035d473ef905e8/src/amount.cpp#L10
8+
unit: 'VGC',
9+
symbol: 'vgc',
10+
messagePrefix: '\u0018Bitcoin Signed Message:\n',
11+
// https://github.com/5G-Cash/5G/blob/main/src/qt/transactionrecord.h#L89
12+
confirmations: 6,
13+
website: 'https://fiveg.cash/',
14+
projectUrl: 'https://github.com/5g-cash/5g'
15+
};

src/chains/5gcash/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { mainnet } from './mainnet';
2+
import { Networks } from '../../types/base';
3+
4+
export const vgc: Networks = {
5+
mainnet,
6+
};

src/chains/5gcash/mainnet.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { MainNet } from '../../types/base';
2+
import { common } from './base';
3+
4+
export const mainnet: MainNet = {
5+
...common,
6+
id: 'A44223B1-CEE2-4EE6-B331-36A6BF608A69',
7+
network: 'mainnet',
8+
// https://github.com/5G-Cash/5G/blob/main/src/chainparams.cpp#L177
9+
hashGenesisBlock:
10+
'0x000000b3cf5064a01dcdc8931f5bae3cc38c6af1aec07f4459903e9eebae986a',
11+
// https://github.com/5G-Cash/5G/blob/main/src/chainparams.cpp#L164
12+
port: 22020,
13+
// https://github.com/5G-Cash/5G/blob/main/src/chainparamsbase.cpp
14+
portRpc: 22019,
15+
protocol: {
16+
// https://github.com/5G-Cash/5G/blob/main/src/chainparams.cpp#L159
17+
magic: 0xc8a63bfc,
18+
},
19+
// https://github.com/5G-Cash/5G/blob/main/src/chainparams.cpp#L182
20+
seedsDns: [
21+
'node1.fiveg.cash',
22+
'node2.fiveg.cash',
23+
],
24+
versions: {
25+
// https://en.bitcoin.it/wiki/BIP_0032
26+
bip32: {
27+
// https://github.com/5G-Cash/5G/blob/main/src/chainparams.cpp#L195
28+
private: 0x0221312b,
29+
// https://github.com/5G-Cash/5G/blob/main/src/chainparams.cpp#L194
30+
public: 0x022d2533,
31+
},
32+
// https://github.com/5G-Cash/5G/blob/main/src/chainparams.cpp#L193
33+
private: 0xd2,
34+
// https://github.com/5G-Cash/5G/blob/main/src/chainparams.cpp#L191
35+
public: 0x0a,
36+
// https://github.com/5G-Cash/5G/blob/main/src/chainparams.cpp#L192
37+
scripthash: 0x0b,
38+
},
39+
};

src/chains/bitcoin/base.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ export const common: Common = {
1414
'\x19Bitcoin Signed Message:\n',
1515
],
1616
// https://github.com/bitcoin/bitcoin/blob/01e1627e25bc5477c40f51da03c3c31b609a85c9/src/qt/transactionrecord.h#L76
17-
confirmations: 6
17+
confirmations: 6,
18+
website: 'https://bitcoincore.org/',
19+
projectUrl: 'https://github.com/bitcoin/bitcoin',
1820
};

src/chains/bitcoincandy/base.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Common } from '../../types/base';
2+
3+
export const common: Common = {
4+
name: 'Bitcoin Candy',
5+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/master/src/amount.h#L116
6+
decimalPlaces: 1e5,
7+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/master/src/amount.cpp#L10
8+
unit: 'CDY',
9+
symbol: 'cdy',
10+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/aa72d2440ed5b7f07bef017aa6f8465d06162ff2/src/validation.cpp#L98C38-L98C69
11+
messagePrefix: 'Bitcoin Candy Signed Message:\n',
12+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/aa72d2440ed5b7f07bef017aa6f8465d06162ff2/src/qt/transactionrecord.h#L99
13+
confirmations: 6,
14+
website: 'https://cdy.one/',
15+
projectUrl: 'https://github.com/bitcoincandyofficial/bitcoincandy'
16+
};

src/chains/bitcoincandy/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { mainnet } from './mainnet';
2+
import { Networks } from '../../types/base';
3+
4+
export const cdy: Networks = {
5+
mainnet,
6+
};

src/chains/bitcoincandy/mainnet.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import { MainNet } from '../../types/base';
2+
import { common } from './base';
3+
4+
export const mainnet: MainNet = {
5+
...common,
6+
id: '4313D1BD-1AFC-4927-8FD4-A5FA8AA62EBA',
7+
network: 'mainnet',
8+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/master/src/chainparams.cpp#L246
9+
hashGenesisBlock:
10+
'0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f',
11+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/master/src/chainparams.cpp#L231
12+
port: 8367,
13+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/master/src/chainparamsbase.cpp#L34
14+
portRpc: 8366,
15+
protocol: {
16+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/master/src/chainparams.cpp#L216
17+
magic: 0xd9c4c3e3,
18+
},
19+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/master/src/chainparams.cpp#L255
20+
seedsDns: [
21+
"seed.cdy.one",
22+
"cdyseed1.awmlite.com",
23+
"cdyseed2.awmlite.com",
24+
"block.cdy.one",
25+
"seed.bitcdy.com",
26+
],
27+
versions: {
28+
// https://en.bitcoin.it/wiki/BIP_0032
29+
bip32: {
30+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/master/src/chainparams.cpp#L266
31+
private: 0x0488ade4,
32+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/master/src/chainparams.cpp#L265
33+
public: 0x0488b21e,
34+
},
35+
bip44: 1145,
36+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/master/src/chainparams.cpp#L264
37+
private: 0x80,
38+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/master/src/chainparams.cpp#L262
39+
public: 0x1c,
40+
// https://github.com/bitcoincandyofficial/bitcoincandy/blob/master/src/chainparams.cpp#L263
41+
scripthash: 0x58,
42+
},
43+
};

src/chains/bitcoincash/base.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ export const common: Common = {
99
messagePrefix: 'eCash Signed Message:\n',
1010
// https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/src/qt/transactionrecord.h#L100
1111
algorithm: 'zhash',
12-
confirmations: 6
12+
confirmations: 6,
13+
website: 'https://bch.info',
14+
projectUrl: 'https://gitlab.com/bitcoin-cash-node/'
1315
};

src/chains/bitcoingold/base.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ export const common: Common = {
88
/** https://github.com/BTCGPU/BTCGPU/blob/71894be9e4eb573643d85a33d28247b95db1d998/src/validation.cpp#L251 */
99
messagePrefix: 'Bitcoin Gold Signed Message:\n',
1010
algorithm: 'zhash',
11-
confirmations: 6
11+
confirmations: 6,
12+
website: 'https://btgofficial.org/',
13+
projectUrl: 'https://github.com/BTCGPU/BTCGPU'
1214
};

src/chains/bitcoinz/base.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Common } from '../../types/base';
2+
3+
export const common: Common = {
4+
name: 'Bitcoinz',
5+
// https://github.com/btcz/bitcoinz/blob/master/src/amount.h#L16
6+
decimalPlaces: 1e8,
7+
// https://github.com/btcz/bitcoinz/blob/master/src/amount.cpp#L11
8+
unit: 'BTCZ',
9+
symbol: 'btcz',
10+
// https://github.com/btcz/bitcoinz/blob/fbf3d85b876224edaee0e3ebbe5d225880416278/src/main.cpp#L112
11+
messagePrefix: 'BitcoinZ Signed Message:\n',
12+
// https://github.com/btcz/bitcoinz/blob/fbf3d85b876224edaee0e3ebbe5d225880416278/src/wallet/wallet.h#L74
13+
confirmations: 3,
14+
website: 'https://getbtcz.com/',
15+
projectUrl: 'https://github.com/btcz/bitcoinz',
16+
};

0 commit comments

Comments
 (0)