snapshot-labs / sx-starknet

Core smart contracts of Snapshot X for Starknet
https://docs.snapshotx.xyz
MIT License
112 stars 69 forks source link

feat: create a session key authenticator #606

Open bonustrack opened 4 months ago

bonustrack commented 4 months ago

We should create a new authenticator that works with session key. Here are the requirements:

We may want to look into Argent on how they dealing with session keys and if there is a way to integrate in their system, I think there is or will be some support in Argent X for session key, which would be great to be compatible with.

This is still a draft, ideally we should iterate on this and figure out a flow and interface before starting the integration.

Orland0x commented 4 months ago

Argent X session key implementation described here: https://github.com/argentlabs/argent-x/tree/main/packages/sessions

This approach leverages account abstraction to authorise a separate key on the same wallet to authorize txs.

This would in principal work for Starknet accounts generating a session (so long as they were argent x), but wouldnt work for ethereum accounts. We would need to generate a new Starknet account for the latter case.