diff --git a/coinlib/lib/src/generated/secp256k1.ffi.g.dart b/coinlib/lib/src/generated/secp256k1.ffi.g.dart index 69c929a..ee61302 100644 --- a/coinlib/lib/src/generated/secp256k1.ffi.g.dart +++ b/coinlib/lib/src/generated/secp256k1.ffi.g.dart @@ -1,6 +1,7 @@ // AUTO GENERATED FILE, DO NOT EDIT. // // Generated by `package:ffigen`. +// ignore_for_file: type=lint import 'dart:ffi' as ffi; /// Raw generated bindings to secp256k1 @@ -209,7 +210,7 @@ class NativeSecp256k1 { ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer, ffi.Pointer)>> + ffi.Pointer message, ffi.Pointer data)>> fun, ffi.Pointer data, ) { @@ -226,8 +227,8 @@ class NativeSecp256k1 { ffi.Pointer, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>, + ffi.Void Function(ffi.Pointer message, + ffi.Pointer data)>>, ffi.Pointer)>>( 'secp256k1_context_set_illegal_callback'); late final _secp256k1_context_set_illegal_callback = @@ -236,8 +237,8 @@ class NativeSecp256k1 { ffi.Pointer, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>, + ffi.Void Function(ffi.Pointer message, + ffi.Pointer data)>>, ffi.Pointer)>(); /// Set a callback function to be called when an internal consistency check @@ -266,7 +267,7 @@ class NativeSecp256k1 { ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer, ffi.Pointer)>> + ffi.Pointer message, ffi.Pointer data)>> fun, ffi.Pointer data, ) { @@ -283,8 +284,8 @@ class NativeSecp256k1 { ffi.Pointer, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>, + ffi.Void Function(ffi.Pointer message, + ffi.Pointer data)>>, ffi.Pointer)>>('secp256k1_context_set_error_callback'); late final _secp256k1_context_set_error_callback = _secp256k1_context_set_error_callbackPtr.asFunction< @@ -292,8 +293,8 @@ class NativeSecp256k1 { ffi.Pointer, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>, + ffi.Void Function(ffi.Pointer message, + ffi.Pointer data)>>, ffi.Pointer)>(); /// Create a secp256k1 scratch space object. @@ -1473,11 +1474,11 @@ class NativeSecp256k1 { ffi.Pointer)>(); } -class max_align_t extends ffi.Opaque {} +final class max_align_t extends ffi.Opaque {} -class secp256k1_context_struct extends ffi.Opaque {} +final class secp256k1_context_struct extends ffi.Opaque {} -class secp256k1_scratch_space_struct extends ffi.Opaque {} +final class secp256k1_scratch_space_struct extends ffi.Opaque {} /// Opaque data structure that holds a parsed and valid public key. /// @@ -1487,7 +1488,7 @@ class secp256k1_scratch_space_struct extends ffi.Opaque {} /// If you need to convert to a format suitable for storage or transmission, /// use secp256k1_ec_pubkey_serialize and secp256k1_ec_pubkey_parse. To /// compare keys, use secp256k1_ec_pubkey_cmp. -class secp256k1_pubkey extends ffi.Struct { +final class secp256k1_pubkey extends ffi.Struct { @ffi.Array.multi([64]) external ffi.Array data; } @@ -1500,7 +1501,7 @@ class secp256k1_pubkey extends ffi.Struct { /// If you need to convert to a format suitable for storage, transmission, or /// comparison, use the secp256k1_ecdsa_signature_serialize_* and /// secp256k1_ecdsa_signature_parse_* functions. -class secp256k1_ecdsa_signature extends ffi.Struct { +final class secp256k1_ecdsa_signature extends ffi.Struct { @ffi.Array.multi([64]) external ffi.Array data; } @@ -1559,12 +1560,12 @@ typedef secp256k1_scratch_space = secp256k1_scratch_space_struct; typedef secp256k1_nonce_function = ffi.Pointer< ffi.NativeFunction< ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt)>>; + ffi.Pointer nonce32, + ffi.Pointer msg32, + ffi.Pointer key32, + ffi.Pointer algo16, + ffi.Pointer data, + ffi.UnsignedInt attempt)>>; /// Opaque data structured that holds a parsed ECDSA signature, /// supporting pubkey recovery. @@ -1579,7 +1580,7 @@ typedef secp256k1_nonce_function = ffi.Pointer< /// Furthermore, it is guaranteed that identical signatures (including their /// recoverability) will have identical representation, so they can be /// memcmp'ed. -class secp256k1_ecdsa_recoverable_signature extends ffi.Struct { +final class secp256k1_ecdsa_recoverable_signature extends ffi.Struct { @ffi.Array.multi([65]) external ffi.Array data; } diff --git a/coinlib/lib/src/tx/legacy_transaction.dart b/coinlib/lib/src/tx/legacy_transaction.dart index 6718f77..1a23388 100644 --- a/coinlib/lib/src/tx/legacy_transaction.dart +++ b/coinlib/lib/src/tx/legacy_transaction.dart @@ -17,8 +17,8 @@ import 'input_signature.dart'; import 'output.dart'; import 'raw_input.dart'; -class TransactionTooLarge with Exception {} -class CannotSignInput with Exception { +class TransactionTooLarge implements Exception {} +class CannotSignInput implements Exception { final String message; CannotSignInput(this.message); @override diff --git a/coinlib/pubspec.yaml b/coinlib/pubspec.yaml index ae37e38..67a71bd 100644 --- a/coinlib/pubspec.yaml +++ b/coinlib/pubspec.yaml @@ -2,14 +2,14 @@ name: coinlib description: A straight-forward, modular library for Peercoin and other Satoshi-based UTXO blockchains -version: 1.0.0-alpha +version: 1.0.0-alpha.2 repository: https://github.com/peercoin/coinlib environment: - sdk: '>=2.19.2 <4.0.0' + sdk: '>=3.0.0 <4.0.0' dev_dependencies: - ffigen: ^6.0.0 + ffigen: ^9.0.1 lints: ^2.0.0 test: ^1.21.0 @@ -17,7 +17,7 @@ dependencies: collection: ^1.17.1 crypto: ^3.0.2 dart_base_x: ^1.0.0 - ffi: ^1.2.1 + ffi: ^2.1.0 hex: ^0.2.0 path: ^1.8.0 pointycastle: ^3.7.3 @@ -29,4 +29,4 @@ ffigen: output: 'lib/src/generated/secp256k1.ffi.g.dart' headers: entry-points: - - 'src/secp256k1/include/secp256k1_recovery.h' + - '../coinlib_flutter/src/secp256k1/include/secp256k1_recovery.h'