@fepvenancio/stela-sdk 0.8.0 → 0.9.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.
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
- "version": "0.8.0",
10
+ "version": "0.9.0",
11
11
  "description": "TypeScript SDK for the Stela P2P lending protocol on StarkNet",
12
12
  "type": "module",
13
13
  "main": "./dist/index.cjs",
@@ -289,6 +289,210 @@
289
289
  {
290
290
  "name": "collateral_asset_count",
291
291
  "type": "core::integer::u32"
292
+ },
293
+ {
294
+ "name": "auction_started",
295
+ "type": "core::bool"
296
+ },
297
+ {
298
+ "name": "auction_start_time",
299
+ "type": "core::integer::u64"
300
+ }
301
+ ]
302
+ },
303
+ {
304
+ "type": "struct",
305
+ "name": "stela::snip12::CollectionLendOffer",
306
+ "members": [
307
+ {
308
+ "name": "lender",
309
+ "type": "core::starknet::contract_address::ContractAddress"
310
+ },
311
+ {
312
+ "name": "debt_hash",
313
+ "type": "core::felt252"
314
+ },
315
+ {
316
+ "name": "interest_hash",
317
+ "type": "core::felt252"
318
+ },
319
+ {
320
+ "name": "debt_count",
321
+ "type": "core::integer::u32"
322
+ },
323
+ {
324
+ "name": "interest_count",
325
+ "type": "core::integer::u32"
326
+ },
327
+ {
328
+ "name": "collection_address",
329
+ "type": "core::starknet::contract_address::ContractAddress"
330
+ },
331
+ {
332
+ "name": "duration",
333
+ "type": "core::integer::u64"
334
+ },
335
+ {
336
+ "name": "deadline",
337
+ "type": "core::integer::u64"
338
+ },
339
+ {
340
+ "name": "nonce",
341
+ "type": "core::felt252"
342
+ }
343
+ ]
344
+ },
345
+ {
346
+ "type": "struct",
347
+ "name": "stela::snip12::CollectionBorrowAcceptance",
348
+ "members": [
349
+ {
350
+ "name": "offer_hash",
351
+ "type": "core::felt252"
352
+ },
353
+ {
354
+ "name": "borrower",
355
+ "type": "core::starknet::contract_address::ContractAddress"
356
+ },
357
+ {
358
+ "name": "token_id",
359
+ "type": "core::integer::u256"
360
+ },
361
+ {
362
+ "name": "nonce",
363
+ "type": "core::felt252"
364
+ }
365
+ ]
366
+ },
367
+ {
368
+ "type": "struct",
369
+ "name": "stela::snip12::RenegotiationProposal",
370
+ "members": [
371
+ {
372
+ "name": "inscription_id",
373
+ "type": "core::integer::u256"
374
+ },
375
+ {
376
+ "name": "proposer",
377
+ "type": "core::starknet::contract_address::ContractAddress"
378
+ },
379
+ {
380
+ "name": "new_duration",
381
+ "type": "core::integer::u64"
382
+ },
383
+ {
384
+ "name": "new_interest_hash",
385
+ "type": "core::felt252"
386
+ },
387
+ {
388
+ "name": "new_interest_count",
389
+ "type": "core::integer::u32"
390
+ },
391
+ {
392
+ "name": "proposal_deadline",
393
+ "type": "core::integer::u64"
394
+ },
395
+ {
396
+ "name": "nonce",
397
+ "type": "core::felt252"
398
+ }
399
+ ]
400
+ },
401
+ {
402
+ "type": "struct",
403
+ "name": "stela::snip12::CollateralSaleOffer",
404
+ "members": [
405
+ {
406
+ "name": "inscription_id",
407
+ "type": "core::integer::u256"
408
+ },
409
+ {
410
+ "name": "borrower",
411
+ "type": "core::starknet::contract_address::ContractAddress"
412
+ },
413
+ {
414
+ "name": "min_price",
415
+ "type": "core::integer::u256"
416
+ },
417
+ {
418
+ "name": "payment_token",
419
+ "type": "core::starknet::contract_address::ContractAddress"
420
+ },
421
+ {
422
+ "name": "allowed_buyer",
423
+ "type": "core::starknet::contract_address::ContractAddress"
424
+ },
425
+ {
426
+ "name": "deadline",
427
+ "type": "core::integer::u64"
428
+ },
429
+ {
430
+ "name": "nonce",
431
+ "type": "core::felt252"
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ "type": "struct",
437
+ "name": "stela::snip12::RefinanceOffer",
438
+ "members": [
439
+ {
440
+ "name": "inscription_id",
441
+ "type": "core::integer::u256"
442
+ },
443
+ {
444
+ "name": "new_lender",
445
+ "type": "core::starknet::contract_address::ContractAddress"
446
+ },
447
+ {
448
+ "name": "new_debt_hash",
449
+ "type": "core::felt252"
450
+ },
451
+ {
452
+ "name": "new_interest_hash",
453
+ "type": "core::felt252"
454
+ },
455
+ {
456
+ "name": "new_debt_count",
457
+ "type": "core::integer::u32"
458
+ },
459
+ {
460
+ "name": "new_interest_count",
461
+ "type": "core::integer::u32"
462
+ },
463
+ {
464
+ "name": "new_duration",
465
+ "type": "core::integer::u64"
466
+ },
467
+ {
468
+ "name": "deadline",
469
+ "type": "core::integer::u64"
470
+ },
471
+ {
472
+ "name": "nonce",
473
+ "type": "core::felt252"
474
+ }
475
+ ]
476
+ },
477
+ {
478
+ "type": "struct",
479
+ "name": "stela::snip12::RefinanceApproval",
480
+ "members": [
481
+ {
482
+ "name": "inscription_id",
483
+ "type": "core::integer::u256"
484
+ },
485
+ {
486
+ "name": "offer_hash",
487
+ "type": "core::felt252"
488
+ },
489
+ {
490
+ "name": "borrower",
491
+ "type": "core::starknet::contract_address::ContractAddress"
492
+ },
493
+ {
494
+ "name": "nonce",
495
+ "type": "core::felt252"
292
496
  }
293
497
  ]
294
498
  },
@@ -841,6 +1045,206 @@
841
1045
  ],
842
1046
  "outputs": [],
843
1047
  "state_mutability": "external"
1048
+ },
1049
+ {
1050
+ "type": "function",
1051
+ "name": "settle_collection",
1052
+ "inputs": [
1053
+ {
1054
+ "name": "offer",
1055
+ "type": "stela::snip12::CollectionLendOffer"
1056
+ },
1057
+ {
1058
+ "name": "acceptance",
1059
+ "type": "stela::snip12::CollectionBorrowAcceptance"
1060
+ },
1061
+ {
1062
+ "name": "debt_assets",
1063
+ "type": "core::array::Array::<stela::types::asset::Asset>"
1064
+ },
1065
+ {
1066
+ "name": "interest_assets",
1067
+ "type": "core::array::Array::<stela::types::asset::Asset>"
1068
+ },
1069
+ {
1070
+ "name": "lender_sig",
1071
+ "type": "core::array::Array::<core::felt252>"
1072
+ },
1073
+ {
1074
+ "name": "borrower_sig",
1075
+ "type": "core::array::Array::<core::felt252>"
1076
+ }
1077
+ ],
1078
+ "outputs": [],
1079
+ "state_mutability": "external"
1080
+ },
1081
+ {
1082
+ "type": "function",
1083
+ "name": "commit_renegotiation",
1084
+ "inputs": [
1085
+ {
1086
+ "name": "inscription_id",
1087
+ "type": "core::integer::u256"
1088
+ },
1089
+ {
1090
+ "name": "proposal_hash",
1091
+ "type": "core::felt252"
1092
+ }
1093
+ ],
1094
+ "outputs": [],
1095
+ "state_mutability": "external"
1096
+ },
1097
+ {
1098
+ "type": "function",
1099
+ "name": "execute_renegotiation",
1100
+ "inputs": [
1101
+ {
1102
+ "name": "inscription_id",
1103
+ "type": "core::integer::u256"
1104
+ },
1105
+ {
1106
+ "name": "proposal",
1107
+ "type": "stela::snip12::RenegotiationProposal"
1108
+ },
1109
+ {
1110
+ "name": "proposer_sig",
1111
+ "type": "core::array::Array::<core::felt252>"
1112
+ },
1113
+ {
1114
+ "name": "new_interest_assets",
1115
+ "type": "core::array::Array::<stela::types::asset::Asset>"
1116
+ }
1117
+ ],
1118
+ "outputs": [],
1119
+ "state_mutability": "external"
1120
+ },
1121
+ {
1122
+ "type": "function",
1123
+ "name": "buy_collateral",
1124
+ "inputs": [
1125
+ {
1126
+ "name": "inscription_id",
1127
+ "type": "core::integer::u256"
1128
+ },
1129
+ {
1130
+ "name": "offer",
1131
+ "type": "stela::snip12::CollateralSaleOffer"
1132
+ },
1133
+ {
1134
+ "name": "borrower_sig",
1135
+ "type": "core::array::Array::<core::felt252>"
1136
+ },
1137
+ {
1138
+ "name": "sale_price",
1139
+ "type": "core::integer::u256"
1140
+ }
1141
+ ],
1142
+ "outputs": [],
1143
+ "state_mutability": "external"
1144
+ },
1145
+ {
1146
+ "type": "function",
1147
+ "name": "refinance",
1148
+ "inputs": [
1149
+ {
1150
+ "name": "offer",
1151
+ "type": "stela::snip12::RefinanceOffer"
1152
+ },
1153
+ {
1154
+ "name": "new_debt_assets",
1155
+ "type": "core::array::Array::<stela::types::asset::Asset>"
1156
+ },
1157
+ {
1158
+ "name": "new_interest_assets",
1159
+ "type": "core::array::Array::<stela::types::asset::Asset>"
1160
+ },
1161
+ {
1162
+ "name": "new_lender_sig",
1163
+ "type": "core::array::Array::<core::felt252>"
1164
+ },
1165
+ {
1166
+ "name": "approval",
1167
+ "type": "stela::snip12::RefinanceApproval"
1168
+ },
1169
+ {
1170
+ "name": "borrower_sig",
1171
+ "type": "core::array::Array::<core::felt252>"
1172
+ }
1173
+ ],
1174
+ "outputs": [],
1175
+ "state_mutability": "external"
1176
+ },
1177
+ {
1178
+ "type": "function",
1179
+ "name": "start_auction",
1180
+ "inputs": [
1181
+ {
1182
+ "name": "inscription_id",
1183
+ "type": "core::integer::u256"
1184
+ }
1185
+ ],
1186
+ "outputs": [],
1187
+ "state_mutability": "external"
1188
+ },
1189
+ {
1190
+ "type": "function",
1191
+ "name": "bid",
1192
+ "inputs": [
1193
+ {
1194
+ "name": "inscription_id",
1195
+ "type": "core::integer::u256"
1196
+ }
1197
+ ],
1198
+ "outputs": [],
1199
+ "state_mutability": "external"
1200
+ },
1201
+ {
1202
+ "type": "function",
1203
+ "name": "claim_collateral",
1204
+ "inputs": [
1205
+ {
1206
+ "name": "inscription_id",
1207
+ "type": "core::integer::u256"
1208
+ }
1209
+ ],
1210
+ "outputs": [],
1211
+ "state_mutability": "external"
1212
+ },
1213
+ {
1214
+ "type": "function",
1215
+ "name": "get_auction_price",
1216
+ "inputs": [
1217
+ {
1218
+ "name": "inscription_id",
1219
+ "type": "core::integer::u256"
1220
+ },
1221
+ {
1222
+ "name": "debt_index",
1223
+ "type": "core::integer::u32"
1224
+ }
1225
+ ],
1226
+ "outputs": [
1227
+ {
1228
+ "type": "core::integer::u256"
1229
+ }
1230
+ ],
1231
+ "state_mutability": "view"
1232
+ },
1233
+ {
1234
+ "type": "function",
1235
+ "name": "get_auction_end_time",
1236
+ "inputs": [
1237
+ {
1238
+ "name": "inscription_id",
1239
+ "type": "core::integer::u256"
1240
+ }
1241
+ ],
1242
+ "outputs": [
1243
+ {
1244
+ "type": "core::integer::u64"
1245
+ }
1246
+ ],
1247
+ "state_mutability": "view"
844
1248
  }
845
1249
  ]
846
1250
  },