diff --git a/sigma-js/README.md b/sigma-js/README.md index f1db675fb4..275d4f691a 100644 --- a/sigma-js/README.md +++ b/sigma-js/README.md @@ -35,13 +35,13 @@ methods and documentation. NOTE, you only need to import only one of the modules, the one which contains all the classes you need. This will allow optimizing the size of the final bundle. -The modules are: -- [sigma-core module](https://github.com/ScorexFoundation/sigmastate-interpreter/tree/b26930c5e7aa58b6d76dda96ab56db59825f8638/core) - contains core classes of the library - - [Type](https://github.com/ScorexFoundation/sigmastate-interpreter/blob/b26930c5e7aa58b6d76dda96ab56db59825f8638/core/js/src/main/scala/sigma/js/Type.scala) - - [Value](https://github.com/ScorexFoundation/sigmastate-interpreter/blob/2d767ae75ab233deefeba25e42ca22ae22be8952/core/js/src/main/scala/sigma/js/Value.scala) - - [GroupElement](https://github.com/ScorexFoundation/sigmastate-interpreter/blob/4fcd2a71f94d6a0e5a1922817dba02e5657558e1/core/js/src/main/scala/sigma/js/GroupElement.scala) - - [SigmaProp](https://github.com/ScorexFoundation/sigmastate-interpreter/blob/4fcd2a71f94d6a0e5a1922817dba02e5657558e1/core/js/src/main/scala/sigma/js/SigmaProp.scala) - - [AvlTree](https://github.com/ScorexFoundation/sigmastate-interpreter/blob/4fcd2a71f94d6a0e5a1922817dba02e5657558e1/core/js/src/main/scala/sigma/js/AvlTree.scala) +The modules are compiled from the following Scala classes: +- [sigma-core module](../core/js) - contains core classes of Sigma.js library + - [Type](../core/js/src/main/scala/sigma/js/Type.scala) + - [Value](../core/js/src/main/scala/sigma/js/Value.scala) + - [GroupElement](../core/js/src/main/scala/sigma/js/GroupElement.scala) + - [SigmaProp](../core/js/src/main/scala/sigma/js/SigmaProp.scala) + - [AvlTree](../core/js/src/main/scala/sigma/js/AvlTree.scala) - [sigma-data module](https://github.com/ScorexFoundation/sigmastate-interpreter/tree/b26930c5e7aa58b6d76dda96ab56db59825f8638/data) - contains classes for working with ErgoTree, addresses and all related serializers - all classes from sigma-core module @@ -65,6 +65,7 @@ The modules are: - [PreHeader](https://github.com/ScorexFoundation/sigmastate-interpreter/blob/4fcd2a71f94d6a0e5a1922817dba02e5657558e1/sdk/js/src/main/scala/org/ergoplatform/sdk/js/PreHeader.scala) - [ProverBuilder](https://github.com/ScorexFoundation/sigmastate-interpreter/blob/2a77625cd65a39f29fa56aa0e3c9c46cbe038363/sdk/js/src/main/scala/org/ergoplatform/sdk/js/ProverBuilder.scala) - [ReducedTransaction](https://github.com/ScorexFoundation/sigmastate-interpreter/blob/fff394ff28ec5530a6535effedd927f2eb297fc0/sdk/js/src/main/scala/org/ergoplatform/sdk/js/ReducedTransaction.scala) + - [SigmaProver](sigmastate-js.d.ts) - [SigmaProver](https://github.com/ScorexFoundation/sigmastate-interpreter/blob/9cdcbde6c77436f154e256c846e8f54aa00bff15/sdk/js/src/main/scala/org/ergoplatform/sdk/js/SigmaProver.scala) - [sigma-compiler module]() - contains classes for working with ErgoScript compiler @@ -79,7 +80,7 @@ Import `TypeObj` module, then use: - fields to create simple types (e.g. `TypeObj.Int`) - method `TypeObj.pairType` (e.g. `TypeObj.pairType(TypeObj.Int, TypeObj.Long)`) - method `TypeObj.collType` (e.g. `TypeObj.collType(TypeObj.Int)`) - +See examples in tests [Type.spec.js](tests/js/Type.spec.js) See examples in tests [Type.spec.js](https://github.com/ScorexFoundation/sigmastate-interpreter/blob/933acd7a3753725c8b41994c2126a20279b6809b/sigma-js/tests/js/Type.spec.js) ### How to create Sigma values