-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
36 lines (32 loc) · 878 Bytes
/
index.d.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
import { Address } from "viem";
type Basename = `${string}.base.eth`;
type RecordResult = {
result: string;
status: string;
};
export enum BasenameTextRecordKeys {
Description = "description",
Keywords = "keywords",
Url = "url",
Email = "email",
Phone = "phone",
Github = "com.github",
Twitter = "com.twitter",
Farcaster = "xyz.farcaster",
Lens = "xyz.lens",
Telegram = "org.telegram",
Discord = "com.discord",
Avatar = "avatar",
}
declare module "basename" {
export function getBasename(address: Address): Promise<string>;
export function getBasenameAvatar(basename: Basename): Promise<string>;
export function getBasenameTextRecord(
basename: string,
key: BasenameTextRecordKeys
): Promise<string>;
export function getBasenameTextRecords(
basename: string,
key?: BasenameTextRecordKeys
): Promise<RecordResult[]>;
}