### Irys Client CLI Examples Source: https://github.com/irys-xyz/rust-sdk/blob/master/README.md Provides example commands for interacting with the Irys client CLI. These cover balance checks, price inquiries, funding, withdrawals, and uploads. ```bash ./cli balance
--host --token ``` ```bash ./cli price --host --token ``` ```bash ./cli fund --host --token --wallet ``` ```bash ./cli withdraw --host --token --wallet ``` ```bash ./cli upload --host --token --wallet ``` -------------------------------- ### Install Node.js Dependencies for Bundle Generation Source: https://github.com/irys-xyz/rust-sdk/blob/master/README.md Installs the necessary Node.js packages for generating random bundles. This is a prerequisite for running tests. ```bash npm install ``` -------------------------------- ### Get Upload Cost with Irys SDK Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Calculates the cost in base units for uploading a specified number of bytes to the Irys network. Requires a URL, token type, HTTP client, and byte count. ```rust use irys_sdk::{bundler::get_price, token::TokenType}; use reqwest::Url; #[tokio::main] async fn main() { let url = Url::parse("https://uploader.irys.xyz").unwrap(); let token = TokenType::Solana; let bytes_to_upload = 256000; // 256 KB let client = reqwest::Client::new(); let result = get_price(&url, token, &client, bytes_to_upload).await; match result { Ok(price) => println!("Cost for {} bytes: {} lamports", bytes_to_upload, price), Err(err) => println!("Error getting price: {}", err), } } ``` -------------------------------- ### CLI - Command Line Interface Source: https://context7.com/irys-xyz/rust-sdk/llms.txt The SDK includes a CLI binary for common operations. Build it with the `build-binary` feature flag. ```APIDOC ## CLI Commands ### Description Provides command-line tools for common Irys SDK operations. Build with the `build-binary` feature flag. ### Build Command ```bash cargo build --release --features="build-binary" ``` ### Commands #### `balance` ##### Description Checks the balance for a given address. ##### Usage `./target/release/cli balance
--host --token ` ##### Parameters - **address** (String) - Required - The wallet address to check. - **--host** (String) - Required - The Irys host URL (e.g., `https://uploader.irys.xyz`). - **--token** (String) - Required - The type of token (e.g., `solana`, `ethereum`). #### `price` ##### Description Checks the price for uploading a specified number of bytes. ##### Usage `./target/release/cli price --host --token ` ##### Parameters - **bytes** (Integer) - Required - The number of bytes to check the price for. - **--host** (String) - Required - The Irys host URL (e.g., `https://uploader.irys.xyz`). - **--token** (String) - Required - The type of token (e.g., `solana`, `ethereum`). ``` -------------------------------- ### SolanaBuilder - Solana Token Configuration Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Illustrates how to set up a Solana token using the `SolanaBuilder`. This requires providing a base58-encoded private key for signing transactions. ```APIDOC ## PUT /api/users/{id} ### Description Updates the details of an existing user identified by their unique ID. ### Method PUT ### Endpoint /api/users/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the user to update. #### Request Body - **username** (string) - Optional - The new username for the user. - **email** (string) - Optional - The new email address for the user. ### Request Example ```json { "email": "john.doe.updated@example.com" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the updated user. - **username** (string) - The updated username of the user. - **email** (string) - The updated email address of the user. #### Response Example ```json { "id": "user-12345", "username": "johndoe", "email": "john.doe.updated@example.com" } ``` ``` -------------------------------- ### BundlerClientBuilder - Creating a Client Instance Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Demonstrates how to create an Irys bundler client using the `BundlerClientBuilder`. This involves configuring the bundler URL, specifying a token (e.g., Solana), and fetching public information from the bundler node. ```APIDOC ## POST /api/users ### Description This endpoint allows for the creation of a new user in the system. ### Method POST ### Endpoint /api/users ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of users to return. #### Request Body - **username** (string) - Required - The desired username for the new user. - **email** (string) - Required - The email address of the new user. ### Request Example ```json { "username": "johndoe", "email": "john.doe@example.com" } ``` ### Response #### Success Response (201) - **id** (string) - The unique identifier for the newly created user. - **username** (string) - The username of the created user. - **email** (string) - The email address of the created user. #### Response Example ```json { "id": "user-12345", "username": "johndoe", "email": "john.doe@example.com" } ``` ``` -------------------------------- ### Create Irys Bundler Client with Solana Token Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Use BundlerClientBuilder to configure the Irys bundler URL, create a Solana token with wallet credentials, and build the client. Requires fetching public info from the bundler node. ```rust use irys_sdk::{BundlerClientBuilder, token::solana::SolanaBuilder}; use reqwest::Url; #[tokio::main] async fn main() -> Result<(), irys_sdk::error::BundlerError> { // Configure the bundler URL let url = Url::parse("https://uploader.irys.xyz").unwrap(); // Create a Solana token with wallet credentials let token = SolanaBuilder::new() .wallet("kNykCXNxgePDjFbDWjPNvXQRa8U12Ywc19dFVaQ7tebUj3m7H4sF4KKdJwM7yxxb3rqxchdjezX9Szh8bLcQAjb") .build() .expect("Could not create Solana instance"); // Build the client with token and fetch public info let bundler_client = BundlerClientBuilder::new() .url(url) .token(token) .fetch_pub_info() .await? .build()?; println!("Bundler client created successfully"); Ok(()) } ``` -------------------------------- ### Build and Use Irys CLI Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Build the Irys SDK CLI binary using the `build-binary` feature flag. The CLI supports common operations like checking balance and price for uploads. ```bash # Build the CLI binary cargo build --release --features="build-binary" # Check balance for an address ./target/release/cli balance
--host https://uploader.irys.xyz --token solana # Check price for uploading bytes ./target/release/cli price 256000 --host https://uploader.irys.xyz --token solana ``` -------------------------------- ### Build Irys Rust SDK Client Source: https://github.com/irys-xyz/rust-sdk/blob/master/README.md Build the client binary for the Irys Rust SDK. This command enables the 'build-binary' feature. ```bash cargo build --release --features="build-binary" ``` -------------------------------- ### Irys Client CLI Usage Source: https://github.com/irys-xyz/rust-sdk/blob/master/README.md Displays the available subcommands and options for the Irys client binary. Use this to understand the CLI's capabilities. ```bash USAGE: cli OPTIONS: -h, --help Print help information SUBCOMMANDS: balance Gets the specified user's balance for the current Irys bundler node fund Funds your account with the specified amount of atomic units help Print this message or the help of the given subcommand(s) price Check how much of a specific token is required for an upload of bytes upload Uploads a specified file upload-dir Uploads a folder (with a manifest) withdraw Sends a fund withdrawal request ``` -------------------------------- ### Configure Solana Token from Private Key Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Instantiate a Solana token using SolanaBuilder with a base58-encoded private key. This token is then ready for signing Solana-based transactions. ```rust use irys_sdk::token::solana::SolanaBuilder; fn main() { // Create Solana token from base58 private key let token = SolanaBuilder::new() .wallet("kNykCXNxgePDjFbDWjPNvXQRa8U12Ywc19dFVaQ7tebUj3m7H4sF4KKdJwM7yxxb3rqxchdjezX9Szh8bLcQAjb") .build() .expect("Could not create Solana instance"); // Token is ready for signing transactions println!("Solana token configured"); } ``` -------------------------------- ### Manual Transaction Creation and Signing with Irys SDK Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Allows manual creation of transactions with custom data and tags, followed by separate signing and sending. Useful for more control over uploads. Requires URL, wallet path, and token configuration. ```rust use irys_sdk::{ BundlerClientBuilder, token::arweave::ArweaveBuilder, tags::Tag, error::BuilderError }; use std::{path::PathBuf, str::FromStr}; use reqwest::Url; #[tokio::main] async fn main() -> Result<(), BuilderError> { let url = Url::parse("https://uploader.irys.xyz").unwrap(); let wallet = PathBuf::from_str("path/to/wallet.json").expect("Invalid wallet path"); let token = ArweaveBuilder::new() .keypair_path(wallet) .build() .expect("Could not create token instance"); let mut bundler_client = BundlerClientBuilder::new() .url(url) .token(token) .fetch_pub_info() .await? .build()?; // Create transaction with custom data and tags let data = b"Hello, Irys!".to_vec(); let tags = vec![ Tag::new("Content-Type", "text/plain"), Tag::new("App-Name", "MyApp"), Tag::new("Version", "1.0"), ]; let mut tx = bundler_client.create_transaction(data, tags).unwrap(); // Sign the transaction bundler_client.sign_transaction(&mut tx).await?; // Send the signed transaction let response = bundler_client.send_transaction(tx).await; match response { Ok(res) => println!("Transaction sent! ID: {}", res.id), Err(err) => println!("Error: {}", err), } Ok(()) } ``` -------------------------------- ### Run Irys Rust SDK Tests Source: https://github.com/irys-xyz/rust-sdk/blob/master/README.md Executes the test suite for the Irys Rust SDK. Ensure random bundles have been generated prior to running this command. ```bash cargo test ``` -------------------------------- ### Fund Account with Atomic Units Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Use this command to fund your Irys account with a specified amount of atomic units. Ensure you have a valid wallet file and specify the correct host and token type. ```bash ./target/release/cli fund 10000 --host https://uploader.irys.xyz --token arweave --wallet path/to/wallet.json ``` -------------------------------- ### get_balance - Query Account Balance Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Explains how to use the `get_balance` function to retrieve an account's balance from an Irys bundler node. It requires the bundler URL, token type, and the address to query. ```APIDOC ## DELETE /api/users/{id} ### Description Deletes a user from the system based on their unique identifier. ### Method DELETE ### Endpoint /api/users/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the user to delete. ### Response #### Success Response (204) No content is returned upon successful deletion. #### Response Example (No content) ``` -------------------------------- ### ArweaveBuilder - Arweave Token Configuration Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Shows how to configure an Arweave token for use with the Irys SDK. This involves specifying the path to the Arweave wallet keypair file. ```APIDOC ## GET /api/users/{id} ### Description Retrieves the details of a specific user based on their unique identifier. ### Method GET ### Endpoint /api/users/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the user to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the user. - **username** (string) - The username of the user. - **email** (string) - The email address of the user. #### Response Example ```json { "id": "user-12345", "username": "johndoe", "email": "john.doe@example.com" } ``` ``` -------------------------------- ### Generate Random Bundles Source: https://github.com/irys-xyz/rust-sdk/blob/master/README.md Executes the script to generate random bundles, which are stored in the 'res/gen_bundles' directory. This is required for testing. ```bash npm run generate-bundles ``` -------------------------------- ### Configure Arweave Token for Irys Client Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Utilize ArweaveBuilder to create an Arweave token instance from a keypair file. This token is then used to build the Irys BundlerClient, requiring the bundler URL and fetching public info. ```rust use irys_sdk::{BundlerClientBuilder, token::arweave::ArweaveBuilder}; use reqwest::Url; use std::{path::PathBuf, str::FromStr}; #[tokio::main] async fn main() -> Result<(), irys_sdk::error::BuilderError> { let url = Url::parse("https://uploader.irys.xyz").unwrap(); let wallet = PathBuf::from_str("path/to/wallet.json").expect("Invalid wallet path"); // Build Arweave token from keypair file let token = ArweaveBuilder::new() .keypair_path(wallet) .build() .expect("Could not create Arweave token instance"); let bundler_client = BundlerClientBuilder::new() .url(url) .token(token) .fetch_pub_info() .await? .build()?; println!("Arweave client ready"); Ok(()) } ``` -------------------------------- ### Upload File to Irys with SDK Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Uploads a file from the local filesystem to an Irys bundler node. Automatically detects and sets the Content-Type tag based on the file extension. Requires a URL, token configuration, and file path. ```rust use irys_sdk::{BundlerClientBuilder, token::solana::SolanaBuilder, error::BundlerError}; use reqwest::Url; use std::{path::PathBuf, str::FromStr}; #[tokio::main] async fn main() -> Result<(), BundlerError> { let url = Url::parse("https://uploader.irys.xyz").unwrap(); let token = SolanaBuilder::new() .wallet("kNykCXNxgePDjFbDWjPNvXQRa8U12Ywc19dFVaQ7tebUj3m7H4sF4KKdJwM7yxxb3rqxchdjezX9Szh8bLcQAjb") .build() .expect("Could not create Solana instance"); let mut bundler_client = BundlerClientBuilder::new() .url(url) .token(token) .fetch_pub_info() .await? .build()?; let file = PathBuf::from_str("path/to/image.jpg").unwrap(); let result = bundler_client.upload_file(file).await; match result { Ok(response) => { println!("Uploaded successfully!"); println!("Transaction ID: {}", response.id); println!("URL: https://uploader.irys.xyz/{}", response.id); println!("Timestamp: {}", response.timestamp); println!("Block: {}", response.block); } Err(err) => println!("Upload failed: {}", err), } Ok(()) } ``` -------------------------------- ### Verify File Bundle Source: https://context7.com/irys-xyz/rust-sdk/llms.txt The `verify_file_bundle` function validates all transaction signatures within a bundle file, supporting multiple signature types. ```APIDOC ## verify_file_bundle ### Description Validates all transaction signatures within a bundle file, supporting multiple signature types including Ed25519, Secp256k1, and RSA4096. ### Method POST (Implied by SDK function) ### Endpoint /verify/bundle (Implied by SDK function) ### Parameters #### Path Parameters - **bundle_path** (String) - Required - The path to the bundle file to verify. ### Request Example ```rust // Example usage within the SDK let result = verify_file_bundle(bundle_path).await; ``` ### Response #### Success Response (200) - **items** (Array) - A list of verified items within the bundle. - **tx_id** (String) - The transaction ID of the item. #### Response Example ```json { "items": [ { "tx_id": "" }, { "tx_id": "" } ] } ``` ``` -------------------------------- ### Upload a File Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Upload a file to the Irys network. This command requires the path to the file, the host, the token type, and your wallet information (either a path to a JSON file or a private key). ```bash ./target/release/cli upload path/to/file.jpg --host https://uploader.irys.xyz --token solana --wallet ``` -------------------------------- ### Create Metadata Tags Source: https://context7.com/irys-xyz/rust-sdk/llms.txt The `Tag` struct is used to represent key-value metadata pairs for transactions, encoded using Avro format. Use `Tag::new` to create individual tags and collect them in a vector. ```rust use irys_sdk::tags::Tag; fn main() { // Create individual tags let content_type = Tag::new("Content-Type", "application/json"); let app_name = Tag::new("App-Name", "MyDApp"); let version = Tag::new("Version", "2.0.0"); // Collect tags for transaction let tags = vec![ content_type, app_name, version, Tag::new("Author", "developer@example.com"), Tag::new("Unix-Time", &chrono::Utc::now().timestamp().to_string()), ]; println!("Created {} tags for transaction", tags.len()); } ``` -------------------------------- ### Tag - Creating Metadata Tags Source: https://context7.com/irys-xyz/rust-sdk/llms.txt The `Tag` struct represents key-value metadata pairs attached to transactions, encoded using Avro format for efficient storage. ```APIDOC ## Tag ### Description Represents key-value metadata pairs attached to transactions, encoded using Avro format. ### Method POST (Implied by SDK usage) ### Endpoint /tags (Implied by SDK usage) ### Parameters #### Request Body - **tags** (Array) - Required - A list of tags to associate with the transaction. - **name** (String) - Required - The name of the metadata tag. - **value** (String) - Required - The value of the metadata tag. ### Request Example ```json [ { "name": "Content-Type", "value": "application/json" }, { "name": "App-Name", "value": "MyDApp" }, { "name": "Version", "value": "2.0.0" } ] ``` ### Response #### Success Response (200) - **message** (String) - Confirmation that tags have been created or associated. #### Response Example ```json "Tags created successfully." ``` ``` -------------------------------- ### Retrieve Account Balance from Irys Node Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Use the get_balance function to query the current balance for a given address on an Irys bundler node. Specify the bundler URL, token type, and address. Requires a reqwest::Client. ```rust use irys_sdk::{bundler::get_balance, token::TokenType}; use reqwest::Url; #[tokio::main] async fn main() { let url = Url::parse("https://uploader.irys.network").unwrap(); let token = TokenType::Solana; let address = "7y3tfYz8V3ui67XRJi1iiiS5GQ4zVyFoDfFAtouhB8gL"; let client = reqwest::Client::new(); let result = get_balance(&url, token, address, &client).await; match result { Ok(balance) => println!("Balance: {} lamports", balance), Err(err) => println!("Error fetching balance: {}", err), } } ``` -------------------------------- ### Fund Account on Irys Bundler Node Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Transfers tokens from your wallet to fund your account on the Irys bundler node, enabling future uploads. Requires URL, token configuration, amount, and an optional fee multiplier. ```rust use irys_sdk::{BundlerClientBuilder, token::arweave::ArweaveBuilder, error::BundlerError}; use reqwest::Url; use std::{path::PathBuf, str::FromStr}; #[tokio::main] async fn main() -> Result<(), BundlerError> { let url = Url::parse("https://uploader.irys.xyz").unwrap(); let wallet = PathBuf::from_str("path/to/wallet.json").unwrap(); let token = ArweaveBuilder::new() .keypair_path(wallet) .build() .expect("Could not create token instance"); let bundler_client = BundlerClientBuilder::new() .url(url) .token(token) .fetch_pub_info() .await? .build()?; // Fund account with 10000 base units (winston for Arweave) // Optional multiplier (None defaults to 1.0) for fee adjustment let result = bundler_client.fund(10000, None).await; match result { Ok(success) => println!("Funding successful: {}", success), Err(err) => println!("Funding failed: {}", err), } Ok(()) } ``` -------------------------------- ### Verify Bundle Signatures Source: https://context7.com/irys-xyz/rust-sdk/llms.txt This function validates all transaction signatures within a bundle file. It supports multiple signature types including Ed25519, Secp256k1, and RSA4096. Provide the path to the bundle file. ```rust use irys_sdk::verify::file::verify_file_bundle; use irys_sdk::error::BundlerError; #[tokio::main] async fn main() -> Result<(), BundlerError> { let bundle_path = "path/to/bundle_file".to_string(); let result = verify_file_bundle(bundle_path).await; match result { Ok(items) => { println!("Bundle verified successfully!"); println!("Number of items: {}", items.len()); for item in items { println!(" Transaction ID: {}", item.tx_id); } } Err(err) => println!("Verification failed: {}", err), } Ok(()) } ``` -------------------------------- ### Withdraw Funds from Bundler Node Source: https://context7.com/irys-xyz/rust-sdk/llms.txt The `withdraw` method requests a withdrawal of funds from your account on the Irys bundler node back to your wallet. ```APIDOC ## withdraw ### Description Requests a withdrawal of funds from your account on the Irys bundler node back to your wallet. ### Method POST (Implied by SDK method) ### Endpoint /withdraw (Implied by SDK method) ### Parameters #### Query Parameters - **amount** (u64) - Required - The amount of funds to withdraw in base units. ### Request Example ```rust // Example usage within the SDK let result = bundler_client.withdraw(10000).await; ``` ### Response #### Success Response (200) - **success** (String) - Confirmation of successful withdrawal. #### Response Example ```json "Withdrawal successful: " ``` ``` -------------------------------- ### Verify Receipt Signatures with ArweaveSigner Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Use the `Verifier` trait and `ArweaveSigner::verify` to validate signatures of upload receipts from Irys bundler nodes. This involves deep hashing and decoding base64 encoded values. Ensure the receipt data is correctly parsed. ```rust use data_encoding::BASE64URL_NOPAD; use irys_sdk::{deep_hash::DeepHashChunk, deep_hash_sync::deep_hash_sync, ArweaveSigner, Verifier}; use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug)] #[serde(rename_all = "camelCase")] pub struct Receipt { pub id: String, pub timestamp: u64, pub version: String, pub public: String, pub signature: String, pub deadline_height: u64, pub block: u64, } fn main() -> Result<(), irys_sdk::error::BundlerError> { // Load receipt from file (typically returned from upload) let data = std::fs::read_to_string("receipt.json").expect("Unable to read file"); let receipt: Receipt = serde_json::from_str(&data).expect("Unable to parse json"); // Construct deep hash chunks for verification let fields = DeepHashChunk::Chunks(vec![ DeepHashChunk::Chunk("Bundlr".into()), DeepHashChunk::Chunk(receipt.version.into()), DeepHashChunk::Chunk(receipt.id.into()), DeepHashChunk::Chunk(receipt.deadline_height.to_string().into()), DeepHashChunk::Chunk(receipt.timestamp.to_string().into()), ]); // Decode base64 encoded values let pubk = BASE64URL_NOPAD.decode(&receipt.public.into_bytes()).unwrap(); let msg = deep_hash_sync(fields).unwrap(); let sig = BASE64URL_NOPAD.decode(&receipt.signature.into_bytes()).unwrap(); // Verify the signature ArweaveSigner::verify(pubk.into(), msg, sig.into())?; println!("Receipt signature verified successfully!"); Ok(()) } ``` -------------------------------- ### ArweaveSigner::verify - Verify Receipt Signatures Source: https://context7.com/irys-xyz/rust-sdk/llms.txt The `Verifier` trait enables verification of signatures using deep hashing, commonly used to verify upload receipts from Irys bundler nodes. ```APIDOC ## ArweaveSigner::verify ### Description Verifies signatures using deep hashing, typically used for verifying upload receipts from Irys bundler nodes. ### Method POST (Implied by SDK method) ### Endpoint /verify/receipt (Implied by SDK method) ### Parameters #### Request Body - **receipt** (Object) - Required - The receipt object containing signature details. - **id** (String) - Required - The unique identifier of the transaction. - **timestamp** (u64) - Required - The timestamp of the receipt. - **version** (String) - Required - The version of the receipt format. - **public** (String) - Required - The public key used for signing, Base64URL encoded. - **signature** (String) - Required - The signature, Base64URL encoded. - **deadline_height** (u64) - Required - The block height at which the receipt expires. - **block** (u64) - Required - The block number associated with the receipt. ### Request Example ```json { "id": "", "timestamp": 1678886400, "version": "v1", "public": "", "signature": "", "deadline_height": 123456, "block": 123450 } ``` ### Response #### Success Response (200) - **message** (String) - Confirmation that the receipt signature is valid. #### Response Example ```json "Receipt signature verified successfully!" ``` ``` -------------------------------- ### Withdraw Funds from Bundler Node Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Use this method to request a withdrawal of funds from your Irys bundler node account back to your wallet. Ensure you have the necessary wallet path and token configuration. ```rust use irys_sdk::{BundlerClientBuilder, token::arweave::ArweaveBuilder, error::BundlerError}; use reqwest::Url; use std::{path::PathBuf, str::FromStr}; #[tokio::main] async fn main() -> Result<(), BundlerError> { let url = Url::parse("https://uploader.irys.xyz").unwrap(); let wallet = PathBuf::from_str("path/to/wallet.json").unwrap(); let token = ArweaveBuilder::new() .keypair_path(wallet) .build() .expect("Could not create token instance"); let bundler_client = BundlerClientBuilder::new() .url(url) .token(token) .fetch_pub_info() .await? .build()?; // Withdraw 10000 base units let result = bundler_client.withdraw(10000).await; match result { Ok(success) => println!("Withdrawal successful: {}", success), Err(err) => println!("Withdrawal failed: {}", err), } Ok(()) } ``` -------------------------------- ### Withdraw Funds Source: https://context7.com/irys-xyz/rust-sdk/llms.txt Withdraw a specified amount of funds from your Irys account. This operation requires the amount, host, token type, and wallet details. ```bash ./target/release/cli withdraw 10000 --host https://uploader.irys.xyz --token arweave --wallet path/to/wallet.json ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.