Method: NanoAccount#initialize

Defined in:
lib/account.rb

#initialize(address, public_key = nil, private_key = nil, representative = nil) ⇒ NanoAccount

Create a new NanoAccount instance representing an existing account. public_key and private_key are optional, but without them the account is immutable. Params:

address

The address of the account.

public_key

(Optional) The public key of the account.

private_key

(Optional) The private key of the account.

representative

(Optional) This block’s representative. Required only if the account must be opened.



20
21
22
23
24
25
# File 'lib/account.rb', line 20

def initialize(address, public_key=nil, private_key=nil, representative=nil)
    @address = address
    @public_key = public_key
    @private_key = private_key
    @representative = representative || address
end