Closed lesterli closed 4 months ago
let's also add a config.Validate() method to check the config passed into sdk.NewClient
is valid:
sdktypes.AccAddressFromBech32()
checkBitcoinRpc
should start with "http"Just wanted to understand the context. Why not use btc client like https://github.com/babylonchain/staking-indexer/blob/51d98f1dbafda2fbbe550599c83331b549d26a6c/btcclient/client.go#L23?
We didn't know this BTC client before, created an issue https://github.com/babylonchain/babylon-da-sdk/issues/41 to use it.
We didn't know this BTC client before, created an issue https://github.com/babylonchain/babylon-da-sdk/issues/41 to use it.
Cool. I think a lot of code can be copied from the indexer repo I shared. Let's address it in this PR
Now updated to use the BTC client linked by @gitferry above
Summary
This PR adds
BitcoinRpc
intosdk.Config
which makes the Bitcoin RPC URL configurable.Test Plan