NEO•ONE was designed to get your dapp up and running quickly.
This page describes how to setup NEO•ONE using
If you’re just getting started, try out one of the following toolchains for setting up your project:
Once you have a project setup, the next step is to add NEO•ONE to it. NEO•ONE is organized into multiple individual packages. Use as much or as little as you like. Each package may be installed using either yarn (
yarn add <package name>) or npm (
npm install <package name>). Each package has the form
@neo-one/<name>, for example,
Not sure which packages to use from NEO•ONE? Go ahead and install everything mentioned on this page, and then follow the main guide or the tutorial. By the end of it you’ll know which features of NEO•ONE you’re using and which packages to keep. Install everything with yarn by running:
yarn add @neo-one/client @neo-one/cli @neo-one/smart-contract @neo-one/smart-contract-test @neo-one/smart-contract-typescript-plugin
Install everything with npm by running:
npm install @neo-one/client @neo-one/cli @neo-one/smart-contract @neo-one/smart-contract-test @neo-one/smart-contract-typescript-plugin
Know what you want to use from NEO•ONE? Read on to see which packages to install for specific functionality.
For interacting with smart contracts, you should install
@neo-one/client- Main entrypoint to the most common NEO•ONE client APIs.
For local network and smart contract management, you should install
@neo-one/cli- Provides the
neo-onecli command which manages common tasks like building and deploying smart contracts and spinning up local networks.
In addition to the above, if you’re developing TypeScript smart contracts using NEO•ONE, you should install
@neo-one/smart-contract- TypeScript smart contract standard library.
@neo-one/smart-contract-test- TypeScript smart contract testing utilitiees.
@neo-one/smart-contract-typescript-plugin- TypeScript language server plugin for inline compiler diagnostics in your favorite IDE.
Configure your IDE to use your local TypeScript installation and the
@neo-one/smart-contract-typescript-plugin in order to take advantage of inline compiler diagnostics. These instructions are for VSCode, but they should be similar for any editor that supports TypeScript IntelliSense.
yarn neo-one init. This will create a
tsconfig.jsonfile in the configured smart contract directory (by default,
That’s it! Enjoy inline smart contract compiler diagnostics.