Skip to content

Commit ec335d7

Browse files
rflechtnerabdulmthntn-x2Dudleyneedham
authored
chore: release v1 (#897)
Combines a series of changes we've made to make the SDK more user-friendly. This is a major breaking change compared to existing `0.x.x` versions. - Releases version 1 of `@kiltprotocol/sdk-js` with a reduced, simplified, high-level surface that allows long-term support. - This uses new releases (version 0.100.0) of the following packages: - `@kiltprotocol/chain-helpers` - `@kiltprotocol/types` - `@kiltprotocol/config` - `@kiltprotocol/did` - `@kiltprotocol/utils` - It also introduces the following packages: - `@kiltprotocol/credentials`: Provides functionality to issue and verify Verifiable Credentials and Verifiable Presentations; helps with creating and loading CTypes. - `@kiltprotocol/legacy-credentials`: Provides legacy credential functionality formally provided by `@kiltprotocol/core`. - `@kiltprotocol/asset-credentials`: Provides functionality around Asset DIDs and Asset Credentials. - `@kiltprotocol/jsonld-suites`: Provides helpers for issuing and verifying KILT credentials using `@digitalbazaar/vc`. - The following packages have been discontinued or moved: - `@kiltprotocol/augment-api` & `@kiltprotocol/type-definitions`: Moved into a new repository (KILTprotocol/types-augment). - `@kiltprotocol/vc-export`: Discontinued; Most functionality moved to `@kiltprotocol/jsonld-suites`, conversion between VCs and legacy credentials has moved to `@kiltprotocol/legacy-credentials`. - `@kiltprotocol/asset-did`: Discontinued; Moved into `@kiltprotocol/asset-credentials`. - `@kiltprotocol/core`: Discontinued; Most functions have moved into `@kiltprotocol/legacy-credentials`; CType-related functions have moved to `@kiltprotocol/credentials`; functions relating to connecting to a blockchain node have moved to `@kiltprotocol/chain-helpers`. - `@kiltprotocol/messaging`: Discontinued; Functionality has been moved to `@kiltprotocol/kilt-extension-api` --------- Co-authored-by: Abdulrahim Al Methiab <[email protected]> Co-authored-by: Antonio <[email protected]> Co-authored-by: Skedley <[email protected]>
1 parent 1881c44 commit ec335d7

File tree

330 files changed

+20893
-34133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

330 files changed

+20893
-34133
lines changed

.eslintrc.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,20 +152,15 @@ module.exports = {
152152
'no-console': 'off',
153153
},
154154
},
155-
{
156-
files: ['**/augment-api/src/interfaces/**/*.ts'],
157-
rules: {
158-
'license-header/header': 'off',
159-
},
160-
},
161155
{
162156
files: ['tests/**/*'],
163157
rules: {
164158
'import/extensions': 'off',
165159
'jsdoc/require-jsdoc': 'off',
166160
'no-console': 'off',
167161
'@typescript-eslint/explicit-function-return-type': 'off',
168-
'import/no-extraneous-dependencies': 'off'
162+
'import/no-extraneous-dependencies': 'off',
163+
'no-underscore-dangle': 'off'
169164
},
170165
},
171166
],

.github/actions/cached-image-pull/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ runs:
2727
2828
- name: check image cache
2929
id: image-cache
30-
uses: actions/cache@v3
30+
uses: actions/cache@v4
3131
with:
3232
path: ${{ steps.image-file.outputs.path }}
3333
key: image-cache-${{ inputs.image }}

.github/workflows/devpackpublish.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
11
name: Publish dev package to npm
2-
on:
3-
push:
4-
branches:
5-
- develop
6-
paths:
7-
- '**/*.ts'
8-
- 'package.json'
9-
- '**/package.json'
10-
- '!**/*.spec.ts'
11-
- '!**/__integrationtests__'
12-
- '!**/__mocks__'
13-
- '!docs/**'
2+
on: workflow_dispatch
3+
144
jobs:
155
build:
166
runs-on: ubuntu-latest
177
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && github.repository == 'kiltprotocol/sdk-js'"
188
steps:
19-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@v4
2010
with:
2111
# fetch-depth 0 and token needed to push changes on the package.json files back.
2212
fetch-depth: 0
2313
token: ${{ secrets.REPO_ACCESS_TOKEN }}
24-
- uses: actions/setup-node@v3
14+
- uses: actions/setup-node@v4
2515
with:
2616
node-version-file: '.nvmrc'
2717
cache: 'yarn'

.github/workflows/docpublish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: Install and Build
1616
run: |

.github/workflows/npmpublish-rc.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
name: Publish candidate package
22

3-
on: workflow_dispatch
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
npm_tag:
7+
description: The tag with which the package is tagged on npm.
8+
required: true
9+
options:
10+
- dev
11+
- alpha
12+
- beta
13+
- rc
14+
type: choice
15+
default: dev
416

517
jobs:
618
build:
719
runs-on: ubuntu-latest
820
steps:
9-
- uses: actions/checkout@v3
10-
- uses: actions/setup-node@v3
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-node@v4
1123
with:
1224
node-version-file: '.nvmrc'
1325
cache: 'yarn'
@@ -19,8 +31,8 @@ jobs:
1931
needs: build
2032
runs-on: ubuntu-latest
2133
steps:
22-
- uses: actions/checkout@v3
23-
- uses: actions/setup-node@v3
34+
- uses: actions/checkout@v4
35+
- uses: actions/setup-node@v4
2436
with:
2537
node-version-file: '.nvmrc'
2638
cache: 'yarn'
@@ -32,9 +44,9 @@ jobs:
3244
run: yarn run bundle
3345
- name: Get current package version
3446
id: package_version
35-
run: echo "package_version=$(node -pe "require('./package.json').version")" >> $GITHUB_OUTPUT
47+
run: echo "package_version=$(node -pe "require('./package.json').version")" >> $GITHUB_OUTPUT
3648
- name: Publish to NPM
37-
run: yarn run publish --tag rc
49+
run: yarn run publish --tag ${{ inputs.npm_tag }}
3850
env:
3951
YARN_NPM_AUTH_TOKEN: ${{secrets.npm_token}}
4052
- name: Repository Dispatch
@@ -43,4 +55,4 @@ jobs:
4355
token: ${{ secrets.REPO_ACCESS_TOKEN }}
4456
repository: KILTProtocol/docs
4557
event-type: sdk-update
46-
client-payload: '{"latestTag": "${{ steps.package_version.outputs.package_version }}"}'
58+
client-payload: '{"latestTag": "${{ steps.package_version.outputs.package_version }}"}'

.github/workflows/npmpublish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
10-
- uses: actions/setup-node@v3
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-node@v4
1111
with:
1212
node-version-file: '.nvmrc'
1313
cache: 'yarn'
@@ -19,8 +19,8 @@ jobs:
1919
needs: build
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v3
23-
- uses: actions/setup-node@v3
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-node@v4
2424
with:
2525
node-version-file: '.nvmrc'
2626
cache: 'yarn'
@@ -32,7 +32,7 @@ jobs:
3232
run: yarn run bundle
3333
- name: Get current package version
3434
id: package_version
35-
run: echo "package_version=$(node -pe "require('./package.json').version")" >> $GITHUB_OUTPUT
35+
run: echo "package_version=$(node -pe "require('./package.json').version")" >> $GITHUB_OUTPUT
3636
- name: Publish to NPM
3737
run: yarn run publish --tag latest
3838
env:
@@ -43,4 +43,4 @@ jobs:
4343
token: ${{ secrets.REPO_ACCESS_TOKEN }}
4444
repository: KILTProtocol/docs
4545
event-type: sdk-update
46-
client-payload: '{"latestTag": "${{ steps.package_version.outputs.package_version }}"}'
46+
client-payload: '{"latestTag": "${{ steps.package_version.outputs.package_version }}"}'

.github/workflows/test-node-candidate.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ env:
1212
TESTCONTAINERS_WATCHER_IMG: testcontainers/ryuk:0.3.2
1313

1414
jobs:
15-
1615
build:
1716
runs-on: ubuntu-latest
1817

1918
steps:
20-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2120
- name: Setup Node.js
22-
uses: actions/setup-node@v3
21+
uses: actions/setup-node@v4
2322
with:
2423
node-version-file: '.nvmrc'
2524
cache: 'yarn'
@@ -30,7 +29,7 @@ jobs:
3029
- name: zip build
3130
run: zip -r build.zip .
3231
- name: upload build
33-
uses: actions/upload-artifact@v3
32+
uses: actions/upload-artifact@v4
3433
with:
3534
name: build
3635
path: build.zip
@@ -39,7 +38,7 @@ jobs:
3938
runs-on: ubuntu-latest
4039
needs: build
4140
steps:
42-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v4
4342
- name: make sure testcontainers image is in cache
4443
uses: ./.github/actions/cached-image-pull
4544
with:
@@ -51,28 +50,28 @@ jobs:
5150
needs: cache_imgs
5251

5352
steps:
54-
- uses: actions/download-artifact@v3
53+
- uses: actions/download-artifact@v4
5554
with:
5655
name: build
5756
- name: unzip
5857
run: unzip build.zip -d .
5958
- name: Setup Node.js
60-
uses: actions/setup-node@v3
59+
uses: actions/setup-node@v4
6160
with:
6261
node-version-file: '.nvmrc'
6362
- name: Log out node version
6463
run: node --version
6564

6665
- name: Configure AWS credentials
67-
uses: aws-actions/configure-aws-credentials@v2
66+
uses: aws-actions/configure-aws-credentials@v4
6867
with:
6968
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
7069
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
7170
aws-region: eu-central-1
7271

7372
- name: Login to Amazon ECR
7473
id: login-ecr
75-
uses: aws-actions/amazon-ecr-login@v1
74+
uses: aws-actions/amazon-ecr-login@v2
7675

7776
- name: pull image
7877
env:
@@ -97,19 +96,19 @@ jobs:
9796
needs: build
9897

9998
steps:
100-
- uses: actions/download-artifact@v3
99+
- uses: actions/download-artifact@v4
101100
with:
102101
name: build
103102
- name: unzip
104103
run: unzip build.zip -d .
105104
- name: Setup Node.js
106-
uses: actions/setup-node@v3
105+
uses: actions/setup-node@v4
107106
with:
108107
node-version-file: '.nvmrc'
109108
- name: yarn bundle
110109
run: yarn bundle
111110
- name: upload bundle artifact
112-
uses: actions/upload-artifact@v3
111+
uses: actions/upload-artifact@v4
113112
with:
114113
name: checked-nonmin-bundle
115114
path: packages/sdk-js/dist/sdk-js.umd.js
@@ -120,29 +119,29 @@ jobs:
120119
needs: [cache_imgs, bundle_cache]
121120

122121
steps:
123-
- uses: actions/download-artifact@v3
122+
- uses: actions/download-artifact@v4
124123
with:
125124
name: build
126125
- name: unzip
127126
run: unzip build.zip -d .
128-
- uses: actions/download-artifact@v3
127+
- uses: actions/download-artifact@v4
129128
with:
130129
name: checked-nonmin-bundle
131130
path: packages/sdk-js/dist
132-
- uses: actions/setup-node@v3
131+
- uses: actions/setup-node@v4
133132
with:
134133
node-version-file: '.nvmrc'
135134
- run: basename /packages/sdk-js/dist/
136135
- name: Configure AWS credentials
137-
uses: aws-actions/configure-aws-credentials@v2
136+
uses: aws-actions/configure-aws-credentials@v4
138137
with:
139138
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
140139
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
141140
aws-region: eu-central-1
142141

143142
- name: Login to Amazon ECR
144143
id: login-ecr
145-
uses: aws-actions/amazon-ecr-login@v1
144+
uses: aws-actions/amazon-ecr-login@v2
146145
- name: pull node image
147146
env:
148147
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}

.github/workflows/tests-polkadot-deps.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
node-version: [16.x, 18.x, 20.x]
16+
node-version: [18.x, 20.x, 22.x]
1717

1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
with:
2121
ref: master
2222
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v3
23+
uses: actions/setup-node@v4
2424
with:
2525
node-version: ${{ matrix.node-version }}
2626
cache: 'yarn'
@@ -35,7 +35,7 @@ jobs:
3535
- name: list dependencies
3636
run: echo "$(yarn info -A --name-only --json)" > locked_dependencies.txt
3737
- name: upload dependencies list
38-
uses: actions/upload-artifact@v3
38+
uses: actions/upload-artifact@v4
3939
with:
4040
name: deps-${{ matrix.node-version }}
4141
path: |
@@ -47,7 +47,7 @@ jobs:
4747
- name: zip build
4848
run: zip -r build.zip .
4949
- name: upload build
50-
uses: actions/upload-artifact@v3
50+
uses: actions/upload-artifact@v4
5151
with:
5252
name: build-${{ matrix.node-version }}
5353
path: build.zip
@@ -58,16 +58,18 @@ jobs:
5858

5959
strategy:
6060
matrix:
61-
node-version: [16.x, 18.x]
61+
node-version: [18.x, 20.x]
6262
required: ['required']
6363
include:
64-
- node-version: 20.x
64+
- node-version: 16.x
65+
required: 'optional'
66+
- node-version: 22.x
6567
required: 'optional'
6668

6769
continue-on-error: ${{ matrix.required == 'optional' }}
6870

6971
steps:
70-
- uses: actions/download-artifact@v3
72+
- uses: actions/download-artifact@v4
7173
with:
7274
name: build-${{ matrix.node-version }}
7375
- name: unzip
@@ -91,9 +93,9 @@ jobs:
9193
continue-on-error: ${{ matrix.required == 'optional' }}
9294

9395
steps:
94-
- uses: actions/download-artifact@v3
96+
- uses: actions/download-artifact@v4
9597
with:
96-
name: build-16.x
98+
name: build-20.x
9799
- name: unzip
98100
run: unzip build.zip -d .
99101

@@ -106,9 +108,9 @@ jobs:
106108

107109
- name: Login to Amazon ECR
108110
id: login-ecr
109-
uses: aws-actions/amazon-ecr-login@v1
111+
uses: aws-actions/amazon-ecr-login@v2
110112

111-
- name: pull image
113+
- name: pull node image
112114
env:
113115
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
114116
ECR_REPOSITORY: kilt/prototype-chain
@@ -135,9 +137,9 @@ jobs:
135137
needs: [test, integration_test]
136138
if: failure()
137139
steps:
138-
- uses: actions/download-artifact@v3
140+
- uses: actions/download-artifact@v4
139141
with:
140-
name: deps-16.x
142+
name: deps-20.x
141143
- name: set dependencies env
142144
run: |
143145
echo 'DEPS<<EOF' >> $GITHUB_ENV

0 commit comments

Comments
 (0)