MetaMask / metamask-android-sdk

MetaMask SDK for Android
Other
47 stars 13 forks source link

[Android] Introducing 'connectWith' method to enable connection with any RPC call requiring the user account #55

Closed ezgi-cengiz closed 11 months ago

ezgi-cengiz commented 1 year ago

Description

We are planning to introduce a new feature, connectWith in our SDK. This feature is an enhancement over the existing connectSign method. The primary goal is to simplify the SDK flow on mobile by enabling a connection with any RPC call requiring the user account, which will automatically include the result of the connect request (requested account) in the subsequent RPC method. This change aims to streamline the initial connection process by merging the account request and connection into a single step, eliminating the need for the mandatory eth_requestAccounts in every instance.

Objectives:

  1. Combine the account request and connection into one step for the initial connection, enhancing the user experience and reducing complexity.
  2. Ensure that this feature is specific to certain RPC calls that require user account.
  3. Provide a more streamlined and efficient process for developers integrating our SDK.

Tasks

  1. Introduce a new method: connectWith in our SDK.

    • It improves upon the existing connectSign method. Aims to make the SDK easier to use on mobile.
    • Allows connecting with any RPC call requiring the user account.
    • Automatically adds the result of the connect request to the next RPC method.
    • Streamlines the initial connection process.
    • Combines account request and connection into one step.
    • Removes the need for eth_requestAccounts every time.
  2. Clearly document the new feature, providing examples and guidelines for developers.

gxd523 commented 11 months ago

Is there connectSign API in version 0.2.1? Is 0.2.1 your latest version?