https://github.com/CityOfZion/neon-js
Javascript libraries that allow the applications to interact with NEO blockchain
https://github.com/CityOfZion/neon-js
Last synced: 5 months ago
JSON representation
Javascript libraries that allow the applications to interact with NEO blockchain
- Host: GitHub
- URL: https://github.com/CityOfZion/neon-js
- Owner: CityOfZion
- License: mit
- Created: 2017-07-02T23:10:03.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-21T06:52:18.000Z (11 months ago)
- Last Synced: 2024-11-07T23:44:04.441Z (6 months ago)
- Language: TypeScript
- Homepage: https://docs.coz.io/neo3/neon-js/index.html
- Size: 42 MB
- Stars: 184
- Watchers: 14
- Forks: 166
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neo - neon-js - Javascript libraries that allow the Neon wallet to interact with NEO blockchain. (SDKs / MainNet and TestNet (2.7.6+))
README
![]()
neon-js
Neon JavaScript SDK.# Overview
This is the JS SDK for the NEO blockchain platform. This project aims to be a lightweight library focused on providing blockchain interactions in the browser.
Neon-JS is used internally by [Neon Wallet](https://github.com/CityOfZion/neon-wallet/) and many other libraries and applications.
Visit the [docs](https://dojo.coz.io/neo3/neon-js/index.html) to learn how to use this library!
> For `Dapp development`, [NeonDappkit](https://github.com/CityOfZion/neon-dappkit) and [WalletConnectSDK](https://github.com/CityOfZion/wallet-connect-sdk) offer a more user-friendly experience, specifically tailored for this purpose. While Neon-JS provides a comprehensive set of features, these two alternatives are better suited for developing decentralized applications.
# Getting started
## Installation
### Nodejs
```bash
npm i @cityofzion/neon-js
```### Browser through CDN
```html
```
## Usage
### Nodejs
```js
import {
default as Neon
} from "@cityofzion/neon-js";
const acct = Neon.create.account("NKuyBkoGdZZSLyPbJEetheRhMjeznFZszf");
```### Browser
Once imported using the script tag, the module is available as a global object `Neon` .
```js
console.log(Neon);
var acct = Neon.create.account("NKuyBkoGdZZSLyPbJEetheRhMjeznFZszf");
```> **Note**
> For most use-cases, we recommend `neon-js` .
> Do not use `neon-js` and `neon-core` in the same project. The classes are not cross-package compatible. See https://github.com/CityOfZion/neon-js/issues/850.# Contributing
Please refer to [ `CONTRIBUTING` ](./CONTRIBUTING.md) for development practices.
## Setup
This repository is a typescript mono-repo using Lerna. Please ensure the following is installed:
* Node (latest LTS aka v18 at time of writing)
> `lerna` is optional and only required for advanced operations.
```sh
git clone https://github.com/CityOfZion/neon-js.git
cd neon-js
yarn
npm run bootstrap
npm run build
```## Testing
```sh
npm run lint
npm run build
npm run dist
npm run test:unit
npm run test:integration
```# Docs
We use Docusaurus for our docs website. The docs are stored in `./docs` while the main website and its configuration is in `./website` .
```sh
cd website
yarn
npm run start
```# License
* Open-source [MIT](https://github.com/CityOfZion/neon-js/blob/master/LICENSE.md).
* Main author and maintainer is [Yak Jun Xiang](https://github.com/snowypowers).