Api Base URL for Bitcoin Cash

2

1

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.

manoj

Posted 2018-04-03T06:05:54.923

Reputation: 121

Blockchain info doesn't have a Bitcoin Cash API.MCCCS 2018-04-03T07:37:07.917

Hello manoj, are you find any api for Bitcoin cash, if you find, please tell me which is you are using for Bitcoin cashrajana sekhar 2018-05-14T07:00:06.637

@rajanasekhar I am using bitcoincashjs library for bitcoin cash which supports test net, I am writing solution for this on answer section :)manoj 2018-05-20T04:26:03.020

Answers

0

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 
    });

manoj

Posted 2018-04-03T06:05:54.923

Reputation: 121

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

Prayag k

Posted 2018-04-03T06:05:54.923

Reputation: 134

Hi, these are not working for Bitcoin Cashrajana sekhar 2018-05-14T06:54:15.307

1

You would have to use separate URL for that.

https://bitcoincash.blockexplorer.com/

VJV

Posted 2018-04-03T06:05:54.923

Reputation: 21