|
1 | 1 | # @evolution-sdk/evolution |
2 | 2 |
|
| 3 | +## 0.3.7 |
| 4 | + |
| 5 | +### Patch Changes |
| 6 | + |
| 7 | +- [#112](https://github.com/IntersectMBO/evolution-sdk/pull/112) [`c59507e`](https://github.com/IntersectMBO/evolution-sdk/commit/c59507eafd942cd5bce1d3608c9c3e9c99a4cac8) Thanks [@solidsnakedev](https://github.com/solidsnakedev)! - Add transaction chaining support via `SignBuilder.chainResult()` |
| 8 | + - Add `chainResult()` method to `SignBuilder` for building dependent transactions |
| 9 | + - Returns `ChainResult` with `consumed`, `available` UTxOs and pre-computed `txHash` |
| 10 | + - Lazy evaluation with memoization - computed on first call, cached for subsequent calls |
| 11 | + - Add `signAndSubmit()` convenience method combining sign and submit in one call |
| 12 | + - Remove redundant `chain()`, `chainEffect()`, `chainEither()` methods from TransactionBuilder |
| 13 | + |
| 14 | +- [#110](https://github.com/IntersectMBO/evolution-sdk/pull/110) [`9ddc79d`](https://github.com/IntersectMBO/evolution-sdk/commit/9ddc79dbc9b6667b3f2981dd06875878d9ad14f5) Thanks [@solidsnakedev](https://github.com/solidsnakedev)! - ### Native Scripts & Multi-Sig Support |
| 15 | + - **`addSigner` operation**: Add required signers to transactions for multi-sig and script validation |
| 16 | + - **Native script minting**: Full support for `ScriptAll`, `ScriptAny`, `ScriptNOfK`, `InvalidBefore`, `InvalidHereafter` |
| 17 | + - **Reference scripts**: Use native scripts via `readFrom` instead of attaching them to transactions |
| 18 | + - **Multi-sig spending**: Spend from native script addresses with multi-party signing |
| 19 | + - **Improved fee calculation**: Accurate fee estimation for transactions with native scripts and reference scripts |
| 20 | + |
| 21 | + ### API Changes |
| 22 | + - `UTxO.scriptRef` type changed from `ScriptRef` to `Script` for better type safety |
| 23 | + - `PayToAddressParams.scriptRef` renamed to `script` for consistency |
| 24 | + - Wallet `signTx` now accepts `referenceUtxos` context for native script signer detection |
| 25 | + - Client `signTx` auto-fetches reference UTxOs when signing transactions with reference inputs |
| 26 | + |
| 27 | +- [#109](https://github.com/IntersectMBO/evolution-sdk/pull/109) [`0730f23`](https://github.com/IntersectMBO/evolution-sdk/commit/0730f2353490ff1fa75743cccc0d05b33cff1b23) Thanks [@solidsnakedev](https://github.com/solidsnakedev)! - ### TxBuilder setValidity API |
| 28 | + |
| 29 | + Add `setValidity()` method to TxBuilder for setting transaction validity intervals: |
| 30 | + |
| 31 | + ```ts |
| 32 | + client.newTx() |
| 33 | + .setValidity({ |
| 34 | + from: Date.now(), // Valid after this Unix time (optional) |
| 35 | + to: Date.now() + 300_000 // Expires after this Unix time (optional) |
| 36 | + }) |
| 37 | + .payToAddress({ ... }) |
| 38 | + .build() |
| 39 | + ``` |
| 40 | + |
| 41 | + - Times are provided as Unix milliseconds and converted to slots during transaction assembly |
| 42 | + - At least one of `from` or `to` must be specified |
| 43 | + - Validates that `from < to` when both are provided |
| 44 | + |
| 45 | + ### slotConfig support for devnets |
| 46 | + |
| 47 | + Add `slotConfig` parameter to `createClient()` for custom slot configurations: |
| 48 | + |
| 49 | + ```ts |
| 50 | + const slotConfig = Cluster.getSlotConfig(devnetCluster) |
| 51 | + const client = createClient({ |
| 52 | + network: 0, |
| 53 | + slotConfig, // Custom slot config for devnet |
| 54 | + provider: { ... }, |
| 55 | + wallet: { ... } |
| 56 | + }) |
| 57 | + ``` |
| 58 | + |
| 59 | + Priority chain for slot config resolution: |
| 60 | + 1. `BuildOptions.slotConfig` (per-transaction override) |
| 61 | + 2. `TxBuilderConfig.slotConfig` (client default) |
| 62 | + 3. `SLOT_CONFIG_NETWORK[network]` (hardcoded fallback) |
| 63 | + |
| 64 | + ### Cluster.getSlotConfig helper |
| 65 | + |
| 66 | + Add `getSlotConfig()` helper to derive slot configuration from devnet cluster genesis: |
| 67 | + |
| 68 | + ```ts |
| 69 | + const slotConfig = Cluster.getSlotConfig(cluster) |
| 70 | + // Returns: { zeroTime, zeroSlot, slotLength } |
| 71 | + ``` |
| 72 | + |
3 | 73 | ## 0.3.6 |
4 | 74 |
|
5 | 75 | ### Patch Changes |
|
0 commit comments