loby 0.1.0__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.
loby/__init__.py ADDED
@@ -0,0 +1,31 @@
1
+ """Loby protocol Python SDK.
2
+
3
+ See ``docs/archive/tasks_final/task_module4_sdk.md`` for the full ownership and law set.
4
+ Nothing in this package logs, serializes, transmits, or persists a private
5
+ key, ML-DSA seed, or toll-signer secp256k1 key unless the caller explicitly
6
+ supplies a keystore backend.
7
+ """
8
+
9
+ from loby.account import SmartAccountClient, UserOperation
10
+ from loby.crypto import Ed25519Identity
11
+ from loby.models import Envelope, EnvelopeCodec, TeeAttestation, TollTerms, TollVoucher
12
+ from loby.pq import MlDsaIdentity
13
+ from loby.relay import MultiRelayClient, RelayClient
14
+ from loby.tolls import TollLedger, TollRequiredError, TollVoucherSigner
15
+
16
+ __all__ = [
17
+ "Ed25519Identity",
18
+ "MlDsaIdentity",
19
+ "Envelope",
20
+ "EnvelopeCodec",
21
+ "TeeAttestation",
22
+ "TollTerms",
23
+ "TollVoucher",
24
+ "TollVoucherSigner",
25
+ "TollLedger",
26
+ "TollRequiredError",
27
+ "RelayClient",
28
+ "MultiRelayClient",
29
+ "SmartAccountClient",
30
+ "UserOperation",
31
+ ]
@@ -0,0 +1,28 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "pqPubkeyHash",
5
+ "inputs": [],
6
+ "outputs": [
7
+ {
8
+ "name": "",
9
+ "type": "bytes32",
10
+ "internalType": "bytes32"
11
+ }
12
+ ],
13
+ "stateMutability": "view"
14
+ },
15
+ {
16
+ "type": "function",
17
+ "name": "sigPolicy",
18
+ "inputs": [],
19
+ "outputs": [
20
+ {
21
+ "name": "",
22
+ "type": "uint8",
23
+ "internalType": "uint8"
24
+ }
25
+ ],
26
+ "stateMutability": "view"
27
+ }
28
+ ]
@@ -0,0 +1,21 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "isLobyAccount",
5
+ "inputs": [
6
+ {
7
+ "name": "account",
8
+ "type": "address",
9
+ "internalType": "address"
10
+ }
11
+ ],
12
+ "outputs": [
13
+ {
14
+ "name": "",
15
+ "type": "bool",
16
+ "internalType": "bool"
17
+ }
18
+ ],
19
+ "stateMutability": "view"
20
+ }
21
+ ]
@@ -0,0 +1,26 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "verify",
5
+ "inputs": [
6
+ {
7
+ "name": "publicInputs",
8
+ "type": "bytes32[]",
9
+ "internalType": "bytes32[]"
10
+ },
11
+ {
12
+ "name": "proof",
13
+ "type": "bytes",
14
+ "internalType": "bytes"
15
+ }
16
+ ],
17
+ "outputs": [
18
+ {
19
+ "name": "",
20
+ "type": "bool",
21
+ "internalType": "bool"
22
+ }
23
+ ],
24
+ "stateMutability": "view"
25
+ }
26
+ ]
@@ -0,0 +1,505 @@
1
+ [
2
+ {
3
+ "type": "constructor",
4
+ "inputs": [
5
+ {
6
+ "name": "entryPoint_",
7
+ "type": "address",
8
+ "internalType": "contract IEntryPoint"
9
+ },
10
+ {
11
+ "name": "pqVerifier_",
12
+ "type": "address",
13
+ "internalType": "contract IPqUserOpVerifier"
14
+ }
15
+ ],
16
+ "stateMutability": "nonpayable"
17
+ },
18
+ {
19
+ "type": "receive",
20
+ "stateMutability": "payable"
21
+ },
22
+ {
23
+ "type": "function",
24
+ "name": "UPGRADE_INTERFACE_VERSION",
25
+ "inputs": [],
26
+ "outputs": [
27
+ {
28
+ "name": "",
29
+ "type": "string",
30
+ "internalType": "string"
31
+ }
32
+ ],
33
+ "stateMutability": "view"
34
+ },
35
+ {
36
+ "type": "function",
37
+ "name": "ecdsaOwner",
38
+ "inputs": [],
39
+ "outputs": [
40
+ {
41
+ "name": "",
42
+ "type": "address",
43
+ "internalType": "address"
44
+ }
45
+ ],
46
+ "stateMutability": "view"
47
+ },
48
+ {
49
+ "type": "function",
50
+ "name": "entryPoint",
51
+ "inputs": [],
52
+ "outputs": [
53
+ {
54
+ "name": "",
55
+ "type": "address",
56
+ "internalType": "contract IEntryPoint"
57
+ }
58
+ ],
59
+ "stateMutability": "view"
60
+ },
61
+ {
62
+ "type": "function",
63
+ "name": "execute",
64
+ "inputs": [
65
+ {
66
+ "name": "dest",
67
+ "type": "address",
68
+ "internalType": "address"
69
+ },
70
+ {
71
+ "name": "value",
72
+ "type": "uint256",
73
+ "internalType": "uint256"
74
+ },
75
+ {
76
+ "name": "data",
77
+ "type": "bytes",
78
+ "internalType": "bytes"
79
+ }
80
+ ],
81
+ "outputs": [],
82
+ "stateMutability": "nonpayable"
83
+ },
84
+ {
85
+ "type": "function",
86
+ "name": "executeBatch",
87
+ "inputs": [
88
+ {
89
+ "name": "dest",
90
+ "type": "address[]",
91
+ "internalType": "address[]"
92
+ },
93
+ {
94
+ "name": "value",
95
+ "type": "uint256[]",
96
+ "internalType": "uint256[]"
97
+ },
98
+ {
99
+ "name": "data",
100
+ "type": "bytes[]",
101
+ "internalType": "bytes[]"
102
+ }
103
+ ],
104
+ "outputs": [],
105
+ "stateMutability": "nonpayable"
106
+ },
107
+ {
108
+ "type": "function",
109
+ "name": "getNonce",
110
+ "inputs": [],
111
+ "outputs": [
112
+ {
113
+ "name": "",
114
+ "type": "uint256",
115
+ "internalType": "uint256"
116
+ }
117
+ ],
118
+ "stateMutability": "view"
119
+ },
120
+ {
121
+ "type": "function",
122
+ "name": "initialize",
123
+ "inputs": [
124
+ {
125
+ "name": "ecdsaOwner_",
126
+ "type": "address",
127
+ "internalType": "address"
128
+ },
129
+ {
130
+ "name": "pqPubkeyHash_",
131
+ "type": "bytes32",
132
+ "internalType": "bytes32"
133
+ },
134
+ {
135
+ "name": "sigPolicy_",
136
+ "type": "uint8",
137
+ "internalType": "uint8"
138
+ }
139
+ ],
140
+ "outputs": [],
141
+ "stateMutability": "nonpayable"
142
+ },
143
+ {
144
+ "type": "function",
145
+ "name": "isValidSignature",
146
+ "inputs": [
147
+ {
148
+ "name": "hash",
149
+ "type": "bytes32",
150
+ "internalType": "bytes32"
151
+ },
152
+ {
153
+ "name": "signature",
154
+ "type": "bytes",
155
+ "internalType": "bytes"
156
+ }
157
+ ],
158
+ "outputs": [
159
+ {
160
+ "name": "",
161
+ "type": "bytes4",
162
+ "internalType": "bytes4"
163
+ }
164
+ ],
165
+ "stateMutability": "view"
166
+ },
167
+ {
168
+ "type": "function",
169
+ "name": "pqPubkeyHash",
170
+ "inputs": [],
171
+ "outputs": [
172
+ {
173
+ "name": "",
174
+ "type": "bytes32",
175
+ "internalType": "bytes32"
176
+ }
177
+ ],
178
+ "stateMutability": "view"
179
+ },
180
+ {
181
+ "type": "function",
182
+ "name": "pqVerifier",
183
+ "inputs": [],
184
+ "outputs": [
185
+ {
186
+ "name": "",
187
+ "type": "address",
188
+ "internalType": "contract IPqUserOpVerifier"
189
+ }
190
+ ],
191
+ "stateMutability": "view"
192
+ },
193
+ {
194
+ "type": "function",
195
+ "name": "proxiableUUID",
196
+ "inputs": [],
197
+ "outputs": [
198
+ {
199
+ "name": "",
200
+ "type": "bytes32",
201
+ "internalType": "bytes32"
202
+ }
203
+ ],
204
+ "stateMutability": "view"
205
+ },
206
+ {
207
+ "type": "function",
208
+ "name": "ratchetSigPolicy",
209
+ "inputs": [
210
+ {
211
+ "name": "newPolicy",
212
+ "type": "uint8",
213
+ "internalType": "uint8"
214
+ },
215
+ {
216
+ "name": "newPqPubkeyHash",
217
+ "type": "bytes32",
218
+ "internalType": "bytes32"
219
+ },
220
+ {
221
+ "name": "mldsaPubkey",
222
+ "type": "bytes",
223
+ "internalType": "bytes"
224
+ },
225
+ {
226
+ "name": "bindingSig",
227
+ "type": "bytes",
228
+ "internalType": "bytes"
229
+ }
230
+ ],
231
+ "outputs": [],
232
+ "stateMutability": "nonpayable"
233
+ },
234
+ {
235
+ "type": "function",
236
+ "name": "sigPolicy",
237
+ "inputs": [],
238
+ "outputs": [
239
+ {
240
+ "name": "",
241
+ "type": "uint8",
242
+ "internalType": "uint8"
243
+ }
244
+ ],
245
+ "stateMutability": "view"
246
+ },
247
+ {
248
+ "type": "function",
249
+ "name": "upgradeToAndCall",
250
+ "inputs": [
251
+ {
252
+ "name": "newImplementation",
253
+ "type": "address",
254
+ "internalType": "address"
255
+ },
256
+ {
257
+ "name": "data",
258
+ "type": "bytes",
259
+ "internalType": "bytes"
260
+ }
261
+ ],
262
+ "outputs": [],
263
+ "stateMutability": "payable"
264
+ },
265
+ {
266
+ "type": "function",
267
+ "name": "validateUserOp",
268
+ "inputs": [
269
+ {
270
+ "name": "userOp",
271
+ "type": "tuple",
272
+ "internalType": "struct PackedUserOperation",
273
+ "components": [
274
+ {
275
+ "name": "sender",
276
+ "type": "address",
277
+ "internalType": "address"
278
+ },
279
+ {
280
+ "name": "nonce",
281
+ "type": "uint256",
282
+ "internalType": "uint256"
283
+ },
284
+ {
285
+ "name": "initCode",
286
+ "type": "bytes",
287
+ "internalType": "bytes"
288
+ },
289
+ {
290
+ "name": "callData",
291
+ "type": "bytes",
292
+ "internalType": "bytes"
293
+ },
294
+ {
295
+ "name": "accountGasLimits",
296
+ "type": "bytes32",
297
+ "internalType": "bytes32"
298
+ },
299
+ {
300
+ "name": "preVerificationGas",
301
+ "type": "uint256",
302
+ "internalType": "uint256"
303
+ },
304
+ {
305
+ "name": "gasFees",
306
+ "type": "bytes32",
307
+ "internalType": "bytes32"
308
+ },
309
+ {
310
+ "name": "paymasterAndData",
311
+ "type": "bytes",
312
+ "internalType": "bytes"
313
+ },
314
+ {
315
+ "name": "signature",
316
+ "type": "bytes",
317
+ "internalType": "bytes"
318
+ }
319
+ ]
320
+ },
321
+ {
322
+ "name": "userOpHash",
323
+ "type": "bytes32",
324
+ "internalType": "bytes32"
325
+ },
326
+ {
327
+ "name": "missingAccountFunds",
328
+ "type": "uint256",
329
+ "internalType": "uint256"
330
+ }
331
+ ],
332
+ "outputs": [
333
+ {
334
+ "name": "validationData",
335
+ "type": "uint256",
336
+ "internalType": "uint256"
337
+ }
338
+ ],
339
+ "stateMutability": "nonpayable"
340
+ },
341
+ {
342
+ "type": "event",
343
+ "name": "Initialized",
344
+ "inputs": [
345
+ {
346
+ "name": "version",
347
+ "type": "uint64",
348
+ "indexed": false,
349
+ "internalType": "uint64"
350
+ }
351
+ ],
352
+ "anonymous": false
353
+ },
354
+ {
355
+ "type": "event",
356
+ "name": "LobyAccountInitialized",
357
+ "inputs": [
358
+ {
359
+ "name": "ecdsaOwner",
360
+ "type": "address",
361
+ "indexed": true,
362
+ "internalType": "address"
363
+ },
364
+ {
365
+ "name": "pqPubkeyHash",
366
+ "type": "bytes32",
367
+ "indexed": true,
368
+ "internalType": "bytes32"
369
+ },
370
+ {
371
+ "name": "sigPolicy",
372
+ "type": "uint8",
373
+ "indexed": false,
374
+ "internalType": "uint8"
375
+ }
376
+ ],
377
+ "anonymous": false
378
+ },
379
+ {
380
+ "type": "event",
381
+ "name": "SigPolicyRatcheted",
382
+ "inputs": [
383
+ {
384
+ "name": "oldPolicy",
385
+ "type": "uint8",
386
+ "indexed": false,
387
+ "internalType": "uint8"
388
+ },
389
+ {
390
+ "name": "newPolicy",
391
+ "type": "uint8",
392
+ "indexed": false,
393
+ "internalType": "uint8"
394
+ },
395
+ {
396
+ "name": "pqPubkeyHash",
397
+ "type": "bytes32",
398
+ "indexed": false,
399
+ "internalType": "bytes32"
400
+ }
401
+ ],
402
+ "anonymous": false
403
+ },
404
+ {
405
+ "type": "event",
406
+ "name": "Upgraded",
407
+ "inputs": [
408
+ {
409
+ "name": "implementation",
410
+ "type": "address",
411
+ "indexed": true,
412
+ "internalType": "address"
413
+ }
414
+ ],
415
+ "anonymous": false
416
+ },
417
+ {
418
+ "type": "error",
419
+ "name": "AddressEmptyCode",
420
+ "inputs": [
421
+ {
422
+ "name": "target",
423
+ "type": "address",
424
+ "internalType": "address"
425
+ }
426
+ ]
427
+ },
428
+ {
429
+ "type": "error",
430
+ "name": "ArrayLengthMismatch",
431
+ "inputs": []
432
+ },
433
+ {
434
+ "type": "error",
435
+ "name": "ERC1967InvalidImplementation",
436
+ "inputs": [
437
+ {
438
+ "name": "implementation",
439
+ "type": "address",
440
+ "internalType": "address"
441
+ }
442
+ ]
443
+ },
444
+ {
445
+ "type": "error",
446
+ "name": "ERC1967NonPayable",
447
+ "inputs": []
448
+ },
449
+ {
450
+ "type": "error",
451
+ "name": "FailedCall",
452
+ "inputs": []
453
+ },
454
+ {
455
+ "type": "error",
456
+ "name": "InvalidBindingProof",
457
+ "inputs": []
458
+ },
459
+ {
460
+ "type": "error",
461
+ "name": "InvalidInitialization",
462
+ "inputs": []
463
+ },
464
+ {
465
+ "type": "error",
466
+ "name": "InvalidPolicy",
467
+ "inputs": []
468
+ },
469
+ {
470
+ "type": "error",
471
+ "name": "InvalidPolicyConfiguration",
472
+ "inputs": []
473
+ },
474
+ {
475
+ "type": "error",
476
+ "name": "NotInitializing",
477
+ "inputs": []
478
+ },
479
+ {
480
+ "type": "error",
481
+ "name": "OnlyEntryPoint",
482
+ "inputs": []
483
+ },
484
+ {
485
+ "type": "error",
486
+ "name": "OnlySelf",
487
+ "inputs": []
488
+ },
489
+ {
490
+ "type": "error",
491
+ "name": "UUPSUnauthorizedCallContext",
492
+ "inputs": []
493
+ },
494
+ {
495
+ "type": "error",
496
+ "name": "UUPSUnsupportedProxiableUUID",
497
+ "inputs": [
498
+ {
499
+ "name": "slot",
500
+ "type": "bytes32",
501
+ "internalType": "bytes32"
502
+ }
503
+ ]
504
+ }
505
+ ]