The JS/TS port of yapapi, Golem's Python API
(not needed for running examples)
- run
yarn
in main folder
- run
yarn build
in main folder - build is ready in
dist
folder!
Command | Description |
---|---|
yarn test:unit |
Run all unit test |
yarn cov |
Show tests coverage |
yarn cov:html |
GeneratedDetailed test coverage report (HTML in coverage directory) |
yarn cov:lcov |
Generate lcov.info file |
cd examples
will take you to examples folderyarn
will install dependencies for the examplesyarn build
will build typescript examples- add
YAGNA_APPKEY
as environment variable;
export YAGNA_APPKEY=your_yagna_app_key_here
npm run js:hello
will start hello world javascript examplenpm run js:blender
will start blender javascript examplenpm run ts:blender
will start blender typescript examplenpm run js:low
will start javascript low level api examplenpm run ts:low
will start typescript low level api examplenpm run ts:yacat
will start typescript yacat examplenpm run js:fibonacci
will start nodejs examplenpm run js:ssh
will start javascript ssh example
To run yacat
using npm
, special characters like $
have to be escaped using \
, e.g.:
npm run ts:yacat -- --mask '?a?a?a' --hash '\$P\$5ZDzPE45CLLhEx/72qt3NehVzwN2Ry/'
yarn
accepts all characters:
yarn run ts:yacat --mask '?a?a?a' --hash '$P$5ZDzPE45CLLhEx/72qt3NehVzwN2Ry/'
Call -d
or --debug
flag on your example script, e.g. npm run ts:blender -- -d
Use the --subnet-tag
option, e.g. npm run ts:blender -- --subnet-tag YOUR_SUBNET
.