@bytexbyte/nxtlinq-ai-agent-sdk 1.0.8 → 1.1.0
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/api/nxtlinq-api.d.ts +3 -0
- package/dist/api/nxtlinq-api.d.ts.map +1 -0
- package/dist/api/nxtlinq-api.js +124 -0
- package/dist/components/ChatBot.d.ts +62 -0
- package/dist/components/ChatBot.d.ts.map +1 -0
- package/dist/components/ChatBot.js +843 -0
- package/dist/core/lib/useLocalStorage.d.ts +3 -0
- package/dist/core/lib/useLocalStorage.d.ts.map +1 -0
- package/dist/core/lib/useLocalStorage.js +18 -0
- package/dist/core/metakeepClient.d.ts +4 -0
- package/dist/core/metakeepClient.d.ts.map +1 -0
- package/dist/core/metakeepClient.js +11 -0
- package/dist/hooks/useNxtlinqAIT.d.ts +14 -0
- package/dist/hooks/useNxtlinqAIT.d.ts.map +1 -0
- package/dist/hooks/useNxtlinqAIT.js +98 -0
- package/dist/index.d.ts +114 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -138
- package/dist/types/ait-api.d.ts +127 -0
- package/dist/types/ait-api.d.ts.map +1 -0
- package/dist/types/ait-api.js +1 -0
- package/package.json +5 -5
- package/src/components/ChatBot.tsx +0 -1192
- package/src/core/metakeepClient.ts +0 -13
- package/src/hooks/useNxtlinqAIT.ts +0 -99
- package/src/index.ts +0 -557
- package/src/types/ait-api.ts +0 -103
- package/src/types/window.d.ts +0 -9
- package/tsconfig.json +0 -25
- package/tsup.config.ts +0 -15
package/src/types/ait-api.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
export interface AIT {
|
|
2
|
-
aitId: string;
|
|
3
|
-
controller: string;
|
|
4
|
-
metadata: AITMetadata;
|
|
5
|
-
metadataHash: string;
|
|
6
|
-
metadataCid: string;
|
|
7
|
-
signature: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface AITMetadata {
|
|
11
|
-
model: string;
|
|
12
|
-
permissions: string[];
|
|
13
|
-
issuedBy: string;
|
|
14
|
-
serviceId?: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface AITInfo {
|
|
18
|
-
aitId: string;
|
|
19
|
-
controller: string;
|
|
20
|
-
metadata: AITMetadata;
|
|
21
|
-
metadataHash: string;
|
|
22
|
-
metadataCid: string;
|
|
23
|
-
signature: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface WalletInfo {
|
|
27
|
-
id: string;
|
|
28
|
-
address: string;
|
|
29
|
-
verified: boolean;
|
|
30
|
-
method?: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface PermissionGroup {
|
|
34
|
-
label: string;
|
|
35
|
-
options: PermissionOption[];
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface PermissionOption {
|
|
39
|
-
label: string;
|
|
40
|
-
value: string;
|
|
41
|
-
isChecked: boolean;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface CreateAITParams {
|
|
45
|
-
aitId: string;
|
|
46
|
-
controller: string;
|
|
47
|
-
serviceId: string;
|
|
48
|
-
metadataHash: string;
|
|
49
|
-
metadataCid: string;
|
|
50
|
-
timestamp: number;
|
|
51
|
-
signature: string;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface CreateMetadataParams extends AITMetadata {
|
|
55
|
-
controller: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface VerifyWalletParams {
|
|
59
|
-
address: string;
|
|
60
|
-
token: string;
|
|
61
|
-
method: string;
|
|
62
|
-
timestamp: number;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface SignInParams {
|
|
66
|
-
address: string;
|
|
67
|
-
code: string;
|
|
68
|
-
timestamp: number;
|
|
69
|
-
signature: string;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface MessageContext {
|
|
73
|
-
aitId?: string;
|
|
74
|
-
walletAddress?: string | null;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface SendMessageParams {
|
|
78
|
-
message: string;
|
|
79
|
-
projectId?: string;
|
|
80
|
-
serviceId: string;
|
|
81
|
-
context: MessageContext;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface AITApi {
|
|
85
|
-
ait: {
|
|
86
|
-
getAITByServiceIdAndController: (params: { serviceId: string; controller: string }, token: string) => Promise<AITInfo | { error: string }>;
|
|
87
|
-
createAIT: (params: CreateAITParams, token: string) => Promise<AITInfo | { error: string }>;
|
|
88
|
-
};
|
|
89
|
-
wallet: {
|
|
90
|
-
verifyWallet: (params: VerifyWalletParams, token: string) => Promise<WalletInfo | { error: string }>;
|
|
91
|
-
getWallet: (params: { address: string }, token: string) => Promise<WalletInfo | { error: string }>;
|
|
92
|
-
};
|
|
93
|
-
metadata: {
|
|
94
|
-
createMetadata: (metadata: CreateMetadataParams, token: string) => Promise<{ metadataCid: string } | { error: string }>;
|
|
95
|
-
};
|
|
96
|
-
auth: {
|
|
97
|
-
getNonce: (params: { address: string }) => Promise<{ code: string; timestamp: number } | { error: string }>;
|
|
98
|
-
signIn: (params: SignInParams) => Promise<{ accessToken: string } | { error: string }>;
|
|
99
|
-
};
|
|
100
|
-
agent: {
|
|
101
|
-
sendMessage: (params: { message: string; serviceId: string }) => Promise<{ reply: string } | { error: string }>;
|
|
102
|
-
};
|
|
103
|
-
}
|
package/src/types/window.d.ts
DELETED
package/tsconfig.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"outDir": "dist",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"moduleResolution": "node",
|
|
13
|
-
"jsx": "react-jsx",
|
|
14
|
-
"isolatedModules": true,
|
|
15
|
-
"composite": false,
|
|
16
|
-
"declarationMap": true,
|
|
17
|
-
"rootDir": "src",
|
|
18
|
-
"baseUrl": "src",
|
|
19
|
-
"paths": {
|
|
20
|
-
"*": ["*"]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"include": ["src/**/*"],
|
|
24
|
-
"exclude": ["node_modules", "dist"]
|
|
25
|
-
}
|
package/tsup.config.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'tsup';
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
entry: ['src/index.ts', 'src/components/ChatBot.tsx'],
|
|
5
|
-
format: ['cjs', 'esm'],
|
|
6
|
-
dts: true,
|
|
7
|
-
splitting: false,
|
|
8
|
-
sourcemap: true,
|
|
9
|
-
clean: true,
|
|
10
|
-
treeshake: true,
|
|
11
|
-
external: ['react', 'react-dom'],
|
|
12
|
-
esbuildOptions(options) {
|
|
13
|
-
options.jsx = 'automatic';
|
|
14
|
-
},
|
|
15
|
-
});
|