Embark - Usage Example

1. Set the value in the blockchain

Once you set the value, the transaction will need to be mined and then the value will be updated on the blockchain.

2. Get the current value

current value is

Click the button to get the current value. The initial value is 100.

3. Contract Calls

Javascript calls being made:

note: You need to have an IPFS node running

Save text to IPFS

generated Hash:

Load text from IPFS given an hash

result:

upload file to ipfs

generated hash:

Get file or image from ipfs

file available at:

Javascript calls being made:


EmbarkJS.Storage.setProvider('ipfs',{server: 'localhost', port: '5001'})
The node you are using does not support whisper

Listen To channel

messages received:

Send Message

Javascript calls being made:


EmbarkJS.Messages.setProvider('whisper')