OrchardIncomingViewingKey.fromBytes constructor

OrchardIncomingViewingKey.fromBytes(
  1. List<int> bytes
)

Implementation

factory OrchardIncomingViewingKey.fromBytes(List<int> bytes) {
  bytes = bytes.exc(
    operation: "OrchardIncomingViewingKey",
    name: "bytes",
    reason: "Invalid incoming view key bytes length.",
    length: 64,
  );
  return OrchardIncomingViewingKey(
    dk: OrchardDiversifierKey(bytes.sublist(0, 32)),
    ivk: OrchardKeyAgreementPrivateKey(
      VestaNativeFq.fromBytes(bytes.sublist(32)),
    ),
  );
}