stxer 0.8.0 → 0.9.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,29 @@ 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.9.0
8
+
9
+ Adopts Stacks **Epoch 4.0 / Clarity 6** (stacks-core 4.0.1).
10
+
11
+ ### Added
12
+
13
+ - `'Epoch40'` member on the `ClarityEpoch` union and `'Clarity6'` on
14
+ `ClarityVersionName`; `parseContract` now accepts
15
+ `clarityVersion: '6'`.
16
+ - `ClarityVersion.Clarity6` accepted by `addContractDeploy` /
17
+ `addSetContractCode` (via the upgraded `@stacks/transactions`), and
18
+ serialized as wire value `6` for `SetContractCode` steps.
19
+
20
+ ### Changed
21
+
22
+ - `@stacks/transactions` bumped `7.4.0` → `7.5.0` (first release whose
23
+ `ClarityVersion` enum includes `Clarity6`).
24
+ - Unknown future clarity versions now serialize as `6` (previously
25
+ silently clamped to `5`).
26
+ - Deploy defaults remain `ClarityVersion.Clarity5` until Epoch 4.0
27
+ activates on mainnet (burn height 960,230); pass
28
+ `clarity_version: ClarityVersion.Clarity6` explicitly to opt in.
29
+
7
30
  ## 0.8.0
8
31
 
9
32
  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
  /**