web3bio-profile-kit 0.1.22 → 0.1.24
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/dist/hooks/useBaseQuery.cjs +1 -0
- package/dist/hooks/useBaseQuery.js +1 -0
- package/dist/hooks/useBatchNS.cjs +1 -0
- package/dist/hooks/useBatchNS.js +1 -0
- package/dist/hooks/useBatchProfile.cjs +1 -0
- package/dist/hooks/useBatchProfile.js +1 -0
- package/dist/hooks/useDomain.cjs +1 -0
- package/dist/hooks/useDomain.js +1 -0
- package/dist/hooks/useNS.cjs +1 -0
- package/dist/hooks/useNS.js +1 -0
- package/dist/hooks/useProfile.cjs +1 -0
- package/dist/hooks/useProfile.js +1 -0
- package/dist/hooks/useUniversalNS.cjs +1 -0
- package/dist/hooks/useUniversalNS.js +1 -0
- package/dist/hooks/useUniversalProfile.cjs +1 -0
- package/dist/hooks/useUniversalProfile.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +1 -0
- package/dist/types/ceredential.cjs +30 -0
- package/dist/types/ceredential.d.ts +45 -0
- package/dist/types/ceredential.js +30 -0
- package/dist/types/index.cjs +9 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/utils/helpers.cjs +1 -0
- package/dist/utils/helpers.js +1 -0
- package/dist/utils/platform.cjs +1 -1
- package/dist/utils/platform.js +1 -1
- package/dist/utils/regex.cjs +9 -9
- package/dist/utils/regex.d.ts +1 -1
- package/dist/utils/regex.js +9 -9
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ require('../types/network.cjs');
|
|
|
5
5
|
var hook = require('../types/hook.cjs');
|
|
6
6
|
require('../types/source.cjs');
|
|
7
7
|
require('../types/cointype.cjs');
|
|
8
|
+
require('../types/ceredential.cjs');
|
|
8
9
|
var reactQuery = require('@tanstack/react-query');
|
|
9
10
|
var helpers = require('../utils/helpers.cjs');
|
|
10
11
|
|
|
@@ -3,6 +3,7 @@ import '../types/network.js';
|
|
|
3
3
|
import { ErrorMessages, QueryEndpoint } from '../types/hook.js';
|
|
4
4
|
import '../types/source.js';
|
|
5
5
|
import '../types/cointype.js';
|
|
6
|
+
import '../types/ceredential.js';
|
|
6
7
|
import { useQuery } from '@tanstack/react-query';
|
|
7
8
|
import { getApiKey, PROD_API_ENDPOINT, resolveIdentity } from '../utils/helpers.js';
|
|
8
9
|
|
package/dist/hooks/useBatchNS.js
CHANGED
package/dist/hooks/useDomain.cjs
CHANGED
package/dist/hooks/useDomain.js
CHANGED
package/dist/hooks/useNS.cjs
CHANGED
package/dist/hooks/useNS.js
CHANGED
package/dist/hooks/useProfile.js
CHANGED
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.CredentialCategory = void 0;
|
|
4
|
+
(function (CredentialCategory) {
|
|
5
|
+
CredentialCategory["isHuman"] = "isHuman";
|
|
6
|
+
CredentialCategory["isRisky"] = "isRisky";
|
|
7
|
+
CredentialCategory["isSpam"] = "isSpam";
|
|
8
|
+
})(exports.CredentialCategory || (exports.CredentialCategory = {}));
|
|
9
|
+
exports.CredentialSource = void 0;
|
|
10
|
+
(function (CredentialSource) {
|
|
11
|
+
// isHuman
|
|
12
|
+
CredentialSource["talent"] = "talent";
|
|
13
|
+
CredentialSource["binance"] = "binance";
|
|
14
|
+
CredentialSource["coinbase"] = "coinbase";
|
|
15
|
+
CredentialSource["farcasterPro"] = "farcaster-pro";
|
|
16
|
+
CredentialSource["galxePassport"] = "galxe-passport";
|
|
17
|
+
CredentialSource["world_id"] = "world_id";
|
|
18
|
+
CredentialSource["humanPassport"] = "human-passport";
|
|
19
|
+
CredentialSource["zkme"] = "zkme";
|
|
20
|
+
CredentialSource["humanode"] = "humanode";
|
|
21
|
+
CredentialSource["self_xyz"] = "self_xyz";
|
|
22
|
+
CredentialSource["dentity"] = "dentity";
|
|
23
|
+
// isRisky
|
|
24
|
+
CredentialSource["hacker"] = "hacker";
|
|
25
|
+
CredentialSource["hacked"] = "hacked";
|
|
26
|
+
CredentialSource["dmca"] = "dmca";
|
|
27
|
+
CredentialSource["google"] = "google";
|
|
28
|
+
// isSpam
|
|
29
|
+
CredentialSource["warpcast"] = "warpcast";
|
|
30
|
+
})(exports.CredentialSource || (exports.CredentialSource = {}));
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Platform } from "./platform";
|
|
2
|
+
export declare enum CredentialCategory {
|
|
3
|
+
isHuman = "isHuman",
|
|
4
|
+
isRisky = "isRisky",
|
|
5
|
+
isSpam = "isSpam"
|
|
6
|
+
}
|
|
7
|
+
export declare enum CredentialSource {
|
|
8
|
+
talent = "talent",
|
|
9
|
+
binance = "binance",
|
|
10
|
+
coinbase = "coinbase",
|
|
11
|
+
farcasterPro = "farcaster-pro",
|
|
12
|
+
galxePassport = "galxe-passport",
|
|
13
|
+
world_id = "world_id",
|
|
14
|
+
humanPassport = "human-passport",
|
|
15
|
+
zkme = "zkme",
|
|
16
|
+
humanode = "humanode",
|
|
17
|
+
self_xyz = "self_xyz",
|
|
18
|
+
dentity = "dentity",
|
|
19
|
+
hacker = "hacker",
|
|
20
|
+
hacked = "hacked",
|
|
21
|
+
dmca = "dmca",
|
|
22
|
+
google = "google",
|
|
23
|
+
warpcast = "warpcast"
|
|
24
|
+
}
|
|
25
|
+
export interface CredentialMetaData {
|
|
26
|
+
platform?: Platform;
|
|
27
|
+
description: string;
|
|
28
|
+
label: string;
|
|
29
|
+
icon: string;
|
|
30
|
+
}
|
|
31
|
+
export interface CredentialData extends CredentialMetaData {
|
|
32
|
+
id: string;
|
|
33
|
+
category: CredentialCategory;
|
|
34
|
+
dataSource: CredentialSource;
|
|
35
|
+
type: string;
|
|
36
|
+
value: string;
|
|
37
|
+
updatedAt: number | null;
|
|
38
|
+
expiredAt: number | null;
|
|
39
|
+
link: string | null;
|
|
40
|
+
}
|
|
41
|
+
export interface CredentialResponse {
|
|
42
|
+
[CredentialCategory.isHuman]: CredentialData[] | null;
|
|
43
|
+
[CredentialCategory.isRisky]: CredentialData[] | null;
|
|
44
|
+
[CredentialCategory.isSpam]: CredentialData[] | null;
|
|
45
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var CredentialCategory;
|
|
2
|
+
(function (CredentialCategory) {
|
|
3
|
+
CredentialCategory["isHuman"] = "isHuman";
|
|
4
|
+
CredentialCategory["isRisky"] = "isRisky";
|
|
5
|
+
CredentialCategory["isSpam"] = "isSpam";
|
|
6
|
+
})(CredentialCategory || (CredentialCategory = {}));
|
|
7
|
+
var CredentialSource;
|
|
8
|
+
(function (CredentialSource) {
|
|
9
|
+
// isHuman
|
|
10
|
+
CredentialSource["talent"] = "talent";
|
|
11
|
+
CredentialSource["binance"] = "binance";
|
|
12
|
+
CredentialSource["coinbase"] = "coinbase";
|
|
13
|
+
CredentialSource["farcasterPro"] = "farcaster-pro";
|
|
14
|
+
CredentialSource["galxePassport"] = "galxe-passport";
|
|
15
|
+
CredentialSource["world_id"] = "world_id";
|
|
16
|
+
CredentialSource["humanPassport"] = "human-passport";
|
|
17
|
+
CredentialSource["zkme"] = "zkme";
|
|
18
|
+
CredentialSource["humanode"] = "humanode";
|
|
19
|
+
CredentialSource["self_xyz"] = "self_xyz";
|
|
20
|
+
CredentialSource["dentity"] = "dentity";
|
|
21
|
+
// isRisky
|
|
22
|
+
CredentialSource["hacker"] = "hacker";
|
|
23
|
+
CredentialSource["hacked"] = "hacked";
|
|
24
|
+
CredentialSource["dmca"] = "dmca";
|
|
25
|
+
CredentialSource["google"] = "google";
|
|
26
|
+
// isSpam
|
|
27
|
+
CredentialSource["warpcast"] = "warpcast";
|
|
28
|
+
})(CredentialSource || (CredentialSource = {}));
|
|
29
|
+
|
|
30
|
+
export { CredentialCategory, CredentialSource };
|
package/dist/types/index.cjs
CHANGED
|
@@ -5,6 +5,7 @@ var network = require('./network.cjs');
|
|
|
5
5
|
var hook = require('./hook.cjs');
|
|
6
6
|
var source = require('./source.cjs');
|
|
7
7
|
var cointype = require('./cointype.cjs');
|
|
8
|
+
var ceredential = require('./ceredential.cjs');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
@@ -32,3 +33,11 @@ Object.defineProperty(exports, 'CoinType', {
|
|
|
32
33
|
enumerable: true,
|
|
33
34
|
get: function () { return cointype.CoinType; }
|
|
34
35
|
});
|
|
36
|
+
Object.defineProperty(exports, 'CredentialCategory', {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return ceredential.CredentialCategory; }
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, 'CredentialSource', {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () { return ceredential.CredentialSource; }
|
|
43
|
+
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export { Network, type NetworkType } from "./network";
|
|
|
3
3
|
export { ErrorMessages, QueryEndpoint, type AddressRecord, type SocialLinksItem, type SocialLinks, type SocialRecord, type ProfileResponse, type NSResponse, type DomainResponse, type QueryOptions, type IdentityString, type QueryResult, type ProfileResult, type NSResult, type ProfileBatchResult, type NSBatchResult, type ProfileUniversalResult, type NSUniversalResult, type DomainResult, } from "./hook";
|
|
4
4
|
export { Source, type SourceType } from "./source";
|
|
5
5
|
export { CoinType } from "./cointype";
|
|
6
|
+
export { type CredentialData, type CredentialResponse, type CredentialMetaData, CredentialSource, CredentialCategory, } from "./ceredential";
|
package/dist/types/index.js
CHANGED
package/dist/utils/helpers.cjs
CHANGED
package/dist/utils/helpers.js
CHANGED
package/dist/utils/platform.cjs
CHANGED
package/dist/utils/platform.js
CHANGED
package/dist/utils/regex.cjs
CHANGED
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
7
|
const REGEX = {
|
|
8
|
-
ENS:
|
|
9
|
-
BASENAMES:
|
|
10
|
-
LINEA:
|
|
8
|
+
ENS: /^[^.].+\.(?:eth|xyz|bio|app|luxe|kred|art|ceo|locker|club|box|id)$/i,
|
|
9
|
+
BASENAMES: /^[^.].+\.base(\.eth)?$/i,
|
|
10
|
+
LINEA: /^[^.].+\.linea(\.eth)?$/i,
|
|
11
11
|
FARCASTER: /^(?:[A-Za-z0-9_-]{1,61}(?:\.(?:eth|farcaster|fcast\.id|farcaster\.eth))?|farcaster,#\d+)$/i,
|
|
12
|
-
LENS:
|
|
12
|
+
LENS: /^[^.].+\.lens$/i,
|
|
13
|
+
SNS: /^[^.].+\.sol$/i,
|
|
13
14
|
CLUSTER: /^[\w-]+\/[\w-]+$/,
|
|
14
|
-
SPACE_ID:
|
|
15
|
-
SEEKERID:
|
|
16
|
-
UNSTOPPABLE_DOMAINS:
|
|
17
|
-
DOTBIT:
|
|
18
|
-
SNS: /^.+\.sol$/i,
|
|
15
|
+
SPACE_ID: /^[^.].+\.(?:bnb|arb)$/i,
|
|
16
|
+
SEEKERID: /^[^.].+\.skr$/i,
|
|
17
|
+
UNSTOPPABLE_DOMAINS: /^[^.].+\.(?:crypto|888|nft|blockchain|bitcoin|dao|x|klever|hi|zil|kresus|polygon|wallet|binanceus|anime|go|manga|eth)$/i,
|
|
18
|
+
DOTBIT: /^[^.].+\.bit$/i,
|
|
19
19
|
ETH_ADDRESS: /^0x[a-fA-F0-9]{40}$/i,
|
|
20
20
|
BTC_ADDRESS: /^(?:[13][a-km-zA-HJ-NP-Z1-9]{25,34}|bc1[qp][a-z0-9]{11,71})$/,
|
|
21
21
|
SOLANA_ADDRESS: /^[1-9A-HJ-NP-Za-km-z]{32,44}$/,
|
package/dist/utils/regex.d.ts
CHANGED
|
@@ -8,12 +8,12 @@ export declare const REGEX: {
|
|
|
8
8
|
LINEA: RegExp;
|
|
9
9
|
FARCASTER: RegExp;
|
|
10
10
|
LENS: RegExp;
|
|
11
|
+
SNS: RegExp;
|
|
11
12
|
CLUSTER: RegExp;
|
|
12
13
|
SPACE_ID: RegExp;
|
|
13
14
|
SEEKERID: RegExp;
|
|
14
15
|
UNSTOPPABLE_DOMAINS: RegExp;
|
|
15
16
|
DOTBIT: RegExp;
|
|
16
|
-
SNS: RegExp;
|
|
17
17
|
ETH_ADDRESS: RegExp;
|
|
18
18
|
BTC_ADDRESS: RegExp;
|
|
19
19
|
SOLANA_ADDRESS: RegExp;
|
package/dist/utils/regex.js
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
5
|
const REGEX = {
|
|
6
|
-
ENS:
|
|
7
|
-
BASENAMES:
|
|
8
|
-
LINEA:
|
|
6
|
+
ENS: /^[^.].+\.(?:eth|xyz|bio|app|luxe|kred|art|ceo|locker|club|box|id)$/i,
|
|
7
|
+
BASENAMES: /^[^.].+\.base(\.eth)?$/i,
|
|
8
|
+
LINEA: /^[^.].+\.linea(\.eth)?$/i,
|
|
9
9
|
FARCASTER: /^(?:[A-Za-z0-9_-]{1,61}(?:\.(?:eth|farcaster|fcast\.id|farcaster\.eth))?|farcaster,#\d+)$/i,
|
|
10
|
-
LENS:
|
|
10
|
+
LENS: /^[^.].+\.lens$/i,
|
|
11
|
+
SNS: /^[^.].+\.sol$/i,
|
|
11
12
|
CLUSTER: /^[\w-]+\/[\w-]+$/,
|
|
12
|
-
SPACE_ID:
|
|
13
|
-
SEEKERID:
|
|
14
|
-
UNSTOPPABLE_DOMAINS:
|
|
15
|
-
DOTBIT:
|
|
16
|
-
SNS: /^.+\.sol$/i,
|
|
13
|
+
SPACE_ID: /^[^.].+\.(?:bnb|arb)$/i,
|
|
14
|
+
SEEKERID: /^[^.].+\.skr$/i,
|
|
15
|
+
UNSTOPPABLE_DOMAINS: /^[^.].+\.(?:crypto|888|nft|blockchain|bitcoin|dao|x|klever|hi|zil|kresus|polygon|wallet|binanceus|anime|go|manga|eth)$/i,
|
|
16
|
+
DOTBIT: /^[^.].+\.bit$/i,
|
|
17
17
|
ETH_ADDRESS: /^0x[a-fA-F0-9]{40}$/i,
|
|
18
18
|
BTC_ADDRESS: /^(?:[13][a-km-zA-HJ-NP-Z1-9]{25,34}|bc1[qp][a-z0-9]{11,71})$/,
|
|
19
19
|
SOLANA_ADDRESS: /^[1-9A-HJ-NP-Za-km-z]{32,44}$/,
|