4 releases

0.1.4 Oct 10, 2025
0.1.2 Oct 5, 2025
0.1.1 Oct 5, 2025
0.1.0 Oct 5, 2025

#33 in #substrate-blockchain

Download history 187/week @ 2025-09-29 286/week @ 2025-10-06 39/week @ 2025-10-13

512 downloads per month
Used in 3 crates

Apache-2.0

55KB
180 lines

GLIN Logo

glin-client

crates.io docs.rs License

Network connection and RPC operations for GLIN Network.

Overview

This crate provides high-level client functionality for interacting with GLIN Network nodes:

  • Connection management: Connect to GLIN Network RPC endpoints
  • Account management: Create and manage blockchain accounts
  • Transaction handling: Sign and submit transactions
  • Event monitoring: Listen to blockchain events
  • RPC operations: Query blockchain state and metadata

Usage

Add this to your Cargo.toml:

[dependencies]
glin-client = "0.1.0"
tokio = { version = "1", features = ["full"] }

Example

use glin_client::{create_client, get_dev_account};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    // Connect to local node
    let client = create_client("ws://localhost:9944").await?;

    // Get development account
    let account = get_dev_account("alice")?;

    // Query account balance
    let balance = client.get_balance(&account.public_key()).await?;
    println!("Balance: {}", balance);

    Ok(())
}

Features

  • Async/await support: Built on Tokio for async operations
  • Type-safe: Leverages Rust's type system for safe blockchain interactions
  • Error handling: Comprehensive error types with anyhow integration
  • Flexible connection: Support for WebSocket RPC endpoints

Part of GLIN SDK

This crate is part of the GLIN SDK for Rust, providing complete blockchain interaction capabilities for GLIN Network.

Documentation

For full SDK documentation and examples, see the main repository.

License

Apache-2.0

Dependencies

~20–27MB
~495K SLoC