alephium-web3 2.0.7

A Rust library to interact with the Alephium platform
Documentation
// Copyright 2018 - 2022 The Alephium Authors
// This file is part of the alephium project.

use serde::{Deserialize, Serialize};
use num_bigint::BigUint;

/// Number256 type for large integers
pub type Number256 = BigUint;

/// Token information
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Token {
    pub id: String,
    pub amount: String,
}

/// Val type for contract values
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum Val {
    Number(String),
    Bool(bool),
    String(String),
    Array(Vec<Val>),
    Object(std::collections::HashMap<String, Val>),
}