Tooling
Module SDK
Accounts API
encode1271Signature

⚠️ Deprecation Notice

ModuleSDK was developed by Rhinestone and is no longer actively supported. For new projects, we recommend using the Rhinestone SDK instead.

Rhinestone SDK Documentation (opens in a new tab)

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.