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

Update Keyring API reference #1170

Merged
merged 9 commits into from Mar 4, 2024
Merged

Update Keyring API reference #1170

merged 9 commits into from Mar 4, 2024

Conversation

alexandratran
Copy link
Contributor

@alexandratran alexandratran commented Feb 24, 2024

This removes the external/keyring-api submodule and creates the Keyring API reference manually, adding the categories "Keyring Client API" and "Keyring Interface API." It also updates related content. Fixes #1165.

Previews:

For the Client API reference, I used this Notion page for reference and checked it against the updated source code.

@alexandratran alexandratran marked this pull request as ready for review February 26, 2024 19:21
@alexandratran alexandratran requested review from a team as code owners February 26, 2024 19:22
@alexandratran alexandratran requested a review from a team February 26, 2024 19:22
Copy link

Preview published: 1165-keyring-reference

Copy link
Contributor

@joaniefromtheblock joaniefromtheblock left a comment

Choose a reason for hiding this comment

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

LGTM. Just did a rough review, but can confirm links work, it's typo-free, and has constant formatting

@danroc
Copy link
Contributor

danroc commented Feb 28, 2024

I find the name Keyring Interface API a bit unclear, it doesn't pass the idea that it contains chain-specific methods that a Snap can choose to support.

Maybe we could rename the APIs like:

Before After
Keyring Interface API Chain Methods API
Keyring Client API Account Management API

This is only a suggestion and I would like to hear what others have to say (ping @gantunesr @montelaidev).

Copy link

Preview published: 1165-keyring-reference

Copy link
Member

@gantunesr gantunesr left a comment

Choose a reason for hiding this comment

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

A small nit

snaps/reference/keyring-api/client-api/objects.md Outdated Show resolved Hide resolved
@gantunesr
Copy link
Member

I agree with @danroc opinion, also seeing at these descriptions,

  • Keyring Client API – An API for dapps to communicate with account management Snaps.
  • Keyring Interface API - EVM methods that account management Snaps can implement to support dapp requests from custom accounts.

And what is specified in the keyring-module,

  • Keyring API Interface: The module exposes an interface representing the Keyring API. Snaps can implement this interface to seamlessly interact with MetaMask and leverage its functionality.
  • Dapp Client: The module includes a client that enables dapps to communicate with the account Snap. This client allows dapps to send requests to the Snap, such as retrieving account information or submitting requests.
  • MetaMask Client: The module provides a client specifically designed for MetaMask integration. This client enables MetaMask to send requests directly to the account Snap, facilitating smooth interoperability between the two applications.

I see an opportunity to consolidated these definitions and push for the renaming as proposed here

Copy link

Preview published: 1165-keyring-reference

Copy link

github-actions bot commented Mar 1, 2024

Preview published: 1165-keyring-reference

Copy link
Contributor

@danroc danroc left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@alexandratran alexandratran merged commit 6f3be19 into main Mar 4, 2024
8 checks passed
@alexandratran alexandratran deleted the 1165-keyring-reference branch March 4, 2024 20:11
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.

Update Keyring API reference
5 participants