@@ -27,11 +27,11 @@ export interface InitialPairingSession {
2727 */
2828 issuerIdentity : string ;
2929 /**
30- * Creation timestamp in unix milliseconds .
30+ * Timestamp so that the pairing session id is unique .
3131 *
32- * @generated from protobuf field: int64 created_at = 2
32+ * @generated from protobuf field: int64 timestamp = 2
3333 */
34- createdAt : bigint ;
34+ timestamp : bigint ;
3535}
3636/**
3737 * *
@@ -53,7 +53,7 @@ export interface JoinPairingSessionBody {
5353 */
5454export interface PairingSession {
5555 /**
56- * Signature of the signed InitialPairingSession payload.
56+ * Signature of the signed InitialPairingSession payload; serves as the session id .
5757 *
5858 * @generated from protobuf field: string pairing_session_signature = 1
5959 */
@@ -65,11 +65,11 @@ export interface PairingSession {
6565 */
6666 signedBy ?: PublicKey ;
6767 /**
68- * Session metadata .
68+ * Identity key the session was created for .
6969 *
70- * @generated from protobuf field: polycentric.v2.InitialPairingSession initial_session = 3
70+ * @generated from protobuf field: string issuer_identity = 3
7171 */
72- initialSession ?: InitialPairingSession ;
72+ issuerIdentity : string ;
7373 /**
7474 * Expiration timestamp in unix milliseconds.
7575 *
@@ -82,6 +82,12 @@ export interface PairingSession {
8282 * @generated from protobuf field: repeated polycentric.v2.PublicKey claimer_pubkeys = 5
8383 */
8484 claimerPubkeys : PublicKey [ ] ;
85+ /**
86+ * Server-authoritative creation timestamp in unix milliseconds.
87+ *
88+ * @generated from protobuf field: int64 created_at = 6
89+ */
90+ createdAt : bigint ;
8591}
8692/**
8793 * *
@@ -160,13 +166,13 @@ class InitialPairingSession$Type extends MessageType<InitialPairingSession> {
160166 constructor ( ) {
161167 super ( "polycentric.v2.InitialPairingSession" , [
162168 { no : 1 , name : "issuer_identity" , kind : "scalar" , T : 9 /*ScalarType.STRING*/ } ,
163- { no : 2 , name : "created_at " , kind : "scalar" , T : 3 /*ScalarType.INT64*/ , L : 0 /*LongType.BIGINT*/ }
169+ { no : 2 , name : "timestamp " , kind : "scalar" , T : 3 /*ScalarType.INT64*/ , L : 0 /*LongType.BIGINT*/ }
164170 ] ) ;
165171 }
166172 create ( value ?: PartialMessage < InitialPairingSession > ) : InitialPairingSession {
167173 const message = globalThis . Object . create ( ( this . messagePrototype ! ) ) ;
168174 message . issuerIdentity = "" ;
169- message . createdAt = 0n ;
175+ message . timestamp = 0n ;
170176 if ( value !== undefined )
171177 reflectionMergePartial < InitialPairingSession > ( this , message , value ) ;
172178 return message ;
@@ -179,8 +185,8 @@ class InitialPairingSession$Type extends MessageType<InitialPairingSession> {
179185 case /* string issuer_identity */ 1 :
180186 message . issuerIdentity = reader . string ( ) ;
181187 break ;
182- case /* int64 created_at */ 2 :
183- message . createdAt = reader . int64 ( ) . toBigInt ( ) ;
188+ case /* int64 timestamp */ 2 :
189+ message . timestamp = reader . int64 ( ) . toBigInt ( ) ;
184190 break ;
185191 default :
186192 let u = options . readUnknownField ;
@@ -197,9 +203,9 @@ class InitialPairingSession$Type extends MessageType<InitialPairingSession> {
197203 /* string issuer_identity = 1; */
198204 if ( message . issuerIdentity !== "" )
199205 writer . tag ( 1 , WireType . LengthDelimited ) . string ( message . issuerIdentity ) ;
200- /* int64 created_at = 2; */
201- if ( message . createdAt !== 0n )
202- writer . tag ( 2 , WireType . Varint ) . int64 ( message . createdAt ) ;
206+ /* int64 timestamp = 2; */
207+ if ( message . timestamp !== 0n )
208+ writer . tag ( 2 , WireType . Varint ) . int64 ( message . timestamp ) ;
203209 let u = options . writeUnknownFields ;
204210 if ( u !== false )
205211 ( u == true ? UnknownFieldHandler . onWrite : u ) ( this . typeName , message , writer ) ;
@@ -263,16 +269,19 @@ class PairingSession$Type extends MessageType<PairingSession> {
263269 super ( "polycentric.v2.PairingSession" , [
264270 { no : 1 , name : "pairing_session_signature" , kind : "scalar" , T : 9 /*ScalarType.STRING*/ } ,
265271 { no : 2 , name : "signed_by" , kind : "message" , T : ( ) => PublicKey } ,
266- { no : 3 , name : "initial_session " , kind : "message " , T : ( ) => InitialPairingSession } ,
272+ { no : 3 , name : "issuer_identity " , kind : "scalar " , T : 9 /*ScalarType.STRING*/ } ,
267273 { no : 4 , name : "expires_at" , kind : "scalar" , T : 3 /*ScalarType.INT64*/ , L : 0 /*LongType.BIGINT*/ } ,
268- { no : 5 , name : "claimer_pubkeys" , kind : "message" , repeat : 2 /*RepeatType.UNPACKED*/ , T : ( ) => PublicKey }
274+ { no : 5 , name : "claimer_pubkeys" , kind : "message" , repeat : 2 /*RepeatType.UNPACKED*/ , T : ( ) => PublicKey } ,
275+ { no : 6 , name : "created_at" , kind : "scalar" , T : 3 /*ScalarType.INT64*/ , L : 0 /*LongType.BIGINT*/ }
269276 ] ) ;
270277 }
271278 create ( value ?: PartialMessage < PairingSession > ) : PairingSession {
272279 const message = globalThis . Object . create ( ( this . messagePrototype ! ) ) ;
273280 message . pairingSessionSignature = "" ;
281+ message . issuerIdentity = "" ;
274282 message . expiresAt = 0n ;
275283 message . claimerPubkeys = [ ] ;
284+ message . createdAt = 0n ;
276285 if ( value !== undefined )
277286 reflectionMergePartial < PairingSession > ( this , message , value ) ;
278287 return message ;
@@ -288,15 +297,18 @@ class PairingSession$Type extends MessageType<PairingSession> {
288297 case /* polycentric.v2.PublicKey signed_by */ 2 :
289298 message . signedBy = PublicKey . internalBinaryRead ( reader , reader . uint32 ( ) , options , message . signedBy ) ;
290299 break ;
291- case /* polycentric.v2.InitialPairingSession initial_session */ 3 :
292- message . initialSession = InitialPairingSession . internalBinaryRead ( reader , reader . uint32 ( ) , options , message . initialSession ) ;
300+ case /* string issuer_identity */ 3 :
301+ message . issuerIdentity = reader . string ( ) ;
293302 break ;
294303 case /* int64 expires_at */ 4 :
295304 message . expiresAt = reader . int64 ( ) . toBigInt ( ) ;
296305 break ;
297306 case /* repeated polycentric.v2.PublicKey claimer_pubkeys */ 5 :
298307 message . claimerPubkeys . push ( PublicKey . internalBinaryRead ( reader , reader . uint32 ( ) , options ) ) ;
299308 break ;
309+ case /* int64 created_at */ 6 :
310+ message . createdAt = reader . int64 ( ) . toBigInt ( ) ;
311+ break ;
300312 default :
301313 let u = options . readUnknownField ;
302314 if ( u === "throw" )
@@ -315,15 +327,18 @@ class PairingSession$Type extends MessageType<PairingSession> {
315327 /* polycentric.v2.PublicKey signed_by = 2; */
316328 if ( message . signedBy )
317329 PublicKey . internalBinaryWrite ( message . signedBy , writer . tag ( 2 , WireType . LengthDelimited ) . fork ( ) , options ) . join ( ) ;
318- /* polycentric.v2.InitialPairingSession initial_session = 3; */
319- if ( message . initialSession )
320- InitialPairingSession . internalBinaryWrite ( message . initialSession , writer . tag ( 3 , WireType . LengthDelimited ) . fork ( ) , options ) . join ( ) ;
330+ /* string issuer_identity = 3; */
331+ if ( message . issuerIdentity !== "" )
332+ writer . tag ( 3 , WireType . LengthDelimited ) . string ( message . issuerIdentity ) ;
321333 /* int64 expires_at = 4; */
322334 if ( message . expiresAt !== 0n )
323335 writer . tag ( 4 , WireType . Varint ) . int64 ( message . expiresAt ) ;
324336 /* repeated polycentric.v2.PublicKey claimer_pubkeys = 5; */
325337 for ( let i = 0 ; i < message . claimerPubkeys . length ; i ++ )
326338 PublicKey . internalBinaryWrite ( message . claimerPubkeys [ i ] , writer . tag ( 5 , WireType . LengthDelimited ) . fork ( ) , options ) . join ( ) ;
339+ /* int64 created_at = 6; */
340+ if ( message . createdAt !== 0n )
341+ writer . tag ( 6 , WireType . Varint ) . int64 ( message . createdAt ) ;
327342 let u = options . writeUnknownFields ;
328343 if ( u !== false )
329344 ( u == true ? UnknownFieldHandler . onWrite : u ) ( this . typeName , message , writer ) ;
0 commit comments