Giter Club home page Giter Club logo

Comments (7)

Ayms avatar Ayms commented on August 17, 2024 1

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.

Ayms avatar Ayms commented on August 17, 2024 1

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.

matmaer avatar matmaer commented on August 17, 2024

hi there, I'd like to help....

from bitcoin-transactions.

Ayms avatar Ayms commented on August 17, 2024

Thanks but this is successfully tested now

Repo and examples updated, please see example-4.js

from bitcoin-transactions.

5-digits avatar 5-digits commented on August 17, 2024

Is there any script to run bch on Tetsnet Network ?

from bitcoin-transactions.

5-digits avatar 5-digits commented on August 17, 2024

I mean how to generate ( BCH testnet address) also pass transaction throw it

from bitcoin-transactions.

5-digits avatar 5-digits commented on August 17, 2024

Ok thank you @Ayms my issue resolved

from bitcoin-transactions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.