Closed vipertechofficial closed 3 years ago
We only officially support Bitcoin.
Other coins similar to bitcoin are easy to use with this library due to all network-specific parameters being contained in the network object. So if you know all the parameters needed for your coin, it should work.
However, that being said some coins change a lot of things from bitcoin. Especially if the transaction format changes or the address format changes beyond a version number change (ie. byte length of version grows etc.).
For those types of coins, this library will not work for those areas where bitcoin and that coin differ.
Whether or not those coins are compatible or not is something the developer must look into.
I am fairly certain LTC will work with only a network object change.
Ok I'll get myself to get ok with theses other coins {{maybe}} using this library.
@vipertechofficial try to use my libraries, I think it will solve your problems: https://www.npmjs.com/~andersonjuhasc
@vipertechofficial for Dogecoin I did this: https://gist.github.com/Anderson-Juhasc/e6975cc51116742b650d1d9cefffa4af
@Anderson-Juhasc Thanks
@Anderson-Juhasc "https://github.com/cryptocoinjs/coininfo " is very useful but wrong for zcash and doge.
Work with my example using coininfo and your gist for doge and by the way your bip84 lib looks cool!
`
I can't find the right zcash network param, can you?
zcash address version bytes are 2 bytes long.
bitcoinjs-lib only supports 1 byte versions.
@vipertechofficial you can try here https://iancoleman.io/bip39/
Useful for those who want to estimate fees without hard parameters. [OT but relevant]
function get_btc_fee_per_byte(callback_function) {
function extract_value(error, result) {
if(!error) {
const satoshi = result.data.suggested_transaction_fee_per_byte_sat;
callback_function(null, satoshi);
}else {
callback_function(error, null);
}
}
loadJSON("https://api.blockchair.com/bitcoin/stats", extract_value)
}
Okay for those who want to be able to use any coins mentioned in the issue's title, just put the piece together with https://github.com/bitcoinjs/bitcoinjs-lib/pull/1351/commits/38e0f833504e68bff32ddf80e23b969111a01e0a too and that's it.
Thanks to all.
@vipertechofficial Hi, I try create zcash
wallet from mnemonic
but get some errors. I use "bitcoinjs-lib": "5.1.1"
& "coininfo": "^5.2.1"
. Can you guide me?
This code is actually working great without managing error, yet I've asked myself if it was possible to do the same for the crypto in the issues' title...
In the documentation it seems to be said that the network parameter object need to be configured as such, yet 1) we're talking about not the testnet and some issues refer to use
https://github.com/cryptocoinjs/coininfo
to generate this network object for testnet and other currency.Hacking a bit the way (we) can use issues, I will prefer to post my solutions in comments until everything will work, so if someone find a better way or solutions before me, please, write it down, I am pretty sure this issue will help a lot of developer.
As soon as all the solutions are found and tested, this issue should be closed.
PS: I use sochain.com api.