Skip to content

Commit 20e39d3

Browse files
Merge branch 'main' of github.com:centrifuge/centrifuge-sdk into more-reports
2 parents 19a40f3 + e9e2cc7 commit 20e39d3

9 files changed

Lines changed: 91 additions & 923 deletions

File tree

.c8rc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"all": true,
3+
"include": ["src/**/*.ts"],
4+
"exclude": ["src/**/*.d.ts", "src/**/*.test.ts", "src/types/*.ts", "src/tests/**/*.ts"],
5+
"reporter": ["text", "lcov"],
6+
"extension": [".ts"],
7+
"report-dir": "./coverage"
8+
}

.github/workflows/build-test-report.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ jobs:
3434
run: yarn build
3535

3636
- name: Run tests
37-
run: |
38-
yarn test:ci
39-
yarn test:coverage
37+
run: yarn test:coverage
4038
env:
4139
TENDERLY_ACCESS_KEY: ${{ secrets.TENDERLY_ACCESS_KEY }}
4240
PROJECT_SLUG: ${{ secrets.PROJECT_SLUG }}
@@ -50,6 +48,7 @@ jobs:
5048
name: test-results
5149
path: |
5250
report/
51+
coverage/lcov-report/
5352
retention-days: 15
5453

5554
- name: Upload coverage to Codecov
@@ -58,5 +57,5 @@ jobs:
5857
directory: ./coverage
5958
token: ${{ secrets.CODECOV_TOKEN }}
6059
# flags: unittests
61-
name: sdk-coverage-with-nyc
60+
name: sdk-coverage
6261
fail_ci_if_error: true

.github/workflows/create-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
--title "Release v${VERSION}" \
3030
--generate-notes \
3131
--prerelease \
32-
--draft
32+
--target "${COMMIT_SHA}"

.github/workflows/naming-conventions.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ jobs:
4040
pull-requests: write
4141
contents: read
4242
steps:
43-
- name: Debug outputs from title-n-label-check
44-
run: |
45-
echo "Title Error: ${{ needs.title-n-label-check.outputs.title_error }}"
46-
echo "Labels Valid: ${{ needs.title-n-label-check.outputs.labels_valid }}"
4743

4844
- name: Find existing PR title error comment
4945
uses: peter-evans/find-comment@v2

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,4 @@ yarn-error.log
2626
# Tests and coverage
2727
coverage/
2828
test-results.xml
29-
.nyc_output
3029
report/

.nycrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
[![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk)
2-
[![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml)
1+
# Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest)
32

4-
<!-- [![npm version](https://badge.fury.io/js/@centrifuge%2Fsdk.svg)](https://www.npmjs.com/package/@centrifuge/sdk) -->
5-
6-
[![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest)
7-
8-
# Centrifuge JavaScript SDK
9-
10-
CentrifugeSDK provides a JavaScript client to interact with the Centrifuge ecosystem. It provides a comprehensive interface to easily create and manage pools, nfts, loans and metadata.
3+
The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more.
114

125
## Installation
136

14-
CentrifugeSDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK.
7+
Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK.
158

169
```bash
1710
npm install --save @centrifuge/sdk viem
11+
# or
12+
yarn install @centrifuge/sdk viem
1813
```
1914

2015
## Init and config
@@ -27,7 +22,7 @@ import Centrifuge from '@centrifuge/sdk'
2722
const centrifuge = new Centrifuge()
2823
```
2924

30-
The following config options can be passed on initilization of CentrifugeSDK:
25+
The following config options can be passed on initialization of the SDK:
3126

3227
- `environment: 'mainnet' | 'demo' | 'dev'`
3328
- Optional
@@ -66,7 +61,7 @@ To perform transactions, you need to set a signer on the `centrifuge` instance.
6661
centrifuge.setSigner(signer)
6762
```
6863

69-
`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local)
64+
`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local).
7065

7166
With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates.
7267

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"test:simple:single": "mocha --loader=ts-node/esm --exit --timeout 60000",
3434
"test:single": "mocha --loader=ts-node/esm --require $(pwd)/src/tests/setup.ts --exit --timeout 60000",
3535
"test:ci": "yarn test --reporter mocha-multi-reporters --reporter-options configFile=mocha-reporter-config.json",
36-
"test:coverage": "nyc yarn test"
36+
"test:coverage": "c8 yarn test:ci"
3737
},
3838
"dependencies": {
3939
"decimal.js-light": "^2.5.1",
@@ -47,6 +47,7 @@
4747
"@types/node": "^22.7.8",
4848
"@types/sinon": "^17.0.3",
4949
"@types/sinon-chai": "^4",
50+
"c8": "^10.1.2",
5051
"chai": "^5.1.2",
5152
"dotenv": "^16.4.5",
5253
"eslint": "^9.12.0",
@@ -55,7 +56,6 @@
5556
"mocha-multi-reporters": "^1.5.1",
5657
"mochawesome": "^7.1.3",
5758
"npm-run-all": "4.1.5",
58-
"nyc": "^17.1.0",
5959
"prettier": "^3.3.3",
6060
"sinon": "^19.0.2",
6161
"sinon-chai": "^4.0.0",

0 commit comments

Comments
 (0)