1

I've recently been introduced to bcoin. In the documentation, it's stated that bcoin's RPC interface is similar to that of Bitcoin Core but after syncing my node, I can't find a way to set up a JSON RPC Server on Bcoin to communicate with my app. The documentation clearly does not specify any methods such as rpcuser, rpcbind, rpcpassword values. Is there a way to set this up with bcoin in the bcoin.conf file?

2
  • 1
    Right under the introduction paragraph is a section on authentication: bcoin.io/api-docs/#authentication, did you try that?
    – Murch
    Aug 5, 2022 at 21:05
  • Yes @Murch, I've tried that. When I try connecting it asks for the user and password after replacing api-key. So I'm really confused! Aug 5, 2022 at 21:38

1 Answer 1

1

See the configuration guide in the bcoin repo: https://github.com/bcoin-org/bcoin/blob/master/docs/configuration.md

bcoin uses an API key for authentication, without username.

Bcoin always runs with an RPC interface, whether or not an api key has been set.

If you have any more questions, join us on telegram: https://t.me/bcoinorg

Example:

# start the server
$ bcoin --network=regtest --daemon

# Make an rpc request
$ bcoin-cli --network=regtest rpc getinfo
{
  "version": "2.1.2",
  "protocolversion": 70015,
  "walletversion": 0,
  "balance": 0,
  "blocks": 0,
  "timeoffset": 0,
  "connections": 0,
  "proxy": "",
  "difficulty": 4.6565423739069247e-10,
  "testnet": true,
  "keypoololdest": 0,
  "keypoolsize": 0,
  "unlocked_until": 0,
  "paytxfee": 0.0002,
  "relayfee": 0.00001,
  "errors": ""
}
1
  • Ok, let me try it out without an api-key. Aug 5, 2022 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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