bitsongofficial / bitsongjs

A series of useful Javascript libraries for BitSong
Apache License 2.0
4 stars 2 forks source link

Implement chain registry rpc discovery #7

Closed DavideSegullo closed 2 years ago

DavideSegullo commented 2 years ago

I suggest implementing the chain registry to find information regarding bitsong and find the available rpc nodes to which to make requests

angelorc commented 2 years ago

We can add the registry as new package @bitsongjs/registry

var chain_info = registry.getChain('bitsong')
chain_info.getRandomRPC()
angelorc commented 2 years ago

its important to add a kind of ping before returning the endpoint

DavideSegullo commented 2 years ago

its important to add a kind of ping before returning the endpoint

Yes, that's why I created #10

DavideSegullo commented 2 years ago

I thought about it, I think it is better not to directly integrate the chain-registry, it is only redundant, we will recommend using it and we will describe it in the documentation #12

angelorc commented 2 years ago

Ok we can do it in a separate lib outside bitsongjs. I use the same concept with golang and it is very useful