web3bio-profile-kit 0.1.7 → 0.1.8
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 +2 -5
- package/dist/hooks/useBaseQuery.js +2 -5
- package/dist/types/platform.cjs +0 -4
- package/dist/types/platform.d.ts +0 -4
- package/dist/types/platform.js +0 -4
- package/dist/utils/helpers.cjs +4 -3
- package/dist/utils/helpers.js +4 -3
- package/dist/utils/platform.cjs +0 -37
- package/dist/utils/platform.js +0 -37
- package/package.json +1 -1
|
@@ -46,12 +46,9 @@ function useBaseQuery(identity, endpoint, universal = false, options = {}) {
|
|
|
46
46
|
headers,
|
|
47
47
|
};
|
|
48
48
|
const response = await fetch(url, fetchOptions);
|
|
49
|
-
if (!response.ok) {
|
|
50
|
-
return Promise.reject(new Error(`API error: ${response.status}`));
|
|
51
|
-
}
|
|
52
49
|
const responseData = await response.json();
|
|
53
|
-
if (
|
|
54
|
-
return Promise.reject(new Error(responseData.error));
|
|
50
|
+
if (!response.ok) {
|
|
51
|
+
return Promise.reject(new Error(`API error: ${(responseData === null || responseData === void 0 ? void 0 : responseData.error) || response.status}`));
|
|
55
52
|
}
|
|
56
53
|
return responseData;
|
|
57
54
|
};
|
|
@@ -44,12 +44,9 @@ function useBaseQuery(identity, endpoint, universal = false, options = {}) {
|
|
|
44
44
|
headers,
|
|
45
45
|
};
|
|
46
46
|
const response = await fetch(url, fetchOptions);
|
|
47
|
-
if (!response.ok) {
|
|
48
|
-
return Promise.reject(new Error(`API error: ${response.status}`));
|
|
49
|
-
}
|
|
50
47
|
const responseData = await response.json();
|
|
51
|
-
if (
|
|
52
|
-
return Promise.reject(new Error(responseData.error));
|
|
48
|
+
if (!response.ok) {
|
|
49
|
+
return Promise.reject(new Error(`API error: ${(responseData === null || responseData === void 0 ? void 0 : responseData.error) || response.status}`));
|
|
53
50
|
}
|
|
54
51
|
return responseData;
|
|
55
52
|
};
|
package/dist/types/platform.cjs
CHANGED
|
@@ -45,13 +45,9 @@ exports.Platform = void 0;
|
|
|
45
45
|
Platform["bilibili"] = "bilibili";
|
|
46
46
|
Platform["medium"] = "medium";
|
|
47
47
|
Platform["mirror"] = "mirror";
|
|
48
|
-
Platform["zerion"] = "zerion";
|
|
49
|
-
Platform["aave"] = "aave";
|
|
50
|
-
Platform["rainbow"] = "rainbow";
|
|
51
48
|
Platform["bluesky"] = "bluesky";
|
|
52
49
|
Platform["nostr"] = "nostr";
|
|
53
50
|
Platform["poap"] = "poap";
|
|
54
|
-
Platform["uniswap"] = "uniswap";
|
|
55
51
|
Platform["degenscore"] = "degenscore";
|
|
56
52
|
Platform["firefly"] = "firefly";
|
|
57
53
|
Platform["solana"] = "solana";
|
package/dist/types/platform.d.ts
CHANGED
|
@@ -42,13 +42,9 @@ export declare enum Platform {
|
|
|
42
42
|
bilibili = "bilibili",
|
|
43
43
|
medium = "medium",
|
|
44
44
|
mirror = "mirror",
|
|
45
|
-
zerion = "zerion",
|
|
46
|
-
aave = "aave",
|
|
47
|
-
rainbow = "rainbow",
|
|
48
45
|
bluesky = "bluesky",
|
|
49
46
|
nostr = "nostr",
|
|
50
47
|
poap = "poap",
|
|
51
|
-
uniswap = "uniswap",
|
|
52
48
|
degenscore = "degenscore",
|
|
53
49
|
firefly = "firefly",
|
|
54
50
|
solana = "solana",
|
package/dist/types/platform.js
CHANGED
|
@@ -43,13 +43,9 @@ var Platform;
|
|
|
43
43
|
Platform["bilibili"] = "bilibili";
|
|
44
44
|
Platform["medium"] = "medium";
|
|
45
45
|
Platform["mirror"] = "mirror";
|
|
46
|
-
Platform["zerion"] = "zerion";
|
|
47
|
-
Platform["aave"] = "aave";
|
|
48
|
-
Platform["rainbow"] = "rainbow";
|
|
49
46
|
Platform["bluesky"] = "bluesky";
|
|
50
47
|
Platform["nostr"] = "nostr";
|
|
51
48
|
Platform["poap"] = "poap";
|
|
52
|
-
Platform["uniswap"] = "uniswap";
|
|
53
49
|
Platform["degenscore"] = "degenscore";
|
|
54
50
|
Platform["firefly"] = "firefly";
|
|
55
51
|
Platform["solana"] = "solana";
|
package/dist/utils/helpers.cjs
CHANGED
|
@@ -104,10 +104,12 @@ const isSupportedPlatform = (platform$1) => {
|
|
|
104
104
|
platform.Platform.basenames,
|
|
105
105
|
platform.Platform.linea,
|
|
106
106
|
platform.Platform.ethereum,
|
|
107
|
-
platform.Platform.twitter,
|
|
108
|
-
platform.Platform.github,
|
|
109
107
|
platform.Platform.farcaster,
|
|
110
108
|
platform.Platform.lens,
|
|
109
|
+
platform.Platform.twitter,
|
|
110
|
+
platform.Platform.github,
|
|
111
|
+
platform.Platform.linkedin,
|
|
112
|
+
platform.Platform.discord,
|
|
111
113
|
platform.Platform.unstoppableDomains,
|
|
112
114
|
platform.Platform.nextid,
|
|
113
115
|
platform.Platform.dotbit,
|
|
@@ -146,7 +148,6 @@ const detectPlatform = (term) => {
|
|
|
146
148
|
return Platform;
|
|
147
149
|
}
|
|
148
150
|
}
|
|
149
|
-
// Default fallback
|
|
150
151
|
return term.includes(".") ? platform.Platform.ens : platform.Platform.farcaster;
|
|
151
152
|
};
|
|
152
153
|
/**
|
package/dist/utils/helpers.js
CHANGED
|
@@ -102,10 +102,12 @@ const isSupportedPlatform = (platform) => {
|
|
|
102
102
|
Platform.basenames,
|
|
103
103
|
Platform.linea,
|
|
104
104
|
Platform.ethereum,
|
|
105
|
-
Platform.twitter,
|
|
106
|
-
Platform.github,
|
|
107
105
|
Platform.farcaster,
|
|
108
106
|
Platform.lens,
|
|
107
|
+
Platform.twitter,
|
|
108
|
+
Platform.github,
|
|
109
|
+
Platform.linkedin,
|
|
110
|
+
Platform.discord,
|
|
109
111
|
Platform.unstoppableDomains,
|
|
110
112
|
Platform.nextid,
|
|
111
113
|
Platform.dotbit,
|
|
@@ -144,7 +146,6 @@ const detectPlatform = (term) => {
|
|
|
144
146
|
return Platform;
|
|
145
147
|
}
|
|
146
148
|
}
|
|
147
|
-
// Default fallback
|
|
148
149
|
return term.includes(".") ? Platform.ens : Platform.farcaster;
|
|
149
150
|
};
|
|
150
151
|
/**
|
package/dist/utils/platform.cjs
CHANGED
|
@@ -438,33 +438,6 @@ const PLATFORM_DATA = new Map([
|
|
|
438
438
|
system: platform.PlatformSystem.web3,
|
|
439
439
|
},
|
|
440
440
|
],
|
|
441
|
-
[
|
|
442
|
-
platform.Platform.zerion,
|
|
443
|
-
{
|
|
444
|
-
color: "#3560E5",
|
|
445
|
-
icon: "icons/icon-zerion.svg",
|
|
446
|
-
label: "Zerion",
|
|
447
|
-
system: platform.PlatformSystem.web3,
|
|
448
|
-
},
|
|
449
|
-
],
|
|
450
|
-
[
|
|
451
|
-
platform.Platform.aave,
|
|
452
|
-
{
|
|
453
|
-
color: "#9896FF",
|
|
454
|
-
icon: "icons/icon-aave.svg",
|
|
455
|
-
label: "AAVE",
|
|
456
|
-
system: platform.PlatformSystem.web3,
|
|
457
|
-
},
|
|
458
|
-
],
|
|
459
|
-
[
|
|
460
|
-
platform.Platform.rainbow,
|
|
461
|
-
{
|
|
462
|
-
color: "#000000",
|
|
463
|
-
icon: "icons/icon-rainbow.svg",
|
|
464
|
-
label: "Rainbow",
|
|
465
|
-
system: platform.PlatformSystem.web3,
|
|
466
|
-
},
|
|
467
|
-
],
|
|
468
441
|
[
|
|
469
442
|
platform.Platform.bluesky,
|
|
470
443
|
{
|
|
@@ -497,16 +470,6 @@ const PLATFORM_DATA = new Map([
|
|
|
497
470
|
system: platform.PlatformSystem.web3,
|
|
498
471
|
},
|
|
499
472
|
],
|
|
500
|
-
[
|
|
501
|
-
platform.Platform.uniswap,
|
|
502
|
-
{
|
|
503
|
-
color: "#ff007a",
|
|
504
|
-
icon: "icons/icon-uniswap.svg",
|
|
505
|
-
label: "Uniswap",
|
|
506
|
-
urlPrefix: "https://uniswap.org/",
|
|
507
|
-
system: platform.PlatformSystem.web3,
|
|
508
|
-
},
|
|
509
|
-
],
|
|
510
473
|
[
|
|
511
474
|
platform.Platform.degenscore,
|
|
512
475
|
{
|
package/dist/utils/platform.js
CHANGED
|
@@ -436,33 +436,6 @@ const PLATFORM_DATA = new Map([
|
|
|
436
436
|
system: PlatformSystem.web3,
|
|
437
437
|
},
|
|
438
438
|
],
|
|
439
|
-
[
|
|
440
|
-
Platform.zerion,
|
|
441
|
-
{
|
|
442
|
-
color: "#3560E5",
|
|
443
|
-
icon: "icons/icon-zerion.svg",
|
|
444
|
-
label: "Zerion",
|
|
445
|
-
system: PlatformSystem.web3,
|
|
446
|
-
},
|
|
447
|
-
],
|
|
448
|
-
[
|
|
449
|
-
Platform.aave,
|
|
450
|
-
{
|
|
451
|
-
color: "#9896FF",
|
|
452
|
-
icon: "icons/icon-aave.svg",
|
|
453
|
-
label: "AAVE",
|
|
454
|
-
system: PlatformSystem.web3,
|
|
455
|
-
},
|
|
456
|
-
],
|
|
457
|
-
[
|
|
458
|
-
Platform.rainbow,
|
|
459
|
-
{
|
|
460
|
-
color: "#000000",
|
|
461
|
-
icon: "icons/icon-rainbow.svg",
|
|
462
|
-
label: "Rainbow",
|
|
463
|
-
system: PlatformSystem.web3,
|
|
464
|
-
},
|
|
465
|
-
],
|
|
466
439
|
[
|
|
467
440
|
Platform.bluesky,
|
|
468
441
|
{
|
|
@@ -495,16 +468,6 @@ const PLATFORM_DATA = new Map([
|
|
|
495
468
|
system: PlatformSystem.web3,
|
|
496
469
|
},
|
|
497
470
|
],
|
|
498
|
-
[
|
|
499
|
-
Platform.uniswap,
|
|
500
|
-
{
|
|
501
|
-
color: "#ff007a",
|
|
502
|
-
icon: "icons/icon-uniswap.svg",
|
|
503
|
-
label: "Uniswap",
|
|
504
|
-
urlPrefix: "https://uniswap.org/",
|
|
505
|
-
system: PlatformSystem.web3,
|
|
506
|
-
},
|
|
507
|
-
],
|
|
508
471
|
[
|
|
509
472
|
Platform.degenscore,
|
|
510
473
|
{
|