class Banano::Protocol
Attributes
node[R]
Public Class Methods
new(uri: Client::LOCAL_ENDPOINT, timeout: Client::DEFAULT_TIMEOUT)
click to toggle source
# File lib/banano.rb, line 9 def initialize(uri: Client::LOCAL_ENDPOINT, timeout: Client::DEFAULT_TIMEOUT) @node = Node.new(uri: uri, timeout: timeout) end
Public Instance Methods
account(address)
click to toggle source
Returns a new instance of {Banano::Account}.
Example:¶ ↑
account = Banano::Protocol.new.account(address: "ban_3e3j...")
@param address [String] the id of the account you want to work with @return [Banano::Account]
# File lib/banano.rb, line 20 def account(address) Banano::Account.new(node: @node, address: address) end
block(block)
click to toggle source
key(key = nil)
click to toggle source
wallet(wallet = nil)
click to toggle source
Returns a new instance of {Banano::Wallet}.
Example:¶ ↑
wallet = Banano::Protocol.new.wallet("000D1BAE...")
@param wallet [String] the id of the wallet you want to work with @return [Banano::Wallet]
# File lib/banano.rb, line 53 def wallet(wallet = nil) Banano::Wallet.new(node: @node, wallet: wallet) end