Skip to content

Commit

Permalink
chore(docs): Update README (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrr523 authored Sep 15, 2023
1 parent cb8d60d commit 5143456
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,46 @@ You can find some package documentation below:
| [@bnb-chain/greenfield-js-sdk](./packages/chain-sdk/README.md) | A client library for Greenfield Chain |
| [@bnb-chain/greenfiled-file-handle](./packages/file-handle/README.md) | WASM module that handle file, such as `checksums` |
| [@bnb-chain/greenfield-zk-crypto](./packages/zk-crypto/README.md) | WASM module about sign crypto |
| [@bnb-chain/create-gnfd-app](./packages/create-gnfd-app/README.md) | Create Greenfield App Quickly |

## Document
[Document](./packages/chain-sdk/README.md)
## Online Examples

## Examples
* [Nextjs](https://codesandbox.io/p/github/rrr523/greenfield-nextjs-template/main)
* [Create React App](https://codesandbox.io/p/github/rrr523/greenfield-cra-template/main)
* [Vite](https://codesandbox.io/p/github/rrr523/greenfield-vite-template/main)

There are runnable examples included in the [examples](./examples/) folder
## Quick Start

* [Next.js Example(TypeScript)](./examples/nextjs/README.md)
* [Nodejs](./examples/nodejs/README.md)
You can use [`create-gnfd-app`](./packages/create-gnfd-app/README.md) to create a app quickly.

```bash
> npx @bnb-chain/create-gnfd-app
```

### Try in Stackblitz
![](./packages/create-gnfd-app/example.gif)

You can try out some examples directly in your browser through Stackblitz:

* [Next.js Exmaple(Typescript)](https://stackblitz.com/edit/github-kikred?file=src%2Fpages%2Ftx.tsx)
<!-- There are runnable examples included in the [examples](./examples/) folder
* [Next.js Example(TypeScript)](./examples/nextjs/README.md)
* [Nodejs](./examples/nodejs/README.md) -->

### Running Examples Locally

Clone the project and install dependencies:
<!--
1. Clone the project and install dependencies:
```bash
> git clone [email protected]:bnb-chain/greenfield-js-sdk.git
> cd greenfield-js-sdk
> pnpm install
```
Build package:
2. Build package:
```bash
> pnpm run -F "./packages/**" -r build
```
copy env template file:
3. copy env template file:
```bash
> cp .env.simple .env
```
Expand All @@ -60,13 +67,12 @@ NEXT_PUBLIC_TOKEN_HUB_CONTRACT_ADDRESS=
NEXT_PUBLIC_CROSS_CHAIN_CONTRACT_ADDRESS=
```
> The contract address may be outdated due to Greenfield reset, refer to https://docs.bnbchain.org/greenfield-docs/docs/guide/dapp/contract-list get the latest contract address.
> The contract address may be outdated due to Greenfield reset, refer to https://docs.bnbchain.org/greenfield-docs/docs/guide/dapp/contract-list get the latest contract address. -->


abd then run example:
<!-- abd then run example:
```bash
> npx next dev
```
``` -->

## Supported JS environments

Expand Down

0 comments on commit 5143456

Please sign in to comment.