@lukso/lsp11-contracts 0.1.2

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/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # LSP11 Social Recovery
2
+
3
+ Package for the [LSP11 Social Recovery](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-11-BasicSocialRecovery.md) standard.
4
+
5
+ ## Installation
6
+
7
+ ```console
8
+ npm install @lukso/lsp11-contracts
9
+ ```
10
+
11
+ ## Available Constants & Types
12
+
13
+ The `@lukso/lsp11-contracts` npm package contains useful constants such as interface ID related to the LSP11 standard. You can import and access them as follows:
14
+
15
+ ```js
16
+ import { INTERFACE_ID_LSP11 } from "@lukso/lsp11-contracts";
17
+ ```
@@ -0,0 +1,670 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "ILSP11SocialRecovery",
4
+ "sourceName": "contracts/ILSP11SocialRecovery.sol",
5
+ "abi": [
6
+ {
7
+ "anonymous": false,
8
+ "inputs": [
9
+ {
10
+ "indexed": true,
11
+ "internalType": "address",
12
+ "name": "account",
13
+ "type": "address"
14
+ },
15
+ {
16
+ "indexed": true,
17
+ "internalType": "address",
18
+ "name": "guardian",
19
+ "type": "address"
20
+ }
21
+ ],
22
+ "name": "GuardianAdded",
23
+ "type": "event"
24
+ },
25
+ {
26
+ "anonymous": false,
27
+ "inputs": [
28
+ {
29
+ "indexed": true,
30
+ "internalType": "address",
31
+ "name": "account",
32
+ "type": "address"
33
+ },
34
+ {
35
+ "indexed": true,
36
+ "internalType": "address",
37
+ "name": "guardian",
38
+ "type": "address"
39
+ }
40
+ ],
41
+ "name": "GuardianRemoved",
42
+ "type": "event"
43
+ },
44
+ {
45
+ "anonymous": false,
46
+ "inputs": [
47
+ {
48
+ "indexed": true,
49
+ "internalType": "address",
50
+ "name": "account",
51
+ "type": "address"
52
+ },
53
+ {
54
+ "indexed": false,
55
+ "internalType": "uint256",
56
+ "name": "recoveryCounter",
57
+ "type": "uint256"
58
+ },
59
+ {
60
+ "indexed": true,
61
+ "internalType": "address",
62
+ "name": "guardian",
63
+ "type": "address"
64
+ },
65
+ {
66
+ "indexed": true,
67
+ "internalType": "address",
68
+ "name": "guardianVotedAddress",
69
+ "type": "address"
70
+ }
71
+ ],
72
+ "name": "GuardianVotedFor",
73
+ "type": "event"
74
+ },
75
+ {
76
+ "anonymous": false,
77
+ "inputs": [
78
+ {
79
+ "indexed": true,
80
+ "internalType": "address",
81
+ "name": "account",
82
+ "type": "address"
83
+ },
84
+ {
85
+ "indexed": true,
86
+ "internalType": "uint256",
87
+ "name": "guardianThreshold",
88
+ "type": "uint256"
89
+ }
90
+ ],
91
+ "name": "GuardiansThresholdChanged",
92
+ "type": "event"
93
+ },
94
+ {
95
+ "anonymous": false,
96
+ "inputs": [
97
+ {
98
+ "indexed": true,
99
+ "internalType": "address",
100
+ "name": "account",
101
+ "type": "address"
102
+ },
103
+ {
104
+ "indexed": true,
105
+ "internalType": "uint256",
106
+ "name": "previousRecoveryCounter",
107
+ "type": "uint256"
108
+ }
109
+ ],
110
+ "name": "RecoveryCancelled",
111
+ "type": "event"
112
+ },
113
+ {
114
+ "anonymous": false,
115
+ "inputs": [
116
+ {
117
+ "indexed": true,
118
+ "internalType": "address",
119
+ "name": "account",
120
+ "type": "address"
121
+ },
122
+ {
123
+ "indexed": true,
124
+ "internalType": "uint256",
125
+ "name": "recoveryDelay",
126
+ "type": "uint256"
127
+ }
128
+ ],
129
+ "name": "RecoveryDelayChanged",
130
+ "type": "event"
131
+ },
132
+ {
133
+ "anonymous": false,
134
+ "inputs": [
135
+ {
136
+ "indexed": true,
137
+ "internalType": "address",
138
+ "name": "account",
139
+ "type": "address"
140
+ },
141
+ {
142
+ "indexed": true,
143
+ "internalType": "uint256",
144
+ "name": "recoveryCounter",
145
+ "type": "uint256"
146
+ },
147
+ {
148
+ "indexed": true,
149
+ "internalType": "address",
150
+ "name": "guardianVotedAddress",
151
+ "type": "address"
152
+ },
153
+ {
154
+ "indexed": false,
155
+ "internalType": "bytes",
156
+ "name": "calldataExecuted",
157
+ "type": "bytes"
158
+ }
159
+ ],
160
+ "name": "RecoveryProcessSuccessful",
161
+ "type": "event"
162
+ },
163
+ {
164
+ "anonymous": false,
165
+ "inputs": [
166
+ {
167
+ "indexed": true,
168
+ "internalType": "address",
169
+ "name": "account",
170
+ "type": "address"
171
+ },
172
+ {
173
+ "indexed": true,
174
+ "internalType": "bytes32",
175
+ "name": "secretHash",
176
+ "type": "bytes32"
177
+ }
178
+ ],
179
+ "name": "SecretHashChanged",
180
+ "type": "event"
181
+ },
182
+ {
183
+ "anonymous": false,
184
+ "inputs": [
185
+ {
186
+ "indexed": true,
187
+ "internalType": "address",
188
+ "name": "account",
189
+ "type": "address"
190
+ },
191
+ {
192
+ "indexed": false,
193
+ "internalType": "uint256",
194
+ "name": "recoveryCounter",
195
+ "type": "uint256"
196
+ },
197
+ {
198
+ "indexed": true,
199
+ "internalType": "address",
200
+ "name": "committedBy",
201
+ "type": "address"
202
+ },
203
+ {
204
+ "indexed": true,
205
+ "internalType": "bytes32",
206
+ "name": "commitment",
207
+ "type": "bytes32"
208
+ }
209
+ ],
210
+ "name": "SecretHashCommitted",
211
+ "type": "event"
212
+ },
213
+ {
214
+ "inputs": [
215
+ {
216
+ "internalType": "address",
217
+ "name": "account",
218
+ "type": "address"
219
+ },
220
+ {
221
+ "internalType": "address",
222
+ "name": "newGuardian",
223
+ "type": "address"
224
+ }
225
+ ],
226
+ "name": "addGuardian",
227
+ "outputs": [],
228
+ "stateMutability": "nonpayable",
229
+ "type": "function"
230
+ },
231
+ {
232
+ "inputs": [
233
+ {
234
+ "internalType": "address",
235
+ "name": "account",
236
+ "type": "address"
237
+ }
238
+ ],
239
+ "name": "cancelRecoveryProcess",
240
+ "outputs": [],
241
+ "stateMutability": "nonpayable",
242
+ "type": "function"
243
+ },
244
+ {
245
+ "inputs": [
246
+ {
247
+ "internalType": "address",
248
+ "name": "account",
249
+ "type": "address"
250
+ },
251
+ {
252
+ "internalType": "address",
253
+ "name": "votedAddress",
254
+ "type": "address"
255
+ },
256
+ {
257
+ "internalType": "bytes32",
258
+ "name": "commitment",
259
+ "type": "bytes32"
260
+ }
261
+ ],
262
+ "name": "commitToRecover",
263
+ "outputs": [],
264
+ "stateMutability": "nonpayable",
265
+ "type": "function"
266
+ },
267
+ {
268
+ "inputs": [
269
+ {
270
+ "internalType": "address",
271
+ "name": "account",
272
+ "type": "address"
273
+ },
274
+ {
275
+ "internalType": "uint256",
276
+ "name": "recoveryCounter",
277
+ "type": "uint256"
278
+ },
279
+ {
280
+ "internalType": "address",
281
+ "name": "committedBy",
282
+ "type": "address"
283
+ }
284
+ ],
285
+ "name": "getCommitmentInfoOf",
286
+ "outputs": [
287
+ {
288
+ "internalType": "bytes32",
289
+ "name": "",
290
+ "type": "bytes32"
291
+ },
292
+ {
293
+ "internalType": "uint256",
294
+ "name": "",
295
+ "type": "uint256"
296
+ }
297
+ ],
298
+ "stateMutability": "view",
299
+ "type": "function"
300
+ },
301
+ {
302
+ "inputs": [
303
+ {
304
+ "internalType": "address",
305
+ "name": "account",
306
+ "type": "address"
307
+ },
308
+ {
309
+ "internalType": "uint256",
310
+ "name": "recoveryCounter",
311
+ "type": "uint256"
312
+ }
313
+ ],
314
+ "name": "getFirstRecoveryTimestampOf",
315
+ "outputs": [
316
+ {
317
+ "internalType": "uint256",
318
+ "name": "",
319
+ "type": "uint256"
320
+ }
321
+ ],
322
+ "stateMutability": "view",
323
+ "type": "function"
324
+ },
325
+ {
326
+ "inputs": [
327
+ {
328
+ "internalType": "address",
329
+ "name": "account",
330
+ "type": "address"
331
+ }
332
+ ],
333
+ "name": "getGuardiansOf",
334
+ "outputs": [
335
+ {
336
+ "internalType": "address[]",
337
+ "name": "",
338
+ "type": "address[]"
339
+ }
340
+ ],
341
+ "stateMutability": "view",
342
+ "type": "function"
343
+ },
344
+ {
345
+ "inputs": [
346
+ {
347
+ "internalType": "address",
348
+ "name": "account",
349
+ "type": "address"
350
+ }
351
+ ],
352
+ "name": "getGuardiansThresholdOf",
353
+ "outputs": [
354
+ {
355
+ "internalType": "uint256",
356
+ "name": "",
357
+ "type": "uint256"
358
+ }
359
+ ],
360
+ "stateMutability": "view",
361
+ "type": "function"
362
+ },
363
+ {
364
+ "inputs": [
365
+ {
366
+ "internalType": "address",
367
+ "name": "account",
368
+ "type": "address"
369
+ }
370
+ ],
371
+ "name": "getRecoveryCounterOf",
372
+ "outputs": [
373
+ {
374
+ "internalType": "uint256",
375
+ "name": "",
376
+ "type": "uint256"
377
+ }
378
+ ],
379
+ "stateMutability": "view",
380
+ "type": "function"
381
+ },
382
+ {
383
+ "inputs": [
384
+ {
385
+ "internalType": "address",
386
+ "name": "account",
387
+ "type": "address"
388
+ }
389
+ ],
390
+ "name": "getRecoveryDelayOf",
391
+ "outputs": [
392
+ {
393
+ "internalType": "uint256",
394
+ "name": "",
395
+ "type": "uint256"
396
+ }
397
+ ],
398
+ "stateMutability": "view",
399
+ "type": "function"
400
+ },
401
+ {
402
+ "inputs": [
403
+ {
404
+ "internalType": "address",
405
+ "name": "account",
406
+ "type": "address"
407
+ }
408
+ ],
409
+ "name": "getSecretHashOf",
410
+ "outputs": [
411
+ {
412
+ "internalType": "bytes32",
413
+ "name": "",
414
+ "type": "bytes32"
415
+ }
416
+ ],
417
+ "stateMutability": "view",
418
+ "type": "function"
419
+ },
420
+ {
421
+ "inputs": [
422
+ {
423
+ "internalType": "address",
424
+ "name": "account",
425
+ "type": "address"
426
+ },
427
+ {
428
+ "internalType": "uint256",
429
+ "name": "recoveryCounter",
430
+ "type": "uint256"
431
+ },
432
+ {
433
+ "internalType": "address",
434
+ "name": "guardian",
435
+ "type": "address"
436
+ }
437
+ ],
438
+ "name": "getVotedAddressByGuardian",
439
+ "outputs": [
440
+ {
441
+ "internalType": "address",
442
+ "name": "",
443
+ "type": "address"
444
+ }
445
+ ],
446
+ "stateMutability": "view",
447
+ "type": "function"
448
+ },
449
+ {
450
+ "inputs": [
451
+ {
452
+ "internalType": "address",
453
+ "name": "account",
454
+ "type": "address"
455
+ },
456
+ {
457
+ "internalType": "uint256",
458
+ "name": "recoveryCounter",
459
+ "type": "uint256"
460
+ },
461
+ {
462
+ "internalType": "address",
463
+ "name": "votedAddress",
464
+ "type": "address"
465
+ }
466
+ ],
467
+ "name": "getVotesOfGuardianVotedAddress",
468
+ "outputs": [
469
+ {
470
+ "internalType": "uint256",
471
+ "name": "",
472
+ "type": "uint256"
473
+ }
474
+ ],
475
+ "stateMutability": "view",
476
+ "type": "function"
477
+ },
478
+ {
479
+ "inputs": [
480
+ {
481
+ "internalType": "address",
482
+ "name": "account",
483
+ "type": "address"
484
+ },
485
+ {
486
+ "internalType": "uint256",
487
+ "name": "recoveryCounter",
488
+ "type": "uint256"
489
+ },
490
+ {
491
+ "internalType": "address",
492
+ "name": "votedAddress",
493
+ "type": "address"
494
+ }
495
+ ],
496
+ "name": "hasReachedThreshold",
497
+ "outputs": [
498
+ {
499
+ "internalType": "bool",
500
+ "name": "",
501
+ "type": "bool"
502
+ }
503
+ ],
504
+ "stateMutability": "view",
505
+ "type": "function"
506
+ },
507
+ {
508
+ "inputs": [
509
+ {
510
+ "internalType": "address",
511
+ "name": "account",
512
+ "type": "address"
513
+ },
514
+ {
515
+ "internalType": "address",
516
+ "name": "guardianAddress",
517
+ "type": "address"
518
+ }
519
+ ],
520
+ "name": "isGuardianOf",
521
+ "outputs": [
522
+ {
523
+ "internalType": "bool",
524
+ "name": "",
525
+ "type": "bool"
526
+ }
527
+ ],
528
+ "stateMutability": "view",
529
+ "type": "function"
530
+ },
531
+ {
532
+ "inputs": [
533
+ {
534
+ "internalType": "address",
535
+ "name": "votedAddress",
536
+ "type": "address"
537
+ },
538
+ {
539
+ "internalType": "address",
540
+ "name": "account",
541
+ "type": "address"
542
+ },
543
+ {
544
+ "internalType": "bytes32",
545
+ "name": "secretHash",
546
+ "type": "bytes32"
547
+ },
548
+ {
549
+ "internalType": "bytes32",
550
+ "name": "newSecretHash",
551
+ "type": "bytes32"
552
+ },
553
+ {
554
+ "internalType": "bytes",
555
+ "name": "calldataToExecute",
556
+ "type": "bytes"
557
+ }
558
+ ],
559
+ "name": "recoverAccess",
560
+ "outputs": [
561
+ {
562
+ "internalType": "bytes",
563
+ "name": "",
564
+ "type": "bytes"
565
+ }
566
+ ],
567
+ "stateMutability": "payable",
568
+ "type": "function"
569
+ },
570
+ {
571
+ "inputs": [
572
+ {
573
+ "internalType": "address",
574
+ "name": "account",
575
+ "type": "address"
576
+ },
577
+ {
578
+ "internalType": "address",
579
+ "name": "existingGuardian",
580
+ "type": "address"
581
+ }
582
+ ],
583
+ "name": "removeGuardian",
584
+ "outputs": [],
585
+ "stateMutability": "nonpayable",
586
+ "type": "function"
587
+ },
588
+ {
589
+ "inputs": [
590
+ {
591
+ "internalType": "address",
592
+ "name": "account",
593
+ "type": "address"
594
+ },
595
+ {
596
+ "internalType": "uint256",
597
+ "name": "newThreshold",
598
+ "type": "uint256"
599
+ }
600
+ ],
601
+ "name": "setGuardiansThreshold",
602
+ "outputs": [],
603
+ "stateMutability": "nonpayable",
604
+ "type": "function"
605
+ },
606
+ {
607
+ "inputs": [
608
+ {
609
+ "internalType": "address",
610
+ "name": "account",
611
+ "type": "address"
612
+ },
613
+ {
614
+ "internalType": "uint256",
615
+ "name": "recoveryDelay",
616
+ "type": "uint256"
617
+ }
618
+ ],
619
+ "name": "setRecoveryDelay",
620
+ "outputs": [],
621
+ "stateMutability": "nonpayable",
622
+ "type": "function"
623
+ },
624
+ {
625
+ "inputs": [
626
+ {
627
+ "internalType": "address",
628
+ "name": "account",
629
+ "type": "address"
630
+ },
631
+ {
632
+ "internalType": "bytes32",
633
+ "name": "newRecoverSecretHash",
634
+ "type": "bytes32"
635
+ }
636
+ ],
637
+ "name": "setRecoverySecretHash",
638
+ "outputs": [],
639
+ "stateMutability": "nonpayable",
640
+ "type": "function"
641
+ },
642
+ {
643
+ "inputs": [
644
+ {
645
+ "internalType": "address",
646
+ "name": "account",
647
+ "type": "address"
648
+ },
649
+ {
650
+ "internalType": "address",
651
+ "name": "guardian",
652
+ "type": "address"
653
+ },
654
+ {
655
+ "internalType": "address",
656
+ "name": "guardianVotedAddress",
657
+ "type": "address"
658
+ }
659
+ ],
660
+ "name": "voteForRecovery",
661
+ "outputs": [],
662
+ "stateMutability": "nonpayable",
663
+ "type": "function"
664
+ }
665
+ ],
666
+ "bytecode": "0x",
667
+ "deployedBytecode": "0x",
668
+ "linkReferences": {},
669
+ "deployedLinkReferences": {}
670
+ }