CardanoSignDataRequest.factory constructor

CardanoSignDataRequest.factory(
  1. String mfp,
  2. List<int> signData,
  3. String derivationPath,
  4. String origin,
  5. String xpub,
)

Implementation

CardanoSignDataRequest.factory(
  String mfp,
  List<int> signData,
  String derivationPath,
  String origin,
  String xpub,
) : super() {
  uuid = const Uuid().v4();
  final buffer = Uuid.parse(uuid);
  final uuidBufferStr = hex.encode(buffer);
  final signDataStr = hex.encode(signData);

  final response = nativeConstruct(
    uuidBufferStr.toNativeUtf8(),
    mfp.toNativeUtf8(),
    signDataStr.toNativeUtf8(),
    derivationPath.toNativeUtf8(),
    origin.toNativeUtf8(),
    xpub.toNativeUtf8(),
  ).ref;

  nativeObject = response.getObject();
}