diff --git a/services/identity/src/grpc_services/authenticated.rs b/services/identity/src/grpc_services/authenticated.rs --- a/services/identity/src/grpc_services/authenticated.rs +++ b/services/identity/src/grpc_services/authenticated.rs @@ -879,6 +879,7 @@ let response = UserIdentitiesResponse { identities: mapped_results, + reserved_user_identifiers: HashMap::new(), }; return Ok(Response::new(response)); } diff --git a/shared/protos/identity_auth.proto b/shared/protos/identity_auth.proto --- a/shared/protos/identity_auth.proto +++ b/shared/protos/identity_auth.proto @@ -318,4 +318,7 @@ message UserIdentitiesResponse { map identities = 1; + + // reserved usernames or wallet addresses + map reserved_user_identifiers = 2; } diff --git a/web/protobufs/identity-auth-structs.cjs b/web/protobufs/identity-auth-structs.cjs --- a/web/protobufs/identity-auth-structs.cjs +++ b/web/protobufs/identity-auth-structs.cjs @@ -5732,7 +5732,8 @@ */ proto.identity.auth.UserIdentitiesResponse.toObject = function(includeInstance, msg) { var f, obj = { - identitiesMap: (f = msg.getIdentitiesMap()) ? f.toObject(includeInstance, proto.identity.auth.Identity.toObject) : [] + identitiesMap: (f = msg.getIdentitiesMap()) ? f.toObject(includeInstance, proto.identity.auth.Identity.toObject) : [], + reservedUserIdentifiersMap: (f = msg.getReservedUserIdentifiersMap()) ? f.toObject(includeInstance, undefined) : [] }; if (includeInstance) { @@ -5775,6 +5776,12 @@ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.identity.auth.Identity.deserializeBinaryFromReader, "", new proto.identity.auth.Identity()); }); break; + case 2: + var value = msg.getReservedUserIdentifiersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; default: reader.skipField(); break; @@ -5808,6 +5815,10 @@ if (f && f.getLength() > 0) { f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.identity.auth.Identity.serializeBinaryToWriter); } + f = message.getReservedUserIdentifiersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } }; @@ -5834,4 +5845,27 @@ }; +/** + * map reserved_user_identifiers = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.identity.auth.UserIdentitiesResponse.prototype.getReservedUserIdentifiersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 2, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.identity.auth.UserIdentitiesResponse} returns this + */ +proto.identity.auth.UserIdentitiesResponse.prototype.clearReservedUserIdentifiersMap = function() { + this.getReservedUserIdentifiersMap().clear(); + return this; +}; + + goog.object.extend(exports, proto.identity.auth); diff --git a/web/protobufs/identity-auth-structs.cjs.flow b/web/protobufs/identity-auth-structs.cjs.flow --- a/web/protobufs/identity-auth-structs.cjs.flow +++ b/web/protobufs/identity-auth-structs.cjs.flow @@ -618,9 +618,12 @@ } declare export class UserIdentitiesResponse extends Message { - getIdentitiesMap(): Map; + getIdentitiesMap(): ProtoMap; clearIdentitiesMap(): UserIdentitiesResponse; + getReservedUserIdentifiersMap(): ProtoMap; + clearReservedUserIdentifiersMap(): UserIdentitiesResponse; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): UserIdentitiesResponseObject; static toObject(includeInstance: boolean, msg: UserIdentitiesResponse): UserIdentitiesResponseObject; @@ -631,4 +634,5 @@ export type UserIdentitiesResponseObject = { identitiesMap: Array<[string, IdentityObject]>, + reservedUserIdentifiersMap: Array<[string, string]>, }