Skip to content

Commit

Permalink
Merge branch 'master' into nightly
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/cip2/CHANGELOG.md
#	packages/input-selection/package.json
#	packages/wallet/package.json
#	yarn.lock
  • Loading branch information
rhyslbw committed Sep 26, 2022
2 parents 74a9c8c + f821beb commit 3e38f24
Show file tree
Hide file tree
Showing 41 changed files with 167 additions and 217 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/nightly.yaml
Expand Up @@ -21,7 +21,7 @@ jobs:
ref: nightly
submodules: true

- name: Merge in master
- name: Merge in master
run: |
git config user.name github-actions
git config user.email github-actions@github.com
Expand All @@ -34,20 +34,19 @@ jobs:
node-version: 14.17
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
- name: 💽 Install dependencies
run: |
yarn install --immutable --inline-builds --mode=skip-build
git checkout yarn-project.nix
- name: Check if any packages changed
id: precondition
run: |
CHANGED=$(yarn run lerna changed --json | node -e "console.log(JSON.parse(require('fs').readFileSync(0).toString()).length)")
echo "$CHANGED packages changed"
echo "::set-output name=changed::$(($CHANGED))"
- name: 📝 Count changed packages
uses: sergeysova/jq-action@v2
id: changed
with:
cmd: yarn run lerna changed --json | jq -ne 'input? // 0 | length'

- name: Publish
if: steps.precondition.outputs.changed > 0
- name: 📤 Publish
if: steps.changed.outputs.value > 0
run: |
yarn build
yarn publish:nightly --loglevel silly
Expand Down
14 changes: 10 additions & 4 deletions README.md
Expand Up @@ -6,7 +6,9 @@
<img width="200" src=".github/images/cardano-logo.png"/>
</p>

[![CI][img_src_ci]][workflow_ci]
[![PostIntegration][img_src_post-integration]][workflow_post-integration]
[![Nightly][img_src_nightly]][workflow_nightly]
[![Release][img_src_release]][workflow_release]

<hr/>

Expand All @@ -15,7 +17,7 @@
A suite of TypeScript packages suitable for both Node.js and browser-based development.

- [@cardano-sdk/core](./packages/core)
- [@cardano-sdk/cip2](./packages/cip2)
- [@cardano-sdk/input-selection](./packages/input-selection)
- [@cardano-sdk/cip30](./packages/cip30)
- [@cardano-sdk/governance](./packages/governance)
- [@cardano-sdk/key-management](./packages/key-management)
Expand Down Expand Up @@ -116,6 +118,10 @@ yarn docs
<a href="https://input-output-hk.github.io/cardano-js-sdk">:book: Documentation</a>
</p>

[img_src_ci]: https://github.com/input-output-hk/cardano-js-sdk/actions/workflows/continuous-integration.yaml/badge.svg
[workflow_ci]: https://github.com/input-output-hk/cardano-js-sdk/actions/workflows/continuous-integration.yaml
[img_src_post-integration]: https://github.com/input-output-hk/cardano-js-sdk/actions/workflows/post_integration.yml/badge.svg
[workflow_post-integration]: https://github.com/input-output-hk/cardano-js-sdk/actions/workflows/post_integration.yml
[img_src_nightly]: https://github.com/input-output-hk/cardano-js-sdk/actions/workflows/nightly.yaml/badge.svg
[workflow_nightly]: https://github.com/input-output-hk/cardano-js-sdk/actions/workflows/nightly.yaml
[img_src_release]: https://github.com/input-output-hk/cardano-js-sdk/actions/workflows/release.yaml/badge.svg
[workflow_release]: https://github.com/input-output-hk/cardano-js-sdk/actions/workflows/release.yaml
[let us know!]: https://github.com/input-output-hk/cardano-graphql/discussions/new
4 changes: 2 additions & 2 deletions packages/cardano-services/test/tsconfig.json
Expand Up @@ -5,7 +5,7 @@
},
"include": [
"./**/*.ts",
"../../cip2/test/util",
"../../input-selection/test/util",
"../../core/test/CardanoNode",
"../../ogmios/test/mocks"
],
Expand All @@ -29,7 +29,7 @@
"path": "../../ogmios/src"
},
{
"path": "../../cip2/src"
"path": "../../input-selection/src"
}
]
}
157 changes: 0 additions & 157 deletions packages/cip2/CHANGELOG.md

This file was deleted.

4 changes: 2 additions & 2 deletions packages/e2e/test/tsconfig.json
Expand Up @@ -8,7 +8,7 @@
"./**/*.ts",
"../../ogmios/test",
"../../wallet/test",
"../../cip2/test/util"
"../../input-selection/test/util"
],
"references": [
{
Expand Down Expand Up @@ -36,7 +36,7 @@
"path": "../../wallet/src"
},
{
"path": "../../cip2/src"
"path": "../../input-selection/src"
}
]
}
File renamed without changes.
102 changes: 102 additions & 0 deletions packages/input-selection/CHANGELOG.md
@@ -0,0 +1,102 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.5.0](https://github.com/input-output-hk/cardano-js-sdk/compare/@cardano-sdk/input-selection@0.4.0...@cardano-sdk/input-selection@0.5.0) (2022-08-30)


### ⚠ BREAKING CHANGES

* rename InputSelectionParameters implicitCoin->implicitValue.coin
* rm TxAlonzo.implicitCoin
* update min utxo computation to be Babbage-compatible

### Features

* **input-selection:** add implicit tokens support (mint/burn) for input selection ([3361855](https://github.com/input-output-hk/cardano-js-sdk/commit/3361855a2fbf20afc8ead11565ac6759548ab13f))


### Bug Fixes

* update min utxo computation to be Babbage-compatible ([51ca1d5](https://github.com/input-output-hk/cardano-js-sdk/commit/51ca1d5716b62b47d211475aba1be4a6d5782397))


### Code Refactoring

* rename InputSelectionParameters implicitCoin->implicitValue.coin ([3242a0d](https://github.com/input-output-hk/cardano-js-sdk/commit/3242a0dc63da0e59c4f8536d16758ea19f58a2c0))
* rm TxAlonzo.implicitCoin ([167d205](https://github.com/input-output-hk/cardano-js-sdk/commit/167d205dd15c857b229f968ab53a6e52e5504d3f))



## [0.4.0](https://github.com/input-output-hk/cardano-js-sdk/compare/0.3.0...@cardano-sdk/input-selection@0.4.0) (2022-07-25)


### ⚠ BREAKING CHANGES

* update min utxo computation to be Babbage-compatible

### Bug Fixes

* update min utxo computation to be Babbage-compatible ([51ca1d5](https://github.com/input-output-hk/cardano-js-sdk/commit/51ca1d5716b62b47d211475aba1be4a6d5782397))

## 0.3.0 (2022-06-24)


### ⚠ BREAKING CHANGES

* **input-selection:** update interfaces to use core package types instead of CSL

### Features

* **input-selection:** add support for custom random fn ([934c855](https://github.com/input-output-hk/cardano-js-sdk/commit/934c85520ca666bc62cc51afa6fbf17dda7bbfb5))


### Bug Fixes

* **input-selection:** adjust fee by hardcoded value (+10k) ([7410ae0](https://github.com/input-output-hk/cardano-js-sdk/commit/7410ae053ea2b4c78d82659a89bdcfd895a4e808))
* **input-selection:** computeSelectionLimit constraint logic error ([b329971](https://github.com/input-output-hk/cardano-js-sdk/commit/b3299713ae40a6e5e06a312b4b28f6c20a6a3ef8))
* **input-selection:** omit 0 qty assets from change bundles ([d3a12cf](https://github.com/input-output-hk/cardano-js-sdk/commit/d3a12cfb577bcae04f793e96f23ce84ee87a7bcb))
* **input-selection:** property tests generate quantities > 0 ([3988ca0](https://github.com/input-output-hk/cardano-js-sdk/commit/3988ca002d45ca8a060d54fb67b244702157ca7e))
* **input-selection:** recompute min fee after selecting extra utxo due to min value ([bfb7db5](https://github.com/input-output-hk/cardano-js-sdk/commit/bfb7db55b76d154e036e788edae376b1589510ee))
* **input-selection:** remove hardcoded value in minimum cost selection constraint ([ad6d133](https://github.com/input-output-hk/cardano-js-sdk/commit/ad6d133a0ba1f865bf2ae1ca3f46b8e6f918502b))
* resolve issues preventing to make a delegation tx ([7429f46](https://github.com/input-output-hk/cardano-js-sdk/commit/7429f466763342b08b6bed44f23d3bf24dbf92f2))
* rm imports from @cardano-sdk/*/src/* ([3fdead3](https://github.com/input-output-hk/cardano-js-sdk/commit/3fdead3ae381a3efb98299b9881c6a964461b7db))


### Code Refactoring

* **input-selection:** update interfaces to use core package types instead of CSL ([5c66d32](https://github.com/input-output-hk/cardano-js-sdk/commit/5c66d32fdc58100a2b0807a0470342d54a3989ed))

### 0.1.5 (2021-10-27)


### Features

* **input-selection:** add support for implicit coin ([47f6bd2](https://github.com/input-output-hk/cardano-js-sdk/commit/47f6bd2ee714ff9b6b9d8d311f2b3526f88a1a2b))

### 0.1.3 (2021-10-05)

### 0.1.2 (2021-09-30)


### Bug Fixes

* add missing dependencies ([2d3bfbc](https://github.com/input-output-hk/cardano-js-sdk/commit/2d3bfbc3f8d5fdce3be64835c57304b540e05811))

### 0.1.1 (2021-09-30)


### Features

* **input-selection:** implement defaultSelectionConstraints ([f93e3f1](https://github.com/input-output-hk/cardano-js-sdk/commit/f93e3f1fd860a477f81975ad415d38c3c93c65d9))
* **input-selection:** initial implementation of RoundRobinRandomImprove ([17080e2](https://github.com/input-output-hk/cardano-js-sdk/commit/17080e2ee37ed5b3f51affef8dc834ae3943219f))


### Bug Fixes

* **input-selection:** add fee to selection skeleton ([36e93bc](https://github.com/input-output-hk/cardano-js-sdk/commit/36e93bccb8f5426022631f409b85aa2fe4ea7470))
* **input-selection:** change token bundle size constraint arg to CSL.MultiAsset ([4bde8e8](https://github.com/input-output-hk/cardano-js-sdk/commit/4bde8e8fde11908d4295f3f53918faed255f1ba0))
* **input-selection:** compute selection limit constraint with actual fee instead of max u64 ([eee4f5e](https://github.com/input-output-hk/cardano-js-sdk/commit/eee4f5e035a20fb61b151d294213978fd8f39302))
* **input-selection:** ensure there are no empty change bundles, add some test info to README ([8f3f20b](https://github.com/input-output-hk/cardano-js-sdk/commit/8f3f20ba8de812895844fad0d09eb63104114a83))
* **input-selection:** exclude fee from change bundles ([16d7c26](https://github.com/input-output-hk/cardano-js-sdk/commit/16d7c267df0b9f70d1e2ba1afd03e531282686fd))
File renamed without changes.
File renamed without changes.
@@ -1,13 +1,13 @@
# Cardano JS SDK | CIP2 | Input Selection
# Cardano JS SDK | Input Selection | CIP-0002

This package implements concepts from the draft specification being developed in [CIP-0002].

Currently there is only 1 input selection algorithm: RoundRobinRandomImprove, which is a [Random-Improve] adaptation that handles asset selection.
Currently, there is only 1 input selection algorithm: RoundRobinRandomImprove, which is an [Random-Improve] adaptation that handles asset selection.

## Usage Example

```typescript
import { roundRobinRandomImprove, defaultSelectionConstraints, InputSelector, SelectionResult, SelectionSkeleton } from '@cardano-sdk/cip2';
import { roundRobinRandomImprove, defaultSelectionConstraints, InputSelector, SelectionResult, SelectionSkeleton } from '@cardano-sdk/input-selection';
import { loadCardanoSerializationLib, CSL, CardanoSerializationLib, ProtocolParametersRequiredByWallet } from '@cardano-sdk/core';

const demo = async (protocolParameters: ProtocolParametersRequiredByWallet): Promise<SelectionResult> => {
Expand Down
@@ -1,4 +1,4 @@
module.exports = {
...require('../../test/jest.config'),
setupFilesAfterEnv: ['./test/jest.setup.js'],
};
setupFilesAfterEnv: ['./test/jest.setup.js']
};

0 comments on commit 3e38f24

Please sign in to comment.