GsplTxSigner constructor

GsplTxSigner(
  1. WalletType wallet,
  2. GsplTxData txData
)

Implementation

GsplTxSigner(WalletType wallet, this.txData) : super(wallet: wallet) {
  // Validate and identify coin type and parameters
  final isDoge = wallet is DogeCoin;
  final isLtc = wallet is LtcCoin;
  final isBch = wallet is BchCoin;
  if (!isDoge && !isLtc && !isBch) {
    throw Exception('GSPL signer only support DOGE/LTC/BCH');
  }
  if (isDoge) {
    networkType = wallet.setting.networkType!;
  } else if (isLtc) {
    networkType = wallet.setting.networkType!;
  } else if (isBch) {
    networkType = wallet.setting.networkType!;
  } else {
    throw Exception('Unsupported wallet type for GSPL signing');
  }
}