Secp256k1Layout.fromEthAddress constructor
Secp256k1Layout.fromEthAddress({})
Create an secp256k1 layout with an Ethereum address.
Implementation
factory Secp256k1Layout.fromEthAddress(
{required ETHAddress address,
required List<int> message,
required List<int> signature,
required int recoveryId,
int instructionIndex = 0}) {
final int ethAddressOffset = 12;
final int signatureOffset = ethAddressOffset + ETHAddress.lengthInBytes;
return Secp256k1Layout(
ethAddress: address,
numSignatures: 1,
signatureOffset: signatureOffset,
signatureInstructionIndex: instructionIndex,
ethAddressOffset: ethAddressOffset,
ethAddressInstructionIndex: instructionIndex,
messageDataOffset: signatureOffset + signature.length + 1,
messageDataSize: message.length,
messageInstructionIndex: instructionIndex,
message: message,
signature: signature,
recoveryId: recoveryId);
}