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