kira-wallet 0.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.
Files changed (58) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +116 -0
  3. package/THIRD_PARTY_NOTICES.md +13 -0
  4. package/bin/kira.cjs +8 -0
  5. package/curve_pricing.py +86 -0
  6. package/docs/AGENT_TOOLS.md +53 -0
  7. package/docs/CLI.md +144 -0
  8. package/docs/JOB_CONTRACT.md +111 -0
  9. package/docs/KIRA_JOBS_BUILD_REPORT.md +92 -0
  10. package/docs/KIRA_REDESIGN_REPORT.md +125 -0
  11. package/docs/ONBOARDING_CHAT_CONTRACT.md +36 -0
  12. package/docs/RELEASE.md +45 -0
  13. package/docs/WALLET_CAPABILITIES.md +98 -0
  14. package/docs/character/brand-generation.json +20 -0
  15. package/docs/character/workspace-generation.json +29 -0
  16. package/docs/screenshots/kira-jobs-desktop.jpg +0 -0
  17. package/kira_agent.py +280 -0
  18. package/kira_cli.py +263 -0
  19. package/kira_config.py +98 -0
  20. package/kira_jobs.py +504 -0
  21. package/kira_tools.py +104 -0
  22. package/networks.json +214 -0
  23. package/onchain.cjs +34 -0
  24. package/package.json +78 -0
  25. package/pipeline-onchain.cjs +284 -0
  26. package/research.py +39 -0
  27. package/sources/job-envelope-v1.schema.json +469 -0
  28. package/sources/job-request-v1.schema.json +352 -0
  29. package/sources/mintclub-bond-abi.json +1457 -0
  30. package/sources/rpc-candidates.json +294 -0
  31. package/sources/uniswap-deployments.json +18261 -0
  32. package/viewer/README.md +119 -0
  33. package/viewer/chain_images.py +21 -0
  34. package/viewer/details.py +119 -0
  35. package/viewer/model.py +216 -0
  36. package/viewer/refresh-curve-prices.cjs +35 -0
  37. package/viewer/refresh_prices.py +97 -0
  38. package/viewer/server.py +153 -0
  39. package/viewer/static/agent.css +100 -0
  40. package/viewer/static/agent.js +203 -0
  41. package/viewer/static/app.js +252 -0
  42. package/viewer/static/favicon.svg +1 -0
  43. package/viewer/static/index.html +139 -0
  44. package/viewer/static/jobs.js +113 -0
  45. package/viewer/static/kira-attention.png +0 -0
  46. package/viewer/static/kira-explain.png +0 -0
  47. package/viewer/static/kira-logo.png +0 -0
  48. package/viewer/static/kira-research.png +0 -0
  49. package/viewer/static/kira-review.png +0 -0
  50. package/viewer/static/kira.png +0 -0
  51. package/viewer/static/style.css +51 -0
  52. package/viewer/static/watching-model.js +129 -0
  53. package/viewer/static/watching.js +167 -0
  54. package/viewer/static/workspace-model.js +43 -0
  55. package/viewer/static/workspace.css +463 -0
  56. package/viewer/static/workspace.js +102 -0
  57. package/viewer/token_images.py +137 -0
  58. package/wallet.py +389 -0
@@ -0,0 +1,352 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:kira:job-request:1",
4
+ "title": "Kira typed mutation requests v1",
5
+ "oneOf": [
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "schema_version": {
10
+ "const": 1
11
+ },
12
+ "operation": {
13
+ "const": "wallet.add"
14
+ },
15
+ "input": {
16
+ "type": "object",
17
+ "properties": {
18
+ "address": {
19
+ "type": "string",
20
+ "pattern": "^0x[0-9a-fA-F]{40}$"
21
+ },
22
+ "tag": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "maxLength": 200
26
+ }
27
+ },
28
+ "required": [
29
+ "address",
30
+ "tag"
31
+ ],
32
+ "additionalProperties": false
33
+ },
34
+ "idempotency_key": {
35
+ "type": "string",
36
+ "minLength": 8,
37
+ "maxLength": 200
38
+ }
39
+ },
40
+ "required": [
41
+ "schema_version",
42
+ "operation",
43
+ "input",
44
+ "idempotency_key"
45
+ ],
46
+ "additionalProperties": false
47
+ },
48
+ {
49
+ "type": "object",
50
+ "properties": {
51
+ "schema_version": {
52
+ "const": 1
53
+ },
54
+ "operation": {
55
+ "const": "wallet.refresh"
56
+ },
57
+ "input": {
58
+ "type": "object",
59
+ "properties": {
60
+ "wallet": {
61
+ "type": "string",
62
+ "minLength": 1,
63
+ "maxLength": 200
64
+ }
65
+ },
66
+ "required": [
67
+ "wallet"
68
+ ],
69
+ "additionalProperties": false
70
+ },
71
+ "idempotency_key": {
72
+ "type": "string",
73
+ "minLength": 8,
74
+ "maxLength": 200
75
+ }
76
+ },
77
+ "required": [
78
+ "schema_version",
79
+ "operation",
80
+ "input",
81
+ "idempotency_key"
82
+ ],
83
+ "additionalProperties": false
84
+ },
85
+ {
86
+ "type": "object",
87
+ "properties": {
88
+ "schema_version": {
89
+ "const": 1
90
+ },
91
+ "operation": {
92
+ "const": "prices.refresh"
93
+ },
94
+ "input": {
95
+ "type": "object",
96
+ "properties": {
97
+ "wallet": {
98
+ "type": "string",
99
+ "minLength": 1,
100
+ "maxLength": 200
101
+ }
102
+ },
103
+ "required": [
104
+ "wallet"
105
+ ],
106
+ "additionalProperties": false
107
+ },
108
+ "idempotency_key": {
109
+ "type": "string",
110
+ "minLength": 8,
111
+ "maxLength": 200
112
+ }
113
+ },
114
+ "required": [
115
+ "schema_version",
116
+ "operation",
117
+ "input",
118
+ "idempotency_key"
119
+ ],
120
+ "additionalProperties": false
121
+ },
122
+ {
123
+ "type": "object",
124
+ "properties": {
125
+ "schema_version": {
126
+ "const": 1
127
+ },
128
+ "operation": {
129
+ "const": "wallet.setTags"
130
+ },
131
+ "input": {
132
+ "type": "object",
133
+ "properties": {
134
+ "wallet": {
135
+ "type": "string",
136
+ "minLength": 1,
137
+ "maxLength": 200
138
+ },
139
+ "tags": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "string",
143
+ "minLength": 1,
144
+ "maxLength": 200
145
+ },
146
+ "minItems": 1,
147
+ "maxItems": 20,
148
+ "uniqueItems": true
149
+ }
150
+ },
151
+ "required": [
152
+ "wallet",
153
+ "tags"
154
+ ],
155
+ "additionalProperties": false
156
+ },
157
+ "idempotency_key": {
158
+ "type": "string",
159
+ "minLength": 8,
160
+ "maxLength": 200
161
+ }
162
+ },
163
+ "required": [
164
+ "schema_version",
165
+ "operation",
166
+ "input",
167
+ "idempotency_key"
168
+ ],
169
+ "additionalProperties": false
170
+ },
171
+ {
172
+ "type": "object",
173
+ "properties": {
174
+ "schema_version": {
175
+ "const": 1
176
+ },
177
+ "operation": {
178
+ "const": "job.resume"
179
+ },
180
+ "input": {
181
+ "type": "object",
182
+ "properties": {
183
+ "job_id": {
184
+ "type": "string",
185
+ "format": "uuid"
186
+ }
187
+ },
188
+ "required": [
189
+ "job_id"
190
+ ],
191
+ "additionalProperties": false
192
+ },
193
+ "idempotency_key": {
194
+ "type": "string",
195
+ "minLength": 8,
196
+ "maxLength": 200
197
+ }
198
+ },
199
+ "required": [
200
+ "schema_version",
201
+ "operation",
202
+ "input",
203
+ "idempotency_key"
204
+ ],
205
+ "additionalProperties": false
206
+ },
207
+ {
208
+ "type": "object",
209
+ "properties": {
210
+ "schema_version": {
211
+ "const": 1
212
+ },
213
+ "operation": {
214
+ "const": "job.cancel"
215
+ },
216
+ "input": {
217
+ "type": "object",
218
+ "properties": {
219
+ "job_id": {
220
+ "type": "string",
221
+ "format": "uuid"
222
+ }
223
+ },
224
+ "required": [
225
+ "job_id"
226
+ ],
227
+ "additionalProperties": false
228
+ },
229
+ "idempotency_key": {
230
+ "type": "string",
231
+ "minLength": 8,
232
+ "maxLength": 200
233
+ }
234
+ },
235
+ "required": [
236
+ "schema_version",
237
+ "operation",
238
+ "input",
239
+ "idempotency_key"
240
+ ],
241
+ "additionalProperties": false
242
+ },
243
+ {
244
+ "type": "object",
245
+ "properties": {
246
+ "schema_version": {
247
+ "const": 1
248
+ },
249
+ "operation": {
250
+ "const": "settings.rpc"
251
+ },
252
+ "input": {
253
+ "type": "object",
254
+ "properties": {
255
+ "mode": {
256
+ "enum": [
257
+ "public",
258
+ "custom"
259
+ ]
260
+ },
261
+ "chains": {
262
+ "type": "array",
263
+ "items": {
264
+ "type": "object",
265
+ "properties": {
266
+ "chain_id": {
267
+ "type": "integer",
268
+ "minimum": 1
269
+ },
270
+ "url_env": {
271
+ "type": "string",
272
+ "pattern": "^[A-Z_][A-Z0-9_]{0,99}$"
273
+ }
274
+ },
275
+ "required": [
276
+ "chain_id",
277
+ "url_env"
278
+ ],
279
+ "additionalProperties": false
280
+ },
281
+ "maxItems": 30
282
+ },
283
+ "allow_public_fallback": {
284
+ "type": "boolean"
285
+ }
286
+ },
287
+ "required": [
288
+ "mode",
289
+ "chains",
290
+ "allow_public_fallback"
291
+ ],
292
+ "additionalProperties": false
293
+ },
294
+ "idempotency_key": {
295
+ "type": "string",
296
+ "minLength": 8,
297
+ "maxLength": 200
298
+ }
299
+ },
300
+ "required": [
301
+ "schema_version",
302
+ "operation",
303
+ "input",
304
+ "idempotency_key"
305
+ ],
306
+ "additionalProperties": false
307
+ },
308
+ {
309
+ "type": "object",
310
+ "properties": {
311
+ "schema_version": {
312
+ "const": 1
313
+ },
314
+ "operation": {
315
+ "const": "settings.discovery"
316
+ },
317
+ "input": {
318
+ "type": "object",
319
+ "properties": {
320
+ "provider": {
321
+ "enum": [
322
+ "none",
323
+ "alchemy"
324
+ ]
325
+ },
326
+ "key_env": {
327
+ "type": "string",
328
+ "pattern": "^[A-Z_][A-Z0-9_]{0,99}$"
329
+ }
330
+ },
331
+ "required": [
332
+ "provider",
333
+ "key_env"
334
+ ],
335
+ "additionalProperties": false
336
+ },
337
+ "idempotency_key": {
338
+ "type": "string",
339
+ "minLength": 8,
340
+ "maxLength": 200
341
+ }
342
+ },
343
+ "required": [
344
+ "schema_version",
345
+ "operation",
346
+ "input",
347
+ "idempotency_key"
348
+ ],
349
+ "additionalProperties": false
350
+ }
351
+ ]
352
+ }