UNPKG

830 BMarkdownView Raw
1# neon-js
2
3Constructed package using:
4
5- `neon-core`
6- `neon-api`
7- `neon-nep5`
8
9In 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.
10
11```js
12const Neon = require("cityofzion/neon-js");
13
14console.log(Neon); // {wallet, tx, api, nep5, etc...}
15
16const NeonJs = neon.default;
17
18console.log(NeonJs); // {create, get, sign, verify,...}
19```
20
21The semantic API follows a convention of Verb-Noun. Any extra words beyond the first 2 is collapsed into the Noun and camelcased.
22
23```js
24NeonJs.create.stringStream("1234");
25NeonJs.encrypt.privateKey("key");
26```
27
28The exceptions to this rule are the managed methods provided by `api`:
29
30```js
31NeonJs.sendAsset
32NeonJs.claimGas
33NeonJs.doInvoke
34NeonJs.setupVote
35```