Quick start (JavaScript)

Create your first DApp and run it on local blockchain

Prerequisites

Node.js latest version installed Docker latest version installed

Prepare development environment

Install EVERDEV CLI that will help you easily start local node, compile your contracts, install demo projects and create new empty projects.

$ npm install -g everdev

Start local node (SE)

We will run our test on local blockchain for testing (Evernode SE, start it with this command (docker should be launched).

Install demo application

Create a working folder. Then create a node.js demo project with EVERDEV

What the script does

The script implements the following logic:

  1. Links the project with Node.js Ever-SDK binary. If you plan to use JS SDK in Web, link it with Wasm binary. Read more here.

  2. TONClient instance is created and initialized with Evernode SE ("http://localhost", local blockchain) endpoint. See the list of other available endpoints.

  3. Future address is calculated from the code and data of the contract (data includes signing keys)

  4. Flag useGiver: true allows to sponsor deploy with Evernode SE giver that is hard coded as the default Account giver. You can re-assign it to your own giver.

Sample code

Run it!

Core API

Run:

You will see the result of core.js file execution. Core.js file demonstrades core ever-sdk api. It is the same for all ever-sdk bindings.

Appkit API

Run:

You will see the result of appkit.js file execution. Appkit.js demonstrates high level Appkit package.

Source code

You can find full source code of this sample here

https://github.com/everx-labs/sdk-samples/tree/master/demo/hello-wallet

Last updated

Was this helpful?