diff --git a/shared/protos/identity_auth.proto b/shared/protos/identity_auth.proto index a94e57c66..db40cc3f6 100644 --- a/shared/protos/identity_auth.proto +++ b/shared/protos/identity_auth.proto @@ -1,222 +1,228 @@ syntax = "proto3"; import "identity_unauth.proto"; package identity.auth; // RPCs from a client (iOS, Android, or web) to identity service // // This service will assert authenticity of a device by verifying the access // token through an interceptor, thus avoiding the need to explicitly pass // the credentials on every request service IdentityClientService { - // X3DH actions + + /* X3DH actions */ // Replenish one-time preKeys rpc UploadOneTimeKeys(UploadOneTimeKeysRequest) returns (identity.unauth.Empty) {} // Rotate a device's prekey and prekey signature // Rotated for deniability of older messages rpc RefreshUserPrekeys(RefreshUserPrekeysRequest) returns (identity.unauth.Empty) {} // Called by clients to get all device keys associated with a user in order // to open a new channel of communication on any of their devices. // Specially, this will return the following per device: // - Identity keys (both Content and Notif Keys) // - Prekey (including prekey signature) // - One-time Prekey rpc GetOutboundKeysForUser(OutboundKeysForUserRequest) returns (OutboundKeysForUserResponse) {} // Called by receivers of a communication request. The reponse will return // identity keys (both content and notif keys) and related prekeys per device, // but will not contain one-time keys. Additionally, the response will contain // the other user's username. rpc GetInboundKeysForUser(InboundKeysForUserRequest) returns (InboundKeysForUserResponse) {} + // Called by clients to get required keys for opening a connection + // to a user's keyserver + rpc GetKeyserverKeys(OutboundKeysForUserRequest) returns + (KeyserverKeysResponse) {} + + /* Account actions */ // Called by user to update password and receive new access token rpc UpdateUserPasswordStart(UpdateUserPasswordStartRequest) returns (UpdateUserPasswordStartResponse) {} rpc UpdateUserPasswordFinish(UpdateUserPasswordFinishRequest) returns (identity.unauth.Empty) {} // Called by user to log out (clears device's keys and access token) rpc LogOutUser(identity.unauth.Empty) returns (identity.unauth.Empty) {} // Called by a user to delete their own account rpc DeleteUser(identity.unauth.Empty) returns (identity.unauth.Empty) {} - // Called by clients to get required keys for opening a connection - // to a user's keyserver - rpc GetKeyserverKeys(OutboundKeysForUserRequest) returns - (KeyserverKeysResponse) {} + /* Device list actions */ // Returns device list history rpc GetDeviceListForUser(GetDeviceListRequest) returns (GetDeviceListResponse) {} rpc UpdateDeviceList(UpdateDeviceListRequest) returns (identity.unauth.Empty) {} - // Farcaster actions + /* Farcaster actions */ // Called by an existing user to link their Farcaster account rpc LinkFarcasterAccount(LinkFarcasterAccountRequest) returns (identity.unauth.Empty) {} // Called by an existing user to unlink their Farcaster account rpc UnlinkFarcasterAccount(identity.unauth.Empty) returns (identity.unauth.Empty) {} + /* Miscellaneous actions */ + rpc FindUserIdentity(UserIdentityRequest) returns (UserIdentityResponse) {} } // Helper types message EthereumIdentity { string wallet_address = 1; string social_proof = 2; } message Identity { oneof identity_info { string username = 1; EthereumIdentity eth_identity = 2; } } // UploadOneTimeKeys // As OPKs get exhausted, they need to be refreshed message UploadOneTimeKeysRequest { repeated string content_one_time_prekeys = 1; repeated string notif_one_time_prekeys = 2; } // RefreshUserPreKeys message RefreshUserPrekeysRequest { identity.unauth.Prekey new_content_prekeys = 1; identity.unauth.Prekey new_notif_prekeys = 2; } // Information needed when establishing communication to someone else's device message OutboundKeyInfo { identity.unauth.IdentityKeyInfo identity_info = 1; identity.unauth.Prekey content_prekey = 2; identity.unauth.Prekey notif_prekey = 3; optional string one_time_content_prekey = 4; optional string one_time_notif_prekey = 5; } message KeyserverKeysResponse { optional OutboundKeyInfo keyserver_info = 1; Identity identity = 2; } // GetOutboundKeysForUser message OutboundKeysForUserResponse { // Map is keyed on devices' public ed25519 key used for signing map devices = 1; } // Information needed by a device to establish communcation when responding // to a request. // The device receiving a request only needs the content key and prekey. message OutboundKeysForUserRequest { string user_id = 1; } // GetInboundKeysForUser message InboundKeyInfo { identity.unauth.IdentityKeyInfo identity_info = 1; identity.unauth.Prekey content_prekey = 2; identity.unauth.Prekey notif_prekey = 3; } message InboundKeysForUserResponse { // Map is keyed on devices' public ed25519 key used for signing map devices = 1; Identity identity = 2; } message InboundKeysForUserRequest { string user_id = 1; } // UpdateUserPassword // Request for updating a user, similar to registration but need a // access token to validate user before updating password message UpdateUserPasswordStartRequest { // Message sent to initiate PAKE registration (step 1) bytes opaque_registration_request = 1; } // Do a user registration, but overwrite the existing credentials // after validation of user message UpdateUserPasswordFinishRequest { // Identifier used to correlate start and finish request string session_id = 1; // Opaque client registration upload (step 3) bytes opaque_registration_upload = 2; } message UpdateUserPasswordStartResponse { // Identifier used to correlate start request with finish request string session_id = 1; bytes opaque_registration_response = 2; } // GetDeviceListForUser message GetDeviceListRequest { // User whose device lists we want to retrieve string user_id = 1; // UTC timestamp in milliseconds // If none, whole device list history will be retrieved optional int64 since_timestamp = 2; } message GetDeviceListResponse { // A list of stringified JSON objects of the following format: // { // "rawDeviceList": JSON.stringify({ // "devices": [, ...] // "timestamp": , // }) // } repeated string device_list_updates = 1; } // UpdateDeviceListForUser message UpdateDeviceListRequest { // A stringified JSON object of the following format: // { // "rawDeviceList": JSON.stringify({ // "devices": [, ...] // "timestamp": , // }) // } string new_device_list = 1; } // LinkFarcasterAccount message LinkFarcasterAccountRequest { string farcaster_id = 1; } // FindUserIdentity message UserIdentityRequest { // user ID for which we want to get the identity string user_id = 1; } message UserIdentityResponse { Identity identity = 1; } diff --git a/shared/protos/identity_unauth.proto b/shared/protos/identity_unauth.proto index 6df29f7cb..c817785b0 100644 --- a/shared/protos/identity_unauth.proto +++ b/shared/protos/identity_unauth.proto @@ -1,294 +1,295 @@ syntax = "proto3"; package identity.unauth; // RPCs from a client (iOS, Android, or web) to identity service service IdentityClientService { - // Account actions + /* Account actions */ // Called by user to register with the Identity Service (PAKE only) // Due to limitations of grpc-web, the Opaque challenge+response // needs to be split up over two unary requests // Start/Finish is used here to align with opaque protocol rpc RegisterPasswordUserStart(RegistrationStartRequest) returns ( RegistrationStartResponse) {} rpc RegisterReservedPasswordUserStart(ReservedRegistrationStartRequest) returns (RegistrationStartResponse) {} rpc RegisterPasswordUserFinish(RegistrationFinishRequest) returns ( AuthResponse) {} // Called by user to register device and get an access token rpc LogInPasswordUserStart(OpaqueLoginStartRequest) returns (OpaqueLoginStartResponse) {} rpc LogInPasswordUserFinish(OpaqueLoginFinishRequest) returns (AuthResponse) {} + rpc LogInWalletUser(WalletAuthRequest) returns (AuthResponse) {} rpc RegisterWalletUser(WalletAuthRequest) returns (AuthResponse) {} rpc RegisterReservedWalletUser(ReservedWalletRegistrationRequest) returns (AuthResponse) {} rpc UploadKeysForRegisteredDeviceAndLogIn(SecondaryDeviceKeysUploadRequest) returns (AuthResponse) {} - // Sign-In with Ethereum actions - - // Called by clients to get a nonce for a Sign-In with Ethereum message - rpc GenerateNonce(Empty) returns (GenerateNonceResponse) {} - - // Service actions + /* Service actions */ // Called by other services to verify a user's access token rpc VerifyUserAccessToken(VerifyUserAccessTokenRequest) returns (VerifyUserAccessTokenResponse) {} - // Ashoat's keyserver actions + /* Authoritative keyserver actions */ - // Called by Ashoat's keyserver to add usernames to the Identity service's - // reserved list + // Called by authoritative keyserver to add usernames + // to the Identity service's reserved list rpc AddReservedUsernames(AddReservedUsernamesRequest) returns (Empty) {} - // Called by Ashoat's keyserver to remove usernames from the Identity + // Called by authoritative keyserver to remove usernames from the Identity // service's reserved list rpc RemoveReservedUsername(RemoveReservedUsernameRequest) returns (Empty) {} - // Miscellaneous actions + /* Miscellaneous actions */ // Called by users periodically to check if their code version is supported rpc Ping(Empty) returns (Empty) {} // Returns userID for given username or wallet address rpc FindUserID(FindUserIDRequest) returns (FindUserIDResponse) {} - // Farcaster actions + // Called by clients to get a nonce for a Sign-In with Ethereum message + // or RPCs requiring challenge-response actions + rpc GenerateNonce(Empty) returns (GenerateNonceResponse) {} + + /* Farcaster actions */ + rpc GetFarcasterUsers(GetFarcasterUsersRequest) returns (GetFarcasterUsersResponse) {} } // Helper types message Empty {} message Prekey { string prekey = 1; string prekey_signature = 2; } // Key information needed for starting a X3DH session message IdentityKeyInfo { // JSON payload containing Olm keys // Sessions for users will contain both ContentKeys and NotifKeys // For keyservers, this will only contain ContentKeys string payload = 1; // Payload signed with the signing ed25519 key string payload_signature = 2; // Signed message used for SIWE // This correlates a given wallet with a device's content key optional string social_proof = 3; } // RegisterUser // Ephemeral information provided so others can create initial message // to this device // // Prekeys are generally rotated periodically // One-time Prekeys are "consumed" after first use, so many need to // be provide to avoid exhausting them. enum DeviceType { KEYSERVER = 0; WEB = 1; // iOS doesn't leave a good option for title to camel case renaming IOS = 2; ANDROID = 3; WINDOWS = 4; MAC_OS = 5; } // Bundle of information needed for creating an initial message using X3DH message DeviceKeyUpload { IdentityKeyInfo device_key_info = 1; Prekey content_upload = 2; Prekey notif_upload = 3; repeated string one_time_content_prekeys = 4; repeated string one_time_notif_prekeys = 5; DeviceType device_type = 6; } // Request for registering a new user message RegistrationStartRequest { // Message sent to initiate PAKE registration (step 1) bytes opaque_registration_request = 1; string username = 2; // Information needed to open a new channel to current user's device DeviceKeyUpload device_key_upload = 3; optional string farcaster_id = 4; } message ReservedRegistrationStartRequest { // Message sent to initiate PAKE registration (step 1) bytes opaque_registration_request = 1; string username = 2; // Information needed to open a new channel to current user's device DeviceKeyUpload device_key_upload = 3; - // Message from Ashoat's keyserver attesting that a given user has ownership - // of a given username + // Message from authoritative keyserver attesting that a given user + // has ownership of a given username string keyserver_message = 4; - // Above message signed with Ashoat's keyserver's signing ed25519 key + // Above message signed with authoritative keyserver's signing ed25519 key string keyserver_signature = 5; } // Messages sent from a client to Identity Service message RegistrationFinishRequest { // Identifier to correlate RegisterStart session string session_id = 1; // Final message in PAKE registration bytes opaque_registration_upload = 2; } // Messages sent from Identity Service to client message RegistrationStartResponse { // Identifier used to correlate start request with finish request string session_id = 1; // sent to the user upon reception of the PAKE registration attempt // (step 2) bytes opaque_registration_response = 2; } message AuthResponse { // Unique identifier for user string user_id = 1; string access_token = 2; } // LoginUser message OpaqueLoginStartRequest { string username = 1; // Message sent to initiate PAKE login (step 1) bytes opaque_login_request = 2; // Information specific to a user's device needed to open a new channel of // communication with this user DeviceKeyUpload device_key_upload = 3; // If set to true, the user's existing keyserver will be deleted from the // identity service and replaced with this one. This field has no effect if // the device is not a keyserver optional bool force = 4; } message OpaqueLoginFinishRequest { // Identifier used to correlate start request with finish request string session_id = 1; // Message containing client's reponse to server challenge. // Used to verify that client holds password secret (Step 3) bytes opaque_login_upload = 2; } message OpaqueLoginStartResponse { // Identifier used to correlate start request with finish request string session_id = 1; // Opaque challenge sent from server to client attempting to login (Step 2) bytes opaque_login_response = 2; } message WalletAuthRequest { string siwe_message = 1; string siwe_signature = 2; // Information specific to a user's device needed to open a new channel of // communication with this user DeviceKeyUpload device_key_upload = 3; optional string farcaster_id = 4; } message ReservedWalletRegistrationRequest { string siwe_message = 1; string siwe_signature = 2; // Information specific to a user's device needed to open a new channel of // communication with this user DeviceKeyUpload device_key_upload = 3; - // Message from Ashoat's keyserver attesting that a given user has ownership - // of a given wallet address + // Message from authoritative keyserver attesting that a given user + // has ownership of a given wallet address string keyserver_message = 4; - // Above message signed with Ashoat's keyserver's signing ed25519 key + // Above message signed with authoritative keyserver's signing ed25519 key string keyserver_signature = 5; } // UploadKeysForRegisteredDeviceAndLogIn message SecondaryDeviceKeysUploadRequest { string user_id = 1; string challenge_response = 2; // Information specific to a user's device needed to open a new channel of // communication with this user DeviceKeyUpload device_key_upload = 3; } // GenerateNonce message GenerateNonceResponse{ string nonce = 1; } // VerifyUserAccessToken message VerifyUserAccessTokenRequest { string user_id = 1; // signing ed25519 key for the given user's device string device_id = 2; string access_token = 3; } message VerifyUserAccessTokenResponse { bool token_valid = 1; } // AddReservedUsernames message AddReservedUsernamesRequest { - // Message from Ashoat's keyserver containing the username to be added + // Message from authoritative keyserver containing the username to be added string message = 1; - // Above message signed with Ashoat's keyserver's signing ed25519 key + // Above message signed with authoritative keyserver's signing ed25519 key string signature = 2; } // RemoveReservedUsername message RemoveReservedUsernameRequest { - // Message from Ashoat's keyserver containing the username to be removed + // Message from authoritative keyserver containing the username to be removed string message = 1; - // Above message signed with Ashoat's keyserver's signing ed25519 key + // Above message signed with authoritative keyserver's signing ed25519 key string signature = 2; } // FindUserID message FindUserIDRequest { oneof identifier { string username = 1; string wallet_address = 2; } } message FindUserIDResponse { // userID if the user is registered with Identity Service, null otherwise optional string user_id = 1; // true if the identifier (username or wallet address) exists in the // reserved usernames list, false otherwise. It doesn't take into account // whether the user is registered with Identity Service (userID != null). bool is_reserved = 2; } // GetFarcasterUsers message GetFarcasterUsersRequest { repeated string farcaster_ids = 1; } message GetFarcasterUsersResponse { repeated FarcasterUser farcaster_users = 1; } message FarcasterUser { string user_id = 1; string farcaster_id = 2; string username = 3; } diff --git a/web/protobufs/identity-auth-client.cjs b/web/protobufs/identity-auth-client.cjs index f92ba7584..f6d1fddfc 100644 --- a/web/protobufs/identity-auth-client.cjs +++ b/web/protobufs/identity-auth-client.cjs @@ -1,936 +1,936 @@ /** * @fileoverview gRPC-Web generated client stub for identity.auth * @enhanceable * @public * @generated */ // Code generated by protoc-gen-grpc-web. DO NOT EDIT. // versions: // protoc-gen-grpc-web v1.4.2 // protoc v3.21.12 // source: identity_auth.proto /* eslint-disable */ // @ts-nocheck const grpc = {}; grpc.web = require('grpc-web'); var identity_unauth_pb = require('./identity-unauth-structs.cjs') const proto = {}; proto.identity = {}; proto.identity.auth = require('./identity-auth-structs.cjs'); /** * @param {string} hostname * @param {?Object} credentials * @param {?grpc.web.ClientOptions} options * @constructor * @struct * @final */ proto.identity.auth.IdentityClientServiceClient = function(hostname, credentials, options) { if (!options) options = {}; options.format = 'text'; /** * @private @const {!grpc.web.GrpcWebClientBase} The client */ this.client_ = new grpc.web.GrpcWebClientBase(options); /** * @private @const {string} The hostname */ this.hostname_ = hostname.replace(/\/+$/, ''); }; /** * @param {string} hostname * @param {?Object} credentials * @param {?grpc.web.ClientOptions} options * @constructor * @struct * @final */ proto.identity.auth.IdentityClientServicePromiseClient = function(hostname, credentials, options) { if (!options) options = {}; options.format = 'text'; /** * @private @const {!grpc.web.GrpcWebClientBase} The client */ this.client_ = new grpc.web.GrpcWebClientBase(options); /** * @private @const {string} The hostname */ this.hostname_ = hostname.replace(/\/+$/, ''); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.auth.UploadOneTimeKeysRequest, * !proto.identity.unauth.Empty>} */ const methodDescriptor_IdentityClientService_UploadOneTimeKeys = new grpc.web.MethodDescriptor( '/identity.auth.IdentityClientService/UploadOneTimeKeys', grpc.web.MethodType.UNARY, proto.identity.auth.UploadOneTimeKeysRequest, identity_unauth_pb.Empty, /** * @param {!proto.identity.auth.UploadOneTimeKeysRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, identity_unauth_pb.Empty.deserializeBinary ); /** * @param {!proto.identity.auth.UploadOneTimeKeysRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.auth.IdentityClientServiceClient.prototype.uploadOneTimeKeys = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.auth.IdentityClientService/UploadOneTimeKeys', request, metadata || {}, methodDescriptor_IdentityClientService_UploadOneTimeKeys, callback); }; /** * @param {!proto.identity.auth.UploadOneTimeKeysRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.auth.IdentityClientServicePromiseClient.prototype.uploadOneTimeKeys = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.auth.IdentityClientService/UploadOneTimeKeys', request, metadata || {}, methodDescriptor_IdentityClientService_UploadOneTimeKeys); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.auth.RefreshUserPrekeysRequest, * !proto.identity.unauth.Empty>} */ const methodDescriptor_IdentityClientService_RefreshUserPrekeys = new grpc.web.MethodDescriptor( '/identity.auth.IdentityClientService/RefreshUserPrekeys', grpc.web.MethodType.UNARY, proto.identity.auth.RefreshUserPrekeysRequest, identity_unauth_pb.Empty, /** * @param {!proto.identity.auth.RefreshUserPrekeysRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, identity_unauth_pb.Empty.deserializeBinary ); /** * @param {!proto.identity.auth.RefreshUserPrekeysRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.auth.IdentityClientServiceClient.prototype.refreshUserPrekeys = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.auth.IdentityClientService/RefreshUserPrekeys', request, metadata || {}, methodDescriptor_IdentityClientService_RefreshUserPrekeys, callback); }; /** * @param {!proto.identity.auth.RefreshUserPrekeysRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.auth.IdentityClientServicePromiseClient.prototype.refreshUserPrekeys = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.auth.IdentityClientService/RefreshUserPrekeys', request, metadata || {}, methodDescriptor_IdentityClientService_RefreshUserPrekeys); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.auth.OutboundKeysForUserRequest, * !proto.identity.auth.OutboundKeysForUserResponse>} */ const methodDescriptor_IdentityClientService_GetOutboundKeysForUser = new grpc.web.MethodDescriptor( '/identity.auth.IdentityClientService/GetOutboundKeysForUser', grpc.web.MethodType.UNARY, proto.identity.auth.OutboundKeysForUserRequest, proto.identity.auth.OutboundKeysForUserResponse, /** * @param {!proto.identity.auth.OutboundKeysForUserRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.auth.OutboundKeysForUserResponse.deserializeBinary ); /** * @param {!proto.identity.auth.OutboundKeysForUserRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.auth.OutboundKeysForUserResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.auth.IdentityClientServiceClient.prototype.getOutboundKeysForUser = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.auth.IdentityClientService/GetOutboundKeysForUser', request, metadata || {}, methodDescriptor_IdentityClientService_GetOutboundKeysForUser, callback); }; /** * @param {!proto.identity.auth.OutboundKeysForUserRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.auth.IdentityClientServicePromiseClient.prototype.getOutboundKeysForUser = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.auth.IdentityClientService/GetOutboundKeysForUser', request, metadata || {}, methodDescriptor_IdentityClientService_GetOutboundKeysForUser); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.auth.InboundKeysForUserRequest, * !proto.identity.auth.InboundKeysForUserResponse>} */ const methodDescriptor_IdentityClientService_GetInboundKeysForUser = new grpc.web.MethodDescriptor( '/identity.auth.IdentityClientService/GetInboundKeysForUser', grpc.web.MethodType.UNARY, proto.identity.auth.InboundKeysForUserRequest, proto.identity.auth.InboundKeysForUserResponse, /** * @param {!proto.identity.auth.InboundKeysForUserRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.auth.InboundKeysForUserResponse.deserializeBinary ); /** * @param {!proto.identity.auth.InboundKeysForUserRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.auth.InboundKeysForUserResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.auth.IdentityClientServiceClient.prototype.getInboundKeysForUser = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.auth.IdentityClientService/GetInboundKeysForUser', request, metadata || {}, methodDescriptor_IdentityClientService_GetInboundKeysForUser, callback); }; /** * @param {!proto.identity.auth.InboundKeysForUserRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.auth.IdentityClientServicePromiseClient.prototype.getInboundKeysForUser = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.auth.IdentityClientService/GetInboundKeysForUser', request, metadata || {}, methodDescriptor_IdentityClientService_GetInboundKeysForUser); }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.auth.OutboundKeysForUserRequest, + * !proto.identity.auth.KeyserverKeysResponse>} + */ +const methodDescriptor_IdentityClientService_GetKeyserverKeys = new grpc.web.MethodDescriptor( + '/identity.auth.IdentityClientService/GetKeyserverKeys', + grpc.web.MethodType.UNARY, + proto.identity.auth.OutboundKeysForUserRequest, + proto.identity.auth.KeyserverKeysResponse, + /** + * @param {!proto.identity.auth.OutboundKeysForUserRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.auth.KeyserverKeysResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.auth.OutboundKeysForUserRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.auth.KeyserverKeysResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.auth.IdentityClientServiceClient.prototype.getKeyserverKeys = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.auth.IdentityClientService/GetKeyserverKeys', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GetKeyserverKeys, + callback); +}; + + +/** + * @param {!proto.identity.auth.OutboundKeysForUserRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.auth.IdentityClientServicePromiseClient.prototype.getKeyserverKeys = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.auth.IdentityClientService/GetKeyserverKeys', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GetKeyserverKeys); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.auth.UpdateUserPasswordStartRequest, * !proto.identity.auth.UpdateUserPasswordStartResponse>} */ const methodDescriptor_IdentityClientService_UpdateUserPasswordStart = new grpc.web.MethodDescriptor( '/identity.auth.IdentityClientService/UpdateUserPasswordStart', grpc.web.MethodType.UNARY, proto.identity.auth.UpdateUserPasswordStartRequest, proto.identity.auth.UpdateUserPasswordStartResponse, /** * @param {!proto.identity.auth.UpdateUserPasswordStartRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.auth.UpdateUserPasswordStartResponse.deserializeBinary ); /** * @param {!proto.identity.auth.UpdateUserPasswordStartRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.auth.UpdateUserPasswordStartResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.auth.IdentityClientServiceClient.prototype.updateUserPasswordStart = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.auth.IdentityClientService/UpdateUserPasswordStart', request, metadata || {}, methodDescriptor_IdentityClientService_UpdateUserPasswordStart, callback); }; /** * @param {!proto.identity.auth.UpdateUserPasswordStartRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.auth.IdentityClientServicePromiseClient.prototype.updateUserPasswordStart = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.auth.IdentityClientService/UpdateUserPasswordStart', request, metadata || {}, methodDescriptor_IdentityClientService_UpdateUserPasswordStart); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.auth.UpdateUserPasswordFinishRequest, * !proto.identity.unauth.Empty>} */ const methodDescriptor_IdentityClientService_UpdateUserPasswordFinish = new grpc.web.MethodDescriptor( '/identity.auth.IdentityClientService/UpdateUserPasswordFinish', grpc.web.MethodType.UNARY, proto.identity.auth.UpdateUserPasswordFinishRequest, identity_unauth_pb.Empty, /** * @param {!proto.identity.auth.UpdateUserPasswordFinishRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, identity_unauth_pb.Empty.deserializeBinary ); /** * @param {!proto.identity.auth.UpdateUserPasswordFinishRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.auth.IdentityClientServiceClient.prototype.updateUserPasswordFinish = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.auth.IdentityClientService/UpdateUserPasswordFinish', request, metadata || {}, methodDescriptor_IdentityClientService_UpdateUserPasswordFinish, callback); }; /** * @param {!proto.identity.auth.UpdateUserPasswordFinishRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.auth.IdentityClientServicePromiseClient.prototype.updateUserPasswordFinish = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.auth.IdentityClientService/UpdateUserPasswordFinish', request, metadata || {}, methodDescriptor_IdentityClientService_UpdateUserPasswordFinish); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.Empty, * !proto.identity.unauth.Empty>} */ const methodDescriptor_IdentityClientService_LogOutUser = new grpc.web.MethodDescriptor( '/identity.auth.IdentityClientService/LogOutUser', grpc.web.MethodType.UNARY, identity_unauth_pb.Empty, identity_unauth_pb.Empty, /** * @param {!proto.identity.unauth.Empty} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, identity_unauth_pb.Empty.deserializeBinary ); /** * @param {!proto.identity.unauth.Empty} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.auth.IdentityClientServiceClient.prototype.logOutUser = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.auth.IdentityClientService/LogOutUser', request, metadata || {}, methodDescriptor_IdentityClientService_LogOutUser, callback); }; /** * @param {!proto.identity.unauth.Empty} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.auth.IdentityClientServicePromiseClient.prototype.logOutUser = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.auth.IdentityClientService/LogOutUser', request, metadata || {}, methodDescriptor_IdentityClientService_LogOutUser); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.Empty, * !proto.identity.unauth.Empty>} */ const methodDescriptor_IdentityClientService_DeleteUser = new grpc.web.MethodDescriptor( '/identity.auth.IdentityClientService/DeleteUser', grpc.web.MethodType.UNARY, identity_unauth_pb.Empty, identity_unauth_pb.Empty, /** * @param {!proto.identity.unauth.Empty} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, identity_unauth_pb.Empty.deserializeBinary ); /** * @param {!proto.identity.unauth.Empty} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.auth.IdentityClientServiceClient.prototype.deleteUser = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.auth.IdentityClientService/DeleteUser', request, metadata || {}, methodDescriptor_IdentityClientService_DeleteUser, callback); }; /** * @param {!proto.identity.unauth.Empty} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.auth.IdentityClientServicePromiseClient.prototype.deleteUser = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.auth.IdentityClientService/DeleteUser', request, metadata || {}, methodDescriptor_IdentityClientService_DeleteUser); }; -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.identity.auth.OutboundKeysForUserRequest, - * !proto.identity.auth.KeyserverKeysResponse>} - */ -const methodDescriptor_IdentityClientService_GetKeyserverKeys = new grpc.web.MethodDescriptor( - '/identity.auth.IdentityClientService/GetKeyserverKeys', - grpc.web.MethodType.UNARY, - proto.identity.auth.OutboundKeysForUserRequest, - proto.identity.auth.KeyserverKeysResponse, - /** - * @param {!proto.identity.auth.OutboundKeysForUserRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.identity.auth.KeyserverKeysResponse.deserializeBinary -); - - -/** - * @param {!proto.identity.auth.OutboundKeysForUserRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.auth.KeyserverKeysResponse)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.identity.auth.IdentityClientServiceClient.prototype.getKeyserverKeys = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/identity.auth.IdentityClientService/GetKeyserverKeys', - request, - metadata || {}, - methodDescriptor_IdentityClientService_GetKeyserverKeys, - callback); -}; - - -/** - * @param {!proto.identity.auth.OutboundKeysForUserRequest} request The - * request proto - * @param {?Object=} metadata User defined - * call metadata - * @return {!Promise} - * Promise that resolves to the response - */ -proto.identity.auth.IdentityClientServicePromiseClient.prototype.getKeyserverKeys = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/identity.auth.IdentityClientService/GetKeyserverKeys', - request, - metadata || {}, - methodDescriptor_IdentityClientService_GetKeyserverKeys); -}; - - /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.auth.GetDeviceListRequest, * !proto.identity.auth.GetDeviceListResponse>} */ const methodDescriptor_IdentityClientService_GetDeviceListForUser = new grpc.web.MethodDescriptor( '/identity.auth.IdentityClientService/GetDeviceListForUser', grpc.web.MethodType.UNARY, proto.identity.auth.GetDeviceListRequest, proto.identity.auth.GetDeviceListResponse, /** * @param {!proto.identity.auth.GetDeviceListRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.auth.GetDeviceListResponse.deserializeBinary ); /** * @param {!proto.identity.auth.GetDeviceListRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.auth.GetDeviceListResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.auth.IdentityClientServiceClient.prototype.getDeviceListForUser = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.auth.IdentityClientService/GetDeviceListForUser', request, metadata || {}, methodDescriptor_IdentityClientService_GetDeviceListForUser, callback); }; /** * @param {!proto.identity.auth.GetDeviceListRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.auth.IdentityClientServicePromiseClient.prototype.getDeviceListForUser = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.auth.IdentityClientService/GetDeviceListForUser', request, metadata || {}, methodDescriptor_IdentityClientService_GetDeviceListForUser); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.auth.UpdateDeviceListRequest, * !proto.identity.unauth.Empty>} */ const methodDescriptor_IdentityClientService_UpdateDeviceList = new grpc.web.MethodDescriptor( '/identity.auth.IdentityClientService/UpdateDeviceList', grpc.web.MethodType.UNARY, proto.identity.auth.UpdateDeviceListRequest, identity_unauth_pb.Empty, /** * @param {!proto.identity.auth.UpdateDeviceListRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, identity_unauth_pb.Empty.deserializeBinary ); /** * @param {!proto.identity.auth.UpdateDeviceListRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.auth.IdentityClientServiceClient.prototype.updateDeviceList = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.auth.IdentityClientService/UpdateDeviceList', request, metadata || {}, methodDescriptor_IdentityClientService_UpdateDeviceList, callback); }; /** * @param {!proto.identity.auth.UpdateDeviceListRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.auth.IdentityClientServicePromiseClient.prototype.updateDeviceList = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.auth.IdentityClientService/UpdateDeviceList', request, metadata || {}, methodDescriptor_IdentityClientService_UpdateDeviceList); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.auth.LinkFarcasterAccountRequest, * !proto.identity.unauth.Empty>} */ const methodDescriptor_IdentityClientService_LinkFarcasterAccount = new grpc.web.MethodDescriptor( '/identity.auth.IdentityClientService/LinkFarcasterAccount', grpc.web.MethodType.UNARY, proto.identity.auth.LinkFarcasterAccountRequest, identity_unauth_pb.Empty, /** * @param {!proto.identity.auth.LinkFarcasterAccountRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, identity_unauth_pb.Empty.deserializeBinary ); /** * @param {!proto.identity.auth.LinkFarcasterAccountRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.auth.IdentityClientServiceClient.prototype.linkFarcasterAccount = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.auth.IdentityClientService/LinkFarcasterAccount', request, metadata || {}, methodDescriptor_IdentityClientService_LinkFarcasterAccount, callback); }; /** * @param {!proto.identity.auth.LinkFarcasterAccountRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.auth.IdentityClientServicePromiseClient.prototype.linkFarcasterAccount = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.auth.IdentityClientService/LinkFarcasterAccount', request, metadata || {}, methodDescriptor_IdentityClientService_LinkFarcasterAccount); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.Empty, * !proto.identity.unauth.Empty>} */ const methodDescriptor_IdentityClientService_UnlinkFarcasterAccount = new grpc.web.MethodDescriptor( '/identity.auth.IdentityClientService/UnlinkFarcasterAccount', grpc.web.MethodType.UNARY, identity_unauth_pb.Empty, identity_unauth_pb.Empty, /** * @param {!proto.identity.unauth.Empty} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, identity_unauth_pb.Empty.deserializeBinary ); /** * @param {!proto.identity.unauth.Empty} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.auth.IdentityClientServiceClient.prototype.unlinkFarcasterAccount = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.auth.IdentityClientService/UnlinkFarcasterAccount', request, metadata || {}, methodDescriptor_IdentityClientService_UnlinkFarcasterAccount, callback); }; /** * @param {!proto.identity.unauth.Empty} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.auth.IdentityClientServicePromiseClient.prototype.unlinkFarcasterAccount = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.auth.IdentityClientService/UnlinkFarcasterAccount', request, metadata || {}, methodDescriptor_IdentityClientService_UnlinkFarcasterAccount); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.auth.UserIdentityRequest, * !proto.identity.auth.UserIdentityResponse>} */ const methodDescriptor_IdentityClientService_FindUserIdentity = new grpc.web.MethodDescriptor( '/identity.auth.IdentityClientService/FindUserIdentity', grpc.web.MethodType.UNARY, proto.identity.auth.UserIdentityRequest, proto.identity.auth.UserIdentityResponse, /** * @param {!proto.identity.auth.UserIdentityRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.auth.UserIdentityResponse.deserializeBinary ); /** * @param {!proto.identity.auth.UserIdentityRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.auth.UserIdentityResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.auth.IdentityClientServiceClient.prototype.findUserIdentity = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.auth.IdentityClientService/FindUserIdentity', request, metadata || {}, methodDescriptor_IdentityClientService_FindUserIdentity, callback); }; /** * @param {!proto.identity.auth.UserIdentityRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.auth.IdentityClientServicePromiseClient.prototype.findUserIdentity = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.auth.IdentityClientService/FindUserIdentity', request, metadata || {}, methodDescriptor_IdentityClientService_FindUserIdentity); }; module.exports = proto.identity.auth; diff --git a/web/protobufs/identity-auth-client.cjs.flow b/web/protobufs/identity-auth-client.cjs.flow index bb045dd08..a5490f1f7 100644 --- a/web/protobufs/identity-auth-client.cjs.flow +++ b/web/protobufs/identity-auth-client.cjs.flow @@ -1,187 +1,187 @@ // @flow import * as grpcWeb from 'grpc-web'; import * as identityAuthStructs from './identity-auth-structs.cjs'; import * as identityStructs from './identity-unauth-structs.cjs'; declare export class IdentityClientServiceClient { constructor (hostname: string, credentials?: null | { +[index: string]: string; }, options?: null | { +[index: string]: any; }): void; uploadOneTimeKeys( request: identityAuthStructs.UploadOneTimeKeysRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; refreshUserPrekeys( request: identityAuthStructs.RefreshUserPrekeysRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; getOutboundKeysForUser( request: identityAuthStructs.OutboundKeysForUserRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityAuthStructs.OutboundKeysForUserResponse) => void ): grpcWeb.ClientReadableStream; getInboundKeysForUser( request: identityAuthStructs.InboundKeysForUserRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityAuthStructs.InboundKeysForUserResponse) => void ): grpcWeb.ClientReadableStream; + getKeyserverKeys( + request: identityAuthStructs.OutboundKeysForUserRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityAuthStructs.KeyserverKeysResponse) => void + ): grpcWeb.ClientReadableStream; + updateUserPasswordStart( request: identityAuthStructs.UpdateUserPasswordStartRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityAuthStructs.UpdateUserPasswordStartResponse) => void ): grpcWeb.ClientReadableStream; updateUserPasswordFinish( request: identityAuthStructs.UpdateUserPasswordFinishRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; logOutUser( request: identityStructs.Empty, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; deleteUser( request: identityStructs.Empty, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; - getKeyserverKeys( - request: identityAuthStructs.OutboundKeysForUserRequest, - metadata: grpcWeb.Metadata | void, - callback: (err: grpcWeb.RpcError, - response: identityAuthStructs.KeyserverKeysResponse) => void - ): grpcWeb.ClientReadableStream; - getDeviceListForUser( request: identityAuthStructs.GetDeviceListRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityAuthStructs.GetDeviceListResponse) => void ): grpcWeb.ClientReadableStream; updateDeviceList( request: identityAuthStructs.UpdateDeviceListRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; linkFarcasterAccount( request: identityAuthStructs.LinkFarcasterAccountRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; unlinkFarcasterAccount( request: identityStructs.Empty, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; findUserIdentity( request: identityAuthStructs.UserIdentityRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityAuthStructs.UserIdentityResponse) => void ): grpcWeb.ClientReadableStream; } declare export class IdentityClientServicePromiseClient { constructor (hostname: string, credentials?: null | { +[index: string]: string; }, options?: null | { +[index: string]: any; }): void; uploadOneTimeKeys( request: identityAuthStructs.UploadOneTimeKeysRequest, metadata?: grpcWeb.Metadata ): Promise; refreshUserPrekeys( request: identityAuthStructs.RefreshUserPrekeysRequest, metadata?: grpcWeb.Metadata ): Promise; getOutboundKeysForUser( request: identityAuthStructs.OutboundKeysForUserRequest, metadata?: grpcWeb.Metadata ): Promise; getInboundKeysForUser( request: identityAuthStructs.InboundKeysForUserRequest, metadata?: grpcWeb.Metadata ): Promise; + getKeyserverKeys( + request: identityAuthStructs.OutboundKeysForUserRequest, + metadata?: grpcWeb.Metadata + ): Promise; + updateUserPasswordStart( request: identityAuthStructs.UpdateUserPasswordStartRequest, metadata?: grpcWeb.Metadata ): Promise; updateUserPasswordFinish( request: identityAuthStructs.UpdateUserPasswordFinishRequest, metadata?: grpcWeb.Metadata ): Promise; logOutUser( request: identityStructs.Empty, metadata?: grpcWeb.Metadata ): Promise; deleteUser( request: identityStructs.Empty, metadata?: grpcWeb.Metadata ): Promise; - getKeyserverKeys( - request: identityAuthStructs.OutboundKeysForUserRequest, - metadata?: grpcWeb.Metadata - ): Promise; - getDeviceListForUser( request: identityAuthStructs.GetDeviceListRequest, metadata?: grpcWeb.Metadata ): Promise; updateDeviceList( request: identityAuthStructs.UpdateDeviceListRequest, metadata?: grpcWeb.Metadata ): Promise; linkFarcasterAccount( request: identityAuthStructs.LinkFarcasterAccountRequest, metadata?: grpcWeb.Metadata ): Promise; unlinkFarcasterAccount( request: identityStructs.Empty, metadata?: grpcWeb.Metadata ): Promise; findUserIdentity( request: identityAuthStructs.UserIdentityRequest, metadata?: grpcWeb.Metadata ): Promise; } diff --git a/web/protobufs/identity-unauth.cjs b/web/protobufs/identity-unauth.cjs index 03fa469f1..f91c8ebac 100644 --- a/web/protobufs/identity-unauth.cjs +++ b/web/protobufs/identity-unauth.cjs @@ -1,1055 +1,1055 @@ /** * @fileoverview gRPC-Web generated client stub for identity.unauth * @enhanceable * @public * @generated */ // Code generated by protoc-gen-grpc-web. DO NOT EDIT. // versions: // protoc-gen-grpc-web v1.4.2 // protoc v3.21.12 // source: identity_unauth.proto /* eslint-disable */ // @ts-nocheck const grpc = {}; grpc.web = require('grpc-web'); const proto = {}; proto.identity = {}; proto.identity.unauth = require('./identity-unauth-structs.cjs'); /** * @param {string} hostname * @param {?Object} credentials * @param {?grpc.web.ClientOptions} options * @constructor * @struct * @final */ proto.identity.unauth.IdentityClientServiceClient = function(hostname, credentials, options) { if (!options) options = {}; options.format = 'text'; /** * @private @const {!grpc.web.GrpcWebClientBase} The client */ this.client_ = new grpc.web.GrpcWebClientBase(options); /** * @private @const {string} The hostname */ this.hostname_ = hostname.replace(/\/+$/, ''); }; /** * @param {string} hostname * @param {?Object} credentials * @param {?grpc.web.ClientOptions} options * @constructor * @struct * @final */ proto.identity.unauth.IdentityClientServicePromiseClient = function(hostname, credentials, options) { if (!options) options = {}; options.format = 'text'; /** * @private @const {!grpc.web.GrpcWebClientBase} The client */ this.client_ = new grpc.web.GrpcWebClientBase(options); /** * @private @const {string} The hostname */ this.hostname_ = hostname.replace(/\/+$/, ''); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.RegistrationStartRequest, * !proto.identity.unauth.RegistrationStartResponse>} */ const methodDescriptor_IdentityClientService_RegisterPasswordUserStart = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/RegisterPasswordUserStart', grpc.web.MethodType.UNARY, proto.identity.unauth.RegistrationStartRequest, proto.identity.unauth.RegistrationStartResponse, /** * @param {!proto.identity.unauth.RegistrationStartRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.unauth.RegistrationStartResponse.deserializeBinary ); /** * @param {!proto.identity.unauth.RegistrationStartRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.RegistrationStartResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.unauth.IdentityClientServiceClient.prototype.registerPasswordUserStart = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/RegisterPasswordUserStart', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterPasswordUserStart, callback); }; /** * @param {!proto.identity.unauth.RegistrationStartRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.unauth.IdentityClientServicePromiseClient.prototype.registerPasswordUserStart = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/RegisterPasswordUserStart', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterPasswordUserStart); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.ReservedRegistrationStartRequest, * !proto.identity.unauth.RegistrationStartResponse>} */ const methodDescriptor_IdentityClientService_RegisterReservedPasswordUserStart = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/RegisterReservedPasswordUserStart', grpc.web.MethodType.UNARY, proto.identity.unauth.ReservedRegistrationStartRequest, proto.identity.unauth.RegistrationStartResponse, /** * @param {!proto.identity.unauth.ReservedRegistrationStartRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.unauth.RegistrationStartResponse.deserializeBinary ); /** * @param {!proto.identity.unauth.ReservedRegistrationStartRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.RegistrationStartResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.unauth.IdentityClientServiceClient.prototype.registerReservedPasswordUserStart = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/RegisterReservedPasswordUserStart', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterReservedPasswordUserStart, callback); }; /** * @param {!proto.identity.unauth.ReservedRegistrationStartRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.unauth.IdentityClientServicePromiseClient.prototype.registerReservedPasswordUserStart = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/RegisterReservedPasswordUserStart', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterReservedPasswordUserStart); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.RegistrationFinishRequest, * !proto.identity.unauth.AuthResponse>} */ const methodDescriptor_IdentityClientService_RegisterPasswordUserFinish = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/RegisterPasswordUserFinish', grpc.web.MethodType.UNARY, proto.identity.unauth.RegistrationFinishRequest, proto.identity.unauth.AuthResponse, /** * @param {!proto.identity.unauth.RegistrationFinishRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.unauth.AuthResponse.deserializeBinary ); /** * @param {!proto.identity.unauth.RegistrationFinishRequest} 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.registerPasswordUserFinish = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/RegisterPasswordUserFinish', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterPasswordUserFinish, callback); }; /** * @param {!proto.identity.unauth.RegistrationFinishRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.unauth.IdentityClientServicePromiseClient.prototype.registerPasswordUserFinish = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/RegisterPasswordUserFinish', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterPasswordUserFinish); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.OpaqueLoginStartRequest, * !proto.identity.unauth.OpaqueLoginStartResponse>} */ const methodDescriptor_IdentityClientService_LogInPasswordUserStart = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/LogInPasswordUserStart', grpc.web.MethodType.UNARY, proto.identity.unauth.OpaqueLoginStartRequest, proto.identity.unauth.OpaqueLoginStartResponse, /** * @param {!proto.identity.unauth.OpaqueLoginStartRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.unauth.OpaqueLoginStartResponse.deserializeBinary ); /** * @param {!proto.identity.unauth.OpaqueLoginStartRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.OpaqueLoginStartResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.unauth.IdentityClientServiceClient.prototype.logInPasswordUserStart = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/LogInPasswordUserStart', request, metadata || {}, methodDescriptor_IdentityClientService_LogInPasswordUserStart, callback); }; /** * @param {!proto.identity.unauth.OpaqueLoginStartRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.unauth.IdentityClientServicePromiseClient.prototype.logInPasswordUserStart = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/LogInPasswordUserStart', request, metadata || {}, methodDescriptor_IdentityClientService_LogInPasswordUserStart); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.OpaqueLoginFinishRequest, * !proto.identity.unauth.AuthResponse>} */ const methodDescriptor_IdentityClientService_LogInPasswordUserFinish = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/LogInPasswordUserFinish', grpc.web.MethodType.UNARY, proto.identity.unauth.OpaqueLoginFinishRequest, proto.identity.unauth.AuthResponse, /** * @param {!proto.identity.unauth.OpaqueLoginFinishRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.unauth.AuthResponse.deserializeBinary ); /** * @param {!proto.identity.unauth.OpaqueLoginFinishRequest} 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.logInPasswordUserFinish = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/LogInPasswordUserFinish', request, metadata || {}, methodDescriptor_IdentityClientService_LogInPasswordUserFinish, callback); }; /** * @param {!proto.identity.unauth.OpaqueLoginFinishRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.unauth.IdentityClientServicePromiseClient.prototype.logInPasswordUserFinish = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/LogInPasswordUserFinish', request, metadata || {}, methodDescriptor_IdentityClientService_LogInPasswordUserFinish); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !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.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.logInWalletUser = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/LogInWalletUser', request, metadata || {}, methodDescriptor_IdentityClientService_LogInWalletUser, 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.logInWalletUser = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/LogInWalletUser', request, metadata || {}, methodDescriptor_IdentityClientService_LogInWalletUser); }; /** * @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< * !proto.identity.unauth.ReservedWalletRegistrationRequest, * !proto.identity.unauth.AuthResponse>} */ const methodDescriptor_IdentityClientService_RegisterReservedWalletUser = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/RegisterReservedWalletUser', grpc.web.MethodType.UNARY, proto.identity.unauth.ReservedWalletRegistrationRequest, proto.identity.unauth.AuthResponse, /** * @param {!proto.identity.unauth.ReservedWalletRegistrationRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.unauth.AuthResponse.deserializeBinary ); /** * @param {!proto.identity.unauth.ReservedWalletRegistrationRequest} 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.registerReservedWalletUser = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/RegisterReservedWalletUser', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterReservedWalletUser, callback); }; /** * @param {!proto.identity.unauth.ReservedWalletRegistrationRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.unauth.IdentityClientServicePromiseClient.prototype.registerReservedWalletUser = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/RegisterReservedWalletUser', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterReservedWalletUser); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.SecondaryDeviceKeysUploadRequest, * !proto.identity.unauth.AuthResponse>} */ const methodDescriptor_IdentityClientService_UploadKeysForRegisteredDeviceAndLogIn = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/UploadKeysForRegisteredDeviceAndLogIn', grpc.web.MethodType.UNARY, proto.identity.unauth.SecondaryDeviceKeysUploadRequest, proto.identity.unauth.AuthResponse, /** * @param {!proto.identity.unauth.SecondaryDeviceKeysUploadRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.unauth.AuthResponse.deserializeBinary ); /** * @param {!proto.identity.unauth.SecondaryDeviceKeysUploadRequest} 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.uploadKeysForRegisteredDeviceAndLogIn = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/UploadKeysForRegisteredDeviceAndLogIn', request, metadata || {}, methodDescriptor_IdentityClientService_UploadKeysForRegisteredDeviceAndLogIn, callback); }; /** * @param {!proto.identity.unauth.SecondaryDeviceKeysUploadRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.unauth.IdentityClientServicePromiseClient.prototype.uploadKeysForRegisteredDeviceAndLogIn = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/UploadKeysForRegisteredDeviceAndLogIn', request, metadata || {}, methodDescriptor_IdentityClientService_UploadKeysForRegisteredDeviceAndLogIn); }; -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.identity.unauth.Empty, - * !proto.identity.unauth.GenerateNonceResponse>} - */ -const methodDescriptor_IdentityClientService_GenerateNonce = new grpc.web.MethodDescriptor( - '/identity.unauth.IdentityClientService/GenerateNonce', - grpc.web.MethodType.UNARY, - proto.identity.unauth.Empty, - proto.identity.unauth.GenerateNonceResponse, - /** - * @param {!proto.identity.unauth.Empty} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.identity.unauth.GenerateNonceResponse.deserializeBinary -); - - -/** - * @param {!proto.identity.unauth.Empty} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.GenerateNonceResponse)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.identity.unauth.IdentityClientServiceClient.prototype.generateNonce = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/identity.unauth.IdentityClientService/GenerateNonce', - request, - metadata || {}, - methodDescriptor_IdentityClientService_GenerateNonce, - callback); -}; - - -/** - * @param {!proto.identity.unauth.Empty} request The - * request proto - * @param {?Object=} metadata User defined - * call metadata - * @return {!Promise} - * Promise that resolves to the response - */ -proto.identity.unauth.IdentityClientServicePromiseClient.prototype.generateNonce = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/identity.unauth.IdentityClientService/GenerateNonce', - request, - metadata || {}, - methodDescriptor_IdentityClientService_GenerateNonce); -}; - - /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.VerifyUserAccessTokenRequest, * !proto.identity.unauth.VerifyUserAccessTokenResponse>} */ const methodDescriptor_IdentityClientService_VerifyUserAccessToken = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/VerifyUserAccessToken', grpc.web.MethodType.UNARY, proto.identity.unauth.VerifyUserAccessTokenRequest, proto.identity.unauth.VerifyUserAccessTokenResponse, /** * @param {!proto.identity.unauth.VerifyUserAccessTokenRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.unauth.VerifyUserAccessTokenResponse.deserializeBinary ); /** * @param {!proto.identity.unauth.VerifyUserAccessTokenRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.VerifyUserAccessTokenResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.unauth.IdentityClientServiceClient.prototype.verifyUserAccessToken = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/VerifyUserAccessToken', request, metadata || {}, methodDescriptor_IdentityClientService_VerifyUserAccessToken, callback); }; /** * @param {!proto.identity.unauth.VerifyUserAccessTokenRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.unauth.IdentityClientServicePromiseClient.prototype.verifyUserAccessToken = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/VerifyUserAccessToken', request, metadata || {}, methodDescriptor_IdentityClientService_VerifyUserAccessToken); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.AddReservedUsernamesRequest, * !proto.identity.unauth.Empty>} */ const methodDescriptor_IdentityClientService_AddReservedUsernames = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/AddReservedUsernames', grpc.web.MethodType.UNARY, proto.identity.unauth.AddReservedUsernamesRequest, proto.identity.unauth.Empty, /** * @param {!proto.identity.unauth.AddReservedUsernamesRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.unauth.Empty.deserializeBinary ); /** * @param {!proto.identity.unauth.AddReservedUsernamesRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.unauth.IdentityClientServiceClient.prototype.addReservedUsernames = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/AddReservedUsernames', request, metadata || {}, methodDescriptor_IdentityClientService_AddReservedUsernames, callback); }; /** * @param {!proto.identity.unauth.AddReservedUsernamesRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.unauth.IdentityClientServicePromiseClient.prototype.addReservedUsernames = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/AddReservedUsernames', request, metadata || {}, methodDescriptor_IdentityClientService_AddReservedUsernames); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.RemoveReservedUsernameRequest, * !proto.identity.unauth.Empty>} */ const methodDescriptor_IdentityClientService_RemoveReservedUsername = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/RemoveReservedUsername', grpc.web.MethodType.UNARY, proto.identity.unauth.RemoveReservedUsernameRequest, proto.identity.unauth.Empty, /** * @param {!proto.identity.unauth.RemoveReservedUsernameRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.unauth.Empty.deserializeBinary ); /** * @param {!proto.identity.unauth.RemoveReservedUsernameRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.unauth.IdentityClientServiceClient.prototype.removeReservedUsername = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/RemoveReservedUsername', request, metadata || {}, methodDescriptor_IdentityClientService_RemoveReservedUsername, callback); }; /** * @param {!proto.identity.unauth.RemoveReservedUsernameRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.unauth.IdentityClientServicePromiseClient.prototype.removeReservedUsername = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/RemoveReservedUsername', request, metadata || {}, methodDescriptor_IdentityClientService_RemoveReservedUsername); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.Empty, * !proto.identity.unauth.Empty>} */ const methodDescriptor_IdentityClientService_Ping = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/Ping', grpc.web.MethodType.UNARY, proto.identity.unauth.Empty, proto.identity.unauth.Empty, /** * @param {!proto.identity.unauth.Empty} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.unauth.Empty.deserializeBinary ); /** * @param {!proto.identity.unauth.Empty} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.unauth.IdentityClientServiceClient.prototype.ping = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/Ping', request, metadata || {}, methodDescriptor_IdentityClientService_Ping, callback); }; /** * @param {!proto.identity.unauth.Empty} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.unauth.IdentityClientServicePromiseClient.prototype.ping = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/Ping', request, metadata || {}, methodDescriptor_IdentityClientService_Ping); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.FindUserIDRequest, * !proto.identity.unauth.FindUserIDResponse>} */ const methodDescriptor_IdentityClientService_FindUserID = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/FindUserID', grpc.web.MethodType.UNARY, proto.identity.unauth.FindUserIDRequest, proto.identity.unauth.FindUserIDResponse, /** * @param {!proto.identity.unauth.FindUserIDRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.unauth.FindUserIDResponse.deserializeBinary ); /** * @param {!proto.identity.unauth.FindUserIDRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.FindUserIDResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.unauth.IdentityClientServiceClient.prototype.findUserID = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/FindUserID', request, metadata || {}, methodDescriptor_IdentityClientService_FindUserID, callback); }; /** * @param {!proto.identity.unauth.FindUserIDRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.unauth.IdentityClientServicePromiseClient.prototype.findUserID = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/FindUserID', request, metadata || {}, methodDescriptor_IdentityClientService_FindUserID); }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.unauth.Empty, + * !proto.identity.unauth.GenerateNonceResponse>} + */ +const methodDescriptor_IdentityClientService_GenerateNonce = new grpc.web.MethodDescriptor( + '/identity.unauth.IdentityClientService/GenerateNonce', + grpc.web.MethodType.UNARY, + proto.identity.unauth.Empty, + proto.identity.unauth.GenerateNonceResponse, + /** + * @param {!proto.identity.unauth.Empty} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.unauth.GenerateNonceResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.unauth.Empty} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.GenerateNonceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.unauth.IdentityClientServiceClient.prototype.generateNonce = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.unauth.IdentityClientService/GenerateNonce', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GenerateNonce, + callback); +}; + + +/** + * @param {!proto.identity.unauth.Empty} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.unauth.IdentityClientServicePromiseClient.prototype.generateNonce = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.unauth.IdentityClientService/GenerateNonce', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GenerateNonce); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.unauth.GetFarcasterUsersRequest, * !proto.identity.unauth.GetFarcasterUsersResponse>} */ const methodDescriptor_IdentityClientService_GetFarcasterUsers = new grpc.web.MethodDescriptor( '/identity.unauth.IdentityClientService/GetFarcasterUsers', grpc.web.MethodType.UNARY, proto.identity.unauth.GetFarcasterUsersRequest, proto.identity.unauth.GetFarcasterUsersResponse, /** * @param {!proto.identity.unauth.GetFarcasterUsersRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.unauth.GetFarcasterUsersResponse.deserializeBinary ); /** * @param {!proto.identity.unauth.GetFarcasterUsersRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.GetFarcasterUsersResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.unauth.IdentityClientServiceClient.prototype.getFarcasterUsers = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.unauth.IdentityClientService/GetFarcasterUsers', request, metadata || {}, methodDescriptor_IdentityClientService_GetFarcasterUsers, callback); }; /** * @param {!proto.identity.unauth.GetFarcasterUsersRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.unauth.IdentityClientServicePromiseClient.prototype.getFarcasterUsers = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.unauth.IdentityClientService/GetFarcasterUsers', request, metadata || {}, methodDescriptor_IdentityClientService_GetFarcasterUsers); }; module.exports = proto.identity.unauth; diff --git a/web/protobufs/identity-unauth.cjs.flow b/web/protobufs/identity-unauth.cjs.flow index 6b369aeee..6f8624a3e 100644 --- a/web/protobufs/identity-unauth.cjs.flow +++ b/web/protobufs/identity-unauth.cjs.flow @@ -1,210 +1,210 @@ // @flow import * as grpcWeb from 'grpc-web'; import * as identityStructs from './identity-unauth-structs.cjs'; declare export class IdentityClientServiceClient { constructor (hostname: string, credentials?: null | { +[index: string]: string }, options?: null | { +[index: string]: any }): void; registerPasswordUserStart( request: identityStructs.RegistrationStartRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.RegistrationStartResponse) => void ): grpcWeb.ClientReadableStream; registerReservedPasswordUserStart( request: identityStructs.ReservedRegistrationStartRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.RegistrationStartResponse) => void ): grpcWeb.ClientReadableStream; registerPasswordUserFinish( request: identityStructs.RegistrationFinishRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.AuthResponse) => void ): grpcWeb.ClientReadableStream; logInPasswordUserStart( request: identityStructs.OpaqueLoginStartRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.OpaqueLoginStartResponse) => void ): grpcWeb.ClientReadableStream; logInPasswordUserFinish( request: identityStructs.OpaqueLoginFinishRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.AuthResponse) => void ): grpcWeb.ClientReadableStream; logInWalletUser( 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 ): grpcWeb.ClientReadableStream; registerReservedWalletUser( request: identityStructs.ReservedWalletRegistrationRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.AuthResponse) => void ): grpcWeb.ClientReadableStream; uploadKeysForRegisteredDeviceAndLogIn( request: identityStructs.SecondaryDeviceKeysUploadRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.AuthResponse) => void ): grpcWeb.ClientReadableStream; - generateNonce( - request: identityStructs.Empty, - metadata: grpcWeb.Metadata | void, - callback: (err: grpcWeb.RpcError, - response: identityStructs.GenerateNonceResponse) => void - ): grpcWeb.ClientReadableStream; - verifyUserAccessToken( request: identityStructs.VerifyUserAccessTokenRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.VerifyUserAccessTokenResponse) => void ): grpcWeb.ClientReadableStream; addReservedUsernames( request: identityStructs.AddReservedUsernamesRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; removeReservedUsername( request: identityStructs.RemoveReservedUsernameRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; ping( request: identityStructs.Empty, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; findUserID( request: identityStructs.FindUserIDRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.FindUserIDResponse) => void ): grpcWeb.ClientReadableStream; + generateNonce( + request: identityStructs.Empty, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityStructs.GenerateNonceResponse) => void + ): grpcWeb.ClientReadableStream; + getFarcasterUsers( request: identityStructs.GetFarcasterUsersRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.GetFarcasterUsersResponse) => void ): grpcWeb.ClientReadableStream; } declare export class IdentityClientServicePromiseClient { constructor (hostname: string, credentials?: null | { +[index: string]: string }, options?: null | { +[index: string]: any }): void; registerPasswordUserStart( request: identityStructs.RegistrationStartRequest, metadata?: grpcWeb.Metadata ): Promise; registerReservedPasswordUserStart( request: identityStructs.ReservedRegistrationStartRequest, metadata?: grpcWeb.Metadata ): Promise; registerPasswordUserFinish( request: identityStructs.RegistrationFinishRequest, metadata?: grpcWeb.Metadata ): Promise; logInPasswordUserStart( request: identityStructs.OpaqueLoginStartRequest, metadata?: grpcWeb.Metadata ): Promise; logInPasswordUserFinish( request: identityStructs.OpaqueLoginFinishRequest, metadata?: grpcWeb.Metadata ): Promise; logInWalletUser( request: identityStructs.WalletAuthRequest, metadata?: grpcWeb.Metadata ): Promise; registerWalletUser( request: identityStructs.WalletAuthRequest, metadata?: grpcWeb.Metadata ): Promise; registerReservedWalletUser( request: identityStructs.ReservedWalletRegistrationRequest, metadata?: grpcWeb.Metadata ): Promise; uploadKeysForRegisteredDeviceAndLogIn( request: identityStructs.SecondaryDeviceKeysUploadRequest, metadata?: grpcWeb.Metadata ): Promise; - generateNonce( - request: identityStructs.Empty, - metadata?: grpcWeb.Metadata - ): Promise; - verifyUserAccessToken( request: identityStructs.VerifyUserAccessTokenRequest, metadata?: grpcWeb.Metadata ): Promise; addReservedUsernames( request: identityStructs.AddReservedUsernamesRequest, metadata?: grpcWeb.Metadata ): Promise; removeReservedUsername( request: identityStructs.RemoveReservedUsernameRequest, metadata?: grpcWeb.Metadata ): Promise; ping( request: identityStructs.Empty, metadata?: grpcWeb.Metadata ): Promise; findUserID( request: identityStructs.FindUserIDRequest, metadata?: grpcWeb.Metadata ): Promise; + generateNonce( + request: identityStructs.Empty, + metadata?: grpcWeb.Metadata + ): Promise; + getFarcasterUsers( request: identityStructs.GetFarcasterUsersRequest, metadata?: grpcWeb.Metadata ): Promise; }