class Wallet::Node

Defined in:

tron-wallet/node.cr

Constant Summary

MAXIMUM_GAP = 50
TRX_TO_SUN = 1000000

Constructors

Instance Method Summary

Constructor Detail

def self.new(wallet : Wallet::Main) #

[View source]

Instance Method Detail

def claim_rewards(address : String, private_key : String) #

[View source]
def conn : HTTP::Client #

[View source]
def disconnect_with_warning(error) #

[View source]
def error_while_parse(body) #

[View source]
def error_while_request(error) #

[View source]
def exec(method, path, body) #

[View source]
def generate_address #

[View source]
def get(path, params = nil) #

[View source]
def get_bandwidth_price #

[View source]
def get_brokerage(address : String) #

[View source]
def get_contract_name(address) #

[View source]
def get_energy_price #

[View source]
def get_net_stats(address) #

[View source]
def get_now_block #

[View source]
def get_token_balance(address, contract) #

[View source]
def get_transaction(id) #

[View source]
def get_tronscan_block #

[View source]
def get_trx_balance(address) #

[View source]
def get_unclaimed_rewards(address) #

[View source]
def get_withdrawable_balance(address) #

[View source]
def get_witnesses_list #

[View source]
def make_connection #

[View source]
def make_transaction(path, params, private_key) #

[View source]
def post(path, params) #

[View source]
def prepare_token_transfer(address : String, contract : String, amount : Float64, estimate_fee = false) #

[View source]
def read_int(json : JSON::Any | Nil) #

[View source]
def read_int(json : JSON::Any, *field_names) #

[View source]
def read_money(json : JSON::Any | Nil) #

[View source]
def read_money(json : JSON::Any, *field_names) #

[View source]
def reconnect #

[View source]
def send_transaction(transaction) #

[View source]
def sign_and_send(transaction, private_key) #

[View source]
def sign_transaction(transaction : JSON::Any, private_key : String) #

[View source]
def stake(address : String, amount : Float64, resource : String, private_key : String) #

[View source]
def status #

[View source]
def transfer_trx(address : String, private_key : String, amount : Float64) #

[View source]
def unstake(address : String, amount : Float64, resource : String, private_key : String) #

[View source]
def unstake_v1(address : String, resource : String, receiver : String | Nil, private_key : String) #

[View source]
def vote_for_witness(address : String, witness : String, votes : Int32, private_key : String) #

[View source]
def withdraw_unstaked_trx(address : String, private_key : String) #

[View source]