Expand description
EIP-712 typed-data hashing and signing for Derive self-custodial actions.
action_hash = keccak256(abi.encode(
[bytes32, uint256, uint256, address, bytes32, uint256, address, address],
[ACTION_TYPEHASH, subaccount_id, nonce, module_address,
keccak256(module_data_abi_encoded), signature_expiry_sec, owner, signer],
))
typed_data_hash = keccak256(0x1901 || DOMAIN_SEPARATOR || action_hash)
signature = secp256k1_sign(typed_data_hash, signer_key)Structs§
- Action
Context - Inputs to the EIP-712 action hash, common across all module variants.
- Signed
Action - A self-custodial action ready to be sent to the venue once signed.
Enums§
- Typed
Data Error - Errors raised while building or signing an EIP-712 action.
Functions§
- compute_
action_ hash - Computes the EIP-712 action hash for a Derive self-custodial action.
- compute_
typed_ data_ hash - Composes the final EIP-712 typed-data hash to be signed by the session key.