BaseSubstrateVerifier.fromSubstrate constructor
BaseSubstrateVerifier.fromSubstrate(
- Substrate substrate
Implementation
factory BaseSubstrateVerifier.fromSubstrate(Substrate substrate) {
switch (substrate.coinConf.type) {
case EllipticCurveTypes.ed25519:
return SubstrateED25519Verifier.fromKeyBytes(substrate.priveKey.raw);
case EllipticCurveTypes.secp256k1:
return SubstrateEcdsaVerifier.fromKeyBytes(substrate.priveKey.raw);
default:
return SubstrateSr25519Verifier.fromKeyBytes(substrate.priveKey.raw);
}
}