2

I have Successfully integrated Bitcoin To get payment so to verify Transaction from given address, I use https://blockchain.info/multiaddr?active=$address|$address , which is working for Bitcoin.

So now I want to integrate Bitcoin Cash. For Bitcoin cash what is the base URL from blockchain.info.

I search for this many places. I am not able to find a solution.

Plz suggest me to integrate for test net for bitcoin cash too.

3
  • Blockchain info doesn't have a Bitcoin Cash API.
    – MCCCS
    Apr 3 '18 at 7:37
  • Hello manoj, are you find any api for Bitcoin cash, if you find, please tell me which is you are using for Bitcoin cash May 14 '18 at 7:00
  • @rajanasekhar I am using bitcoincashjs library for bitcoin cash which supports test net, I am writing solution for this on answer section :)
    – manoj
    May 20 '18 at 4:26
1

Have a look at these. I think this may help you.

https://github.com/owstack/bch-explorer-api

https://bch.btc.com/api-doc

1
  • 1
    Hi, these are not working for Bitcoin Cash May 14 '18 at 6:54
1

You would have to use separate URL for that.

https://bitcoincash.blockexplorer.com/

1

Use bitcoincashjs Library

const bitcore = require('bitcoincashjs');

const HdPublicKey = new bitcore.HDPublicKey.fromString(xpubKey);
            const derivedPublicKey = HdPublicKey.derive("m/0/" + index).publicKey;
            const address = derivedPublicKey.toAddress();
            requestObj.BCHAddress = address.toString();

to verify Transaction use blocktrail-sdk

const blocktrail = require('blocktrail-sdk');
const client = blocktrail.BlocktrailSDK({
    apiKey: apiKey,
    apiSecret: apiSecret,
    network: "BCC",
    testnet: false
});

then you can call many function of client like

    client.addressTransactions(bitAddress[i].BCHAddress,
     async function (err, addressTxs) {
         //Code here 
    });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.