Skip to main content

Function: fromSignedOperation()

function fromSignedOperation(operation): SignedOperation;

Defined in: evm-client/src/utils.ts:377

Core's SignedOperation as the authorization envelope every *Signed entry point takes.

Three fields go over the wire and two do not, which is the whole of the difference between how the two chains verify a delegated call:

  • expiry widens to the struct's uint64, unchanged in meaning.
  • salt becomes nonce. Core keys its replay guard on the raw 32 bytes and the contract on a uint256, but they are the same bytes: intentDigest packs the nonce with abi.encodePacked, i.e. big-endian, which is the order slot(salt) writes it in the shared preimage. Reading the salt big-endian here is therefore not a choice — the two digests agree only if it is, and a byte-swapped nonce would fail as UnauthorizedSigner with nothing to point at.
  • signature passes through verbatim.
  • signingKey and digest are dropped. Core recovers the signer from the signature (ECDSA.recover) and recomputes the digest itself, so neither is an input — and neither can be trusted as one, which is why the contract does not take them. Solana, having no ed25519 syscall, has to send both.

Parameters​

ParameterType
operationSignedOperation

Returns​

SignedOperation

Throws​

when signature is not a recoverable secp256k1 signature. This is the one wrong-curve case worth catching eagerly: core's own OvercastProtocolSigner is ed25519, and an operation signed by it is a perfectly well-formed SignedOperation that no EVM deployment can ever verify. Its 64-byte signature would revert inside the recovery with ECDSAInvalidSignatureLength — a submitted, gas-burning transaction, and a confusing one, when the mistake is decidable from the length alone right here.