-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add Digibyte Support #353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Digibyte Support #353
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| node_modules | ||
| bitcoinjs-min.js | ||
| digibytejs-min.js | ||
| coverage |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,129 +2,19 @@ | |
| // Dogecoin BIP32 is a proposed standard: https://bitcointalk.org/index.php?topic=409731 | ||
|
|
||
| var networks = { | ||
| bitcoin: { | ||
| magicPrefix: '\x18Bitcoin Signed Message:\n', | ||
| digibyte: { | ||
| magicPrefix: '\x18Digibyte Signed Message:\n', | ||
| bip32: { | ||
| public: 0x0488b21e, | ||
| private: 0x0488ade4 | ||
| }, | ||
| pubKeyHash: 0x00, | ||
| scriptHash: 0x05, | ||
| wif: 0x80, | ||
| dustThreshold: 546, // https://github.com/bitcoin/bitcoin/blob/v0.9.2/src/core.h#L151-L162 | ||
| feePerKb: 10000, // https://github.com/bitcoin/bitcoin/blob/v0.9.2/src/main.cpp#L53 | ||
| estimateFee: estimateFee('bitcoin') | ||
| }, | ||
| testnet: { | ||
| magicPrefix: '\x18Bitcoin Signed Message:\n', | ||
| bip32: { | ||
| public: 0x043587cf, | ||
| private: 0x04358394 | ||
| }, | ||
| pubKeyHash: 0x6f, | ||
| scriptHash: 0xc4, | ||
| wif: 0xef, | ||
| dustThreshold: 546, | ||
| feePerKb: 10000, | ||
| estimateFee: estimateFee('testnet') | ||
| }, | ||
| litecoin: { | ||
| magicPrefix: '\x19Litecoin Signed Message:\n', | ||
| bip32: { | ||
| public: 0x019da462, | ||
| private: 0x019d9cfe | ||
| }, | ||
| pubKeyHash: 0x30, | ||
| scriptHash: 0x05, | ||
| wif: 0xb0, | ||
| dustThreshold: 0, // https://github.com/litecoin-project/litecoin/blob/v0.8.7.2/src/main.cpp#L360-L365 | ||
| dustSoftThreshold: 100000, // https://github.com/litecoin-project/litecoin/blob/v0.8.7.2/src/main.h#L53 | ||
| feePerKb: 100000, // https://github.com/litecoin-project/litecoin/blob/v0.8.7.2/src/main.cpp#L56 | ||
| estimateFee: estimateFee('litecoin') | ||
| }, | ||
| dogecoin: { | ||
| magicPrefix: '\x19Dogecoin Signed Message:\n', | ||
| bip32: { | ||
| public: 0x02facafd, | ||
| private: 0x02fac398 | ||
| }, | ||
| pubKeyHash: 0x1e, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as |
||
| scriptHash: 0x16, | ||
| wif: 0x9e, | ||
| dustThreshold: 0, // https://github.com/dogecoin/dogecoin/blob/v1.7.1/src/core.h#L155-L160 | ||
| dustSoftThreshold: 100000000, // https://github.com/dogecoin/dogecoin/blob/v1.7.1/src/main.h#L62 | ||
| feePerKb: 100000000, // https://github.com/dogecoin/dogecoin/blob/v1.7.1/src/main.cpp#L58 | ||
| estimateFee: estimateFee('dogecoin') | ||
| }, | ||
| viacoin: { | ||
| magicPrefix: '\x18Viacoin Signed Message:\n', | ||
| bip32: { | ||
| public: 0x0488b21e, | ||
| private: 0x0488ade4 | ||
| }, | ||
| pubKeyHash: 0x47, | ||
| scriptHash: 0x21, | ||
| wif: 0xc7, | ||
| dustThreshold: 560, | ||
| dustSoftThreshold: 100000, | ||
| feePerKb: 100000, // | ||
| estimateFee: estimateFee('viacoin') | ||
| }, | ||
| viacointestnet: { | ||
| magicPrefix: '\x18Viacoin Signed Message:\n', | ||
| bip32: { | ||
| public: 0x043587cf, | ||
| private: 0x04358394 | ||
| }, | ||
| pubKeyHash: 0x7f, | ||
| scriptHash: 0xc4, | ||
| wif: 0xff, | ||
| dustThreshold: 560, | ||
| dustSoftThreshold: 100000, | ||
| feePerKb: 100000, | ||
| estimateFee: estimateFee('viacointestnet') | ||
| }, | ||
| gamerscoin: { | ||
| magicPrefix: '\x19Gamerscoin Signed Message:\n', | ||
| bip32: { | ||
| public: 0x019da462, | ||
| private: 0x019d9cfe | ||
| }, | ||
| pubKeyHash: 0x26, | ||
| scriptHash: 0x05, | ||
| wif: 0xA6, | ||
| dustThreshold: 0, // https://github.com/gamers-coin/gamers-coinv3/blob/master/src/main.cpp#L358-L363 | ||
| dustSoftThreshold: 100000, // https://github.com/gamers-coin/gamers-coinv3/blob/master/src/main.cpp#L51 | ||
| feePerKb: 100000, // https://github.com/gamers-coin/gamers-coinv3/blob/master/src/main.cpp#L54 | ||
| estimateFee: estimateFee('gamerscoin') | ||
| }, | ||
| jumbucks: { | ||
| magicPrefix: '\x19Jumbucks Signed Message:\n', | ||
| bip32: { | ||
| public: 0x037a689a, | ||
| private: 0x037a6460 | ||
| }, | ||
| pubKeyHash: 0x2b, | ||
| scriptHash: 0x05, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as |
||
| wif: 0xab, | ||
| dustThreshold: 0, | ||
| dustSoftThreshold: 10000, | ||
| feePerKb: 10000, | ||
| estimateFee: estimateFee('jumbucks') | ||
| }, | ||
| zetacoin: { | ||
| magicPrefix: '\x18Zetacoin Signed Message:\n', | ||
| bip32: { | ||
| public: 0x0488b21e, | ||
| private: 0x0488ade4 | ||
| }, | ||
| pubKeyHash: 0x50, | ||
| scriptHash: 0x09, | ||
| wif: 0xe0, | ||
| dustThreshold: 546, // https://github.com/zetacoin/zetacoin/blob/master/src/core.h#L159 | ||
| feePerKb: 10000, // https://github.com/zetacoin/zetacoin/blob/master/src/main.cpp#L54 | ||
| estimateFee: estimateFee('zetacoin') | ||
| } | ||
| wif: 0x80, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as |
||
| dustThreshold: 546, // | ||
| feePerKb: 10000, // | ||
| estimateFee: estimateFee('digibyte') | ||
| } | ||
| } | ||
|
|
||
| function estimateFee(type) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both the same as
bitcoin