Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wallet Connect] Analyse and implement missing APIs #16180

Closed
8 tasks
Tracked by #16312
alexjba opened this issue Aug 23, 2024 · 3 comments
Closed
8 tasks
Tracked by #16312

[Wallet Connect] Analyse and implement missing APIs #16180

alexjba opened this issue Aug 23, 2024 · 3 comments

Comments

@alexjba
Copy link
Contributor

alexjba commented Aug 23, 2024

Description

The purpose of this task is to analyse and implement the integration needed to cover the following events. The wallet should implement the meaningful handlers for these events and also emit the events on meaningful flows.

  • session_event Emitted when an event like accountsChanged happens.

This event can signal the following events:

  • connect

The Provider emits connect when it:

first connects to a chain after being initialized.
first connects to a chain, after the disconnect event was emitted.
interface ProviderConnectInfo {
readonly chainId: string;
}
The event emits an object with a hexadecimal string chainId per the eth_chainId Ethereum RPC method, and other properties as determined by the Provider.

  • disconnect

The Provider emits disconnect when it becomes disconnected from all chains.
This event emits a ProviderRpcError. The error code follows the table of CloseEvent status codes.

  • chainChanged

The Provider emits chainChanged when connecting to a new chain.
The event emits a hexadecimal string chainId per the eth_chainId Ethereum RPC method.

  • accountsChanged

The Provider emits accountsChanged if the accounts returned from the Provider (eth_accounts) change.
The event emits with accounts, an array of account addresses, per the eth_accounts Ethereum RPC method.

  • message

The Provider emits message to communicate arbitrary messages to the consumer. Messages may include JSON-RPC notifications, GraphQL subscriptions, and/or any other event as defined by the Provider.

interface ProviderMessage {
readonly type: string;
readonly data: unknown;
}

  • session_expire Emitted when a session has expired.
  • session_extend Emitted when extending a session.
  • proposal_expire Emitted when a session proposal has expired.

Acceptance criteria:

  • The integration layer is extended to receive and send these events to QML
  • The integration layer is automatically handling or sending events that do not require user interaction (connect, disconnect, session_expire, session_extended, proposal_expire)
  • QML tests are added
  • Events that do not require implementation are documented in this task
@alexjba
Copy link
Contributor Author

alexjba commented Aug 23, 2024

We'll need to send connect and disconnect events whenever the providers or connection are on/off.

@alexjba
Copy link
Contributor Author

alexjba commented Oct 24, 2024

  1. connect - Should be emitted whenever the app can interact with a chain. Nice to have
  2. disconnect - Should be emitted whenever the app cannot interact with ANY chain. Nice to have
  3. chainChanged - Not applicable. Status is multi chain by default
  4. accountChanged - Not applicable at this point. The user cannot change the connected account
  5. message - Not applicable. Used for arbitrary notifications.

@alexjba
Copy link
Contributor Author

alexjba commented Nov 25, 2024

Closed by #16580

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants