iota-lib-rs 0.0.20

A rust implementation of the IOTA API
docs.rs failed to build iota-lib-rs-0.0.20
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: iota-lib-rs-0.4.1

An unofficial implementation of the IOTA api in rust.

This is a port of the IOTA Java/JS API into Rust. It works, but I wouldn't trust it with real money yet. Having said that, please let me know if you have any suggestions or run into any issues.

This library currently requires nightly rust to build.

Things that are done:

  • Crypto
    • Curl
    • Kerl
    • PearlDiver
    • ISS
    • HMAC
    • Signing
  • Model
    • Bundle
    • Input
    • Inputs
    • Neighbor
    • Signature
    • Transaction
    • Transfer
  • Utils
    • Checksum
    • Constants
    • Converter
    • InputValidator
    • IotaAPIUtils
    • IotaUnitConversion
    • IotaUnits
    • Multisig
    • SeedRandomGenerator
    • StopWatch
    • TrytesConverter
  • API
    • IRI API calls and responses
      • add neighbors
      • attach_to_tangle
      • find_transactions
      • get_balances
      • broadcastTransactions
      • storeTransactions
      • get_inclusion_states
      • get_neighbors
      • get_node_info
      • get_tips
      • get_transactions_to_approve
      • get_trytes
      • remove_neighbor
      • were_addresses_spent_from
      • check_consistency
    • Ease of use wrappers/helpers
      • new_address
      • get_new_address
      • send_trytes
      • store_and_broadcast
      • get_inputs
      • prepare_transfers
      • traverse_bundle
      • send_transfer
      • get_bundle

Here's an example of how to send a transaction: (Note that we're using the address as the seed in send_transfer()...don't do this)

let trytes = "HELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDD";
    let message = trytes_converter::to_trytes("Hello World").unwrap();
    let mut transfer = Transfer::default();
    *transfer.value_mut() = 0;
    *transfer.address_mut() = trytes.to_string();
    *transfer.message_mut() = message;
    let transfers = [transfer];
    let api = iota_api::API::new("https://trinity.iota.fm");
    let tx = api.send_transfer(trytes, 3, 14, &transfers, true, None, &None, &None, None, None).unwrap();
    println!("{:?}", tx);