Almost all modules use an interface to describe the available functions. You can find the interface at the top of the module file.
src/ethereum/utils.jse.g. exports an
EthUtilsInterface. All interfaces are describe via JsDoc in the code. So it would be great if you have a look at the interfaces since we want to avoid redundancy of documentation.
Use this to query and write the database. It's an abstraction layer for realm
queryquery the database
writewrite to the database.
Contain's utils for address and private key normalization, transaction signing, private key creation, private key storage and so on.
createPrivateKeyReturn's an Promise that resolves in an private ethereum key (32 bytes in hex encoded)
savePrivateKeySave private key
allKeyPairsResolves in an list of ethereum keypairs map
getPrivateKeyGet an private key by it's address
signTxSign an ethereum transaction
normalizeAddressnormalized an etheruem address (e.g. add the hex prefix and so on)
normalizePrivateKeynormalize an ethereum private key (will throw when the key is invalid)
privateKeyToMnemonicconvert's an ethereum private key to it's mnemonic phrase.
mnemonicValidcheck if the mnemonic is valid
Use this to interact with everything nation related like creation, joining, leaving, indexing and so on.
allreturns all index nations
joinNationjoin an nation
leaveNationleave an nation
indexuse this to index all nation's from the blockchain. Just call it once a while to fetch nation's created by other people.
saveDraftSave a draft and return's an translation key + nation dataset
updateDraftUpdate a draft and return's transactio key + nation dataset. This can only be called when the nation was not submitted to the blockchain.
submitDraftSubmit draft to the blockchain.
saveAndSubmitSave and submit and nation dataset.
deleteDraftDelete and draft.
Use this to interact with your ethereum wallet.
ethSendWill send ether from a to b
ethBalanceFetch your eth balance
ethSyncSync your ethereum accounts.
Use this to interact with your profile.
hasProfileCheck if an profile is present
setProfileSet / create an profile
getProfileFetch your profile
getPublicProfileFetch your public profile (it contain's some additional values)
addJobAdd's an job to the messaging queue.
Add job expect's an instance of
fetchMessagesFetch the last
xjob's form the queue.