Skip to content
/ Swoir Public

Swoir is a Swift package for creating and verifying zero-knowledge Noir proofs.

License

Notifications You must be signed in to change notification settings

Swoir/Swoir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swoir

Version Noir Swift 5 License: Apache-2.0

Swoir is a Swift package for creating and verifying Noir zero-knowledge proofs.

Getting Started

Swift Package Manager

To use Swoir in your project, add the following to your Package.swift dependencies:

let package = Package(
    name: "YourSwiftProject",
    platforms: [ .macOS(.v10_15), .iOS(.v14) ],
    // ...
    dependencies: [
        .package(url: "https://github.com/Swoir/Swoir.git", exact: "0.19.4-2")
    ],
    // ...
    targets: [
        .target(name: "YourSwiftProject", dependencies: ["Swoir"])
    ]
)

Usage

import Foundation
import Swoir
import Swoirenberg

let swoir = Swoir(backend: Swoirenberg.self)
let manifest = URL(fileURLWithPath: "x_not_eq_y.json")
let circuit = try swoir.createCircuit(manifest: manifest)

let proof = try circuit.prove([ "x": 1, "y": 2 ])
let verified = try circuit.verify(proof)

print(verified ? "Verified!" : "Failed to verify")

Ensure x_not_eq_y.json exists in the project root.

Architectures

  • iOS with architectures: arm64
  • macOS with architectures: x86_64, arm64

Authors

Contributing

Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change.

License

Licensed under the Apache-2.0 License. See LICENSE for more information.

About

Swoir is a Swift package for creating and verifying zero-knowledge Noir proofs.

Resources

License

Stars

Watchers

Forks

Packages