SolSignRequest.factory constructor

SolSignRequest.factory(
  1. List<int> signData,
  2. String path,
  3. String xfp,
  4. List<int> pubkey,
  5. String origin,
  6. int signType,
)

Implementation

SolSignRequest.factory(List<int> signData, String path, String xfp, List<int> pubkey,
    String origin, int signType): super() {
  uuid = const Uuid().v4();
  final buffer = Uuid.parse(uuid);
  final uuidBufferStr = hex.encode(buffer);
  final signDataStr = hex.encode(signData);
  final pubkeyStr = hex.encode(pubkey);
  final xfpInt = int.parse(xfp, radix: 16);

  final response = nativeConstruct(
      uuidBufferStr.toNativeUtf8(),
      signDataStr.toNativeUtf8(),
      path.toNativeUtf8(),
      xfpInt,
      pubkeyStr.toNativeUtf8(),
      origin.toNativeUtf8(),
      signType)
      .ref;
  nativeObject = response.getObject();
}