Seller Autopilot
Seller Autopilot verifies payments from the seller's side. The seller connects a payment account once; the Attestation Service enclave validates the credential, seals it into an encrypted bundle, and later uses it to find the buyer's payment and sign a PaymentAttestation. Buyers don't need to verify the payment themselves.
Plaintext seller credentials exist only inside the measured AWS Nitro Enclave. See the Attestation Service trust model.
How it works
| Step | What happens |
|---|---|
| Upload key | The enclave generates an RSA upload key at startup and includes the public key in its Nitro attestation document. |
| Encrypt | The client verifies the attestation document and encrypts the credential to that key as a compact JWE. |
| Validate | The enclave decrypts the upload and proves live access to the claimed payment account. |
| Seal | The enclave encrypts the credential into a signed bundle. Peer's API stores the bundle and cannot decrypt it. |
| Verify a payment | The enclave decrypts the bundle in memory, finds the payment on the platform, checks it against the intent and signs the attestation. |
Encrypt and upload a credential
Use @zkp2p/zkp2p-attestation. It verifies the nonce, freshness, AWS Nitro certificate chain, COSE signature and the pinned PCR8 before it encrypts anything.
import { createNitroAttestationClient } from "@zkp2p/zkp2p-attestation";
const nitro = createNitroAttestationClient({ environment: "production" });
// Verifies the enclave, encrypts the upload, and posts it to /seller/credentials/wise.
const credentialBundle = await nitro.uploadSellerCredential({
platform: "wise",
sessionMaterial: { apiToken: "<wise-api-token>" },
});
createEncryptedSellerCredentialUpload returns the compact JWE without posting it. To separate verification from encryption, call fetchAndVerifyAttestation() and pass its attestedSellerUploadKey to encryptSellerCredentialUpload.
Venmo, Cash App, PayPal and X Money uploads also take a top-level payeeId. Wise derives the payee from the account, and profileId is needed only when the token can access several Wise profiles.
Don't cache the upload key. An enclave restart generates a new key, and uploads encrypted to the old key fail.
Upload format
The upload is a compact JWE (RSA-OAEP-256 key management, A256GCM content encryption) to the attested upload key. The plaintext contains:
| Field | Purpose |
|---|---|
payeeId | Platform-native seller identifier (not used for Wise) |
sessionMaterial | Platform-specific credential |
boundPubKeySha256 | SHA-256 of the attested upload key |
issuedAtMs | Freshness timestamp |
jweId | Unique ID for replay rejection |
callerAddress | Optional; when present, the response includes an IdentityAttestation |
The enclave rejects stale or replayed uploads and uploads bound to a different key.
Credential bundle
After validating the credential, the enclave encrypts { payeeId, credential } with AES-256-GCM under a fresh data key. AWS KMS wraps the data key and releases it only to an enclave with the expected measurement. The plaintext data key is zeroed after use.
The bundle contains the platform, credentialType, encryptedBlob, encryptedDataKey, nonce, payeeIdHash, credentialValidatedAt, credentialExpiresAt (or null when unknown) and an EIP-712 bundleSignature. verifySellerCredentialBundle() checks a bundle's signature and payee hash.
Payment verification
The enclave unwraps the data key, decrypts the bundle in memory, and requires:
keccak256(decryptedPayeeId) == intent.payeeDetails
This binds the credential to the seller in the intent. The enclave then finds the payment on the platform, runs the same checks as buyer verification, and signs the attestation. See Payment attestations.
Supported credentials
| Platform | Credential | Payee identifier |
|---|---|---|
venmo | A connected mailbox (Gmail, Outlook or iCloud Mail) with Venmo payment emails | Venmo account ID |
cashapp | Cash App session | Cashtag without the leading $ |
wise | Wise personal API token | Wise multi-currency-account recipient ID |
paypal | A connected mailbox (Gmail, Outlook or iCloud Mail) with PayPal payment emails | Seller PayPal email |
xmoney | A connected mailbox (Gmail, Outlook or iCloud Mail) with X Money payment emails | X username, lowercase, without @ |
Mailbox credentials rely on the platform's DKIM signature on each payment email.
Failures
| Failure | Meaning |
|---|---|
| Enclave verification fails | Don't encrypt credentials to that enclave |
| Upload decrypt fails | The upload wasn't encrypted to the current enclave key |
| Upload binding fails | The upload is stale, replayed, or bound to a different key |
| Credential validation fails | The credential doesn't prove live access to the claimed account |
| Bundle decrypt fails | The bundle is corrupted, tampered with, or sealed for a different enclave |
| Payee check fails | The credential doesn't belong to the intent's payee |
| Payment lookup fails | The enclave can't find a matching payment with the seller's credential |
| Verifier check fails | The payment doesn't satisfy the intent |