jolocom / jolocom-sdk

A tool kit for integration with SSI
Apache License 2.0
31 stars 9 forks source link

SDK APIs for request token creation #14

Closed mnzaki closed 3 years ago

mnzaki commented 4 years ago

Description

See https://github.com/jolocom/jolocom-sdk/pull/13#discussion_r425391192

This interface on JolocomSDK allows to create all sorts of request tokens, and it should probably export a higher level API, suggested to be at the Interaction level.

This would mean export things like sdk.startAuthenticationInteraction() which returns an Interaction loaded with the AuthenticationFlow

instead of sdk.authRequestToken() which returns the token itself and actually starts an interaction in the background

we should be returning the most high level thing that was created in the process, because from the high level thing you can get to the low level thing

The Interaction object returned by a start*Interaction() can return the request token if needed