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

Initial Multichain API docs #1621

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Initial Multichain API docs #1621

wants to merge 19 commits into from

Conversation

alexandratran
Copy link
Contributor

@alexandratran alexandratran commented Oct 9, 2024

Description

Initial Multichain API docs.

Issue(s) fixed

Fixes #1566

Preview

Checklist

Complete this checklist before merging your PR:

  • If this PR contains a major change to the documentation content, I have added an entry to the top of the "What's new?" page.
  • The proposed changes have been reviewed and approved by a member of the documentation team.

Copy link

vercel bot commented Oct 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
metamask-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 11:25pm

@vandan
Copy link
Contributor

vandan commented Oct 18, 2024

For MetaMask, I do not believe we need to document the scenario where wallet_createSession is used with sessionIds.

# 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.
Copy link
Contributor

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

Suggested change
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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"personal_sign",
"personal_sign",

@vandan
Copy link
Contributor

vandan commented Nov 20, 2024

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May not be needed.

Suggested change
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May not be needed.

Suggested change
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
Copy link
Contributor

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.

Suggested change
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
Copy link
Contributor

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.

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

Successfully merging this pull request may close these issues.

Initial Multichain API docs
3 participants