Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/blockfrost-datum-hash.md

This file was deleted.

30 changes: 0 additions & 30 deletions .changeset/spend-datum-hash.md

This file was deleted.

7 changes: 7 additions & 0 deletions packages/aiken-uplc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @evolution-sdk/aiken-uplc

## 2.0.23

### Patch Changes

- Updated dependencies [[`79ee853`](https://github.com/IntersectMBO/evolution-sdk/commit/79ee85393a3dcb5564d77fefae6bdaa684ed8ed7), [`cd6c9d4`](https://github.com/IntersectMBO/evolution-sdk/commit/cd6c9d4ae6d0db25d57cd8e2e891ce4e854270a3)]:
- @evolution-sdk/evolution@0.8.0

## 2.0.22

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/aiken-uplc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@evolution-sdk/aiken-uplc",
"version": "2.0.22",
"version": "2.0.23",
"description": "Aiken UPLC evaluator for Evolution SDK with WASM-based local script evaluation",
"type": "module",
"main": "./dist/index.js",
Expand Down
9 changes: 9 additions & 0 deletions packages/evolution-devnet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @evolution-sdk/devnet

## 3.0.24

### Patch Changes

- Updated dependencies [[`79ee853`](https://github.com/IntersectMBO/evolution-sdk/commit/79ee85393a3dcb5564d77fefae6bdaa684ed8ed7), [`cd6c9d4`](https://github.com/IntersectMBO/evolution-sdk/commit/cd6c9d4ae6d0db25d57cd8e2e891ce4e854270a3)]:
- @evolution-sdk/evolution@0.8.0
- @evolution-sdk/aiken-uplc@2.0.23
- @evolution-sdk/scalus-uplc@2.0.23

## 3.0.23

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/evolution-devnet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@evolution-sdk/devnet",
"version": "3.0.23",
"version": "3.0.24",
"description": "Local Cardano devnet for testing and development with Docker",
"type": "module",
"main": "./dist/index.js",
Expand Down
37 changes: 37 additions & 0 deletions packages/evolution/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# @evolution-sdk/evolution

## 0.8.0

### Minor Changes

- [#707](https://github.com/IntersectMBO/evolution-sdk/pull/707) [`cd6c9d4`](https://github.com/IntersectMBO/evolution-sdk/commit/cd6c9d4ae6d0db25d57cd8e2e891ce4e854270a3) Thanks [@solidsnakedev](https://github.com/solidsnakedev)! - The transaction builder now spends outputs that hold a datum hash. `collectFrom` takes the datum of each such input in a new `datums` field, and `build({ onMissingDatum: "provider" })` fetches the missing ones with `provider.getDatum`. Before, the builder left the datum out of the witness set, and the node rejected the spend.

```ts
const datum = await client.getDatum(utxo.datumOption)
await client
.newTx()
.collectFrom({ inputs: [utxo], redeemer, datums: [datum] })
.attachScript({ script })
.build()

// or fetch each missing datum during the build
await client
.newTx()
.collectFrom({ inputs: [utxo], redeemer })
.attachScript({ script })
.build({ onMissingDatum: "provider" })
```

A spend of a datum-hash output at a Plutus script address now fails at `build()` when its datum is neither given nor fetched, and the error names each such input. Code that added the datum to the built transaction by hand should pass it to `collectFrom` instead.

The `onMissingDatum: "provider"` lookup only finds datums an earlier transaction published, and outputs this SDK locks never publish theirs. For those, keep the datum and pass it to `collectFrom`.

- The built-in providers' `getDatum` keeps the bytes it fetched, through `OriginalBytes`. The witness set and the script data hash write a datum with those bytes, whatever the codec options say, because the datum hash covers them. A datum without recorded bytes is written with the `plutusData` options, as before.
- The builder matches each given datum to its input by hashing the bytes it will write. It fails when a given datum belongs to no spent input.
- The fee now counts the witness datums.
- `TransactionWitnessSet` keeps each datum as the same object when it is built from another witness set, so the recorded bytes survive signing.
- `SignBuilder.assemble` keeps the transaction's own datums and drops the datums of the given witness sets, since the body's script data hash covers only its own.
- `TxBuilderState` has a new `datums` field.

### Patch Changes

- [#706](https://github.com/IntersectMBO/evolution-sdk/pull/706) [`79ee853`](https://github.com/IntersectMBO/evolution-sdk/commit/79ee85393a3dcb5564d77fefae6bdaa684ed8ed7) Thanks [@solidsnakedev](https://github.com/solidsnakedev)! - The Blockfrost provider now reports an output that holds a datum hash with a `DatumHash` datum option, as Koios, Maestro and Kupmios do. Before, `getUtxos`, `getUtxosWithUnit`, `getUtxoByUnit` and `getUtxosByOutRef` fetched the datum behind each hash and returned it as an `InlineDatum`, so the UTxO did not match the chain. Re-encoding such a UTxO wrote an inline datum where the chain holds a hash, and the builder could not see that spending it needs the datum in the witness set. Code that read a hash output's datum from `datumOption.data` should call `getDatum(datumHash)` instead. The UTxO queries also make one request fewer for each datum-hash output.

## 0.7.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@evolution-sdk/evolution",
"version": "0.7.1",
"version": "0.8.0",
"description": "A modern TypeScript SDK for Cardano blockchain development",
"type": "module",
"main": "./dist/index.js",
Expand Down
7 changes: 7 additions & 0 deletions packages/scalus-uplc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @evolution-sdk/scalus-uplc

## 2.0.23

### Patch Changes

- Updated dependencies [[`79ee853`](https://github.com/IntersectMBO/evolution-sdk/commit/79ee85393a3dcb5564d77fefae6bdaa684ed8ed7), [`cd6c9d4`](https://github.com/IntersectMBO/evolution-sdk/commit/cd6c9d4ae6d0db25d57cd8e2e891ce4e854270a3)]:
- @evolution-sdk/evolution@0.8.0

## 2.0.22

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/scalus-uplc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@evolution-sdk/scalus-uplc",
"version": "2.0.22",
"version": "2.0.23",
"description": "Scalus UPLC evaluator adapter for Evolution SDK",
"type": "module",
"main": "./dist/index.js",
Expand Down
Loading