waves_logo Docs
  • Overview
    Overview
  • How-to Guides
    • Reading Blockchain Data
      Reading Blockchain Data
    • Creating & Broadcasting Transactions
      Creating & Broadcasting Transactions
    • Tokenization
      Tokenization
    • Airdrop
      Airdrop
    • Payments
      Payments
    • Buying & Selling Tokens
      Buying & Selling Tokens
    • Creating Crypto Trading Bot
      Creating Crypto Trading Bot
    • Simple Voting
      Simple Voting
    • Reading Band’s Price Data
      Reading Band’s Price Data
    How-to Guides
  • Waves Smart Contracts
    • Articles on Smart Contracts
      Articles on Smart Contracts
    Waves Smart Contracts
  • Smart Account
    • Creating smart account
      Creating smart account
    • Creating and deploying a script manually
      Creating and deploying a script manually
    • Video tutorials
      • Introduction to the Waves blockchain, Waves Smart Accounts and Waves Smart Assets
        Introduction to the Waves blockchain, Waves Smart Accounts and Waves Smart Assets
      • Waves Smart Account with multisignature
        Waves Smart Account with multisignature
      • Waves Smart Account with escrow service
        Waves Smart Account with escrow service
      • Creating multisignature account via Waves IDE tools
        Creating multisignature account via Waves IDE tools
      • Creating multisignature account via Waves Client
        Creating multisignature account via Waves Client
      • Waves console explained
        Waves console explained
      Video tutorials
    Smart Account
  • Smart Asset
    • What is a Smart Asset
      What is a Smart Asset
    Smart Asset
  • dApp
    • Creating & Launching dApp
      Creating & Launching dApp
    dApp
  • Developer Tools
    • Waves IDE
      Waves IDE
    • Visual Studio Code Extension
      Visual Studio Code Extension
    • Surfboard
      Surfboard
    • Ride REPL
      Ride REPL
    Developer Tools
  • Signer ◆
    Signer ◆
  • Waves API
    • Data Service API
      Data Service API
    • Node REST API 🡥
      Node REST API 🡥
    • Node gRPC Server 🡥
      Node gRPC Server 🡥
    • Blockchain Updates 🡥
      Blockchain Updates 🡥
    • Waves Keeper API 🡥
      Waves Keeper API 🡥
    Waves API
  • Client libraries
    • Waves transactions
      Waves transactions
    • PyWaves
      PyWaves
    • WavesJ
      WavesJ
    • WavesCS
      WavesCS
    • WavesC
      WavesC
    • GoWaves
      GoWaves
    • WavesRS
      WavesRS
    • Community libraries
      Community libraries
    Client libraries
      • English
      • Русский
      On this page
      waves_logo Docs

          # WavesRS

          A Rust interface (opens new window) to the Waves blockchain which can be used to create accounts and sign transactions

          # Usage

          extern crate base58;
          extern crate waves;
          
          use base58::*;
          use std::time::{SystemTime, UNIX_EPOCH};
          use waves::account::{PrivateKeyAccount, TESTNET};
          use waves::transaction::*;
          
          fn main() {
              let account = PrivateKeyAccount::from_seed("seed");
              println!("my address: {}", account.public_key().to_address(TESTNET).to_string());
          
              let ts = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() * 1000;
              let tx = Transaction::new_alias(&account.public_key(), "rhino", TESTNET, 100000, ts);
              println!("id is {}", tx.id().to_string());
              let ptx = account.sign_transaction(tx);
              println!("proofs are {:?}", ptx.proofs.iter().map(|p| p.to_base58()).collect::<Vec<String>>());
          }
          
          GoWaves
          Community libraries
          GoWaves
          Community libraries