ffn-verify
Verify a business against FFN Verified Business before your agent or app trusts it. Give it a domain or a phone number; it fetches the business's signed record and checks all of it in your own process: the registry's signature against pinned keys, the business's own signature, the business's domain pointing back to the registry, and the current status of every fact.
TypeScript: @fofonet/verify-business. Both pass the same test vectors.
pip install ffn-verify
Python 3.11 or later. Its only dependency is cryptography.
Verify a business
from ffn_verify import FFN_BUSINESS_REGISTRY, verify_business
r = verify_business(
"sweetpapatechnologies.com",
registry=FFN_BUSINESS_REGISTRY,
observed={"name": "Sweet Papa Technologies", "phone": "+1 510-497-0742"},
)
if r["verified"] and r["observedMatches"]:
print(r["level"], r["levelName"]) # 1 Registered
print(r["summary"])
elif r["verified"]:
print("Listed, but what you were told differs:", r["mismatches"])
else:
print(r["failure"]["code"], r["failure"]["message"])
By phone: verify_business(phone="+15104970742", registry=FFN_BUSINESS_REGISTRY). Pass exactly one of domain or phone. A phone query only counts the business's official channels when the registry confirmed that number.
Results are plain dicts with the same keys as the TypeScript package and the HTTP API (verified, observedMatches, level, levelName, business, facts, binding, scope, mismatches, warnings, failure, summary, checkedAt). Their meanings, and every failure.code, are in the repository README.
verified: the record, its signatures and the domain binding check out, and the facts for at least Level 1 are current. It's not a rating or a recommendation.observedMatches:Falsewhen anything inobserveddiffers from the record. Always check it when you passobserved: a hacked site can swap in its own phone while the record stays verified.- A verified phone means the business controls that number when you call it. It never means an incoming call or text from that number is from the business.
Options
| Keyword | Default | Meaning |
|---|---|---|
registry |
required | The registry to trust. FFN_BUSINESS_REGISTRY is the production one, with its keys pinned. |
observed |
None |
What your agent was told: {"name", "phone", "address"}, any of them. |
timeout |
10.0 |
Seconds allowed for each request, body included. |
fetch |
built in (urllib) | Your own fetch, for example through an egress proxy. Size limits and deadlines still apply. |
dns |
Cloudflare DNS over HTTPS | A TXT resolver, e.g. doh_resolver("google"). |
resolver, store |
built in | A DID resolver and a status-list cache, to share between calls. |
lookup_business(registry=..., domain=...) (or phone=) returns the record without the full check. Only the registry's signature is verified, so use verify_business before trusting anything in it.
Verify a presentation
from ffn_verify import FFN_BUSINESS_REGISTRY, verify_presentation
p = verify_presentation(
{
"presentation": presentation, # the SD-JWT presentation you received
"nonce": nonce, # the nonce you issued
"audience": "https://your-agent.example",
"issuers": [FFN_BUSINESS_REGISTRY["did"]],
},
registry=FFN_BUSINESS_REGISTRY,
)
if p["verified"]:
print(p["subject"], p["vct"], p["claims"])
Delegations take chain (parent delegations, nearest first) and roots (the DIDs a chain may start at). Credentials from an issuer you don't accept, and chains that don't start at a root you accept, fail before anything is fetched.
Security
- Pinned keys.
FFN_BUSINESS_REGISTRYcarries the RFC 7638 thumbprints of the registry's signing key and its standby key. Every known FFN registry is pinned in every function; a custom registry passeskeyThumbprints. - What it fetches: the registry (the record and its status lists), the business's
did.json, and its DNS TXT record over DNS over HTTPS. Everything is HTTPS-only, with no redirects, a size limit on every response and a total deadline on every request. - What it refuses: private, loopback and link-local addresses,
localhost,.localand.internalnames. Status lists must be signed by their host's own DID. If you run it inside a sensitive network, send its traffic through an egress proxy as well; that's the only full defense against DNS rebinding.
Found a problem? See the security policy.
Without a library
GET https://registry.fofo.network/v1/verify?domain=… returns the same result computed by the registry (OpenAPI), and the registry runs an MCP server. Both are simpler, but then you trust the registry's server instead of checking its signatures yourself.
Development
pip install -e .
python -m unittest discover -s tests
The tests replay ../vectors/business/v1.json when they run inside the source repository (or wherever FFN_VECTORS points), and skip those cases with a reason otherwise.
Links
FFN Verified Business · Guide for agents · llms.txt · Source · Changelog · FoFo Network
Apache-2.0. Copyright 2026 Sweet Papa Technologies LLC.
Metadata
Release files for ffn-verify 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ffn_verify-0.1.0.tar.gz | 76.2 kB | With provenance | Details for ffn_verify-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ffn_verify-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ffn_verify-0.1.0-py3-none-any.whl |
Total release size: 138.0 kB
Release files / ffn_verify-0.1.0.tar.gz
| Download URL | ffn_verify-0.1.0.tar.gz |
|---|---|
| Size | 76.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ecf972395e8b847753ef1a7b75a6856fede8bfd25e702814c0189a8f73bd4494
|
|
BLAKE2b-256 checksum How to use checksums |
af3fcc228a70ee5fbae0c5cd1a9b7a071660c4d442fa9eee4b6eef68f45add60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logRelease files / ffn_verify-0.1.0-py3-none-any.whl
| Download URL | ffn_verify-0.1.0-py3-none-any.whl |
|---|---|
| Size | 61.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff23eb0d7588bc1165418a542d6b264cb564fb1bbba4e059377de360500d1ebc
|
|
BLAKE2b-256 checksum How to use checksums |
dfbdfec1901801765dc034e5f1b6ba9fe121cbe64eab2f369f8aa8c4097be508
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logSecurity for ffn-verify 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ffn_verify-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.