class IcAgent::Common::Ledger

Constants

CANISTER_ID
DID_FILE

Attributes

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

Public Class Methods

new(iden = nil) click to toggle source

Constructor for the Ledger class.

Parameters:

  • iden: (Optional) An instance of the Identity class.

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