Seed Phrase Module
SeedPhraseModule is an Android module that provides functionality for setting, changing, getting, and deleting seed phrases for a ThresholdKey object.
To use the SeedPhraseModule in your Android project, you will need to import the module as follows:
import com.web3auth.tkey.ThresholdKey.ThresholdKey;
import com.web3auth.tkey.ThresholdKey.Modules.SeedPhraseModule;
SeedPhraseModule
is a class that provides the following methods:
Function | Description | Arguments | Async | return |
---|---|---|---|---|
setSeedPhrase | Set seed phrase to corresponding tKey | thresholdKey: ThresholdKey, format: String, phrase: String?, number_of_wallets: UInt32 | Yes | void |
changePhrase | Changes specific seed phrase | thresholdKey: ThresholdKey, old_phrase: String, new_phrase: String | Yes | void |
getPhrases | Gets all seed phrases stored in tKey. | thresholdKey: ThresholdKey | Yes | [seedPhraseStruct] |
deletePhrase | Delete the seed phrase | thresholdKey: ThresholdKey, phrase: String | Yes | void |
setSeedPhrase()
public static void setSeedPhrase(ThresholdKey thresholdKey, String format, @Nullable String phrase, int wallets, ThresholdKeyCallback<Boolean> callback)
This function sets the seed phrase for the given ThresholdKey.
Parameters
Parameters | Type | Description |
---|---|---|
thresholdKey | ThresholdKey | The ThresholdKey object to set the seed phrase for. |
format | String | The format of the seed phrase. |
phrase | String? | The seed phrase. If nil, a random seed phrase is generated. |
wallets | int | The number of wallets to derive from the seed phrase. |
Returns
- Void
Throws
- Error: An error if the operation fails.