@@ -63,7 +63,6 @@ interface SignMessageResponse extends BaseLedgerResponse {
63
63
field : string | null ;
64
64
scalar : string | null ;
65
65
raw_signature ?: string | null ;
66
- signed_message ?: string | null ;
67
66
}
68
67
69
68
export class MinaApp extends BaseApp {
@@ -306,7 +305,6 @@ export class MinaApp extends BaseApp {
306
305
field : null ,
307
306
scalar : null ,
308
307
raw_signature : null ,
309
- signed_message : null ,
310
308
returnCode : "-6" ,
311
309
message : "Message is empty" ,
312
310
} ;
@@ -316,7 +314,6 @@ export class MinaApp extends BaseApp {
316
314
field : null ,
317
315
scalar : null ,
318
316
raw_signature : null ,
319
- signed_message : null ,
320
317
returnCode : "-7" ,
321
318
message : "Message too long" ,
322
319
} ;
@@ -350,37 +347,15 @@ export class MinaApp extends BaseApp {
350
347
351
348
const response = processResponse ( responseBuffer ) ;
352
349
353
- // Validate minimum buffer length (64 bytes for signature + 1 byte for message length)
354
- if ( response . length ( ) < 65 ) {
355
- throw new Error ( "Response buffer too short" ) ;
356
- }
357
-
358
- // First read the signature (64 bytes)
359
350
const signature = response . readBytes ( 64 ) . toString ( "hex" ) ;
360
351
const sigLength = signature . length ;
361
352
const field_extracted = signature . substring ( 0 , sigLength / 2 ) ;
362
353
const scalar_extracted = signature . substring ( sigLength / 2 , sigLength ) ;
363
354
364
- // Then read the message length (1 byte)
365
- const messageLength = response . readBytes ( 1 ) . readUInt8 ( ) ;
366
-
367
- // Validate remaining buffer length against message length
368
- if ( response . length ( ) < messageLength ) {
369
- throw new Error (
370
- `Response buffer too short for message: expected ${ messageLength } bytes but only ${ response . length ( ) } remaining` ,
371
- ) ;
372
- }
373
-
374
- // Finally read the message
375
- const returnedMessage = response
376
- . readBytes ( messageLength )
377
- . toString ( "utf8" ) ;
378
-
379
355
return {
380
356
field : BigInt ( "0x" + field_extracted ) . toString ( ) ,
381
357
scalar : BigInt ( "0x" + scalar_extracted ) . toString ( ) ,
382
358
raw_signature : signature ,
383
- signed_message : returnedMessage ,
384
359
returnCode : "9000" ,
385
360
} ;
386
361
} catch ( e ) {
@@ -389,7 +364,6 @@ export class MinaApp extends BaseApp {
389
364
field : null ,
390
365
scalar : null ,
391
366
raw_signature : null ,
392
- signed_message : null ,
393
367
returnCode : respError . returnCode . toString ( ) ,
394
368
message : respError . errorMessage ,
395
369
} ;
0 commit comments