2.0.0-rc1

@juanfranblanco juanfranblanco released this Feb 8, 2017 · 445 commits to master since this release

2.0.0-rc1

The new version of Nethereum separates the standardised RPC method across clients and the custom functionality provided by the different clients like Geth, Parity or the new Quorum.

It also separates core functionality into new separate libraries.

New libraries

Nethereum.Geth

Netherum.Geth is the extended Web3 library for Geth. including the non-generic RPC API client methods to interact with the Go Ethereum Client (Geth) Admin, Debug, Miner.

Netherum.Parity

Coming soon

Netherum.Contracts

Nethereum Contracts is the core library to interact via RPC with Smart contracts in Ethereum.

Netherum.Signer

Nethereum signer library to sign and verify messages, RLP and transactions using an Ethereum account

Netherum.RLP

The RLP Encoding and decoding library.

New features

Accounts

There are two types of Accounts that can be used in conjunction with Web3, Account (normal) and ManagedAccount.

Account

The main Account can be created using a private key, EthECKey or Loaded from a json or file using from a KeyStore.

When Web3 is instantiated using the Account, the default SignedTransactionManager will be used when interacting with contracts, meaning that all transactions will be signed offline using the account private key.

 var web3 = new Web3Geth(new Account(privateKey));

ManagedAccount

A managed account is an account managed by a third party client (Geth or Parity), this instantiated with the account address and password.

When Web3 is instantiated using the Account, the default ClientPersonalTransactionManager will be used when interacting with contracts, meaning that all transactions will use Personal_SendTransaction using the the password provided.

var web3 = new Web3(new ManagedAccount(account, password),);

Transaction Managers

Breaking changes

  • New namespaces have been created to match the new structure.
  • If you require controlling the mining process using Geth, you will need to use Nethereum.Geth. Web3Geth
  • Accounts recovered from private keys will return Account address using the Checksum
  • Functions and Contract deployment do not use the SignAndSendTransaction passing a password, you will need to use with Web3 a ManagedAccount or a ClientPersonalTransactionManager.
  • New EthECKey and EthECDSASignature so if you are using ECKey or ECDASignature, these abstract the functionality to avoid libraries dependencies on Elliptic Curve.

Nugets

As usual, the latest Nugets can be downloaded from Nuget.org