- dbConf(conf)
This function is used to configure gunDB as succus is built on top of it. Learn more at https://gun.eco and follow @marknadal on twitter! It's a really awesome project and if you learn use it, you can easily make succus your own.
- getKeypair(address) ⇒
Promise.<pubPair>
This function fetches the public keypair used to encrypt a message.
- HashNamespace(string) ⇒
string
Hash a string in base64.
- registerKeypair(address, keypair)
Thus function registers a keypair for a defined user.
- connectWallet() ⇒
Promise.<WalletInfo>
This function is used by succus to connect to the user wallet.
This function is used to configure gunDB as succus is built on top of it. Learn more at https://gun.eco and follow @marknadal on twitter! It's a really awesome project and if you learn use it, you can easily make succus your own.
Kind: global function
Param | Description |
---|---|
conf | Change the configuration of the DB by passing an object to this function containing your config: https://gun.eco/docs/API#options |
This function fetches the public keypair used to encrypt a message.
Kind: global function
Returns: Promise.<pubPair>
- The public part of the keypair for the fetched user.
Param | Type |
---|---|
address | string |
Hash a string in base64.
Kind: global function
Returns: string
- The string in base64 format
Param | Type | Description |
---|---|---|
string | string |
The string to be converted |
Example
console.log(HashNamespace("Hello World")) // 'SGVsbG8gV29ybGQ='
Thus function registers a keypair for a defined user.
Kind: global function
Param | Type | Description |
---|---|---|
address | string |
The address to register keypair for. |
keypair | ISEAPair |
The kepair which will be saved. |
This function is used by succus to connect to the user wallet.
Kind: global function
Returns: Promise.<WalletInfo>
- An object which contains: the address of the account, the reference to the wallet and the reference to the provider.
Example
const {address, wallet, provider, gunKeypair} = connectWallet();
console.log(address) // 0x...