2018-01-20 20:06:28 +00:00
|
|
|
export const ETH_DEFAULT: DPath = {
|
2017-09-15 19:29:38 +00:00
|
|
|
label: 'Default (ETH)',
|
|
|
|
value: "m/44'/60'/0'/0"
|
|
|
|
};
|
|
|
|
|
2018-01-20 20:06:28 +00:00
|
|
|
export const ETH_TREZOR: DPath = {
|
2017-09-15 19:29:38 +00:00
|
|
|
label: 'TREZOR (ETH)',
|
|
|
|
value: "m/44'/60'/0'/0"
|
|
|
|
};
|
|
|
|
|
2018-01-20 20:06:28 +00:00
|
|
|
export const ETH_LEDGER: DPath = {
|
2017-09-15 19:29:38 +00:00
|
|
|
label: 'Ledger (ETH)',
|
|
|
|
value: "m/44'/60'/0'"
|
|
|
|
};
|
|
|
|
|
2018-01-20 20:06:28 +00:00
|
|
|
export const ETC_LEDGER: DPath = {
|
2017-09-15 19:29:38 +00:00
|
|
|
label: 'Ledger (ETC)',
|
2018-04-16 23:07:00 +00:00
|
|
|
value: "m/44'/60'/160720'/0'"
|
2017-09-15 19:29:38 +00:00
|
|
|
};
|
|
|
|
|
2018-01-20 20:06:28 +00:00
|
|
|
export const ETC_TREZOR: DPath = {
|
2017-09-15 19:29:38 +00:00
|
|
|
label: 'TREZOR (ETC)',
|
|
|
|
value: "m/44'/61'/0'/0"
|
|
|
|
};
|
|
|
|
|
2018-01-20 20:06:28 +00:00
|
|
|
export const ETH_TESTNET: DPath = {
|
|
|
|
label: 'Testnet (ETH)',
|
2017-09-15 19:29:38 +00:00
|
|
|
value: "m/44'/1'/0'/0"
|
|
|
|
};
|
|
|
|
|
2018-01-20 20:06:28 +00:00
|
|
|
export const EXP_DEFAULT: DPath = {
|
|
|
|
label: 'Default (EXP)',
|
2017-09-15 19:29:38 +00:00
|
|
|
value: "m/44'/40'/0'/0"
|
|
|
|
};
|
|
|
|
|
2018-01-20 20:06:28 +00:00
|
|
|
export const UBQ_DEFAULT: DPath = {
|
|
|
|
label: 'Default (UBQ)',
|
|
|
|
value: "m/44'/108'/0'/0"
|
|
|
|
};
|
2017-10-05 23:29:14 +00:00
|
|
|
|
2018-04-06 14:02:02 +00:00
|
|
|
export const POA_DEFAULT: DPath = {
|
|
|
|
label: 'Default (POA)',
|
|
|
|
value: "m/44'/60'/0'/0"
|
|
|
|
};
|
|
|
|
|
|
|
|
export const TOMO_DEFAULT: DPath = {
|
|
|
|
label: 'Default (TOMO)',
|
|
|
|
value: "m/44'/1'/0'/0"
|
|
|
|
};
|
|
|
|
|
|
|
|
export const ELLA_DEFAULT: DPath = {
|
|
|
|
label: 'Default (ELLA)',
|
|
|
|
value: "m/44'/163'/0'/0"
|
|
|
|
};
|
|
|
|
|
2018-05-30 23:57:12 +00:00
|
|
|
export const MUSIC_DEFAULT: DPath = {
|
|
|
|
label: 'Default (MUSIC)',
|
|
|
|
value: "m/44'/60'/0'/0"
|
|
|
|
};
|
|
|
|
|
|
|
|
export const ETSC_DEFAULT: DPath = {
|
|
|
|
label: 'Default (ETSC)',
|
|
|
|
value: "m/44'/1128'/0'/0"
|
|
|
|
};
|
|
|
|
|
|
|
|
export const EGEM_DEFAULT: DPath = {
|
|
|
|
label: 'Default (EGEM)',
|
|
|
|
value: "m/44'/1987'/0'/0"
|
|
|
|
};
|
|
|
|
|
|
|
|
export const CLO_DEFAULT: DPath = {
|
|
|
|
label: 'Default (CLO)',
|
|
|
|
value: "m/44'/820'/0'/0"
|
|
|
|
};
|
|
|
|
|
2018-01-20 20:06:28 +00:00
|
|
|
export const ETH_SINGULAR: DPath = {
|
|
|
|
label: 'SingularDTV',
|
|
|
|
value: "m/0'/0'/0'"
|
2017-09-15 19:29:38 +00:00
|
|
|
};
|
2018-01-20 20:06:28 +00:00
|
|
|
|
2018-06-15 23:28:42 +00:00
|
|
|
export const RSK_TESTNET: DPath = {
|
|
|
|
label: 'Testnet (RSK)',
|
|
|
|
value: "m/44'/37310'/0'/0"
|
|
|
|
};
|
|
|
|
|
2018-07-02 21:37:19 +00:00
|
|
|
export const RSK_MAINNET: DPath = {
|
|
|
|
label: 'Mainnet (RSK)',
|
|
|
|
value: "m/44'/137'/0'/0"
|
|
|
|
};
|
|
|
|
|
2018-06-13 20:39:50 +00:00
|
|
|
export const GO_DEFAULT: DPath = {
|
|
|
|
label: 'Default (GO)',
|
|
|
|
value: "m/44'/6060'/0'/0"
|
|
|
|
};
|
|
|
|
|
2018-06-20 00:41:03 +00:00
|
|
|
export const EOSC_DEFAULT: DPath = {
|
|
|
|
label: 'Default (EOSC)',
|
|
|
|
value: "m/44'/2018'/0'/0"
|
|
|
|
};
|
|
|
|
|
2018-06-25 17:59:39 +00:00
|
|
|
export const ESN_DEFAULT: DPath = {
|
|
|
|
label: 'Default (ESN)',
|
|
|
|
value: "m/44'/31102'/0'/0"
|
|
|
|
};
|
|
|
|
|
2018-02-27 01:20:41 +00:00
|
|
|
export const DPaths: DPath[] = [
|
|
|
|
ETH_DEFAULT,
|
|
|
|
ETH_TREZOR,
|
|
|
|
ETH_LEDGER,
|
|
|
|
ETC_LEDGER,
|
|
|
|
ETC_TREZOR,
|
|
|
|
ETH_TESTNET,
|
|
|
|
EXP_DEFAULT,
|
2018-04-06 14:02:02 +00:00
|
|
|
UBQ_DEFAULT,
|
|
|
|
POA_DEFAULT,
|
|
|
|
TOMO_DEFAULT,
|
2018-05-30 23:57:12 +00:00
|
|
|
ELLA_DEFAULT,
|
|
|
|
MUSIC_DEFAULT,
|
|
|
|
ETSC_DEFAULT,
|
|
|
|
EGEM_DEFAULT,
|
2018-06-13 20:39:50 +00:00
|
|
|
CLO_DEFAULT,
|
2018-07-02 21:37:19 +00:00
|
|
|
RSK_MAINNET,
|
2018-06-15 23:28:42 +00:00
|
|
|
RSK_TESTNET,
|
2018-06-20 00:41:03 +00:00
|
|
|
GO_DEFAULT,
|
2018-06-25 17:59:39 +00:00
|
|
|
EOSC_DEFAULT,
|
|
|
|
ESN_DEFAULT
|
2018-02-27 01:20:41 +00:00
|
|
|
];
|
|
|
|
|
2018-01-20 20:06:28 +00:00
|
|
|
// PATHS TO BE INCLUDED REGARDLESS OF WALLET FORMAT
|
|
|
|
export const EXTRA_PATHS = [ETH_SINGULAR];
|
2018-02-27 01:20:41 +00:00
|
|
|
|
|
|
|
// Full length deterministic wallet paths from BIP44
|
|
|
|
// https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki
|
|
|
|
// normal path length is 4, ledger is the exception at 3
|
|
|
|
|
|
|
|
// m / purpose' / coin_type' / account' / change / address_index
|
|
|
|
// | | | | |
|
|
|
|
// | constant | index | index | 0 or 1 |
|
|
|
|
// |__________|____________|__________|________|
|
|
|
|
|
|
|
|
// whitespace strings are evaluated the same way as nospace strings, except they allow optional spaces between each portion of the string
|
|
|
|
// ie. "m / 44' / 0' / 0'" is valid, "m / 4 4' / 0' / 0'" is invalid
|
2018-04-16 23:07:00 +00:00
|
|
|
export const dPathRegex = /m\/44'\/[0-9]+\'\/[0-9]+(\'+$|\'+(\/[0-1]+$))/;
|
2018-02-27 01:20:41 +00:00
|
|
|
// export const whitespaceDPathRegex = /m\s*\/\s*44'\s*\/\s*[0-9]+\'\s*\/\s*[0-9]+(\'+$|\'+\s*(\/\s*[0-1]+$))/;
|