Getting started as a bitcoin cash merchant

So I've spent some time looking into various APIs and services, trying to get a basic merchant setup working usable for development, with a working testnet. The quality of the services offered and documentation is lacking, to say the least.

So I've taken a step back and decided I would try to get this working from "first principles", basically setting up a node and using the related APIs. I first tried the BCHD node which was looking promising, until the testnet version of it got into a loop where it kept complaining about some invalid transactions over and over and never seemed to recover.

The I tried "Bitcoin Cash Node", which is an awful name for search engines btw. It could really need a more unique and searchable name. After some struggle and careful reading of startup options and configuration files, I managed to get nodes up an running (testnet and mainnet) and in such a state that they answer to REST and JSONRPC calls.

I have transferred some bitcoin on testnet to a know address, using a public "faucet" that works (also a bit hard to find). I know that I managed to get that part working, as I've successfully looked up the balance of that address using a few of the public blockchain lookup tools.

What I havent' quite figured out is how to look up that address on my locally running node. Most of the API deals with transactions, not addresses. There aren't many APIs that accept addresses. scantxoutset might work, but it uses terms as "scan", which indicates it's not a "low cost" operation (which I would expect).

So I'm wondering, does this really mean that most bitcoin nodes really isn't usable for looking up addresses?? Or to turn it around, can anybody recommend bitcoin cash nodes that offers an easy to use API for looking up payment related things, like addresses?

Final note, I know how wallets etc work. The reason I'm trying to implement similar functionality from scratch is to understand all the details. And because a merchant typically can't just accept the current limited functionality with wallets, which seems focused on a single user's need, not what a merchant would need (gap issue etc).

And fwiw, I've also tested the "bitbox" API (which does not have a working testnet) and "fullstack" API (which has a working testnet, although documentation isn't complete). So I know about other ways of doing similar stuff. I'm just trying to minimize the number of external things I need to depend on while also figuring out how this can be done straight from running nodes.

submitted by /u/kjeldahl
[link] [comments]

source https://www.reddit.com/r/btc/comments/ig7mlf/getting_started_as_a_bitcoin_cash_merchant/

Comments