From 84d6fdfc37f732a85bdb1c00e0ee1aab9a601baa Mon Sep 17 00:00:00 2001 From: Chris Chinchilla Date: Tue, 7 Jul 2020 14:41:23 +0200 Subject: [PATCH 1/3] Start review of getting started guide --- docs.wrm/getting-started.wrm | 57 ++++++++++++++++++++++++------------ docs.wrm/index.wrm | 2 +- 2 files changed, 39 insertions(+), 20 deletions(-) diff --git a/docs.wrm/getting-started.wrm b/docs.wrm/getting-started.wrm index 49fc13329..0428e3124 100644 --- a/docs.wrm/getting-started.wrm +++ b/docs.wrm/getting-started.wrm @@ -3,14 +3,14 @@ _section: Getting Started @ _subsection: Installing @ -The various Classes and Functions are available to be imported +Ethers' various Classes and Functions are available to import manually from sub-packages under the [@ethersproject](link-ethers-npm) organization but for most projects, the umbrella package is the easiest way to get started. _code: @lang -/home/ricmoo> npm install --save ethers@next +/home/ricmoo> npm install --save ethers _subsection: Importing @ @@ -32,7 +32,7 @@ It is generally better practice (for security reasons) to copy the [ethers library](link-ethers-js) to your own webserver and serve it yourself. -For quick demos or prototyping though, it can be loaded in your +For quick demos or prototyping though, you can load it in your Web Applications from our CDN. @@ -64,8 +64,8 @@ $Signer: A Signer is a class which (usually) in some way directly or and transactions to authorize the network to charge your account ether to perform operations. $Contract: A Contract is an abstraction which represents a connection to a - specific contract on the Ethereum Network, so that it can be - used like a normal JavaScipt object. + specific contract on the Ethereum Network, so that applications + can use it like a normal JavaScipt object. | **Provider** | $Provider | @@ -90,14 +90,34 @@ const provider = new ethers.providers.Web3Provider(window.ethereum) // The Metamask plugin also allows signing transactions to // send ether and pay to change state within the blockchain. -// For this, we need the account signer... +// For this, you need the account signer... const signer = provider.getSigner() +_subsection: Connecting to Ethereum: RPC @ + +The [JSON-RPC API](link-jsonrpc) is another popular method for interacting +with Ethereum and is available in all major Ethereum node implementations +(e.g. [[link-geth]] and [[link-parity]]) as well as many +third-party web services (e.g. [[link-infura]]). It typically provides: + +- A connection to the Ethereum network (a [[Provider]]) +- Holds your private key and can sign thing (a [[Signer]]) + +_code: Connecting to an RPC client @lang