Skip to content

Commit

Permalink
Add Schnorr signature to example flutter application
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewLM committed Jul 5, 2024
1 parent 04815a6 commit f42e8d0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions coinlib_flutter/example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:coinlib_flutter/coinlib_flutter.dart' as coinlib;

Expand Down Expand Up @@ -33,8 +34,14 @@ class MyApp extends StatelessWidget {
"0000000000000000000000000000000000000000000000000000000000000001",
);

final schnorrSignature = coinlib.SchnorrSignature.sign(
privKey, Uint8List(32),
);

return Text(
"Public key is ${privKey.pubkey.hex} and should equal $expPubkey."
" An example Schnorr signature is"
" ${coinlib.bytesToHex(schnorrSignature.data)}."
);

}
Expand Down

0 comments on commit f42e8d0

Please sign in to comment.