forked from DA0-DA0/dao-dao-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
/
profile.ts
61 lines (55 loc) · 1.26 KB
/
profile.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
export interface PfpkWalletProfile {
nonce: number
name: string | null
nft: {
chainId: string
imageUrl: string
tokenId: string
collectionAddress: string
} | null
}
export type WalletProfileNameSource = 'pfpk' | 'stargaze'
// Move `imageUrl` out of `NFT` in case we use the Keplr profile image API or a
// fallback image as backup.
export interface WalletProfile extends PfpkWalletProfile {
imageUrl: string
// Whether or not the name is loaded from PFPK or Stargaze names.
nameSource: WalletProfileNameSource
}
export interface WalletProfileUpdate {
nonce: number
name?: WalletProfile['name']
nft?: {
chainId: string
tokenId: string
collectionAddress: string
} | null
}
export interface KeplrWalletProfile {
profile:
| {}
| {
imageUrl: string
version: number
}
}
export interface ProfileSearchHit {
publicKey: string
address: string
profile: {
name: string | null
nft: {
chainId: string
collectionAddress: string
tokenId: string
imageUrl: string
} | null
}
}
// Meta info about wallet profile, including loading state and a fallback image.
export type WalletProfileData = {
loading: boolean
address: string
profile: WalletProfile
backupImageUrl: string
}