pub enum TransactionType {
Show 25 variants
Transfer {
amount: u128,
},
ContractDeploy {
code: Vec<u8>,
args: Vec<u8>,
},
ContractCall {
function: String,
args: Vec<u8>,
},
AgentRegister {
config: Vec<u8>,
},
AgentExecute {
task: Vec<u8>,
},
ModelInference {
model_id: String,
input: Vec<u8>,
},
TeeProviderRegister {
attestation: Vec<u8>,
info: Vec<u8>,
},
ProviderStake {
amount: u128,
provider_type: String,
},
ProviderUnstake {
amount: u128,
},
GovernancePropose {
proposal: Vec<u8>,
},
GovernanceVote {
proposal_id: String,
vote: bool,
},
BridgeTransfer {
target_chain: String,
target_address: String,
amount: u128,
},
CreateEscrow {
payee: Address,
amount: u128,
asset_id: AssetId,
expires_at: u64,
release_conditions: ReleaseConditions,
},
ReleaseEscrow {
escrow_id: [u8; 32],
proof: ServiceProof,
},
RefundEscrow {
escrow_id: [u8; 32],
},
PauseAgent {
agent_did: String,
controller_did: String,
reason_code: u16,
reason_text: Option<String>,
until: Option<Timestamp>,
},
QuarantineAgent {
agent_did: String,
controller_did: String,
reason_code: u16,
reason_text: Option<String>,
evidence_hash: Option<[u8; 32]>,
},
TerminateAgent {
agent_did: String,
controller_did: String,
reason_code: u16,
slash_bps: u16,
cascade: bool,
},
PostAgentBond {
agent_did: String,
controller_did: String,
amount: u128,
},
IncreaseAgentBond {
agent_did: String,
amount: u128,
},
WithdrawAgentBond {
agent_did: String,
},
PayInsuranceClaim {
claim_id_hex: String,
claimant: Address,
amount: u128,
},
RegisterValidator {
consensus_pubkey: Vec<u8>,
pq_pubkey: Vec<u8>,
bls_pubkey: Vec<u8>,
withdrawal_address: Address,
self_stake: u128,
metadata_uri: String,
},
ExitValidator,
UpdateValidatorMetadata {
metadata_uri: Option<String>,
tee_attestation_hash: Option<[u8; 32]>,
},
}Expand description
The type and payload of a transaction.
Different transaction types enable different operations on Tenzro Network.
Uses serde’s default externally-tagged enum representation
({"Transfer": {...}} in JSON, u32 discriminant + payload in bincode).
Adjacently-tagged form (#[serde(tag = "type", content = "data")]) is
incompatible with bincode 1.x — see tenzro_network::message::MessagePayload.
Variants§
Transfer
Transfer TNZO tokens
ContractDeploy
Deploy a smart contract
ContractCall
Call a smart contract
AgentRegister
Register an AI agent
AgentExecute
Execute an agent task
ModelInference
Request model inference
TeeProviderRegister
Register as a TEE provider
ProviderStake
Stake tokens for provider operations
ProviderUnstake
Unstake tokens
GovernancePropose
Submit a governance proposal
GovernanceVote
Vote on a governance proposal
BridgeTransfer
Initiate a bridge transfer
Fields
CreateEscrow
Create a new escrow account, locking funds from the payer
The escrow_id is derived deterministically by the VM as
SHA-256("tenzro/escrow/id" || payer || nonce_le) and the funds are
transferred to a vault address derived as
Address(SHA-256("tenzro/escrow/vault" || escrow_id)[..20]).
Authorization: tx.from must equal the payer (enforced by signature verification).
Fields
release_conditions: ReleaseConditionsConditions for releasing funds to the payee
ReleaseEscrow
Release escrowed funds to the payee with a proof of service
Authorization: tx.from must equal the original payer.
Fields
proof: ServiceProofProof satisfying the escrow’s release conditions
RefundEscrow
Refund escrowed funds to the payer
Authorization: tx.from must equal the original payer AND the escrow must
either be expired or use Timeout/Custom release conditions.
PauseAgent
Pause an agent (Agent-Swarm Spec 1, tier 1).
Reversible state. Agent stops accepting new tasks; existing obligations are honored under the pause-bypass allow-list. Stake untouched. Inbound payments still permitted; outbound payments blocked.
Authorization: tx.from MUST equal the agent’s controller DID
(or hold a DelegationScope.allowed_operations entry of
pause_agent). Network-initiated pauses are not allowed — escalate
to Quarantine instead.
Fields
QuarantineAgent
Quarantine an agent (Agent-Swarm Spec 1, tier 2).
Reversible only after evidence review. Inbound + outbound payments blocked. Stake frozen — cannot withdraw, cannot earn rewards. Existing tasks halt.
Authorization: controller (as PauseAgent), OR slashing-committee
quorum via StakingSlashingCallback, OR governance proposal.
Fields
TerminateAgent
Terminate an agent (Agent-Swarm Spec 1, tier 3).
Irreversible. Identity revoked via the underlying
revoke_did primitive. Stake/bond slashed by slash_bps capped
at the governance slash_bps_cap. With cascade=true, all
descendants under the agent’s children: index are terminated
recursively (depth-bounded by cascade_max_depth, default 32).
Authorization: controller, OR governance proposal with timelock, OR cascade=true descended from a parent’s TerminateAgent.
Fields
PostAgentBond
Post a fresh AgentBond for agent_did (Agent-Swarm Spec 9).
Locks amount TNZO from tx.from (the controller wallet) into
the bond vault derived as
Address(SHA-256("tenzro/agent-bond/vault" || agent_did)). The
bond enters BondLifecycle::Active and promotes the agent to the
Delegated admission lane while ≥ bond_min_for_promotion.
Authorization: tx.from is the controller; the VM enforces that
the agent_did either has no prior bond or its prior bond is in a
terminal state (Returned / Slashed).
Fields
IncreaseAgentBond
Top up an existing Active AgentBond by amount.
Authorization: tx.from MUST equal the original poster (the
bond’s controller field).
Fields
WithdrawAgentBond
Initiate the cooldown timer on an Active AgentBond. Funds are
not released by the VM — finalisation happens off-VM via the
node-side BondManager once cooldown_ms has elapsed.
Authorization: tx.from MUST equal the bond’s controller.
PayInsuranceClaim
Pay out an Approved insurance claim from the insurance pool
vault to the claimant. The off-chain BondManager has already
validated the claim and reserved funds; this transaction performs
the on-chain transfer and persists a paid_claim:<claim_id>
marker so the same claim cannot be paid twice.
Authorization: governance committee (or tx.from matching the
configured insurance-pool admin DID).
Fields
RegisterValidator
Register the signing wallet as a Candidate validator (Dynamic Validator Set, 2026-SOTA permissionless join).
On execution the VM emits a ValidatorRegister typed log carrying
from || stake_le || consensus_pubkey || pq_pubkey || withdrawal_address || metadata_uri. The node-side ValidatorRegistry consumes the log and
inserts a Candidate entry that becomes PendingActive at the next
epoch boundary if self_stake >= min_self_stake and the activation
churn budget admits it; the EpochManager then promotes it to Active
ACTIVATION_EFFECTIVE_DELAY_BLOCKS after the boundary block.
Authorization: tx.from is the validator’s stake-owning wallet. The
classical Ed25519 signature in SignedTransaction::signature proves
control of consensus_pubkey, the ML-DSA-65 leg proves control of
pq_pubkey, and the BLS leg proves control of bls_pubkey.
Fields
bls_pubkey: Vec<u8>48-byte BLS12-381 G1-compressed verifying key (min_pk scheme).
Mandatory third leg, used by HotStuff-2 to aggregate per-vote
signatures into a single QC-level aggregate.
ExitValidator
Voluntarily exit the active set (Dynamic Validator Set).
The VM emits a ValidatorExit log; the registry transitions the entry
to PendingExit and the next epoch boundary stages it for removal —
effective ACTIVATION_EFFECTIVE_DELAY_BLOCKS after that boundary
block. Re-registration is blocked for reentry_cooldown_epochs (default
4) following voluntary exit.
Authorization: tx.from MUST equal the validator’s registry address.
UpdateValidatorMetadata
Update validator metadata (moniker / TEE attestation commitment).
At least one of metadata_uri or tee_attestation_hash should be
Some; the registry treats None as “no change”. tee_attestation_hash
is the 32-byte SHA-256 commitment to a fresh attestation document — the
active-set boundary applies the TEE multiplier from this commitment.
Authorization: tx.from MUST equal the validator’s registry address.
Trait Implementations§
Source§impl Clone for TransactionType
impl Clone for TransactionType
Source§fn clone(&self) -> TransactionType
fn clone(&self) -> TransactionType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransactionType
impl Debug for TransactionType
Source§impl<'de> Deserialize<'de> for TransactionType
impl<'de> Deserialize<'de> for TransactionType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for TransactionType
Source§impl PartialEq for TransactionType
impl PartialEq for TransactionType
Source§fn eq(&self, other: &TransactionType) -> bool
fn eq(&self, other: &TransactionType) -> bool
self and other values to be equal, and is used by ==.