Skip to content

Commit 68ff1d3

Browse files
Merge pull request #64 from IntersectMBO/changeset-release/main
ci(changesets): version packages
2 parents 136e125 + ae618d7 commit 68ff1d3

File tree

6 files changed

+75
-68
lines changed

6 files changed

+75
-68
lines changed

.changeset/brave-keys-dance.md

Lines changed: 0 additions & 61 deletions
This file was deleted.

.changeset/silent-forks-bow.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# docs
22

3+
## 0.0.2
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`7bb1da3`](https://github.com/IntersectMBO/evolution-sdk/commit/7bb1da32488c5a1a92a9c8b90e5aa4514e004232), [`844dfec`](https://github.com/IntersectMBO/evolution-sdk/commit/844dfeccb48c0af0ce0cebfc67e6cdcc67e28cc8)]:
8+
- @evolution-sdk/evolution@0.2.2
9+
310
## 0.0.1
411

512
### Patch Changes

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docs",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"private": true,
55
"type": "module",
66
"scripts": {

packages/evolution/CHANGELOG.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,71 @@
11
# @evolution-sdk/evolution
22

3+
## 0.2.2
4+
5+
### Patch Changes
6+
7+
- [#63](https://github.com/IntersectMBO/evolution-sdk/pull/63) [`7bb1da3`](https://github.com/IntersectMBO/evolution-sdk/commit/7bb1da32488c5a1a92a9c8b90e5aa4514e004232) Thanks [@solidsnakedev](https://github.com/solidsnakedev)! - Improve `Variant` type inference with `PropertyKey` constraint
8+
9+
The `Variant` helper now accepts `PropertyKey` (string | number | symbol) as variant keys instead of just strings, enabling more flexible discriminated union patterns.
10+
11+
**Before:**
12+
13+
```typescript
14+
// Only string keys were properly typed
15+
const MyVariant = TSchema.Variant({
16+
Success: { value: TSchema.Integer },
17+
Error: { message: TSchema.ByteArray }
18+
})
19+
```
20+
21+
**After:**
22+
23+
```typescript
24+
// Now supports symbols and numbers as variant keys
25+
const MyVariant = TSchema.Variant({
26+
Success: { value: TSchema.Integer },
27+
Error: { message: TSchema.ByteArray }
28+
})
29+
// Type inference is improved, especially with const assertions
30+
```
31+
32+
Replace `@ts-expect-error` with `as any` following Effect patterns
33+
34+
Improved code quality by replacing forbidden `@ts-expect-error` directives with explicit `as any` type assertions, consistent with Effect Schema's approach for dynamic object construction.
35+
36+
Add comprehensive Cardano Address type support
37+
38+
Added full CBOR encoding support for Cardano address structures with Aiken compatibility:
39+
40+
```typescript
41+
const Credential = TSchema.Variant({
42+
VerificationKey: { hash: TSchema.ByteArray },
43+
Script: { hash: TSchema.ByteArray }
44+
})
45+
46+
const Address = TSchema.Struct({
47+
payment_credential: Credential,
48+
stake_credential: TSchema.UndefinedOr(
49+
TSchema.Variant({
50+
Inline: { credential: Credential },
51+
Pointer: {
52+
slot_number: TSchema.Integer,
53+
transaction_index: TSchema.Integer,
54+
certificate_index: TSchema.Integer
55+
}
56+
})
57+
)
58+
})
59+
60+
// Creates proper CBOR encoding matching Aiken's output
61+
const address = Data.withSchema(Address).toData({
62+
payment_credential: { VerificationKey: { hash } },
63+
stake_credential: { Inline: { credential: { VerificationKey: { stakeHash } } } }
64+
})
65+
```
66+
67+
- [#63](https://github.com/IntersectMBO/evolution-sdk/pull/63) [`844dfec`](https://github.com/IntersectMBO/evolution-sdk/commit/844dfeccb48c0af0ce0cebfc67e6cdcc67e28cc8) Thanks [@solidsnakedev](https://github.com/solidsnakedev)! - Add Aiken-compatible CBOR encoding with encodeMapAsPairs option and comprehensive test suite. PlutusData maps can now encode as arrays of pairs (Aiken style) or CBOR maps (CML style). Includes 72 Aiken reference tests and 40 TypeScript compatibility tests verifying identical encoding. Also fixes branded schema pattern in Data.ts for cleaner type inference and updates TSchema error handling test.
68+
369
## 0.2.1
470

571
### Patch Changes

packages/evolution/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@evolution-sdk/evolution",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "A modern TypeScript SDK for Cardano blockchain development",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)