@dcentralab/d402-client 0.2.4 → 0.2.5

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.mjs CHANGED
@@ -5232,13 +5232,13 @@ init_constants();
5232
5232
 
5233
5233
  // src/settlement.ts
5234
5234
  async function getLockedBalanceForProvider(params) {
5235
- const { publicClient, settlementLayerAddress, providerAddress, tokenAddress, network = "sepolia" } = params;
5235
+ const { publicClient, providerAddress, tokenAddress, network = "sepolia" } = params;
5236
5236
  const settlementConfig = getContractConfig("IATPSettlementLayer" /* IATP_SETTLEMENT_LAYER */, network);
5237
5237
  if (!settlementConfig) {
5238
5238
  throw new Error(`IATPSettlementLayer contract not found for network: ${network}`);
5239
5239
  }
5240
5240
  const balance = await publicClient.readContract({
5241
- address: settlementLayerAddress,
5241
+ address: settlementConfig.address,
5242
5242
  abi: settlementConfig.abi,
5243
5243
  functionName: "getLockedBalanceForProvider",
5244
5244
  args: [providerAddress, tokenAddress]
@@ -5246,13 +5246,13 @@ async function getLockedBalanceForProvider(params) {
5246
5246
  return balance;
5247
5247
  }
5248
5248
  async function getUnlockedBalanceForProvider(params) {
5249
- const { publicClient, settlementLayerAddress, providerAddress, tokenAddress, network = "sepolia" } = params;
5249
+ const { publicClient, providerAddress, tokenAddress, network = "sepolia" } = params;
5250
5250
  const settlementConfig = getContractConfig("IATPSettlementLayer" /* IATP_SETTLEMENT_LAYER */, network);
5251
5251
  if (!settlementConfig) {
5252
5252
  throw new Error(`IATPSettlementLayer contract not found for network: ${network}`);
5253
5253
  }
5254
5254
  const balance = await publicClient.readContract({
5255
- address: settlementLayerAddress,
5255
+ address: settlementConfig.address,
5256
5256
  abi: settlementConfig.abi,
5257
5257
  functionName: "getUnlockedBalanceForProvider",
5258
5258
  args: [providerAddress, tokenAddress]