Releases: KILTprotocol/sdk-js
1.0.0
Release Notes for Version 1.0.0
To reduce the complexity of our SDK and improve its user-friendliness, we've redesigned its user-facing interfaces. Version 1.0.0 of @kiltprotocol/sdk-js
comes with a streamlined surface that supports long-term maintainability. This includes a shift towards higher-level functions that conceal much of the underlying complexity.
As part of this effort, we've transitioned to exclusively using KILT credentials in their W3C Verifiable Credentials Data Model V1.1 representation. Credentials using the traditional format can be converted to and from the VC data model format using the new @kiltprotocol/legacy-credentials
package.
Comprehensive documentation and migration instructions will be provided soon on docs.kilt.io.
What has changed
@kiltprotocol/sdk-js
version1.0.0
introduces a much cleaner, curated surface comprised only of high-level functions.- Lower-level functions can be imported directly from its constituent packages, for which we release versions
0.100.0
. - New releases of existing packages:
@kiltprotocol/did
@kiltprotocol/chain-helpers
@kiltprotocol/types
@kiltprotocol/config
@kiltprotocol/utils
- Releases of new 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 formerly 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
.
Changelog
chore: release v1 by @rflechtner in #897
Full Changelog: 0.35.2...1.0.0
Contributors
@rflechtner
@abdulmth
@ntn-x2
@arty-name
@tjwelde
@Dudleyneedham
0.35.2
This release fixes a bug in which the a mismatch between a CType passed to 'verifyPresentation' and the actual CType of the credential was not detected and silently ignored.
Now compares the CType's id/hash, if present, with the CType Hash in the Credential.
What's Changed
Full Changelog: 0.35.1...0.35.2
0.35.1
0.35.0
What's changed
We've added support for upcoming changes on the KILT network which are included in the kilt-node release 1.12.1. Upgrading to this version is recommended for all projects to maintain compatibility with future runtime upgrades.
Breaking Changes
Once upgraded to the latest runtime, account balances will be represented differently, where a distinction will be made only between free
, frozen
and reserved
balance (see https://paritytech.github.io/polkadot-sdk/master/pallet_balances/struct.AccountData.html). Applications working with balance queries should make sure they are able to work with both the existing and future representations of account balances, as the new representation will be in effect for all apps immediately upon runtime upgrade.
This runtime also switches to version 4 of the TransactionPaymentApi
runtime calls, requiring more recent versions of @polkadot/api
for support. The dependency manifest has been updated accordingly.
All changes
fix: consider dispatchAs in ctype/public credential fetching logic by @rflechtner in e691cc2
test: add integration tests for dispatchAs by @rflechtner in e9c8a56
chore: augmentation for runtime 1.12.1 by @rflechtner in 9d0ea9b
chore: update references to mashnet-node by @rflechtner in 3852998
chore: require @polkadot/api^10.7.3 by @rflechtner in f73e393
Full Changelog: 0.34.0...0.35.0
0.34.1-rc.1
What's changed
This small release adds support for the KILT Decentralized Identity Provider (DIP) components. It will be compatible with the current Spiritnet and Peregrine 11000 runtimes and with the upcoming Spiritnet and Peregrine runtimes 12000, the latter of which will add beta support for the DIP Provider components.
This PR also updates the type augmentation based on the latest version of the Spiritnet runtime.
Features
Chores
0.34.0
What's changed
Besides updating typings to match the latest chain runtime 1.11.0, this release includes mostly quality-of-life enhancements and improves coverage of integrated tests.
Breaking Changes
- refactor!: nest ctype in ICTypeDetails by @rflechtner in #766
- Migration: Instead of
const { createdAt, creator, ...cType } = await CType.fetchFromChain(cTypeId)
use the simplified syntaxconst { cType } = await CType.fetchFromChain(cTypeId)
to retrieve a CType definition from the Kilt blockchain.
- Migration: Instead of
Features
- feat: re-export imported types from @kiltprotocol/types by @rflechtner in #762
- feat: deprecation message for CType meta schema draft-01 by @rflechtner in #778
Other
- test: esm variant of integration tests by @rflechtner in #779
- test: make tests work with new kilt node cli by @rflechtner in #796
- chore(deps): update cbor-web to v9 by @rflechtner in a62e7fd
- chore: update metadata to 1.11.0 by @rflechtner in 417cdf0
Full Changelog: 0.33.1...0.34.0
0.33.1
This release fixes an issue arising in 0.33.0
where the ESM builds of some packages failed to properly import the dependency cbor-web
.
What's Changed
- fix: cbor-web imports do not work in esm by @rflechtner in #772
- ci: fix test polkadot deps wf by @rflechtner in #768
Full Changelog: 0.33.0...0.33.1
0.33.0
Breaking Changes
Credential Verification
Credential.verifyCredential
&Credential.verifyPresentation
will now check for an on-chain attestation (requires an open connection to a full node) and throw if the credential has not been attested.
These functions now return the credential with two properties added:revoked
(indicates whether the attestation was revoked) andattester
(indicates the issuer of the attestation).
To run only off-line integrity checks, useverifyWellFormed
instead.- As part of the change to the credential verification logic, we introduced a function called
refreshRevocationStatus
, which is tailored towards re-checking the validity of an already verified credential to make sure it has not been revoked in the meantime.
- As part of the change to the credential verification logic, we introduced a function called
- The function
verifyAgainstCType
has been removed. UseCType.verifyClaimAgainstSchema(credential.claim.contents, ctype)
instead, or simply use the optionalctype
parameter onCredential.verifyWellFormed
,Credential.verifyCredential
&Credential.verifyPresentation
.
CType Creation
- We also introduced a new CType metaschema which allows additional features on CTypes, which is recommended to be used on all new CTypes.
CType.fromProperties
now defaults to using the new metaschema, which impacts the CType hash & id. If you need to recreate a CType using the old metaschema, set the newly introduced third parameter of this function to'draft-01'
.
Misc
- Updating to recent versions of polkadot/api and polkadot/common dependencies required ending support for node 14.
- We removed the
BlockchainApiMissingError
in order to reduce dependencies of the@kiltprotocol/config
package. If no polkadot api object has been provided before calling chain-related functions, this will now throw a generic error instead.
What's Changed
Features
- feat!: enums and arrays on new ctype metaschema by @rflechtner in #740
- feat!: fetch attestation as part of verifyCredential by @rflechtner in #708
- feat: cbor-web replaces cbor by @arty-name in #754
Bugfixes
- fix!: current CType meta schema ignores additional properties in claim contents by @rflechtner in #726
- fix: integration test error matching by @rflechtner in fea185f
- fix: augmented type generation by @rflechtner in #747
Other
- chore(deps)!: update polkadot/common dependencies to v12 by @renovate & @rflechtner in #749
- refactor!: remove kilt dependencies from config package by @rflechtner in #763
- chore(deps): update polkadot dependencies by @renovate in #732
- chore: update metadata to 11000 by @rflechtner in 5920dce
- test: breaking changes by @tjwelde in #642
Full Changelog: 0.32.1...0.33.0
0.32.1
A smaller release comprising a bug fix for the @kiltprotocol/config package.
What's changed
- fix: make config package cjs-only by @rflechtner in #755
- ci: update GitHub workflows by @rflechtner in #745
Full Changelog: 0.32.0...0.32.1
0.32.0
In addition to enabling linking Ethereum addresses to a DID, the upcoming kilt-node release 1.10.0 also changes the challenge mechanism used by the account linking pallet, resulting in a breaking change.
In order to be able to continue to create new links between DIDs and accounts after runtime upgrade, applications should upgrade to version 0.32.0 of the SDK as soon as possible.
What's Changed
- feat: support for new account linking challenge & split
associateAccountToChainArgs
by @weichweich in #730 - fix: fromFemtoKilt fails for non-english locales by @rflechtner in #731
- fix: integration test error matching by @rflechtner in fea185f
- fix: use runtime version to check for ethereum linking by @rflechtner in e4788d1
- chore: type augmentation for 1.10.0-rc1 by @rflechtner in 6d37170
- chore: enable tests for ethereum linking by @rflechtner in #724
- chore: remove unused package.json by @rflechtner in 717b8aa
- chore: update LICENSE by @GustavHemmelmayr in #737
- chore(deps): bump json5 from 1.0.1 to 1.0.2 by @dependabot in #707
- chore(deps): bump some deps by @rflechtner in #721
- chore(deps): update dependency testcontainers to v9 by @renovate in #671
Full Changelog: 0.31.1...0.32.0