@@ -28,6 +28,10 @@ export namespace TSAuthenticationSDK {
2828 result : string ;
2929 }
3030
31+ export interface DeviceInfo {
32+
33+ }
34+
3135 export const enum TSAuthenticationError {
3236 notInitialized ,
3337 userNotFound ,
@@ -44,8 +48,11 @@ export namespace TSAuthenticationSDK {
4448
4549export interface TSAuthenticationSDKModule {
4650 initialize : ( clientId : string , domain : string , baseUrl : string ) => Promise < boolean > ;
47- register : ( username : string , displayName : string ) => Promise < TSAuthenticationSDK . TSRegistrationResult > ;
48- authenticate : ( username : string ) => Promise < TSAuthenticationSDK . TSAuthenticationResult > ;
51+ registerWebAuthn : ( username : string , displayName : string ) => Promise < TSAuthenticationSDK . TSRegistrationResult > ;
52+ authenticateWebAuthn : ( username : string ) => Promise < TSAuthenticationSDK . TSAuthenticationResult > ;
53+ signWebauthnTransaction : ( username : string ) => Promise < TSAuthenticationSDK . TSAuthenticationResult > ;
54+ getDeviceInfo : ( ) => Promise < TSAuthenticationSDK . DeviceInfo > ;
55+ isWebAuthnSupported : ( ) => Promise < boolean > ;
4956}
5057
5158class AuthenticationSDK implements TSAuthenticationSDKModule {
@@ -54,17 +61,24 @@ class AuthenticationSDK implements TSAuthenticationSDKModule {
5461 return TsAuthentication . initialize ( clientId , domain , baseUrl ) ;
5562 }
5663
57- register ( username : string , displayName : string ) : Promise < TSAuthenticationSDK . TSRegistrationResult > {
58- return TsAuthentication . register ( username , displayName ) ;
64+ registerWebAuthn ( username : string , displayName : string ) : Promise < TSAuthenticationSDK . TSRegistrationResult > {
65+ return TsAuthentication . registerWebAuthn ( username , displayName ) ;
5966 }
6067
61- authenticate ( username : string ) : Promise < TSAuthenticationSDK . TSAuthenticationResult > {
62- return TsAuthentication . authenticate ( username ) ;
68+ authenticateWebAuthn ( username : string ) : Promise < TSAuthenticationSDK . TSAuthenticationResult > {
69+ return TsAuthentication . authenticateWebAuthn ( username ) ;
6370 }
6471
65- signTransaction ( username : string ) : Promise < TSAuthenticationSDK . TSAuthenticationResult > {
66- return TsAuthentication . signTransaction ( username ) ;
72+ signWebauthnTransaction ( username : string ) : Promise < TSAuthenticationSDK . TSAuthenticationResult > {
73+ return TsAuthentication . signWebauthnTransaction ( username ) ;
6774 }
6875
76+ getDeviceInfo ( ) : Promise < TSAuthenticationSDK . DeviceInfo > {
77+ return TsAuthentication . getDeviceInfo ( ) ;
78+ }
79+
80+ isWebAuthnSupported ( ) : Promise < boolean > {
81+ return TsAuthentication . isWebAuthnSupported ( ) ;
82+ }
6983}
7084export default new AuthenticationSDK ( ) ;
0 commit comments