Skip to content

Commit

Permalink
Removed method channel.
Browse files Browse the repository at this point in the history
  • Loading branch information
5eeman committed Jul 24, 2024
1 parent ad61234 commit 9bf028c
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 387 deletions.
5 changes: 0 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ android {
main.java.srcDirs += 'src/main/kotlin'
main.jniLibs.srcDirs += 'src/main/jniLibs'
}
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
}
}

defaultConfig {
minSdkVersion 21
Expand Down
67 changes: 0 additions & 67 deletions android/src/main/cpp/CMakeLists.txt

This file was deleted.

226 changes: 0 additions & 226 deletions android/src/main/cpp/rapidsnark_module.cpp

This file was deleted.

55 changes: 0 additions & 55 deletions android/src/main/cpp/rapidsnark_module.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import io.flutter.plugin.common.MethodChannel.Result
import io.iden3.polygonid_flutter_sdk.*

/** PolygonIdSdkPlugin */
class PolygonIdSdkPlugin : FlutterPlugin, MethodCallHandler {
Expand Down Expand Up @@ -36,21 +35,7 @@ class PolygonIdSdkPlugin : FlutterPlugin, MethodCallHandler {
}

override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) {
if (call.method == "prove") {
val zKeyPath = call.argument<String>("zKeyPath")
val wtnsBytes = call.argument<ByteArray>("wtnsBytes")

val proof = groth16ProveWithZKeyFilePath(zKeyPath!!, wtnsBytes!!)

result.success(
mapOf<String, Any>(
"proof" to proof.proof,
"pub_signals" to proof.publicSignals
)
)
} else {
result.notImplemented()
}
result.notImplemented()
}

override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) {
Expand Down
Binary file not shown.
Loading

0 comments on commit 9bf028c

Please sign in to comment.