Skip to content

docs: Update documentation RPC methods#3868

Merged
Mrtenz merged 11 commits intomainfrom
mrtenz/better-docs
Feb 23, 2026
Merged

docs: Update documentation RPC methods#3868
Mrtenz merged 11 commits intomainfrom
mrtenz/better-docs

Conversation

@Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Feb 20, 2026

This updates documentation for all RPC methods to be more user-facing.

Where possible, I used the already existing documentation on docs.metamask.io, and for more recent methods I wrote some documentation from scratch.

See: https://consensyssoftware.atlassian.net/browse/WPC-443.


Note

Low Risk
Primarily comment/JSDoc and type-documentation changes; the only code-level tweak is a harmless type import/alias removal in snap_dialog.

Overview
Updates documentation across Snaps RPC methods to be more user-facing: adds/expands JSDoc blocks, links to docs.metamask.io, and concrete usage examples for many snap_* and wallet_* handlers (state, UI interfaces/dialogs, WebSockets, background events, entropy, notifications, etc.).

Also refreshes Snaps SDK type docs for method params/results and permission types (mostly wording/clarity like “ID” vs “id”), and aligns snaps-rpc-methods dialog to use the exported DialogResult type instead of a local alias.

Written by Cursor Bugbot for commit 1b743b3. This will update automatically on new commits. Configure here.

@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.57%. Comparing base (087ecbc) to head (1b743b3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3868   +/-   ##
=======================================
  Coverage   98.57%   98.57%           
=======================================
  Files         425      425           
  Lines       12311    12311           
  Branches     1919     1919           
=======================================
  Hits        12136    12136           
  Misses        175      175           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Mrtenz Mrtenz force-pushed the mrtenz/better-docs branch from 080081b to d355bea Compare February 23, 2026 11:10
@Mrtenz Mrtenz force-pushed the mrtenz/better-docs branch from d355bea to d77876b Compare February 23, 2026 11:41
@Mrtenz Mrtenz marked this pull request as ready for review February 23, 2026 11:48
@Mrtenz Mrtenz requested a review from a team as a code owner February 23, 2026 11:48

/**
* Cancel a background event created by
* [`snap_scheduleBackgroundEvent`](https://docs.metamask.io/snaps/reference/snaps-api/snap_schedulebackgroundevent).
Copy link
Member

Choose a reason for hiding this comment

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

Are these URLs guaranteed? I worry about them changing and we don't notice in this repo

Copy link
Member Author

Choose a reason for hiding this comment

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

Guaranteed in what sense? This is the format of the new URLs based on the schema. They could of course break if we make changes somewhere, but we should set up redirects in that case.

Comment on lines +129 to +133
* - `createAccount`
* - `updateAccount`
* - `deleteAccount`
* - `listAccounts`
* - `submitResponse`
Copy link
Member

Choose a reason for hiding this comment

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

Do you wanna try to deal with improving this more separately as discussed on Slack?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, created a separate ticket to figure out unions, and will move the full type for this to the SDK as well.

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Mrtenz and others added 2 commits February 23, 2026 14:21
Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

* that allows for more convenient invocation of Snap methods without needing to
* specify the full `wallet_snap` parameters.
*
* The Snap must be installed and the dapp must have permission to communicate
Copy link
Member

Choose a reason for hiding this comment

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

Technically Snaps can call this too, not sure if we need to explain that too much though 😄

@Mrtenz Mrtenz enabled auto-merge February 23, 2026 14:43
@Mrtenz Mrtenz added this pull request to the merge queue Feb 23, 2026
Merged via the queue into main with commit 6836c76 Feb 23, 2026
129 checks passed
@Mrtenz Mrtenz deleted the mrtenz/better-docs branch February 23, 2026 14:57
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.

2 participants