File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,6 @@ const PUBKEY_LEN = 32;
77const MAGIC_LEN = 4 ;
88const MESSAGE_SIZE_LEN = 2 ;
99
10- const readUint16LE = ( data : Uint8Array , offset : number ) => {
11- // @ts -expect-error - crashes if offset is out of bounds
12- return data [ offset ] | ( data [ offset + 1 ] << 8 ) ;
13- } ;
14-
1510const ED25519_INSTRUCTION_LAYOUT = BufferLayout . struct <
1611 Readonly < {
1712 messageDataOffset : number ;
@@ -37,7 +32,7 @@ const ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<
3732] ) ;
3833
3934export const createEd25519Instruction = (
40- message : Uint8Array ,
35+ message : Buffer ,
4136 instructionIndex : number ,
4237 startingOffset : number
4338) => {
@@ -46,8 +41,7 @@ export const createEd25519Instruction = (
4641 const messageDataSizeOffset = publicKeyOffset + PUBKEY_LEN ;
4742 const messageDataOffset = messageDataSizeOffset + MESSAGE_SIZE_LEN ;
4843
49- const messageDataSize = readUint16LE (
50- message ,
44+ const messageDataSize = message . readUInt16LE (
5145 messageDataSizeOffset - startingOffset
5246 ) ;
5347
You can’t perform that action at this time.
0 commit comments