diff --git a/examples/nextjs/README.md b/examples/nextjs/README.md index 7e9681db..0ada97d6 100644 --- a/examples/nextjs/README.md +++ b/examples/nextjs/README.md @@ -2,6 +2,43 @@ Use [React](https://react.dev/) and [Next.js](https://nextjs.org/) +## Prepare + +### install and build + +Install dependencies: + +```bash +pnpm install +``` + +Build package: + +```bash +pnpm run -F "./packages/**" -r build +``` + + +### Run the demo application + +`cp .env.simple .env` and fill your own configuration: + +```bash +NEXT_PUBLIC_GRPC_URL=https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org + +NEXT_PUBLIC_GREENFIELD_RPC_URL=https://gnfd-testnet-ethapi-us.bnbchain.org +NEXT_PUBLIC_GREEN_CHAIN_ID=5600 + +# BSC End POINT +NEXT_PUBLIC_BSC_RPC_URL=https://gnfd-bsc-testnet-dataseed1.bnbchain.org +NEXT_PUBLIC_BSC_CHAIN_ID=5601 +``` + +> this is TESTNET's configuration. + + +Run the demo application: `npm run dev` + ## Usage case * tx diff --git a/examples/nodejs/README.md b/examples/nodejs/README.md index 1881966e..c6a93952 100644 --- a/examples/nodejs/README.md +++ b/examples/nodejs/README.md @@ -1,9 +1,34 @@ # GreenField JS SDK Node.js -> NOTICE: Before running, you need to fill your account's private key and address in [env.js](./env.js). + +## Prepare + +### install and build + +Install dependencies: + +```bash +pnpm install +``` + +Build package: + +```bash +pnpm run -F "./packages/**" -r build +``` + +### Run the demo application + +Fill your account's private key and address in [env.js](./env.js). + +## Execure example ```bash > node storage.js ``` -[More examples](../../packages/js-sdk/tests/) +* [storages.js](./storage.js) +* [account.js](./account.js) +* [policy.js](./policy.js) +* [query.js](./query.js) +* [transfer.js](./transfer.js)