MetaMask / MetaMask/snaps

Make `local:` snap locations be actual URIs

Open
#1,041 2 comments 0 reactions 0 assignees View on GitHub
area-publishing type-enhancement
Dominant language
TypeScript
Stars
853
Forks
662
Avg merge
2d 8h
Merged PRs (30d)
8

Description

Right now `local:` locations look like this: `local:http://localhost/`, which is not a valid URI.

We should try to normalise Snap Locations to all be URIs and make them look like this: `local://localhost/`, or even better - just `http://localhost/` with restrictions on hostname.

Context:
1. https://github.com/MetaMask/snaps-monorepo/pull/1019#discussion_r1039523629
2. [SIP-8](https://github.com/MetaMask/SIPs/blob/main/SIPS/sip-8.md)

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked PR discussion and SIP-8 to resolve whether the format should be `local://localhost/` or an HTTP URI with hostname restrictions. Then locate the Snap Location handling and its tests; done means locations are normalized as valid URIs and the agreed restrictions are covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.