Parameters
-
selectionOptions: {
index: number;
network?: StacksNetwork;
rootNode: HDKey;
username?: string;
}
-
index: number
-
-
rootNode: HDKey
-
Optional
username?: string
Returns Promise<{
stxDerivationType: DerivationType;
username: undefined | string;
}>
username and derivation type
Tries to find a derivation path for the stxPrivateKey for the account defined by rootNode and index that respects the username of that account and that respects the given derivationType.
The stxPrivateKey is used to sign the profile of the account, therefore, a username must be owned by the stxPrivateKey.
If a username is provided, a lookup for the owner address on the provided network is done.
If no username is provided, a lookup for names owned by the stx derivation path and by the data derivation path is done.
If derivationType other than Unknown is given this derivation type is enforced.