Skip to content

formatSignatures

Formats a collection of Signature objects into a single aggregated signature. The format is in the form of EOA_SIGS | CONTRACT_SIG_DATAS. The signatures are ordered by signer address. The EOA SIGS contain the 65 signautre data for EOA signers and 65 bytes containing SIGNER | OFFSET | V for contract signers. The OFFSET is used to fetch the signature data from the CONTRACT_SIG_DATAS.

Import

import { formatSignatures } from "@account-kit/smart-contracts";

Parameters

signatures

Signature[] the array of Signature objects to combine into the correct aggregated signature format excluding the upper limits

usingMaxValues

boolean a boolean indicating wether or not the UserOperation is using the UPPER_LIMIT for the gas and fee values

Returns

Hex the Hex representation of the signature