Skip to main content

ExecutionStep

Enum ExecutionStep 

Source
pub enum ExecutionStep {
    EvmDispatch {
        to: String,
        value: String,
        calldata_template: String,
        gas_limit: u64,
    },
    SvmDispatch {
        program_id: String,
        accounts: Vec<SvmAccountMeta>,
        instruction_data_template: String,
    },
    NodeRpc {
        method: String,
        params: Value,
    },
    BridgeTransfer {
        from_chain: String,
        to_chain: String,
        asset: String,
        amount: String,
        strategy: String,
    },
    MppPay {
        amount: String,
        asset: String,
        recipient: String,
        session_ttl_secs: Option<u64>,
    },
    X402Pay {
        resource_url: Option<String>,
        amount: String,
        asset: String,
        recipient: Option<String>,
        facilitator: Option<String>,
    },
    DamlSubmit {
        template_package: Option<String>,
        module: Option<String>,
        entity: Option<String>,
        command_variant: Option<String>,
        fields_json: Option<String>,
        template_id: Option<String>,
        choice: Option<String>,
        party: Option<String>,
        args_template: Option<String>,
    },
    ToolInvoke {
        tool_tag: String,
        method: Option<String>,
        arguments_json: Option<String>,
        params_template: Option<String>,
    },
    SkillInvoke {
        skill_tag: String,
        method: Option<String>,
        input_json: Option<String>,
        params_template: Option<String>,
    },
    ForEach {
        source_tool_tag: String,
        body: Vec<ExecutionStep>,
    },
    When {
        jmespath_expr: String,
        body: Vec<ExecutionStep>,
    },
}
Expand description

A single declarative step in an ExecutionSpec. Each variant maps directly to an existing subsystem invocation.

Template variables: any String field that contains {{name}} substrings is interpolated at run time against the agent’s context (spawn args + accumulated step output).

Variants§

§

EvmDispatch

Hand-craft an EVM transaction and dispatch it through MultiVmRuntime::execute_transaction(VmType::Evm, ...).

Fields

§to: String

20-byte hex to address (with or without 0x prefix)

§value: String

Hex-encoded u128 value

§calldata_template: String

Hex-encoded calldata template with optional {{var}} substitutions

§gas_limit: u64
§

SvmDispatch

Hand-craft a Solana-style instruction and dispatch it through MultiVmRuntime::execute_transaction(VmType::Svm, ...).

Mirrors the canonical solana_sdk::instruction::Instruction shape — a program id, a list of account metas, and an opaque instruction-data byte buffer. The executor renders the data buffer via the same {{var}} substitution rule used by EvmDispatch::calldata_template, then routes the assembled transaction to tenzro_svmDispatch (DPoP-authenticated).

Fields

§program_id: String

Base58 program id (Solana account address of the program to invoke). Substituted against the agent context at run time, so deployers may parameterize via {{program_id}}.

§accounts: Vec<SvmAccountMeta>

Ordered account metas — order matters; the program reads them positionally. Each meta names the account, whether it signs the transaction, and whether the program may mutate it. Each pubkey string supports {{var}} substitution.

§instruction_data_template: String

Hex-encoded instruction-data template. 0x prefix optional. Substituted with {{var}} before being decoded to bytes and handed to the program. The agent’s wallet public key is always implicitly the fee payer and is added as the first signer account by the node’s tenzro_svmDispatch handler — the template does not need to encode it.

§

NodeRpc

Invoke an arbitrary node JSON-RPC method with the agent’s DPoP credentials. Covers the saga tenzro_workflow* family, the task lifecycle (tenzro_postTask / tenzro_completeTask / …), tenzro_verifyDidEnvelope, and any other RPC the node exposes — the runtime’s general escape hatch so agent templates can drive newly-added surfaces without a bespoke step kind. params is a JSON template with {{var}} substitution against the agent context.

Fields

§method: String

JSON-RPC method name (e.g. "tenzro_workflowOpen").

§params: Value

Params object/array template; {{var}}-substituted at run time.

§

BridgeTransfer

Move tokens across chains via BridgeRouter::compare_fees → pick the chosen route → call the winning adapter.

Fields

§from_chain: String
§to_chain: String
§asset: String
§amount: String

Decimal amount string (resolved against asset decimals at run time)

§strategy: String

Selection strategy: "cheapest" | "fastest" | "most_reliable"

§

MppPay

Create an MPP payment challenge, sign it with the agent wallet, and submit the credential via MppClient.

Fields

§amount: String
§asset: String
§recipient: String
§session_ttl_secs: Option<u64>

Optional session TTL in seconds

§

X402Pay

Stateless x402 pay-resource call via X402Client.

Fields

§resource_url: Option<String>

Resource URL to pay for (alternative to recipient)

§amount: String
§asset: String
§recipient: Option<String>

Recipient address (alternative to resource_url)

§facilitator: Option<String>

Facilitator address

§

DamlSubmit

Submit a DAML command to a Canton participant via DamlExecutor.

Fields

§template_package: Option<String>

Template package (e.g. “com.tenzro.trade”)

§module: Option<String>

DAML module name

§entity: Option<String>

DAML entity/template name

§command_variant: Option<String>

Command variant: “Create” | “Exercise” etc.

§fields_json: Option<String>

JSON object with optional {{var}} substitutions

§template_id: Option<String>

Template ID (alternative to template_package+module+entity)

§choice: Option<String>

Choice name (alternative to command_variant for Exercise)

§party: Option<String>

Acting party

§args_template: Option<String>

Args template with {{var}} substitutions (alternative to fields_json)

§

ToolInvoke

Look up a tool from CF_TOOLS (auto-discovered at spawn time via required_tool_tags) and invoke it via tenzro_useTool.

Fields

§tool_tag: String

Tag used to look up the resolved tool id

§method: Option<String>

Method name on the tool (e.g. “get_balances”, “quote_inference_pricing”)

§arguments_json: Option<String>

JSON object with optional {{var}} substitutions (alternative to params_template)

§params_template: Option<String>

JSON template with optional {{var}} substitutions (preferred)

§

SkillInvoke

Look up a skill from CF_SKILLS (auto-discovered at spawn time via required_skill_tags) and invoke it via tenzro_useSkill.

Fields

§skill_tag: String

Tag used to look up the resolved skill id

§method: Option<String>

Method name on the skill

§input_json: Option<String>

JSON object with optional {{var}} substitutions

§params_template: Option<String>

JSON template with optional {{var}} substitutions (alternative)

§

ForEach

Loop over a discovered opportunity set returned by a registered tool. The body steps execute once per item, with the item bound to the runtime context as opportunity (or whatever the agent-kit chooses for binding).

Fields

§source_tool_tag: String

Tool tag whose tenzro_useTool output is a JSON array

§

When

Conditional gate: only run the body if the JMESPath expression evaluated against the current context is truthy.

Fields

§jmespath_expr: String

JMESPath expression

Trait Implementations§

Source§

impl Clone for ExecutionStep

Source§

fn clone(&self) -> ExecutionStep

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExecutionStep

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ExecutionStep

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ExecutionStep

Source§

impl PartialEq for ExecutionStep

Source§

fn eq(&self, other: &ExecutionStep) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ExecutionStep

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ExecutionStep

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.