Skip to content

conflux-fans/js-sdk-example

Repository files navigation

js-sdk-example

This repo contains several js-conflux-sdk usage examples, which are are located at src folder.

It also contain some contracts, they can be compiled by hardhat npx hardhat compile.

Local Develop Environment

Node.js is required to run the examples.

Install dependencies.

$ npm install

Add local env file

$ cp .env.example .env 

Edit the options URL, NETWORKID, PRIVATE_KEY in it.

Compile contracts

$ npx hardhat compile

Faucet

You can get some testnet CFX from Conflux Testnet Faucet.

FluentWallet is required to use the faucet.

Examples

Basic

  1. SDK initialize
  2. Query blockchain info by invoke RPC methods
  3. How to send conflux transactions
  4. Interact with contract: Query contract state; update contract state
  5. Recover portal personal_sign's signature

Accounts

  1. Batch generate account
  2. HD Wallet

Resources

About

Usage example of js-conflux-sdk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published