v0.19.0 (2020-08-05)
Overview
This release is a big one. We included new features, security improvements, dependency updates for substrate 2 compatibility and more tests.
Substrate 2
In regards to our substrate 2 chain update, we updated all our dependencies to be compatible to that.
Privacy enhanced credentials (Portablegabi)
We integrated an option to use fully anonymous credentials, we call "privacy enhanced credentials", based on our portablegabi library, which itself is based on Gabi Go from the Privacy By Design Foundation
Nested CTypes
You are now able to reference another CType in a field of a CType. This requires them to use a unique URI like string in the $id
field, which we are generating for you. You can reference another CType with the $ref
key.
Input checks
All our classes now check in the constructor, if the provided parameters are of expected type and format. You can also use new custom typeguards, to check if some data is of a specific type yourself, e.g. Attestation.isAttestation(data)
.
Compress / Decompress objects
For easier storage of objects, they can now be converted to a simple object presentation of themselves. To turn them back into class instances, you can use the decompress functions.
Changelog
BREAKING CHANGES
- CTypes now require a URI-like string in the
$id
field. This has to be in the formatkilt:ctype:0x123456
with the hex part being the hash of the ctype schema. This$id
is generated for you, when using theCType.fromSchema
function. You can also generate it yourself withCTypeUtils.getIdForSchema(schema)
. - refactor message encryption and decryption (#276) (b029028)
message.getEncryptedMessage
renamed tomessage.encrypt
Message.createFromEncryptedMessage
renamed toMessage.decrypt
- include
Message.ensureHashAndSignature
andMessage.ensureOwnerIsSender
indecrypt
per default
listenToBalanceChanges
now returns the unsub method so that listeners can unsubscribe, thelistener
parameter is now required
Features
Major
- add optional privacy enhancement by implementing anonymous credentials from portablegabi (#258) (0cb1b2e)
- opt-in by default (#292) (8e5d788)
- adds multi-show unlinkability and selective disclosure to KILT credentials
- see docs/example.ts for code
- add Nested CTypes (#222) (4a09b7b)
- enable users to link pre-existing CTypes to create deeper nested data structures
- add compression and decompression of objects (#240) (3d28420)
- add type checks on chain queries + improvements to static typing (#260) (791206c) and (#286) (15bfc92)
- add constructor input checks (601f30a)
- replace
TxStatus
withSubmittableResult
(#250) (82c3d59) - add query of delegation root id (#276) (f8e96f6)
Attestation.getDelegationRoot(delegationId)
Minor
- summarize errors in SDKErrors (a5b4ff2)
- add index filed (fb21ee9)
- reject attestation should reference the request (122ba69)
- add required fields from ctype schema to wrapper schema (#272) (f1ba0d9)
- some fields were not marked as required before
- copy jsonabc into project (#293) (a32f8af)
- and build with it (0ebbd75)
- publish
develop
branch to github packages (#274) (5b84729) - add dockerfile for running integration tests (#254) (2acbafb)
Bug Fixes
Minor
- ctype compress accepts nulled owner (1eb044a)
getCached
returnsBlockchainApi
instead ofBlockchain
(#270) (76e65b6)- leaked subscription (#266) (edbc02a)
getPublicIdentity
should be instanceofPublicIdentity
instead ofobject
(#264) (b4f4d0c)