From dcdca30672f3f2b26cb97c4188d8dea9b5e9e2a2 Mon Sep 17 00:00:00 2001 From: Nicolas Henin Date: Sat, 11 May 2024 13:26:32 +0200 Subject: [PATCH] bumped version to `0.4.0-beta` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- CHANGELOG.md | 82 ++++++++++++++++++ Readme.md | 9 +- ..._plt_9089_createContract_bundle_support.md | 3 - .../20240122_133315_hrajchert_cip45.md | 3 - ..._162752_bjorn.wilhelm.kihlberg_PLT_9368.md | 16 ---- .../20240201_155716_hrajchert_annotations.md | 8 -- ...40214_142506_hrajchert_marlowe_template.md | 8 -- ...222_130945_hrajchert_fix_branded_output.md | 3 - ...46_hrajchert_applicable_inputs_refactor.md | 4 - ...icolas.henin_runtime_lifecycle_refactor.md | 43 ---------- doc/howToDevelop.md | 14 +-- doc/modules-system.md | 2 +- doc/versioning-and-releases.md | 4 +- jsdelivr-npm-importmap.js | 86 ++++++++++--------- package-lock.json | 78 ++++++++--------- package.json | 5 +- packages/adapter/package.json | 5 +- packages/language/core/v1/Readme.md | 2 +- packages/language/core/v1/package.json | 7 +- packages/language/examples/package.json | 9 +- .../specification-client/package.json | 7 +- packages/marlowe-object/package.json | 7 +- packages/marlowe-template/package.json | 6 +- packages/runtime/client/rest/Readme.md | 2 +- packages/runtime/client/rest/package.json | 13 ++- packages/runtime/core/package.json | 11 ++- packages/runtime/lifecycle/package.json | 17 ++-- .../runtime/lifecycle/src/browser/index.ts | 2 +- packages/testing-kit/package.json | 15 ++-- packages/token-metadata-client/package.json | 5 +- packages/wallet/Readme.md | 2 +- packages/wallet/package.json | 5 +- rollup/config.mjs | 2 +- 33 files changed, 235 insertions(+), 250 deletions(-) delete mode 100644 changelog.d/20240112_130130_hrajchert_plt_9089_createContract_bundle_support.md delete mode 100644 changelog.d/20240122_133315_hrajchert_cip45.md delete mode 100644 changelog.d/20240126_162752_bjorn.wilhelm.kihlberg_PLT_9368.md delete mode 100644 changelog.d/20240201_155716_hrajchert_annotations.md delete mode 100644 changelog.d/20240214_142506_hrajchert_marlowe_template.md delete mode 100644 changelog.d/20240222_130945_hrajchert_fix_branded_output.md delete mode 100644 changelog.d/20240304_130046_hrajchert_applicable_inputs_refactor.md delete mode 100644 changelog.d/20240511_113958_nicolas.henin_runtime_lifecycle_refactor.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ca122f1..be2986f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,85 @@ + +# 0.4.0-beta - 11th May 2024 + +## General + +- Feat: Created a new experimental package `@marlowe.io/marlowe-template` that helps to share the parameters used in the creation of a Marlowe contract. ([PR-184](https://github.com/input-output-hk/marlowe-ts-sdk/pull/184)) + +- Feat: **Initial Account Deposits Feature Integration (Runtime v1.0.0):** + + - **Purpose:** This update introduces the capability for users to make initial deposits into their accounts upon creation. This feature aims to streamline the account setup process and enhance user experience. + - **Benefits:** This feature squashes the Contract Creation and Initial Input Deposits into 1 transaction instead of multiple ones. + +- Feat: **Introduction of a New Contract API in the Runtime Lifecycle API:** + - **Purpose:** The addition of a new Contract API is designed to provide developers with more flexibility and control (contract instance concept) over smart contract management within the runtime environment. + - **Benefits:** Developers can now leverage enhanced functionalities for deploying, updating, and interacting with smart contracts. This API simplifies complex contract operations and supports more robust smart contract development. + +## @marlowe.io/wallet + +- Feat: Added a `@marlowe.io/wallet/peer-connect` module to enable mobile support by adapting to the [cardano-peer-connect](https://github.com/fabianbormann/cardano-peer-connect) library. ([PR-179](https://github.com/input-output-hk/marlowe-ts-sdk/pull/179)) + +## @marlowe.io/language-examples + +- Feat: `Atomic swap v2` : Simplified version using the new runtime `v1.0.0` feature (`initial account deposits`) + - see end-to-end tests for examples (e.g : `swap.ada.token.e2e.spec.ts`) + +## @marlowe.io/runtime-rest-client + +- `mkRestClient` provides optional `strict` parameter for performing dynamic type checking in `RestClient` methods. ([PR-180](https://github.com/input-output-hk/marlowe-ts-sdk/pull/180)) +- **BREAKING CHANGE** The following `RestClient` methods use a keyword argument object instead of positional arguments. ([PR-180](https://github.com/input-output-hk/marlowe-ts-sdk/pull/180)) + - `createContractSources` + - `getContractById` + - `submitContract` + - `getTransactionsForContract` + - `submitContractTransaction` + - `getContractTransactionById` + - `getWithdrawalById` + - `submitWithdrawal` + +- Feat: `initial account deposits` (runtime v1.0.0) for Contract Creation (`BuildCreateContractTxRequest` via `buildCreateContractTx`):([PR-188](https://github.com/input-output-hk/marlowe-ts-sdk/pull/188)) + +## @marlowe.io/runtime-core + +- Feat: Added AddressBech32 validation using the lucid library ([PR-184](https://github.com/input-output-hk/marlowe-ts-sdk/pull/184)) +- Fix: Added proper type guards to Metadata ([PR-184](https://github.com/input-output-hk/marlowe-ts-sdk/pull/184)) + +- Fix: Branding of ContractId and TxId ([PR-185](https://github.com/input-output-hk/marlowe-ts-sdk/pull/185)) + +- Feat: `initial account deposits` (runtime v1.0.0) for Contract Creation ([PR-188](https://github.com/input-output-hk/marlowe-ts-sdk/pull/188)): + - Added `export type AccountDeposits = { [key in AddressOrRole]: AssetsMap };` and associated utility functions. + +## @marlowe.io/runtime-lifecycle + +- Feat (PLT-9089): Added support for contract bundles in the `lifecycle.contracts.createContract` function. ([PR-167](https://github.com/input-output-hk/marlowe-ts-sdk/pull/167)) + +- `mkRuntimeLifecycle` provides optional `strict` parameter for performing dynamic type checking in `RestClient` methods. ([PR-180](https://github.com/input-output-hk/marlowe-ts-sdk/pull/180)) + +- Fix: Temporal fix for converting the cardano time interval to the Marlowe time interval in getInputHistory ([PR-181](https://github.com/input-output-hk/marlowe-ts-sdk/pull/181)) + +- Feat: Added a new experimental API for computing, simulating and applying the next applicable Actions/Inputs. ([PR-187](https://github.com/input-output-hk/marlowe-ts-sdk/pull/187)) +- Doc: Improved package main documentation ([PR-187](https://github.com/input-output-hk/marlowe-ts-sdk/pull/187)) + +- Feat: New Contract API `packages/runtime/lifecycle/src/generic/new-contract-api.ts` ([PR-188](https://github.com/input-output-hk/marlowe-ts-sdk/pull/188)): + - Generic `waitConfirmation()` : same for contract creation and apply inputs + - Seamless Integration of Applicable Actions API + - simplfied interface (`create` and `load` with a concept of `ContractInstance` object) + - see end-to-end tests for examples (e.g : `swap.ada.token.e2e.spec.ts`) +- Feat: `initial account deposits` feature (runtime v1.0.0) for Contract Creation ([PR-188](https://github.com/input-output-hk/marlowe-ts-sdk/pull/188)): + - new parameter field `accountDeposits` in + - e.g. + +```ts +const sellerContractInstance = await sellerLifecycle.newContractAPI.create({ + contract: swapContract, + roles: { [scheme.ask.buyer.role_token]: mintRole("OpenRole") }, + accountDeposits: mkaccountDeposits([[scheme.offer.seller, seller.assetsProvisioned]]), +}); +``` + +## @marlowe.io/marlowe-object + +- **BREAKING CHANGE** Feat: Added Annotations to the contract type. ([PR-181](https://github.com/input-output-hk/marlowe-ts-sdk/pull/181)) +- Experimental Feat: Added a sourceMap API to match the annotated marlowe-object source with the ContractClosure. ([PR-181](https://github.com/input-output-hk/marlowe-ts-sdk/pull/181)) # 0.3.0-beta - 18 Jan 2024 The Marlowe team is happy to announce the 0.3.0 release with the following Milestones completed: diff --git a/Readme.md b/Readme.md index 7f222a80..fa715340 100644 --- a/Readme.md +++ b/Readme.md @@ -24,10 +24,11 @@ It is composed of several npm packages documented in the [API reference](https:/ In order to interact with Marlowe contracts, the **TS-SDK** needs a Runtime instance. The following table shows the compatibility between the SDK and the Runtime versions: -| | runtime v0.0.5 | runtime v0.0.6 | -| ------------------------------------------------------------------------------------------- | :------------: | :------------: | -| [SDK 0.2.0-beta](https://github.com/input-output-hk/marlowe-ts-sdk/releases/tag/0.2.0-beta) | ✓ | x | -| [SDK 0.3.0-beta](https://github.com/input-output-hk/marlowe-ts-sdk/releases/tag/0.3.0-beta) | ✓ | ✓ | +| | runtime v0.0.5 | runtime v0.0.6 | runtime v1.0.0 | +| ------------------------------------------------------------------------------------------- | :------------: | :------------: | :------------: | +| [SDK 0.2.0-beta](https://github.com/input-output-hk/marlowe-ts-sdk/releases/tag/0.2.0-beta) | ✓ | x | x | +| [SDK 0.3.0-beta](https://github.com/input-output-hk/marlowe-ts-sdk/releases/tag/0.3.0-beta) | ✓ | ✓ | x | +| [SDK 0.4.0-beta](https://github.com/input-output-hk/marlowe-ts-sdk/releases/tag/0.4.0-beta) | ✓ | ✓ | ✓ | To get a running instance of the Runtime, it is recommended to check out the instructions on the [Marlowe Starter Kit](https://github.com/input-output-hk/marlowe-starter-kit) diff --git a/changelog.d/20240112_130130_hrajchert_plt_9089_createContract_bundle_support.md b/changelog.d/20240112_130130_hrajchert_plt_9089_createContract_bundle_support.md deleted file mode 100644 index af017edc..00000000 --- a/changelog.d/20240112_130130_hrajchert_plt_9089_createContract_bundle_support.md +++ /dev/null @@ -1,3 +0,0 @@ -### @marlowe.io/runtime-lifecycle - -- Feat (PLT-9089): Added support for contract bundles in the `lifecycle.contracts.createContract` function. ([PR-167](https://github.com/input-output-hk/marlowe-ts-sdk/pull/167)) diff --git a/changelog.d/20240122_133315_hrajchert_cip45.md b/changelog.d/20240122_133315_hrajchert_cip45.md deleted file mode 100644 index daf38c0b..00000000 --- a/changelog.d/20240122_133315_hrajchert_cip45.md +++ /dev/null @@ -1,3 +0,0 @@ -### @marlowe.io/wallet - -- Feat: Added a `@marlowe.io/wallet/peer-connect` module to enable mobile support by adapting to the [cardano-peer-connect](https://github.com/fabianbormann/cardano-peer-connect) library. ([PR-179](https://github.com/input-output-hk/marlowe-ts-sdk/pull/179)) diff --git a/changelog.d/20240126_162752_bjorn.wilhelm.kihlberg_PLT_9368.md b/changelog.d/20240126_162752_bjorn.wilhelm.kihlberg_PLT_9368.md deleted file mode 100644 index d8bd5614..00000000 --- a/changelog.d/20240126_162752_bjorn.wilhelm.kihlberg_PLT_9368.md +++ /dev/null @@ -1,16 +0,0 @@ -### @marlowe.io/runtime-rest-client - -- `mkRestClient` provides optional `strict` parameter for performing dynamic type checking in `RestClient` methods. ([PR-180](https://github.com/input-output-hk/marlowe-ts-sdk/pull/180)) -- **BREAKING CHANGE** The following `RestClient` methods uses keyword argument object instead of positional arguments. ([PR-180](https://github.com/input-output-hk/marlowe-ts-sdk/pull/180)) - - `createContractSources` - - `getContractById` - - `submitContract` - - `getTransactionsForContract` - - `submitContractTransaction` - - `getContractTransactionById` - - `getWithdrawalById` - - `submitWithdrawal` - -### @marlowe.io/runtime-lifecycle - -- `mkRuntimeLifecycle` provides optional `strict` parameter for performing dynamic type checking in `RestClient` methods. ([PR-180](https://github.com/input-output-hk/marlowe-ts-sdk/pull/180)) diff --git a/changelog.d/20240201_155716_hrajchert_annotations.md b/changelog.d/20240201_155716_hrajchert_annotations.md deleted file mode 100644 index 35e5ace9..00000000 --- a/changelog.d/20240201_155716_hrajchert_annotations.md +++ /dev/null @@ -1,8 +0,0 @@ -### @marlowe.io/runtime-lifecycle - -- Fix: Temporal fix for converting the cardano time interval to the Marlowe time interval in getInputHistory ([PR-181](https://github.com/input-output-hk/marlowe-ts-sdk/pull/181)) - -### @marlowe.io/marlowe-object - -- **BREAKING CHANGE** Feat: Added Annotations to the contract type. ([PR-181](https://github.com/input-output-hk/marlowe-ts-sdk/pull/181)) -- Experimental Feat: Added a sourceMap API to match the annotated marlowe-object source with the ContractClosure. ([PR-181](https://github.com/input-output-hk/marlowe-ts-sdk/pull/181)) diff --git a/changelog.d/20240214_142506_hrajchert_marlowe_template.md b/changelog.d/20240214_142506_hrajchert_marlowe_template.md deleted file mode 100644 index 319d9643..00000000 --- a/changelog.d/20240214_142506_hrajchert_marlowe_template.md +++ /dev/null @@ -1,8 +0,0 @@ -### General - -- Feat: Created a new experimental package `@marlowe.io/marlowe-template` that helps to share the parameters used in the creation of a Marlowe contract. ([PR-184](https://github.com/input-output-hk/marlowe-ts-sdk/pull/184)) - -### @marlowe.io/runtime-core - -- Feat: Added AddressBech32 validation using the lucid library ([PR-184](https://github.com/input-output-hk/marlowe-ts-sdk/pull/184)) -- Fix: Added proper type guards to Metadata ([PR-184](https://github.com/input-output-hk/marlowe-ts-sdk/pull/184)) diff --git a/changelog.d/20240222_130945_hrajchert_fix_branded_output.md b/changelog.d/20240222_130945_hrajchert_fix_branded_output.md deleted file mode 100644 index f01c6c58..00000000 --- a/changelog.d/20240222_130945_hrajchert_fix_branded_output.md +++ /dev/null @@ -1,3 +0,0 @@ -### @marlowe.io/runtime-core - -- Fix: Branding of ContractId and TxId ([PR-185](https://github.com/input-output-hk/marlowe-ts-sdk/pull/185)) diff --git a/changelog.d/20240304_130046_hrajchert_applicable_inputs_refactor.md b/changelog.d/20240304_130046_hrajchert_applicable_inputs_refactor.md deleted file mode 100644 index f24e58ed..00000000 --- a/changelog.d/20240304_130046_hrajchert_applicable_inputs_refactor.md +++ /dev/null @@ -1,4 +0,0 @@ -### @marlowe.io/runtime-lifecycle - -- Feat: Added a new experimental API for computing, simulating and applying the next applicable Actions/Inputs. ([PR-187](https://github.com/input-output-hk/marlowe-ts-sdk/pull/187)) -- Doc: Improved package main documentation ([PR-187](https://github.com/input-output-hk/marlowe-ts-sdk/pull/187)) diff --git a/changelog.d/20240511_113958_nicolas.henin_runtime_lifecycle_refactor.md b/changelog.d/20240511_113958_nicolas.henin_runtime_lifecycle_refactor.md deleted file mode 100644 index 80c0f2a7..00000000 --- a/changelog.d/20240511_113958_nicolas.henin_runtime_lifecycle_refactor.md +++ /dev/null @@ -1,43 +0,0 @@ -### General - -- Feat: **Initial Account Deposits Feature Integration (Runtime v1.0.0):** - - - **Purpose:** This update introduces the capability for users to make initial deposits into their accounts upon creation. This feature aims to streamline the account setup process and enhance user experience. - - **Benefits:** This feature squashes the Contract Creation and Initial Input Deposits into 1 transaction instead of multiple ones. - -- Feat: **Introduction of a New Contract API in the Runtime Lifecycle API:** - - **Purpose:** The addition of a new Contract API is designed to provide developers with more flexibility and control (contract instance concept) over smart contract management within the runtime environment. - - **Benefits:** Developers can now leverage enhanced functionalities for deploying, updating, and interacting with smart contracts. This API simplifies complex contract operations and supports more robust smart contract development. - -### @marlowe.io/runtime-rest-client - -- Feat: `initial account deposits` (runtime v1.0.0) for Contract Creation (`BuildCreateContractTxRequest` via `buildCreateContractTx`):([PR-188](https://github.com/input-output-hk/marlowe-ts-sdk/pull/188)) - -### @marlowe.io/runtime-core - -- Feat: `initial account deposits` (runtime v1.0.0) for Contract Creation ([PR-188](https://github.com/input-output-hk/marlowe-ts-sdk/pull/188)): - - Added `export type AccountDeposits = { [key in AddressOrRole]: AssetsMap };` and associated utility functions. - -### @marlowe.io/runtime-lifecycle - -- Feat: New Contract API `packages/runtime/lifecycle/src/generic/new-contract-api.ts` ([PR-188](https://github.com/input-output-hk/marlowe-ts-sdk/pull/188)): - - Generic `waitConfirmation()` : same for contract creation and apply inputs - - Seamless Integration of Applicable Actions API - - simplfied interface (`create` and `load` with a concept of `ContractInstance` object) - - see end-to-end tests for examples (e.g : `swap.ada.token.e2e.spec.ts`) -- Feat: `initial account deposits` feature (runtime v1.0.0) for Contract Creation ([PR-188](https://github.com/input-output-hk/marlowe-ts-sdk/pull/188)): - - new parameter field `accountDeposits` in - - e.g. - -```ts -const sellerContractInstance = await sellerLifecycle.newContractAPI.create({ - contract: swapContract, - roles: { [scheme.ask.buyer.role_token]: mintRole("OpenRole") }, - accountDeposits: mkaccountDeposits([[scheme.offer.seller, seller.assetsProvisioned]]), -}); -``` - -### @marlowe.io/language-examples - -- Feat: `Atomic swap v2` : Simplified version using the new runtime `v1.0.0` feature (`initial account deposits`) - - see end-to-end tests for examples (e.g : `swap.ada.token.e2e.spec.ts`) diff --git a/doc/howToDevelop.md b/doc/howToDevelop.md index a6017b51..c0797e00 100644 --- a/doc/howToDevelop.md +++ b/doc/howToDevelop.md @@ -206,13 +206,13 @@ And in a separate project you can install the tarballs using a file url when dec ```json { "dependencies": { - "@marlowe.io/runtime-lifecycle": "file:/marlowe.io-runtime-lifecycle-0.4.0-beta-rc1.tgz", - "@marlowe.io/runtime-rest-client": "file:/marlowe.io-runtime-rest-client-0.4.0-beta-rc1.tgz", - "@marlowe.io/adapter": "file:/marlowe.io-adapter-0.4.0-beta-rc1.tgz", - "@marlowe.io/runtime-core": "file:/marlowe.io-runtime-core-0.4.0-beta-rc1.tgz", - "@marlowe.io/language-core-v1": "file:/marlowe.io-language-core-v1-0.4.0-beta-rc1.tgz", - "@marlowe.io/language-examples": "file:/marlowe.io-language-examples-0.4.0-beta-rc1.tgz", - "@marlowe.io/wallet": "file:/marlowe.io-wallet-0.4.0-beta-rc1.tgz" + "@marlowe.io/runtime-lifecycle": "file:/marlowe.io-runtime-lifecycle-0.4.0-beta.tgz", + "@marlowe.io/runtime-rest-client": "file:/marlowe.io-runtime-rest-client-0.4.0-beta.tgz", + "@marlowe.io/adapter": "file:/marlowe.io-adapter-0.4.0-beta.tgz", + "@marlowe.io/runtime-core": "file:/marlowe.io-runtime-core-0.4.0-beta.tgz", + "@marlowe.io/language-core-v1": "file:/marlowe.io-language-core-v1-0.4.0-beta.tgz", + "@marlowe.io/language-examples": "file:/marlowe.io-language-examples-0.4.0-beta.tgz", + "@marlowe.io/wallet": "file:/marlowe.io-wallet-0.4.0-beta.tgz" } } ``` diff --git a/doc/modules-system.md b/doc/modules-system.md index e406dc76..0c0a6a81 100644 --- a/doc/modules-system.md +++ b/doc/modules-system.md @@ -9,7 +9,7 @@ The Marlowe SDK is built using ESM modules but one of its dependencies (fp-ts) d In most packages documentation you'll find something like: ```html - + + + + * * +