Skip to main content

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​

StepWhat happens
Upload keyThe enclave generates an RSA upload key at startup and includes the public key in its Nitro attestation document.
EncryptThe client verifies the attestation document and encrypts the credential to that key as a compact JWE.
ValidateThe enclave decrypts the upload and proves live access to the claimed payment account.
SealThe enclave encrypts the credential into a signed bundle. Peer's API stores the bundle and cannot decrypt it.
Verify a paymentThe 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:

FieldPurpose
payeeIdPlatform-native seller identifier (not used for Wise)
sessionMaterialPlatform-specific credential
boundPubKeySha256SHA-256 of the attested upload key
issuedAtMsFreshness timestamp
jweIdUnique ID for replay rejection
callerAddressOptional; 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​

PlatformCredentialPayee identifier
venmoA connected mailbox (Gmail, Outlook or iCloud Mail) with Venmo payment emailsVenmo account ID
cashappCash App sessionCashtag without the leading $
wiseWise personal API tokenWise multi-currency-account recipient ID
paypalA connected mailbox (Gmail, Outlook or iCloud Mail) with PayPal payment emailsSeller PayPal email
xmoneyA connected mailbox (Gmail, Outlook or iCloud Mail) with X Money payment emailsX username, lowercase, without @

Mailbox credentials rely on the platform's DKIM signature on each payment email.

Failures​

FailureMeaning
Enclave verification failsDon't encrypt credentials to that enclave
Upload decrypt failsThe upload wasn't encrypted to the current enclave key
Upload binding failsThe upload is stale, replayed, or bound to a different key
Credential validation failsThe credential doesn't prove live access to the claimed account
Bundle decrypt failsThe bundle is corrupted, tampered with, or sealed for a different enclave
Payee check failsThe credential doesn't belong to the intent's payee
Payment lookup failsThe enclave can't find a matching payment with the seller's credential
Verifier check failsThe payment doesn't satisfy the intent