Skip to content

Commit

Permalink
Merge pull request #14 from lukes/3.0.0
Browse files Browse the repository at this point in the history
Merge 3.0.0
  • Loading branch information
lukes committed Apr 13, 2021
2 parents e2673c5 + 0617f44 commit 257a824
Show file tree
Hide file tree
Showing 82 changed files with 52,587 additions and 1,427 deletions.
99 changes: 99 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,105 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 3.0.0

### Removed

- `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 within `Nanook::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 by `Nanook::PrivateKey`.
- `Nanook::Account#info` No longer accepts `detailed:` argument.
- `Nanook::Node#synced?` As this was deprecated for removal in v3.0.

### Added

- 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`

### Changed

- New error classes: `Nanook::ConnectionError`, `NanoUnitError`, `NodeRpcError` and `NodeRpcConfigurationError`.
- `Nanook::Wallet#default_representative` returns a `Nanook::Account`.
- `Nanook::Wallet#change_representative` returns a `Nanook::Account`.
- `Nanook::Wallet#unlock` can be passed no argument (`password` will be `nil`).
- `Nanook::Wallet#info` returns data from `wallet_info` RPC.
- `Nanook::Block#is_valid_work?` renamed to `#valid_work?`.
- `Nanook::Block#republish` returns an Array of `Nanook::Block`s.
- `Nanook::Block#chain` returns an Array of `Nanook::Block`s.
- `Nanook::Block#successors` returns an Array of `Nanook::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 as `Nanook::Block`.
- `Nanook::Node#peers` returns details as a `Hash` keyed by `Nanook::Account`.
- `Nanook::Account#pending` returns source as `Nanook::Account` and block as `Nanook::Block` when `detailed: true`.
- `Nanook::Account#representative` returns a `Nanook::Account`.
- `Nanook::Account#delegators` returns accounts as `Nanook::Account`s.
- `Nanook::Account#history` returns accounts as `Nanook::Account` and blocks as `Nanook::Block`.
- `Nanook::Account#ledger` returns accounts as `Nanook::Account` and blocks as `Nanook::Block`.
- `Nanook::Account#public_key` returns a `Nanook::PublicKey`.
- `Nanook::Account#weight` accepts an optional `unit:` argment.
- `Nanook::Account#info`:
- returns the `frontier`, `open_block`, `representative_block` values as `Nanook::Block`s.
- returns the `representative` as a `Nanook::Account`.
- `modified_timestamp` key renamed to `last_modified_at` and value is a `Time` in UTC.
- `Nanook::Key` has become `Nanook::PrivateKey`, `#generate` has been renamed `#create` and returns a `Nanook::PrivateKey`.

### Fixed

- A number of errors when node is still bootstrapping and is missing accounts from the ledger.
- `Nanook::Node#representatives_online` accessing representative list as a `Hash` after RPC change.

## 2.5.1

### Fixed
Expand Down
68 changes: 34 additions & 34 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
PATH
remote: .
specs:
nanook (2.5.1)
nanook (3.0.0)
symbolized (= 0.0.1)

GEM
remote: https://rubygems.org/
specs:
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
coderay (1.1.2)
crack (0.4.3)
safe_yaml (~> 1.0.0)
diff-lcs (1.3)
hashdiff (0.3.7)
method_source (0.9.0)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (3.0.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
coderay (1.1.3)
crack (0.4.5)
rexml
diff-lcs (1.4.4)
hashdiff (1.0.1)
method_source (1.0.0)
pry (0.14.0)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
rake (12.3.3)
rspec (3.7.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-collection_matchers (1.1.3)
rexml (3.2.5)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-collection_matchers (1.2.0)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.1)
rspec_junit_formatter (0.3.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0)
safe_yaml (1.0.4)
symbolized (0.0.1)
webmock (3.3.0)
webmock (3.12.2)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
hashdiff (>= 0.4.0, < 2.0.0)
yard (0.9.26)

PLATFORMS
Expand All @@ -53,11 +53,11 @@ DEPENDENCIES
nanook!
pry (~> 0)
rake (~> 12.3)
rspec (~> 3.2)
rspec-collection_matchers (~> 1.1)
rspec_junit_formatter (~> 0.3)
webmock (~> 3.3)
rspec (~> 3.10)
rspec-collection_matchers (~> 1.2)
rspec_junit_formatter (~> 0.4)
webmock (~> 3.12)
yard (>= 0.9.20)

BUNDLED WITH
2.2.3
2.2.16
Loading

0 comments on commit 257a824

Please sign in to comment.