-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
23 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
``` | ||
|
@@ -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 | ||
|
||
|