Skip to content

Commit

Permalink
Add Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
hrajchert authored and bjornkihlberg committed Jan 9, 2024
1 parent 3a443d6 commit 0a7e961
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

### General

- Feat: Added debugging configuration for VSCode. Now if you are developing with VSCode you can open the folder as a workspace and the [Javascript Debug Terminal](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_javascript-debug-terminal) will have the appropiate source maps. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136)).
- Feat: Started an experimental getApplicableActions that should replace the current getApplicableInputs. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))

### Examples
- Feat: Added a new interactive NodeJs example to make delayed payments with staking and merkleization. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))


### @marlowe.io/adapter

- Feat: Added a bigint utilities adapter. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))
- Feat: Added iso8601ToPosixTime to the time adapter. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))

### @marlowe.io/language-core-v1

- Feat: Added SingleInputTx to capture a single step transaction (either a single input or an empty tx). ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136)).
- Feat: Added getNextTimeout to see what is the next timeout of a contract. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136)).
- Fix: Fix how merkleized inputs are serialized


### @marlowe.io/runtime-rest-client

- [Breaking Change] Refactor: Create contract sources now uses a single parameter ContractBundle, instead of two separate bundle and main entrypoint parameters. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))
- [Breaking change] Fix: Pagination responses not always return a current header. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))

### @marlowe.io/runtime-lifecycle

- Feat: Added restClient to the lifecycle object for easier querying. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))
- Feat: Added getInputHistory to get a list of SingleInputTx applied to a contract. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))

### @marlowe.io/marlowe-object

- Feat: Added ContractBundle to represent a bundle with a main entrypoint. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))
2 changes: 1 addition & 1 deletion changelog.d/scriv.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[scriv]
format = md
categories = General, @marlowe.io/wallet, @marlowe.io/adapter, @marlowe.io/language-core-v1, @marlowe.io/language-examples, @marlowe.io/runtime-rest-client, @marlowe.io/runtime-core, @marlowe.io/runtime-lifecycle, @marlowe.io/language-examples
categories = General, Examples, @marlowe.io/wallet, @marlowe.io/adapter, @marlowe.io/language-core-v1, @marlowe.io/language-examples, @marlowe.io/runtime-rest-client, @marlowe.io/runtime-core, @marlowe.io/runtime-lifecycle, @marlowe.io/language-examples, @marlowe.io/marlowe-object
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ const accumulatorFromNotify = (action: CanNotify) => {
notifies: action,
};
};
// TODO: Move to adapter

function mergeBounds(bounds: Bound[]): Bound[] {
const mergedBounds: Bound[] = [];
Expand Down
6 changes: 2 additions & 4 deletions packages/language/core/v1/src/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Action, ActionGuard } from "./actions.js";
import { pipe } from "fp-ts/lib/function.js";
import getUnixTime from "date-fns/getUnixTime/index.js";
import { BuiltinByteString } from "./inputs.js";

import * as Big from "@marlowe.io/adapter/bigint"
/**
* Search [[lower-name-builders]]
* @hidden
Expand Down Expand Up @@ -331,8 +331,6 @@ export function matchContract<T>(matcher: Partial<ContractMatcher<T>>) {
}
};
}
// Copied from semantic module, maybe we want to move this to a common place? An adaptor bigint maybe?
const minBigint = (a: bigint, b: bigint): bigint => (a < b ? a : b);

/**
* This function calculates the next timeout of a contract after a given minTime.
Expand All @@ -349,7 +347,7 @@ export function getNextTimeout(contract: Contract, minTime: Timeout): Timeout |
const thenTimeout = getNextTimeout(ifContract.then, minTime);
const elseTimeout = getNextTimeout(ifContract.else, minTime);
return thenTimeout && elseTimeout
? minBigint(thenTimeout, elseTimeout)
? Big.min(thenTimeout, elseTimeout)
: thenTimeout || elseTimeout;
},
when: (whenContract) => {
Expand Down

0 comments on commit 0a7e961

Please sign in to comment.