v1.6.0
What's Changed
Language-Specific Changes
Key Changes for Typescript
With the move from grpc-ts
to ts-proto
, the syntax of creating a protobuf object has significantly changed. This is a compile time change, not an over-the-wire change. Rather than using a verbose Java-style builder pattern, the new format takes advantage of typescripts interfaces and type coercion.
- For instance, to insert an item into a wallet:
// Was this
const insertResponse = await walletService.insertItem(new InsertItemRequest()
.setItemJson(issueResponse.getSignedDocumentJson()));
// And is now this
let insertResponse = await trinsic.wallet().insertItem(
InsertItemRequest.fromPartial({
itemJson: issueResponse.signedDocumentJson,
})
);
- If you are defining every field on the object, you can skip the
[CLASSNAME].fromPartial()
call as shown here:
// Was this
const issueResponse = await credentialService.issueCredential(new IssueRequest()
.setDocumentJson(JSON.stringify(unsignedDocument)));
// And is now this
let issueResponse = await trinsic.credential().issueCredential({
documentJson: JSON.stringify(unsignedDocument),
});
Other methods are similar. While for these cases the savings isn't much, for objects with large numbers of fields being set, the code is much cleaner.
Key Changes for Java
In preparation for some backend work, we have moved Java from container classes (with inconsistent names) to singular classes inside each file. For instance, what was AccountOuterClass.AccountProfile
is now AccountProfile
and can be directly imported. This allows for .*
imports of the relevant namespace, rather than explicitly defining the container class. This is a compile-time breaking change, not a runtime one. The VaccineDemo.java
before and after
Single SDK Service
We have added a single wrapper, TrinsicService
, which you can import and use in lieu of instanting each individual service (and trying to keep the AuthToken
consistent among them). For now, the existing AccountService
/WalletService
/etc are simply wrapped. In the future, this API cleanup will also handle channel reuse to reduce resource consumption.
New Login Flow
We've changed the login flow to increase security and reduce developer confusion.
Previously, a call to SignIn
would return an auth token string, which may or may require a call to Unprotect
.
Now, simply call Login
, followed by LoginConfirm
, which will return an auth token string.
We have also added a helper method, LoginAnonymous
, which you can use to create and login to an anonymous account (not tied to an email/phone number, and requiring no authentication). This is mainly useful for automated testing and prototyping.
The old flow is deprecated, and will be removed in a future release.
Webhooks
We have added support for Webhooks, wherein our services can call out to a REST endpoint which you provide and define.
Click here for more information on implementing webhook functionality.
New Language Support - Dart!
We have added beta support for Dart (and Android Flutter) with 1.6.0. Currently, the package is not published on dart pub, but this will be coming later. For now, you can import the required SDK package directly from github via pubspec.yaml
as shown below:
dependencies:
# Other dependencies here
trinsic_dart:
git:
url: https://github.com/trinsic-id/sdk.git
path: dart
- Dart support by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/670
- Dart refactor go vaccine demo ruby vaccine demo by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/677
Documentation and Samples
- Documentation Navigation Reorganization by @geel9 in https://github.com/trinsic-id/sdk/pull/632
- Add OIDC documentation first pass by @geel9 in https://github.com/trinsic-id/sdk/pull/634
- Remove ligatures from doc fonts by @geel9 in https://github.com/trinsic-id/sdk/pull/655
- Completed walkthrough page by @MichaelEdwardBlack in https://github.com/trinsic-id/sdk/pull/629
- Update name of
TrinsicService
in samples by @geel9 in https://github.com/trinsic-id/sdk/pull/789 - Vaccine walkthrough improvements by @geel9 in https://github.com/trinsic-id/sdk/pull/664
- Fix typo in docs by @geel9 in https://github.com/trinsic-id/sdk/pull/674
- Vaccine Walkthrough C# Test Suite & Serialization Rewording by @geel9 in https://github.com/trinsic-id/sdk/pull/673
- Java Vaccine Walkthrough Fixes by @geel9 in https://github.com/trinsic-id/sdk/pull/686
- Vaccine Walkthrough
batchNumber
field type by @geel9 in https://github.com/trinsic-id/sdk/pull/687 - Vaccine Walkthrough Finalize by @geel9 in https://github.com/trinsic-id/sdk/pull/689
- Walkthrough: tweaks / CLI fixes by @geel9 in https://github.com/trinsic-id/sdk/pull/690
- Walkthrough: temporarily set
batchNumber
to string type by @geel9 in https://github.com/trinsic-id/sdk/pull/692 - Python Sample Improvements by @geel9 in https://github.com/trinsic-id/sdk/pull/675
- Protobuf Object Documentation Overhaul by @geel9 in https://github.com/trinsic-id/sdk/pull/709
- Template & Wallet Service page passes by @geel9 in https://github.com/trinsic-id/sdk/pull/716
- Split
Key Concepts
intoKey Concepts
andTrinsic Platform
; renameServices
toReference
by @geel9 in https://github.com/trinsic-id/sdk/pull/788 - Sdk 773 uniservice samples by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/775
- Sdk 773 uniservice samples by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/779
- Docs: Service Page Passes by @geel9 in https://github.com/trinsic-id/sdk/pull/731
- Webhook method documentation, pending samples by @geel9 in https://github.com/trinsic-id/sdk/pull/741
- Remove documentation for 1.6.0-specific methods (pre-release) by @geel9 in https://github.com/trinsic-id/sdk/pull/746
- CLI demo, add trust registry membership by @tmarkovski in https://github.com/trinsic-id/sdk/pull/778
- OIDC client verifier sample by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/714
Protobuf / gRPC Updates
- Update protos: docs, trust registry by @tmarkovski in https://github.com/trinsic-id/sdk/pull/635
- protoc is already set up, don't download it for typescript release by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/641
- Remove explicit grpc-js dependency by @tmarkovski in https://github.com/trinsic-id/sdk/pull/654
- node and web aren't separate releases anymore by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/657
- Typescript 1.6.0 RC1 by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/656
- fix release action for 1.6.0rc1 by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/658
- Update protos from server with changes to account API by @tmarkovski in https://github.com/trinsic-id/sdk/pull/703
- Create ecosystem proto and implementation changes by @tmarkovski in https://github.com/trinsic-id/sdk/pull/756
- Generated Protos for import-protos-from-server by @github-actions in https://github.com/trinsic-id/sdk/pull/783
Single Service Access / Webhooks / New Signin Flow
- Typescript for 615, 666, 719 by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/733
- All the python work for 666, 615, 719 by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/732
- Fix betterproto bug by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/734
- Dart work for 615, 666, 719 by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/736
- Ruby update 615 666 719 by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/740
- Java & Kotlin 615, 666, 719 by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/739
- Go 615, 666, 719 by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/738
- .NET SDK: Uniservice, New Login, Webhooks (#615, #666, #719) by @geel9 in https://github.com/trinsic-id/sdk/pull/744
- Go: Add
LoginAnonymous
, refactorLoginConfirm
(per #750) by @geel9 in https://github.com/trinsic-id/sdk/pull/752 - .NET: Add
LoginAnonymous
, refactorLoginConfirm
(per #750) by @geel9 in https://github.com/trinsic-id/sdk/pull/751 - Python: Add
login_anonymous()
, refactorlogin_confirm()
(per #750) by @geel9 in https://github.com/trinsic-id/sdk/pull/755 - Java: Add
loginAnonymous
, refactorloginConfirm
(per #750) by @geel9 in https://github.com/trinsic-id/sdk/pull/754 - Sdk 750 loginanonymous dart ruby typescript by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/753
- Golang single service by @sethjback in https://github.com/trinsic-id/sdk/pull/704
- CLI: Switch to
login
/loginConfirm
by @geel9 in https://github.com/trinsic-id/sdk/pull/762 - Fix erroneous authentication for
login()
,loginConfirm()
by @geel9 in https://github.com/trinsic-id/sdk/pull/771 - Add all CLI commands from #769 by @geel9 in https://github.com/trinsic-id/sdk/pull/784
Bugfixes / Minor Improvements
- Update golang paths by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/671
- Sdk 669 make credential service singular by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/681
- sdk 669 addFramework/removeFramework consistent across all languages by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/682
- update to go okapi 1.5.0 by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/684
- Package production testing for golang by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/683
- Sdk 693 Update to Okapi 1.6.0 by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/694
- Update golang packages by @sethjback in https://github.com/trinsic-id/sdk/pull/710
- [cli] Add machine readable output format by @tmarkovski in https://github.com/trinsic-id/sdk/pull/766
- Update okapi.net dependency by @tmarkovski in https://github.com/trinsic-id/sdk/pull/770
- CLI: fix test script staging url by @tmarkovski in https://github.com/trinsic-id/sdk/pull/787
Internal Improvements
- Remove Okapi.Net requirement for .NET references by @tmarkovski in https://github.com/trinsic-id/sdk/pull/660
- Update change request template by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/672
- Remove issue comment action by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/680
- Go formatting fixes by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/679
- Action badge should only report main by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/685
- Clean up
setTestTimeout
by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/697 - Upload Unit test results to code-cov by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/698
- Bump protobufjs from 6.11.2 to 6.11.3 in /web by @dependabot in https://github.com/trinsic-id/sdk/pull/702
- Bump protobufjs from 6.11.2 to 6.11.3 in /samples/node by @dependabot in https://github.com/trinsic-id/sdk/pull/701
- Create .editorconfig by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/705
- Bump yaml-rust from 0.3.5 to 0.4.1 in /cli by @dependabot in https://github.com/trinsic-id/sdk/pull/706
- Create SECURITY.md by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/711
- Codecov.io badge by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/695
- PRs target not main, devops python tweaks by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/729
- Update sdk-change.md by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/720
- Typo fix by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/721
- update generated protos by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/713
- Sdk 699 download and install plugins by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/715
- Copied Protos from server by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/780
- Fix some broken tests by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/782
- Submodule in swift by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/791
- Ruby code runs now by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/794
- Support Anonymous Endpoints by @fundthmcalculus in https://github.com/trinsic-id/sdk/pull/774
Full Changelog: trinsic-id/sdk@v1.5.0...v1.6.0