The JS/TS port of yapapi, Golem's Python API
(not needed for running examples)
- run
yarnin main folder
- run
yarn buildin main folder - build is ready in
distfolder!
| 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 exampleswill take you to examples folderyarnwill install dependencies for the examples- add
YAGNA_APPKEYas environment variable;
export YAGNA_APPKEY=your_yagna_app_key_here
npm run js:hellowill start hello world javascript examplenpm run js:blenderwill start blender javascript examplenpm run ts:blenderwill start blender typescript examplenpm run js:lowwill start javascript low level api examplenpm run ts:lowwill start typescript low level api examplenpm run ts:yacatwill start typescript yacat 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.