All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Node#bootstrap_lazy
now returns the v22 node response of aHash
of keysstarted
andkey_inserted
with boolean values.Node#bootstrap_any
now optionally takesaccount
argument.Account#pending
andWalletAccount#pending
:- now optionally takes
sorted
argument. - now optionally takes
allow_unconfirmed
argument.
- now optionally takes
Account#balance
andWalletAccount#balance
now optionally takesallow_unconfirmed
argument.Account#info
andWalletAccount#info
now optionally takesallow_unconfirmed
argument.Block#pending?
now optionally takesallow_unconfirmed
argument.Wallet#pending
now optionally takesallow_unconfirmed
argument.
Block#next
.Block#descendants
aliasesBlock#successors
Block.chain
andBlock.successors
no longer return the Block itself in the response.
- Fix
Block#type
beingnil
when RPC doesn't return asubtype
.
Nanook::Block#block_count_by_type
Removed, as the RPC no longer supports this command.Nanook::Block#history
Removed, as the RPC command is deprecated.Nanook::Block#publish
Removed, as the RPC command expects more data than what we instantiate withinNanook::Block
.- Removed all RPC calls that are not recommended for production:
Nanook::Node#bootstrap_status
.Nanook::Node#confirmation_history
.Nanook::Node#confirmed_recently?
.
Nanook::Key
Replaced byNanook::PrivateKey
.Nanook::Account#info
No longer acceptsdetailed:
argument.Nanook::Node#synced?
As this was deprecated for removal in v3.0.
- Added missing
Nanook::WalletAccount#block_count
delegate. - Added
Nanook#network_telemetry
. - Added
Nanook::Rpc#test
. - Added
Nanook::WalletAccount#work
. - Added
Nanook::WalletAccount#set_work
. - Added
Nanook::Account#blocks
. - Added
Nanook::Account#delegators_count
. - Added
Nanook::Account#open_block
. - Added
Nanook::Node#change_receive_minimum
. - Added
Nanook::Node#confirmation_quorum
. - Added
Nanook::Node#keepalive
. - Added
Nanook::Node#receive_minimum
. - Added
Nanook::Node#search_pending
. - Added
Nanook::Wallet#history
. - Added
Nanook::Wallet#exists?
. - Added
Nanook::Wallet#ledger
. - Added
Nanook::Wallet#move_accounts
. - Added
Nanook::Wallet#remove_account
. - Added
Nanook::Wallet#republish_blocks
. - Added
Nanook::Wallet#search_pending
. - Added
Nanook::Wallet#work
. - Added
Nanook::Block#account
. - Added
Nanook::Block#amount
. - Added
Nanook::Block#balance
. - Added
Nanook::Block#change?
. - Added
Nanook::Block#confirmed?
. - Added
Nanook::Block#epoch?
. - Added
Nanook::Block#exists?
. - Added
Nanook::Block#height
. - Added
Nanook::Block#open?
. - Added
Nanook::Block#previous
. - Added
Nanook::Block#receive?
. - Added
Nanook::Block#representative
. - Added
Nanook::Block#send?
. - Added
Nanook::Block#signature
. - Added
Nanook::Block#timestamp
. - Added
Nanook::Block#type
. - Added
Nanook::Block#unconfirmed?
. - Added
Nanook::Block#work
. - Added
Nanook::PrivateKey
with methods#create
,#account
and#public_key
. - Added
Nanook::PublicKey
with method#account
. - Added equality testing methods
#==
,#eql?
and#hash
for:Nanook::Account
Nanook::Block
Nanook::PrivateKey
Nanook::PublicKey
Nanook::Wallet
Nanook::WalletAccount
- New error classes:
Nanook::ConnectionError
,NanoUnitError
,NodeRpcError
andNodeRpcConfigurationError
. Nanook::Wallet#default_representative
returns aNanook::Account
.Nanook::Wallet#change_representative
returns aNanook::Account
.Nanook::Wallet#unlock
can be passed no argument (password
will benil
).Nanook::Wallet#info
returns data fromwallet_info
RPC.Nanook::Block#is_valid_work?
renamed to#valid_work?
.Nanook::Block#republish
returns an Array ofNanook::Block
s.Nanook::Block#chain
returns an Array ofNanook::Block
s.Nanook::Block#successors
returns an Array ofNanook::Block
s.Nanook::Block#info
:- returns balances in nano, and can optionally be passed
unit: :raw
argument. - returns account values as
Nanook::Account
and block values asNanook::Block
.
- returns balances in nano, and can optionally be passed
Nanook::Node#peers
returns details as aHash
keyed byNanook::Account
.Nanook::Account#pending
returns source asNanook::Account
and block asNanook::Block
whendetailed: true
.Nanook::Account#representative
returns aNanook::Account
.Nanook::Account#delegators
returns accounts asNanook::Account
s.Nanook::Account#history
returns accounts asNanook::Account
and blocks asNanook::Block
.Nanook::Account#ledger
returns accounts asNanook::Account
and blocks asNanook::Block
.Nanook::Account#public_key
returns aNanook::PublicKey
.Nanook::Account#weight
accepts an optionalunit:
argment.Nanook::Account#info
:- returns the
frontier
,open_block
,representative_block
values asNanook::Block
s. - returns the
representative
as aNanook::Account
. modified_timestamp
key renamed tolast_modified_at
and value is aTime
in UTC.
- returns the
Nanook::Key
has becomeNanook::PrivateKey
,#generate
has been renamed#create
and returns aNanook::PrivateKey
.
- A number of errors when node is still bootstrapping and is missing accounts from the ledger.
Nanook::Node#representatives_online
accessing representative list as aHash
after RPC change.
- undefined method 'new' for
BigDecimal:Class
(thank you @MihaiVoinea)
- New
Nanook::Node#bootstrap_lazy
method. - New
Nanook::Node#bootstrap_status
method. - New
Nanook::Node#difficulty
method. - New
Nanook::Node#uptime
method. - New
Nanook::Wallet#lock
method.
Nanook::Node#chain
now takes optionaloffset
argument.Nanook::Node#successors
now takes optionaloffset
argument.Nanook::Node#successors
now aliased asNanook::Node#ancestors
- Updated docs to use
nano_
prefixed addresses.
- New
Nanook::Node#confirmation_history
method. - New
Nanook::Block#confirm
method. - New
Nanook::Block#confirmed_recently?
method.
Nanook::Block#generate_work
now can take optionaluse_peers
argument.
- New
Nanook::Wallet#default_representative
method. - New
Nanook::Wallet#change_default_representative
method. - New
Nanook::Wallet#info
method.
- New
Nanook::Account#block_count
method returns number of blocks in ledger for an account. Nanook::Node#block_count_type
is now an alias to the preferred#block_count_by_type
method.- new
Nanook::Node#representatives_online
method. Nanook::Node#synchronizing_blocks
aliased by#unchecked
, for people familiar with what the RPC calls it.Nanook::Node#version
now an aliased by#info
method.Nanook::WalletAccount#exists?
now aliased by#open?
Nanook::WalletAccount#account_id
Removed, as there was already anid
method that returned this.Nanook::WalletAccount#wallet_id
Removed, as theWalletAccount
object should be considered a kind of Account.
Nanook::Account#delegators
now takesunit
argument.Nanook::Account#ledger
now takesunit
andmodified_since
arguments.Nanook::Node#representatives
now takesunit
argument.Nanook::Node#synced?
is deprecated with awarn
. Nodes never seem to reach 100% synchronized, so this method is useless.Nanook::Rpc::DEFAULT_TIMEOUT
reduced from 500 to 60.
- Payment methods no longer check that recipient account has an open block, as this prevents funds being sent to accounts about to be opened.
- Payment methods now check the account id of the recipient is valid, raises ArgumentError if not.
- Payment methods now return a Nanook::Error if the RPC returns an error when trying to pay, instead of a String.
- User can define
Nanook::UNIT = :raw
to set the default unit to:raw
instead of:nano
. Nanook::Wallet#restore
to create a wallet, change its seed and create x number of accounts.Nanook::WalletAccount#create
takes an optional argument to signal how many accounts to create.- New
Nanook::WalletAccount#change_representative
method to change an account's representative. - New
Nanook::Node#account_count
method to return number of known accounts in ledger. - New
Nanook::Node#synchronizing_blocks
method to return information about "unchecked" synchronizing blocks. - New
Nanook::Account#last_modified_at
method. - Added ruby version requirement >= 2.0 to gemspec.
Nanook::Rpc#inspect
displays full hostname with scheme and port.Nanook::Account#new
account
param is now required.Nanook::Account#info
now also returns theid
of the account.Nanook::Account#history
now returnsamount
in NANO by default, takesunit: :raw
argument to return in raw.Nanook::Account#info
now returnsbalance
andpending
in NANO by default, takesunit: :raw
argument to return in raw.Nanook::Account#exists?
now checks for open block.Nanook::Account#pending
now takes additional argumentsdetailed:
andunit:
.Nanook::Block#account
now returns aNanook::Account
instance.Nanook::Block#info
now also returns theid
of the block.Nanook::Wallet#accounts
now returnsNanook::WalletAccount
instances.Nanook::Wallet#create
now returns aNanook::Wallet
instance.Nanook::Wallet#pending
now takes additional argumentsdetailed:
andunit:
.Nanook::Wallet#seed
alias method of#id
.Nanook::WalletAccount#create
now returnsNanook::WalletAccount
instances.- Changed documentation generating tool from rdoc to yard.
- Missing
Nanook#rpc
accessor. Nanook::Block#publish
can return false when publish fails.Nanook::Block#info
correctly handlesallow_unchecked: true
errors.
Nanook::Wallet#balance(account_break_down: true)
always returning 0pending
balance.
- Use
block.publish
inREADME.md
and not the aliasblock.process
.
- Added this CHANGELOG.md
- All classes have an
inspect
method - New
id
method forNanook::Account
,Nanook::Block
,Nanook::Key
andNanook::Wallet
classes Nanook::WalletAccount
class has anaccount_id
andwallet_id
method
- Balance checking methods will now return the balance in NANO by default.
They take an argument
unit:
which can be set to:raw
to have the balance return in raw units. - All pay methods continue to take NANO as the default unit, but can now
also take an argument
unit:
which can be set to:raw
to have theamount
argument be treated as being in raw instead of NANO.