@fepvenancio/stela-sdk 0.6.0 → 0.7.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/README.md +7 -1
- package/dist/index.cjs +98 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +98 -38
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/abi/stela.json +97 -33
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: "
|
|
25
|
+
sepolia: "0x038a0b195e011fbfd75e9bce9bbc4137ebc5296882e11c5769c333b90bda4f89",
|
|
26
26
|
mainnet: "0x0"
|
|
27
27
|
};
|
|
28
28
|
var VALID_NETWORKS = ["sepolia", "mainnet"];
|
|
@@ -760,6 +760,28 @@ var stela_default = [
|
|
|
760
760
|
}
|
|
761
761
|
]
|
|
762
762
|
},
|
|
763
|
+
{
|
|
764
|
+
type: "struct",
|
|
765
|
+
name: "stela::snip12::BatchLendOffer",
|
|
766
|
+
members: [
|
|
767
|
+
{
|
|
768
|
+
name: "batch_hash",
|
|
769
|
+
type: "core::felt252"
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
name: "count",
|
|
773
|
+
type: "core::integer::u32"
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
name: "lender",
|
|
777
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
name: "start_nonce",
|
|
781
|
+
type: "core::felt252"
|
|
782
|
+
}
|
|
783
|
+
]
|
|
784
|
+
},
|
|
763
785
|
{
|
|
764
786
|
type: "struct",
|
|
765
787
|
name: "stela::types::signed_order::SignedOrder",
|
|
@@ -972,6 +994,46 @@ var stela_default = [
|
|
|
972
994
|
outputs: [],
|
|
973
995
|
state_mutability: "external"
|
|
974
996
|
},
|
|
997
|
+
{
|
|
998
|
+
type: "function",
|
|
999
|
+
name: "batch_settle",
|
|
1000
|
+
inputs: [
|
|
1001
|
+
{
|
|
1002
|
+
name: "orders",
|
|
1003
|
+
type: "core::array::Array::<stela::snip12::InscriptionOrder>"
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
name: "debt_assets_flat",
|
|
1007
|
+
type: "core::array::Array::<stela::types::asset::Asset>"
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
name: "interest_assets_flat",
|
|
1011
|
+
type: "core::array::Array::<stela::types::asset::Asset>"
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
name: "collateral_assets_flat",
|
|
1015
|
+
type: "core::array::Array::<stela::types::asset::Asset>"
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
name: "borrower_sigs",
|
|
1019
|
+
type: "core::array::Array::<core::array::Array::<core::felt252>>"
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
name: "batch_offer",
|
|
1023
|
+
type: "stela::snip12::BatchLendOffer"
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
name: "lender_sig",
|
|
1027
|
+
type: "core::array::Array::<core::felt252>"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
name: "bps_list",
|
|
1031
|
+
type: "core::array::Array::<core::integer::u256>"
|
|
1032
|
+
}
|
|
1033
|
+
],
|
|
1034
|
+
outputs: [],
|
|
1035
|
+
state_mutability: "external"
|
|
1036
|
+
},
|
|
975
1037
|
{
|
|
976
1038
|
type: "function",
|
|
977
1039
|
name: "fill_signed_order",
|
|
@@ -1068,17 +1130,6 @@ var stela_default = [
|
|
|
1068
1130
|
],
|
|
1069
1131
|
state_mutability: "view"
|
|
1070
1132
|
},
|
|
1071
|
-
{
|
|
1072
|
-
type: "function",
|
|
1073
|
-
name: "get_inscription_fee",
|
|
1074
|
-
inputs: [],
|
|
1075
|
-
outputs: [
|
|
1076
|
-
{
|
|
1077
|
-
type: "core::integer::u256"
|
|
1078
|
-
}
|
|
1079
|
-
],
|
|
1080
|
-
state_mutability: "view"
|
|
1081
|
-
},
|
|
1082
1133
|
{
|
|
1083
1134
|
type: "function",
|
|
1084
1135
|
name: "nonces",
|
|
@@ -1095,17 +1146,6 @@ var stela_default = [
|
|
|
1095
1146
|
],
|
|
1096
1147
|
state_mutability: "view"
|
|
1097
1148
|
},
|
|
1098
|
-
{
|
|
1099
|
-
type: "function",
|
|
1100
|
-
name: "get_relayer_fee",
|
|
1101
|
-
inputs: [],
|
|
1102
|
-
outputs: [
|
|
1103
|
-
{
|
|
1104
|
-
type: "core::integer::u256"
|
|
1105
|
-
}
|
|
1106
|
-
],
|
|
1107
|
-
state_mutability: "view"
|
|
1108
|
-
},
|
|
1109
1149
|
{
|
|
1110
1150
|
type: "function",
|
|
1111
1151
|
name: "get_treasury",
|
|
@@ -1221,15 +1261,19 @@ var stela_default = [
|
|
|
1221
1261
|
},
|
|
1222
1262
|
{
|
|
1223
1263
|
type: "function",
|
|
1224
|
-
name: "
|
|
1264
|
+
name: "is_volume_token_whitelisted",
|
|
1225
1265
|
inputs: [
|
|
1226
1266
|
{
|
|
1227
|
-
name: "
|
|
1228
|
-
type: "core::
|
|
1267
|
+
name: "token",
|
|
1268
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
1229
1269
|
}
|
|
1230
1270
|
],
|
|
1231
|
-
outputs: [
|
|
1232
|
-
|
|
1271
|
+
outputs: [
|
|
1272
|
+
{
|
|
1273
|
+
type: "core::bool"
|
|
1274
|
+
}
|
|
1275
|
+
],
|
|
1276
|
+
state_mutability: "view"
|
|
1233
1277
|
},
|
|
1234
1278
|
{
|
|
1235
1279
|
type: "function",
|
|
@@ -1269,11 +1313,11 @@ var stela_default = [
|
|
|
1269
1313
|
},
|
|
1270
1314
|
{
|
|
1271
1315
|
type: "function",
|
|
1272
|
-
name: "
|
|
1316
|
+
name: "set_implementation_hash",
|
|
1273
1317
|
inputs: [
|
|
1274
1318
|
{
|
|
1275
|
-
name: "
|
|
1276
|
-
type: "core::
|
|
1319
|
+
name: "implementation_hash",
|
|
1320
|
+
type: "core::felt252"
|
|
1277
1321
|
}
|
|
1278
1322
|
],
|
|
1279
1323
|
outputs: [],
|
|
@@ -1281,11 +1325,15 @@ var stela_default = [
|
|
|
1281
1325
|
},
|
|
1282
1326
|
{
|
|
1283
1327
|
type: "function",
|
|
1284
|
-
name: "
|
|
1328
|
+
name: "set_volume_token_whitelisted",
|
|
1285
1329
|
inputs: [
|
|
1286
1330
|
{
|
|
1287
|
-
name: "
|
|
1288
|
-
type: "core::
|
|
1331
|
+
name: "token",
|
|
1332
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
name: "whitelisted",
|
|
1336
|
+
type: "core::bool"
|
|
1289
1337
|
}
|
|
1290
1338
|
],
|
|
1291
1339
|
outputs: [],
|
|
@@ -1328,6 +1376,18 @@ var stela_default = [
|
|
|
1328
1376
|
],
|
|
1329
1377
|
state_mutability: "view"
|
|
1330
1378
|
},
|
|
1379
|
+
{
|
|
1380
|
+
type: "function",
|
|
1381
|
+
name: "set_pauser",
|
|
1382
|
+
inputs: [
|
|
1383
|
+
{
|
|
1384
|
+
name: "new_pauser",
|
|
1385
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
1386
|
+
}
|
|
1387
|
+
],
|
|
1388
|
+
outputs: [],
|
|
1389
|
+
state_mutability: "external"
|
|
1390
|
+
},
|
|
1331
1391
|
{
|
|
1332
1392
|
type: "function",
|
|
1333
1393
|
name: "set_locker_allowed_selector",
|
|
@@ -1336,6 +1396,10 @@ var stela_default = [
|
|
|
1336
1396
|
name: "locker",
|
|
1337
1397
|
type: "core::starknet::contract_address::ContractAddress"
|
|
1338
1398
|
},
|
|
1399
|
+
{
|
|
1400
|
+
name: "target",
|
|
1401
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
1402
|
+
},
|
|
1339
1403
|
{
|
|
1340
1404
|
name: "selector",
|
|
1341
1405
|
type: "core::felt252"
|
|
@@ -2364,10 +2428,6 @@ var InscriptionClient = class {
|
|
|
2364
2428
|
const result = await this.contract.call("get_locker", toU256(inscriptionId));
|
|
2365
2429
|
return String(result[0]);
|
|
2366
2430
|
}
|
|
2367
|
-
async getInscriptionFee() {
|
|
2368
|
-
const result = await this.contract.call("get_inscription_fee");
|
|
2369
|
-
return extractU256(result);
|
|
2370
|
-
}
|
|
2371
2431
|
async convertToShares(inscriptionId, percentage) {
|
|
2372
2432
|
const result = await this.contract.call("convert_to_shares", [
|
|
2373
2433
|
...toU256(inscriptionId),
|