New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More โ†’
Socket
Sign inDemoInstall
Socket

zenroom

Package Overview
Dependencies
Maintainers
1
Versions
850
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zenroom - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

106

dist/wrapper.js

@@ -78,8 +78,14 @@ "use strict";

/**
* Set the zenroom script to run
* First, you'll have create a script that Zenroom can execute.
* In this first section, we're covering Zenroom's scripts in Lua,
* if you want to execute smart contracts in Zencode (Zenroom's
* domain specific language), please see below.
*
* The syntax of the zenroom scripts are extensively available at
* https://zenroom.dyne.org/api/tutorials/Syntax.html
* You may want also to look at some example in a live executable environment here https://zenroom.dyne.org/demo/
* This method set the zenroom lua or zencode to run.
*
* The syntax of the Zenroom Lua scripts is documented at
* https://dev.zenroom.org/
* You may want also to look at some example in a live
* executable environment at: https://dev.zenroom.org/demo
*
* @example <caption>Example usage of `script()`</caption>

@@ -95,3 +101,3 @@ * // returns zenroom

* @param {string} script the lua script to be set
* @returns {zenroom} the zenroom module
* @returns {zenroom} as zenroom module
*/

@@ -105,5 +111,7 @@

/**
* Set the keys JSON for you zenroom execution
* Set the parameter "keys" in JSON for the script/smart contract
* you're executing in Zenroom.
*
* the keys will be available in script as the `KEYS` variable
* The keys will be available in the execution of the script/smart
* contract as the `KEYS` variable.
*

@@ -125,3 +133,3 @@ * @example <caption>Example usage of `keys()`</caption>

* @param {object} keys the keys to be set as an object
* @returns {object} the zenroom module
* @returns {object} as zenroom module
*/

@@ -135,5 +143,7 @@

/**
* Set the data for your zenroom execution
* Set the parameter "data" in JSON for the script/smart
* contract you're executing in Zenroom.
*
* The data will be available in script as the `DATA` variable
* The data will be available in the execution of the
* script/smart contract as the `DATA` variable.
*

@@ -155,3 +165,3 @@ * @example <caption>Example usage of `data()`</caption>

* @param {string} data
* @returns {object} the zenroom module
* @returns {object} as zenroom module
*/

@@ -165,5 +175,6 @@

/**
* Set the conf before your zenroom execution
* Set the configuration of zenroom execution.
*
* all the available configuration are available [here](https://github.com/DECODEproject/Zenroom/blob/master/src/zen_config.c#L100-L106)
* The possible configurations are available
* [here](https://github.com/DECODEproject/Zenroom/blob/master/src/zen_config.c #L104-L111)
*

@@ -181,3 +192,3 @@ * @example <caption>Example usage of `conf()`</caption>

* @param {string} conf the string of configuration to be set
* @returns {object} the zenroom module
* @returns {object} as zenroom module
*/

@@ -191,5 +202,5 @@

/**
* Set the print_err callback to customize
* the behaviour of the print_err calls made to stderr
* by default it prints to the console.error
* Set the print_err callback: customize the behaviour of the
* print_err calls made to stderr,by default it prints to the
* `console.error`
*

@@ -208,3 +219,3 @@ * @example <caption>Example usage of `print_err()`</caption>

* @callback print_err
* @returns {object} the zenroom module
* @returns {object} as zenroom module
*/

@@ -223,5 +234,5 @@

/**
* Set the print callback to customize
* the behaviour of the print calls made to stdout
* by default it prints to the console.log
* Set the print callback: customize * the behavior of the
* print calls made to stdout,by default it prints to the
* `console.log`
*

@@ -240,3 +251,3 @@ * @example <caption>Example usage of `print()`</caption>

* @callback print
* @returns {object} the zenroom module
* @returns {object} as zenroom module
*/

@@ -255,3 +266,4 @@

/**
* Set the success callback that is executed after a successful execution of zenroom
* Set the `success` callback that is executed after
* a successful execution of Zenroom
*

@@ -270,3 +282,3 @@ * @example <caption>Example usage of `success()`</caption>

* @callback success
* @returns {object} the zenroom module
* @returns {object} as zenroom module
*/

@@ -283,3 +295,4 @@

/**
* Set the error callback that is executed after an unsuccessful execution of zenroom
* Set the "error callback" that is executed after an
* unsuccessful execution of Zenroom
*

@@ -298,3 +311,3 @@ * @example <caption>Example usage of `error()`</caption>

* @callback error
* @returns {object} the zenroom module
* @returns {object} as zenroom module
*/

@@ -311,7 +324,8 @@

/**
* Execute the zenroom vm (using the previously setted options)
* Starts the Zenroom VM, using the parameters previously set.
*
* It is usually the last method of the chain, but like the other methods returns
* the zenroom module itself, so can be used for other calls if you need to make more
* executions in a row
* This is usually the last method of the chain. Just like the
* other methods, it returns the zenroom module itself, so it
* can be used for other calls if you need to run more executions
* in a row.
*

@@ -327,3 +341,3 @@ * @example <caption>Example usage of `zenroom_exec()`</caption>

*
* @returns {object} the zenroom module
* @returns {object} as zenroom module
*/

@@ -337,7 +351,9 @@

/**
* Execute zencode contracts (using the previously setted options)
* Execute [Zencode](https://dev.zenroom.org/#/pages/zencode)
* smart contracts, using the previously setted options.
*
* It is usually the last method of the chain, but like the other methods returns
* the zenroom module itself, so can be used for other calls if you need to make more
* executions in a row
* This is usually the last method of the chain. Just like the
* other methods, it returns the zenroom module itself, so it
* can be used for other calls if you need to run more executions
* in a row.
*

@@ -353,3 +369,3 @@ * @example <caption>Example usage of `zencode_exec()`</caption>

*
* @returns {object} the zenroom module
* @returns {object} as zenroom module
*/

@@ -364,5 +380,6 @@

* This method allows the configuration of your call by passing one
* configuration option object. You can use the chain methods after this anyway.
* configuration option object. You can chain methods after this anyway.
*
* If some attribute is already set, those will be overwritten by the new options
* If some attribute is already set, those will be overwritten by the new
options.
*

@@ -376,2 +393,3 @@ * The following options are available:

* <li><strong>print</strong></li>
* <li><strong>print_err</strong></li>
* <li><strong>success</strong></li>

@@ -421,3 +439,3 @@ * <li><strong>error</strong></li>

*
* @returns {object} the zenroom module
* @returns {object} as zenroom module
*/

@@ -457,7 +475,7 @@

/**
* Reset the setted options already provided and cleans up the zenroom module
* Reset the options previously set, and cleans up the zenroom module.
*
* It is usually the last method of the chain, but like the other methods returns
* the zenroom module itself, so can be used for other calls if you need to make more
* executions in a row
* This is can easily be the last method of the chain. Just like the
* other methods, it returns the zenroom module itself, so it can be
* used for other calls if you need to run more executions in a row.
*

@@ -476,3 +494,3 @@ * @example <caption>Example usage of `reset()`</caption>

*
* @returns {object} the zenroom module
* @returns {object} as zenroom module
*/

@@ -479,0 +497,0 @@

{
"name": "zenroom",
"version": "1.1.1",
"version": "1.1.2",
"description": "wrapper of Zenroom, a secure and small virtual machine for crypto language processing",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -99,8 +99,14 @@ # Use Zenroom in JavaScript

Set the zenroom script to run
First, you'll have create a script that Zenroom can execute.
In this first section, we're covering Zenroom's scripts in Lua,
if you want to execute smart contracts in Zencode (Zenroom's
domain specific language), please see below.
The syntax of the zenroom scripts are extensively available at
<https://zenroom.dyne.org/api/tutorials/Syntax.html>
You may want also to look at some example in a live executable environment here <https://zenroom.dyne.org/demo/>
This method set the zenroom lua or zencode to run.
The syntax of the Zenroom Lua scripts is documented at
<https://dev.zenroom.org/>
You may want also to look at some example in a live
executable environment at: <https://dev.zenroom.org/demo>
#### Parameters

@@ -125,9 +131,11 @@

Returns **zenroom** the zenroom module
Returns **zenroom** as zenroom module
### keys
Set the keys JSON for you zenroom execution
Set the parameter "keys" in JSON for the script/smart contract
you're executing in Zenroom.
the keys will be available in script as the `KEYS` variable
The keys will be available in the execution of the script/smart
contract as the `KEYS` variable.

@@ -158,9 +166,11 @@ #### Parameters

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the zenroom module
Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** as zenroom module
### data
Set the data for your zenroom execution
Set the parameter "data" in JSON for the script/smart
contract you're executing in Zenroom.
The data will be available in script as the `DATA` variable
The data will be available in the execution of the
script/smart contract as the `DATA` variable.

@@ -191,9 +201,10 @@ #### Parameters

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the zenroom module
Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** as zenroom module
### conf
Set the conf before your zenroom execution
Set the configuration of zenroom execution.
all the available configuration are available [here](https://github.com/DECODEproject/Zenroom/blob/master/src/zen_config.c#L100-L106)
The possible configurations are available
[here]\(<https://github.com/DECODEproject/Zenroom/blob/master/src/zen_config.c> #L104-L111)

@@ -220,9 +231,9 @@ #### Parameters

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the zenroom module
Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** as zenroom module
### print_err
Set the print_err callback to customize
the behaviour of the print_err calls made to stderr
by default it prints to the console.error
Set the print_err callback: customize the behaviour of the
print_err calls made to stderr,by default it prints to the
`console.error`

@@ -248,9 +259,9 @@ Type: [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the zenroom module
Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** as zenroom module
### print
Set the print callback to customize
the behaviour of the print calls made to stdout
by default it prints to the console.log
Set the print callback: customize \* the behavior of the
print calls made to stdout,by default it prints to the
`console.log`

@@ -276,7 +287,8 @@ Type: [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the zenroom module
Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** as zenroom module
### success
Set the success callback that is executed after a successful execution of zenroom
Set the `success` callback that is executed after
a successful execution of Zenroom

@@ -302,7 +314,8 @@ Type: [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the zenroom module
Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** as zenroom module
### error
Set the error callback that is executed after an unsuccessful execution of zenroom
Set the "error callback" that is executed after an
unsuccessful execution of Zenroom

@@ -328,11 +341,12 @@ Type: [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the zenroom module
Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** as zenroom module
### zenroom_exec
Execute the zenroom vm (using the previously setted options)
Starts the Zenroom VM, using the parameters previously set.
It is usually the last method of the chain, but like the other methods returns
the zenroom module itself, so can be used for other calls if you need to make more
executions in a row
This is usually the last method of the chain. Just like the
other methods, it returns the zenroom module itself, so it
can be used for other calls if you need to run more executions
in a row.

@@ -354,11 +368,13 @@ #### Examples

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the zenroom module
Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** as zenroom module
### zencode_exec
Execute zencode contracts (using the previously setted options)
Execute [Zencode](https://dev.zenroom.org/#/pages/zencode)
smart contracts, using the previously setted options.
It is usually the last method of the chain, but like the other methods returns
the zenroom module itself, so can be used for other calls if you need to make more
executions in a row
This is usually the last method of the chain. Just like the
other methods, it returns the zenroom module itself, so it
can be used for other calls if you need to run more executions
in a row.

@@ -380,3 +396,3 @@ #### Examples

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the zenroom module
Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** as zenroom module

@@ -386,5 +402,6 @@ ### init

This method allows the configuration of your call by passing one
configuration option object. You can use the chain methods after this anyway.
configuration option object. You can chain methods after this anyway.
If some attribute is already set, those will be overwritten by the new options
If some attribute is already set, those will be overwritten by the new
options.

@@ -399,2 +416,3 @@ The following options are available:

<li><strong>print</strong></li>
<li><strong>print_err</strong></li>
<li><strong>success</strong></li>

@@ -454,11 +472,11 @@ <li><strong>error</strong></li>

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the zenroom module
Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** as zenroom module
### reset
Reset the setted options already provided and cleans up the zenroom module
Reset the options previously set, and cleans up the zenroom module.
It is usually the last method of the chain, but like the other methods returns
the zenroom module itself, so can be used for other calls if you need to make more
executions in a row
This is can easily be the last method of the chain. Just like the
other methods, it returns the zenroom module itself, so it can be
used for other calls if you need to run more executions in a row.

@@ -483,3 +501,3 @@ #### Examples

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the zenroom module
Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** as zenroom module

@@ -486,0 +504,0 @@ ## ๐Ÿ˜ Acknowledgements

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc