stxer 0.8.0 → 0.10.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/CHANGELOG.md CHANGED
@@ -4,6 +4,39 @@ All notable changes to the `stxer` SDK are documented here. The format
4
4
  loosely follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
5
5
  versioning is [SemVer](https://semver.org/).
6
6
 
7
+ ## 0.10.0
8
+
9
+ ### Removed
10
+
11
+ - **Breaking (types):** `'Epoch35'` removed from the `ClarityEpoch`
12
+ union. The epoch never activated — stacks-core 4.0.1 goes
13
+ `Epoch34` → `Epoch40` — and the upgraded parser backend returns a
14
+ 500 for its wire value (`0x03005`), so any code passing it was
15
+ already broken at runtime.
16
+
17
+ ## 0.9.0
18
+
19
+ Adopts Stacks **Epoch 4.0 / Clarity 6** (stacks-core 4.0.1).
20
+
21
+ ### Added
22
+
23
+ - `'Epoch40'` member on the `ClarityEpoch` union and `'Clarity6'` on
24
+ `ClarityVersionName`; `parseContract` now accepts
25
+ `clarityVersion: '6'`.
26
+ - `ClarityVersion.Clarity6` accepted by `addContractDeploy` /
27
+ `addSetContractCode` (via the upgraded `@stacks/transactions`), and
28
+ serialized as wire value `6` for `SetContractCode` steps.
29
+
30
+ ### Changed
31
+
32
+ - `@stacks/transactions` bumped `7.4.0` → `7.5.0` (first release whose
33
+ `ClarityVersion` enum includes `Clarity6`).
34
+ - Unknown future clarity versions now serialize as `6` (previously
35
+ silently clamped to `5`).
36
+ - Deploy defaults remain `ClarityVersion.Clarity5` until Epoch 4.0
37
+ activates on mainnet (burn height 960,230); pass
38
+ `clarity_version: ClarityVersion.Clarity6` explicitly to opt in.
39
+
7
40
  ## 0.8.0
8
41
 
9
42
  Pairs with **stxer-api ≥ schema-v2** (the simulator build that ships
package/README.md CHANGED
@@ -70,7 +70,7 @@ const simulationId = await SimulationBuilder.new({
70
70
  contract_name: 'my-contract',
71
71
  source_code: '(define-public (hello) (ok "world"))',
72
72
  deployer: 'SP...', // Optional: overrides default sender
73
- clarity_version: 4, // 1 / 2 / 3 / 4 — or `ClarityVersion.Clarity4` from `@stacks/transactions`
73
+ clarity_version: 4, // 1 / 2 / 3 / 4 / 5 / 6 — or `ClarityVersion.Clarity6` from `@stacks/transactions`
74
74
  })
75
75
  .run();
76
76
 
@@ -370,7 +370,7 @@ console.log(ast.abi);
370
370
  const parsed = await parseContract({
371
371
  contractId: 'SP...contract-name',
372
372
  sourceCode: '(define-public (hello) (ok "world"))',
373
- clarityVersion: '4', // Optional: '1' | '2' | '3' | '4'
373
+ clarityVersion: '4', // Optional: '1' | '2' | '3' | '4' | '5' | '6'
374
374
  epoch: 'Epoch33' // Optional
375
375
  });
376
376
  ```
@@ -707,7 +707,7 @@ on GitHub.
707
707
  ### Contract AST
708
708
 
709
709
  - `getContractAST({ contractId, stxerApi? })` — Fetch on-chain contract AST
710
- - `parseContract({ sourceCode, contractId, clarityVersion?, epoch?, stxerApi? })` — Parse source code to AST. `clarityVersion` is `ClarityVersionName` (`'Clarity1' | ... | 'Clarity4'`) — distinct from `@stacks/transactions`'s numeric `ClarityVersion` enum
710
+ - `parseContract({ sourceCode, contractId, clarityVersion?, epoch?, stxerApi? })` — Parse source code to AST. `clarityVersion` is `ClarityVersionName` (`'Clarity1' | ... | 'Clarity6'`) — distinct from `@stacks/transactions`'s numeric `ClarityVersion` enum
711
711
 
712
712
  ### Batch operations
713
713
 
package/dist/ast.d.ts CHANGED
@@ -20,7 +20,7 @@ export declare function getContractAST(options: GetContractAstOptions): Promise<
20
20
  export interface ParseContractOptions extends AstOptions {
21
21
  sourceCode: string;
22
22
  contractId: string;
23
- clarityVersion?: '1' | '2' | '3' | '4' | '5';
23
+ clarityVersion?: '1' | '2' | '3' | '4' | '5' | '6';
24
24
  epoch?: ClarityEpoch;
25
25
  }
26
26
  /**
@@ -1980,8 +1980,10 @@ function clarityVersionToNumber(version) {
1980
1980
  return 4;
1981
1981
  case transactions.ClarityVersion.Clarity5:
1982
1982
  return 5;
1983
+ case transactions.ClarityVersion.Clarity6:
1984
+ return 6;
1983
1985
  default:
1984
- return 5;
1986
+ return 6;
1985
1987
  }
1986
1988
  }
1987
1989
  /**