diff --git a/packages/lib/README.md b/packages/lib/README.md index 13cf96453..1a6470700 100644 --- a/packages/lib/README.md +++ b/packages/lib/README.md @@ -7,13 +7,53 @@

-## Prerequisites +## Use in a Browser + +Create a file `index.html` and open it in your browser. + + + + +```html + + + + + + + Counter value: * + + +``` -You need to have [node.js](https://nodejs.org/en/) installed. + + +You should see "Counter value: x" where x is '*' at first, then '0' and then '1'. Have a look [here](https://github.com/bitcoin-computer/monorepo/tree/main/packages/cra-template#readme) for a full example using React. ## Use on a Server -To install, run the commands below +You need to have [node.js](https://nodejs.org/en/) installed. First install the Bitcoin Computer library. @@ -27,7 +67,7 @@ npm install @bitcoin-computer/lib -Create a file `index.mjs` containing the smart contract +Then create a file `index.mjs`. @@ -90,59 +130,7 @@ Counter { -## Use in a Browser - -Create a file `index.html` containing the smart contract. - - - -```html - - - - - - - Counter value: * - - -``` - - - -Open the HTML file in your browser. - - - -```bash -# Open html file in browser -open index.html -``` - - - -You should see "Counter value: x" where x is * at first, then 0 and then 1. +You can find a full example [here](https://github.com/bitcoin-computer/monorepo/tree/main/packages/nodejs-template#readme). ## Connect to a Bitcoin Computer Node @@ -186,7 +174,7 @@ This fee is in addition to the mining fee. You can configure satoshis per byte. ## Development Status -We do not yet recommend to use the Bitcoin Computer in production. +We are in beta, so there is a possibility of unknown bugs. ## License