cargo-tangle 0.5.0-alpha.13

A command-line tool to create and deploy blueprints on Tangle Network
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use alloy_primitives::Bytes;
use blueprint_client_tangle::{JobSubmissionResult, TangleClient};
use color_eyre::Result;

/// Submit a job invocation to the configured service.
pub async fn submit_job(
    client: &TangleClient,
    service_id: u64,
    job_index: u8,
    inputs: Bytes,
) -> Result<JobSubmissionResult> {
    let submission = client
        .submit_job(service_id, job_index, inputs)
        .await
        .map_err(|e| color_eyre::Report::msg(e.to_string()))?;
    Ok(submission)
}