Substrate.fromPrivateKey constructor

Substrate.fromPrivateKey(
  1. List<int> privateKeyBytes,
  2. SubstrateCoins coinType
)

Create a Substrate context from a private key and coin type.

Implementation

factory Substrate.fromPrivateKey(
    List<int> privateKeyBytes, SubstrateCoins coinType) {
  final privateKey =
      SubstratePrvKey.fromBytes(privateKeyBytes, coinType.conf);

  return Substrate._(
    privateKey,
    privateKey.publicKey,
    SubstratePath(),
    coinType.conf,
  );
}