Skip to content

Commit

Permalink
[docs] updated vm functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Lenz committed Aug 17, 2018
1 parent 2635e32 commit f460f23
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/vm_functionality.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@ The VM provides some utilits needed for DApp development.
## ethereumAddress
This is a constant representing the ethereum address of the user

## renderMessage

## renderModal
`renderModal(uiID <string>, layout <string>, callback <string>)` the uiID must be created with the `newModalUIID` method.
The callback will be called once the modal got rendered.

## sendETHTransaction
`sendETHTransaction(transactionParams <object>, callback <function>)` will send an ethereum transaction.
The transaction params should look like this:

- `value` the value in wei
- `to` should be an address
- `data` can be the data to execute

The callback will be called with an transaction object.

## sendMessage
`sendMessage(chat <string>, payload <object>, callback <function>)` will send a message with the given parameters.
Expand All @@ -30,6 +38,7 @@ The modal ID can then be used to display a modal.

## db
The database provides four methods:

- `put(key <string>, value <string>, callback <function>)`
- `get(key <string>, callback <function>)`
- `has(key <string>, callback <function>)`
Expand Down

0 comments on commit f460f23

Please sign in to comment.