CardanoShelley constructor

CardanoShelley(
  1. Bip44Base bip,
  2. Bip44Base bipSk
)

Constructor to create a Cardano Shelley wallet from Bip44 objects.

Parameters:

  • bip: The Bip44 Bip object for the wallet's address keys.
  • bipSk: The Bip44 Bip object for the wallet's staking keys.

Throws an ArgumentException if the provided Bip object is below the account level or if bipSk is not at the address index level.

Implementation

CardanoShelley(Bip44Base bip, Bip44Base bipSk) {
  if (bip.level.value < Bip44Levels.account.value) {
    throw const ArgumentException(
        "The bipObj shall not be below account level");
  }
  if (bipSk.level != Bip44Levels.addressIndex) {
    throw const ArgumentException(
        "The bipSkObj shall be of address index level");
  }
  bip44 = bip;
  bip44Sk = bipSk;
}