# Appendix¶

## Signature Extraction¶

Data that are sent to TwoFactorBase contracts must strictly adhere to the following format.

dynamically-sized 32 bytes 65 bytes

Transaction data that are in compliance with the above format is then divided into three parts using the formula described below:

• Deadline = Data [len-97 : len-65]

This is the given deadline of a transaction, which reverts at block.timestamp > deadline.

• Signature = Data [-65]

The relayer signature can be simply extracting by slicing out the last 65-bytes of msg.data.

• Calldata = Data [0 : len-97]

The actual calldata is the entire msg.data excluding the last 97-byte.

## 2FA Message¶

The message is a hash of the encoded structure, as defined by the following:

bytes32 hash = keccak256(
abi.encode(
uint256 chainId,
uint256 walletNonce,
bytes32 domain_name_hash,