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:

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'})

Listen To channel

messages received:

Send Message

Javascript calls being made:


EmbarkJS.Messages.setProvider('whisper')