Skip to content

Commit 7772e83

Browse files
authored
Merge pull request #2 from iden3/fix/min_sdk_version
Updated minimal required Flutter version.
2 parents 0d82dcb + d12e338 commit 7772e83

12 files changed

+55
-40
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.0.1-alpha.3 (2024-10-16)
2+
3+
Reduced minimum Flutter SDK requirements.
4+
15
## 0.0.1-alpha.2 (2024-09-14)
26

37
Updated rapidsnark native libraries.

example/ios/Podfile.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ PODS:
22
- Flutter (1.0.0)
33
- flutter_rapidsnark (0.0.1):
44
- Flutter
5-
- rapidsnark (= 0.0.1-alpha.4)
5+
- rapidsnark (= 0.0.1-alpha.5)
66
- integration_test (0.0.1):
77
- Flutter
88
- path_provider_foundation (0.0.1):
99
- Flutter
1010
- FlutterMacOS
11-
- rapidsnark (0.0.1-alpha.4):
12-
- rapidsnark/rapidsnark (= 0.0.1-alpha.4)
13-
- rapidsnark/C (0.0.1-alpha.4)
14-
- rapidsnark/rapidsnark (0.0.1-alpha.4):
11+
- rapidsnark (0.0.1-alpha.5):
12+
- rapidsnark/rapidsnark (= 0.0.1-alpha.5)
13+
- rapidsnark/C (0.0.1-alpha.5)
14+
- rapidsnark/rapidsnark (0.0.1-alpha.5):
1515
- rapidsnark/C
1616

1717
DEPENDENCIES:
@@ -36,10 +36,10 @@ EXTERNAL SOURCES:
3636

3737
SPEC CHECKSUMS:
3838
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
39-
flutter_rapidsnark: c2f2a7ff48da923973affd98982043d6793e73cd
40-
integration_test: ce0a3ffa1de96d1a89ca0ac26fca7ea18a749ef4
39+
flutter_rapidsnark: ded255c197aac9911fa75822447486eced081719
40+
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
4141
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
42-
rapidsnark: 6cd5f2e7a91ffc8eff9cf43827d34425f72086a3
42+
rapidsnark: 4e70fa2f70e3b0846a0c1bf94a635113f261ada9
4343

4444
PODFILE CHECKSUM: c6a1a2ce493f1542a1de3f1ef212b74310af6bfd
4545

example/ios/Runner/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import UIKit
22
import Flutter
33

4-
@UIApplicationMain
4+
@main
55
@objc class AppDelegate: FlutterAppDelegate {
66
override func application(
77
_ application: UIApplication,

example/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ class _MyAppState extends State<MyApp> {
7272
Future<void> _runProver() async {
7373
String result = "";
7474
try {
75-
final zkey = await this.zkey;
7675
final witness = await this.witness;
7776

7877
final stopwatch = Stopwatch()..start();
7978

80-
final ({String proof, String publicSignals}) proof;
79+
final ProveResult proof;
8180

8281
if (_bufferProverEnabled) {
82+
final zkey = await this.zkey;
8383
proof = await _flutterRapidsnarkPlugin.groth16Prove(
8484
zkey: zkey,
8585
witness: witness,

example/pubspec.lock

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ packages:
9797
path: ".."
9898
relative: true
9999
source: path
100-
version: "0.0.1-alpha.2"
100+
version: "0.0.1-alpha.3"
101101
flutter_test:
102102
dependency: "direct dev"
103103
description: flutter
@@ -117,18 +117,18 @@ packages:
117117
dependency: transitive
118118
description:
119119
name: leak_tracker
120-
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
120+
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
121121
url: "https://pub.dev"
122122
source: hosted
123-
version: "10.0.4"
123+
version: "10.0.5"
124124
leak_tracker_flutter_testing:
125125
dependency: transitive
126126
description:
127127
name: leak_tracker_flutter_testing
128-
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
128+
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
129129
url: "https://pub.dev"
130130
source: hosted
131-
version: "3.0.3"
131+
version: "3.0.5"
132132
leak_tracker_testing:
133133
dependency: transitive
134134
description:
@@ -157,18 +157,18 @@ packages:
157157
dependency: transitive
158158
description:
159159
name: material_color_utilities
160-
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
160+
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
161161
url: "https://pub.dev"
162162
source: hosted
163-
version: "0.8.0"
163+
version: "0.11.1"
164164
meta:
165165
dependency: transitive
166166
description:
167167
name: meta
168-
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
168+
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
169169
url: "https://pub.dev"
170170
source: hosted
171-
version: "1.12.0"
171+
version: "1.15.0"
172172
path:
173173
dependency: transitive
174174
description:
@@ -229,10 +229,10 @@ packages:
229229
dependency: transitive
230230
description:
231231
name: platform
232-
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
232+
sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
233233
url: "https://pub.dev"
234234
source: hosted
235-
version: "3.1.4"
235+
version: "3.1.5"
236236
plugin_platform_interface:
237237
dependency: transitive
238238
description:
@@ -306,10 +306,10 @@ packages:
306306
dependency: transitive
307307
description:
308308
name: test_api
309-
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
309+
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
310310
url: "https://pub.dev"
311311
source: hosted
312-
version: "0.7.0"
312+
version: "0.7.2"
313313
vector_math:
314314
dependency: transitive
315315
description:
@@ -322,10 +322,10 @@ packages:
322322
dependency: transitive
323323
description:
324324
name: vm_service
325-
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
325+
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
326326
url: "https://pub.dev"
327327
source: hosted
328-
version: "14.2.1"
328+
version: "14.2.5"
329329
webdriver:
330330
dependency: transitive
331331
description:

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_rapidsnark_example
22
description: "Demonstrates how to use the flutter_rapidsnark plugin."
3-
version: 0.0.1-alpha.1+1
3+
version: 0.0.1-alpha.1+3
44
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
55

66
environment:

lib/flutter_rapidsnark.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import 'dart:typed_data';
22

33
import 'flutter_rapidsnark_platform_interface.dart';
4+
import 'model.dart';
5+
6+
export 'model.dart';
47

58
const _defaultProofBufferSize = 1024;
69
const _defaultErrorBufferSize = 256;
710

811
class Rapidsnark {
9-
Future<({String proof, String publicSignals})> groth16Prove({
12+
Future<ProveResult> groth16Prove({
1013
required Uint8List zkey,
1114
required Uint8List witness,
1215
int proofBufferSize = _defaultProofBufferSize,
@@ -22,7 +25,7 @@ class Rapidsnark {
2225
);
2326
}
2427

25-
Future<({String proof, String publicSignals})> groth16ProveWithZKeyFilePath({
28+
Future<ProveResult> groth16ProveWithZKeyFilePath({
2629
required String zkeyPath,
2730
required Uint8List witness,
2831
int proofBufferSize = _defaultProofBufferSize,

lib/flutter_rapidsnark_method_channel.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
22
import 'package:flutter/services.dart';
33

44
import 'flutter_rapidsnark_platform_interface.dart';
5+
import 'model.dart';
56

67
const _defaultProofBufferSize = 1024;
78
const _defaultErrorBufferSize = 256;
@@ -13,7 +14,7 @@ class MethodChannelFlutterRapidsnark extends FlutterRapidsnarkPlatform {
1314
final methodChannel = const MethodChannel('flutter_rapidsnark');
1415

1516
@override
16-
Future<({String proof, String publicSignals})> groth16Prove({
17+
Future<ProveResult> groth16Prove({
1718
required Uint8List zkey,
1819
required Uint8List witness,
1920
int proofBufferSize = _defaultProofBufferSize,
@@ -35,14 +36,14 @@ class MethodChannelFlutterRapidsnark extends FlutterRapidsnarkPlatform {
3536
},
3637
))!;
3738

38-
return (
39+
return ProveResult(
3940
proof: result['proof'] as String,
4041
publicSignals: result['publicSignals'] as String,
4142
);
4243
}
4344

4445
@override
45-
Future<({String proof, String publicSignals})> groth16ProveWithZKeyFilePath({
46+
Future<ProveResult> groth16ProveWithZKeyFilePath({
4647
required String zkeyPath,
4748
required Uint8List witness,
4849
int proofBufferSize = _defaultProofBufferSize,
@@ -64,7 +65,7 @@ class MethodChannelFlutterRapidsnark extends FlutterRapidsnarkPlatform {
6465
},
6566
))!;
6667

67-
return (
68+
return ProveResult(
6869
proof: result['proof'] as String,
6970
publicSignals: result['publicSignals'] as String,
7071
);

lib/flutter_rapidsnark_platform_interface.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'dart:typed_data';
33
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
44

55
import 'flutter_rapidsnark_method_channel.dart';
6+
import 'model.dart';
67

78
abstract class FlutterRapidsnarkPlatform extends PlatformInterface {
89
/// Constructs a FlutterRapidsnarkPlatform.
@@ -25,15 +26,15 @@ abstract class FlutterRapidsnarkPlatform extends PlatformInterface {
2526
_instance = instance;
2627
}
2728

28-
Future<({String proof, String publicSignals})> groth16Prove({
29+
Future<ProveResult> groth16Prove({
2930
required Uint8List zkey,
3031
required Uint8List witness,
3132
int proofBufferSize,
3233
int? publicBufferSize,
3334
int errorBufferSize,
3435
});
3536

36-
Future<({String proof, String publicSignals})> groth16ProveWithZKeyFilePath({
37+
Future<ProveResult> groth16ProveWithZKeyFilePath({
3738
required String zkeyPath,
3839
required Uint8List witness,
3940
int proofBufferSize,

lib/model.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class ProveResult {
2+
final String proof;
3+
final String publicSignals;
4+
5+
ProveResult({required this.proof, required this.publicSignals});
6+
}

0 commit comments

Comments
 (0)