account method

Zip32 account(
  1. int accIndex
)

Implementation

Zip32 account(int accIndex) {
  if (!isLevel(Bip44Levels.coin)) {
    throw Bip44DepthError(
      "Current depth (${zip32.depth.toInt()}) is not suitable for deriving account",
    );
  }
  return Zip32._(
    zip32:
        zip32.childKey(Bip32KeyIndex.hardenIndex(accIndex), context)
            as Zip32Base,
    coinConf: coinConf,
    context: context,
  );
}