Skip to main content

Crate signedby_sdk

Crate signedby_sdk 

Source
Expand description

SignedByMe SDK - Self-signing digital signatures with zero-knowledge proofs

This SDK enables server-side verification of SignedByMe authentication tokens and Groth16 zero-knowledge proofs. Verification is fully decentralized — no network calls are required if you bundle the verification key.

§Quick Start

use signedby_sdk::{Verifier, VerificationKey};

// Load verification key (can be bundled for offline use)
let vk = VerificationKey::from_json(include_str!("verification_key.json"))?;
let verifier = Verifier::new(vk);

// Verify a proof
let result = verifier.verify_proof(&proof, &public_inputs)?;
println!("Valid: {}, npub: {}", result.valid, result.npub);

§Architecture

SignedByMe is built on three pillars:

  1. Self-signing identity (DID) — Users create their own cryptographic identity on-device. No certificate authority, no central issuer.

  2. Zero-knowledge membership proofs — Users prove they belong to a group without revealing which member they are. Built on Groth16/BN254.

  3. Bitcoin-backed economic proof — Every authentication is optionally backed by a Lightning payment, making auth economically unforgeable.

Re-exports§

pub use verifier::Verifier;
pub use verification_key::VerificationKey;
pub use proof::Groth16Proof;
pub use proof::PublicInputs;
pub use proof::VerificationResult;
pub use error::SdkError;

Modules§

error
Error types for SignedByMe SDK
oidc
OIDC token validation
proof
Groth16 proof types and parsing
verification_key
Groth16 verification key handling
verifier
Groth16 proof verifier

Constants§

NPUB_PREFIX
Bech32-encoded npub prefix for NOSTR public keys

Functions§

hex_to_npub
Convert a hex public key to bech32 npub format
npub_to_hex
Convert a bech32 npub to hex format