web3bio-profile-kit 0.1.21 → 0.1.23

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";
@@ -324,7 +324,7 @@ const PLATFORM_DATA = new Map([
324
324
  [
325
325
  platform.Platform.farcaster,
326
326
  {
327
- color: "#432C8D",
327
+ color: "#6a3cff",
328
328
  icon: "icons/icon-farcaster.svg",
329
329
  label: "Farcaster",
330
330
  description: "Farcaster social identity (Fname handle)",
@@ -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
  [
@@ -322,7 +322,7 @@ const PLATFORM_DATA = new Map([
322
322
  [
323
323
  Platform.farcaster,
324
324
  {
325
- color: "#432C8D",
325
+ color: "#6a3cff",
326
326
  icon: "icons/icon-farcaster.svg",
327
327
  label: "Farcaster",
328
328
  description: "Farcaster social identity (Fname handle)",
@@ -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
  [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web3bio-profile-kit",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "React hooks for querying ENS, Farcaster, Lens and Web3 universal profiles",
5
5
  "author": "web3bio",
6
6
  "license": "MIT",