intentkit 0.7.5.dev15__py3-none-any.whl → 0.7.5.dev17__py3-none-any.whl
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.
Potentially problematic release.
This version of intentkit might be problematic. Click here for more details.
- intentkit/__init__.py +1 -1
- intentkit/models/agent.py +82 -13
- intentkit/models/skills.csv +23 -28
- intentkit/skills/base.py +45 -0
- intentkit/skills/basename/__init__.py +49 -0
- intentkit/skills/basename/base.py +11 -0
- intentkit/skills/basename/basename.svg +11 -0
- intentkit/skills/basename/schema.json +57 -0
- intentkit/skills/cdp/__init__.py +18 -92
- intentkit/skills/cdp/schema.json +13 -301
- intentkit/skills/erc20/__init__.py +50 -0
- intentkit/skills/erc20/base.py +11 -0
- intentkit/skills/erc20/erc20.svg +5 -0
- intentkit/skills/erc20/schema.json +73 -0
- intentkit/skills/erc721/__init__.py +51 -0
- intentkit/skills/erc721/base.py +11 -0
- intentkit/skills/erc721/erc721.svg +5 -0
- intentkit/skills/erc721/schema.json +89 -0
- intentkit/skills/lifi/__init__.py +4 -4
- intentkit/skills/lifi/token_execute.py +24 -12
- intentkit/skills/lifi/token_quote.py +2 -2
- intentkit/skills/lifi/utils.py +96 -43
- intentkit/skills/morpho/__init__.py +50 -0
- intentkit/skills/morpho/base.py +11 -0
- intentkit/skills/morpho/morpho.svg +12 -0
- intentkit/skills/morpho/schema.json +73 -0
- intentkit/skills/pyth/__init__.py +50 -0
- intentkit/skills/pyth/base.py +11 -0
- intentkit/skills/pyth/pyth.svg +6 -0
- intentkit/skills/pyth/schema.json +73 -0
- intentkit/skills/skills.toml +32 -0
- intentkit/skills/superfluid/__init__.py +51 -0
- intentkit/skills/superfluid/base.py +11 -0
- intentkit/skills/superfluid/schema.json +89 -0
- intentkit/skills/superfluid/superfluid.svg +6 -0
- intentkit/skills/weth/__init__.py +49 -0
- intentkit/skills/weth/base.py +11 -0
- intentkit/skills/weth/schema.json +57 -0
- intentkit/skills/weth/weth.svg +6 -0
- intentkit/skills/wow/__init__.py +51 -0
- intentkit/skills/wow/base.py +11 -0
- intentkit/skills/wow/schema.json +89 -0
- intentkit/skills/wow/wow.svg +7 -0
- {intentkit-0.7.5.dev15.dist-info → intentkit-0.7.5.dev17.dist-info}/METADATA +1 -1
- {intentkit-0.7.5.dev15.dist-info → intentkit-0.7.5.dev17.dist-info}/RECORD +47 -17
- intentkit/skills/cdp/get_balance.py +0 -110
- intentkit/skills/cdp/swap.py +0 -121
- {intentkit-0.7.5.dev15.dist-info → intentkit-0.7.5.dev17.dist-info}/WHEEL +0 -0
- {intentkit-0.7.5.dev15.dist-info → intentkit-0.7.5.dev17.dist-info}/licenses/LICENSE +0 -0
intentkit/skills/cdp/schema.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"type": "object",
|
|
4
4
|
"title": "Coinbase Wallet",
|
|
5
|
-
"description": "Integration with Coinbase Wallet (CDP) providing blockchain wallet functionality including balance checking
|
|
5
|
+
"description": "Integration with Coinbase Wallet (CDP) providing blockchain wallet functionality including balance checking and native transfers",
|
|
6
6
|
"x-icon": "https://ai.service.crestal.dev/skills/cdp/cdp.png",
|
|
7
7
|
"x-tags": [
|
|
8
8
|
"Blockchain"
|
|
@@ -17,38 +17,6 @@
|
|
|
17
17
|
"states": {
|
|
18
18
|
"type": "object",
|
|
19
19
|
"properties": {
|
|
20
|
-
"get_balance": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"title": "CDP Wallet Get Balance",
|
|
23
|
-
"enum": [
|
|
24
|
-
"disabled",
|
|
25
|
-
"public",
|
|
26
|
-
"private"
|
|
27
|
-
],
|
|
28
|
-
"x-enum-title": [
|
|
29
|
-
"Disabled",
|
|
30
|
-
"Agent Owner + All Users",
|
|
31
|
-
"Agent Owner Only"
|
|
32
|
-
],
|
|
33
|
-
"description": "Use coinbase API to get wallet balance, float result.",
|
|
34
|
-
"default": "private"
|
|
35
|
-
},
|
|
36
|
-
"swap": {
|
|
37
|
-
"type": "string",
|
|
38
|
-
"title": "CDP Wallet Swap",
|
|
39
|
-
"enum": [
|
|
40
|
-
"disabled",
|
|
41
|
-
"public",
|
|
42
|
-
"private"
|
|
43
|
-
],
|
|
44
|
-
"x-enum-title": [
|
|
45
|
-
"Disabled",
|
|
46
|
-
"Agent Owner + All Users",
|
|
47
|
-
"Agent Owner Only"
|
|
48
|
-
],
|
|
49
|
-
"description": "Use coinbase API to swap.",
|
|
50
|
-
"default": "disabled"
|
|
51
|
-
},
|
|
52
20
|
"WalletActionProvider_get_balance": {
|
|
53
21
|
"type": "string",
|
|
54
22
|
"title": "Normal Get Balance",
|
|
@@ -81,121 +49,9 @@
|
|
|
81
49
|
"description": "Get wallet details using coinbase API",
|
|
82
50
|
"default": "public"
|
|
83
51
|
},
|
|
84
|
-
"CdpApiActionProvider_address_reputation": {
|
|
85
|
-
"type": "string",
|
|
86
|
-
"title": "Address Reputation",
|
|
87
|
-
"enum": [
|
|
88
|
-
"disabled",
|
|
89
|
-
"public",
|
|
90
|
-
"private"
|
|
91
|
-
],
|
|
92
|
-
"x-enum-title": [
|
|
93
|
-
"Disabled",
|
|
94
|
-
"Agent Owner + All Users",
|
|
95
|
-
"Agent Owner Only"
|
|
96
|
-
],
|
|
97
|
-
"description": "State for CdpApiActionProvider_address_reputation",
|
|
98
|
-
"default": "disabled"
|
|
99
|
-
},
|
|
100
|
-
"ERC20ActionProvider_get_balance": {
|
|
101
|
-
"type": "string",
|
|
102
|
-
"title": "Erc20 Get Balance",
|
|
103
|
-
"enum": [
|
|
104
|
-
"disabled",
|
|
105
|
-
"public",
|
|
106
|
-
"private"
|
|
107
|
-
],
|
|
108
|
-
"x-enum-title": [
|
|
109
|
-
"Disabled",
|
|
110
|
-
"Agent Owner + All Users",
|
|
111
|
-
"Agent Owner Only"
|
|
112
|
-
],
|
|
113
|
-
"description": "State for ERC20ActionProvider_get_balance",
|
|
114
|
-
"default": "disabled"
|
|
115
|
-
},
|
|
116
|
-
"ERC20ActionProvider_transfer": {
|
|
117
|
-
"type": "string",
|
|
118
|
-
"title": "Erc20 Transfer",
|
|
119
|
-
"enum": [
|
|
120
|
-
"disabled",
|
|
121
|
-
"public",
|
|
122
|
-
"private"
|
|
123
|
-
],
|
|
124
|
-
"x-enum-title": [
|
|
125
|
-
"Disabled",
|
|
126
|
-
"Agent Owner + All Users",
|
|
127
|
-
"Agent Owner Only"
|
|
128
|
-
],
|
|
129
|
-
"description": "State for ERC20ActionProvider_transfer",
|
|
130
|
-
"default": "private"
|
|
131
|
-
},
|
|
132
|
-
"WethActionProvider_wrap_eth": {
|
|
133
|
-
"type": "string",
|
|
134
|
-
"title": "Wrap ETH",
|
|
135
|
-
"enum": [
|
|
136
|
-
"disabled",
|
|
137
|
-
"public",
|
|
138
|
-
"private"
|
|
139
|
-
],
|
|
140
|
-
"x-enum-title": [
|
|
141
|
-
"Disabled",
|
|
142
|
-
"Agent Owner + All Users",
|
|
143
|
-
"Agent Owner Only"
|
|
144
|
-
],
|
|
145
|
-
"description": "State for WethActionProvider_wrap_eth",
|
|
146
|
-
"default": "disabled"
|
|
147
|
-
},
|
|
148
|
-
"Erc721ActionProvider_get_balance": {
|
|
149
|
-
"type": "string",
|
|
150
|
-
"title": "Erc721 NFT Get Balance",
|
|
151
|
-
"enum": [
|
|
152
|
-
"disabled",
|
|
153
|
-
"public",
|
|
154
|
-
"private"
|
|
155
|
-
],
|
|
156
|
-
"x-enum-title": [
|
|
157
|
-
"Disabled",
|
|
158
|
-
"Agent Owner + All Users",
|
|
159
|
-
"Agent Owner Only"
|
|
160
|
-
],
|
|
161
|
-
"description": "State for Erc721ActionProvider_get_balance",
|
|
162
|
-
"default": "disabled"
|
|
163
|
-
},
|
|
164
|
-
"Erc721ActionProvider_transfer": {
|
|
165
|
-
"type": "string",
|
|
166
|
-
"title": "Erc721 NFT Transfer",
|
|
167
|
-
"enum": [
|
|
168
|
-
"disabled",
|
|
169
|
-
"public",
|
|
170
|
-
"private"
|
|
171
|
-
],
|
|
172
|
-
"x-enum-title": [
|
|
173
|
-
"Disabled",
|
|
174
|
-
"Agent Owner + All Users",
|
|
175
|
-
"Agent Owner Only"
|
|
176
|
-
],
|
|
177
|
-
"description": "State for Erc721ActionProvider_transfer",
|
|
178
|
-
"default": "disabled"
|
|
179
|
-
},
|
|
180
|
-
"Erc721ActionProvider_mint": {
|
|
181
|
-
"type": "string",
|
|
182
|
-
"title": "Erc721 Mint",
|
|
183
|
-
"enum": [
|
|
184
|
-
"disabled",
|
|
185
|
-
"public",
|
|
186
|
-
"private"
|
|
187
|
-
],
|
|
188
|
-
"x-enum-title": [
|
|
189
|
-
"Disabled",
|
|
190
|
-
"Agent Owner + All Users",
|
|
191
|
-
"Agent Owner Only"
|
|
192
|
-
],
|
|
193
|
-
"description": "State for Erc721ActionProvider_mint",
|
|
194
|
-
"default": "disabled"
|
|
195
|
-
},
|
|
196
52
|
"WalletActionProvider_native_transfer": {
|
|
197
53
|
"type": "string",
|
|
198
|
-
"title": "
|
|
54
|
+
"title": "Native Transfer",
|
|
199
55
|
"enum": [
|
|
200
56
|
"disabled",
|
|
201
57
|
"public",
|
|
@@ -206,156 +62,12 @@
|
|
|
206
62
|
"Agent Owner + All Users",
|
|
207
63
|
"Agent Owner Only"
|
|
208
64
|
],
|
|
209
|
-
"description": "
|
|
210
|
-
"default": "private"
|
|
211
|
-
},
|
|
212
|
-
"CdpApiActionProvider_request_faucet_funds": {
|
|
213
|
-
"type": "string",
|
|
214
|
-
"title": "CDP Request Faucet Funds",
|
|
215
|
-
"enum": [
|
|
216
|
-
"disabled",
|
|
217
|
-
"public",
|
|
218
|
-
"private"
|
|
219
|
-
],
|
|
220
|
-
"x-enum-title": [
|
|
221
|
-
"Disabled",
|
|
222
|
-
"Agent Owner + All Users",
|
|
223
|
-
"Agent Owner Only"
|
|
224
|
-
],
|
|
225
|
-
"description": "Only available in base-sepolia network",
|
|
226
|
-
"default": "disabled"
|
|
227
|
-
},
|
|
228
|
-
"MorphoActionProvider_deposit": {
|
|
229
|
-
"type": "string",
|
|
230
|
-
"title": "Morpho Deposit",
|
|
231
|
-
"enum": [
|
|
232
|
-
"disabled",
|
|
233
|
-
"public",
|
|
234
|
-
"private"
|
|
235
|
-
],
|
|
236
|
-
"x-enum-title": [
|
|
237
|
-
"Disabled",
|
|
238
|
-
"Agent Owner + All Users",
|
|
239
|
-
"Agent Owner Only"
|
|
240
|
-
],
|
|
241
|
-
"description": "State for MorphoActionProvider_deposit",
|
|
242
|
-
"default": "disabled"
|
|
243
|
-
},
|
|
244
|
-
"MorphoActionProvider_withdraw": {
|
|
245
|
-
"type": "string",
|
|
246
|
-
"title": "Morpho Withdraw",
|
|
247
|
-
"enum": [
|
|
248
|
-
"disabled",
|
|
249
|
-
"public",
|
|
250
|
-
"private"
|
|
251
|
-
],
|
|
252
|
-
"x-enum-title": [
|
|
253
|
-
"Disabled",
|
|
254
|
-
"Agent Owner + All Users",
|
|
255
|
-
"Agent Owner Only"
|
|
256
|
-
],
|
|
257
|
-
"description": "State for MorphoActionProvider_withdraw",
|
|
65
|
+
"description": "Transfer the native asset from the wallet",
|
|
258
66
|
"default": "disabled"
|
|
259
67
|
},
|
|
260
|
-
"
|
|
261
|
-
"type": "string",
|
|
262
|
-
"title": "Pyth Fetch Price Feed Id",
|
|
263
|
-
"enum": [
|
|
264
|
-
"disabled",
|
|
265
|
-
"public",
|
|
266
|
-
"private"
|
|
267
|
-
],
|
|
268
|
-
"x-enum-title": [
|
|
269
|
-
"Disabled",
|
|
270
|
-
"Agent Owner + All Users",
|
|
271
|
-
"Agent Owner Only"
|
|
272
|
-
],
|
|
273
|
-
"description": "State for PythActionProvider_fetch_price_feed_id",
|
|
274
|
-
"default": "private"
|
|
275
|
-
},
|
|
276
|
-
"PythActionProvider_fetch_price": {
|
|
277
|
-
"type": "string",
|
|
278
|
-
"title": "Pyth Fetch Price",
|
|
279
|
-
"enum": [
|
|
280
|
-
"disabled",
|
|
281
|
-
"public",
|
|
282
|
-
"private"
|
|
283
|
-
],
|
|
284
|
-
"x-enum-title": [
|
|
285
|
-
"Disabled",
|
|
286
|
-
"Agent Owner + All Users",
|
|
287
|
-
"Agent Owner Only"
|
|
288
|
-
],
|
|
289
|
-
"description": "State for PythActionProvider_fetch_price",
|
|
290
|
-
"default": "private"
|
|
291
|
-
},
|
|
292
|
-
"WowActionProvider_buy_token": {
|
|
293
|
-
"type": "string",
|
|
294
|
-
"title": "Wow Buy Token",
|
|
295
|
-
"enum": [
|
|
296
|
-
"disabled",
|
|
297
|
-
"public",
|
|
298
|
-
"private"
|
|
299
|
-
],
|
|
300
|
-
"x-enum-title": [
|
|
301
|
-
"Disabled",
|
|
302
|
-
"Agent Owner + All Users",
|
|
303
|
-
"Agent Owner Only"
|
|
304
|
-
],
|
|
305
|
-
"description": "State for WowActionProvider_buy_token",
|
|
306
|
-
"default": "disabled"
|
|
307
|
-
},
|
|
308
|
-
"WowActionProvider_create_token": {
|
|
309
|
-
"type": "string",
|
|
310
|
-
"title": "Wow Create Token",
|
|
311
|
-
"enum": [
|
|
312
|
-
"disabled",
|
|
313
|
-
"public",
|
|
314
|
-
"private"
|
|
315
|
-
],
|
|
316
|
-
"x-enum-title": [
|
|
317
|
-
"Disabled",
|
|
318
|
-
"Agent Owner + All Users",
|
|
319
|
-
"Agent Owner Only"
|
|
320
|
-
],
|
|
321
|
-
"description": "State for WowActionProvider_create_token",
|
|
322
|
-
"default": "disabled"
|
|
323
|
-
},
|
|
324
|
-
"WowActionProvider_sell_token": {
|
|
325
|
-
"type": "string",
|
|
326
|
-
"title": "Wow Sell Token",
|
|
327
|
-
"enum": [
|
|
328
|
-
"disabled",
|
|
329
|
-
"public",
|
|
330
|
-
"private"
|
|
331
|
-
],
|
|
332
|
-
"x-enum-title": [
|
|
333
|
-
"Disabled",
|
|
334
|
-
"Agent Owner + All Users",
|
|
335
|
-
"Agent Owner Only"
|
|
336
|
-
],
|
|
337
|
-
"description": "State for WowActionProvider_sell_token",
|
|
338
|
-
"default": "disabled"
|
|
339
|
-
},
|
|
340
|
-
"SuperfluidActionProvider_create_flow": {
|
|
341
|
-
"type": "string",
|
|
342
|
-
"title": "Superfluid Create Flow",
|
|
343
|
-
"enum": [
|
|
344
|
-
"disabled",
|
|
345
|
-
"public",
|
|
346
|
-
"private"
|
|
347
|
-
],
|
|
348
|
-
"x-enum-title": [
|
|
349
|
-
"Disabled",
|
|
350
|
-
"Agent Owner + All Users",
|
|
351
|
-
"Agent Owner Only"
|
|
352
|
-
],
|
|
353
|
-
"description": "State for SuperfluidActionProvider_create_flow",
|
|
354
|
-
"default": "disabled"
|
|
355
|
-
},
|
|
356
|
-
"SuperfluidActionProvider_update_flow": {
|
|
68
|
+
"CdpApiActionProvider_request_faucet_funds": {
|
|
357
69
|
"type": "string",
|
|
358
|
-
"title": "
|
|
70
|
+
"title": "Request Faucet Funds",
|
|
359
71
|
"enum": [
|
|
360
72
|
"disabled",
|
|
361
73
|
"public",
|
|
@@ -366,12 +78,12 @@
|
|
|
366
78
|
"Agent Owner + All Users",
|
|
367
79
|
"Agent Owner Only"
|
|
368
80
|
],
|
|
369
|
-
"description": "State for
|
|
81
|
+
"description": "State for CdpApiActionProvider_request_faucet_funds",
|
|
370
82
|
"default": "disabled"
|
|
371
83
|
},
|
|
372
|
-
"
|
|
84
|
+
"CdpEvmWalletActionProvider_get_swap_price": {
|
|
373
85
|
"type": "string",
|
|
374
|
-
"title": "
|
|
86
|
+
"title": "Get Swap Price",
|
|
375
87
|
"enum": [
|
|
376
88
|
"disabled",
|
|
377
89
|
"public",
|
|
@@ -382,12 +94,12 @@
|
|
|
382
94
|
"Agent Owner + All Users",
|
|
383
95
|
"Agent Owner Only"
|
|
384
96
|
],
|
|
385
|
-
"description": "State for
|
|
97
|
+
"description": "State for CdpEvmWalletActionProvider_get_swap_price",
|
|
386
98
|
"default": "disabled"
|
|
387
99
|
},
|
|
388
|
-
"
|
|
100
|
+
"CdpEvmWalletActionProvider_swap": {
|
|
389
101
|
"type": "string",
|
|
390
|
-
"title": "
|
|
102
|
+
"title": "Swap Tokens",
|
|
391
103
|
"enum": [
|
|
392
104
|
"disabled",
|
|
393
105
|
"public",
|
|
@@ -398,7 +110,7 @@
|
|
|
398
110
|
"Agent Owner + All Users",
|
|
399
111
|
"Agent Owner Only"
|
|
400
112
|
],
|
|
401
|
-
"description": "State for
|
|
113
|
+
"description": "State for CdpEvmWalletActionProvider_swap",
|
|
402
114
|
"default": "disabled"
|
|
403
115
|
}
|
|
404
116
|
},
|
|
@@ -422,4 +134,4 @@
|
|
|
422
134
|
"enabled"
|
|
423
135
|
],
|
|
424
136
|
"additionalProperties": true
|
|
425
|
-
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""ERC20 AgentKit skills."""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict
|
|
4
|
+
|
|
5
|
+
from coinbase_agentkit import erc20_action_provider
|
|
6
|
+
|
|
7
|
+
from intentkit.abstracts.skill import SkillStoreABC
|
|
8
|
+
from intentkit.skills.base import (
|
|
9
|
+
SkillConfig,
|
|
10
|
+
SkillState,
|
|
11
|
+
action_to_structured_tool,
|
|
12
|
+
get_agentkit_actions,
|
|
13
|
+
)
|
|
14
|
+
from intentkit.skills.erc20.base import ERC20BaseTool
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SkillStates(TypedDict):
|
|
18
|
+
ERC20ActionProvider_get_balance: SkillState
|
|
19
|
+
ERC20ActionProvider_transfer: SkillState
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Config(SkillConfig):
|
|
23
|
+
"""Configuration for ERC20 skills."""
|
|
24
|
+
|
|
25
|
+
states: SkillStates
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
async def get_skills(
|
|
29
|
+
config: "Config",
|
|
30
|
+
is_private: bool,
|
|
31
|
+
store: SkillStoreABC,
|
|
32
|
+
agent_id: str,
|
|
33
|
+
**_,
|
|
34
|
+
) -> list[ERC20BaseTool]:
|
|
35
|
+
"""Get all ERC20 skills."""
|
|
36
|
+
|
|
37
|
+
available_skills: list[str] = []
|
|
38
|
+
for skill_name, state in config["states"].items():
|
|
39
|
+
if state == "disabled":
|
|
40
|
+
continue
|
|
41
|
+
if state == "public" or (state == "private" and is_private):
|
|
42
|
+
available_skills.append(skill_name)
|
|
43
|
+
|
|
44
|
+
actions = await get_agentkit_actions(agent_id, store, [erc20_action_provider])
|
|
45
|
+
tools: list[ERC20BaseTool] = []
|
|
46
|
+
for skill in available_skills:
|
|
47
|
+
for action in actions:
|
|
48
|
+
if action.name.endswith(skill):
|
|
49
|
+
tools.append(action_to_structured_tool(action))
|
|
50
|
+
return tools
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
|
|
2
|
+
<rect width="128" height="128" fill="#1e88e5" rx="16" />
|
|
3
|
+
<circle cx="64" cy="64" r="40" fill="#bbdefb" />
|
|
4
|
+
<text x="50%" y="70%" font-family="Arial,Helvetica,sans-serif" font-size="48" fill="#0d47a1" font-weight="700" text-anchor="middle">20</text>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "ERC20",
|
|
5
|
+
"description": "ERC20 token balance and transfer actions via Coinbase AgentKit",
|
|
6
|
+
"x-icon": "https://ai.service.crestal.dev/skills/erc20/erc20.svg",
|
|
7
|
+
"x-tags": [
|
|
8
|
+
"Blockchain"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"enabled": {
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"title": "Enabled",
|
|
14
|
+
"description": "Whether this skill is enabled",
|
|
15
|
+
"default": true
|
|
16
|
+
},
|
|
17
|
+
"states": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"ERC20ActionProvider_get_balance": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"title": "Get ERC20 Balance",
|
|
23
|
+
"enum": [
|
|
24
|
+
"disabled",
|
|
25
|
+
"public",
|
|
26
|
+
"private"
|
|
27
|
+
],
|
|
28
|
+
"x-enum-title": [
|
|
29
|
+
"Disabled",
|
|
30
|
+
"Agent Owner + All Users",
|
|
31
|
+
"Agent Owner Only"
|
|
32
|
+
],
|
|
33
|
+
"description": "State for ERC20ActionProvider_get_balance",
|
|
34
|
+
"default": "disabled"
|
|
35
|
+
},
|
|
36
|
+
"ERC20ActionProvider_transfer": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"title": "Transfer ERC20",
|
|
39
|
+
"enum": [
|
|
40
|
+
"disabled",
|
|
41
|
+
"public",
|
|
42
|
+
"private"
|
|
43
|
+
],
|
|
44
|
+
"x-enum-title": [
|
|
45
|
+
"Disabled",
|
|
46
|
+
"Agent Owner + All Users",
|
|
47
|
+
"Agent Owner Only"
|
|
48
|
+
],
|
|
49
|
+
"description": "State for ERC20ActionProvider_transfer",
|
|
50
|
+
"default": "disabled"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"description": "States for each ERC20 skill (disabled, public, or private)"
|
|
54
|
+
},
|
|
55
|
+
"api_key_provider": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"title": "API Key Provider",
|
|
58
|
+
"description": "Who provides the API key",
|
|
59
|
+
"enum": [
|
|
60
|
+
"platform"
|
|
61
|
+
],
|
|
62
|
+
"x-enum-title": [
|
|
63
|
+
"Nation Hosted"
|
|
64
|
+
],
|
|
65
|
+
"default": "platform"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"required": [
|
|
69
|
+
"states",
|
|
70
|
+
"enabled"
|
|
71
|
+
],
|
|
72
|
+
"additionalProperties": true
|
|
73
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""ERC721 AgentKit skills."""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict
|
|
4
|
+
|
|
5
|
+
from coinbase_agentkit import erc721_action_provider
|
|
6
|
+
|
|
7
|
+
from intentkit.abstracts.skill import SkillStoreABC
|
|
8
|
+
from intentkit.skills.base import (
|
|
9
|
+
SkillConfig,
|
|
10
|
+
SkillState,
|
|
11
|
+
action_to_structured_tool,
|
|
12
|
+
get_agentkit_actions,
|
|
13
|
+
)
|
|
14
|
+
from intentkit.skills.erc721.base import ERC721BaseTool
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SkillStates(TypedDict):
|
|
18
|
+
Erc721ActionProvider_get_balance: SkillState
|
|
19
|
+
Erc721ActionProvider_mint: SkillState
|
|
20
|
+
Erc721ActionProvider_transfer: SkillState
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Config(SkillConfig):
|
|
24
|
+
"""Configuration for ERC721 skills."""
|
|
25
|
+
|
|
26
|
+
states: SkillStates
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
async def get_skills(
|
|
30
|
+
config: "Config",
|
|
31
|
+
is_private: bool,
|
|
32
|
+
store: SkillStoreABC,
|
|
33
|
+
agent_id: str,
|
|
34
|
+
**_,
|
|
35
|
+
) -> list[ERC721BaseTool]:
|
|
36
|
+
"""Get all ERC721 skills."""
|
|
37
|
+
|
|
38
|
+
available_skills: list[str] = []
|
|
39
|
+
for skill_name, state in config["states"].items():
|
|
40
|
+
if state == "disabled":
|
|
41
|
+
continue
|
|
42
|
+
if state == "public" or (state == "private" and is_private):
|
|
43
|
+
available_skills.append(skill_name)
|
|
44
|
+
|
|
45
|
+
actions = await get_agentkit_actions(agent_id, store, [erc721_action_provider])
|
|
46
|
+
tools: list[ERC721BaseTool] = []
|
|
47
|
+
for skill in available_skills:
|
|
48
|
+
for action in actions:
|
|
49
|
+
if action.name.endswith(skill):
|
|
50
|
+
tools.append(action_to_structured_tool(action))
|
|
51
|
+
return tools
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
|
|
2
|
+
<rect width="128" height="128" fill="#6a1b9a" rx="16" />
|
|
3
|
+
<polygon points="64,24 100,64 64,104 28,64" fill="#ce93d8" />
|
|
4
|
+
<text x="50%" y="72%" font-family="Arial,Helvetica,sans-serif" font-size="40" fill="#4a148c" font-weight="700" text-anchor="middle">721</text>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "ERC721",
|
|
5
|
+
"description": "ERC721 NFT management actions via Coinbase AgentKit",
|
|
6
|
+
"x-icon": "https://ai.service.crestal.dev/skills/erc721/erc721.svg",
|
|
7
|
+
"x-tags": [
|
|
8
|
+
"Blockchain"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"enabled": {
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"title": "Enabled",
|
|
14
|
+
"description": "Whether this skill is enabled",
|
|
15
|
+
"default": true
|
|
16
|
+
},
|
|
17
|
+
"states": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"Erc721ActionProvider_get_balance": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"title": "Get ERC721 Balance",
|
|
23
|
+
"enum": [
|
|
24
|
+
"disabled",
|
|
25
|
+
"public",
|
|
26
|
+
"private"
|
|
27
|
+
],
|
|
28
|
+
"x-enum-title": [
|
|
29
|
+
"Disabled",
|
|
30
|
+
"Agent Owner + All Users",
|
|
31
|
+
"Agent Owner Only"
|
|
32
|
+
],
|
|
33
|
+
"description": "State for Erc721ActionProvider_get_balance",
|
|
34
|
+
"default": "disabled"
|
|
35
|
+
},
|
|
36
|
+
"Erc721ActionProvider_mint": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"title": "Mint ERC721",
|
|
39
|
+
"enum": [
|
|
40
|
+
"disabled",
|
|
41
|
+
"public",
|
|
42
|
+
"private"
|
|
43
|
+
],
|
|
44
|
+
"x-enum-title": [
|
|
45
|
+
"Disabled",
|
|
46
|
+
"Agent Owner + All Users",
|
|
47
|
+
"Agent Owner Only"
|
|
48
|
+
],
|
|
49
|
+
"description": "State for Erc721ActionProvider_mint",
|
|
50
|
+
"default": "disabled"
|
|
51
|
+
},
|
|
52
|
+
"Erc721ActionProvider_transfer": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"title": "Transfer ERC721",
|
|
55
|
+
"enum": [
|
|
56
|
+
"disabled",
|
|
57
|
+
"public",
|
|
58
|
+
"private"
|
|
59
|
+
],
|
|
60
|
+
"x-enum-title": [
|
|
61
|
+
"Disabled",
|
|
62
|
+
"Agent Owner + All Users",
|
|
63
|
+
"Agent Owner Only"
|
|
64
|
+
],
|
|
65
|
+
"description": "State for Erc721ActionProvider_transfer",
|
|
66
|
+
"default": "disabled"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"description": "States for each ERC721 skill (disabled, public, or private)"
|
|
70
|
+
},
|
|
71
|
+
"api_key_provider": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"title": "API Key Provider",
|
|
74
|
+
"description": "Who provides the API key",
|
|
75
|
+
"enum": [
|
|
76
|
+
"platform"
|
|
77
|
+
],
|
|
78
|
+
"x-enum-title": [
|
|
79
|
+
"Nation Hosted"
|
|
80
|
+
],
|
|
81
|
+
"default": "platform"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"required": [
|
|
85
|
+
"states",
|
|
86
|
+
"enabled"
|
|
87
|
+
],
|
|
88
|
+
"additionalProperties": true
|
|
89
|
+
}
|