The-Marquis-Gaming / themarquis-app

Flutter app for the marquis
0 stars 7 forks source link

Mobile App: Wallet Handling Strategies #9

Open wms2537 opened 22 hours ago

wms2537 commented 22 hours ago

I think we have to first decide on the wallet handling strategy before we look more into using starknet.dart #8. Since now we are handling the wallet on the API side. We have the following options:

  1. Make it non-custodial, users manage the wallet locally, create one during signup or import one and then the details stored encrypted on device, with options to export private key & mnemonics. Some additional concerns includes backend side might have to add methods to get the user details, how to manage the username, etc.
  2. Make it custodial, use encrypted methods to get the keys during login.
  3. Use existing wallets (require connection to existing starknet wallets, such as Argent Mobile).
JoE11-y commented 21 hours ago

Would love to take this on. 💪

wms2537 commented 12 hours ago

@JoE11-y May I know which option you will be trying out?

JoE11-y commented 11 hours ago

@wms2537 I'm actually leaning towards 3.

wms2537 commented 11 hours ago

From what I know this option might require some discussions with Argent Team on coming out with a protocol to communicate with the Argent mobile wallet. WalletConnect Support seems limited, but you can also try it out anyways.

However a new problem arises, since every roll dice and play move requires the user to call the contract, if we redirect users to another app to approve the transaction this will highly affect the gameplay experience.

JoE11-y commented 11 hours ago

Oh yeah that will be a bad UX. Then maybe sticking to 2 might be the best way to go.

wms2537 commented 8 hours ago

Thinking about 1, probably we can make something like this https://github.com/cartridge-gg/controller/tree/main