Off-chain signing of operations that a contract verifies on chain.
A signed operation is a #[contract_type] payload plus the fields that stop
its signature being replayed: the network, the verifying contract, and a
signer-chosen (nonce, expiry height) pair the contract consumes once.
defineSignedOperation binds a payload type from a generated
binding's spec and produces the Operation and signature the contract's
execute_signed_op expects; randomNonce picks a nonce without
reading anything on chain.
SignedOp is the generated binding of the SignedOp standard
interface, and thruput_signed_op_if holds the types and error
values its crate declares (thruput_signed_op_if.v0_1.error.SignedOpError).
SignedOp.v0_1.executeSignedOp verifies an operation, consumes its pair, and
mints the one auth token the operation authorizes. Tokens never travel in
return data, so a client decodes it as a SignedToken placeholder; it is
the calling contract that consumes it on chain. Most applications submit an
operation through the entrypoint of the contract that does so, passing the
SignedOperation that defineSignedOperation produces.
The bytes signed are defined by the Rust thruput-domain-separator
crate's SignedOp and verified by the thruput-signed-op component.
Off-chain signing of operations that a contract verifies on chain.
A signed operation is a
#[contract_type]payload plus the fields that stop its signature being replayed: the network, the verifying contract, and a signer-chosen(nonce, expiry height)pair the contract consumes once. defineSignedOperation binds a payload type from a generated binding's spec and produces theOperationand signature the contract'sexecute_signed_opexpects; randomNonce picks a nonce without reading anything on chain.SignedOp is the generated binding of the
SignedOpstandard interface, and thruput_signed_op_if holds the types and error values its crate declares (thruput_signed_op_if.v0_1.error.SignedOpError).SignedOp.v0_1.executeSignedOpverifies an operation, consumes its pair, and mints the one auth token the operation authorizes. Tokens never travel in return data, so a client decodes it as aSignedTokenplaceholder; it is the calling contract that consumes it on chain. Most applications submit an operation through the entrypoint of the contract that does so, passing the SignedOperation that defineSignedOperation produces.The bytes signed are defined by the Rust
thruput-domain-separatorcrate'sSignedOpand verified by thethruput-signed-opcomponent.