@@ -11,23 +11,11 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
1111import type { PartialMessage } from "@protobuf-ts/runtime" ;
1212import { reflectionMergePartial } from "@protobuf-ts/runtime" ;
1313import { MessageType } from "@protobuf-ts/runtime" ;
14+ import { ContentDigest } from "./common" ;
1415import { EventKey } from "./event_key" ;
16+ import { VerificationVerify } from "./verifications" ;
17+ import { VerificationClaim } from "./verifications" ;
1518import { Identity } from "./identity" ;
16- /**
17- * @generated from protobuf message polycentric.v2.ContentDigest
18- */
19- export interface ContentDigest {
20- /**
21- * @generated from protobuf field: polycentric.v2.ContentDigestType type = 1
22- */
23- type : ContentDigestType ;
24- /**
25- * We hash the serialized bytes
26- *
27- * @generated from protobuf field: bytes value = 2
28- */
29- value : Uint8Array ;
30- }
3119/**
3220 * Content of the event
3321 *
@@ -97,6 +85,20 @@ export interface Content {
9785 * @generated from protobuf field: polycentric.v2.Labels labels = 11
9886 */
9987 labels : Labels ;
88+ } | {
89+ oneofKind : "verificationClaim" ;
90+ /**
91+ * Verifications (see verifications.proto)
92+ *
93+ * @generated from protobuf field: polycentric.v2.VerificationClaim verification_claim = 12
94+ */
95+ verificationClaim : VerificationClaim ;
96+ } | {
97+ oneofKind : "verificationVerify" ;
98+ /**
99+ * @generated from protobuf field: polycentric.v2.VerificationVerify verification_verify = 13
100+ */
101+ verificationVerify : VerificationVerify ;
100102 } | {
101103 oneofKind : undefined ;
102104 } ;
@@ -385,19 +387,6 @@ export interface UploadBlobRequest {
385387 */
386388export interface UploadBlobResponse {
387389}
388- /**
389- * @generated from protobuf enum polycentric.v2.ContentDigestType
390- */
391- export enum ContentDigestType {
392- /**
393- * @generated from protobuf enum value: CONTENT_DIGEST_TYPE_UNSPECIFIED = 0;
394- */
395- UNSPECIFIED = 0 ,
396- /**
397- * @generated from protobuf enum value: CONTENT_DIGEST_TYPE_SHA256 = 1;
398- */
399- SHA256 = 1
400- }
401390/**
402391 * @generated from protobuf enum polycentric.v2.ReportCategory
403392 */
@@ -436,61 +425,6 @@ export enum ReportCategory {
436425 SERVER_POLICY = 7
437426}
438427// @generated message type with reflection information, may provide speed optimized methods
439- class ContentDigest$Type extends MessageType < ContentDigest > {
440- constructor ( ) {
441- super ( "polycentric.v2.ContentDigest" , [
442- { no : 1 , name : "type" , kind : "enum" , T : ( ) => [ "polycentric.v2.ContentDigestType" , ContentDigestType , "CONTENT_DIGEST_TYPE_" ] } ,
443- { no : 2 , name : "value" , kind : "scalar" , T : 12 /*ScalarType.BYTES*/ }
444- ] ) ;
445- }
446- create ( value ?: PartialMessage < ContentDigest > ) : ContentDigest {
447- const message = globalThis . Object . create ( ( this . messagePrototype ! ) ) ;
448- message . type = 0 ;
449- message . value = new Uint8Array ( 0 ) ;
450- if ( value !== undefined )
451- reflectionMergePartial < ContentDigest > ( this , message , value ) ;
452- return message ;
453- }
454- internalBinaryRead ( reader : IBinaryReader , length : number , options : BinaryReadOptions , target ?: ContentDigest ) : ContentDigest {
455- let message = target ?? this . create ( ) , end = reader . pos + length ;
456- while ( reader . pos < end ) {
457- let [ fieldNo , wireType ] = reader . tag ( ) ;
458- switch ( fieldNo ) {
459- case /* polycentric.v2.ContentDigestType type */ 1 :
460- message . type = reader . int32 ( ) ;
461- break ;
462- case /* bytes value */ 2 :
463- message . value = reader . bytes ( ) ;
464- break ;
465- default :
466- let u = options . readUnknownField ;
467- if ( u === "throw" )
468- throw new globalThis . Error ( `Unknown field ${ fieldNo } (wire type ${ wireType } ) for ${ this . typeName } ` ) ;
469- let d = reader . skip ( wireType ) ;
470- if ( u !== false )
471- ( u === true ? UnknownFieldHandler . onRead : u ) ( this . typeName , message , fieldNo , wireType , d ) ;
472- }
473- }
474- return message ;
475- }
476- internalBinaryWrite ( message : ContentDigest , writer : IBinaryWriter , options : BinaryWriteOptions ) : IBinaryWriter {
477- /* polycentric.v2.ContentDigestType type = 1; */
478- if ( message . type !== 0 )
479- writer . tag ( 1 , WireType . Varint ) . int32 ( message . type ) ;
480- /* bytes value = 2; */
481- if ( message . value . length )
482- writer . tag ( 2 , WireType . LengthDelimited ) . bytes ( message . value ) ;
483- let u = options . writeUnknownFields ;
484- if ( u !== false )
485- ( u == true ? UnknownFieldHandler . onWrite : u ) ( this . typeName , message , writer ) ;
486- return writer ;
487- }
488- }
489- /**
490- * @generated MessageType for protobuf message polycentric.v2.ContentDigest
491- */
492- export const ContentDigest = new ContentDigest$Type ( ) ;
493- // @generated message type with reflection information, may provide speed optimized methods
494428class Content$Type extends MessageType < Content > {
495429 constructor ( ) {
496430 super ( "polycentric.v2.Content" , [
@@ -503,7 +437,9 @@ class Content$Type extends MessageType<Content> {
503437 { no : 8 , name : "identity" , kind : "message" , oneof : "contentBody" , T : ( ) => Identity } ,
504438 { no : 9 , name : "repost" , kind : "message" , oneof : "contentBody" , T : ( ) => Repost } ,
505439 { no : 10 , name : "report" , kind : "message" , oneof : "contentBody" , T : ( ) => Report } ,
506- { no : 11 , name : "labels" , kind : "message" , oneof : "contentBody" , T : ( ) => Labels }
440+ { no : 11 , name : "labels" , kind : "message" , oneof : "contentBody" , T : ( ) => Labels } ,
441+ { no : 12 , name : "verification_claim" , kind : "message" , oneof : "contentBody" , T : ( ) => VerificationClaim } ,
442+ { no : 13 , name : "verification_verify" , kind : "message" , oneof : "contentBody" , T : ( ) => VerificationVerify }
507443 ] ) ;
508444 }
509445 create ( value ?: PartialMessage < Content > ) : Content {
@@ -578,6 +514,18 @@ class Content$Type extends MessageType<Content> {
578514 labels : Labels . internalBinaryRead ( reader , reader . uint32 ( ) , options , ( message . contentBody as any ) . labels )
579515 } ;
580516 break ;
517+ case /* polycentric.v2.VerificationClaim verification_claim */ 12 :
518+ message . contentBody = {
519+ oneofKind : "verificationClaim" ,
520+ verificationClaim : VerificationClaim . internalBinaryRead ( reader , reader . uint32 ( ) , options , ( message . contentBody as any ) . verificationClaim )
521+ } ;
522+ break ;
523+ case /* polycentric.v2.VerificationVerify verification_verify */ 13 :
524+ message . contentBody = {
525+ oneofKind : "verificationVerify" ,
526+ verificationVerify : VerificationVerify . internalBinaryRead ( reader , reader . uint32 ( ) , options , ( message . contentBody as any ) . verificationVerify )
527+ } ;
528+ break ;
581529 default :
582530 let u = options . readUnknownField ;
583531 if ( u === "throw" )
@@ -620,6 +568,12 @@ class Content$Type extends MessageType<Content> {
620568 /* polycentric.v2.Labels labels = 11; */
621569 if ( message . contentBody . oneofKind === "labels" )
622570 Labels . internalBinaryWrite ( message . contentBody . labels , writer . tag ( 11 , WireType . LengthDelimited ) . fork ( ) , options ) . join ( ) ;
571+ /* polycentric.v2.VerificationClaim verification_claim = 12; */
572+ if ( message . contentBody . oneofKind === "verificationClaim" )
573+ VerificationClaim . internalBinaryWrite ( message . contentBody . verificationClaim , writer . tag ( 12 , WireType . LengthDelimited ) . fork ( ) , options ) . join ( ) ;
574+ /* polycentric.v2.VerificationVerify verification_verify = 13; */
575+ if ( message . contentBody . oneofKind === "verificationVerify" )
576+ VerificationVerify . internalBinaryWrite ( message . contentBody . verificationVerify , writer . tag ( 13 , WireType . LengthDelimited ) . fork ( ) , options ) . join ( ) ;
623577 let u = options . writeUnknownFields ;
624578 if ( u !== false )
625579 ( u == true ? UnknownFieldHandler . onWrite : u ) ( this . typeName , message , writer ) ;
0 commit comments