cardano-private-testnet-setup
cardano-private-testnet-setup copied to clipboard
query private testnet
I am wondering if there's an alternative way to query the private testnet e.g. with blockfrost?
I am wondering if there's an alternative way to query the private testnet e.g. with blockfrost?
Blockfrost is a third party service. It can't access your testnet. That is why it specifically says private testnet, because it is your own.
Now imagine you create your own banking system. You can use it for example with your friend. But you won't be able to call Visa or Mastercard and say, hey please integrate my banking system. Same thing with blockfrost.
I understand, so the only way is through postgresql / some database? I guess I should rephrase the question to what's the most convenient way to query a private testnet
To support querying the data, you need a process like cardano-db-sync
to attach to one of the running nodes of the private testnet, so the data gets collected and written to a database. Then, you can query things using SQL.
Blockfrost is aggregating data with db-sync as well. But, they added an API to allow users to make HTTP requests to get at the data.
I see, so adding an API to cardano-db-sync
connected to the private testnet is the best way - are there tools available to make this easier?
you essentially need a thin REST wrapper on top of the db, ie.
https://postgrest.org/en/stable/
might just do the trick.
Otherwise I'd code something super simple with Flask.
you essentially need a thin REST wrapper on top of the db, ie.
https://postgrest.org/en/stable/
Oh, I never knew that existed! Another fun thing to try out.