@fepvenancio/stela-sdk 0.4.1 → 0.4.3

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 CHANGED
@@ -418,6 +418,10 @@ pnpm build
418
418
  npm publish --access public
419
419
  ```
420
420
 
421
+ ## Running a Relayer
422
+
423
+ The Stela protocol is fully permissionless — anyone can run a relayer to settle matched orders and earn **5 BPS** on every settlement. See [RELAYER.md](RELAYER.md) for the SDK integration guide and the [stela-relayer](https://github.com/fepvenancio/stela-relayer) repo for a standalone implementation.
424
+
421
425
  ## License
422
426
 
423
427
  MIT
package/dist/index.cjs CHANGED
@@ -24,7 +24,7 @@ var STATUS_LABELS = {
24
24
 
25
25
  // src/constants/addresses.ts
26
26
  var STELA_ADDRESS = {
27
- sepolia: "0x00b7deedb4ab03d94f54da2e7c911c2336b19c2a4610eb98f55cd7be5a53ece0",
27
+ sepolia: "0x038fb9a3bbf84aef962c70bc0ed15744f4f3088bae73bed99031b6f2b7cfab01",
28
28
  mainnet: "0x0"
29
29
  };
30
30
  var VALID_NETWORKS = ["sepolia", "mainnet"];
@@ -1369,6 +1369,29 @@ var stela_default = [
1369
1369
  outputs: [],
1370
1370
  state_mutability: "external"
1371
1371
  },
1372
+ {
1373
+ type: "function",
1374
+ name: "set_fee_vault",
1375
+ inputs: [
1376
+ {
1377
+ name: "fee_vault",
1378
+ type: "core::starknet::contract_address::ContractAddress"
1379
+ }
1380
+ ],
1381
+ outputs: [],
1382
+ state_mutability: "external"
1383
+ },
1384
+ {
1385
+ type: "function",
1386
+ name: "get_fee_vault",
1387
+ inputs: [],
1388
+ outputs: [
1389
+ {
1390
+ type: "core::starknet::contract_address::ContractAddress"
1391
+ }
1392
+ ],
1393
+ state_mutability: "view"
1394
+ },
1372
1395
  {
1373
1396
  type: "function",
1374
1397
  name: "pause",
@@ -2948,13 +2971,14 @@ var LockerClient = class {
2948
2971
  /** Read multiple ERC20 balances held by a locker */
2949
2972
  async getLockerBalances(inscriptionId, tokenAddresses) {
2950
2973
  const lockerAddress = await this.getLockerAddress(inscriptionId);
2951
- const balances = /* @__PURE__ */ new Map();
2952
- for (const addr of tokenAddresses) {
2953
- const token = new starknet.Contract(erc20_default, addr, this.provider);
2954
- const result = await token.call("balance_of", [lockerAddress]);
2955
- balances.set(addr, BigInt(result[0]));
2956
- }
2957
- return balances;
2974
+ const results = await Promise.all(
2975
+ tokenAddresses.map(async (addr) => {
2976
+ const token = new starknet.Contract(erc20_default, addr, this.provider);
2977
+ const result = await token.call("balance_of", [lockerAddress]);
2978
+ return [addr, BigInt(result[0])];
2979
+ })
2980
+ );
2981
+ return new Map(results);
2958
2982
  }
2959
2983
  // ---- Governance execution through Locker ----
2960
2984
  /**