@@ -1203,8 +1203,8 @@ export class portal {
12031203 params : [ string , [ string , string ] [ ] ] ,
12041204 ) : Promise < string | ReturnType < typeof this . _history . sendOffer > > {
12051205 const [ enrHex , contentItems ] = params
1206- const contentKeys = contentItems . map ( ( item ) => hexToBytes ( item [ 0 ] ) )
1207- const contentValues = contentItems . map ( ( item ) => hexToBytes ( item [ 1 ] ) )
1206+ const contentKeys = contentItems . map ( ( item ) => hexToBytes ( item [ 0 ] as `0x${ string } ` ) )
1207+ const contentValues = contentItems . map ( ( item ) => hexToBytes ( item [ 1 ] as `0x${ string } ` ) )
12081208 const enr = ENR . decodeTxt ( enrHex )
12091209 if ( this . _history . routingTable . getWithPending ( enr . nodeId ) ?. value === undefined ) {
12101210 const res = await this . _history . sendPing ( enr )
@@ -1219,8 +1219,8 @@ export class portal {
12191219 params : [ string , [ string , string ] [ ] ] ,
12201220 ) : Promise < string | ReturnType < typeof this . _state . sendOffer > > {
12211221 const [ enrHex , contentItems ] = params
1222- const contentKeys = contentItems . map ( ( item ) => hexToBytes ( item [ 0 ] ) )
1223- const contentValues = contentItems . map ( ( item ) => hexToBytes ( item [ 1 ] ) )
1222+ const contentKeys = contentItems . map ( ( item ) => hexToBytes ( item [ 0 ] as `0x${ string } ` ) )
1223+ const contentValues = contentItems . map ( ( item ) => hexToBytes ( item [ 1 ] as `0x${ string } ` ) )
12241224 const enr = ENR . decodeTxt ( enrHex )
12251225 if ( this . _state . routingTable . getWithPending ( enr . nodeId ) ?. value === undefined ) {
12261226 const res = await this . _state . sendPing ( enr )
@@ -1235,8 +1235,8 @@ export class portal {
12351235 params : [ string , [ string , string ] [ ] ] ,
12361236 ) : Promise < string | ReturnType < typeof this . _beacon . sendOffer > > {
12371237 const [ enrHex , contentItems ] = params
1238- const contentKeys = contentItems . map ( ( item ) => hexToBytes ( item [ 0 ] ) )
1239- const contentValues = contentItems . map ( ( item ) => hexToBytes ( item [ 1 ] ) )
1238+ const contentKeys = contentItems . map ( ( item ) => hexToBytes ( item [ 0 ] as `0x${ string } ` ) )
1239+ const contentValues = contentItems . map ( ( item ) => hexToBytes ( item [ 1 ] as `0x${ string } ` ) )
12401240 const enr = ENR . decodeTxt ( enrHex )
12411241 if ( this . _beacon . routingTable . getWithPending ( enr . nodeId ) ?. value === undefined ) {
12421242 const res = await this . _beacon . sendPing ( enr )
@@ -1253,8 +1253,8 @@ export class portal {
12531253 params : [ string , [ string , string ] [ ] ] ,
12541254 ) : Promise < { success ?: boolean [ ] ; declined ?: boolean ; failed ?: boolean } > {
12551255 const [ enrHex , contentItems ] = params
1256- const contentKeys = contentItems . map ( ( item ) => hexToBytes ( item [ 0 ] ) )
1257- const contentValues = contentItems . map ( ( item ) => hexToBytes ( item [ 1 ] ) )
1256+ const contentKeys = contentItems . map ( ( item ) => hexToBytes ( item [ 0 ] as `0x${ string } ` ) )
1257+ const contentValues = contentItems . map ( ( item ) => hexToBytes ( item [ 1 ] as `0x${ string } ` ) )
12581258 const enr = ENR . decodeTxt ( enrHex )
12591259
12601260 try {
@@ -1277,8 +1277,8 @@ export class portal {
12771277 params : [ string , [ string , string ] [ ] ] ,
12781278 ) : Promise < { success ?: boolean [ ] ; declined ?: boolean ; failed ?: boolean } > {
12791279 const [ enrHex , contentItems ] = params
1280- const contentKeys = contentItems . map ( ( item ) => hexToBytes ( item [ 0 ] ) )
1281- const contentValues = contentItems . map ( ( item ) => hexToBytes ( item [ 1 ] ) )
1280+ const contentKeys = contentItems . map ( ( item ) => hexToBytes ( item [ 0 ] as `0x${ string } ` ) )
1281+ const contentValues = contentItems . map ( ( item ) => hexToBytes ( item [ 1 ] as `0x${ string } ` ) )
12821282 const enr = ENR . decodeTxt ( enrHex )
12831283
12841284 try {
@@ -1301,8 +1301,8 @@ export class portal {
13011301 params : [ string , [ string , string ] [ ] ] ,
13021302 ) : Promise < { success ?: boolean [ ] ; declined ?: boolean ; failed ?: boolean } > {
13031303 const [ enrHex , contentItems ] = params
1304- const contentKeys = contentItems . map ( ( item ) => hexToBytes ( item [ 0 ] ) )
1305- const contentValues = contentItems . map ( ( item ) => hexToBytes ( item [ 1 ] ) )
1304+ const contentKeys = contentItems . map ( ( item ) => hexToBytes ( item [ 0 ] as `0x${ string } ` ) )
1305+ const contentValues = contentItems . map ( ( item ) => hexToBytes ( item [ 1 ] as `0x${ string } ` ) )
13061306 const enr = ENR . decodeTxt ( enrHex )
13071307
13081308 try {
0 commit comments