rivkFromScope method

OrchardCommitIvkRandomness rivkFromScope(
  1. Bip44Changes scope
)

Implementation

OrchardCommitIvkRandomness rivkFromScope(Bip44Changes scope) {
  switch (scope) {
    case Bip44Changes.chainExt:
      return rivk;
    case Bip44Changes.chainInt:
      final k = rivk.toBytes();
      final ak = this.ak.toBytes();
      final nk = this.nk.toBytes();
      return OrchardCommitIvkRandomness(
        VestaNativeFq.fromBytes64(
          PrfExpand.orchardRivkInternal.apply(k, data: [ak, nk]),
        ),
      );
  }
}