EthSignRequest.factory constructor

EthSignRequest.factory(
  1. List<int> signData,
  2. int signType,
  3. int chainId,
  4. String path,
  5. String xfp,
  6. String address,
  7. String origin,
)

Implementation

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

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