@secondlayer/stacks 6.5.4 → 6.6.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.
Files changed (39) hide show
  1. package/dist/shared/{stacks-esm-s3natb0x.js → stacks-esm-75qv0d9h.js} +4 -4
  2. package/dist/shared/{stacks-esm-s3natb0x.js.map → stacks-esm-75qv0d9h.js.map} +3 -3
  3. package/dist/shared/{stacks-esm-jm688fhe.js → stacks-esm-8chm2wtn.js} +13 -5
  4. package/dist/shared/{stacks-esm-jm688fhe.js.map → stacks-esm-8chm2wtn.js.map} +4 -4
  5. package/dist/shared/{stacks-esm-17adzt3x.js → stacks-esm-p3rrvmd8.js} +2 -2
  6. package/dist/src/actions/index.cjs +12 -4
  7. package/dist/src/actions/index.cjs.map +5 -5
  8. package/dist/src/actions/index.d.cts +2 -0
  9. package/dist/src/actions/index.d.ts +2 -0
  10. package/dist/src/actions/index.js +3 -3
  11. package/dist/src/bns/index.cjs +12 -4
  12. package/dist/src/bns/index.cjs.map +5 -5
  13. package/dist/src/bns/index.js +2 -2
  14. package/dist/src/index.cjs +32 -5
  15. package/dist/src/index.cjs.map +6 -6
  16. package/dist/src/index.d.cts +8 -0
  17. package/dist/src/index.d.ts +8 -0
  18. package/dist/src/index.js +32 -6
  19. package/dist/src/index.js.map +4 -4
  20. package/dist/src/pox/index.cjs +12 -4
  21. package/dist/src/pox/index.cjs.map +5 -5
  22. package/dist/src/pox/index.js +2 -2
  23. package/dist/src/pox5/index.cjs +12 -4
  24. package/dist/src/pox5/index.cjs.map +5 -5
  25. package/dist/src/pox5/index.js +2 -2
  26. package/dist/src/sbtc/index.cjs +12 -4
  27. package/dist/src/sbtc/index.cjs.map +5 -5
  28. package/dist/src/sbtc/index.js +2 -2
  29. package/dist/src/stackingdao/index.cjs +12 -4
  30. package/dist/src/stackingdao/index.cjs.map +5 -5
  31. package/dist/src/stackingdao/index.js +2 -2
  32. package/dist/src/utils/index.cjs +7 -2
  33. package/dist/src/utils/index.cjs.map +3 -3
  34. package/dist/src/utils/index.d.cts +8 -1
  35. package/dist/src/utils/index.d.ts +8 -1
  36. package/dist/src/utils/index.js +7 -2
  37. package/dist/src/utils/index.js.map +3 -3
  38. package/package.json +2 -2
  39. /package/dist/shared/{stacks-esm-17adzt3x.js.map → stacks-esm-p3rrvmd8.js.map} +0 -0
@@ -18,8 +18,8 @@ import {
18
18
  import {
19
19
  getContract2,
20
20
  resolveNetworkContract
21
- } from "../../shared/stacks-esm-s3natb0x.js";
22
- import"../../shared/stacks-esm-jm688fhe.js";
21
+ } from "../../shared/stacks-esm-75qv0d9h.js";
22
+ import"../../shared/stacks-esm-8chm2wtn.js";
23
23
  import"../../shared/stacks-esm-hm7kb2cp.js";
24
24
 
25
25
  // src/pox/abi.ts
@@ -3503,6 +3503,13 @@ function assertNoFeeTierForProvider(fee) {
3503
3503
  throw new Error(`Fee tier '${fee}' requires local signing; provider (wallet) accounts set their own fee`);
3504
3504
  }
3505
3505
  }
3506
+ function resolveCallArgs(params) {
3507
+ const { args, functionArgs } = params;
3508
+ if (args !== undefined && functionArgs !== undefined) {
3509
+ throw new Error("Pass args or functionArgs, not both (functionArgs is deprecated)");
3510
+ }
3511
+ return args ?? functionArgs ?? [];
3512
+ }
3506
3513
 
3507
3514
  // src/actions/wallet/callContract.ts
3508
3515
  async function callContract(client, params) {
@@ -3510,12 +3517,13 @@ async function callContract(client, params) {
3510
3517
  if (!account)
3511
3518
  throw new Error("Account required");
3512
3519
  const [contractAddress, contractName] = parseContractId(params.contract);
3520
+ const args = resolveCallArgs(params);
3513
3521
  if (isProviderAccount(account)) {
3514
3522
  assertNoFeeTierForProvider(params.fee);
3515
3523
  const result = await account.provider.request("stx_callContract", {
3516
3524
  contract: params.contract,
3517
3525
  functionName: params.functionName,
3518
- functionArgs: params.functionArgs ?? []
3526
+ functionArgs: args
3519
3527
  });
3520
3528
  return result.txid;
3521
3529
  }
@@ -3527,7 +3535,7 @@ async function callContract(client, params) {
3527
3535
  contractAddress,
3528
3536
  contractName,
3529
3537
  functionName: params.functionName,
3530
- functionArgs: params.functionArgs ?? [],
3538
+ functionArgs: args,
3531
3539
  fee: needsFeeResolution ? 0n : params.fee,
3532
3540
  nonce,
3533
3541
  publicKey: account.publicKey,
@@ -3609,7 +3617,7 @@ function getContract(params) {
3609
3617
  return callContract(client, {
3610
3618
  contract: contractId,
3611
3619
  functionName: fn.name,
3612
- functionArgs: clarityArgs,
3620
+ args: clarityArgs,
3613
3621
  ...options
3614
3622
  });
3615
3623
  };
@@ -6166,5 +6174,5 @@ function parseSignerCalldata(calldata) {
6166
6174
  };
6167
6175
  }
6168
6176
 
6169
- //# debugId=0C3339AEA1AAF38B64756E2164756E21
6177
+ //# debugId=42408C5598FCBEE764756E2164756E21
6170
6178
  //# sourceMappingURL=index.cjs.map