@fepvenancio/stela-sdk 0.6.1 → 0.7.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.d.cts CHANGED
@@ -459,7 +459,6 @@ declare class InscriptionClient {
459
459
  constructor(opts: InscriptionClientOptions);
460
460
  getInscription(inscriptionId: bigint): Promise<StoredInscription>;
461
461
  getLocker(inscriptionId: bigint): Promise<string>;
462
- getInscriptionFee(): Promise<bigint>;
463
462
  convertToShares(inscriptionId: bigint, percentage: bigint): Promise<bigint>;
464
463
  getNonce(address: string): Promise<bigint>;
465
464
  getRelayerFee(): Promise<bigint>;
package/dist/index.d.ts CHANGED
@@ -459,7 +459,6 @@ declare class InscriptionClient {
459
459
  constructor(opts: InscriptionClientOptions);
460
460
  getInscription(inscriptionId: bigint): Promise<StoredInscription>;
461
461
  getLocker(inscriptionId: bigint): Promise<string>;
462
- getInscriptionFee(): Promise<bigint>;
463
462
  convertToShares(inscriptionId: bigint, percentage: bigint): Promise<bigint>;
464
463
  getNonce(address: string): Promise<bigint>;
465
464
  getRelayerFee(): Promise<bigint>;
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ var STATUS_LABELS = {
22
22
 
23
23
  // src/constants/addresses.ts
24
24
  var STELA_ADDRESS = {
25
- sepolia: "0x012998e49cc8205d0bb56b5c10202bd32994091b1cacdb7bcbd03dc6781d4974",
25
+ sepolia: "0x0109c6caae0c5b4da6e063ed6c02ae784be05aa90806501a48dcfbb213bd7c03",
26
26
  mainnet: "0x0"
27
27
  };
28
28
  var VALID_NETWORKS = ["sepolia", "mainnet"];
@@ -1130,17 +1130,6 @@ var stela_default = [
1130
1130
  ],
1131
1131
  state_mutability: "view"
1132
1132
  },
1133
- {
1134
- type: "function",
1135
- name: "get_inscription_fee",
1136
- inputs: [],
1137
- outputs: [
1138
- {
1139
- type: "core::integer::u256"
1140
- }
1141
- ],
1142
- state_mutability: "view"
1143
- },
1144
1133
  {
1145
1134
  type: "function",
1146
1135
  name: "nonces",
@@ -1157,17 +1146,6 @@ var stela_default = [
1157
1146
  ],
1158
1147
  state_mutability: "view"
1159
1148
  },
1160
- {
1161
- type: "function",
1162
- name: "get_relayer_fee",
1163
- inputs: [],
1164
- outputs: [
1165
- {
1166
- type: "core::integer::u256"
1167
- }
1168
- ],
1169
- state_mutability: "view"
1170
- },
1171
1149
  {
1172
1150
  type: "function",
1173
1151
  name: "get_treasury",
@@ -1179,17 +1157,6 @@ var stela_default = [
1179
1157
  ],
1180
1158
  state_mutability: "view"
1181
1159
  },
1182
- {
1183
- type: "function",
1184
- name: "is_paused",
1185
- inputs: [],
1186
- outputs: [
1187
- {
1188
- type: "core::bool"
1189
- }
1190
- ],
1191
- state_mutability: "view"
1192
- },
1193
1160
  {
1194
1161
  type: "function",
1195
1162
  name: "is_order_registered",
@@ -1283,15 +1250,19 @@ var stela_default = [
1283
1250
  },
1284
1251
  {
1285
1252
  type: "function",
1286
- name: "set_inscription_fee",
1253
+ name: "is_volume_token_whitelisted",
1287
1254
  inputs: [
1288
1255
  {
1289
- name: "fee",
1290
- type: "core::integer::u256"
1256
+ name: "token",
1257
+ type: "core::starknet::contract_address::ContractAddress"
1291
1258
  }
1292
1259
  ],
1293
- outputs: [],
1294
- state_mutability: "external"
1260
+ outputs: [
1261
+ {
1262
+ type: "core::bool"
1263
+ }
1264
+ ],
1265
+ state_mutability: "view"
1295
1266
  },
1296
1267
  {
1297
1268
  type: "function",
@@ -1331,11 +1302,11 @@ var stela_default = [
1331
1302
  },
1332
1303
  {
1333
1304
  type: "function",
1334
- name: "set_relayer_fee",
1305
+ name: "set_implementation_hash",
1335
1306
  inputs: [
1336
1307
  {
1337
- name: "fee",
1338
- type: "core::integer::u256"
1308
+ name: "implementation_hash",
1309
+ type: "core::felt252"
1339
1310
  }
1340
1311
  ],
1341
1312
  outputs: [],
@@ -1343,11 +1314,15 @@ var stela_default = [
1343
1314
  },
1344
1315
  {
1345
1316
  type: "function",
1346
- name: "set_implementation_hash",
1317
+ name: "set_volume_token_whitelisted",
1347
1318
  inputs: [
1348
1319
  {
1349
- name: "implementation_hash",
1350
- type: "core::felt252"
1320
+ name: "token",
1321
+ type: "core::starknet::contract_address::ContractAddress"
1322
+ },
1323
+ {
1324
+ name: "whitelisted",
1325
+ type: "core::bool"
1351
1326
  }
1352
1327
  ],
1353
1328
  outputs: [],
@@ -1367,27 +1342,34 @@ var stela_default = [
1367
1342
  },
1368
1343
  {
1369
1344
  type: "function",
1370
- name: "pause",
1371
- inputs: [],
1372
- outputs: [],
1373
- state_mutability: "external"
1374
- },
1375
- {
1376
- type: "function",
1377
- name: "unpause",
1378
- inputs: [],
1345
+ name: "set_governance_target",
1346
+ inputs: [
1347
+ {
1348
+ name: "target",
1349
+ type: "core::starknet::contract_address::ContractAddress"
1350
+ },
1351
+ {
1352
+ name: "whitelisted",
1353
+ type: "core::bool"
1354
+ }
1355
+ ],
1379
1356
  outputs: [],
1380
1357
  state_mutability: "external"
1381
1358
  },
1382
1359
  {
1383
1360
  type: "function",
1384
- name: "get_pauser",
1385
- inputs: [],
1386
- outputs: [
1361
+ name: "is_governance_target_whitelisted",
1362
+ inputs: [
1387
1363
  {
1364
+ name: "target",
1388
1365
  type: "core::starknet::contract_address::ContractAddress"
1389
1366
  }
1390
1367
  ],
1368
+ outputs: [
1369
+ {
1370
+ type: "core::bool"
1371
+ }
1372
+ ],
1391
1373
  state_mutability: "view"
1392
1374
  },
1393
1375
  {
@@ -1398,6 +1380,34 @@ var stela_default = [
1398
1380
  name: "locker",
1399
1381
  type: "core::starknet::contract_address::ContractAddress"
1400
1382
  },
1383
+ {
1384
+ name: "target",
1385
+ type: "core::starknet::contract_address::ContractAddress"
1386
+ },
1387
+ {
1388
+ name: "selector",
1389
+ type: "core::felt252"
1390
+ },
1391
+ {
1392
+ name: "allowed",
1393
+ type: "core::bool"
1394
+ }
1395
+ ],
1396
+ outputs: [],
1397
+ state_mutability: "external"
1398
+ },
1399
+ {
1400
+ type: "function",
1401
+ name: "set_borrower_governance_selector",
1402
+ inputs: [
1403
+ {
1404
+ name: "inscription_id",
1405
+ type: "core::integer::u256"
1406
+ },
1407
+ {
1408
+ name: "target",
1409
+ type: "core::starknet::contract_address::ContractAddress"
1410
+ },
1401
1411
  {
1402
1412
  name: "selector",
1403
1413
  type: "core::felt252"
@@ -1846,10 +1856,6 @@ var stela_default = [
1846
1856
  {
1847
1857
  name: "implementation_hash",
1848
1858
  type: "core::felt252"
1849
- },
1850
- {
1851
- name: "pauser",
1852
- type: "core::starknet::contract_address::ContractAddress"
1853
1859
  }
1854
1860
  ]
1855
1861
  },
@@ -2046,47 +2052,6 @@ var stela_default = [
2046
2052
  kind: "enum",
2047
2053
  variants: []
2048
2054
  },
2049
- {
2050
- type: "event",
2051
- name: "openzeppelin_security::pausable::PausableComponent::Paused",
2052
- kind: "struct",
2053
- members: [
2054
- {
2055
- name: "account",
2056
- type: "core::starknet::contract_address::ContractAddress",
2057
- kind: "data"
2058
- }
2059
- ]
2060
- },
2061
- {
2062
- type: "event",
2063
- name: "openzeppelin_security::pausable::PausableComponent::Unpaused",
2064
- kind: "struct",
2065
- members: [
2066
- {
2067
- name: "account",
2068
- type: "core::starknet::contract_address::ContractAddress",
2069
- kind: "data"
2070
- }
2071
- ]
2072
- },
2073
- {
2074
- type: "event",
2075
- name: "openzeppelin_security::pausable::PausableComponent::Event",
2076
- kind: "enum",
2077
- variants: [
2078
- {
2079
- name: "Paused",
2080
- type: "openzeppelin_security::pausable::PausableComponent::Paused",
2081
- kind: "nested"
2082
- },
2083
- {
2084
- name: "Unpaused",
2085
- type: "openzeppelin_security::pausable::PausableComponent::Unpaused",
2086
- kind: "nested"
2087
- }
2088
- ]
2089
- },
2090
2055
  {
2091
2056
  type: "event",
2092
2057
  name: "openzeppelin_utils::cryptography::nonces::NoncesComponent::Event",
@@ -2318,6 +2283,28 @@ var stela_default = [
2318
2283
  }
2319
2284
  ]
2320
2285
  },
2286
+ {
2287
+ type: "event",
2288
+ name: "stela::stela::StelaProtocol::CollateralReturned",
2289
+ kind: "struct",
2290
+ members: [
2291
+ {
2292
+ name: "inscription_id",
2293
+ type: "core::integer::u256",
2294
+ kind: "key"
2295
+ },
2296
+ {
2297
+ name: "borrower",
2298
+ type: "core::starknet::contract_address::ContractAddress",
2299
+ kind: "data"
2300
+ },
2301
+ {
2302
+ name: "asset_count",
2303
+ type: "core::integer::u32",
2304
+ kind: "data"
2305
+ }
2306
+ ]
2307
+ },
2321
2308
  {
2322
2309
  type: "event",
2323
2310
  name: "stela::stela::StelaProtocol::Event",
@@ -2343,11 +2330,6 @@ var stela_default = [
2343
2330
  type: "openzeppelin_security::reentrancyguard::ReentrancyGuardComponent::Event",
2344
2331
  kind: "flat"
2345
2332
  },
2346
- {
2347
- name: "PausableEvent",
2348
- type: "openzeppelin_security::pausable::PausableComponent::Event",
2349
- kind: "flat"
2350
- },
2351
2333
  {
2352
2334
  name: "NoncesEvent",
2353
2335
  type: "openzeppelin_utils::cryptography::nonces::NoncesComponent::Event",
@@ -2402,6 +2384,11 @@ var stela_default = [
2402
2384
  name: "OrdersBulkCancelled",
2403
2385
  type: "stela::stela::StelaProtocol::OrdersBulkCancelled",
2404
2386
  kind: "nested"
2387
+ },
2388
+ {
2389
+ name: "CollateralReturned",
2390
+ type: "stela::stela::StelaProtocol::CollateralReturned",
2391
+ kind: "nested"
2405
2392
  }
2406
2393
  ]
2407
2394
  }
@@ -2426,10 +2413,6 @@ var InscriptionClient = class {
2426
2413
  const result = await this.contract.call("get_locker", toU256(inscriptionId));
2427
2414
  return String(result[0]);
2428
2415
  }
2429
- async getInscriptionFee() {
2430
- const result = await this.contract.call("get_inscription_fee");
2431
- return extractU256(result);
2432
- }
2433
2416
  async convertToShares(inscriptionId, percentage) {
2434
2417
  const result = await this.contract.call("convert_to_shares", [
2435
2418
  ...toU256(inscriptionId),