Skip to content

Commit

Permalink
Chore/update deps (#349)
Browse files Browse the repository at this point in the history
* chore: Update deps

* chore: Update deps
  • Loading branch information
rrr523 authored Sep 19, 2023
1 parent f9fbcf3 commit 69f9bd7
Show file tree
Hide file tree
Showing 4 changed files with 2,186 additions and 2,382 deletions.
65 changes: 15 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# GreenField JS SDK
# GreenField JS SDK ![License](https://img.shields.io/npm/l/%40bnb-chain%2Fgreenfield-js-sdk) ![version](https://img.shields.io/npm/v/%40bnb-chain%2Fgreenfield-js-sdk?color=blue)

A Greenfield JS SDK is an easy-to-use tool designed to help developers build decentralized applications (DApps) on the Greenfield blockchain using JavaScript. It provides a simple and straightforward starting point for developers to create DApps with the latest technology and best practices, making Dapp development more efficient. This SDK includes features and tools to make interacting with the Greenfield blockchain easy, such as libraries for common functionality, testing tools, and documentation. With a Greenfield JS SDK, developers can create scalable, maintainable, and efficient DApps for a variety of use cases.

## Documentation

You can find some package documentation below:

| Package | Description |
| --- | --- |
| [@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 |
| Package | Description | Version |
| --- | --- | --- |
| [@bnb-chain/greenfield-js-sdk](./packages/chain-sdk/README.md) | A client library for Greenfield Chain | ![npm](https://img.shields.io/npm/v/%40bnb-chain%2Fgreenfield-js-sdk?color=blue) |
| [@bnb-chain/greenfiled-file-handle](./packages/file-handle/README.md) | WASM module that handle file, such as `checksums` | ![npm](https://img.shields.io/npm/v/%40bnb-chain%2Fgreenfiled-file-handle?color=blue) |
| [@bnb-chain/greenfield-zk-crypto](./packages/zk-crypto/README.md) | WASM module about sign crypto | ![npm](https://img.shields.io/npm/v/%40bnb-chain%2Fgreenfield-zk-crypto?color=blue) |
| [@bnb-chain/create-gnfd-app](./packages/create-gnfd-app/README.md) | Create Greenfield App Quickly | ![npm](https://img.shields.io/npm/v/%40bnb-chain%2Fcreate-gnfd-app?color=blue) |

## Online Examples

Expand All @@ -28,63 +29,27 @@ You can use [`create-gnfd-app`](./packages/create-gnfd-app/README.md) to create

![](./packages/create-gnfd-app/example.gif)

## Supported JS environments

<!-- There are runnable examples included in the [examples](./examples/) folder
* [Next.js Example(TypeScript)](./examples/nextjs/README.md)
* [Nodejs](./examples/nodejs/README.md) -->
1. Modern browsers (Chromium, Firefox, Safari)
2. Browser extensions (Chromium, Firefox)
3. Nodejs

## Contribution

<!--
1. Clone the project and install dependencies:
1. install dependencies

```bash
> git clone [email protected]:bnb-chain/greenfield-js-sdk.git
> cd greenfield-js-sdk
> pnpm install
```

2. Build package:
```bash
> pnpm run -F "./packages/**" -r build
```
3. copy env template file:
```bash
> cp .env.simple .env
```
and then enter your own configuration. Take testnet, for example:
```bash
NEXT_PUBLIC_GRPC_URL=https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org
NEXT_PUBLIC_GREENFIELD_RPC_URL=https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org
NEXT_PUBLIC_GREEN_CHAIN_ID=5600
NEXT_PUBLIC_BSC_RPC_URL=https://gnfd-bsc-testnet-dataseed1.bnbchain.org
NEXT_PUBLIC_BSC_CHAIN_ID=97
# refer to https://docs.bnbchain.org/greenfield-docs/docs/guide/dapp/contract-list
NEXT_PUBLIC_TOKEN_HUB_CONTRACT_ADDRESS=
NEXT_PUBLIC_CROSS_CHAIN_CONTRACT_ADDRESS=
> pnpm run build
```

> 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:
```bash
> npx next dev
``` -->

## Supported JS environments

1. Modern browsers (Chromium, Firefox, Safari)
2. Browser extensions (Chromium, Firefox)
3. Nodejs

## Contribution

Look over [CONTRIBUTING](./CONTRIBUTING.md)


## Disclaimer

Look over [DISCLAIMER](./DISCLAIMER.md)
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"scripts": {
"prepare": "husky install",
"version": "pnpm install && changeset version",
"clean": "rimraf node_modules **/*/node_modules"
"clean": "rimraf node_modules **/*/node_modules",
"build": "pnpm run -F \"./packages/**\" -r build"
},
"keywords": [
"greenfield"
Expand All @@ -26,11 +27,7 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-strip": "^3.0.2",
"@rollup/plugin-typescript": "^8.5.0",
"rollup": "^2.79.1",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-polyfill-node": "^0.10.2",
"rollup-plugin-terser": "^7.0.2",
"@rollup/plugin-typescript": "^11.1.3",
"@types/chai": "^4.3.5",
"@types/mocha": "^9.1.1",
"@types/node": "^18.16.18",
Expand All @@ -47,6 +44,10 @@
"lint-staged": "^13.2.2",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
"rimraf": "^3.0.2"
"rimraf": "^3.0.2",
"rollup": "^2.79.1",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-polyfill-node": "^0.10.2",
"rollup-plugin-terser": "^7.0.2"
}
}
5 changes: 3 additions & 2 deletions packages/js-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"tslib": "^2.5.0",
"typescript": "^4.9.5"
"typescript": "^4.9.5",
"@rollup/plugin-typescript": "^11.1.3"
}
}
}
Loading

0 comments on commit 69f9bd7

Please sign in to comment.