stacksgov / sips

Community-submitted Stacks Improvement Proposals (SIPs)
133 stars 80 forks source link

SIP for Wallet Protocol #59

Open friedger opened 2 years ago

friedger commented 2 years ago

This SIP specifies how applications and wallet should exchange messages and how applications and wallets agree on the protocol.

While writing "SIP for Authentication Protocol", it became clear that the communication should be handled in a separate SIP.

kyranjamie commented 2 years ago

Thanks for starting this SIP, @friedger.

What are your thoughts on following a scheme similar to EIP-1102, whereby we use a JSON RPC style API, rather than a set of methods. I'd be in favour of this.

friedger commented 2 years ago

A rpc style api makes sense because it would work also for a https provider

kyranjamie commented 2 years ago

A rpc style api makes sense because it would work also for a https provider

Another benefit is that, with Web Extensions, it'll be easier to forward events when they go through the same method. For each new method, a new handler is needed in the forwarding script contexts.

In page script contextContent script contextBackground script context