moss-bounty-x402-client

Crates.iomoss-bounty-x402-client
lib.rsmoss-bounty-x402-client
version0.1.5
created_at2025-12-12 09:57:15.824001+00
updated_at2025-12-12 10:35:11.913388+00
descriptionMoss Bounty X402 Client.
homepage
repositoryhttps://github.com/moss-site/moss-bounty-x402-client
max_upload_size
id1981284
size143,244
StevE Zhang (imstevez)

documentation

https://docs.rs/moss-bounty-x402-client

README

Moss Bounty x402 Client

Crates.io docs

Installation

[dependencies]
moss-bounty-x402-client = "0.1.5"

Basic Usage

use moss_bounty_x402_client::{Client, CreateBountyTaskData};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    // User moss authorization token, could be fetched by login
    let auth_token = "<Your-Moss-Authorization-Token>";

    // User wallet private key for bounty payment
    let private = "<Your-Wallet-Private-Key>";
    
    // Build a client
    let client = Client::new(auth_token, private)?;
    
    // Build task data
    let task = CreateBountyTaskData {
        target_twitter_handle: "<target_twitter_handle>".to_string(),
        question: "Hello?".to_string(),
        amount_usdc: "1000000".to_string(),
        valid_hours: 12,
    };

    // Create bounty task
    client.create_bounty_task(task).await?;

    Ok(())
}
Commit count: 0

cargo fmt