web3bio-profile-kit 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,7 +41,7 @@ VITE_WEB3BIO_API_KEY=your_api_key
41
41
  #### Platform-Specific Profile Queries
42
42
 
43
43
  ```jsx
44
- import { useProfile } from 'web3bio-profile-kit';
44
+ import { useProfile } from "web3bio-profile-kit";
45
45
 
46
46
  function ProfileComponent() {
47
47
  // Query with explicit platform format
@@ -69,7 +69,7 @@ function ProfileComponent() {
69
69
  #### Universal Profile Queries
70
70
 
71
71
  ```jsx
72
- import { useUniversalProfile } from 'web3bio-profile-kit';
72
+ import { useUniversalProfile } from "web3bio-profile-kit";
73
73
 
74
74
  function UniversalProfileComponent() {
75
75
  // Query by any identity format - ENS domain, Farcaster handle, etc.
@@ -97,7 +97,7 @@ function UniversalProfileComponent() {
97
97
  #### Platform-Specific Name Service Queries
98
98
 
99
99
  ```jsx
100
- import { useNS } from 'web3bio-profile-kit';
100
+ import { useNS } from "web3bio-profile-kit";
101
101
 
102
102
  function NameServiceComponent() {
103
103
  const { data, isLoading } = useNS("ens,vitalik.eth");
@@ -116,7 +116,7 @@ function NameServiceComponent() {
116
116
  #### Universal Name Service Queries
117
117
 
118
118
  ```jsx
119
- import { useUniversalNS } from 'web3bio-profile-kit';
119
+ import { useUniversalNS } from "web3bio-profile-kit";
120
120
 
121
121
  function UniversalNameServiceComponent() {
122
122
  // Works with any identity format
@@ -136,7 +136,7 @@ function UniversalNameServiceComponent() {
136
136
  ### Query Domain Data
137
137
 
138
138
  ```jsx
139
- import { useDomain } from 'web3bio-profile-kit';
139
+ import { useDomain } from "web3bio-profile-kit";
140
140
 
141
141
  function DomainComponent() {
142
142
  const { data, isLoading } = useDomain("vitalik.eth");
@@ -156,7 +156,7 @@ function DomainComponent() {
156
156
  ### Batch Profile Query
157
157
 
158
158
  ```jsx
159
- import { useBatchProfile } from 'web3bio-profile-kit';
159
+ import { useBatchProfile } from "web3bio-profile-kit";
160
160
 
161
161
  function BatchProfileComponent() {
162
162
  const { data, isLoading } = useBatchProfile([
@@ -234,6 +234,14 @@ Fetches basic universal name service data across multiple platforms.
234
234
 
235
235
  Fetches detailed domain information including resolution data.
236
236
 
237
+ #### `useBatchProfile(identity, options?)`
238
+
239
+ Fetches comprehensive profile data for multiple identities in a single request.
240
+
241
+ #### `useBatchNS(identity, options?)`
242
+
243
+ Fetches basic name service data for multiple identities in a single request.
244
+
237
245
  ### Arguments
238
246
 
239
247
  | Parameter | Type | Description |
package/dist/index.d.ts CHANGED
@@ -1,46 +1,222 @@
1
+ declare enum Network {
2
+ aptos = "aptos",
3
+ arbitrum = "arbitrum",
4
+ arbitrum_nova = "arbitrum_nova",
5
+ arbitrum_one = "arbitrum_one",
6
+ apechain = "apechain",
7
+ arweave = "arweave",
8
+ avalanche = "avalanche",
9
+ base = "base",
10
+ bitcoin = "bitcoin",
11
+ binanceSmartChain = "binance-smart-chain",
12
+ bsc = "bsc",
13
+ conflux = "conflux",
14
+ crossbell = "crossbell",
15
+ erc1577 = "erc1577",
16
+ ethereum = "ethereum",
17
+ fantom = "fantom",
18
+ farcaster = "farcaster",
19
+ flow = "flow",
20
+ gnosis = "gnosis",
21
+ lens = "lens",
22
+ linea = "linea",
23
+ mastodon = "mastodon",
24
+ optimism = "optimism",
25
+ polygon = "polygon",
26
+ scroll = "scroll",
27
+ snapshot = "snapshot",
28
+ solana = "solana",
29
+ vsl = "vsl",
30
+ xLayer = "x-layer",
31
+ zksync_era = "zksync_era",
32
+ zora = "zora",
33
+ unichain = "unichain"
34
+ }
35
+ interface NetworkMetaData {
36
+ assetPrefix?: string;
37
+ bgColor: string;
38
+ chainId?: number;
39
+ icon: string;
40
+ key: string;
41
+ label: string;
42
+ primaryColor: string;
43
+ scanLabel?: string;
44
+ scanPrefix: string;
45
+ scanPrefixTx?: string;
46
+ short?: string;
47
+ }
48
+ declare const NETWORK_DATA: {
49
+ [key in Network]: NetworkMetaData;
50
+ };
51
+
1
52
  declare enum PlatformType {
2
53
  ens = "ens",
3
- farcaster = "farcaster",
54
+ dotbit = "dotbit",
4
55
  lens = "lens",
56
+ box = "box",
5
57
  ethereum = "ethereum",
6
58
  twitter = "twitter",
7
- github = "github",
59
+ nextid = "nextid",
8
60
  bitcoin = "bitcoin",
61
+ keybase = "keybase",
62
+ reddit = "reddit",
63
+ github = "github",
9
64
  unstoppableDomains = "unstoppabledomains",
10
65
  basenames = "basenames",
11
66
  linea = "linea",
67
+ ckb = "ckb",
68
+ farcaster = "farcaster",
12
69
  space_id = "space_id",
70
+ telegram = "telegram",
71
+ instagram = "instagram",
72
+ cyberconnect = "cyberconnect",
73
+ opensea = "opensea",
74
+ discord = "discord",
75
+ calendly = "calendly",
76
+ url = "url",
77
+ website = "website",
78
+ linkedin = "linkedin",
79
+ dns = "dns",
80
+ tron = "tron",
81
+ hey = "hey",
82
+ facebook = "facebook",
83
+ threads = "threads",
84
+ whatsapp = "whatsapp",
85
+ weibo = "weibo",
86
+ youtube = "youtube",
87
+ tiktok = "tiktok",
88
+ bilibili = "bilibili",
89
+ medium = "medium",
90
+ mirror = "mirror",
91
+ zerion = "zerion",
92
+ aave = "aave",
93
+ rainbow = "rainbow",
94
+ bluesky = "bluesky",
95
+ nostr = "nostr",
96
+ poap = "poap",
97
+ uniswap = "uniswap",
98
+ degenscore = "degenscore",
99
+ firefly = "firefly",
13
100
  solana = "solana",
14
101
  sns = "sns",
15
- nextid = "nextid",
16
- dotbit = "dotbit"
102
+ mstdnjp = "mstdnjp",
103
+ lobsters = "lobsters",
104
+ hackernews = "hackernews",
105
+ crossbell = "crossbell",
106
+ minds = "minds",
107
+ paragraph = "paragraph",
108
+ genome = "genome",
109
+ gnosis = "gnosis",
110
+ webacy = "webacy",
111
+ clusters = "clusters",
112
+ guild = "guild",
113
+ ton = "ton",
114
+ snapshot = "snapshot",
115
+ coingecko = "coingecko",
116
+ gitcoin = "gitcoin",
117
+ humanpassport = "humanpassport",
118
+ talent = "talentprotocol",
119
+ doge = "doge",
120
+ bsc = "bsc",
121
+ aptos = "aptos",
122
+ near = "near",
123
+ stacks = "stacks",
124
+ cosmos = "cosmos",
125
+ zeta = "zeta",
126
+ mode = "mode",
127
+ arbitrum = "arbitrum",
128
+ scroll = "scroll",
129
+ taiko = "taiko",
130
+ mint = "mint",
131
+ zkfair = "zkfair",
132
+ manta = "manta",
133
+ lightlink = "lightlink",
134
+ merlin = "merlin",
135
+ alienx = "alienx",
136
+ edgeless = "edgeless",
137
+ tomo = "tomo",
138
+ ailayer = "ailayer",
139
+ philand = "philand",
140
+ efp = "efp",
141
+ gravity = "gravity"
142
+ }
143
+ type SocialPlatform = {
144
+ color?: string;
145
+ icon?: string;
146
+ label: string;
147
+ description?: string;
148
+ urlPrefix?: string;
149
+ ensText?: string[];
150
+ registerlink?: string;
151
+ editUrlPrefix?: string;
152
+ system: PlatformSystem;
153
+ };
154
+ declare enum PlatformSystem {
155
+ web2 = 0,
156
+ web3 = 1
17
157
  }
158
+ declare const DEFAULT_PLATFORM: Readonly<SocialPlatform>;
159
+ declare const PLATFORM_DATA: ReadonlyMap<PlatformType, Readonly<SocialPlatform>>;
160
+
18
161
  declare enum SourceType {
19
162
  ethereum = "ethereum",
20
163
  ens = "ens",
21
164
  twitter = "twitter",
165
+ keybase = "keybase",
22
166
  nextid = "nextid",
167
+ rss3 = "rss3",
23
168
  dotbit = "dotbit",
24
169
  unstoppabledomains = "unstoppabledomains",
25
170
  lens = "lens",
26
171
  farcaster = "farcaster",
27
172
  space_id = "space_id",
173
+ crossbell = "crossbell",
174
+ clusters = "clusters",
28
175
  solana = "solana",
29
- sns = "sns"
176
+ sns = "sns",
177
+ opensea = "opensea",
178
+ firefly = "firefly",
179
+ basenames = "basenames",
180
+ dentity = "dentity",
181
+ nftd = "nftd",
182
+ mirror = "mirror",
183
+ paragraph = "paragraph",
184
+ foundation = "foundation",
185
+ rarible = "rarible",
186
+ soundxyz = "soundxyz",
187
+ gravity = "gravity",
188
+ linea = "linea",
189
+ gmgn = "gmgn",
190
+ nostr = "nostr",
191
+ talentprotocol = "talentprotocol",
192
+ crowdsourcing = "crowdsourcing",
193
+ particle = "particle",
194
+ tally = "tally",
195
+ icebreaker = "icebreaker"
30
196
  }
197
+ interface SourceInfo {
198
+ name: string;
199
+ description: string;
200
+ }
201
+ declare const SOURCE_DATA: Readonly<Record<SourceType, SourceInfo>>;
202
+
203
+ type AddressRecord = {
204
+ address: string;
205
+ network: string;
206
+ __typename: "Address";
207
+ };
31
208
  type SocialLinksItem = {
32
209
  link: string | null;
33
210
  handle: string | null;
34
211
  sources: SourceType[];
35
212
  };
36
213
  type SocialLinks = Record<string, SocialLinksItem>;
37
- interface ProfileResponse {
38
- identity: string;
39
- address: string | null;
40
- avatar: string | null;
41
- description: string | null;
42
- platform: string;
43
- displayName: string | null;
214
+ type SocialRecord = {
215
+ uid: number | null;
216
+ follower: number;
217
+ following: number;
218
+ };
219
+ interface ProfileResponse extends NSResponse {
44
220
  email: string | null;
45
221
  contenthash: string | null;
46
222
  header: string | null;
@@ -49,12 +225,7 @@ interface ProfileResponse {
49
225
  status: string | null;
50
226
  error?: string;
51
227
  links: SocialLinks;
52
- aliases?: string[];
53
- social: {
54
- uid: number | null;
55
- follower: number;
56
- following: number;
57
- } | {};
228
+ social: SocialRecord | {};
58
229
  }
59
230
  interface NSResponse {
60
231
  identity: string;
@@ -79,7 +250,7 @@ interface DomainResponse {
79
250
  expiredAt: string | null;
80
251
  contenthash: string | null;
81
252
  texts: Record<string, string>;
82
- addresses: Record<string, string>;
253
+ addresses: Record<Network, string>;
83
254
  }
84
255
  type QueryOptions = {
85
256
  /** API Key for authentication */
@@ -244,4 +415,27 @@ declare const REGEX: {
244
415
  NEXT_ID: RegExp;
245
416
  };
246
417
 
247
- export { API_ENDPOINT, DomainResponse, DomainResult, ErrorMessages, IdentityString, NSBatchResult, NSResponse, NSResult, NSUniversalResult, PlatformType, ProfileBatchResult, ProfileResponse, ProfileResult, ProfileUniversalResult, QueryEndpoint, QueryOptions, QueryResult, REGEX, SocialLinks, SocialLinksItem, SourceType, useBatchNS, useBatchProfile, useDomain, useNS, useProfile, useUniversalNS, useUniversalProfile };
418
+ declare const CoinType: {
419
+ btc: number;
420
+ ltc: number;
421
+ doge: number;
422
+ dash: number;
423
+ monacoin: number;
424
+ eth: number;
425
+ etc: number;
426
+ xrp: number;
427
+ atom: number;
428
+ rootstock: number;
429
+ ripple: number;
430
+ bch: number;
431
+ bnb: number;
432
+ xlm: number;
433
+ rsk: number;
434
+ eos: number;
435
+ xem: number;
436
+ trx: number;
437
+ xdai: number;
438
+ matic: number;
439
+ };
440
+
441
+ export { API_ENDPOINT, AddressRecord, CoinType, DEFAULT_PLATFORM, DomainResponse, DomainResult, ErrorMessages, IdentityString, NETWORK_DATA, NSBatchResult, NSResponse, NSResult, NSUniversalResult, Network, NetworkMetaData, PLATFORM_DATA, PlatformSystem, PlatformType, ProfileBatchResult, ProfileResponse, ProfileResult, ProfileUniversalResult, QueryEndpoint, QueryOptions, QueryResult, REGEX, SOURCE_DATA, SocialLinks, SocialLinksItem, SocialPlatform, SocialRecord, SourceInfo, SourceType, useBatchNS, useBatchProfile, useDomain, useNS, useProfile, useUniversalNS, useUniversalProfile };