@kleo-protocol/kleo-sdk 0.1.0 → 0.1.1

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 (40) hide show
  1. package/README.md +4 -4
  2. package/dist/src/client.d.ts +1 -3
  3. package/dist/src/client.d.ts.map +1 -1
  4. package/dist/src/client.js +14 -44
  5. package/dist/src/client.js.map +1 -1
  6. package/dist/src/dedot.client.d.ts.map +1 -1
  7. package/dist/src/dedot.client.js +2 -1
  8. package/dist/src/dedot.client.js.map +1 -1
  9. package/dist/src/metadata/config.json +1080 -0
  10. package/dist/src/metadata/index.d.ts +1260 -0
  11. package/dist/src/metadata/index.d.ts.map +1 -0
  12. package/dist/src/metadata/index.js +21 -0
  13. package/dist/src/metadata/index.js.map +1 -0
  14. package/dist/src/metadata/lending_pool.json +1307 -0
  15. package/dist/src/metadata/reputation.json +1041 -0
  16. package/dist/src/metadata/vouch.json +1387 -0
  17. package/dist/src/services/lending.service.d.ts.map +1 -1
  18. package/dist/src/services/lending.service.js +2 -6
  19. package/dist/src/services/lending.service.js.map +1 -1
  20. package/dist/src/services/pool.service.d.ts.map +1 -1
  21. package/dist/src/services/pool.service.js +0 -3
  22. package/dist/src/services/pool.service.js.map +1 -1
  23. package/dist/src/services/profile.service.js +1 -1
  24. package/dist/src/services/profile.service.js.map +1 -1
  25. package/dist/src/services/reputation.service.d.ts.map +1 -1
  26. package/dist/src/services/reputation.service.js +6 -17
  27. package/dist/src/services/reputation.service.js.map +1 -1
  28. package/dist/src/services/vouch.service.d.ts.map +1 -1
  29. package/dist/src/services/vouch.service.js +2 -8
  30. package/dist/src/services/vouch.service.js.map +1 -1
  31. package/dist/src/supabase.client.d.ts +2 -2
  32. package/dist/src/supabase.client.d.ts.map +1 -1
  33. package/dist/src/supabase.client.js +8 -2
  34. package/dist/src/supabase.client.js.map +1 -1
  35. package/dist/src/utils/contract-helpers.d.ts +0 -6
  36. package/dist/src/utils/contract-helpers.d.ts.map +1 -1
  37. package/dist/src/utils/contract-helpers.js.map +1 -1
  38. package/dist/types/types.d.ts +2 -0
  39. package/dist/types/types.d.ts.map +1 -1
  40. package/package.json +10 -4
@@ -0,0 +1,1387 @@
1
+ {
2
+ "source": {
3
+ "hash": "0x0c724c575cbe8327e5c44e8296015852a6e4d1058036ffd27903df096bebefea",
4
+ "language": "ink! 6.0.0-beta.1",
5
+ "compiler": "rustc 1.91.1",
6
+ "build_info": {
7
+ "rust_toolchain": "stable-aarch64-apple-darwin",
8
+ "cargo_contract_version": "6.0.0-beta.1",
9
+ "build_mode": "Release"
10
+ }
11
+ },
12
+ "contract": {
13
+ "name": "vouch",
14
+ "version": "0.1.0",
15
+ "authors": [
16
+ "Fabian Sanchez <fabiansanchezd@outlook.com>"
17
+ ]
18
+ },
19
+ "image": null,
20
+ "version": 6,
21
+ "types": [
22
+ {
23
+ "id": 0,
24
+ "type": {
25
+ "path": [
26
+ "primitive_types",
27
+ "H160"
28
+ ],
29
+ "def": {
30
+ "composite": {
31
+ "fields": [
32
+ {
33
+ "type": 1,
34
+ "typeName": "[u8; 20]"
35
+ }
36
+ ]
37
+ }
38
+ }
39
+ }
40
+ },
41
+ {
42
+ "id": 1,
43
+ "type": {
44
+ "def": {
45
+ "array": {
46
+ "len": 20,
47
+ "type": 2
48
+ }
49
+ }
50
+ }
51
+ },
52
+ {
53
+ "id": 2,
54
+ "type": {
55
+ "def": {
56
+ "primitive": "u8"
57
+ }
58
+ }
59
+ },
60
+ {
61
+ "id": 3,
62
+ "type": {
63
+ "def": {
64
+ "primitive": "u32"
65
+ }
66
+ }
67
+ },
68
+ {
69
+ "id": 4,
70
+ "type": {
71
+ "def": {
72
+ "primitive": "u128"
73
+ }
74
+ }
75
+ },
76
+ {
77
+ "id": 5,
78
+ "type": {
79
+ "def": {
80
+ "primitive": "u64"
81
+ }
82
+ }
83
+ },
84
+ {
85
+ "id": 6,
86
+ "type": {
87
+ "path": [
88
+ "ink_storage",
89
+ "lazy",
90
+ "mapping",
91
+ "Mapping"
92
+ ],
93
+ "params": [
94
+ {
95
+ "name": "K",
96
+ "type": 7
97
+ },
98
+ {
99
+ "name": "V",
100
+ "type": 10
101
+ },
102
+ {
103
+ "name": "KeyType",
104
+ "type": 12
105
+ }
106
+ ],
107
+ "def": {
108
+ "composite": {}
109
+ }
110
+ }
111
+ },
112
+ {
113
+ "id": 7,
114
+ "type": {
115
+ "def": {
116
+ "tuple": [
117
+ 8,
118
+ 8
119
+ ]
120
+ }
121
+ }
122
+ },
123
+ {
124
+ "id": 8,
125
+ "type": {
126
+ "path": [
127
+ "ink_primitives",
128
+ "types",
129
+ "AccountId"
130
+ ],
131
+ "def": {
132
+ "composite": {
133
+ "fields": [
134
+ {
135
+ "type": 9,
136
+ "typeName": "[u8; 32]"
137
+ }
138
+ ]
139
+ }
140
+ }
141
+ }
142
+ },
143
+ {
144
+ "id": 9,
145
+ "type": {
146
+ "def": {
147
+ "array": {
148
+ "len": 32,
149
+ "type": 2
150
+ }
151
+ }
152
+ }
153
+ },
154
+ {
155
+ "id": 10,
156
+ "type": {
157
+ "path": [
158
+ "vouch",
159
+ "vouch",
160
+ "VouchRelationship"
161
+ ],
162
+ "def": {
163
+ "composite": {
164
+ "fields": [
165
+ {
166
+ "name": "staked_stars",
167
+ "type": 3,
168
+ "typeName": "u32"
169
+ },
170
+ {
171
+ "name": "staked_capital",
172
+ "type": 4,
173
+ "typeName": "Balance"
174
+ },
175
+ {
176
+ "name": "created_at",
177
+ "type": 5,
178
+ "typeName": "Timestamp"
179
+ },
180
+ {
181
+ "name": "status",
182
+ "type": 11,
183
+ "typeName": "Status"
184
+ }
185
+ ]
186
+ }
187
+ }
188
+ }
189
+ },
190
+ {
191
+ "id": 11,
192
+ "type": {
193
+ "path": [
194
+ "vouch",
195
+ "vouch",
196
+ "Status"
197
+ ],
198
+ "def": {
199
+ "variant": {
200
+ "variants": [
201
+ {
202
+ "name": "Active",
203
+ "index": 0
204
+ },
205
+ {
206
+ "name": "Fulfilled",
207
+ "index": 1
208
+ },
209
+ {
210
+ "name": "Defaulted",
211
+ "index": 2
212
+ }
213
+ ]
214
+ }
215
+ }
216
+ }
217
+ },
218
+ {
219
+ "id": 12,
220
+ "type": {
221
+ "path": [
222
+ "ink_storage_traits",
223
+ "impls",
224
+ "ResolverKey"
225
+ ],
226
+ "params": [
227
+ {
228
+ "name": "L",
229
+ "type": 13
230
+ },
231
+ {
232
+ "name": "R",
233
+ "type": 14
234
+ }
235
+ ],
236
+ "def": {
237
+ "composite": {}
238
+ }
239
+ }
240
+ },
241
+ {
242
+ "id": 13,
243
+ "type": {
244
+ "path": [
245
+ "ink_storage_traits",
246
+ "impls",
247
+ "AutoKey"
248
+ ],
249
+ "def": {
250
+ "composite": {}
251
+ }
252
+ }
253
+ },
254
+ {
255
+ "id": 14,
256
+ "type": {
257
+ "path": [
258
+ "ink_storage_traits",
259
+ "impls",
260
+ "ManualKey"
261
+ ],
262
+ "params": [
263
+ {
264
+ "name": "ParentKey",
265
+ "type": 15
266
+ }
267
+ ],
268
+ "def": {
269
+ "composite": {}
270
+ }
271
+ }
272
+ },
273
+ {
274
+ "id": 15,
275
+ "type": {
276
+ "def": {
277
+ "tuple": []
278
+ }
279
+ }
280
+ },
281
+ {
282
+ "id": 16,
283
+ "type": {
284
+ "path": [
285
+ "ink_storage",
286
+ "lazy",
287
+ "mapping",
288
+ "Mapping"
289
+ ],
290
+ "params": [
291
+ {
292
+ "name": "K",
293
+ "type": 8
294
+ },
295
+ {
296
+ "name": "V",
297
+ "type": 4
298
+ },
299
+ {
300
+ "name": "KeyType",
301
+ "type": 17
302
+ }
303
+ ],
304
+ "def": {
305
+ "composite": {}
306
+ }
307
+ }
308
+ },
309
+ {
310
+ "id": 17,
311
+ "type": {
312
+ "path": [
313
+ "ink_storage_traits",
314
+ "impls",
315
+ "ResolverKey"
316
+ ],
317
+ "params": [
318
+ {
319
+ "name": "L",
320
+ "type": 13
321
+ },
322
+ {
323
+ "name": "R",
324
+ "type": 18
325
+ }
326
+ ],
327
+ "def": {
328
+ "composite": {}
329
+ }
330
+ }
331
+ },
332
+ {
333
+ "id": 18,
334
+ "type": {
335
+ "path": [
336
+ "ink_storage_traits",
337
+ "impls",
338
+ "ManualKey"
339
+ ],
340
+ "params": [
341
+ {
342
+ "name": "ParentKey",
343
+ "type": 15
344
+ }
345
+ ],
346
+ "def": {
347
+ "composite": {}
348
+ }
349
+ }
350
+ },
351
+ {
352
+ "id": 19,
353
+ "type": {
354
+ "def": {
355
+ "sequence": {
356
+ "type": 8
357
+ }
358
+ }
359
+ }
360
+ },
361
+ {
362
+ "id": 20,
363
+ "type": {
364
+ "path": [
365
+ "ink_storage",
366
+ "lazy",
367
+ "mapping",
368
+ "Mapping"
369
+ ],
370
+ "params": [
371
+ {
372
+ "name": "K",
373
+ "type": 8
374
+ },
375
+ {
376
+ "name": "V",
377
+ "type": 19
378
+ },
379
+ {
380
+ "name": "KeyType",
381
+ "type": 21
382
+ }
383
+ ],
384
+ "def": {
385
+ "composite": {}
386
+ }
387
+ }
388
+ },
389
+ {
390
+ "id": 21,
391
+ "type": {
392
+ "path": [
393
+ "ink_storage_traits",
394
+ "impls",
395
+ "ResolverKey"
396
+ ],
397
+ "params": [
398
+ {
399
+ "name": "L",
400
+ "type": 13
401
+ },
402
+ {
403
+ "name": "R",
404
+ "type": 22
405
+ }
406
+ ],
407
+ "def": {
408
+ "composite": {}
409
+ }
410
+ }
411
+ },
412
+ {
413
+ "id": 22,
414
+ "type": {
415
+ "path": [
416
+ "ink_storage_traits",
417
+ "impls",
418
+ "ManualKey"
419
+ ],
420
+ "params": [
421
+ {
422
+ "name": "ParentKey",
423
+ "type": 15
424
+ }
425
+ ],
426
+ "def": {
427
+ "composite": {}
428
+ }
429
+ }
430
+ },
431
+ {
432
+ "id": 23,
433
+ "type": {
434
+ "path": [
435
+ "vouch",
436
+ "vouch",
437
+ "Vouch"
438
+ ],
439
+ "def": {
440
+ "composite": {
441
+ "fields": [
442
+ {
443
+ "name": "config",
444
+ "type": 0,
445
+ "typeName": "<ConfigRef as::ink::storage::traits::AutoStorableHint<::ink::\nstorage::traits::ManualKey<2811548581u32, ()>,>>::Type"
446
+ },
447
+ {
448
+ "name": "reputation",
449
+ "type": 0,
450
+ "typeName": "<ReputationRef as::ink::storage::traits::AutoStorableHint<::ink::\nstorage::traits::ManualKey<2861671447u32, ()>,>>::Type"
451
+ },
452
+ {
453
+ "name": "lending_pool",
454
+ "type": 0,
455
+ "typeName": "<LendingPoolRef as::ink::storage::traits::AutoStorableHint<::ink\n::storage::traits::ManualKey<3916958126u32, ()>,>>::Type"
456
+ },
457
+ {
458
+ "name": "relationships",
459
+ "type": 6,
460
+ "typeName": "<Mapping<(AccountId, AccountId), VouchRelationship> as::ink::storage\n::traits::AutoStorableHint<::ink::storage::traits::ManualKey<\n730199184u32, ()>,>>::Type"
461
+ },
462
+ {
463
+ "name": "borrower_exposure",
464
+ "type": 16,
465
+ "typeName": "<Mapping<AccountId, Balance> as::ink::storage::traits::\nAutoStorableHint<::ink::storage::traits::ManualKey<1805066752u32,\n()>,>>::Type"
466
+ },
467
+ {
468
+ "name": "borrower_vouchers",
469
+ "type": 20,
470
+ "typeName": "<Mapping<AccountId, Vec<AccountId>> as::ink::storage::traits::\nAutoStorableHint<::ink::storage::traits::ManualKey<2691588196u32,\n()>,>>::Type"
471
+ }
472
+ ]
473
+ }
474
+ }
475
+ }
476
+ },
477
+ {
478
+ "id": 24,
479
+ "type": {
480
+ "path": [
481
+ "Result"
482
+ ],
483
+ "params": [
484
+ {
485
+ "name": "T",
486
+ "type": 15
487
+ },
488
+ {
489
+ "name": "E",
490
+ "type": 25
491
+ }
492
+ ],
493
+ "def": {
494
+ "variant": {
495
+ "variants": [
496
+ {
497
+ "name": "Ok",
498
+ "fields": [
499
+ {
500
+ "type": 15
501
+ }
502
+ ],
503
+ "index": 0
504
+ },
505
+ {
506
+ "name": "Err",
507
+ "fields": [
508
+ {
509
+ "type": 25
510
+ }
511
+ ],
512
+ "index": 1
513
+ }
514
+ ]
515
+ }
516
+ }
517
+ }
518
+ },
519
+ {
520
+ "id": 25,
521
+ "type": {
522
+ "path": [
523
+ "ink_primitives",
524
+ "LangError"
525
+ ],
526
+ "def": {
527
+ "variant": {
528
+ "variants": [
529
+ {
530
+ "name": "CouldNotReadInput",
531
+ "index": 1
532
+ }
533
+ ]
534
+ }
535
+ }
536
+ }
537
+ },
538
+ {
539
+ "id": 26,
540
+ "type": {
541
+ "path": [
542
+ "Result"
543
+ ],
544
+ "params": [
545
+ {
546
+ "name": "T",
547
+ "type": 27
548
+ },
549
+ {
550
+ "name": "E",
551
+ "type": 25
552
+ }
553
+ ],
554
+ "def": {
555
+ "variant": {
556
+ "variants": [
557
+ {
558
+ "name": "Ok",
559
+ "fields": [
560
+ {
561
+ "type": 27
562
+ }
563
+ ],
564
+ "index": 0
565
+ },
566
+ {
567
+ "name": "Err",
568
+ "fields": [
569
+ {
570
+ "type": 25
571
+ }
572
+ ],
573
+ "index": 1
574
+ }
575
+ ]
576
+ }
577
+ }
578
+ }
579
+ },
580
+ {
581
+ "id": 27,
582
+ "type": {
583
+ "path": [
584
+ "Result"
585
+ ],
586
+ "params": [
587
+ {
588
+ "name": "T",
589
+ "type": 15
590
+ },
591
+ {
592
+ "name": "E",
593
+ "type": 28
594
+ }
595
+ ],
596
+ "def": {
597
+ "variant": {
598
+ "variants": [
599
+ {
600
+ "name": "Ok",
601
+ "fields": [
602
+ {
603
+ "type": 15
604
+ }
605
+ ],
606
+ "index": 0
607
+ },
608
+ {
609
+ "name": "Err",
610
+ "fields": [
611
+ {
612
+ "type": 28
613
+ }
614
+ ],
615
+ "index": 1
616
+ }
617
+ ]
618
+ }
619
+ }
620
+ }
621
+ },
622
+ {
623
+ "id": 28,
624
+ "type": {
625
+ "path": [
626
+ "vouch",
627
+ "vouch",
628
+ "Error"
629
+ ],
630
+ "def": {
631
+ "variant": {
632
+ "variants": [
633
+ {
634
+ "name": "NotEnoughStars",
635
+ "index": 0
636
+ },
637
+ {
638
+ "name": "NotEnoughCapital",
639
+ "index": 1
640
+ },
641
+ {
642
+ "name": "UnableToVouch",
643
+ "index": 2
644
+ },
645
+ {
646
+ "name": "ZeroAmount",
647
+ "index": 3
648
+ },
649
+ {
650
+ "name": "ExposureCapExceeded",
651
+ "index": 4
652
+ },
653
+ {
654
+ "name": "AlreadyResolved",
655
+ "index": 5
656
+ },
657
+ {
658
+ "name": "RelationshipNotFound",
659
+ "index": 6
660
+ }
661
+ ]
662
+ }
663
+ }
664
+ }
665
+ },
666
+ {
667
+ "id": 29,
668
+ "type": {
669
+ "path": [
670
+ "Result"
671
+ ],
672
+ "params": [
673
+ {
674
+ "name": "T",
675
+ "type": 3
676
+ },
677
+ {
678
+ "name": "E",
679
+ "type": 25
680
+ }
681
+ ],
682
+ "def": {
683
+ "variant": {
684
+ "variants": [
685
+ {
686
+ "name": "Ok",
687
+ "fields": [
688
+ {
689
+ "type": 3
690
+ }
691
+ ],
692
+ "index": 0
693
+ },
694
+ {
695
+ "name": "Err",
696
+ "fields": [
697
+ {
698
+ "type": 25
699
+ }
700
+ ],
701
+ "index": 1
702
+ }
703
+ ]
704
+ }
705
+ }
706
+ }
707
+ },
708
+ {
709
+ "id": 30,
710
+ "type": {
711
+ "path": [
712
+ "Result"
713
+ ],
714
+ "params": [
715
+ {
716
+ "name": "T",
717
+ "type": 19
718
+ },
719
+ {
720
+ "name": "E",
721
+ "type": 25
722
+ }
723
+ ],
724
+ "def": {
725
+ "variant": {
726
+ "variants": [
727
+ {
728
+ "name": "Ok",
729
+ "fields": [
730
+ {
731
+ "type": 19
732
+ }
733
+ ],
734
+ "index": 0
735
+ },
736
+ {
737
+ "name": "Err",
738
+ "fields": [
739
+ {
740
+ "type": 25
741
+ }
742
+ ],
743
+ "index": 1
744
+ }
745
+ ]
746
+ }
747
+ }
748
+ }
749
+ },
750
+ {
751
+ "id": 31,
752
+ "type": {
753
+ "def": {
754
+ "primitive": "bool"
755
+ }
756
+ }
757
+ },
758
+ {
759
+ "id": 32,
760
+ "type": {
761
+ "path": [
762
+ "ink_primitives",
763
+ "types",
764
+ "Hash"
765
+ ],
766
+ "def": {
767
+ "composite": {
768
+ "fields": [
769
+ {
770
+ "type": 9,
771
+ "typeName": "[u8; 32]"
772
+ }
773
+ ]
774
+ }
775
+ }
776
+ }
777
+ }
778
+ ],
779
+ "storage": {
780
+ "root": {
781
+ "root_key": "0x00000000",
782
+ "layout": {
783
+ "struct": {
784
+ "name": "Vouch",
785
+ "fields": [
786
+ {
787
+ "name": "config",
788
+ "layout": {
789
+ "struct": {
790
+ "name": "ConfigRefFor",
791
+ "fields": [
792
+ {
793
+ "name": "inner",
794
+ "layout": {
795
+ "struct": {
796
+ "name": "CallBuilder",
797
+ "fields": [
798
+ {
799
+ "name": "addr",
800
+ "layout": {
801
+ "leaf": {
802
+ "key": "0x00000000",
803
+ "ty": 0
804
+ }
805
+ }
806
+ }
807
+ ]
808
+ }
809
+ }
810
+ }
811
+ ]
812
+ }
813
+ }
814
+ },
815
+ {
816
+ "name": "reputation",
817
+ "layout": {
818
+ "struct": {
819
+ "name": "ReputationRefFor",
820
+ "fields": [
821
+ {
822
+ "name": "inner",
823
+ "layout": {
824
+ "struct": {
825
+ "name": "CallBuilder",
826
+ "fields": [
827
+ {
828
+ "name": "addr",
829
+ "layout": {
830
+ "leaf": {
831
+ "key": "0x00000000",
832
+ "ty": 0
833
+ }
834
+ }
835
+ }
836
+ ]
837
+ }
838
+ }
839
+ }
840
+ ]
841
+ }
842
+ }
843
+ },
844
+ {
845
+ "name": "lending_pool",
846
+ "layout": {
847
+ "struct": {
848
+ "name": "LendingPoolRefFor",
849
+ "fields": [
850
+ {
851
+ "name": "inner",
852
+ "layout": {
853
+ "struct": {
854
+ "name": "CallBuilder",
855
+ "fields": [
856
+ {
857
+ "name": "addr",
858
+ "layout": {
859
+ "leaf": {
860
+ "key": "0x00000000",
861
+ "ty": 0
862
+ }
863
+ }
864
+ }
865
+ ]
866
+ }
867
+ }
868
+ }
869
+ ]
870
+ }
871
+ }
872
+ },
873
+ {
874
+ "name": "relationships",
875
+ "layout": {
876
+ "root": {
877
+ "root_key": "0x90f4852b",
878
+ "layout": {
879
+ "struct": {
880
+ "name": "VouchRelationship",
881
+ "fields": [
882
+ {
883
+ "name": "staked_stars",
884
+ "layout": {
885
+ "leaf": {
886
+ "key": "0x90f4852b",
887
+ "ty": 3
888
+ }
889
+ }
890
+ },
891
+ {
892
+ "name": "staked_capital",
893
+ "layout": {
894
+ "leaf": {
895
+ "key": "0x90f4852b",
896
+ "ty": 4
897
+ }
898
+ }
899
+ },
900
+ {
901
+ "name": "created_at",
902
+ "layout": {
903
+ "leaf": {
904
+ "key": "0x90f4852b",
905
+ "ty": 5
906
+ }
907
+ }
908
+ },
909
+ {
910
+ "name": "status",
911
+ "layout": {
912
+ "enum": {
913
+ "name": "Status",
914
+ "dispatchKey": "0x90f4852b",
915
+ "variants": {
916
+ "0": {
917
+ "name": "Active",
918
+ "fields": []
919
+ },
920
+ "1": {
921
+ "name": "Fulfilled",
922
+ "fields": []
923
+ },
924
+ "2": {
925
+ "name": "Defaulted",
926
+ "fields": []
927
+ }
928
+ }
929
+ }
930
+ }
931
+ }
932
+ ]
933
+ }
934
+ },
935
+ "ty": 6
936
+ }
937
+ }
938
+ },
939
+ {
940
+ "name": "borrower_exposure",
941
+ "layout": {
942
+ "root": {
943
+ "root_key": "0x0022976b",
944
+ "layout": {
945
+ "leaf": {
946
+ "key": "0x0022976b",
947
+ "ty": 4
948
+ }
949
+ },
950
+ "ty": 16
951
+ }
952
+ }
953
+ },
954
+ {
955
+ "name": "borrower_vouchers",
956
+ "layout": {
957
+ "root": {
958
+ "root_key": "0x64606ea0",
959
+ "layout": {
960
+ "leaf": {
961
+ "key": "0x64606ea0",
962
+ "ty": 19
963
+ }
964
+ },
965
+ "ty": 20
966
+ }
967
+ }
968
+ }
969
+ ]
970
+ }
971
+ },
972
+ "ty": 23
973
+ }
974
+ },
975
+ "spec": {
976
+ "constructors": [
977
+ {
978
+ "label": "new",
979
+ "selector": "0x9bae9d5e",
980
+ "payable": false,
981
+ "args": [
982
+ {
983
+ "label": "config_address",
984
+ "type": {
985
+ "type": 0,
986
+ "displayName": [
987
+ "Address"
988
+ ]
989
+ }
990
+ },
991
+ {
992
+ "label": "reputation_address",
993
+ "type": {
994
+ "type": 0,
995
+ "displayName": [
996
+ "Address"
997
+ ]
998
+ }
999
+ },
1000
+ {
1001
+ "label": "lending_pool_address",
1002
+ "type": {
1003
+ "type": 0,
1004
+ "displayName": [
1005
+ "Address"
1006
+ ]
1007
+ }
1008
+ }
1009
+ ],
1010
+ "returnType": {
1011
+ "type": 24,
1012
+ "displayName": [
1013
+ "ink_primitives",
1014
+ "ConstructorResult"
1015
+ ]
1016
+ },
1017
+ "docs": [],
1018
+ "default": false
1019
+ }
1020
+ ],
1021
+ "messages": [
1022
+ {
1023
+ "label": "vouch_for",
1024
+ "selector": "0x42299f24",
1025
+ "mutates": true,
1026
+ "payable": false,
1027
+ "args": [
1028
+ {
1029
+ "label": "borrower",
1030
+ "type": {
1031
+ "type": 8,
1032
+ "displayName": [
1033
+ "AccountId"
1034
+ ]
1035
+ }
1036
+ },
1037
+ {
1038
+ "label": "stars",
1039
+ "type": {
1040
+ "type": 3,
1041
+ "displayName": [
1042
+ "u32"
1043
+ ]
1044
+ }
1045
+ },
1046
+ {
1047
+ "label": "capital_percent",
1048
+ "type": {
1049
+ "type": 2,
1050
+ "displayName": [
1051
+ "u8"
1052
+ ]
1053
+ }
1054
+ }
1055
+ ],
1056
+ "returnType": {
1057
+ "type": 26,
1058
+ "displayName": [
1059
+ "ink",
1060
+ "MessageResult"
1061
+ ]
1062
+ },
1063
+ "docs": [
1064
+ " Vouch for a borrower by staking stars and capital"
1065
+ ],
1066
+ "default": false
1067
+ },
1068
+ {
1069
+ "label": "get_vouches_for",
1070
+ "selector": "0x479d9ad6",
1071
+ "mutates": false,
1072
+ "payable": false,
1073
+ "args": [
1074
+ {
1075
+ "label": "borrower",
1076
+ "type": {
1077
+ "type": 8,
1078
+ "displayName": [
1079
+ "AccountId"
1080
+ ]
1081
+ }
1082
+ }
1083
+ ],
1084
+ "returnType": {
1085
+ "type": 29,
1086
+ "displayName": [
1087
+ "ink",
1088
+ "MessageResult"
1089
+ ]
1090
+ },
1091
+ "docs": [
1092
+ " Get count of active vouches for a borrower"
1093
+ ],
1094
+ "default": false
1095
+ },
1096
+ {
1097
+ "label": "get_all_vouchers",
1098
+ "selector": "0x964f1124",
1099
+ "mutates": false,
1100
+ "payable": false,
1101
+ "args": [
1102
+ {
1103
+ "label": "borrower",
1104
+ "type": {
1105
+ "type": 8,
1106
+ "displayName": [
1107
+ "AccountId"
1108
+ ]
1109
+ }
1110
+ }
1111
+ ],
1112
+ "returnType": {
1113
+ "type": 30,
1114
+ "displayName": [
1115
+ "ink",
1116
+ "MessageResult"
1117
+ ]
1118
+ },
1119
+ "docs": [
1120
+ " Get all voucher addresses for a borrower"
1121
+ ],
1122
+ "default": false
1123
+ },
1124
+ {
1125
+ "label": "resolve_all",
1126
+ "selector": "0x11b5e79c",
1127
+ "mutates": true,
1128
+ "payable": false,
1129
+ "args": [
1130
+ {
1131
+ "label": "borrower",
1132
+ "type": {
1133
+ "type": 8,
1134
+ "displayName": [
1135
+ "AccountId"
1136
+ ]
1137
+ }
1138
+ },
1139
+ {
1140
+ "label": "success",
1141
+ "type": {
1142
+ "type": 31,
1143
+ "displayName": [
1144
+ "bool"
1145
+ ]
1146
+ }
1147
+ }
1148
+ ],
1149
+ "returnType": {
1150
+ "type": 26,
1151
+ "displayName": [
1152
+ "ink",
1153
+ "MessageResult"
1154
+ ]
1155
+ },
1156
+ "docs": [
1157
+ " Resolve all vouch relationships for a borrower upon loan completion"
1158
+ ],
1159
+ "default": false
1160
+ }
1161
+ ],
1162
+ "events": [
1163
+ {
1164
+ "label": "RepaymentReceived",
1165
+ "module_path": "lending_pool::lending_pool",
1166
+ "signature_topic": "0x654b646a1cd4aa283b63883350204bf2108d445e09b97e4ff732aecd8fb07d2b",
1167
+ "args": [
1168
+ {
1169
+ "label": "amount",
1170
+ "indexed": false,
1171
+ "type": {
1172
+ "type": 4,
1173
+ "displayName": [
1174
+ "Balance"
1175
+ ]
1176
+ },
1177
+ "docs": []
1178
+ }
1179
+ ],
1180
+ "docs": []
1181
+ },
1182
+ {
1183
+ "label": "Deposit",
1184
+ "module_path": "lending_pool::lending_pool",
1185
+ "signature_topic": "0xcec721a438a262e1d7866c1b39464ad44a551ab736f11d09127d0b9ac849a16b",
1186
+ "args": [
1187
+ {
1188
+ "label": "depositor",
1189
+ "indexed": false,
1190
+ "type": {
1191
+ "type": 8,
1192
+ "displayName": [
1193
+ "AccountId"
1194
+ ]
1195
+ },
1196
+ "docs": []
1197
+ },
1198
+ {
1199
+ "label": "amount",
1200
+ "indexed": false,
1201
+ "type": {
1202
+ "type": 4,
1203
+ "displayName": [
1204
+ "Balance"
1205
+ ]
1206
+ },
1207
+ "docs": []
1208
+ }
1209
+ ],
1210
+ "docs": [
1211
+ "Events for lending pool actions"
1212
+ ]
1213
+ },
1214
+ {
1215
+ "label": "Withdraw",
1216
+ "module_path": "lending_pool::lending_pool",
1217
+ "signature_topic": "0x246a5b254e2e059ff24e5b754b864041f6e1a0fecc5946a65c1aa051cf8c0148",
1218
+ "args": [
1219
+ {
1220
+ "label": "withdrawer",
1221
+ "indexed": false,
1222
+ "type": {
1223
+ "type": 8,
1224
+ "displayName": [
1225
+ "AccountId"
1226
+ ]
1227
+ },
1228
+ "docs": []
1229
+ },
1230
+ {
1231
+ "label": "amount",
1232
+ "indexed": false,
1233
+ "type": {
1234
+ "type": 4,
1235
+ "displayName": [
1236
+ "Balance"
1237
+ ]
1238
+ },
1239
+ "docs": []
1240
+ }
1241
+ ],
1242
+ "docs": []
1243
+ },
1244
+ {
1245
+ "label": "VouchCreated",
1246
+ "module_path": "vouch::vouch",
1247
+ "signature_topic": "0x09139a0968715659f89ce1d5c3f3fa35aa3a61c99017f50d3533927b25d0c896",
1248
+ "args": [
1249
+ {
1250
+ "label": "voucher",
1251
+ "indexed": false,
1252
+ "type": {
1253
+ "type": 8,
1254
+ "displayName": [
1255
+ "AccountId"
1256
+ ]
1257
+ },
1258
+ "docs": []
1259
+ },
1260
+ {
1261
+ "label": "borrower",
1262
+ "indexed": false,
1263
+ "type": {
1264
+ "type": 8,
1265
+ "displayName": [
1266
+ "AccountId"
1267
+ ]
1268
+ },
1269
+ "docs": []
1270
+ },
1271
+ {
1272
+ "label": "stars",
1273
+ "indexed": false,
1274
+ "type": {
1275
+ "type": 3,
1276
+ "displayName": [
1277
+ "u32"
1278
+ ]
1279
+ },
1280
+ "docs": []
1281
+ },
1282
+ {
1283
+ "label": "capital",
1284
+ "indexed": false,
1285
+ "type": {
1286
+ "type": 4,
1287
+ "displayName": [
1288
+ "Balance"
1289
+ ]
1290
+ },
1291
+ "docs": []
1292
+ }
1293
+ ],
1294
+ "docs": [
1295
+ "Events for the vouch contract"
1296
+ ]
1297
+ },
1298
+ {
1299
+ "label": "VouchResolved",
1300
+ "module_path": "vouch::vouch",
1301
+ "signature_topic": "0x007b299ae7219755ab93f6b2ac0aeaf19698ae184d39f228e0e17156fa317cda",
1302
+ "args": [
1303
+ {
1304
+ "label": "voucher",
1305
+ "indexed": false,
1306
+ "type": {
1307
+ "type": 8,
1308
+ "displayName": [
1309
+ "AccountId"
1310
+ ]
1311
+ },
1312
+ "docs": []
1313
+ },
1314
+ {
1315
+ "label": "borrower",
1316
+ "indexed": false,
1317
+ "type": {
1318
+ "type": 8,
1319
+ "displayName": [
1320
+ "AccountId"
1321
+ ]
1322
+ },
1323
+ "docs": []
1324
+ },
1325
+ {
1326
+ "label": "success",
1327
+ "indexed": false,
1328
+ "type": {
1329
+ "type": 31,
1330
+ "displayName": [
1331
+ "bool"
1332
+ ]
1333
+ },
1334
+ "docs": []
1335
+ }
1336
+ ],
1337
+ "docs": []
1338
+ }
1339
+ ],
1340
+ "docs": [
1341
+ " This contract manages vouch relationships between users"
1342
+ ],
1343
+ "lang_error": {
1344
+ "type": 25,
1345
+ "displayName": [
1346
+ "ink",
1347
+ "LangError"
1348
+ ]
1349
+ },
1350
+ "environment": {
1351
+ "accountId": {
1352
+ "type": 8,
1353
+ "displayName": [
1354
+ "AccountId"
1355
+ ]
1356
+ },
1357
+ "balance": {
1358
+ "type": 4,
1359
+ "displayName": [
1360
+ "Balance"
1361
+ ]
1362
+ },
1363
+ "hash": {
1364
+ "type": 32,
1365
+ "displayName": [
1366
+ "Hash"
1367
+ ]
1368
+ },
1369
+ "timestamp": {
1370
+ "type": 5,
1371
+ "displayName": [
1372
+ "Timestamp"
1373
+ ]
1374
+ },
1375
+ "blockNumber": {
1376
+ "type": 3,
1377
+ "displayName": [
1378
+ "BlockNumber"
1379
+ ]
1380
+ },
1381
+ "nativeToEthRatio": 100000000,
1382
+ "trustBackedAssetsPrecompileIndex": 288,
1383
+ "poolAssetsPrecompileIndex": 800,
1384
+ "staticBufferSize": 16384
1385
+ }
1386
+ }
1387
+ }