-
Notifications
You must be signed in to change notification settings - Fork 2
/
farapps.ts
141 lines (136 loc) · 3.19 KB
/
farapps.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
type User = {
username?: string;
fid: number;
custodyAddress: string;
verifiedAddresses?: string[];
};
type Channel = {
/** the unique short name of the channel */
id: string;
};
type Cast = {
hash: string;
/** author fid */
fid: string;
/** author username */
username: string;
};
type ComposeCast = {
text: string;
embeds?: string[];
channelid?: string;
};
type RegistryEntry = {
/** an svg logo of the app, intended for large screen sizes */
logo: string;
/** an svg logo of the app, intended for small sizes (below 64px) */
icon: string;
/** a short description of the app */
description: string;
/** the homepage of the app */
url: string;
/** the fids of the creators or authors of the app */
authorFids: number[];
/** get a user's profile page on the app */
user?: (u: User) => string | null;
/** get a channels's page on the app */
channel?: (c: Channel) => string | null;
/** get a casts's page on the app */
cast?: (c: Cast) => string | null;
/** get a compose cast page on the app */
compose?: (c: ComposeCast) => string | null;
};
export const farapps: Record<string, RegistryEntry> = {
warpcast: {
logo: "",
icon: "",
description: "",
authorFids: [2, 3],
url: "https://warpcast.com",
user: ({ username, fid }) =>
username
? `https://warpcast.com/${username}`
: `https://warpcast.com/!${fid}`,
channel: ({ id }) => `https://warpcast.com/~/channel/${id}`,
cast: ({ username, hash }) => `https://warpcast.com/${username}/${hash}`,
// compose: ({ text, embeds }) =>
// `https://warpcast.com/~/compose?text=${text}&embeds[]=${FIXME}`,
},
supercast: {
logo: "",
icon: "",
description: "",
authorFids: [],
url: "",
user: ({ username }) => null,
channel: ({ id }) => null,
cast: () => "",
compose: () => "",
},
herocast: {
logo: "",
icon: "",
description: "",
authorFids: [],
url: "https://herocast.xyz",
user: ({ username }) => null,
channel: ({ id }) => `https://warpcast.com/~/channel/${id}`,
cast: () => "",
compose: () => "",
},
firefly: {
logo: "",
icon: "",
description: "",
authorFids: [],
url: "https://firefly.mask.social",
user: ({ username }) => null,
channel: ({ id }) => null,
cast: () => "",
compose: () => "",
},
yup: {
logo: "",
icon: "",
description: "",
authorFids: [],
url: "https://yup.io",
user: ({ username }) => null,
channel: ({ id }) => null,
cast: () => "",
compose: () => "",
},
opencast: {
logo: "",
icon: "",
description: "",
authorFids: [],
url: "https://opencast.stephancill.co.za/",
user: ({ username }) => null,
channel: ({ id }) => null,
cast: () => "",
compose: () => "",
},
u3: {
logo: "",
icon: "",
description: "",
authorFids: [],
url: "",
user: ({ username }) => null,
channel: ({ id }) => null,
cast: () => "",
compose: () => "",
},
farcord: {
logo: "",
icon: "",
description: "",
authorFids: [],
url: "",
user: ({ username }) => null,
channel: ({ id }) => null,
cast: () => "",
compose: () => "",
},
};