butaneprotocol / translucent-compat

Deprecated in favour of blaze https://github.com/butaneprotocol/blaze-cardano
https://github.com/butaneprotocol/blaze-cardano
Other
15 stars 8 forks source link

We should allow passing protocol parameters in the constructor to avoid calling the provider #18

Open joacohoyos opened 7 months ago

joacohoyos commented 7 months ago

Some dapps might want to optimize the Protocl params fetching to avoid calling the provider endpoints each time you instantiate Translucent.

Translucent.new could be modified to new(provider, network, protocolParams) to allow passing the protocol parameters and that would avoid calling provider.getProtocolParamateres

micahkendall commented 7 months ago

yep. Maybe a cooler way to do this would be making providers composable so you can layer a provider that you build for your dApp over others. Lots of dApps need very specific fetching of data so I think this would be an important pattern that solves the same issue.