SuiAccount.fromPrivKey constructor

SuiAccount.fromPrivKey(
  1. String privateKey
)

Bech32 encoded string starting with suiprivkey.

Implementation

factory SuiAccount.fromPrivKey(String privateKey) {
  final (scheme, privKey) = decodeSuiPrivateKey(privateKey);
  return SuiAccount.fromPrivateKey(Hex.encode(privKey), scheme);
}