fix: add TypeScript buffer type to secp256k1-program.ts

This commit is contained in:
steveluscher 2022-03-23 17:10:16 -07:00 committed by Steven Luscher
parent 96361295aa
commit 6bb02cdcc1
1 changed files with 15 additions and 1 deletions

View File

@ -46,7 +46,21 @@ export type CreateSecp256k1InstructionWithPrivateKeyParams = {
instructionIndex?: number;
};
const SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct([
const SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<
Readonly<{
ethAddress: Uint8Array;
ethAddressInstructionIndex: number;
ethAddressOffset: number;
messageDataOffset: number;
messageDataSize: number;
messageInstructionIndex: number;
numSignatures: number;
recoveryId: number;
signature: Uint8Array;
signatureInstructionIndex: number;
signatureOffset: number;
}>
>([
BufferLayout.u8('numSignatures'),
BufferLayout.u16('signatureOffset'),
BufferLayout.u8('signatureInstructionIndex'),