OCAP DApp starter template with @arcblock/ocap-js integrated, bootstrapped using create-react-app.
中文版文档请猛击 README.cn.md
Make sure you have npm v6+ installed.
npx create-react-app my-ocap-app --scripts-version @arcblock/react-scripts
cd my-ocap-app
yarn start
git clone https://github.com/ArcBlock/ocap-react-starter.git
cd ocap-react-starter
yarn
yarn serve
If you are from China, use a mirror npm registry maybe better:
yarn --registry=https://registry.npm.taobao.org
- SDK Initialize: src/libs/ocap.js
- Query Demo: src/pages/Query/index.js
- Subscription Demo: src/pages/Subscription/index.js
- SDK Homepage
- SDK API Specification
- Bitcoin API and Response Formats
- Ethereum API and Response Formats
We recommend deploying your project to now.sh:
- create an account at https://zeit.co/
- install zeit cli:
npm install -g now
- login through zeit-cli,
now login
- change your domain alias in deploy.sh
- run
npm run deploy
Congratulations, your project is online.