fromAccountId static method
Creates a new KeyPair object from a stellar accountId
.
Implementation
static KeyPair fromAccountId(String accountId) {
String toDecode = accountId;
if (toDecode.startsWith('M')) {
MuxedAccount m = MuxedAccount.fromMed25519AccountId(toDecode);
toDecode = m.ed25519AccountId;
}
Uint8List decoded = StrKey.decodeStellarAccountId(toDecode);
return fromPublicKey(decoded);
}