FIP: farcaster: URI scheme #123
Replies: 12 comments 15 replies
-
One possible issue I see with this spec is that Farcaster URIs may not be FIP-1: Canonical URIs. A FIP-1 Canonical URI has a max length of 256 bytes. So a |
Beta Was this translation helpful? Give feedback.
-
I think this is a good FIP. I have a couple of questions:
|
Beta Was this translation helpful? Give feedback.
-
For reference, here are all the
|
Beta Was this translation helpful? Give feedback.
-
Should we add some guidelines for clients? For example, I was thinking that if a client can not handle a specific URI, it is recommended to inform the user. These can only be recommendations, but it helps devs is we provide them with some guidelines. |
Beta Was this translation helpful? Give feedback.
-
There is a big problem with transition/adoption: If everyone uses this FIP the way they should, all public links to Farcaster resources will be using How do we deal with this? (A not-extremely-bad solution is to use |
Beta Was this translation helpful? Give feedback.
-
I refactored user-related URIs, to add a way to point to a user using their username (how could this be missing). |
Beta Was this translation helpful? Give feedback.
-
Important question/decision: Do we want to go with |
Beta Was this translation helpful? Give feedback.
-
While this FIP feels close to complete from a design point of view, we may have to consider if it can be changed to take advantage or increase compatibility with ERC-4804: Web3 URL to EVM Call Message Translation. |
Beta Was this translation helpful? Give feedback.
-
I rewrote almost everything. It makes much more sense now, and it looks better. |
Beta Was this translation helpful? Give feedback.
-
@horsefacts @varunsrin I think we should break the scheme into two separate schemes:
The reason is that there may be apps that implement one or the other or both. For example, we have many clients that support onhub interactions, but only warpcast and flink support onchain interactions. In the future, we may have apps that support only onchain (for example, rainbow or metamask supporting Farcaster wallet actions). Apps should be able to pick the schemes (like farcaster:// and farcaster-wallet://) they can handle. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone! 👋 I'm currently working on integrating deep linking into our iOS app. I've tried using the URL scheme farcaster://+cast=Hello%20World! to open the Farcaster app and prepopulate a cast with the text from our app. While the URL does launch the Farcaster app successfully, it doesn't seem to navigate directly to the cast writing screen as expected. Could someone provide guidance on how to achieve this? Your help is much appreciated! Thanks. |
Beta Was this translation helpful? Give feedback.
-
@varunsrin @horsefacts However, Frames introduced a lot of actions/intents that take place inside Farcaster clients, and this is an environment where a Farcaster URI scheme can be supported. Frames want to let users follow users, like casts, install Actions, etc. Should we resurrect the FIP from the dead, and review it in this context? |
Beta Was this translation helpful? Give feedback.
-
Title: farcaster: URI scheme
Type: Standards FIP
Author: Panagiotis Vryonis
Status: Early Draft
Abstract
Defines a URI scheme for farcaster-related resources that can be used to point to these resources in a standard, client-agnostic manner.
Problem
The farcaster protocol is implemented by many clients, but we lack a standard, client-agnostic way of pointing to farcaster resources, such as casts or users. The only way to do this right now, by using client-dependant URIs.
For example, pointing to a cast is usually implemented by using the warpcast link, such as
https://warpcast.com/user/castId
. This approach introduces a number of problems:By defining a standard
farcaster://
URI scheme, we create a standard, client-independent way of pointing to farcaster resources. Any client that implements the specification and registers with the underlying operating system, will be able to handle these URIs.Specification
The farcaster URI specification is a universal standard for representing canonical identifiers for objects on the farcaster protocol.
A valid farcaster URI has the form
farcaster://uri
orfarcaster-wallet://uri
(TBD: max length?).farcaster://
is used for resources living on hubs and actions that require interactions with hubsfarcaster-wallet://
is used for resources that live on the blockchain and require interactions with smart contracts.The uri component is the unique identifier of the object and has the following structure which is largely influenced by the Farcaster hub rpc specification.
Syntax
Overview
farcaster://
Users
URIs whose target is a user (fid).
user
is either anfid
(integer value) or@<username>
.Examples:
farcaster://280
: User profile byfid
farcaster://@vrypan
: User profile by username proof.farcaster://@vrypan/pfp
: the value of thepfp
user data for a user.farcaster://@vrypan/pfp=https%3A%2F%2Fvrypan.net%2Fassets%2Fimg%2Fvrypan.jpg
: set the value of the pfp user data to a specific value.farcaster://280/follow
: Show the accounts that fid=280 follows.farcaster://280/+follow
: Follow the account fid=280.farcaster://280/+follow
: Unfollow the account fid=280.Casts
Format:
Examples:
farcaster://@dwr.eth/0xe22ae240d690ffe800ef11344d65c32ac9d3fcd6
: link to a specific castfarcaster://@dwr.eth/0xe22ae240d690ffe800ef11344d65c32ac9d3fcd6/likes
: link to a specific casts's likesfarcaster://@dwr.eth/0xe22ae240d690ffe800ef11344d65c32ac9d3fcd6/+like
: like a specific cast.farcaster://@dwr.eth/0xe22ae240d690ffe800ef11344d65c32ac9d3fcd6/-like
: unlike a specific cast.farcaster://@dwr.eth/0xe22ae240d690ffe800ef11344d65c32ac9d3fcd6/replies
: Casts with this cast as a parent.farcaster://@dwr.eth/0xe22ae240d690ffe800ef11344d65c32ac9d3fcd6/+reply=I%20agree
: reply to a cast.farcaster://+cast=Hello%20World!
: Create a new cast.FIP-2
URIs related to FIP-2.
Note: It is assumed that
url
is a reserved fname.Format:
Examples:
Note: base64-padding is not required by the URI scheme. Clients should add padding if needed.
farcaster://url/aHR0cDovL3dhcnBjYXN0LmNvbQo
: Show farcaster content related tohttp://warpcast.com
(casts, likes)farcaster://url/aHR0cDovL3dhcnBjYXN0LmNvbQo/+like
: Like a URLfarcaster://url/aHR0cDovL3dhcnBjYXN0LmNvbQo/-like
: Unlike a URLfarcaster://url/aHR0cDovL3dhcnBjYXN0LmNvbQo/+reply=I%20%love%this%app
: Create a cast with parent_url=URL.farcaster://url/aHR0cDovL3dhcnBjYXN0LmNvbQo/+mention=I%20%love%this%app
: Create a cast with embeded_url=URL.farcaster-wallet://
Signer-related URIs
Format:
Examples:
farcaster://+signer/0x532c81a2ea1d21bd17a4ba62adedc708ec0693b292398e6a8c8aec655f70bcea
: Approve signer.farcaster://-signer/0x532c81a2ea1d21bd17a4ba62adedc708ec0693b292398e6a8c8aec655f70bcea
: Remove signer.Sign-in with Farcaster (TBA)
This section will be defined according to FIP: Sign in with Farcaster requirements.
signin
Client Behavior
Clients can register as protocol handlers for the
farcaster://
protocol with the underlying OS.Client Recommendations
Handling URI exceptions
If a client is requested to open a
farcaster://
URI that is not able to handle, it is recommended inform the user by presenting a message that states at least the following:Link sharing
When a client presents users the option to share a link to a specific resource, a
farcaster://
URI should be used, instead of a client-specific URL or deep link.If this is not feasible (for example, URI scheme is not adopted widely enough), clients are advised to use URLs that consist of
app-specific prefix
+farcaster URI
. For example:https://example-farcaster-app.com/@dwr.eth/0xe22ae240d690ffe800ef11344d65c32ac9d3fcd6
.Following this convention will make it feasible to automatically migrate to
farcaster:
URIs in the future, and will also make it easier for apps to identify and parse these URLs.Linking to farcaster
Sites and applications pointing to Farcaster resources such as user profiles or casts, are expected to to use
farcaster://
URIs instead of client-specific URLs.Release
TBD: Potential conflicts of clients already using some form of
farcaster:
URIs to be examined.Beta Was this translation helpful? Give feedback.
All reactions