Skip to content

feat: add originMetadata to submitRequest - #615

Open
FrederikBolding wants to merge 11 commits into
mainfrom
fb/add-origin-metadata
Open

feat: add originMetadata to submitRequest#615
FrederikBolding wants to merge 11 commits into
mainfrom
fb/add-origin-metadata

Conversation

@FrederikBolding

@FrederikBolding FrederikBolding commented Aug 5, 2026

Copy link
Copy Markdown
Member

Description

Add an optional originMetadata field to submitRequest, which will only be passed down in v2 keyrings or in v1 keyrings that are using at least platform version 12. This field can be used when using transports where the origin itself isn't verifiable.


Note

Medium Risk
Touches signing request routing and platform-gated payload shaping; backward compatibility is explicit but wrong version checks could break older Snaps or omit metadata for new ones.

Overview
Adds optional originMetadata (transport, selfReportedOrigin) on KeyringRequest and threads it through submitRequest so Snaps can reason about callers when the origin string alone is not trustworthy (e.g. WalletConnect).

SnapKeyring / SnapKeyringV1 choose the RPC shape from Snap platform version: ≥12.0.0 sends full requests (including metadata when provided); 7.0.0–11.x uses new toKeyringRequestWithoutOriginMetadata / submitRequestWithoutOriginMetadata; older platforms still strip origin. toKeyringRequestWithoutOrigin now also drops originMetadata. EthKeyringV1Adapter always passes originMetadata: null on internal submits.

Reviewed by Cursor Bugbot for commit 45a2677. Bugbot is set up for automated code reviews on this repo. Configure here.

@FrederikBolding FrederikBolding changed the title feat: Add originMetadata to submitRequest feat: add originMetadata to submitRequest Aug 6, 2026
@FrederikBolding
FrederikBolding marked this pull request as ready for review August 6, 2026 14:47
@FrederikBolding
FrederikBolding requested a review from a team as a code owner August 6, 2026 14:47
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.

1 participant