chore: add rlnIdentifier to message.proto

This commit is contained in:
Richard Ramos 2022-09-26 14:23:41 -04:00
parent 5bab85f93f
commit aec3822972
No known key found for this signature in database
GPG Key ID: BD36D48BC9FFC88C
7 changed files with 102 additions and 0 deletions

View File

@ -58,6 +58,7 @@ export interface RateLimitProof {
shareX: Uint8Array;
shareY: Uint8Array;
nullifier: Uint8Array;
rlnIdentifier: Uint8Array;
}
export interface ProtoMessage {

View File

@ -310,6 +310,7 @@ export interface RateLimitProof {
shareX: Uint8Array;
shareY: Uint8Array;
nullifier: Uint8Array;
rlnIdentifier: Uint8Array;
}
export namespace RateLimitProof {
@ -377,6 +378,15 @@ export namespace RateLimitProof {
);
}
if (obj.rlnIdentifier != null) {
writer.uint32(58);
writer.bytes(obj.rlnIdentifier);
} else {
throw new Error(
'Protocol error: required field "rlnIdentifier" was not found in object'
);
}
if (opts.lengthDelimited !== false) {
writer.ldelim();
}
@ -389,6 +399,7 @@ export namespace RateLimitProof {
shareX: new Uint8Array(0),
shareY: new Uint8Array(0),
nullifier: new Uint8Array(0),
rlnIdentifier: new Uint8Array(0),
};
const end = length == null ? reader.len : reader.pos + length;
@ -415,6 +426,9 @@ export namespace RateLimitProof {
case 6:
obj.nullifier = reader.bytes();
break;
case 7:
obj.rlnIdentifier = reader.bytes();
break;
default:
reader.skipType(tag & 7);
break;
@ -457,6 +471,12 @@ export namespace RateLimitProof {
);
}
if (obj.rlnIdentifier == null) {
throw new Error(
'Protocol error: value for required field "rlnIdentifier" was not found in protobuf'
);
}
return obj;
}
);

View File

@ -234,6 +234,7 @@ export interface RateLimitProof {
shareX: Uint8Array;
shareY: Uint8Array;
nullifier: Uint8Array;
rlnIdentifier: Uint8Array;
}
export namespace RateLimitProof {
@ -301,6 +302,15 @@ export namespace RateLimitProof {
);
}
if (obj.rlnIdentifier != null) {
writer.uint32(58);
writer.bytes(obj.rlnIdentifier);
} else {
throw new Error(
'Protocol error: required field "rlnIdentifier" was not found in object'
);
}
if (opts.lengthDelimited !== false) {
writer.ldelim();
}
@ -313,6 +323,7 @@ export namespace RateLimitProof {
shareX: new Uint8Array(0),
shareY: new Uint8Array(0),
nullifier: new Uint8Array(0),
rlnIdentifier: new Uint8Array(0),
};
const end = length == null ? reader.len : reader.pos + length;
@ -339,6 +350,9 @@ export namespace RateLimitProof {
case 6:
obj.nullifier = reader.bytes();
break;
case 7:
obj.rlnIdentifier = reader.bytes();
break;
default:
reader.skipType(tag & 7);
break;
@ -381,6 +395,12 @@ export namespace RateLimitProof {
);
}
if (obj.rlnIdentifier == null) {
throw new Error(
'Protocol error: value for required field "rlnIdentifier" was not found in protobuf'
);
}
return obj;
}
);

View File

@ -7,6 +7,7 @@ message RateLimitProof {
bytes share_x = 4;
bytes share_y = 5;
bytes nullifier = 6;
bytes rlnIdentifier = 7;
}
message WakuMessage {

View File

@ -12,6 +12,7 @@ export interface RateLimitProof {
shareX: Uint8Array;
shareY: Uint8Array;
nullifier: Uint8Array;
rlnIdentifier: Uint8Array;
}
export namespace RateLimitProof {
@ -79,6 +80,15 @@ export namespace RateLimitProof {
);
}
if (obj.rlnIdentifier != null) {
writer.uint32(58);
writer.bytes(obj.rlnIdentifier);
} else {
throw new Error(
'Protocol error: required field "rlnIdentifier" was not found in object'
);
}
if (opts.lengthDelimited !== false) {
writer.ldelim();
}
@ -91,6 +101,7 @@ export namespace RateLimitProof {
shareX: new Uint8Array(0),
shareY: new Uint8Array(0),
nullifier: new Uint8Array(0),
rlnIdentifier: new Uint8Array(0),
};
const end = length == null ? reader.len : reader.pos + length;
@ -117,6 +128,9 @@ export namespace RateLimitProof {
case 6:
obj.nullifier = reader.bytes();
break;
case 7:
obj.rlnIdentifier = reader.bytes();
break;
default:
reader.skipType(tag & 7);
break;
@ -159,6 +173,12 @@ export namespace RateLimitProof {
);
}
if (obj.rlnIdentifier == null) {
throw new Error(
'Protocol error: value for required field "rlnIdentifier" was not found in protobuf'
);
}
return obj;
}
);

View File

@ -543,6 +543,7 @@ export interface RateLimitProof {
shareX: Uint8Array;
shareY: Uint8Array;
nullifier: Uint8Array;
rlnIdentifier: Uint8Array;
}
export namespace RateLimitProof {
@ -610,6 +611,15 @@ export namespace RateLimitProof {
);
}
if (obj.rlnIdentifier != null) {
writer.uint32(58);
writer.bytes(obj.rlnIdentifier);
} else {
throw new Error(
'Protocol error: required field "rlnIdentifier" was not found in object'
);
}
if (opts.lengthDelimited !== false) {
writer.ldelim();
}
@ -622,6 +632,7 @@ export namespace RateLimitProof {
shareX: new Uint8Array(0),
shareY: new Uint8Array(0),
nullifier: new Uint8Array(0),
rlnIdentifier: new Uint8Array(0),
};
const end = length == null ? reader.len : reader.pos + length;
@ -648,6 +659,9 @@ export namespace RateLimitProof {
case 6:
obj.nullifier = reader.bytes();
break;
case 7:
obj.rlnIdentifier = reader.bytes();
break;
default:
reader.skipType(tag & 7);
break;
@ -690,6 +704,12 @@ export namespace RateLimitProof {
);
}
if (obj.rlnIdentifier == null) {
throw new Error(
'Protocol error: value for required field "rlnIdentifier" was not found in protobuf'
);
}
return obj;
}
);

View File

@ -552,6 +552,7 @@ export interface RateLimitProof {
shareX: Uint8Array;
shareY: Uint8Array;
nullifier: Uint8Array;
rlnIdentifier: Uint8Array;
}
export namespace RateLimitProof {
@ -619,6 +620,15 @@ export namespace RateLimitProof {
);
}
if (obj.rlnIdentifier != null) {
writer.uint32(58);
writer.bytes(obj.rlnIdentifier);
} else {
throw new Error(
'Protocol error: required field "rlnIdentifier" was not found in object'
);
}
if (opts.lengthDelimited !== false) {
writer.ldelim();
}
@ -631,6 +641,7 @@ export namespace RateLimitProof {
shareX: new Uint8Array(0),
shareY: new Uint8Array(0),
nullifier: new Uint8Array(0),
rlnIdentifier: new Uint8Array(0),
};
const end = length == null ? reader.len : reader.pos + length;
@ -657,6 +668,9 @@ export namespace RateLimitProof {
case 6:
obj.nullifier = reader.bytes();
break;
case 7:
obj.rlnIdentifier = reader.bytes();
break;
default:
reader.skipType(tag & 7);
break;
@ -699,6 +713,12 @@ export namespace RateLimitProof {
);
}
if (obj.rlnIdentifier == null) {
throw new Error(
'Protocol error: value for required field "rlnIdentifier" was not found in protobuf'
);
}
return obj;
}
);