@secondlayer/stacks 2.21.1 → 2.22.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 +6 -5
- package/dist/shared/stacks-9mqveyjv.cjs.map +2 -2
- package/dist/shared/{stacks-cdvn8qbh.cjs → stacks-b221qkst.cjs} +4 -3
- package/dist/shared/stacks-b221qkst.cjs.map +10 -0
- package/dist/shared/{stacks-0x50nn01.cjs → stacks-byyex2zk.cjs} +3 -2
- package/dist/shared/{stacks-0x50nn01.cjs.map → stacks-byyex2zk.cjs.map} +2 -2
- package/dist/shared/{stacks-rb9shyk8.js → stacks-ch5vshcd.js} +4 -4
- package/dist/shared/stacks-ch5vshcd.js.map +10 -0
- package/dist/shared/{stacks-f0hfqaj5.js → stacks-cyeajysa.js} +2 -2
- package/dist/shared/{stacks-msmgyerb.js → stacks-r2yw4xzb.js} +4 -3
- package/dist/shared/stacks-r2yw4xzb.js.map +10 -0
- package/dist/src/actions/index.cjs +3 -1
- package/dist/src/actions/index.cjs.map +1 -1
- package/dist/src/actions/index.d.cts +16 -1
- package/dist/src/actions/index.d.ts +16 -1
- package/dist/src/actions/index.js +9 -5
- package/dist/src/actions/index.js.map +1 -1
- package/dist/src/bitcoin/index.js +1 -1
- package/dist/src/bns/index.js +2 -2
- package/dist/src/clarity/index.d.cts +3 -1
- package/dist/src/clarity/index.d.ts +3 -1
- package/dist/src/clarity/index.js +3 -1
- package/dist/src/clarity/index.js.map +1 -1
- package/dist/src/index.d.cts +6 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.js +2 -2
- package/dist/src/pox/index.js +2 -2
- package/dist/src/pox5/index.js +3 -3
- package/dist/src/sbtc/index.js +2 -2
- package/dist/src/stackingdao/index.js +2 -2
- package/dist/src/tools/index.cjs +3 -2
- package/dist/src/tools/index.cjs.map +4 -4
- package/dist/src/tools/index.js +3 -2
- package/dist/src/tools/index.js.map +4 -4
- package/package.json +4 -2
- package/dist/shared/stacks-cdvn8qbh.cjs.map +0 -10
- package/dist/shared/stacks-msmgyerb.js.map +0 -10
- package/dist/shared/stacks-rb9shyk8.js.map +0 -10
- /package/dist/shared/{stacks-f0hfqaj5.js.map → stacks-cyeajysa.js.map} +0 -0
|
@@ -939,4 +939,6 @@ declare function jsToClarityValue(abiType: AbiType, value: unknown): ClarityValu
|
|
|
939
939
|
* Convert a ClarityValue back to a typed JS value using ABI type information.
|
|
940
940
|
*/
|
|
941
941
|
declare function clarityValueToJS<T extends AbiType>(abiType: T, cv: ClarityValue): AbiToTS<T>;
|
|
942
|
-
|
|
942
|
+
/** Non-generic version for internal use — avoids deep type instantiation. */
|
|
943
|
+
declare function clarityValueToJSUntyped(abiType: AbiType, cv: ClarityValue): unknown;
|
|
944
|
+
export { validateArgsArray, validateArgs, uintCV, tupleCV, trueCV, toCamelCase, stringUtf8CV, stringAsciiCV, standardPrincipalCV, someCV, sip013Abi, sip010Abi, sip009Abi, serializeCVBytes, serializeCV, responseOkCV, responseErrorCV, prettyPrint, prepareArgs, parseDeclaredStandards, normalizeType, normalizeAccess, normalizeAbi, noneCV, listCV, jsToClarityValue, jsToClarity, isUint8Array, isUint128, isTraitReference, isString, isStandardPrincipal, isResponse, isPrincipal, isOptional, isOkResponse, isInt128, isErrResponse, isContractPrincipal, isClarityValue, isBool, isArray, isAbiTuple, isAbiTraitReference, isAbiStringUtf8, isAbiStringAscii, isAbiResponse, isAbiOptional, isAbiList, isAbiBuffer, intCV, falseCV, deserializeCVBytes, deserializeCV, cvToValue, cvToString, cvToPrincipal, cvToJSON, cvToBuffer, cvToBoolean, cvToBigInt, contractPrincipalCV, classifyContract, clarityValueToJSUntyped, clarityValueToJS, clarityTypeFromByte, bufferCV, boolCV, VariableAccess, UIntCV, TypedAbi, TupleData, TupleCV, TrueCV, TraitFunctionAccess, ToCamelCase, TRAIT_STANDARDS, StringUtf8CV, StringAsciiCV, StandardPrincipalCV, SomeCV, SipStandard, SIP013_ABI, SIP010_ABI, SIP009_ABI, ResponseOkCV, ResponseOk, ResponseErrorCV, ResponseErr, ResponseCV, Response, PrincipalCV, OptionalCV, NoneCV, ListCV, IntCV, FunctionArg, FunctionAccess, FalseCV, ExtractVariableType, ExtractVariableNames, ExtractVariable, ExtractReadOnlyFunctions, ExtractPublicFunctions, ExtractPrivateFunctions, ExtractNonFungibleTokenNames, ExtractNFTAssetType, ExtractMapValue, ExtractMapNames, ExtractMapKey, ExtractMap, ExtractImplementedTraits, ExtractFungibleTokenNames, ExtractFunctionOutput, ExtractFunctionNames, ExtractFunctionArgs, ExtractFunction, ExtractDefinedTraitNames, ExtractDataVars, ExtractConstants, ContractTypes, ContractPrincipalCV, ClarityWireType, ClarityValue, ClarityType, ClarityConversionError, Cl, CONTRACT_NAME_REGEX, BufferCV, BooleanCV, AbiVariable, AbiUInt128, AbiTypesOf, AbiType, AbiTupleType, AbiTuple, AbiTraitReference, AbiTraitFunction, AbiTraitDefinition, AbiToTS, AbiStringUtf8, AbiStringAscii, AbiResponseType, AbiResponse, AbiPrincipal, AbiPrimitiveType, AbiOptionalType, AbiOptional, AbiNone, AbiNonFungibleToken, AbiMap, AbiListType, AbiList, AbiInt128, AbiFungibleToken, AbiFunction, AbiContract, AbiBuffer, AbiBool };
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
CONTRACT_NAME_REGEX,
|
|
32
32
|
clarityValueToJS,
|
|
33
|
+
clarityValueToJSUntyped,
|
|
33
34
|
isAbiBuffer,
|
|
34
35
|
isAbiList,
|
|
35
36
|
isAbiOptional,
|
|
@@ -148,6 +149,7 @@ export {
|
|
|
148
149
|
cvToBigInt,
|
|
149
150
|
contractPrincipalCV,
|
|
150
151
|
classifyContract,
|
|
152
|
+
clarityValueToJSUntyped,
|
|
151
153
|
clarityValueToJS,
|
|
152
154
|
clarityTypeFromByte,
|
|
153
155
|
bufferCV,
|
|
@@ -162,5 +164,5 @@ export {
|
|
|
162
164
|
CONTRACT_NAME_REGEX
|
|
163
165
|
};
|
|
164
166
|
|
|
165
|
-
//# debugId=
|
|
167
|
+
//# debugId=96BCB87DB4AF6C6964756E2164756E21
|
|
166
168
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.d.cts
CHANGED
|
@@ -736,6 +736,12 @@ type ReadContractParams = {
|
|
|
736
736
|
functionName: string
|
|
737
737
|
args?: ClarityValue[]
|
|
738
738
|
sender?: string
|
|
739
|
+
/**
|
|
740
|
+
* Nakamoto StacksBlockId to evaluate against. Without it the node answers
|
|
741
|
+
* at its own moving tip, which makes a read non-deterministic — the same
|
|
742
|
+
* reindex of the same block can return a different value.
|
|
743
|
+
*/
|
|
744
|
+
tip?: string
|
|
739
745
|
};
|
|
740
746
|
declare class BaseError extends Error {
|
|
741
747
|
name: string;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -736,6 +736,12 @@ type ReadContractParams = {
|
|
|
736
736
|
functionName: string
|
|
737
737
|
args?: ClarityValue[]
|
|
738
738
|
sender?: string
|
|
739
|
+
/**
|
|
740
|
+
* Nakamoto StacksBlockId to evaluate against. Without it the node answers
|
|
741
|
+
* at its own moving tip, which makes a read non-deterministic — the same
|
|
742
|
+
* reindex of the same block can return a different value.
|
|
743
|
+
*/
|
|
744
|
+
tip?: string
|
|
739
745
|
};
|
|
740
746
|
declare class BaseError extends Error {
|
|
741
747
|
name: string;
|
package/dist/src/index.js
CHANGED
|
@@ -29,14 +29,14 @@ import {
|
|
|
29
29
|
} from "../shared/stacks-1x9b2k5y.js";
|
|
30
30
|
import {
|
|
31
31
|
multicall
|
|
32
|
-
} from "../shared/stacks-
|
|
32
|
+
} from "../shared/stacks-cyeajysa.js";
|
|
33
33
|
import {
|
|
34
34
|
callContract,
|
|
35
35
|
getMapEntry
|
|
36
36
|
} from "../shared/stacks-bq0weg6n.js";
|
|
37
37
|
import {
|
|
38
38
|
readContract
|
|
39
|
-
} from "../shared/stacks-
|
|
39
|
+
} from "../shared/stacks-r2yw4xzb.js";
|
|
40
40
|
import {
|
|
41
41
|
WebSocketError,
|
|
42
42
|
watchAddress,
|
package/dist/src/pox/index.js
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
getContract,
|
|
7
7
|
resolveNetworkContract
|
|
8
|
-
} from "../../shared/stacks-
|
|
8
|
+
} from "../../shared/stacks-ch5vshcd.js";
|
|
9
9
|
import"../../shared/stacks-bq0weg6n.js";
|
|
10
|
-
import"../../shared/stacks-
|
|
10
|
+
import"../../shared/stacks-r2yw4xzb.js";
|
|
11
11
|
import"../../shared/stacks-mbnfwekf.js";
|
|
12
12
|
import"../../shared/stacks-fh48neva.js";
|
|
13
13
|
import"../../shared/stacks-709tra19.js";
|
package/dist/src/pox5/index.js
CHANGED
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
} from "../../shared/stacks-5nmz5ad9.js";
|
|
10
10
|
import {
|
|
11
11
|
getContract
|
|
12
|
-
} from "../../shared/stacks-
|
|
12
|
+
} from "../../shared/stacks-ch5vshcd.js";
|
|
13
13
|
import {
|
|
14
14
|
multicall
|
|
15
|
-
} from "../../shared/stacks-
|
|
15
|
+
} from "../../shared/stacks-cyeajysa.js";
|
|
16
16
|
import"../../shared/stacks-bq0weg6n.js";
|
|
17
|
-
import"../../shared/stacks-
|
|
17
|
+
import"../../shared/stacks-r2yw4xzb.js";
|
|
18
18
|
import"../../shared/stacks-mbnfwekf.js";
|
|
19
19
|
import"../../shared/stacks-fh48neva.js";
|
|
20
20
|
import"../../shared/stacks-709tra19.js";
|
package/dist/src/sbtc/index.js
CHANGED
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
getContract,
|
|
11
11
|
resolveNetworkContract
|
|
12
|
-
} from "../../shared/stacks-
|
|
12
|
+
} from "../../shared/stacks-ch5vshcd.js";
|
|
13
13
|
import"../../shared/stacks-bq0weg6n.js";
|
|
14
|
-
import"../../shared/stacks-
|
|
14
|
+
import"../../shared/stacks-r2yw4xzb.js";
|
|
15
15
|
import"../../shared/stacks-mbnfwekf.js";
|
|
16
16
|
import"../../shared/stacks-fh48neva.js";
|
|
17
17
|
import"../../shared/stacks-709tra19.js";
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
} from "../../shared/stacks-kg1npstf.js";
|
|
4
4
|
import {
|
|
5
5
|
getContract
|
|
6
|
-
} from "../../shared/stacks-
|
|
6
|
+
} from "../../shared/stacks-ch5vshcd.js";
|
|
7
7
|
import"../../shared/stacks-bq0weg6n.js";
|
|
8
|
-
import"../../shared/stacks-
|
|
8
|
+
import"../../shared/stacks-r2yw4xzb.js";
|
|
9
9
|
import"../../shared/stacks-mbnfwekf.js";
|
|
10
10
|
import"../../shared/stacks-fh48neva.js";
|
|
11
11
|
import"../../shared/stacks-709tra19.js";
|
package/dist/src/tools/index.cjs
CHANGED
|
@@ -1140,7 +1140,8 @@ async function readContract(client, params) {
|
|
|
1140
1140
|
const [address, name] = parseContractId(params.contract);
|
|
1141
1141
|
const sender = params.sender ?? address;
|
|
1142
1142
|
const serializedArgs = (params.args ?? []).map((arg) => with0x(bytesToHex(serializeCVBytes(arg))));
|
|
1143
|
-
const
|
|
1143
|
+
const path = `/v2/contracts/call-read/${address}/${name}/${params.functionName}`;
|
|
1144
|
+
const data = await client.request(params.tip ? `${path}?tip=${params.tip}` : path, {
|
|
1144
1145
|
method: "POST",
|
|
1145
1146
|
body: {
|
|
1146
1147
|
sender,
|
|
@@ -3480,5 +3481,5 @@ var getNftHoldings2 = import_ai.tool({
|
|
|
3480
3481
|
execute: ({ principal, limit }) => nftHoldings(getDefaultPublicClient(), principal, limit)
|
|
3481
3482
|
});
|
|
3482
3483
|
|
|
3483
|
-
//# debugId=
|
|
3484
|
+
//# debugId=A7F2B23449A4DB1C64756E2164756E21
|
|
3484
3485
|
//# sourceMappingURL=index.cjs.map
|