class IcAgent::Common::CyclesWallet

Constants

DID_FILE

Attributes

agent[RW]
canister[RW]
client[RW]
identity[RW]

Public Class Methods

new(iden = nil, wallet_id) click to toggle source

Constructor for the CyclesWallet class.

Parameters:

# File lib/ic_agent/common/cycles_wallet.rb, line 269
def initialize(iden = nil, wallet_id)
  @identity = iden.nil? ? IcAgent::Identity.new : iden
  @client = IcAgent::Client.new
  @agent = IcAgent::Agent.new(@identity, @client)
  @canister = IcAgent::Canister.new(@agent, wallet_id, DID_FILE)
end