@secondlayer/stacks 6.5.3 → 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.
- package/dist/shared/{stacks-esm-s3natb0x.js → stacks-esm-75qv0d9h.js} +4 -4
- package/dist/shared/{stacks-esm-s3natb0x.js.map → stacks-esm-75qv0d9h.js.map} +3 -3
- package/dist/shared/{stacks-esm-jm688fhe.js → stacks-esm-8chm2wtn.js} +13 -5
- package/dist/shared/{stacks-esm-jm688fhe.js.map → stacks-esm-8chm2wtn.js.map} +4 -4
- package/dist/shared/{stacks-esm-17adzt3x.js → stacks-esm-p3rrvmd8.js} +2 -2
- package/dist/src/actions/index.cjs +12 -4
- package/dist/src/actions/index.cjs.map +5 -5
- package/dist/src/actions/index.d.cts +2 -0
- package/dist/src/actions/index.d.ts +2 -0
- package/dist/src/actions/index.js +3 -3
- package/dist/src/bns/index.cjs +12 -4
- package/dist/src/bns/index.cjs.map +5 -5
- package/dist/src/bns/index.js +2 -2
- package/dist/src/index.cjs +32 -5
- package/dist/src/index.cjs.map +6 -6
- package/dist/src/index.d.cts +8 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/index.js +32 -6
- package/dist/src/index.js.map +4 -4
- package/dist/src/pox/index.cjs +12 -4
- package/dist/src/pox/index.cjs.map +5 -5
- package/dist/src/pox/index.js +2 -2
- package/dist/src/pox5/index.cjs +12 -4
- package/dist/src/pox5/index.cjs.map +5 -5
- package/dist/src/pox5/index.js +2 -2
- package/dist/src/sbtc/index.cjs +12 -4
- package/dist/src/sbtc/index.cjs.map +5 -5
- package/dist/src/sbtc/index.js +2 -2
- package/dist/src/stackingdao/index.cjs +12 -4
- package/dist/src/stackingdao/index.cjs.map +5 -5
- package/dist/src/stackingdao/index.js +2 -2
- package/dist/src/utils/index.cjs +7 -2
- package/dist/src/utils/index.cjs.map +3 -3
- package/dist/src/utils/index.d.cts +8 -1
- package/dist/src/utils/index.d.ts +8 -1
- package/dist/src/utils/index.js +7 -2
- package/dist/src/utils/index.js.map +3 -3
- package/package.json +2 -2
- /package/dist/shared/{stacks-esm-17adzt3x.js.map → stacks-esm-p3rrvmd8.js.map} +0 -0
|
@@ -1031,6 +1031,8 @@ declare function transferStx(client: Client, params: TransferStxParams): Promise
|
|
|
1031
1031
|
type CallContractParams = {
|
|
1032
1032
|
contract: string
|
|
1033
1033
|
functionName: string
|
|
1034
|
+
args?: ClarityValue[]
|
|
1035
|
+
/** @deprecated Use `args` (same as readContract). */
|
|
1034
1036
|
functionArgs?: ClarityValue[]
|
|
1035
1037
|
fee?: FeeParam
|
|
1036
1038
|
nonce?: IntegerType
|
|
@@ -1031,6 +1031,8 @@ declare function transferStx(client: Client, params: TransferStxParams): Promise
|
|
|
1031
1031
|
type CallContractParams = {
|
|
1032
1032
|
contract: string
|
|
1033
1033
|
functionName: string
|
|
1034
|
+
args?: ClarityValue[]
|
|
1035
|
+
/** @deprecated Use `args` (same as readContract). */
|
|
1034
1036
|
functionArgs?: ClarityValue[]
|
|
1035
1037
|
fee?: FeeParam
|
|
1036
1038
|
nonce?: IntegerType
|
|
@@ -20,14 +20,14 @@ import {
|
|
|
20
20
|
signTransactionAction2,
|
|
21
21
|
sponsorTransaction2,
|
|
22
22
|
transferStx2
|
|
23
|
-
} from "../../shared/stacks-esm-
|
|
23
|
+
} from "../../shared/stacks-esm-p3rrvmd8.js";
|
|
24
24
|
import"../../shared/stacks-esm-ev07d2aw.js";
|
|
25
25
|
import {
|
|
26
26
|
getContract2,
|
|
27
27
|
buildFunctionArgs2,
|
|
28
28
|
isResponseOutput2,
|
|
29
29
|
ContractResponseError2
|
|
30
|
-
} from "../../shared/stacks-esm-
|
|
30
|
+
} from "../../shared/stacks-esm-75qv0d9h.js";
|
|
31
31
|
import {
|
|
32
32
|
getBalance2,
|
|
33
33
|
getDataVar2,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
isNoEstimateAvailable2,
|
|
50
50
|
resolveFee2,
|
|
51
51
|
callContract2
|
|
52
|
-
} from "../../shared/stacks-esm-
|
|
52
|
+
} from "../../shared/stacks-esm-8chm2wtn.js";
|
|
53
53
|
import {
|
|
54
54
|
readContract2
|
|
55
55
|
} from "../../shared/stacks-esm-hm7kb2cp.js";
|
package/dist/src/bns/index.cjs
CHANGED
|
@@ -3274,6 +3274,13 @@ function assertNoFeeTierForProvider(fee) {
|
|
|
3274
3274
|
throw new Error(`Fee tier '${fee}' requires local signing; provider (wallet) accounts set their own fee`);
|
|
3275
3275
|
}
|
|
3276
3276
|
}
|
|
3277
|
+
function resolveCallArgs(params) {
|
|
3278
|
+
const { args, functionArgs } = params;
|
|
3279
|
+
if (args !== undefined && functionArgs !== undefined) {
|
|
3280
|
+
throw new Error("Pass args or functionArgs, not both (functionArgs is deprecated)");
|
|
3281
|
+
}
|
|
3282
|
+
return args ?? functionArgs ?? [];
|
|
3283
|
+
}
|
|
3277
3284
|
|
|
3278
3285
|
// src/actions/wallet/callContract.ts
|
|
3279
3286
|
async function callContract(client, params) {
|
|
@@ -3281,12 +3288,13 @@ async function callContract(client, params) {
|
|
|
3281
3288
|
if (!account)
|
|
3282
3289
|
throw new Error("Account required");
|
|
3283
3290
|
const [contractAddress, contractName] = parseContractId(params.contract);
|
|
3291
|
+
const args = resolveCallArgs(params);
|
|
3284
3292
|
if (isProviderAccount(account)) {
|
|
3285
3293
|
assertNoFeeTierForProvider(params.fee);
|
|
3286
3294
|
const result = await account.provider.request("stx_callContract", {
|
|
3287
3295
|
contract: params.contract,
|
|
3288
3296
|
functionName: params.functionName,
|
|
3289
|
-
functionArgs:
|
|
3297
|
+
functionArgs: args
|
|
3290
3298
|
});
|
|
3291
3299
|
return result.txid;
|
|
3292
3300
|
}
|
|
@@ -3298,7 +3306,7 @@ async function callContract(client, params) {
|
|
|
3298
3306
|
contractAddress,
|
|
3299
3307
|
contractName,
|
|
3300
3308
|
functionName: params.functionName,
|
|
3301
|
-
functionArgs:
|
|
3309
|
+
functionArgs: args,
|
|
3302
3310
|
fee: needsFeeResolution ? 0n : params.fee,
|
|
3303
3311
|
nonce,
|
|
3304
3312
|
publicKey: account.publicKey,
|
|
@@ -3380,7 +3388,7 @@ function getContract(params) {
|
|
|
3380
3388
|
return callContract(client, {
|
|
3381
3389
|
contract: contractId,
|
|
3382
3390
|
functionName: fn.name,
|
|
3383
|
-
|
|
3391
|
+
args: clarityArgs,
|
|
3384
3392
|
...options
|
|
3385
3393
|
});
|
|
3386
3394
|
};
|
|
@@ -5044,5 +5052,5 @@ function bns() {
|
|
|
5044
5052
|
});
|
|
5045
5053
|
}
|
|
5046
5054
|
|
|
5047
|
-
//# debugId=
|
|
5055
|
+
//# debugId=A9DAE49794B4075B64756E2164756E21
|
|
5048
5056
|
//# sourceMappingURL=index.cjs.map
|