signTypedData
Signs a transaction with the current signer according to the EIP-712.
Usage
_22import {_22 MetaTransactionData,_22 OperationType_22} from '@safe-global/types-kit'_22import { protocolKit } from './setup.ts'_22_22const transactions: MetaTransactionData[] = [{_22 to: '0x...',_22 value: '123',_22 data: '0x',_22 operation: OperationType.Call // Optional_22}]_22const eip712Data = await protocolKit.createTransaction({_22 transactions_22})_22_22const methodVersion = 'v4'_22_22const signature = await protocolKit.signTypedData(_22 eip712Data,_22 methodVersion // Optional_22)
Parameters
eip712Data
The Safe transaction or message to sign.
_10const signature = await protocolKit.signTypedData(_10 eip712Data_10)
methodVersion
(Optional)
- Type:
'v3' | 'v4'
The EIP-712 version to use.
_10const signature = await protocolKit.signTypedData(_10 eip712Data,_10 'v4'_10)
Returns
Promise<SafeSignature>
The Safe signature.