web3bio-profile-kit 0.1.2 → 0.1.4
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 +14 -6
- package/dist/hooks/index.cjs +21 -0
- package/dist/hooks/index.js +8 -0
- package/dist/hooks/useBaseQuery.cjs +129 -0
- package/dist/{types/hooks → hooks}/useBaseQuery.d.ts +1 -2
- package/dist/hooks/useBaseQuery.js +127 -0
- package/dist/hooks/useBatchNS.cjs +25 -0
- package/dist/{types/hooks → hooks}/useBatchNS.d.ts +1 -1
- package/dist/hooks/useBatchNS.js +23 -0
- package/dist/hooks/useBatchProfile.cjs +25 -0
- package/dist/{types/hooks → hooks}/useBatchProfile.d.ts +1 -1
- package/dist/hooks/useBatchProfile.js +23 -0
- package/dist/hooks/useDomain.cjs +28 -0
- package/dist/{types/hooks → hooks}/useDomain.d.ts +1 -1
- package/dist/hooks/useDomain.js +26 -0
- package/dist/hooks/useNS.cjs +28 -0
- package/dist/{types/hooks → hooks}/useNS.d.ts +1 -1
- package/dist/hooks/useNS.js +26 -0
- package/dist/hooks/useProfile.cjs +28 -0
- package/dist/{types/hooks → hooks}/useProfile.d.ts +1 -1
- package/dist/hooks/useProfile.js +26 -0
- package/dist/hooks/useUniversalNS.cjs +28 -0
- package/dist/{types/hooks → hooks}/useUniversalNS.d.ts +1 -1
- package/dist/hooks/useUniversalNS.js +26 -0
- package/dist/hooks/useUniversalProfile.cjs +28 -0
- package/dist/{types/hooks → hooks}/useUniversalProfile.d.ts +1 -1
- package/dist/hooks/useUniversalProfile.js +26 -0
- package/dist/index.cjs +71 -0
- package/dist/index.d.ts +3 -247
- package/dist/index.js +18 -425
- package/dist/types/cointype.cjs +29 -0
- package/dist/types/cointype.d.ts +26 -0
- package/dist/types/cointype.js +29 -0
- package/dist/types/hook.cjs +38 -0
- package/dist/types/hook.d.ts +195 -0
- package/dist/types/hook.js +38 -0
- package/dist/types/index.cjs +38 -0
- package/dist/types/index.d.ts +5 -3
- package/dist/types/index.js +5 -0
- package/dist/types/network.cjs +41 -0
- package/dist/types/network.d.ts +55 -0
- package/dist/types/network.js +41 -0
- package/dist/types/platform.cjs +110 -0
- package/dist/types/platform.d.ts +122 -0
- package/dist/types/platform.js +110 -0
- package/dist/types/source.cjs +44 -0
- package/dist/types/source.d.ts +49 -0
- package/dist/types/source.js +44 -0
- package/dist/utils/helpers.cjs +119 -0
- package/dist/{types/utils → utils}/helpers.d.ts +4 -3
- package/dist/utils/helpers.js +112 -0
- package/dist/utils/index.cjs +27 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/network.cjs +355 -0
- package/dist/utils/network.d.ts +4 -0
- package/dist/utils/network.js +353 -0
- package/dist/utils/platform.cjs +983 -0
- package/dist/utils/platform.d.ts +18 -0
- package/dist/utils/platform.js +979 -0
- package/dist/utils/regex.cjs +34 -0
- package/dist/utils/regex.d.ts +30 -0
- package/dist/utils/regex.js +32 -0
- package/dist/utils/source.cjs +144 -0
- package/dist/utils/source.d.ts +2 -0
- package/dist/utils/source.js +142 -0
- package/package.json +32 -12
- package/dist/index.esm.js +0 -415
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/types/utils/constants.d.ts +0 -36
- package/dist/types/utils/types.d.ts +0 -102
- /package/dist/{types/hooks → hooks}/index.d.ts +0 -0
- /package/dist/{types/setupTests.d.ts → setupTests.d.ts} +0 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type { Network } from "./network";
|
|
2
|
+
import type { Platform } from "./platform";
|
|
3
|
+
import type { Source } from "./source";
|
|
4
|
+
/**
|
|
5
|
+
* Standard error messages used across the library
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare enum ErrorMessages {
|
|
9
|
+
/** Resource not found */
|
|
10
|
+
NOT_FOUND = "Not Found",
|
|
11
|
+
/** Resolver address is invalid */
|
|
12
|
+
INVALID_RESOLVER = "Invalid Resolver Address",
|
|
13
|
+
/** Resolved address is invalid */
|
|
14
|
+
INVALID_RESOLVED = "Invalid Resolved Address",
|
|
15
|
+
/** Resource does not exist */
|
|
16
|
+
NOT_EXIST = "Does Not Exist",
|
|
17
|
+
/** Provided identity or domain is invalid */
|
|
18
|
+
INVALID_IDENTITY = "Invalid Identity or Domain",
|
|
19
|
+
/** Provided address is invalid */
|
|
20
|
+
INVALID_ADDRESS = "Invalid Address",
|
|
21
|
+
/** An unknown error occurred */
|
|
22
|
+
UNKNOWN_ERROR = "Unknown Error Occurred",
|
|
23
|
+
/** Network-related error */
|
|
24
|
+
NETWORK_ERROR = "Network Error"
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* API endpoints for different query types
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export declare enum QueryEndpoint {
|
|
31
|
+
/** Name service endpoint */
|
|
32
|
+
NS = "ns",
|
|
33
|
+
/** Profile data endpoint */
|
|
34
|
+
PROFILE = "profile",
|
|
35
|
+
/** Domain information endpoint */
|
|
36
|
+
DOMAIN = "domain"
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Represents a blockchain address record
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
export type AddressRecord = {
|
|
43
|
+
/** The blockchain address */
|
|
44
|
+
address: string;
|
|
45
|
+
/** Network identifier */
|
|
46
|
+
network: string;
|
|
47
|
+
/** Type identifier */
|
|
48
|
+
__typename: "Address";
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Social link information for a profile
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
export type SocialLinksItem = {
|
|
55
|
+
/** URL to the social profile */
|
|
56
|
+
link: string | null;
|
|
57
|
+
/** Username or handle on the platform */
|
|
58
|
+
handle: string | null;
|
|
59
|
+
/** Data sources that provided this information */
|
|
60
|
+
sources: Source[];
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Collection of social links indexed by platform
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
export type SocialLinks = Record<string, SocialLinksItem>;
|
|
67
|
+
/**
|
|
68
|
+
* Social account metrics
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export type SocialRecord = {
|
|
72
|
+
/** Unique identifier */
|
|
73
|
+
uid: number | null;
|
|
74
|
+
/** Number of followers */
|
|
75
|
+
follower: number;
|
|
76
|
+
/** Number of accounts being followed */
|
|
77
|
+
following: number;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Complete profile response from the API
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
export interface ProfileResponse extends NSResponse {
|
|
84
|
+
/** Email address */
|
|
85
|
+
email: string | null;
|
|
86
|
+
/** Content hash */
|
|
87
|
+
contenthash: string | null;
|
|
88
|
+
/** Profile header image */
|
|
89
|
+
header: string | null;
|
|
90
|
+
/** Geographic location */
|
|
91
|
+
location: string | null;
|
|
92
|
+
/** Creation timestamp */
|
|
93
|
+
createdAt: string | null;
|
|
94
|
+
/** Profile status */
|
|
95
|
+
status: string | null;
|
|
96
|
+
/** Error message if any */
|
|
97
|
+
error?: string;
|
|
98
|
+
/** Social platform links */
|
|
99
|
+
links: SocialLinks;
|
|
100
|
+
/** Social metrics */
|
|
101
|
+
social: SocialRecord | {};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Name service response from the API
|
|
105
|
+
* @public
|
|
106
|
+
*/
|
|
107
|
+
export interface NSResponse {
|
|
108
|
+
/** Identifier string */
|
|
109
|
+
identity: string;
|
|
110
|
+
/** Associated blockchain address */
|
|
111
|
+
address: string | null;
|
|
112
|
+
/** Avatar image URL */
|
|
113
|
+
avatar: string | null;
|
|
114
|
+
/** Profile description */
|
|
115
|
+
description: string | null;
|
|
116
|
+
/** Platform identifier */
|
|
117
|
+
platform: string;
|
|
118
|
+
/** Human-readable display name */
|
|
119
|
+
displayName: string | null;
|
|
120
|
+
/** Alternative identities */
|
|
121
|
+
aliases?: string[];
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Domain information response from the API
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
export interface DomainResponse {
|
|
128
|
+
/** Domain identifier */
|
|
129
|
+
identity: string;
|
|
130
|
+
/** Platform type */
|
|
131
|
+
platform: Platform;
|
|
132
|
+
/** Address resolved by this domain */
|
|
133
|
+
resolvedAddress: string | null;
|
|
134
|
+
/** Owner's address */
|
|
135
|
+
ownerAddress: string | null;
|
|
136
|
+
/** Manager's address */
|
|
137
|
+
managerAddress: string | null;
|
|
138
|
+
/** Human-readable display name */
|
|
139
|
+
displayName: string | null;
|
|
140
|
+
/** Whether this is the primary domain */
|
|
141
|
+
isPrimary: boolean;
|
|
142
|
+
/** Domain status */
|
|
143
|
+
status: string;
|
|
144
|
+
/** Creation timestamp */
|
|
145
|
+
createdAt: string | null;
|
|
146
|
+
/** Last update timestamp */
|
|
147
|
+
updatedAt: string | null;
|
|
148
|
+
/** Expiration timestamp */
|
|
149
|
+
expiredAt: string | null;
|
|
150
|
+
/** Content hash */
|
|
151
|
+
contenthash: string | null;
|
|
152
|
+
/** Text records */
|
|
153
|
+
texts: Record<string, string>;
|
|
154
|
+
/** Address records by network */
|
|
155
|
+
addresses: Record<Network, string>;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Configuration options for queries
|
|
159
|
+
* @public
|
|
160
|
+
*/
|
|
161
|
+
export type QueryOptions = {
|
|
162
|
+
/** API Key for authentication */
|
|
163
|
+
apiKey?: string;
|
|
164
|
+
/** Whether the query should execute */
|
|
165
|
+
enabled?: boolean;
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* Identity string used to query profiles
|
|
169
|
+
* Can be a plain string or a platform-prefixed string
|
|
170
|
+
* @public
|
|
171
|
+
*/
|
|
172
|
+
export type IdentityString = string | `${Platform},${string}`;
|
|
173
|
+
/**
|
|
174
|
+
* Generic query result containing data, loading state, and errors
|
|
175
|
+
* @public
|
|
176
|
+
*/
|
|
177
|
+
export type QueryResult<T> = {
|
|
178
|
+
/** Response data or null if not loaded/error */
|
|
179
|
+
data: T | null;
|
|
180
|
+
/** Whether the query is in progress */
|
|
181
|
+
isLoading: boolean;
|
|
182
|
+
/** Error object if the query failed */
|
|
183
|
+
error: Error | null;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Specialized result types for better type safety
|
|
187
|
+
* @public
|
|
188
|
+
*/
|
|
189
|
+
export type ProfileResult = QueryResult<ProfileResponse>;
|
|
190
|
+
export type NSResult = QueryResult<NSResponse>;
|
|
191
|
+
export type ProfileBatchResult = QueryResult<ProfileResponse[]>;
|
|
192
|
+
export type NSBatchResult = QueryResult<NSResponse[]>;
|
|
193
|
+
export type ProfileUniversalResult = QueryResult<ProfileResponse[]>;
|
|
194
|
+
export type NSUniversalResult = QueryResult<NSResponse[]>;
|
|
195
|
+
export type DomainResult = QueryResult<DomainResponse>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standard error messages used across the library
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
var ErrorMessages;
|
|
6
|
+
(function (ErrorMessages) {
|
|
7
|
+
/** Resource not found */
|
|
8
|
+
ErrorMessages["NOT_FOUND"] = "Not Found";
|
|
9
|
+
/** Resolver address is invalid */
|
|
10
|
+
ErrorMessages["INVALID_RESOLVER"] = "Invalid Resolver Address";
|
|
11
|
+
/** Resolved address is invalid */
|
|
12
|
+
ErrorMessages["INVALID_RESOLVED"] = "Invalid Resolved Address";
|
|
13
|
+
/** Resource does not exist */
|
|
14
|
+
ErrorMessages["NOT_EXIST"] = "Does Not Exist";
|
|
15
|
+
/** Provided identity or domain is invalid */
|
|
16
|
+
ErrorMessages["INVALID_IDENTITY"] = "Invalid Identity or Domain";
|
|
17
|
+
/** Provided address is invalid */
|
|
18
|
+
ErrorMessages["INVALID_ADDRESS"] = "Invalid Address";
|
|
19
|
+
/** An unknown error occurred */
|
|
20
|
+
ErrorMessages["UNKNOWN_ERROR"] = "Unknown Error Occurred";
|
|
21
|
+
/** Network-related error */
|
|
22
|
+
ErrorMessages["NETWORK_ERROR"] = "Network Error";
|
|
23
|
+
})(ErrorMessages || (ErrorMessages = {}));
|
|
24
|
+
/**
|
|
25
|
+
* API endpoints for different query types
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
var QueryEndpoint;
|
|
29
|
+
(function (QueryEndpoint) {
|
|
30
|
+
/** Name service endpoint */
|
|
31
|
+
QueryEndpoint["NS"] = "ns";
|
|
32
|
+
/** Profile data endpoint */
|
|
33
|
+
QueryEndpoint["PROFILE"] = "profile";
|
|
34
|
+
/** Domain information endpoint */
|
|
35
|
+
QueryEndpoint["DOMAIN"] = "domain";
|
|
36
|
+
})(QueryEndpoint || (QueryEndpoint = {}));
|
|
37
|
+
|
|
38
|
+
export { ErrorMessages, QueryEndpoint };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var platform = require('./platform.cjs');
|
|
4
|
+
var network = require('./network.cjs');
|
|
5
|
+
var hook = require('./hook.cjs');
|
|
6
|
+
var source = require('./source.cjs');
|
|
7
|
+
var cointype = require('./cointype.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports, 'Platform', {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return platform.Platform; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, 'PlatformSystem', {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return platform.PlatformSystem; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, 'Network', {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return network.Network; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, 'ErrorMessages', {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return hook.ErrorMessages; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, 'QueryEndpoint', {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return hook.QueryEndpoint; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, 'Source', {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return source.Source; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, 'CoinType', {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return cointype.CoinType; }
|
|
38
|
+
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
1
|
+
export * from "./platform";
|
|
2
|
+
export * from "./network";
|
|
3
|
+
export * from "./hook";
|
|
4
|
+
export * from "./source";
|
|
5
|
+
export * from "./cointype";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Supported blockchain networks and protocols
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
exports.Network = void 0;
|
|
8
|
+
(function (Network) {
|
|
9
|
+
Network["aptos"] = "aptos";
|
|
10
|
+
Network["arbitrum"] = "arbitrum";
|
|
11
|
+
Network["arbitrum_nova"] = "arbitrum_nova";
|
|
12
|
+
Network["arbitrum_one"] = "arbitrum_one";
|
|
13
|
+
Network["apechain"] = "apechain";
|
|
14
|
+
Network["arweave"] = "arweave";
|
|
15
|
+
Network["avalanche"] = "avalanche";
|
|
16
|
+
Network["base"] = "base";
|
|
17
|
+
Network["bitcoin"] = "bitcoin";
|
|
18
|
+
Network["binanceSmartChain"] = "binance-smart-chain";
|
|
19
|
+
Network["bsc"] = "bsc";
|
|
20
|
+
Network["conflux"] = "conflux";
|
|
21
|
+
Network["crossbell"] = "crossbell";
|
|
22
|
+
Network["erc1577"] = "erc1577";
|
|
23
|
+
Network["ethereum"] = "ethereum";
|
|
24
|
+
Network["fantom"] = "fantom";
|
|
25
|
+
Network["farcaster"] = "farcaster";
|
|
26
|
+
Network["flow"] = "flow";
|
|
27
|
+
Network["gnosis"] = "gnosis";
|
|
28
|
+
Network["lens"] = "lens";
|
|
29
|
+
Network["linea"] = "linea";
|
|
30
|
+
Network["mastodon"] = "mastodon";
|
|
31
|
+
Network["optimism"] = "optimism";
|
|
32
|
+
Network["polygon"] = "polygon";
|
|
33
|
+
Network["scroll"] = "scroll";
|
|
34
|
+
Network["snapshot"] = "snapshot";
|
|
35
|
+
Network["solana"] = "solana";
|
|
36
|
+
Network["vsl"] = "vsl";
|
|
37
|
+
Network["xLayer"] = "x-layer";
|
|
38
|
+
Network["zksync_era"] = "zksync_era";
|
|
39
|
+
Network["zora"] = "zora";
|
|
40
|
+
Network["unichain"] = "unichain";
|
|
41
|
+
})(exports.Network || (exports.Network = {}));
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported blockchain networks and protocols
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export declare enum Network {
|
|
6
|
+
aptos = "aptos",
|
|
7
|
+
arbitrum = "arbitrum",
|
|
8
|
+
arbitrum_nova = "arbitrum_nova",
|
|
9
|
+
arbitrum_one = "arbitrum_one",
|
|
10
|
+
apechain = "apechain",
|
|
11
|
+
arweave = "arweave",
|
|
12
|
+
avalanche = "avalanche",
|
|
13
|
+
base = "base",
|
|
14
|
+
bitcoin = "bitcoin",
|
|
15
|
+
binanceSmartChain = "binance-smart-chain",
|
|
16
|
+
bsc = "bsc",
|
|
17
|
+
conflux = "conflux",
|
|
18
|
+
crossbell = "crossbell",
|
|
19
|
+
erc1577 = "erc1577",
|
|
20
|
+
ethereum = "ethereum",
|
|
21
|
+
fantom = "fantom",
|
|
22
|
+
farcaster = "farcaster",
|
|
23
|
+
flow = "flow",
|
|
24
|
+
gnosis = "gnosis",
|
|
25
|
+
lens = "lens",
|
|
26
|
+
linea = "linea",
|
|
27
|
+
mastodon = "mastodon",
|
|
28
|
+
optimism = "optimism",
|
|
29
|
+
polygon = "polygon",
|
|
30
|
+
scroll = "scroll",
|
|
31
|
+
snapshot = "snapshot",
|
|
32
|
+
solana = "solana",
|
|
33
|
+
vsl = "vsl",
|
|
34
|
+
xLayer = "x-layer",
|
|
35
|
+
zksync_era = "zksync_era",
|
|
36
|
+
zora = "zora",
|
|
37
|
+
unichain = "unichain"
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Network metadata interface containing display and functional information
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export interface NetworkType {
|
|
44
|
+
assetPrefix?: string;
|
|
45
|
+
bgColor: string;
|
|
46
|
+
chainId?: number;
|
|
47
|
+
icon: string;
|
|
48
|
+
key: string;
|
|
49
|
+
label: string;
|
|
50
|
+
primaryColor: string;
|
|
51
|
+
scanLabel?: string;
|
|
52
|
+
scanPrefix: string;
|
|
53
|
+
scanPrefixTx?: string;
|
|
54
|
+
short?: string;
|
|
55
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported blockchain networks and protocols
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
var Network;
|
|
6
|
+
(function (Network) {
|
|
7
|
+
Network["aptos"] = "aptos";
|
|
8
|
+
Network["arbitrum"] = "arbitrum";
|
|
9
|
+
Network["arbitrum_nova"] = "arbitrum_nova";
|
|
10
|
+
Network["arbitrum_one"] = "arbitrum_one";
|
|
11
|
+
Network["apechain"] = "apechain";
|
|
12
|
+
Network["arweave"] = "arweave";
|
|
13
|
+
Network["avalanche"] = "avalanche";
|
|
14
|
+
Network["base"] = "base";
|
|
15
|
+
Network["bitcoin"] = "bitcoin";
|
|
16
|
+
Network["binanceSmartChain"] = "binance-smart-chain";
|
|
17
|
+
Network["bsc"] = "bsc";
|
|
18
|
+
Network["conflux"] = "conflux";
|
|
19
|
+
Network["crossbell"] = "crossbell";
|
|
20
|
+
Network["erc1577"] = "erc1577";
|
|
21
|
+
Network["ethereum"] = "ethereum";
|
|
22
|
+
Network["fantom"] = "fantom";
|
|
23
|
+
Network["farcaster"] = "farcaster";
|
|
24
|
+
Network["flow"] = "flow";
|
|
25
|
+
Network["gnosis"] = "gnosis";
|
|
26
|
+
Network["lens"] = "lens";
|
|
27
|
+
Network["linea"] = "linea";
|
|
28
|
+
Network["mastodon"] = "mastodon";
|
|
29
|
+
Network["optimism"] = "optimism";
|
|
30
|
+
Network["polygon"] = "polygon";
|
|
31
|
+
Network["scroll"] = "scroll";
|
|
32
|
+
Network["snapshot"] = "snapshot";
|
|
33
|
+
Network["solana"] = "solana";
|
|
34
|
+
Network["vsl"] = "vsl";
|
|
35
|
+
Network["xLayer"] = "x-layer";
|
|
36
|
+
Network["zksync_era"] = "zksync_era";
|
|
37
|
+
Network["zora"] = "zora";
|
|
38
|
+
Network["unichain"] = "unichain";
|
|
39
|
+
})(Network || (Network = {}));
|
|
40
|
+
|
|
41
|
+
export { Network };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Supported platform types for identity and social profiles
|
|
5
|
+
* Includes blockchain networks, name services, and social platforms
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
exports.Platform = void 0;
|
|
9
|
+
(function (Platform) {
|
|
10
|
+
Platform["ens"] = "ens";
|
|
11
|
+
Platform["dotbit"] = "dotbit";
|
|
12
|
+
Platform["lens"] = "lens";
|
|
13
|
+
Platform["box"] = "box";
|
|
14
|
+
Platform["ethereum"] = "ethereum";
|
|
15
|
+
Platform["twitter"] = "twitter";
|
|
16
|
+
Platform["nextid"] = "nextid";
|
|
17
|
+
Platform["bitcoin"] = "bitcoin";
|
|
18
|
+
Platform["keybase"] = "keybase";
|
|
19
|
+
Platform["reddit"] = "reddit";
|
|
20
|
+
Platform["github"] = "github";
|
|
21
|
+
Platform["unstoppableDomains"] = "unstoppabledomains";
|
|
22
|
+
Platform["basenames"] = "basenames";
|
|
23
|
+
Platform["linea"] = "linea";
|
|
24
|
+
Platform["ckb"] = "ckb";
|
|
25
|
+
Platform["farcaster"] = "farcaster";
|
|
26
|
+
Platform["space_id"] = "space_id";
|
|
27
|
+
Platform["telegram"] = "telegram";
|
|
28
|
+
Platform["instagram"] = "instagram";
|
|
29
|
+
Platform["cyberconnect"] = "cyberconnect";
|
|
30
|
+
Platform["opensea"] = "opensea";
|
|
31
|
+
Platform["discord"] = "discord";
|
|
32
|
+
Platform["calendly"] = "calendly";
|
|
33
|
+
Platform["url"] = "url";
|
|
34
|
+
Platform["website"] = "website";
|
|
35
|
+
Platform["linkedin"] = "linkedin";
|
|
36
|
+
Platform["dns"] = "dns";
|
|
37
|
+
Platform["tron"] = "tron";
|
|
38
|
+
Platform["hey"] = "hey";
|
|
39
|
+
Platform["facebook"] = "facebook";
|
|
40
|
+
Platform["threads"] = "threads";
|
|
41
|
+
Platform["whatsapp"] = "whatsapp";
|
|
42
|
+
Platform["weibo"] = "weibo";
|
|
43
|
+
Platform["youtube"] = "youtube";
|
|
44
|
+
Platform["tiktok"] = "tiktok";
|
|
45
|
+
Platform["bilibili"] = "bilibili";
|
|
46
|
+
Platform["medium"] = "medium";
|
|
47
|
+
Platform["mirror"] = "mirror";
|
|
48
|
+
Platform["zerion"] = "zerion";
|
|
49
|
+
Platform["aave"] = "aave";
|
|
50
|
+
Platform["rainbow"] = "rainbow";
|
|
51
|
+
Platform["bluesky"] = "bluesky";
|
|
52
|
+
Platform["nostr"] = "nostr";
|
|
53
|
+
Platform["poap"] = "poap";
|
|
54
|
+
Platform["uniswap"] = "uniswap";
|
|
55
|
+
Platform["degenscore"] = "degenscore";
|
|
56
|
+
Platform["firefly"] = "firefly";
|
|
57
|
+
Platform["solana"] = "solana";
|
|
58
|
+
Platform["sns"] = "sns";
|
|
59
|
+
Platform["mstdnjp"] = "mstdnjp";
|
|
60
|
+
Platform["lobsters"] = "lobsters";
|
|
61
|
+
Platform["hackernews"] = "hackernews";
|
|
62
|
+
Platform["crossbell"] = "crossbell";
|
|
63
|
+
Platform["minds"] = "minds";
|
|
64
|
+
Platform["paragraph"] = "paragraph";
|
|
65
|
+
Platform["genome"] = "genome";
|
|
66
|
+
Platform["gnosis"] = "gnosis";
|
|
67
|
+
Platform["webacy"] = "webacy";
|
|
68
|
+
Platform["clusters"] = "clusters";
|
|
69
|
+
Platform["guild"] = "guild";
|
|
70
|
+
Platform["ton"] = "ton";
|
|
71
|
+
Platform["snapshot"] = "snapshot";
|
|
72
|
+
Platform["coingecko"] = "coingecko";
|
|
73
|
+
Platform["gitcoin"] = "gitcoin";
|
|
74
|
+
Platform["humanpassport"] = "humanpassport";
|
|
75
|
+
Platform["talent"] = "talentprotocol";
|
|
76
|
+
Platform["doge"] = "doge";
|
|
77
|
+
Platform["bsc"] = "bsc";
|
|
78
|
+
Platform["aptos"] = "aptos";
|
|
79
|
+
Platform["near"] = "near";
|
|
80
|
+
Platform["stacks"] = "stacks";
|
|
81
|
+
Platform["cosmos"] = "cosmos";
|
|
82
|
+
Platform["zeta"] = "zeta";
|
|
83
|
+
Platform["mode"] = "mode";
|
|
84
|
+
Platform["arbitrum"] = "arbitrum";
|
|
85
|
+
Platform["scroll"] = "scroll";
|
|
86
|
+
Platform["taiko"] = "taiko";
|
|
87
|
+
Platform["mint"] = "mint";
|
|
88
|
+
Platform["zkfair"] = "zkfair";
|
|
89
|
+
Platform["manta"] = "manta";
|
|
90
|
+
Platform["lightlink"] = "lightlink";
|
|
91
|
+
Platform["merlin"] = "merlin";
|
|
92
|
+
Platform["alienx"] = "alienx";
|
|
93
|
+
Platform["edgeless"] = "edgeless";
|
|
94
|
+
Platform["tomo"] = "tomo";
|
|
95
|
+
Platform["ailayer"] = "ailayer";
|
|
96
|
+
Platform["philand"] = "philand";
|
|
97
|
+
Platform["efp"] = "efp";
|
|
98
|
+
Platform["gravity"] = "gravity";
|
|
99
|
+
})(exports.Platform || (exports.Platform = {}));
|
|
100
|
+
/**
|
|
101
|
+
* Platform system classification
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
exports.PlatformSystem = void 0;
|
|
105
|
+
(function (PlatformSystem) {
|
|
106
|
+
/** Traditional web platforms */
|
|
107
|
+
PlatformSystem[PlatformSystem["web2"] = 0] = "web2";
|
|
108
|
+
/** Blockchain/decentralized platforms */
|
|
109
|
+
PlatformSystem[PlatformSystem["web3"] = 1] = "web3";
|
|
110
|
+
})(exports.PlatformSystem || (exports.PlatformSystem = {}));
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported platform types for identity and social profiles
|
|
3
|
+
* Includes blockchain networks, name services, and social platforms
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare enum Platform {
|
|
7
|
+
ens = "ens",
|
|
8
|
+
dotbit = "dotbit",
|
|
9
|
+
lens = "lens",
|
|
10
|
+
box = "box",
|
|
11
|
+
ethereum = "ethereum",
|
|
12
|
+
twitter = "twitter",
|
|
13
|
+
nextid = "nextid",
|
|
14
|
+
bitcoin = "bitcoin",
|
|
15
|
+
keybase = "keybase",
|
|
16
|
+
reddit = "reddit",
|
|
17
|
+
github = "github",
|
|
18
|
+
unstoppableDomains = "unstoppabledomains",
|
|
19
|
+
basenames = "basenames",
|
|
20
|
+
linea = "linea",
|
|
21
|
+
ckb = "ckb",
|
|
22
|
+
farcaster = "farcaster",
|
|
23
|
+
space_id = "space_id",
|
|
24
|
+
telegram = "telegram",
|
|
25
|
+
instagram = "instagram",
|
|
26
|
+
cyberconnect = "cyberconnect",
|
|
27
|
+
opensea = "opensea",
|
|
28
|
+
discord = "discord",
|
|
29
|
+
calendly = "calendly",
|
|
30
|
+
url = "url",
|
|
31
|
+
website = "website",
|
|
32
|
+
linkedin = "linkedin",
|
|
33
|
+
dns = "dns",
|
|
34
|
+
tron = "tron",
|
|
35
|
+
hey = "hey",
|
|
36
|
+
facebook = "facebook",
|
|
37
|
+
threads = "threads",
|
|
38
|
+
whatsapp = "whatsapp",
|
|
39
|
+
weibo = "weibo",
|
|
40
|
+
youtube = "youtube",
|
|
41
|
+
tiktok = "tiktok",
|
|
42
|
+
bilibili = "bilibili",
|
|
43
|
+
medium = "medium",
|
|
44
|
+
mirror = "mirror",
|
|
45
|
+
zerion = "zerion",
|
|
46
|
+
aave = "aave",
|
|
47
|
+
rainbow = "rainbow",
|
|
48
|
+
bluesky = "bluesky",
|
|
49
|
+
nostr = "nostr",
|
|
50
|
+
poap = "poap",
|
|
51
|
+
uniswap = "uniswap",
|
|
52
|
+
degenscore = "degenscore",
|
|
53
|
+
firefly = "firefly",
|
|
54
|
+
solana = "solana",
|
|
55
|
+
sns = "sns",
|
|
56
|
+
mstdnjp = "mstdnjp",
|
|
57
|
+
lobsters = "lobsters",
|
|
58
|
+
hackernews = "hackernews",
|
|
59
|
+
crossbell = "crossbell",
|
|
60
|
+
minds = "minds",
|
|
61
|
+
paragraph = "paragraph",
|
|
62
|
+
genome = "genome",
|
|
63
|
+
gnosis = "gnosis",
|
|
64
|
+
webacy = "webacy",
|
|
65
|
+
clusters = "clusters",
|
|
66
|
+
guild = "guild",
|
|
67
|
+
ton = "ton",
|
|
68
|
+
snapshot = "snapshot",
|
|
69
|
+
coingecko = "coingecko",
|
|
70
|
+
gitcoin = "gitcoin",
|
|
71
|
+
humanpassport = "humanpassport",
|
|
72
|
+
talent = "talentprotocol",
|
|
73
|
+
doge = "doge",
|
|
74
|
+
bsc = "bsc",
|
|
75
|
+
aptos = "aptos",
|
|
76
|
+
near = "near",
|
|
77
|
+
stacks = "stacks",
|
|
78
|
+
cosmos = "cosmos",
|
|
79
|
+
zeta = "zeta",
|
|
80
|
+
mode = "mode",
|
|
81
|
+
arbitrum = "arbitrum",
|
|
82
|
+
scroll = "scroll",
|
|
83
|
+
taiko = "taiko",
|
|
84
|
+
mint = "mint",
|
|
85
|
+
zkfair = "zkfair",
|
|
86
|
+
manta = "manta",
|
|
87
|
+
lightlink = "lightlink",
|
|
88
|
+
merlin = "merlin",
|
|
89
|
+
alienx = "alienx",
|
|
90
|
+
edgeless = "edgeless",
|
|
91
|
+
tomo = "tomo",
|
|
92
|
+
ailayer = "ailayer",
|
|
93
|
+
philand = "philand",
|
|
94
|
+
efp = "efp",
|
|
95
|
+
gravity = "gravity"
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Platform metadata structure
|
|
99
|
+
* Contains display and functional information about a platform
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
export interface PlatformType {
|
|
103
|
+
color?: string;
|
|
104
|
+
icon?: string;
|
|
105
|
+
label: string;
|
|
106
|
+
description?: string;
|
|
107
|
+
urlPrefix?: string;
|
|
108
|
+
ensText?: string[];
|
|
109
|
+
registerlink?: string;
|
|
110
|
+
editUrlPrefix?: string;
|
|
111
|
+
system: PlatformSystem;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Platform system classification
|
|
115
|
+
* @public
|
|
116
|
+
*/
|
|
117
|
+
export declare enum PlatformSystem {
|
|
118
|
+
/** Traditional web platforms */
|
|
119
|
+
web2 = 0,
|
|
120
|
+
/** Blockchain/decentralized platforms */
|
|
121
|
+
web3 = 1
|
|
122
|
+
}
|