stxer 0.4.5 → 0.7.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 +388 -18
- package/dist/ast.d.ts +32 -0
- package/dist/{BatchAPI.d.ts → batch-api.d.ts} +2 -1
- package/dist/clarity-api.d.ts +1 -1
- package/dist/constants.d.ts +9 -0
- package/dist/index.d.ts +6 -1
- package/dist/simulation-api.d.ts +138 -0
- package/dist/simulation.d.ts +12 -4
- package/dist/stxer.cjs.development.js +705 -287
- package/dist/stxer.cjs.development.js.map +1 -1
- package/dist/stxer.cjs.production.min.js +1 -1
- package/dist/stxer.cjs.production.min.js.map +1 -1
- package/dist/stxer.esm.js +696 -288
- package/dist/stxer.esm.js.map +1 -1
- package/dist/tip.d.ts +16 -0
- package/dist/types.d.ts +598 -0
- package/package.json +19 -12
- package/src/ast.ts +120 -0
- package/src/{BatchAPI.ts → batch-api.ts} +9 -8
- package/src/{BatchProcessor.ts → batch-processor.ts} +1 -1
- package/src/clarity-api.ts +1 -1
- package/src/constants.ts +12 -0
- package/src/index.ts +10 -1
- package/src/simulation-api.ts +273 -0
- package/src/simulation.ts +169 -138
- package/src/tip.ts +42 -0
- package/src/types.ts +700 -0
- package/dist/sample/counter.d.ts +0 -1
- package/dist/sample/read.d.ts +0 -1
- package/src/sample/counter.ts +0 -42
- package/src/sample/read.ts +0 -139
- /package/dist/{BatchProcessor.d.ts → batch-processor.d.ts} +0 -0
package/dist/simulation.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { type StacksNetworkName } from '@stacks/network';
|
|
2
|
-
import { type ClarityValue, ClarityVersion
|
|
2
|
+
import { type ClarityValue, ClarityVersion } from '@stacks/transactions';
|
|
3
|
+
import type { ReadStep } from './types';
|
|
3
4
|
export interface SimulationEval {
|
|
4
5
|
contract_id: string;
|
|
5
6
|
code: string;
|
|
6
7
|
}
|
|
7
|
-
export declare function runEval({ contract_id, code }: SimulationEval): import("@stacks/transactions").TupleCV<import("@stacks/transactions").TupleData<import("@stacks/transactions").BufferCV | import("@stacks/transactions").UIntCV>>;
|
|
8
|
-
export declare function runSimulation(apiEndpoint: string, block_hash: string, block_height: number, txs: (StacksTransactionWire | SimulationEval)[]): Promise<string>;
|
|
9
8
|
interface SimulationBuilderOptions {
|
|
10
9
|
apiEndpoint?: string;
|
|
11
10
|
stacksNodeAPI?: string;
|
|
12
11
|
network?: StacksNetworkName | string;
|
|
12
|
+
skipTracing?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare class SimulationBuilder {
|
|
15
15
|
private apiEndpoint;
|
|
16
16
|
private stacksNodeAPI;
|
|
17
17
|
private network;
|
|
18
|
+
private skipTracing;
|
|
18
19
|
private constructor();
|
|
19
20
|
static new(options?: SimulationBuilderOptions): SimulationBuilder;
|
|
20
21
|
private block;
|
|
@@ -46,8 +47,15 @@ export declare class SimulationBuilder {
|
|
|
46
47
|
addEvalCode(inside_contract_id: string, code: string): this;
|
|
47
48
|
addMapRead(contract_id: string, map: string, key: string): this;
|
|
48
49
|
addVarRead(contract_id: string, variable: string): this;
|
|
50
|
+
addSetContractCode(params: {
|
|
51
|
+
contract_id: string;
|
|
52
|
+
source_code: string;
|
|
53
|
+
clarity_version?: ClarityVersion;
|
|
54
|
+
}): this;
|
|
55
|
+
addReads(reads: ReadStep[]): this;
|
|
56
|
+
addTenureExtend(): this;
|
|
49
57
|
private getBlockInfo;
|
|
50
58
|
run(): Promise<string>;
|
|
51
59
|
pipe(transform: (builder: SimulationBuilder) => SimulationBuilder): SimulationBuilder;
|
|
52
60
|
}
|
|
53
|
-
export {};
|
|
61
|
+
export type { CreateSimulationRequest, ExecutionCost, InstantSimulationRequest, InstantSimulationResponse, ReadResult, ReadStep, SimulationMetadata, SimulationResult, SimulationStepInput, TransactionReceipt, } from './types';
|