Skip to content

Commit

Permalink
new-sigma-js: sigma-js/README.md updated
Browse files Browse the repository at this point in the history
  • Loading branch information
aslesarenko committed Nov 29, 2023
1 parent 355f3f0 commit 657ff9d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions sigma-js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 657ff9d

Please sign in to comment.