diff --git a/lib/actions/user-actions.js b/lib/actions/user-actions.js --- a/lib/actions/user-actions.js +++ b/lib/actions/user-actions.js @@ -549,6 +549,20 @@ } return identityClient.registerPasswordUser; } +function useIdentityPasswordRegisterReserved(): ( + usename: string, + password: string, + keyserverMessage: string, + keyserverSignature: string, +) => Promise { + const client = React.useContext(IdentityClientContext); + const identityClient = client?.identityClient; + invariant(identityClient, 'Identity client should be set'); + if (!identityClient.registerReservedPasswordUser) { + throw new Error('Register password user method unimplemented'); + } + return identityClient.registerReservedPasswordUser; +} function useIdentityWalletRegister(): ( walletAddress: string, siweMessage: string, @@ -563,6 +577,21 @@ } return identityClient.registerWalletUser; } +function useIdentityWalletRegisterReserved(): ( + walletAddress: string, + siweMessage: string, + siweSignature: string, + keyserverMessage: string, + keyserverSignature: string, +) => Promise { + const client = React.useContext(IdentityClientContext); + const identityClient = client?.identityClient; + invariant(identityClient, 'Identity client should be set'); + if (!identityClient.registerReservedWalletUser) { + throw new Error('Register wallet user method unimplemented'); + } + return identityClient.registerReservedWalletUser; +} const identityGenerateNonceActionTypes = Object.freeze({ started: 'IDENTITY_GENERATE_NONCE_STARTED', @@ -980,7 +1009,9 @@ keyserverAuth as keyserverAuthRawAction, identityRegisterActionTypes, useIdentityPasswordRegister, + useIdentityPasswordRegisterReserved, useIdentityWalletRegister, + useIdentityWalletRegisterReserved, identityGenerateNonceActionTypes, useIdentityGenerateNonce, };