@neon-exchange/neon-js

Neon-JS SDK for interacting with NEO blockchain

Usage no npm install needed!

<script type="module">
  import neonExchangeNeonJs from 'https://cdn.skypack.dev/@neon-exchange/neon-js';
</script>

README

neon-js

Constructed package using:

  • neon-core
  • neon-api
  • neon-nep5

In addition, this package exposes a high level semantic API binding for beginner usage. The semantic API can be found in the default export of the package.

const Neon = require("cityofzion/neon-js");

console.log(Neon); // {wallet, tx, api, nep5, etc...}

const NeonJs = neon.default;

console.log(NeonJs); // {create, get, sign, verify,...}

The semantic API follows a convention of Verb-Noun. Any extra words beyond the first 2 is collapsed into the Noun and camelcased.

NeonJs.create.stringStream("1234");
NeonJs.encrypt.privateKey("key");

The exceptions to this rule are the managed methods provided by api:

NeonJs.sendAsset
NeonJs.claimGas
NeonJs.doInvoke
NeonJs.setupVote