diff --git a/docs/Concepts/Privacy/Multi-Tenancy.md b/docs/Concepts/Privacy/Multi-Tenancy.md index 6337e114ed7..bf2dfa8ecf7 100644 --- a/docs/Concepts/Privacy/Multi-Tenancy.md +++ b/docs/Concepts/Privacy/Multi-Tenancy.md @@ -34,4 +34,4 @@ JSON-RPC requests, and the tenant has access to the requested privacy data. Ther private data, and each tenant uses a JWT token for authentication. You can create the JWT token either -[externally or internally](../../HowTo/Interact/APIs/Authentication.md). \ No newline at end of file +[externally or internally](../../HowTo/Interact/APIs/Authentication.md). diff --git a/docs/Concepts/Privacy/Privacy-Overview.md b/docs/Concepts/Privacy/Privacy-Overview.md index 325400e9502..d5c256e150d 100644 --- a/docs/Concepts/Privacy/Privacy-Overview.md +++ b/docs/Concepts/Privacy/Privacy-Overview.md @@ -32,10 +32,6 @@ nodes participating in the transaction. By default, each participant in a privacy network uses its own Besu and Orion node. [Multi-tenancy](Multi-Tenancy.md) allows multiple participants to use the same Besu and Orion node. -By default, each participant in a privacy network uses its own Besu and Orion -node. [Multi-tenancy](Multi-Tenancy.md) allows multiple participants to use the same Besu and Orion -node. - !!! tip Private Transaction Managers are also known as Enclaves. diff --git a/docs/Concepts/TLS.md b/docs/Concepts/TLS.md index 359366b7687..56f058adf5e 100644 --- a/docs/Concepts/TLS.md +++ b/docs/Concepts/TLS.md @@ -9,7 +9,6 @@ or server ([Orion](https://docs.orion.pegasys.tech/en/latest/Concepts/TLS-Commun ![Besu TLS](../images/Besu_TLS.png) - Private keys and certificates must be stored in a password-protected PKCS #12 keystore files. diff --git a/docs/HowTo/Configure/Configure-TLS.md b/docs/HowTo/Configure/Configure-TLS.md index 84f3b0d8847..56a32aa53eb 100644 --- a/docs/HowTo/Configure/Configure-TLS.md +++ b/docs/HowTo/Configure/Configure-TLS.md @@ -5,7 +5,9 @@ description: Configure TLS # Configure TLS Hyperledger Besu supports TLS for client and server communication. For example, you can -[configure TLS](../../Concepts/TLS.md) for communication between [EthSigner](https://docs.ethsigner.pegasys.tech/en/latest/Concepts/TLS/) and Besu, and Besu and [Orion](https://docs.orion.pegasys.tech/en/latest/Concepts/TLS-Communication/). +[configure TLS](../../Concepts/TLS.md) for communication between +[EthSigner](https://docs.ethsigner.pegasys.tech/en/latest/Concepts/TLS/) and Besu, and Besu and +[Orion](https://docs.orion.pegasys.tech/en/latest/Concepts/TLS-Communication/). Configure TLS communication from the command line. @@ -20,7 +22,7 @@ Allow clients (for example a dApp, curl, or EthSigner) to send and receive secur **Client Prerequisites**: -* [Configure the client for TLS](https://docs.ethsigner.pegasys.tech/en/latest/HowTo/Configure-TLS/#server-tls-connection). +* [Configure the client for TLS] * Client's PKCS #12 keystore information. ### Create the Known Clients File @@ -84,7 +86,7 @@ Allow Besu to securely communicate with the server (Orion). **Server Prerequisites**: -* [Configure the server to allow TLS communication](https://docs.orion.pegasys.tech/en/latest/Tutorials/TLS/). +* [Configure the server to allow TLS communication] * Server's certificate information. ### Create the Known Servers file @@ -124,4 +126,8 @@ The command line: * Specifies the file that contains the password to decrypt the keystore using the [`--privacy-tls-keystore-password-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-keystore-password-file) option. * Specifies the trusted servers using the - [`--privacy-tls-known-enclave-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-known-enclave-file) option. \ No newline at end of file + [`--privacy-tls-known-enclave-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-known-enclave-file) option. + + +[Configure the client for TLS]: https://docs.ethsigner.pegasys.tech/en/latest/HowTo/Configure-TLS/#server-tls-connection +[Configure the server to allow TLS communication]: https://docs.orion.pegasys.tech/en/latest/Tutorials/TLS/ \ No newline at end of file diff --git a/docs/HowTo/Develop-Dapps/Truffle.md b/docs/HowTo/Develop-Dapps/Truffle.md index 5b55ae99743..997dbd03ae1 100644 --- a/docs/HowTo/Develop-Dapps/Truffle.md +++ b/docs/HowTo/Develop-Dapps/Truffle.md @@ -1,30 +1,31 @@ +--- description: Using Hyperledger Besu with Truffle - +--- -# Using Hyperledger Besu with Truffle +# Using Hyperledger Besu with Truffle -Developing for Hyperledger Besu using Truffle is the same as using Truffle to develop for the public -Ethereum networks. -Truffle supports Besu with the only difference being Besu does not implement private key management. -To use Besu with Truffle, you must configure a Truffle wallet. +Developing for Hyperledger Besu using Truffle is the same as developing for public Ethereum +networks using Truffle. Truffle supports Besu with the only difference being Besu does not support +private key management. To use Besu with Truffle, you must configure a Truffle wallet. -## Install Truffle Wallet +## Install a Truffle wallet -To install the Truffle wallet: +To install a Truffle wallet: ```bash npm install --save @truffle/hdwallet-provider ``` !!!note + With Truffle 5, you must use a Web3 1.0 enabled wallet or the Truffle tasks hang. -#### Modify the Truffle Configuration File +### Update the Truffle configuration file -Modify the `truffle-config.js` file in the project directory to add the wallet provider. Replace: +To add the wallet provider, update the `truffle-config.js` file in the project directory. Replace: -* `` with the JSON-RPC endpoint (IP address and port) of a Besu node -* `` with the private key of an Ethereum account containing Ether +* `` with the JSON-RPC endpoint (IP address and port) of a Besu node. +* `` with the private key of an Ethereum account containing Ether. ```javascript const PrivateKeyProvider = require("@truffle/hdwallet-provider"); @@ -43,16 +44,15 @@ module.exports = { }; ``` -### Start Besu Node +### Start a Besu node -Start a Besu node with JSON-RPC enabled on the endpoint specified in the Truffle configuration -file. +Start a Besu node with JSON-RPC enabled on the endpoint specified in the Truffle configuration +file. -### Deploy Contract +### Deploy a contract -To deploy a contract onto the Besu network: +To deploy a contract onto the Besu network: ```bash truffle migrate --network besuWallet ``` - diff --git a/docs/HowTo/Develop-Dapps/Use-web3js.md b/docs/HowTo/Develop-Dapps/Use-web3js.md index ded4023b238..f240853d88d 100644 --- a/docs/HowTo/Develop-Dapps/Use-web3js.md +++ b/docs/HowTo/Develop-Dapps/Use-web3js.md @@ -1,59 +1,72 @@ -description: Hyperledger Besu client libraries - +--- +description: Hyperledger Besu client libraries +--- -# Create a Signed Transaction using Web3.js +# Create a signed transaction using Web3.js -You can use the example Javascript scripts to create and send raw transactions in the private network -created by the [Private Network Example](../../Tutorials/Examples/Private-Network-Example.md). +You can use the example JavaScript scripts to create and send raw transactions in the private +network created by the +[Private Network Example](../../Tutorials/Examples/Private-Network-Example.md). -Update the `JSON-RPC endpoint` in the following examples to the endpoint for the private -network displayed after running the `./run.sh` script. +In the following examples update the `JSON-RPC endpoint` to the endpoint for the private network +displayed after running the `./run.sh` script. !!! warning "Private keys" Do not use the accounts in the examples on mainnet or any public network except for testing. - The private keys are displayed which means the accounts are not secure. - - All accounts and private keys in the examples are from the `dev.json` genesis file in the - [`/besu/ethereum/core/src/main/resources`](https://github.com/hyperledger/besu/tree/master/config/src/main/resources) directory. + They display the private keys, which means the accounts are not secure. - In production environments avoid exposing your private keys by creating signed transactions - offline, or use [EthSigner](https://docs.ethsigner.pegasys.tech/) to isolate your private keys and - sign transactions with [`eth_sendTransaction`](https://docs.ethsigner.pegasys.tech/Using-EthSigner/Using-EthSigner/#eth_sendtransaction). - -## Example Javascript scripts + All accounts and private keys in the examples are from the `dev.json` genesis file in the + [`/besu/ethereum/core/src/main/resources`](https://github.com/hyperledger/besu/tree/master/config/src/main/resources) + directory. + + In production environments avoid exposing your private keys by creating signed transactions + offline, or use [EthSigner](https://docs.ethsigner.pegasys.tech/) to isolate your private keys + and sign transactions with + [`eth_sendTransaction`](https://docs.ethsigner.pegasys.tech/Using-EthSigner/Using-EthSigner/#eth_sendtransaction). + +## Example JavaScript scripts ### 1. Requirements -- [Node.js (version > 10)](https://nodejs.org/en/download/) -- [web3.js 1.0.0 beta](https://github.com/ethereum/web3.js/) and [ethereumjs 1.3](https://github.com/ethereumjs/ethereumjs-tx). -These dependencies are defined in the included [`package.json`](../../scripts/transactions/package.json) file. +* [Node.js (version > 10)](https://nodejs.org/en/download/) +* [web3.js 1.0.0 beta](https://github.com/ethereum/web3.js/) and + [ethereumjs 1.3](https://github.com/ethereumjs/ethereumjs-tx). + +The included [`package.json`](../../scripts/transactions/package.json) file defines these +dependencies. + +### 2. Create a directory -### 2. Create Directory ```bash mkdir example_scripts ``` -### 3. Copy Files +### 3. Copy files + Copy the following files to the `example_scripts` directory: -- [`package.json`](../../scripts/transactions/package.json) -- [`create_value_raw_transaction.js`](../../scripts/transactions/create_value_raw_transaction.js) -- [`create_contract_raw_transaction.js`](../../scripts/transactions/create_contract_raw_transaction.js) +* [`package.json`](../../scripts/transactions/package.json) +* [`create_value_raw_transaction.js`](../../scripts/transactions/create_value_raw_transaction.js) +* [`create_contract_raw_transaction.js`](../../scripts/transactions/create_contract_raw_transaction.js). + +### 4. Retrieve dependencies -### 4. Retrieve Dependencies ```bash cd example_scripts npm install ``` ### 5. Send Ether -The following is the example JavaScript script that displays a signed raw transaction string to send Ether. + +The following is the example JavaScript script displaying a signed raw transaction string to send +Ether. !!! example "Send Ether example : create_value_raw_transaction.js" + ```javascript linenums="1" {! scripts/transactions/create_value_raw_transaction.js !} - + ``` Run the `create_value_raw_transaction.js` script: @@ -67,23 +80,29 @@ node create_value_raw_transaction.js http://localhost:8545 ``` !!! tip - The default JSON-RPC HTTP endpoint for `create_value_raw_transaction.js` is `http://localhost:8545`. - If Besu is listening on `http://localhost:8545`, you can run the command without specifying the endpoint. - -A signed raw transaction string is displayed. -You can send the raw transaction yourself or let the script send it using the web3.js library. + The default JSON-RPC HTTP endpoint for `create_value_raw_transaction.js` is + `http://localhost:8545`. If Besu is listening on `http://localhost:8545`, you can run the + command without specifying the endpoint. + +A signed raw transaction string displays. + +You can send the raw transaction yourself or let the script send it using the web3.js client +library. + +If sending the transaction yourself, the curl command displays, which you can copy and paste. +Otherwise, the script sends the transaction and the transaction receipt displays. -If sending it yourself, the cURL command is displayed and can be copied and pasted. Otherwise, the script sends it and -the transaction receipt is displayed. +### 6. Create a smart contract -### 6. Create A Smart Contract -The following is the example JavaScript script that displays a signed raw transaction string to create a contract. +The following is the example JavaScript script displaying a signed raw transaction string to create +a contract. + +!!! example "Create a contract example : create_contract_raw_transaction.js" -!!! example "Create a contract example : create_contract_raw_transaction.js" ```javascript linenums="1" {! scripts/transactions/create_contract_raw_transaction.js !} - + ``` Run the `create_contract_raw_transaction.js` script: @@ -97,12 +116,15 @@ node create_contract_raw_transaction.js http://localhost:8545 ``` !!! tip - The default JSON-RPC HTTP endpoint for `create_contract_raw_transaction.js` is `http://localhost:8545`. - If using `http://localhost:8545`, run `node create_contract_raw_transaction.js`. - -A signed raw transaction string is displayed. -You can send the raw transaction yourself or let the script send it using the web3.js library. + The default JSON-RPC HTTP endpoint for `create_contract_raw_transaction.js` is + `http://localhost:8545`. If using `http://localhost:8545`, run + `node create_contract_raw_transaction.js`. + +A signed raw transaction string displays. + +You can send the raw transaction yourself or let the script send it using the web3.js client +library. -If sending it yourself, the cURL command is displayed and can be copied and pasted. Otherwise, the script sends it and -the transaction receipt is displayed. +If sending the transaction yourself, the curl command displays, which you can copy and paste. +Otherwise, the script sends the transaction and the transaction receipt displays. \ No newline at end of file