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.
Files changed (74) hide show
  1. package/README.md +14 -6
  2. package/dist/hooks/index.cjs +21 -0
  3. package/dist/hooks/index.js +8 -0
  4. package/dist/hooks/useBaseQuery.cjs +129 -0
  5. package/dist/{types/hooks → hooks}/useBaseQuery.d.ts +1 -2
  6. package/dist/hooks/useBaseQuery.js +127 -0
  7. package/dist/hooks/useBatchNS.cjs +25 -0
  8. package/dist/{types/hooks → hooks}/useBatchNS.d.ts +1 -1
  9. package/dist/hooks/useBatchNS.js +23 -0
  10. package/dist/hooks/useBatchProfile.cjs +25 -0
  11. package/dist/{types/hooks → hooks}/useBatchProfile.d.ts +1 -1
  12. package/dist/hooks/useBatchProfile.js +23 -0
  13. package/dist/hooks/useDomain.cjs +28 -0
  14. package/dist/{types/hooks → hooks}/useDomain.d.ts +1 -1
  15. package/dist/hooks/useDomain.js +26 -0
  16. package/dist/hooks/useNS.cjs +28 -0
  17. package/dist/{types/hooks → hooks}/useNS.d.ts +1 -1
  18. package/dist/hooks/useNS.js +26 -0
  19. package/dist/hooks/useProfile.cjs +28 -0
  20. package/dist/{types/hooks → hooks}/useProfile.d.ts +1 -1
  21. package/dist/hooks/useProfile.js +26 -0
  22. package/dist/hooks/useUniversalNS.cjs +28 -0
  23. package/dist/{types/hooks → hooks}/useUniversalNS.d.ts +1 -1
  24. package/dist/hooks/useUniversalNS.js +26 -0
  25. package/dist/hooks/useUniversalProfile.cjs +28 -0
  26. package/dist/{types/hooks → hooks}/useUniversalProfile.d.ts +1 -1
  27. package/dist/hooks/useUniversalProfile.js +26 -0
  28. package/dist/index.cjs +71 -0
  29. package/dist/index.d.ts +3 -247
  30. package/dist/index.js +18 -425
  31. package/dist/types/cointype.cjs +29 -0
  32. package/dist/types/cointype.d.ts +26 -0
  33. package/dist/types/cointype.js +29 -0
  34. package/dist/types/hook.cjs +38 -0
  35. package/dist/types/hook.d.ts +195 -0
  36. package/dist/types/hook.js +38 -0
  37. package/dist/types/index.cjs +38 -0
  38. package/dist/types/index.d.ts +5 -3
  39. package/dist/types/index.js +5 -0
  40. package/dist/types/network.cjs +41 -0
  41. package/dist/types/network.d.ts +55 -0
  42. package/dist/types/network.js +41 -0
  43. package/dist/types/platform.cjs +110 -0
  44. package/dist/types/platform.d.ts +122 -0
  45. package/dist/types/platform.js +110 -0
  46. package/dist/types/source.cjs +44 -0
  47. package/dist/types/source.d.ts +49 -0
  48. package/dist/types/source.js +44 -0
  49. package/dist/utils/helpers.cjs +119 -0
  50. package/dist/{types/utils → utils}/helpers.d.ts +4 -3
  51. package/dist/utils/helpers.js +112 -0
  52. package/dist/utils/index.cjs +27 -0
  53. package/dist/utils/index.d.ts +6 -0
  54. package/dist/utils/index.js +6 -0
  55. package/dist/utils/network.cjs +355 -0
  56. package/dist/utils/network.d.ts +4 -0
  57. package/dist/utils/network.js +353 -0
  58. package/dist/utils/platform.cjs +983 -0
  59. package/dist/utils/platform.d.ts +18 -0
  60. package/dist/utils/platform.js +979 -0
  61. package/dist/utils/regex.cjs +34 -0
  62. package/dist/utils/regex.d.ts +30 -0
  63. package/dist/utils/regex.js +32 -0
  64. package/dist/utils/source.cjs +144 -0
  65. package/dist/utils/source.d.ts +2 -0
  66. package/dist/utils/source.js +142 -0
  67. package/package.json +32 -12
  68. package/dist/index.esm.js +0 -415
  69. package/dist/index.esm.js.map +0 -1
  70. package/dist/index.js.map +0 -1
  71. package/dist/types/utils/constants.d.ts +0 -36
  72. package/dist/types/utils/types.d.ts +0 -102
  73. /package/dist/{types/hooks → hooks}/index.d.ts +0 -0
  74. /package/dist/{types/setupTests.d.ts → setupTests.d.ts} +0 -0
@@ -1,102 +0,0 @@
1
- export declare enum PlatformType {
2
- ens = "ens",
3
- farcaster = "farcaster",
4
- lens = "lens",
5
- ethereum = "ethereum",
6
- twitter = "twitter",
7
- github = "github",
8
- bitcoin = "bitcoin",
9
- unstoppableDomains = "unstoppabledomains",
10
- basenames = "basenames",
11
- linea = "linea",
12
- space_id = "space_id",
13
- solana = "solana",
14
- sns = "sns",
15
- nextid = "nextid",
16
- dotbit = "dotbit"
17
- }
18
- export declare enum SourceType {
19
- ethereum = "ethereum",
20
- ens = "ens",
21
- twitter = "twitter",
22
- nextid = "nextid",
23
- dotbit = "dotbit",
24
- unstoppabledomains = "unstoppabledomains",
25
- lens = "lens",
26
- farcaster = "farcaster",
27
- space_id = "space_id",
28
- solana = "solana",
29
- sns = "sns"
30
- }
31
- export type SocialLinksItem = {
32
- link: string | null;
33
- handle: string | null;
34
- sources: SourceType[];
35
- };
36
- export type SocialLinks = Record<string, SocialLinksItem>;
37
- export interface ProfileResponse {
38
- identity: string;
39
- address: string | null;
40
- avatar: string | null;
41
- description: string | null;
42
- platform: string;
43
- displayName: string | null;
44
- email: string | null;
45
- contenthash: string | null;
46
- header: string | null;
47
- location: string | null;
48
- createdAt: string | null;
49
- status: string | null;
50
- error?: string;
51
- links: SocialLinks;
52
- aliases?: string[];
53
- social: {
54
- uid: number | null;
55
- follower: number;
56
- following: number;
57
- } | {};
58
- }
59
- export interface NSResponse {
60
- identity: string;
61
- address: string | null;
62
- avatar: string | null;
63
- description: string | null;
64
- platform: string;
65
- displayName: string | null;
66
- aliases?: string[];
67
- }
68
- export interface DomainResponse {
69
- identity: string;
70
- platform: PlatformType;
71
- resolvedAddress: string | null;
72
- ownerAddress: string | null;
73
- managerAddress: string | null;
74
- displayName: string | null;
75
- isPrimary: boolean;
76
- status: string;
77
- createdAt: string | null;
78
- updatedAt: string | null;
79
- expiredAt: string | null;
80
- contenthash: string | null;
81
- texts: Record<string, string>;
82
- addresses: Record<string, string>;
83
- }
84
- export type QueryOptions = {
85
- /** API Key for authentication */
86
- apiKey?: string;
87
- /** Whether the query should execute */
88
- enabled?: boolean;
89
- };
90
- export type IdentityString = string | `${PlatformType},${string}`;
91
- export type QueryResult<T> = {
92
- data: T | null;
93
- isLoading: boolean;
94
- error: Error | null;
95
- };
96
- export type ProfileResult = QueryResult<ProfileResponse>;
97
- export type NSResult = QueryResult<NSResponse>;
98
- export type ProfileBatchResult = QueryResult<ProfileResponse[]>;
99
- export type NSBatchResult = QueryResult<NSResponse[]>;
100
- export type ProfileUniversalResult = QueryResult<ProfileResponse[]>;
101
- export type NSUniversalResult = QueryResult<NSResponse[]>;
102
- export type DomainResult = QueryResult<DomainResponse>;
File without changes
File without changes