diff --git a/native/native_rust_library/src/lib.rs b/native/native_rust_library/src/lib.rs --- a/native/native_rust_library/src/lib.rs +++ b/native/native_rust_library/src/lib.rs @@ -14,7 +14,7 @@ use grpc_clients::identity::protos::unauth::{ DeviceKeyUpload, DeviceType, Empty, IdentityKeyInfo, OpaqueLoginFinishRequest, OpaqueLoginStartRequest, Prekey, - RegistrationFinishRequest, RegistrationStartRequest, WalletLoginRequest, + RegistrationFinishRequest, RegistrationStartRequest, WalletAuthRequest, }; use grpc_clients::identity::{ get_auth_client, get_unauthenticated_client, REQUEST_METADATA_COOKIE_KEY, @@ -767,7 +767,7 @@ async fn log_in_wallet_user_helper( wallet_user_info: WalletUserInfo, ) -> Result { - let login_request = WalletLoginRequest { + let login_request = WalletAuthRequest { siwe_message: wallet_user_info.siwe_message, siwe_signature: wallet_user_info.siwe_signature, device_key_upload: Some(DeviceKeyUpload { diff --git a/services/identity/src/client_service.rs b/services/identity/src/client_service.rs --- a/services/identity/src/client_service.rs +++ b/services/identity/src/client_service.rs @@ -26,7 +26,7 @@ RegistrationStartResponse, RemoveReservedUsernameRequest, ReservedRegistrationStartRequest, ReservedWalletRegistrationRequest, VerifyUserAccessTokenRequest, VerifyUserAccessTokenResponse, - WalletLoginRequest, + WalletAuthRequest, }; use crate::grpc_services::shared::get_value; use crate::grpc_utils::DeviceKeyUploadActions; @@ -376,7 +376,7 @@ async fn log_in_wallet_user( &self, - request: tonic::Request, + request: tonic::Request, ) -> Result, tonic::Status> { let code_version = get_code_version(&request); let message = request.into_inner(); @@ -411,74 +411,142 @@ construct_flattened_device_key_upload(&message)?; let login_time = chrono::Utc::now(); - let user_id = match self + let Some(user_id) = self .client .get_user_id_from_user_info(wallet_address.clone(), &AuthType::Wallet) .await .map_err(handle_db_error)? - { - Some(id) => { - // User already exists, so we should update the DDB item - self - .client - .add_user_device( - id.clone(), - flattened_device_key_upload.clone(), - code_version, - chrono::Utc::now(), - ) - .await - .map_err(handle_db_error)?; - id + else { + // It's possible that the user attempting login is already registered + // on Ashoat's keyserver. If they are, we should send back a gRPC status + // code instructing them to get a signed message from Ashoat's keyserver + // in order to claim their wallet address and register with the Identity + // service. + let username_in_reserved_usernames_table = self + .client + .username_in_reserved_usernames_table(&wallet_address) + .await + .map_err(handle_db_error)?; + + if username_in_reserved_usernames_table { + return Err(tonic::Status::failed_precondition( + "need keyserver message to claim username", + )); } - None => { - // It's possible that the user attempting login is already registered - // on Ashoat's keyserver. If they are, we should send back a gRPC status - // code instructing them to get a signed message from Ashoat's keyserver - // in order to claim their wallet address and register with the Identity - // service. - let username_in_reserved_usernames_table = self - .client - .username_in_reserved_usernames_table(&wallet_address) - .await - .map_err(handle_db_error)?; - if username_in_reserved_usernames_table { - return Err(tonic::Status::failed_precondition( - "need keyserver message to claim username", - )); - } + return Err(tonic::Status::not_found("user not found")); + }; - let social_proof = - SocialProof::new(message.siwe_message, message.siwe_signature); - let serialized_social_proof = serde_json::to_string(&social_proof) - .map_err(|_| { - tonic::Status::invalid_argument("invalid_social_proof") - })?; + self + .client + .add_user_device( + user_id.clone(), + flattened_device_key_upload.clone(), + code_version, + chrono::Utc::now(), + ) + .await + .map_err(handle_db_error)?; - // User doesn't exist yet and wallet address isn't reserved, so we - // should add a new user in DDB - self - .client - .add_wallet_user_to_users_table( - flattened_device_key_upload.clone(), - wallet_address, - serialized_social_proof, - None, - code_version, - login_time, - ) - .await - .map_err(handle_db_error)? + // Create access token + let token = AccessTokenData::with_created_time( + user_id.clone(), + flattened_device_key_upload.device_id_key, + login_time, + crate::token::AuthType::Wallet, + &mut OsRng, + ); + + let access_token = token.access_token.clone(); + + self + .client + .put_access_token_data(token) + .await + .map_err(handle_db_error)?; + + let response = AuthResponse { + user_id, + access_token, + }; + Ok(Response::new(response)) + } + + async fn register_wallet_user( + &self, + request: tonic::Request, + ) -> Result, tonic::Status> { + let code_version = get_code_version(&request); + let message = request.into_inner(); + + let parsed_message = parse_and_verify_siwe_message( + &message.siwe_message, + &message.siwe_signature, + )?; + + match self + .client + .get_nonce_from_nonces_table(&parsed_message.nonce) + .await + .map_err(handle_db_error)? + { + None => return Err(tonic::Status::invalid_argument("invalid nonce")), + Some(nonce) if nonce.is_expired() => { + // we don't need to remove the nonce from the table here + // because the DynamoDB TTL will take care of it + return Err(tonic::Status::aborted("nonce expired")); } + Some(_) => self + .client + .remove_nonce_from_nonces_table(&parsed_message.nonce) + .await + .map_err(handle_db_error)?, }; + let wallet_address = eip55(&parsed_message.address); + + self.check_wallet_address_taken(&wallet_address).await?; + let username_in_reserved_usernames_table = self + .client + .username_in_reserved_usernames_table(&wallet_address) + .await + .map_err(handle_db_error)?; + + if username_in_reserved_usernames_table { + return Err(tonic::Status::already_exists( + "wallet address already exists", + )); + } + + let flattened_device_key_upload = + construct_flattened_device_key_upload(&message)?; + + let login_time = chrono::Utc::now(); + + let social_proof = + SocialProof::new(message.siwe_message, message.siwe_signature); + let serialized_social_proof = serde_json::to_string(&social_proof) + .map_err(|_| tonic::Status::invalid_argument("invalid_social_proof"))?; + + let user_id = self + .client + .add_wallet_user_to_users_table( + flattened_device_key_upload.clone(), + wallet_address, + serialized_social_proof, + None, + code_version, + login_time, + ) + .await + .map_err(handle_db_error)?; + // Create access token let token = AccessTokenData::with_created_time( user_id.clone(), flattened_device_key_upload.device_id_key, login_time, - crate::token::AuthType::Password, + crate::token::AuthType::Wallet, &mut OsRng, ); @@ -570,7 +638,7 @@ user_id.clone(), flattened_device_key_upload.device_id_key, login_time, - crate::token::AuthType::Password, + crate::token::AuthType::Wallet, &mut OsRng, ); diff --git a/services/identity/src/grpc_utils.rs b/services/identity/src/grpc_utils.rs --- a/services/identity/src/grpc_utils.rs +++ b/services/identity/src/grpc_utils.rs @@ -10,7 +10,7 @@ unauth::{ DeviceKeyUpload, OpaqueLoginStartRequest, RegistrationStartRequest, ReservedRegistrationStartRequest, ReservedWalletRegistrationRequest, - WalletLoginRequest, + WalletAuthRequest, }, }, }; @@ -81,7 +81,7 @@ } } -impl DeviceKeyUploadData for WalletLoginRequest { +impl DeviceKeyUploadData for WalletAuthRequest { fn device_key_upload(&self) -> Option<&DeviceKeyUpload> { self.device_key_upload.as_ref() } diff --git a/shared/protos/identity_unauth.proto b/shared/protos/identity_unauth.proto --- a/shared/protos/identity_unauth.proto +++ b/shared/protos/identity_unauth.proto @@ -22,7 +22,8 @@ (OpaqueLoginStartResponse) {} rpc LogInPasswordUserFinish(OpaqueLoginFinishRequest) returns (AuthResponse) {} - rpc LogInWalletUser(WalletLoginRequest) returns (AuthResponse) {} + rpc LogInWalletUser(WalletAuthRequest) returns (AuthResponse) {} + rpc RegisterWalletUser(WalletAuthRequest) returns (AuthResponse) {} rpc RegisterReservedWalletUser(ReservedWalletRegistrationRequest) returns (AuthResponse) {} @@ -177,7 +178,7 @@ bytes opaque_login_response = 2; } -message WalletLoginRequest { +message WalletAuthRequest { string siwe_message = 1; string siwe_signature = 2; // Information specific to a user's device needed to open a new channel of diff --git a/web/grpc/identity-service-client-wrapper.js b/web/grpc/identity-service-client-wrapper.js --- a/web/grpc/identity-service-client-wrapper.js +++ b/web/grpc/identity-service-client-wrapper.js @@ -28,7 +28,7 @@ OpaqueLoginFinishRequest, OpaqueLoginStartRequest, Prekey, - WalletLoginRequest, + WalletAuthRequest, } from '../protobufs/identity-unauth-structs.cjs'; import * as IdentityUnauthClient from '../protobufs/identity-unauth.cjs'; @@ -295,7 +295,7 @@ const identityDeviceKeyUpload = await this.getDeviceKeyUpload(); const deviceKeyUpload = authDeviceKeyUpload(identityDeviceKeyUpload); - const loginRequest = new WalletLoginRequest(); + const loginRequest = new WalletAuthRequest(); loginRequest.setSiweMessage(siweMessage); loginRequest.setSiweSignature(siweSignature); loginRequest.setDeviceKeyUpload(deviceKeyUpload); diff --git a/web/protobufs/identity-unauth-structs.cjs b/web/protobufs/identity-unauth-structs.cjs --- a/web/protobufs/identity-unauth-structs.cjs +++ b/web/protobufs/identity-unauth-structs.cjs @@ -44,7 +44,7 @@ goog.exportSymbol('proto.identity.unauth.ReservedWalletRegistrationRequest', null, global); goog.exportSymbol('proto.identity.unauth.VerifyUserAccessTokenRequest', null, global); goog.exportSymbol('proto.identity.unauth.VerifyUserAccessTokenResponse', null, global); -goog.exportSymbol('proto.identity.unauth.WalletLoginRequest', null, global); +goog.exportSymbol('proto.identity.unauth.WalletAuthRequest', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -307,16 +307,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.unauth.WalletLoginRequest = function(opt_data) { +proto.identity.unauth.WalletAuthRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.unauth.WalletLoginRequest, jspb.Message); +goog.inherits(proto.identity.unauth.WalletAuthRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.unauth.WalletLoginRequest.displayName = 'proto.identity.unauth.WalletLoginRequest'; + proto.identity.unauth.WalletAuthRequest.displayName = 'proto.identity.unauth.WalletAuthRequest'; } /** * Generated by JsPbCodeGenerator. @@ -3020,8 +3020,8 @@ * http://goto/soy-param-migration * @return {!Object} */ -proto.identity.unauth.WalletLoginRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.unauth.WalletLoginRequest.toObject(opt_includeInstance, this); +proto.identity.unauth.WalletAuthRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.unauth.WalletAuthRequest.toObject(opt_includeInstance, this); }; @@ -3030,11 +3030,11 @@ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.identity.unauth.WalletLoginRequest} msg The msg instance to transform. + * @param {!proto.identity.unauth.WalletAuthRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.unauth.WalletLoginRequest.toObject = function(includeInstance, msg) { +proto.identity.unauth.WalletAuthRequest.toObject = function(includeInstance, msg) { var f, obj = { siweMessage: jspb.Message.getFieldWithDefault(msg, 1, ""), siweSignature: jspb.Message.getFieldWithDefault(msg, 2, ""), @@ -3052,23 +3052,23 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.unauth.WalletLoginRequest} + * @return {!proto.identity.unauth.WalletAuthRequest} */ -proto.identity.unauth.WalletLoginRequest.deserializeBinary = function(bytes) { +proto.identity.unauth.WalletAuthRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.unauth.WalletLoginRequest; - return proto.identity.unauth.WalletLoginRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.unauth.WalletAuthRequest; + return proto.identity.unauth.WalletAuthRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.unauth.WalletLoginRequest} msg The message object to deserialize into. + * @param {!proto.identity.unauth.WalletAuthRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.unauth.WalletLoginRequest} + * @return {!proto.identity.unauth.WalletAuthRequest} */ -proto.identity.unauth.WalletLoginRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.unauth.WalletAuthRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3101,9 +3101,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.unauth.WalletLoginRequest.prototype.serializeBinary = function() { +proto.identity.unauth.WalletAuthRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.unauth.WalletLoginRequest.serializeBinaryToWriter(this, writer); + proto.identity.unauth.WalletAuthRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3111,11 +3111,11 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.unauth.WalletLoginRequest} message + * @param {!proto.identity.unauth.WalletAuthRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.unauth.WalletLoginRequest.serializeBinaryToWriter = function(message, writer) { +proto.identity.unauth.WalletAuthRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSiweMessage(); if (f.length > 0) { @@ -3146,16 +3146,16 @@ * optional string siwe_message = 1; * @return {string} */ -proto.identity.unauth.WalletLoginRequest.prototype.getSiweMessage = function() { +proto.identity.unauth.WalletAuthRequest.prototype.getSiweMessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.identity.unauth.WalletLoginRequest} returns this + * @return {!proto.identity.unauth.WalletAuthRequest} returns this */ -proto.identity.unauth.WalletLoginRequest.prototype.setSiweMessage = function(value) { +proto.identity.unauth.WalletAuthRequest.prototype.setSiweMessage = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3164,16 +3164,16 @@ * optional string siwe_signature = 2; * @return {string} */ -proto.identity.unauth.WalletLoginRequest.prototype.getSiweSignature = function() { +proto.identity.unauth.WalletAuthRequest.prototype.getSiweSignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.identity.unauth.WalletLoginRequest} returns this + * @return {!proto.identity.unauth.WalletAuthRequest} returns this */ -proto.identity.unauth.WalletLoginRequest.prototype.setSiweSignature = function(value) { +proto.identity.unauth.WalletAuthRequest.prototype.setSiweSignature = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -3182,7 +3182,7 @@ * optional DeviceKeyUpload device_key_upload = 3; * @return {?proto.identity.unauth.DeviceKeyUpload} */ -proto.identity.unauth.WalletLoginRequest.prototype.getDeviceKeyUpload = function() { +proto.identity.unauth.WalletAuthRequest.prototype.getDeviceKeyUpload = function() { return /** @type{?proto.identity.unauth.DeviceKeyUpload} */ ( jspb.Message.getWrapperField(this, proto.identity.unauth.DeviceKeyUpload, 3)); }; @@ -3190,18 +3190,18 @@ /** * @param {?proto.identity.unauth.DeviceKeyUpload|undefined} value - * @return {!proto.identity.unauth.WalletLoginRequest} returns this + * @return {!proto.identity.unauth.WalletAuthRequest} returns this */ -proto.identity.unauth.WalletLoginRequest.prototype.setDeviceKeyUpload = function(value) { +proto.identity.unauth.WalletAuthRequest.prototype.setDeviceKeyUpload = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.identity.unauth.WalletLoginRequest} returns this + * @return {!proto.identity.unauth.WalletAuthRequest} returns this */ -proto.identity.unauth.WalletLoginRequest.prototype.clearDeviceKeyUpload = function() { +proto.identity.unauth.WalletAuthRequest.prototype.clearDeviceKeyUpload = function() { return this.setDeviceKeyUpload(undefined); }; @@ -3210,7 +3210,7 @@ * Returns whether this field is set. * @return {boolean} */ -proto.identity.unauth.WalletLoginRequest.prototype.hasDeviceKeyUpload = function() { +proto.identity.unauth.WalletAuthRequest.prototype.hasDeviceKeyUpload = function() { return jspb.Message.getField(this, 3) != null; }; diff --git a/web/protobufs/identity-unauth-structs.cjs.flow b/web/protobufs/identity-unauth-structs.cjs.flow --- a/web/protobufs/identity-unauth-structs.cjs.flow +++ b/web/protobufs/identity-unauth-structs.cjs.flow @@ -308,27 +308,27 @@ opaqueLoginResponse: Uint8Array | string, }; -declare export class WalletLoginRequest extends Message { +declare export class WalletAuthRequest extends Message { getSiweMessage(): string; - setSiweMessage(value: string): WalletLoginRequest; + setSiweMessage(value: string): WalletAuthRequest; getSiweSignature(): string; - setSiweSignature(value: string): WalletLoginRequest; + setSiweSignature(value: string): WalletAuthRequest; getDeviceKeyUpload(): DeviceKeyUpload | void; - setDeviceKeyUpload(value?: DeviceKeyUpload): WalletLoginRequest; + setDeviceKeyUpload(value?: DeviceKeyUpload): WalletAuthRequest; hasDeviceKeyUpload(): boolean; - clearDeviceKeyUpload(): WalletLoginRequest; + clearDeviceKeyUpload(): WalletAuthRequest; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WalletLoginRequestObject; - static toObject(includeInstance: boolean, msg: WalletLoginRequest): WalletLoginRequestObject; - static serializeBinaryToWriter(message: WalletLoginRequest, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WalletLoginRequest; - static deserializeBinaryFromReader(message: WalletLoginRequest, reader: BinaryReader): WalletLoginRequest; + toObject(includeInstance?: boolean): WalletAuthRequestObject; + static toObject(includeInstance: boolean, msg: WalletAuthRequest): WalletAuthRequestObject; + static serializeBinaryToWriter(message: WalletAuthRequest, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WalletAuthRequest; + static deserializeBinaryFromReader(message: WalletAuthRequest, reader: BinaryReader): WalletAuthRequest; } -export type WalletLoginRequestObject = { +export type WalletAuthRequestObject = { siweMessage: string, siweSignature: string, deviceKeyUpload?: DeviceKeyUploadObject, diff --git a/web/protobufs/identity-unauth.cjs b/web/protobufs/identity-unauth.cjs --- a/web/protobufs/identity-unauth.cjs +++ b/web/protobufs/identity-unauth.cjs @@ -384,16 +384,16 @@ /** * @const * @type {!grpc.web.MethodDescriptor< - * !proto.identity.unauth.WalletLoginRequest, + * !proto.identity.unauth.WalletAuthRequest, * !proto.identity.unauth.AuthResponse>} */ const methodDescriptor_IdentityClientService_LogInWalletUser = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/LogInWalletUser', grpc.web.MethodType.UNARY, - proto.identity.unauth.WalletLoginRequest, + proto.identity.unauth.WalletAuthRequest, proto.identity.unauth.AuthResponse, /** - * @param {!proto.identity.unauth.WalletLoginRequest} request + * @param {!proto.identity.unauth.WalletAuthRequest} request * @return {!Uint8Array} */ function(request) { @@ -404,7 +404,7 @@ /** - * @param {!proto.identity.unauth.WalletLoginRequest} request The + * @param {!proto.identity.unauth.WalletAuthRequest} request The * request proto * @param {?Object} metadata User defined * call metadata @@ -425,7 +425,7 @@ /** - * @param {!proto.identity.unauth.WalletLoginRequest} request The + * @param {!proto.identity.unauth.WalletAuthRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata @@ -442,6 +442,67 @@ }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.unauth.WalletAuthRequest, + * !proto.identity.unauth.AuthResponse>} + */ +const methodDescriptor_IdentityClientService_RegisterWalletUser = new grpc.web.MethodDescriptor( + '/identity.unauth.IdentityClientService/RegisterWalletUser', + grpc.web.MethodType.UNARY, + proto.identity.unauth.WalletAuthRequest, + proto.identity.unauth.AuthResponse, + /** + * @param {!proto.identity.unauth.WalletAuthRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.unauth.AuthResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.unauth.WalletAuthRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.AuthResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.unauth.IdentityClientServiceClient.prototype.registerWalletUser = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.unauth.IdentityClientService/RegisterWalletUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_RegisterWalletUser, + callback); +}; + + +/** + * @param {!proto.identity.unauth.WalletAuthRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.unauth.IdentityClientServicePromiseClient.prototype.registerWalletUser = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.unauth.IdentityClientService/RegisterWalletUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_RegisterWalletUser); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/web/protobufs/identity-unauth.cjs.flow b/web/protobufs/identity-unauth.cjs.flow --- a/web/protobufs/identity-unauth.cjs.flow +++ b/web/protobufs/identity-unauth.cjs.flow @@ -45,7 +45,14 @@ ): grpcWeb.ClientReadableStream; logInWalletUser( - request: identityStructs.WalletLoginRequest, + request: identityStructs.WalletAuthRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityStructs.AuthResponse) => void + ): grpcWeb.ClientReadableStream; + + registerWalletUser( + request: identityStructs.WalletAuthRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.AuthResponse) => void @@ -133,7 +140,12 @@ ): Promise; logInWalletUser( - request: identityStructs.WalletLoginRequest, + request: identityStructs.WalletAuthRequest, + metadata?: grpcWeb.Metadata + ): Promise; + + registerWalletUser( + request: identityStructs.WalletAuthRequest, metadata?: grpcWeb.Metadata ): Promise;