@fepvenancio/stela-sdk 0.8.0 → 0.8.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.
package/dist/index.js CHANGED
@@ -1050,6 +1050,210 @@ var stela_default = [
1050
1050
  {
1051
1051
  name: "collateral_asset_count",
1052
1052
  type: "core::integer::u32"
1053
+ },
1054
+ {
1055
+ name: "auction_started",
1056
+ type: "core::bool"
1057
+ },
1058
+ {
1059
+ name: "auction_start_time",
1060
+ type: "core::integer::u64"
1061
+ }
1062
+ ]
1063
+ },
1064
+ {
1065
+ type: "struct",
1066
+ name: "stela::snip12::CollectionLendOffer",
1067
+ members: [
1068
+ {
1069
+ name: "lender",
1070
+ type: "core::starknet::contract_address::ContractAddress"
1071
+ },
1072
+ {
1073
+ name: "debt_hash",
1074
+ type: "core::felt252"
1075
+ },
1076
+ {
1077
+ name: "interest_hash",
1078
+ type: "core::felt252"
1079
+ },
1080
+ {
1081
+ name: "debt_count",
1082
+ type: "core::integer::u32"
1083
+ },
1084
+ {
1085
+ name: "interest_count",
1086
+ type: "core::integer::u32"
1087
+ },
1088
+ {
1089
+ name: "collection_address",
1090
+ type: "core::starknet::contract_address::ContractAddress"
1091
+ },
1092
+ {
1093
+ name: "duration",
1094
+ type: "core::integer::u64"
1095
+ },
1096
+ {
1097
+ name: "deadline",
1098
+ type: "core::integer::u64"
1099
+ },
1100
+ {
1101
+ name: "nonce",
1102
+ type: "core::felt252"
1103
+ }
1104
+ ]
1105
+ },
1106
+ {
1107
+ type: "struct",
1108
+ name: "stela::snip12::CollectionBorrowAcceptance",
1109
+ members: [
1110
+ {
1111
+ name: "offer_hash",
1112
+ type: "core::felt252"
1113
+ },
1114
+ {
1115
+ name: "borrower",
1116
+ type: "core::starknet::contract_address::ContractAddress"
1117
+ },
1118
+ {
1119
+ name: "token_id",
1120
+ type: "core::integer::u256"
1121
+ },
1122
+ {
1123
+ name: "nonce",
1124
+ type: "core::felt252"
1125
+ }
1126
+ ]
1127
+ },
1128
+ {
1129
+ type: "struct",
1130
+ name: "stela::snip12::RenegotiationProposal",
1131
+ members: [
1132
+ {
1133
+ name: "inscription_id",
1134
+ type: "core::integer::u256"
1135
+ },
1136
+ {
1137
+ name: "proposer",
1138
+ type: "core::starknet::contract_address::ContractAddress"
1139
+ },
1140
+ {
1141
+ name: "new_duration",
1142
+ type: "core::integer::u64"
1143
+ },
1144
+ {
1145
+ name: "new_interest_hash",
1146
+ type: "core::felt252"
1147
+ },
1148
+ {
1149
+ name: "new_interest_count",
1150
+ type: "core::integer::u32"
1151
+ },
1152
+ {
1153
+ name: "proposal_deadline",
1154
+ type: "core::integer::u64"
1155
+ },
1156
+ {
1157
+ name: "nonce",
1158
+ type: "core::felt252"
1159
+ }
1160
+ ]
1161
+ },
1162
+ {
1163
+ type: "struct",
1164
+ name: "stela::snip12::CollateralSaleOffer",
1165
+ members: [
1166
+ {
1167
+ name: "inscription_id",
1168
+ type: "core::integer::u256"
1169
+ },
1170
+ {
1171
+ name: "borrower",
1172
+ type: "core::starknet::contract_address::ContractAddress"
1173
+ },
1174
+ {
1175
+ name: "min_price",
1176
+ type: "core::integer::u256"
1177
+ },
1178
+ {
1179
+ name: "payment_token",
1180
+ type: "core::starknet::contract_address::ContractAddress"
1181
+ },
1182
+ {
1183
+ name: "allowed_buyer",
1184
+ type: "core::starknet::contract_address::ContractAddress"
1185
+ },
1186
+ {
1187
+ name: "deadline",
1188
+ type: "core::integer::u64"
1189
+ },
1190
+ {
1191
+ name: "nonce",
1192
+ type: "core::felt252"
1193
+ }
1194
+ ]
1195
+ },
1196
+ {
1197
+ type: "struct",
1198
+ name: "stela::snip12::RefinanceOffer",
1199
+ members: [
1200
+ {
1201
+ name: "inscription_id",
1202
+ type: "core::integer::u256"
1203
+ },
1204
+ {
1205
+ name: "new_lender",
1206
+ type: "core::starknet::contract_address::ContractAddress"
1207
+ },
1208
+ {
1209
+ name: "new_debt_hash",
1210
+ type: "core::felt252"
1211
+ },
1212
+ {
1213
+ name: "new_interest_hash",
1214
+ type: "core::felt252"
1215
+ },
1216
+ {
1217
+ name: "new_debt_count",
1218
+ type: "core::integer::u32"
1219
+ },
1220
+ {
1221
+ name: "new_interest_count",
1222
+ type: "core::integer::u32"
1223
+ },
1224
+ {
1225
+ name: "new_duration",
1226
+ type: "core::integer::u64"
1227
+ },
1228
+ {
1229
+ name: "deadline",
1230
+ type: "core::integer::u64"
1231
+ },
1232
+ {
1233
+ name: "nonce",
1234
+ type: "core::felt252"
1235
+ }
1236
+ ]
1237
+ },
1238
+ {
1239
+ type: "struct",
1240
+ name: "stela::snip12::RefinanceApproval",
1241
+ members: [
1242
+ {
1243
+ name: "inscription_id",
1244
+ type: "core::integer::u256"
1245
+ },
1246
+ {
1247
+ name: "offer_hash",
1248
+ type: "core::felt252"
1249
+ },
1250
+ {
1251
+ name: "borrower",
1252
+ type: "core::starknet::contract_address::ContractAddress"
1253
+ },
1254
+ {
1255
+ name: "nonce",
1256
+ type: "core::felt252"
1053
1257
  }
1054
1258
  ]
1055
1259
  },
@@ -1602,6 +1806,206 @@ var stela_default = [
1602
1806
  ],
1603
1807
  outputs: [],
1604
1808
  state_mutability: "external"
1809
+ },
1810
+ {
1811
+ type: "function",
1812
+ name: "settle_collection",
1813
+ inputs: [
1814
+ {
1815
+ name: "offer",
1816
+ type: "stela::snip12::CollectionLendOffer"
1817
+ },
1818
+ {
1819
+ name: "acceptance",
1820
+ type: "stela::snip12::CollectionBorrowAcceptance"
1821
+ },
1822
+ {
1823
+ name: "debt_assets",
1824
+ type: "core::array::Array::<stela::types::asset::Asset>"
1825
+ },
1826
+ {
1827
+ name: "interest_assets",
1828
+ type: "core::array::Array::<stela::types::asset::Asset>"
1829
+ },
1830
+ {
1831
+ name: "lender_sig",
1832
+ type: "core::array::Array::<core::felt252>"
1833
+ },
1834
+ {
1835
+ name: "borrower_sig",
1836
+ type: "core::array::Array::<core::felt252>"
1837
+ }
1838
+ ],
1839
+ outputs: [],
1840
+ state_mutability: "external"
1841
+ },
1842
+ {
1843
+ type: "function",
1844
+ name: "commit_renegotiation",
1845
+ inputs: [
1846
+ {
1847
+ name: "inscription_id",
1848
+ type: "core::integer::u256"
1849
+ },
1850
+ {
1851
+ name: "proposal_hash",
1852
+ type: "core::felt252"
1853
+ }
1854
+ ],
1855
+ outputs: [],
1856
+ state_mutability: "external"
1857
+ },
1858
+ {
1859
+ type: "function",
1860
+ name: "execute_renegotiation",
1861
+ inputs: [
1862
+ {
1863
+ name: "inscription_id",
1864
+ type: "core::integer::u256"
1865
+ },
1866
+ {
1867
+ name: "proposal",
1868
+ type: "stela::snip12::RenegotiationProposal"
1869
+ },
1870
+ {
1871
+ name: "proposer_sig",
1872
+ type: "core::array::Array::<core::felt252>"
1873
+ },
1874
+ {
1875
+ name: "new_interest_assets",
1876
+ type: "core::array::Array::<stela::types::asset::Asset>"
1877
+ }
1878
+ ],
1879
+ outputs: [],
1880
+ state_mutability: "external"
1881
+ },
1882
+ {
1883
+ type: "function",
1884
+ name: "buy_collateral",
1885
+ inputs: [
1886
+ {
1887
+ name: "inscription_id",
1888
+ type: "core::integer::u256"
1889
+ },
1890
+ {
1891
+ name: "offer",
1892
+ type: "stela::snip12::CollateralSaleOffer"
1893
+ },
1894
+ {
1895
+ name: "borrower_sig",
1896
+ type: "core::array::Array::<core::felt252>"
1897
+ },
1898
+ {
1899
+ name: "sale_price",
1900
+ type: "core::integer::u256"
1901
+ }
1902
+ ],
1903
+ outputs: [],
1904
+ state_mutability: "external"
1905
+ },
1906
+ {
1907
+ type: "function",
1908
+ name: "refinance",
1909
+ inputs: [
1910
+ {
1911
+ name: "offer",
1912
+ type: "stela::snip12::RefinanceOffer"
1913
+ },
1914
+ {
1915
+ name: "new_debt_assets",
1916
+ type: "core::array::Array::<stela::types::asset::Asset>"
1917
+ },
1918
+ {
1919
+ name: "new_interest_assets",
1920
+ type: "core::array::Array::<stela::types::asset::Asset>"
1921
+ },
1922
+ {
1923
+ name: "new_lender_sig",
1924
+ type: "core::array::Array::<core::felt252>"
1925
+ },
1926
+ {
1927
+ name: "approval",
1928
+ type: "stela::snip12::RefinanceApproval"
1929
+ },
1930
+ {
1931
+ name: "borrower_sig",
1932
+ type: "core::array::Array::<core::felt252>"
1933
+ }
1934
+ ],
1935
+ outputs: [],
1936
+ state_mutability: "external"
1937
+ },
1938
+ {
1939
+ type: "function",
1940
+ name: "start_auction",
1941
+ inputs: [
1942
+ {
1943
+ name: "inscription_id",
1944
+ type: "core::integer::u256"
1945
+ }
1946
+ ],
1947
+ outputs: [],
1948
+ state_mutability: "external"
1949
+ },
1950
+ {
1951
+ type: "function",
1952
+ name: "bid",
1953
+ inputs: [
1954
+ {
1955
+ name: "inscription_id",
1956
+ type: "core::integer::u256"
1957
+ }
1958
+ ],
1959
+ outputs: [],
1960
+ state_mutability: "external"
1961
+ },
1962
+ {
1963
+ type: "function",
1964
+ name: "claim_collateral",
1965
+ inputs: [
1966
+ {
1967
+ name: "inscription_id",
1968
+ type: "core::integer::u256"
1969
+ }
1970
+ ],
1971
+ outputs: [],
1972
+ state_mutability: "external"
1973
+ },
1974
+ {
1975
+ type: "function",
1976
+ name: "get_auction_price",
1977
+ inputs: [
1978
+ {
1979
+ name: "inscription_id",
1980
+ type: "core::integer::u256"
1981
+ },
1982
+ {
1983
+ name: "debt_index",
1984
+ type: "core::integer::u32"
1985
+ }
1986
+ ],
1987
+ outputs: [
1988
+ {
1989
+ type: "core::integer::u256"
1990
+ }
1991
+ ],
1992
+ state_mutability: "view"
1993
+ },
1994
+ {
1995
+ type: "function",
1996
+ name: "get_auction_end_time",
1997
+ inputs: [
1998
+ {
1999
+ name: "inscription_id",
2000
+ type: "core::integer::u256"
2001
+ }
2002
+ ],
2003
+ outputs: [
2004
+ {
2005
+ type: "core::integer::u64"
2006
+ }
2007
+ ],
2008
+ state_mutability: "view"
1605
2009
  }
1606
2010
  ]
1607
2011
  },