Note: This document can be found on both our documentation website and GitHub repository
This document describes how to get started with Newton's NewChain SDK. At present we support NodeJS, Python, and Java. Example transaction code for each language can be found in the examples folder
For more detailed reference information, please check:
- RPC and API reference
- Chain IDs for devnet, testnet, and mainnet ID codes
- Address standards for NewChain address standards
Clone our GitLab repo and enter the directory:
git clone https://github.com/newtonproject/newchain-sdk-example.git
cd newchain-sdk-example
All example code is stored in the examples folder.
NewChain's Javascript library can be downloaded from NPM
npm install newchain-web3
cd examples/node
npm install --save
node index.js
NewChain's Python library can be downloaded from PyPI
cd examples/python/test/
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
python tx.py create
python tx.py balance 0x0286a28b49b3462252e3162a982ef28a8a8611dc
python tx.py pay --src 0x0286a28b49b3462252e3162A982EF28a8A8611dc --dest 0x97549E368AcaFdCAE786BB93D98379f1D1561a29 --value 1 --rpc https://rpc1.newchain.newtonproject.org -value 100
Please refer to the Java documentation for additional information.