2014-04-16 21:43:34 +02:00
|
|
|
// https://en.bitcoin.it/wiki/List_of_address_prefixes
|
2014-04-30 00:07:15 +02:00
|
|
|
// Dogecoin BIP32 is a proposed standard: https://bitcointalk.org/index.php?topic=409731
|
2018-12-27 09:15:24 +01:00
|
|
|
export type Network = {
|
2018-12-26 08:13:43 +01:00
|
|
|
messagePrefix: string;
|
|
|
|
bech32: string;
|
|
|
|
bip32: bip32;
|
|
|
|
pubKeyHash: number;
|
|
|
|
scriptHash: number;
|
|
|
|
wif: number;
|
|
|
|
}
|
|
|
|
|
2018-12-27 09:15:24 +01:00
|
|
|
type bip32 = {
|
2018-12-26 08:13:43 +01:00
|
|
|
public: number;
|
|
|
|
private: number;
|
|
|
|
}
|
2014-06-17 08:48:06 +02:00
|
|
|
|
2018-12-26 08:13:43 +01:00
|
|
|
export const bitcoin: Network = {
|
|
|
|
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
|
|
|
bech32: 'bc',
|
|
|
|
bip32: {
|
|
|
|
public: 0x0488b21e,
|
|
|
|
private: 0x0488ade4
|
2014-04-16 21:43:34 +02:00
|
|
|
},
|
2018-12-26 08:13:43 +01:00
|
|
|
pubKeyHash: 0x00,
|
|
|
|
scriptHash: 0x05,
|
|
|
|
wif: 0x80
|
|
|
|
}
|
|
|
|
export const regtest: Network = {
|
|
|
|
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
|
|
|
bech32: 'bcrt',
|
|
|
|
bip32: {
|
|
|
|
public: 0x043587cf,
|
|
|
|
private: 0x04358394
|
|
|
|
},
|
|
|
|
pubKeyHash: 0x6f,
|
|
|
|
scriptHash: 0xc4,
|
|
|
|
wif: 0xef
|
|
|
|
}
|
|
|
|
export const testnet: Network = {
|
|
|
|
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
|
|
|
bech32: 'tb',
|
|
|
|
bip32: {
|
|
|
|
public: 0x043587cf,
|
|
|
|
private: 0x04358394
|
2018-11-15 07:32:03 +01:00
|
|
|
},
|
2018-12-26 08:13:43 +01:00
|
|
|
pubKeyHash: 0x6f,
|
|
|
|
scriptHash: 0xc4,
|
|
|
|
wif: 0xef
|
2014-05-16 07:39:17 +02:00
|
|
|
}
|