Viewing Keys
Arguments:
Returns: {string} : key.
Description: This functiona ads a new viewing key by using the
suggestToken
API from Keplr.Arguments:
- {string}: contract id or address.
Returns: {object} : key.
Description: Get a viewing key. This function calls
viewingKeyManager
API from GriptapeJS.Arguments:
- {string} : a key.
Returns: {string} : key value.
Description: This function checks that a
key
exists, if not it throws the error '
'Empty or undefined key cannot be added''
and ends. If there is a key
it gets the account
, if there is no account
it throws the 'No account available'
error, but if there is an account it adds the key to local storage.Arguments: {string} : contract id or address.
Returns: {string} : key value.
Usage: This function gets the
key
for the received address
or id
.Arguments:
- {string}: a key.
Returns: Nothing.
Description: This function updates in the local storage the received
key
for the corresponding account
.
Last modified 1yr ago