ModuleSDK
Accounts
encode1271Signature

encode1271Signature

Encodes a 1271 signature for the account type. This is the signature that should then be verified onchain.

Usage

const signature = encode1271Signature({
  account: getAccount({address: '0x1234...', type: "safe"}),
  validator: OWNABLE_VALIDATOR_ADDRESS,
  signature: '0xabcd...',
})

Parameters

account

The address of the account to validate the 1271 signature.

validator

The address of the validator to validate the 1271 signature.

signature

The signature to encode.

Returns

encodedSignature

The encoded 1271 signature.