-
-
Notifications
You must be signed in to change notification settings - Fork 970
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
Initial Multichain API docs #1621
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
For MetaMask, I do not believe we need to document the scenario where |
# Conflicts: # docusaurus.config.js # wallet-sidebar.js
…nto 1566-multichain # Conflicts: # docusaurus.config.js # wallet-sidebar.js
|
||
```javascript | ||
// Initialize the connection to Flask. | ||
const EXTENSION_ID = "ljfoeinjpaedjfecbmggjgodbgkmjkjk"; // Replace this with ID of your Flask extension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out that these IDs are canonical to the chrome web store so everyone gets the same ID
const EXTENSION_ID = "ljfoeinjpaedjfecbmggjgodbgkmjkjk"; // Replace this with ID of your Flask extension. | |
const EXTENSION_ID = "ljfoeinjpaedjfecbmggjgodbgkmjkjk"; // Flask extension ID |
}, | ||
"eip155:59141": { // Linea Sepolia | ||
methods: [ | ||
"personal_sign", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"personal_sign", | |
"personal_sign", |
The CAIP standards extensively use the term "session", which insinuates a transient connection. MetaMask predominantly establishes persistent connections so we could consider using alternative terminology such as "connection". But I'm not sure if it's more confusing to diverge from the names used in the Multichain API methods. |
}) | ||
``` | ||
|
||
Make sure to replace the `EXTENSION_ID` value with the ID of your Flask extension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May not be needed.
Make sure to replace the `EXTENSION_ID` value with the ID of your Flask extension. |
``` | ||
|
||
Make sure to replace the `EXTENSION_ID` value with the ID of your Flask extension. | ||
You can find this in your browser's extension manager. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May not be needed.
You can find this in your browser's extension manager. |
|
||
#### 3.3. Send transactions | ||
|
||
You can send transactions on a network where the user has sufficient gas, by invoking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "sufficient gas" aspect from the getting started was primarily to show an example where checking gas on multiple networks would be useful. Given the context here, I am not sure it is as relevant.
You can send transactions on a network where the user has sufficient gas, by invoking | |
You can send transactions on a specific network, by invoking |
Dapps can use [`wallet_getSession`](../reference/multichain-api.md#wallet_getsession) to get | ||
the scopes and properties of the active session, and use | ||
[`wallet_revokeSession`](../reference/multichain-api.md#wallet_revokesession) to revoke the session. | ||
The API also supports the [`wallet_notify`](../reference/multichain-api.md#wallet_notify) and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wallet_notify
is a little different in that it provides notifications related to on-chain updates or state changes that the dapp has subscribed to. Whereas, wallet_sessionChanged
only provides notifications about session or "permission" changes.
Description
Initial Multichain API docs.
Issue(s) fixed
Fixes #1566
Preview
Checklist
Complete this checklist before merging your PR: