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.
@@ -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
 
@@ -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 useBaseQuery = require('./useBaseQuery.cjs');
9
10
 
10
11
  /**
@@ -3,6 +3,7 @@ import '../types/network.js';
3
3
  import { 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 { useBaseQuery } from './useBaseQuery.js';
7
8
 
8
9
  /**
@@ -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 useBaseQuery = require('./useBaseQuery.cjs');
9
10
 
10
11
  /**
@@ -3,6 +3,7 @@ import '../types/network.js';
3
3
  import { 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 { useBaseQuery } from './useBaseQuery.js';
7
8
 
8
9
  /**
@@ -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 useBaseQuery = require('./useBaseQuery.cjs');
9
10
 
10
11
  /**
@@ -3,6 +3,7 @@ import '../types/network.js';
3
3
  import { 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 { useBaseQuery } from './useBaseQuery.js';
7
8
 
8
9
  /**
@@ -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 useBaseQuery = require('./useBaseQuery.cjs');
9
10
 
10
11
  /**
@@ -3,6 +3,7 @@ import '../types/network.js';
3
3
  import { 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 { useBaseQuery } from './useBaseQuery.js';
7
8
 
8
9
  /**
@@ -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 useBaseQuery = require('./useBaseQuery.cjs');
9
10
 
10
11
  /**
@@ -3,6 +3,7 @@ import '../types/network.js';
3
3
  import { 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 { useBaseQuery } from './useBaseQuery.js';
7
8
 
8
9
  /**
@@ -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 useBaseQuery = require('./useBaseQuery.cjs');
9
10
 
10
11
  /**
@@ -3,6 +3,7 @@ import '../types/network.js';
3
3
  import { 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 { useBaseQuery } from './useBaseQuery.js';
7
8
 
8
9
  /**
@@ -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 useBaseQuery = require('./useBaseQuery.cjs');
9
10
 
10
11
  /**
@@ -3,6 +3,7 @@ import '../types/network.js';
3
3
  import { 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 { useBaseQuery } from './useBaseQuery.js';
7
8
 
8
9
  /**
package/dist/index.cjs CHANGED
@@ -12,6 +12,7 @@ require('./types/network.cjs');
12
12
  require('./types/hook.cjs');
13
13
  require('./types/source.cjs');
14
14
  require('./types/cointype.cjs');
15
+ require('./types/ceredential.cjs');
15
16
  require('@tanstack/react-query');
16
17
  require('./utils/helpers.cjs');
17
18
 
package/dist/index.js CHANGED
@@ -10,5 +10,6 @@ import './types/network.js';
10
10
  import './types/hook.js';
11
11
  import './types/source.js';
12
12
  import './types/cointype.js';
13
+ import './types/ceredential.js';
13
14
  import '@tanstack/react-query';
14
15
  import './utils/helpers.js';
@@ -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 };
@@ -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
+ });
@@ -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";
@@ -3,3 +3,4 @@ export { Network } from './network.js';
3
3
  export { ErrorMessages, QueryEndpoint } from './hook.js';
4
4
  export { Source } from './source.js';
5
5
  export { CoinType } from './cointype.js';
6
+ export { CredentialCategory, CredentialSource } from './ceredential.js';
@@ -5,6 +5,7 @@ require('../types/network.cjs');
5
5
  require('../types/hook.cjs');
6
6
  require('../types/source.cjs');
7
7
  require('../types/cointype.cjs');
8
+ require('../types/ceredential.cjs');
8
9
  var regex = require('./regex.cjs');
9
10
 
10
11
  const PROD_API_ENDPOINT = "https://api.web3.bio";
@@ -3,6 +3,7 @@ import '../types/network.js';
3
3
  import '../types/hook.js';
4
4
  import '../types/source.js';
5
5
  import '../types/cointype.js';
6
+ import '../types/ceredential.js';
6
7
  import { REGEX } from './regex.js';
7
8
 
8
9
  const PROD_API_ENDPOINT = "https://api.web3.bio";
@@ -340,7 +340,7 @@ const PLATFORM_DATA = new Map([
340
340
  color: "#1A183D",
341
341
  icon: "icons/icon-firefly.svg",
342
342
  label: "Firefly",
343
- urlPrefix: "https://firefly.social/",
343
+ urlPrefix: "https://firefly.social/profile/",
344
344
  },
345
345
  ],
346
346
  [
@@ -338,7 +338,7 @@ const PLATFORM_DATA = new Map([
338
338
  color: "#1A183D",
339
339
  icon: "icons/icon-firefly.svg",
340
340
  label: "Firefly",
341
- urlPrefix: "https://firefly.social/",
341
+ urlPrefix: "https://firefly.social/profile/",
342
342
  },
343
343
  ],
344
344
  [
@@ -5,17 +5,17 @@
5
5
  * @public
6
6
  */
7
7
  const REGEX = {
8
- ENS: /^.+\.(?:eth|xyz|bio|app|luxe|kred|art|ceo|locker|club|box|uni\.eth|cb\.id|world\.id|gemini\.eth|int\.eth)$/i,
9
- BASENAMES: /^.+\.base(\.eth)?$/i,
10
- LINEA: /^.+\.linea(\.eth)?$/i,
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: /^.+\.lens$/i,
12
+ LENS: /^[^.].+\.lens$/i,
13
+ SNS: /^[^.].+\.sol$/i,
13
14
  CLUSTER: /^[\w-]+\/[\w-]+$/,
14
- SPACE_ID: /^.+\.(?:bnb|arb)$/i,
15
- SEEKERID: /^.+\.skr$/i,
16
- UNSTOPPABLE_DOMAINS: /^.+\.(?:crypto|888|nft|blockchain|bitcoin|dao|x|klever|hi|zil|kresus|polygon|wallet|binanceus|anime|go|manga|eth)$/i,
17
- DOTBIT: /^.+\.bit$/i,
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}$/,
@@ -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;
@@ -3,17 +3,17 @@
3
3
  * @public
4
4
  */
5
5
  const REGEX = {
6
- ENS: /^.+\.(?:eth|xyz|bio|app|luxe|kred|art|ceo|locker|club|box|uni\.eth|cb\.id|world\.id|gemini\.eth|int\.eth)$/i,
7
- BASENAMES: /^.+\.base(\.eth)?$/i,
8
- LINEA: /^.+\.linea(\.eth)?$/i,
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: /^.+\.lens$/i,
10
+ LENS: /^[^.].+\.lens$/i,
11
+ SNS: /^[^.].+\.sol$/i,
11
12
  CLUSTER: /^[\w-]+\/[\w-]+$/,
12
- SPACE_ID: /^.+\.(?:bnb|arb)$/i,
13
- SEEKERID: /^.+\.skr$/i,
14
- UNSTOPPABLE_DOMAINS: /^.+\.(?:crypto|888|nft|blockchain|bitcoin|dao|x|klever|hi|zil|kresus|polygon|wallet|binanceus|anime|go|manga|eth)$/i,
15
- DOTBIT: /^.+\.bit$/i,
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}$/,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web3bio-profile-kit",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "React hooks for querying ENS, Farcaster, Lens and Web3 universal profiles",
5
5
  "author": "web3bio",
6
6
  "license": "MIT",