Project

indium

0.0
No commit activity in last 3 years
No release in over 3 years
Library for querying/posting transactions from the Indium network
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.4.10
 Project Readme

Indium

Helper library to query/post Indium transactions

Usage

  • Initialize with the host+port of an Indium node which has RPC enabled:
indium = Indium.custom("http://your-rpcnode.url:8545", chain_id = 246)
indium = Indium.prod # which uses url = http://rpcnode.indium.network:8545 and chain_id = 246
  • Generate a keypair (offline operation):
public_key, private_key = indium.create_keypair
  • Check account balance of an address/public key:
indium.balance(pubkey)
  • Transfer some coins to an address (need sender's private key and recipient's public key):
# Txn is signed locally so private keys are never transmitted
indium.transfer(nil, sender_privkey, receiver_pubkey, amount, hex_data, gas_limit = 21_000, gas_price = 3_141_592)