Overtorment / Cashier-BTC

💰 Self-hosted Bitcoin payment gateway (฿)
284 stars 100 forks source link

Can we change from Bitcoin to An Altcoin? #21

Open swatchie-1 opened 5 years ago

swatchie-1 commented 5 years ago

Hi, if yes, can we know which settings to change? It says

(node:7211) UnhandledPromiseRejectionWarning: Error: {"result":null,"error":{"code":-5,"message":"Invalid Hilux address"},"id":"21ce350b-fd60-426b-bfc7-a340421bffe3"}

When running nodejs worker.js and npm test.

Appreciate any help we can get.

Overtorment commented 5 years ago

You need to look into https://github.com/bitcoinjs/bitcoinjs-lib and see if it can work with different coins. Cashier-btc relies on this lib.

swatchie-1 commented 5 years ago

It seems to generate its own address using the sha256 hash function. Can't it just obtain a new address from the altcoin-cli command?

Overtorment commented 5 years ago

You can do it here: https://github.com/Overtorment/Cashier-BTC/blob/master/models/signer.js#L133

CryptorClub commented 5 years ago

@Overtorment , I will be appreciated for instruction for coind daemon forked from bitcoin. Maybe on the example of first altcoin pull request we can understand how integrate others.

This is my coin https://github.com/CryptorClub/GreenCoin

Thanks