use-ink / useink

A React hooks library for ink!
Apache License 2.0
61 stars 5 forks source link

Add light clients as an alternative to ApiPromise #40

Open DoubleOTheven opened 1 year ago

DoubleOTheven commented 1 year ago

Feature Request

Add light clients as an alternative to calling third party RPC nodes. Read more here

Suggestion

Implement this. The client takes about 10 seconds to initialize, so we should allow a user to opt in to this as @wottpal suggested. RPC nodes should be default.

Motivation

Decentralization. Cut out the middle man.

Use Cases

wottpal commented 1 year ago

Love the motivation behind this, but wouldn't the UX suffer if the "default" is waiting for a Light Client to initialize ~10 seconds? 🤔 IMO, this should be more of a user-initiated switch or should be set by the developers proactively for very sensitive interactions.

DoubleOTheven commented 1 year ago

This is good feedback @wottpal. I think you are right. I will update the issue

DoubleOTheven commented 1 year ago

There is a grant from ink!ubator supporting this issue.

Trusted vs Light Client

I think we want to allow either ApiPromise or Light Clients on a per chain basis. Then we could expose these to a developer:

You can imagine a UI where the user can choose how they want to connect on a per chain basis or globally.