Comments (7)
It works as it is if you change only the magic network number and port (to send the complete transaction to testnet, or you can just send the body transaction from a testnet explorer without modifying anything) using mainnet-like addresses
The complete modification in https://github.com/Ayms/bitcoin-transactions/blob/master/tx.js#L108-L123 is:
VERSION=2;
SIGHASH_FORKID=0x00000040;
FORKID_IN_USE=0;
MAIN=0xF4F3E5F4;
VERSION_='BCH'; //testnet
p2pk=new Buffer('6f','hex');
p2sh=new Buffer('c4','hex');
PRIV=new Buffer('ef','hex');
BIP143=true;
PORT=18333;
LASTBLOCK=500000;
PROTOCOL=70015;
NOSEGWIT.push('m');
NOSEGWIT.push('q');
BECH32.push('q');
BECH32.push('p');
from bitcoin-transactions.
That's what I wrote above, what is not clear?
You can use node tx.js BCH create ...
with mainnet addresses (that will be converted to testnet ones in the output of the command if you make the above modifications) or testnet addresses, and once you have the tx use node tx.js BCH send tx testnet_node
To generate/convert addresses you can also use convert
in https://github.com/Ayms/bitcoin-wallets (using new Buffer('6f','hex') or new Buffer('c4','hex'))
from bitcoin-transactions.
hi there, I'd like to help....
from bitcoin-transactions.
Thanks but this is successfully tested now
Repo and examples updated, please see example-4.js
from bitcoin-transactions.
Is there any script to run bch on Tetsnet Network ?
from bitcoin-transactions.
I mean how to generate ( BCH testnet address) also pass transaction throw it
from bitcoin-transactions.
Ok thank you @Ayms my issue resolved
from bitcoin-transactions.
Related Issues (20)
- Add Bitcoin Platinium (?)
- Add Lightning Bitcoin HOT 1
- Add Bitcoin Cash Plus HOT 2
- Add Bitcoin X (?) HOT 1
- Add Bitcoin Atom HOT 1
- Add Bitcoin Candy HOT 1
- Add Bitcoin Community "BTSQ", Bitcoin King "BCK", Bitcoin Pay "BTP", Bitcoin Top "BTT", Bitcoin Vote "BTV", Bitcoin Hot "BTH", Bitcoin New "BTN", Bitcoin X "BCX", Bitcoin Faith "BTF", Bitcoin World "BTW", World Bitcoin "WBTC"
- Tutorial to claim/move coins HOT 1
- Implement Segwit P2WPKH and P2WSH HOT 1
- Add Litecoin Cash HOT 1
- check_p2sh_script code somewhat obfuscated. HOT 2
- Add cashaddress support HOT 1
- TX decode failed. Code:-22 HOT 8
- Question about parameters HOT 3
- Add BCBC HOT 1
- Erro create transaction testnet HOT 1
- Please support BTC2 claim HOT 2
- Document is not Defined Error HOT 2
- How to use with an Electrum 2FA wallet HOT 5
- Feature request: Coin fork scanner HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitcoin-transactions.