Global

Methods

constructWeb3()

This function constructs Web3 http provider
Parameters:
Name Type Description
newWeb3.providers.HttpProvider(providerUrl Web3.HttpProvider
Source:

decode(str)

This function decodes json string to json object
Parameters:
Name Type Description
str String
Source:

encode(data)

This function encodes json object to json string
Parameters:
Name Type Description
data Any
Source:

getSymmetricKey(web3, account, salt)

This function generates symmetric key based
Parameters:
Name Type Description
web3 web3.providers Web3 provider
account web3.account Web3 account object
salt Int Integer for more randomness
Source:

(async) sigDecrypt(web3, account, cipher, salt)

This function decrypts encrypted and signed message
Parameters:
Name Type Description
web3 web3.providers Web3 provider
account web3.account Web3 account object
cipher Int Shared symmetric key
salt Int Integer for more randomness
Source:
Returns:
result TODO: Confirm type here

(async) sigEncrypt(web3, account, msg, salt)

This function encrypts and signs the message
Parameters:
Name Type Description
web3 web3.providers Web3 provider
account web3.account Web3 account object
msg String Message to send
salt Int Integer for more randomness
Source:
Returns:
cipher TODO: Confirm type here