npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@burnt-labs/expo-satya-attest

v3.16.4

Published

SATYA Expo SDK for native app attestation and TEE replay through device egress

Readme

@burnt-labs/expo-satya-attest

Expo / React Native native module for SATYA mobile app attestation. The module uses the Rust satya-sdk / satya-ffi pipeline for artifact construction and verifier policy, while Swift and Kotlin provide platform-specific WebView capture, native HTTPS replay, hardware-backed signing, and platform attestation evidence.

Version 3.14.0 introduces a shared connection sheet for Dossier and provider pages, with page-load progress, consent recovery and session IDs on errors. Rebuild the iOS and Android apps when upgrading. See the presentation options and changelog.

The SDK supports native app attestation, opt-in TEE replay, single-endpoint and composite proofs, provider-selective partial completion, registry-authorized regional hosts, and hosted TeeLS passthrough. With observability v2 enabled, Satya independently verifies hosted TeeLS results before canonical completion. Legacy receipt-only integrations still require separate verification by the consuming application.

Meta Account login

Devtool's admin-only metaAccountEnabled app flag controls Abstraxion login. Existing apps default off; new apps default on. Enabled native/TEE/hosted UI flows restore or create a session per installation before opening the provider. Disabled or legacy apps keep the normal flow, without account login or session checks.

Email login and consent open inside the SDK modal in a dedicated auth WebView. Session keys remain in native secure storage and survive app restarts; provider capture scripts and cookie import/export are not attached to the login WebView. The verifier supplies read-only runtime login settings from its deployment environment; server changes apply on fresh policy preflight without a mobile rebuild (SDK prefetch can retain the previous policy for up to 60 seconds). Each active attempt keeps its settings snapshot. Dossier resolves app branding and provider logos from Devtool using the IDs sent by the SDK; no per-client verifier clientId is required. Older Dossier deployments retain neutral branding. The compatibility fallback uses https://dossier.testnet.burnt.com. See the branding rollout. Each Dossier connection asks for consent, including returning users, while reusing the saved signing key. A valid Dossier web session skips email/OTP; changing the auth/Treasury configuration requires a fresh login. Server settings take precedence over host fallback configuration; the host retains its native callback. The example's config/metaAccount.ts and config/services.ts map public host env values into fallback SDK config and transport. See runtime settings and host environment names. Host env changes need a refreshed JS bundle; they cannot modify verifier policy.

Completion exposes optional account context. The example saves complete proofs and public account context in local JSON; native/TEE verification sends the exact artifact and public session signatures in an optional submission wrapper. A configured verifier checks the proof-bound challenge and live delegation and returns metaAccount.verification: "backend-verified". Older SDK proofs remain accepted without verified ownership. With the companion PR #167 verifier deployment, successfully verified native/TEE submissions are archived in R2 by immutable attestation ID before success is returned. Hosted TeeLS is excluded. See the setup, JSON contract and rollout guide.

React-free native SDKs

The source packages are platform_sdks/satya-ios (Swift product SatyaNative, minimum iOS 18) and platform_sdks/satya-android (Gradle module satya-native, minimum Android 28). Neither imports Expo or React. The Expo bridge delegates to these implementations; npm run build materializes their sources under native/ for npm packaging. Do not edit those generated copies.

From the repository root, build matching Rust bindings and binaries with:

SATYA_NATIVE_SDK=1 bash platform_sdks/expo-satya-attest/scripts/build-rust-ios.sh
SATYA_NATIVE_SDK=1 bash platform_sdks/expo-satya-attest/scripts/build-rust-android.sh
swift build --package-path platform_sdks/satya-ios
swift test --package-path platform_sdks/satya-ios
platform_sdks/satya-android/gradlew -p platform_sdks/satya-android :satya-native:testNativeDebugUnitTest :satya-native:assembleNativeDebug

The Android expo flavor compiles the same source with the existing API 24 floor; Expo autolinking selects that flavor. Run :satya-native:testExpoDebugUnitTest :satya-native:assembleExpoDebug to check it.

Android resolver JVM tests load the host Rust library. Build it, then pass its directory:

cargo build --locked -p satya-ffi --lib
platform_sdks/satya-android/gradlew -p platform_sdks/satya-android :satya-native:testNativeDebugUnitTest -PsatyaHostLibraryPath="$PWD/target/debug"

Native applications resolve the provider, then start the provider-flow facade:

  • SatyaProviderResolver.resolve(providerId:appId:verifierUrl:bearerToken:registryApi:...) fetches the provider registry record (defaultRegistryApi defaults to https://api.provider-registry.burnt.com) and verifier policy when needed, then validates both in Rust. SatyaProviderResolver.resolve(input:policy:) remains available when the caller already holds the template or registry record JSON. Call configuration(...) to obtain a native replay or TeeLS configuration. Pass observabilityEnvironment to mint the canonical TeeLS attempt and verify its quote, independent of native backend submission.
  • Swift: ProviderFlow.create(config:sessionPolicy:sessionContext:resolveAccountScope:client:delegate:), then start(). sessionEvidence reports the actual isolation and reset.
  • Kotlin: SatyaProviderFlow(context).run(configuration, webView, sessionPolicy, sessionContext, resolveAccountScope, onProgress); read sessionEvidence for the same result.

Session policy follows the serving app. A disabled policy, or a required policy without reset on an unsupported runtime, uses the shared WebView store and does not request an account scope. A required reset on an unsupported runtime fails with an update or runtime error. Otherwise the SDK opens the isolated store and calls the account-scope supplier only when no scope is supplied. sessionContext.environment must be the verifier URL so the named store keeps its identity. SatyaProviderSessionPolicy.clearWebsiteDataBeforeStart clears full website data in the isolated store (websiteDataCleared in sessionEvidence), and capabilities() reports runtime isolation and website-data reset support. clearCookies(providerId:context:...) and clearWebsiteData(providerId:context:...) clear only that store and reject while it is active.

Callers present the native WebViews and receive progress and one outcome. Call cancel() on disposal or account switch. Background ticks pause; return checks the original deadline.

The facades dispatch Rust actions through native HTTPS, WebView capture, platform attestation and opaque WebSocket/TCP relays. They freeze TEE captures before challenge creation and read isolated credentials only after the authenticated quote action. A cancelled or terminal attempt cannot publish a late native result. Browser JavaScript contains the existing bounded capture scripts; provider orchestration remains in Rust.

Run the Swift action-dispatch and native HTTP unit tests on a simulator:

cd platform_sdks/satya-ios
xcodebuild -scheme SatyaNative -destination "platform=iOS Simulator,id=$IOS_SIMULATOR_UDID" test CODE_SIGNING_ALLOWED=NO

The lower-level APIs remain available to the Expo adapter and SDK integrators:

SatyaNativeClient provides initialize/dispose, version, secure entropy, scoped telemetry identity, artifact verification, async cookie snapshots and async single/composite replay. SatyaProviderSession.open(configJson:) returns a main-actor session with makeWebView, cookies, cookieHeader and explicit release. Sessions own isolated WebKit storage. Native callers own navigation and popup presentation and create each popup through the same session. Replay still takes the existing template/captured-request JSON and returns the unchanged signed artifact JSON.

Kotlin callers use com.burnt.satya.SatyaAttest for replay, verification, platform evidence, entropy and WebView/popup operations. SatyaProviderSessions supplies suspend session operations and direct WebView binding. Captured data and proof artifacts keep their existing wire representation. The Rust provider-flow API owns provider orchestration.

resolveProviderInput validates a registry template, selects its endpoint/plan, and applies the RN policy refresh and authorization rules to a supplied typed HTTP outcome. providerPolicyRequest constructs the bounded native GET. Registry responses use the separate registryProviderTemplate export to check the RN record wrapper, optional ID/status metadata and object-valued rawProvider. Its output remains opaque template JSON for the resolver. Template input and registry-record input are explicit native document variants; the SDK does not guess which document was supplied. Missing policy evidence is rejected, never treated as a transport fallback. Fatal app/provider gate errors always block; template-pin fallback is limited to the existing verifier-first, verifyBackend: false native path. TeeLS always requires a successful policy validation and returns typed login/injection configuration. TEE resolution returns requiresTeePreflight; the native executor must obtain its initial challenge before presenting login and a fresh challenge after capture. These pure exports perform no HTTP and do not authenticate a caller-fabricated response.

SatyaProviderFlow adds typed ProviderFlowConfig, CaptureEvent and ProviderAction unions to the Rust binding. Construct one object per attempt, call reduce for native results, and call cancel when the attempt is disposed. Terminal attempts reject further events. matchCapture resolves passive requests against the selected registry endpoints without trusting a page's endpoint hint; ObservedRequest applies the same matching during capture.

NativeReplay selects a single endpoint or a proof plan. TeeCapture applies the same capture reducer with TEE registry validation, then returns CaptureReady without signing or releasing credentials to a service. Freeze those ordered requests before constructing TeeReplay. Its ReadCredentials action occurs only after the configured verifier authenticates the enclave quote and the core checks its session, policy and target bindings. Teels preserves the hosted bridge protocol; receipt-only completion has no verifiedBy value and must not be presented as verified.

Native executors perform HTTP with platform TLS/hostname verification, redirects disabled, streaming byte limits and the action's deadline. Return the actual final URL and exact body bytes. A caller-provided ok boolean is not quote or artifact evidence. Existing signed artifacts and governed provider templates keep their JSON representation; event and action dispatch uses typed unions.

The iOS native build emits satya-ios/Frameworks/satya_ffiFFI.xcframework containing a dynamic framework, plus generated Swift in satya-ios/Generated. The default iOS build retains Expo's static XCFramework. Android always emits canonical JNI/Kotlin outputs under satya-android/satya-native/src/main, then materializes the Expo copy. SATYA_ANDROID_ABIS=arm64-v8a limits a local build; the default retains arm64-v8a, armeabi-v7a and x86_64.

The shared source checks are cargo test -p satya-ffi --locked, cargo test -p satya-sdk --locked, and npm run test:native-provider-flow after the Expo TypeScript build. The latter checks fixtures produced by the existing TypeScript owners. These checks do not qualify hardware attestations or a real provider login.

SwiftPM host tests cover replay ordering, cookie scoping and SPKI pinning. Android JVM tests cover native replay bookkeeping and pin policy. App Attest, Secure Enclave, Play Integrity, Keystore and WebView execution remain device-gated; host tests do not qualify production attestations.

TEE replay

Import from @burnt-labs/expo-satya-attest/tee and use initSatyaAttest({ appId, attestationMode: 'tee-replay' }) with the normal provider WebView and capture flow. The configured verifier advertises the replay service; the SDK seals captured credentials only after quote preflight, relays TLS through the device and submits family 3 to the same verification endpoint. TEE ignores provider SPKI pins; certificate-chain and hostname verification remain mandatory inside the enclave. One initial quote and one signed bundle cover all selected endpoints and authenticated partial outcomes. onComplete returns the opaque schema 3.1 envelope and verified completion metadata.

For captured-request integrations, SatyaMobileClient.attestReplay and attestReplayBundle honor the init mode. Explicit attestNativeReplay* methods remain native APIs. TEE results require online verification; verify(raw, transportConfig) submits a TEE envelope to the shared endpoint. Finalization is single-use, so submitting an already verified proof again is rejected.

For TEE, install the optional TCP native peer and rebuild the app; cookie access and randomness use the SDK native bridge. See TEE setup and provider compatibility.

App-attestation-only consumers keep the default import and existing callback types. They do not need the TCP package or TEE configuration.

Prerequisite: register your app for an app id

SDK 3.x requires an appId. Initial partner onboarding is operator-assisted: an authorized internal app owner registers the app at https://provider-registry.burnt.com (Apps module) with its iOS identity (Apple Team ID + bundle id) and/or Android identity (package name + Play app-signing SHA-256). After a Burnt admin approves the registration and grants your app its providers, configure the id in any one of:

  • transportConfig.appId on SatyaProviderAttestButton,
  • initSatyaAttest({ appId }) at startup, or
  • EXPO_PUBLIC_SATYA_APP_ID in the build environment.

The app ID is public. Native mode checks registered OS identities and provider grants. TEE mode checks the provider grant and enclave evidence without asserting app/device identity. Store binaries ship no verifier secret. Without a configured app id a verifier-backed flow fails before the provider WebView opens with APP_ID_REQUIRED; a malformed id fails validation with CONFIG_INVALID. An unregistered or unapproved id fails at the verifier with APP_NOT_REGISTERED / APP_DISABLED, and an ungranted provider fails with PROVIDER_ACCESS_DENIED. See docs/MULTI_TENANT_VERIFICATION.md. Native flows also fail with app_platform_not_configured when the app has no registered identity for the current platform, so register every platform you develop and test on.

Android native onboarding: four inputs

For Android native app-attestation, provide the exact installed package name, public Play app-signing certificate SHA-256 fingerprint(s), the linked Google Cloud project NUMBER, and a dedicated linked-project decode service-account JSON. Use the app-signing certificate, not the upload certificate; never provide Android signing/upload private keys, keystores or passwords. The operator configures Devtool and the partner configures SDK transportConfig.cloudProjectNumber with the same positive safe integer (1–9007199254740991), not a project ID string. Blank/zero is only staged/example configuration, not native readiness. At least one valid signing digest is required even for development registration.

The initial flow is partner → approved secure handoff → specifically authorized internal app owner → authenticated Devtool credential-form upload. Partners are not promised self-service form access. Confirm both the approved mechanism and internal recipient with the integration contact before transfer; neither is established here, so do not invent a link or assume a vault is approved. Until both are confirmed, do not transfer the JSON.

Use a dedicated decoder without deployment, Owner/Editor, admin, impersonation or unrelated permissions. JSON structure, OAuth scope and upload success do not prove IAM grants or linked-project authorization. Never put JSON/private keys in Slack, email, tickets, screenshots, support logs, source/mobile assets, committed env or EXPO_PUBLIC_*. Package/app IDs, project numbers and public fingerprints are non-secret; the credential stays in Devtool, not the SDK/verifier. These four inputs do not add a universal iOS/TEE/initial-registration activation gate. See the Android setup and custody checklist.

Supported Runtime Versions

The bridge's behavior is decided by the host app's expo-modules-core, not by this package. The 3.1.0–3.5.1 iOS composite outage shipped undetected in part because the manifest claimed expo: "*" while only the newest Expo was ever tested — the wildcard did not cause the bug, but it silenced the only manifest-level signal that untested runtimes were being claimed. Peer ranges are therefore bounded, and verified at their edges — the interior of each window (e.g. Expo 55, RN 0.82–0.84) is interpolated, not exercised:

| Peer | Supported range | Floor (verified) | Ceiling (verified) | | --- | --- | --- | --- | | expo | >=54.0.0 <59.0.0 | Expo 54 line — production consumer runtime | Expo 58 — example app on physical devices; CI after the example pin moves | | react | >=19.1.0 <20.0.0 | 19.1.0 | 19.2.x | | react-native | >=0.81.0 <0.89.0 | 0.81.5 | 0.88.1 | | react-native-safe-area-context | >=5.6.0 <6.0.0 | 5.6.x | 5.6.x | | react-native-webview | >=13.15.0 <15.0.0 | 13.15.0 | 14.0.1 | | expo-secure-store | >=15.0.0 <59.0.0 | Expo 54 acceptance pending | Expo 58 Android/iOS checked | | expo-web-browser | >=15.0.0 <59.0.0 | Expo 54 acceptance pending | Expo 58 Android/iOS checked | | expo-linking | >=8.0.0 <59.0.0 | Expo 54 acceptance pending | Expo 58 Android/iOS checked | | react-native-quick-crypto | >=1.1.8 <1.2.0 | Expo 54 acceptance pending | 1.1.8 on Expo 56 Android/iOS | | react-native-tcp-socket | >=6.4.2 <7.0.0 | 6.4.2 | 6.4.x |

react-native-tcp-socket belongs only to the /tee entry point. The root package does not impose a TCP dependency or version constraint on app-only consumers.

Provider isolation has a narrower compatibility requirement than this general peer table: WebView 13.16.0/13.16.1 (Expo 54–57) or 14.0.1 (Expo 58), a rebuilt construction adapter, and iOS 17+ or Android MULTI_PROFILE. Check runtime capability before enabling an isolated flow; installing a new JS bundle alone cannot supply it.

Policy:

  • The floor is the oldest consumer runtime in production. Raising it drops consumers and is a breaking change — call it out in the CHANGELOG.
  • The ceiling advances only after validation on the example app (and ideally a device pass of a composite provider, the path most sensitive to bridge semantics).
  • CI exercises the ceiling. The SatyaKit test app is being moved to the floor profile (Expo 54 line, matching production) so both edges run real attestations; until that lands, floor coverage is the production consumer itself, not a test surface.
  • internal/module_scripts/test-dependency-ranges.mjs (part of npm test) fails on: any unbounded peer; a peer nothing in src/ imports (speculative constraints break consumer installs); a runtime import declared only as a dev dependency; a peer with no in-repo pin; any in-repo pin (devDependencies or the example app) outside its declared range; and this table differing from package.json.

App-attestation flow (default)

App-attestation mode uses certificate-pinned native replay. Third-party apps can use the SDK-owned button component for the full managed flow:

  1. The app renders SatyaProviderAttestButton with a provider id and transport config.
  2. The SDK refreshes SPKI pin policy from the verifier, falling back to registry pins.
  3. The SDK opens an in-app react-native-webview modal for login and request discovery.
  4. The SDK waits for a provider request that matches template requestMatchRules. For html/text endpoints it surfaces the matched page load to the interceptor by re-issuing it as a credentialed fetch().
  5. Swift/Kotlin replay the trusted template URL natively with the selected WebView cookie store.
  6. The native client uses system trust without user roots and requires SPKI pins.
  7. Native extraction applies the endpoint's reveal rules to the pinned response — JSON paths for json bodies, and regex (regex/jsonRegex) over the raw body — producing the disclosed claims. The Rust core emits a native-pinned-observed SATYA artifact.
  8. The SDK stamps Expo package metadata onto the artifact envelope, verifies locally, optionally posts the artifact to satya-verifier-service, and returns the result through onComplete.

On Android, single-endpoint and composite native replay offer HTTP/2 followed by HTTP/1.1 through TLS ALPN. The server selects the supported protocol. Both paths continue to enforce certificate pinning and reject redirects; provider templates and verifier policy do not need to change for this transport update.

The earlier mock and plain webview-observed modes are no longer exposed through the high-level Expo client because they do not prove a provider response fetched through a pinned native TLS connection.

Provider-isolated cookie sessions (opt-in)

For a runnable manual-reset integration, see the example's Clear session cookies button. It uses the same persistent scope for login and reset in both replay modes and keeps cookies between attempts until the tester clears the selected provider.

Added in 3.9.0. This feature requires a rebuilt native app. Add enableProviderIsolatedSessions: true to the @burnt-labs/expo-satya-attest Expo plugin options, pin react-native-webview to 13.16.0, 13.16.1 or 14.0.1, then run Expo prebuild and rebuild. Use 14.0.1 with Expo 58, as npx expo install react-native-webview selects. The plugin installs a narrowly scoped WebView construction adapter before native codegen. Bare React Native apps must run node node_modules/@burnt-labs/expo-satya-attest/scripts/patch-provider-session-webview.cjs . before CocoaPods/Gradle codegen and every dependency reinstall. Unsupported WebView source versions fail during setup. Reinstalling the dependency removes the adapter.

For an Expo app, configure the plugin in app.json:

{
  "expo": {
    "plugins": [["@burnt-labs/expo-satya-attest", {
      "enableProviderIsolatedSessions": true
    }]]
  }
}

After installing the SDK version containing this feature:

npm install --save-exact [email protected]   # Expo 54–57
# Or, on Expo 58: npm install --save-exact [email protected]
npx expo prebuild
npx expo run:ios --device
# Or: npx expo run:android --device

Keep the same plugin option when reinstalling dependencies and rebuilding. This feature does not work in Expo Go or through a JavaScript-only OTA update.

import {
  getProviderSessionCapabilities,
  SatyaProviderAttestButton,
} from '@burnt-labs/expo-satya-attest';

<SatyaProviderAttestButton
  providerId="amazon.ca.prime.v1"
  transportConfig={transportConfig}
  resolveSessionPolicy={async ({ providerId, attemptId }) => {
    // Fetch the current policy for this exact provider on every attempt.
    const policy = await fetchSessionPolicy(providerId, attemptId);
    if (!policy.isolationRequired) return null;
    const capability = await getProviderSessionCapabilities();
    if (!capability.supported) throw new Error('A supported app/WebView update is required');
    return {
      isolation: 'provider',
      clearCookiesBeforeStart: policy.clearCookiesBeforeStart,
      accountScope: opaqueLocalAccountScope,
    };
  }}
/>;

The resolver is awaited before any provider page opens, including the SDK's Retry button. Lookup/reset failure prevents navigation. A static sessionPolicy with the same return shape is also supported; do not supply both options. A resolver returning null, or omitting both options, preserves the existing shared-session behavior. SATYA_PROVIDER_SESSION_CAPABILITY is provider-isolated-cookies-v1; a new JS bundle on an old binary reports supported: false, reason: 'native-update-required'.

To explicitly clear an idle provider's isolated cookies, use the exported SDK method:

import { clearProviderCookies } from '@burnt-labs/expo-satya-attest';

await clearProviderCookies({
  providerId: 'amazon.ca.prime.v1',
  accountScope: opaqueLocalAccountScope,
  transportConfig, // Same app ID and exact verifier URL used by the button.
});

The promise resolves after cookie deletion and native session teardown. It opens no provider page and rejects with SATYA_PROVIDER_SESSION_BUSY if that exact store is in use; close/unmount the active flow before clearing. Unsupported runtimes reject with SATYA_PROVIDER_SESSION_UNSUPPORTED; reset/teardown failures and a 30-second preparation/reset timeout reject with SATYA_PROVIDER_SESSION_PREPARATION_FAILED. Native teardown is awaited separately and is not bounded by that preparation timer. A timed-out native reset retains the store lock until it finishes. No failure falls back to the shared store. This method clears only a store created by provider isolation: it does not remove an existing shared login or change the host's policy. Continue supplying the matching isolated session policy on subsequent launches. For automatic fresh login on every attempt, use clearCookiesBeforeStart instead of calling the method separately; that keeps reset and the first navigation under one session lock.

For a static policy, reuse the same scope on the button:

<SatyaProviderAttestButton
  providerId="amazon.ca.prime.v1"
  transportConfig={transportConfig}
  sessionPolicy={{
    isolation: 'provider',
    clearCookiesBeforeStart: false,
    accountScope: opaqueLocalAccountScope,
  }}
/>

Set clearCookiesBeforeStart: true to require a fresh cookie session on every attempt. Choose either the static policy or the resolver shown above.

An isolated store persists across launches and is keyed by app ID, verifier URL, exact provider ID (including region), and accountScope. Use a stable, random, device-local opaque scope of 16–128 URL-safe characters, never email or account IDs. Choose a separate scope for anonymous use and each local signed-in account, cancel and unmount active flows before account changes, and retain each scope if that account should keep its login. Changing the scope starts with a different store. After migrating a provider, continue returning isolation: 'provider' when disabling reset, with clearCookiesBeforeStart: false; returning null would select its old shared session again. The host is responsible for persisting this sticky policy.

Only cookies in that provider store are cleared. Other provider stores, the app's shared cookies, local storage and caches remain untouched. Existing shared cookies are neither copied nor erased on first opt-in. Main views, managed/nested popups, native replay and TEE cookie reads use the same session handle. Custom WebViewComponent overrides cannot be used with isolated sessions. Prefetch is disabled while either session option is configured. Teardown/reset is serialized; a 30-second preparation timeout never unlocks still-running native cleanup or falls back to shared cookies. Providers can restore authentication from local storage, an external browser or server-side SSO; a successful cookie reset therefore does not guarantee that a password prompt appears.

Runtime support requires iOS 17+ or Android WebView MULTI_PROFILE; iOS 15.6/16, older Android WebView runtimes, web, and apps without the construction adapter report unsupported. The general SDK OS floor is unchanged. Before enabling a policy in production, validate both React Native architectures used by your app on physical devices: seed provider A, region B, another provider and shared app cookies; clear A; verify the other three survive, including HttpOnly/persistent cookies, SSO popups, internal retry, cancellation during reset, account switching, and release builds. The repeatable device scenarios are in the provider-session test guide.

TeeLS Hosted Passthrough (Opt-In)

The SDK also has an opt-in TeeLS hosted flow. It uses a normal registry provider and the normal app/provider grant, but it does not run request capture, native replay, SATYA artifact construction, local SATYA verification, or verifier artifact submission. SATYA performs one provider-policy request before opening the WebView solely to confirm that the configured app is active and has access to the provider.

sessionPolicy / resolveSessionPolicy also apply to this flow's local WebViews. Clearing their cookies does not reset the remote TeeLS browser/session; providers that require an upstream reset need that support separately.

Enable the flow for exactly one provider/app pair at initialization:

import {
  initSatyaAttest,
  SatyaProviderAttestButton,
  type SatyaTeelsAttestation,
  type SatyaTeelsClaimData,
} from '@burnt-labs/expo-satya-attest';

initSatyaAttest({
  providerId: 'satya.teels.v1',
  appId: 'app_your-registered-app-id',
  teelsFlow: true,
});

function TeelsAttestButton() {
  const verifyTeelsResult = async (
    attestation: SatyaTeelsAttestation,
    claimData?: SatyaTeelsClaimData
  ) => {
    // Required: verify the TeeLS quote, freshness, and expected data binding
    // in your application or backend before trusting the result.
    // `claimData` is the optional legacy data payload from a two-argument
    // hosted success callback; with the current single-argument SDK it is
    // absent and the data lives in `attestation.claim.data`.
  };

  return (
    <SatyaProviderAttestButton
      providerId="satya.teels.v1"
      transportConfig={{
        verifierUrl: 'https://satya-verifier-v2-staging.burnt.com',
        appId: 'app_your-registered-app-id',
      }}
      onTeelsComplete={verifyTeelsResult}
      onError={(error) => console.error(error.code, error.message)}
    />
  );
}

The provider's existing login.url opens in the SDK WebView and its normal Registry injection adapts the hosted page to the SDK-owned bridge. A page that already uses the standard TeeLS callbacks and EarnOS success event/snapshot does not need frontend changes. See Provider Config for the adapter and device-validation contract.

For stage events, warning outcomes, safe error details and deployment order, see TeeLS observability.

Only a non-null, JSON-safe attestation object can complete the flow. If provided, claimData is additionally forwarded as a second argument to onTeelsComplete. Success is returned only through onTeelsComplete; invalid/null data, hosted failures, timeout, WebView failure, and access denial use the normal onError path. Closing the sheet before a terminal result uses onCancel.

Native-replay-only props are not used by TeeLS. A component may keep an onComplete handler for normal mode, but TeeLS never calls it. Initialize the SDK before mounting the button. A later init with teelsFlow: false or with the option omitted disables TeeLS for subsequently mounted buttons; normal providers continue to use the existing native replay flow unchanged.

The returned object is delivered as the first argument. A v2 quote binds the entire canonical attestation.claim, including provider, policy, timestamps and extracted data. The optional claimData second argument carries the extracted data for a legacy two-argument hosted callback and is absent with the current single-argument SDK. Legacy receipt-only delivery is unverified; do not treat that callback as a SATYA verification claim or log the result by default.

Verifying the TeeLS result

For an enabled observability v2 attempt, the SATYA SDK independently verifies the quote and claim before completion and emitting ATTESTATION_VERIFIED. It checks provider, schema, policy, quote binding, approved measurements, freshness and the attempt deadline. Legacy attempts retain receipt-only behavior; their consuming application or backend must verify the result before trusting it. Post the quote and the exact claim (attestation.claim) to the independent TeeLS verifier's quote+claim endpoint and require success: true:

curl -X POST https://attest.burnt.com/verify-quote \
  -H 'content-type: application/json' \
  -d '{"hex":"<quote hex>","claim":{ ...attestation.claim... }}'

The response carries the DCAP quote verdict (quote.verified, tcb_status, quote.body measurements) plus a claim verdict with per-check results (binding — the quote's reportdata matches the claim, providerKnown, schemaMatch, policyMatch, timeValid) and a reason on failure. The claim is required: the quote-only POST /verify route refuses claim-carrying requests so claim verification can't be skipped accidentally. If you pin measurements yourself, compare quote.body.mrtd / rtmr0–rtmr3 against the registry at GET https://attest.burnt.com/measurements.

The result carries no nonce beyond the claim's issuedAt/expiresAt window, so enforce your own freshness and replay policy wherever the attestation crosses a trust boundary.

Native Trust Tiers

| Platform | Witness key | Platform evidence | Typical tier | | ---------------- | ------------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------- | | iOS device | Secure Enclave P-256 | App Attest assertion/attestation | ios-app-attest-sep-bound | | iOS simulator | software P-256 | honest simulator fallback | ios-simulator-dev | | Android device | Keystore EC, StrongBox when available | Play Integrity hook | android-strongbox-play-integrity / android-keystore-play-integrity-no-strongbox | | Android emulator | software EC | honest emulator fallback | android-emulator-dev |

Artifacts are signed by the app/witness path, not by a separate signing service. Production-grade verification relies on canonical statement hashes, device/witness signatures, active provider policy, fresh revocation epochs, backend-trusted SPKI pins, and pass-2 platform verification where appropriate.

Artifact Identity And Versioning

Every artifact includes a stable attestationId. It is derived from the signed statement hash, so a replay of the same artifact keeps the same id while a fresh attestation gets a new one.

New SDK artifacts also include envelope metadata:

{
  "schemaVersion": "1.1.0",
  "attestationId": "satya_w_...",
  "attestationIdVersion": "statement-sha256-96-v1",
  "producer": {
    "sdk": "@burnt-labs/expo-satya-attest",
    "sdkVersion": "3.3.0",
    "artifactSchemaVersion": "1.1.0",
    "coreVersion": "0.1.0"
  }
}

The verifier uses this metadata for compatibility routing and diagnostics. It is not allowed to downgrade cryptographic checks; policy decisions still come from the signed statement, provider registry policy, and platform evidence.

Build The Rust Core

The generated native artifacts are gitignored:

  • ios/Frameworks/
  • ios/Generated/
  • ../satya-android/satya-native/src/main/jniLibs/ and its npm native/ copy
  • generated uniffi Swift/Kotlin glue

Build them from the workspace root before opening Xcode or Gradle:

# iOS XCFramework + Swift glue
platform_sdks/expo-satya-attest/scripts/build-rust-ios.sh

# Android .so files + Kotlin glue
# One-time prereqs: Android NDK, JDK 17, cargo-ndk, and Android Rust targets.
platform_sdks/expo-satya-attest/scripts/build-rust-android.sh

From the module directory, the same commands are available as:

npm run build:native:ios
npm run build:native:android

build:native:ios strips local/debug symbols from the XCFramework. Local builds include the physical-device arm64 iOS slice by default; publishing builds set SATYA_IOS_INCLUDE_SIMULATOR=1 so simulator fallback slices ship too. See PUBLISHING.md for release and binary-size knobs.

Build TypeScript after editing src/*.ts or src/*.tsx:

cd platform_sdks/expo-satya-attest
npm install
npm run build
npm run lint

The example app consumes the compiled build/ directory, so restart Metro with --clear after rebuilding the module.

Provider Registry

Provider configs are loaded from the Provider Registry API at runtime. The SDK default is https://api.provider-registry.burnt.com, and apps can override it once at startup:

import { initSatyaAttest } from '@burnt-labs/expo-satya-attest';

initSatyaAttest({
  providerId: 'kaggle.current_user.v1',
  providerRegistryApi: process.env.EXPO_PUBLIC_PROVIDER_REGISTRY_API,
  logLevel: 'warn',
});

The SDK fetches /api/providers/{providerId} and fails closed if the provider is unavailable, inactive, or unsafe to execute on-device. The registry service owns provider-schema governance; the SDK only normalizes fields it needs at runtime and enforces mobile safety checks such as HTTPS URLs, SPKI pins, request matching, and reveal parsing. The raw provider schema is documented in PROVIDER_CONFIG.md; runtime loading rules, errors, and logging are documented in PROVIDER_REGISTRY.md.

Since 3.7.0 a provider can declare tlsIdentityPolicy.hostGroups and mark an endpoint hostBinding: { "mode": "pinned-set", "hostGroupId": "..." } so one endpoint definition serves interchangeable state or regional hosts; the captured host must be an exact group member with its own pin set. See PROVIDER_CONFIG.md §6.3 and §7.2.

Useful exports:

import {
  initSatyaAttest,
  loadProviderTemplate,
  SatyaProviderAttestButton,
  validateProviderTemplate,
  withProviderSpkiPins,
  SatyaMobileClient,
} from '@burnt-labs/expo-satya-attest';

Load the configured provider for custom diagnostics or a fully custom UI:

const providerTemplate = await loadProviderTemplate();

Native replay requires at least one SPKI SHA-256 base64 pin at runtime. By default, SatyaProviderAttestButton fetches GET /v1/providers/{providerId}/policy from transportConfig.verifierUrl before opening the WebView, validates that the returned provider id, host, and policy hash match the selected template, and freezes those pins for the attestation run. For a local verifyBackend={false} flow, an unavailable verifier can fall back to the SDK registry pins. Set providerPolicyRefresh="verifier-required" to disable that fallback, or providerPolicyRefresh="template-only" for offline demos. When verifyBackend is enabled, every mode—including template-only and caller-supplied spkiPins—still completes the app/provider access preflight before opening the WebView; an unavailable verifier blocks that attempt as retryable. Only a fully local verifyBackend={false} flow skips the verifier gate.

Installation Options

Every install path also needs the WebView and safe-area peer dependencies:

npx expo install react-native-webview react-native-safe-area-context

Use npm for released apps:

npx expo install @burnt-labs/expo-satya-attest

Use a local checkout while developing the SDK or testing unpublished changes:

cd /path/to/tls-app-attest/platform_sdks/expo-satya-attest
npm install
npm run build
npm run check:native-artifacts

cd /path/to/your-expo-app
npm install /path/to/tls-app-attest/platform_sdks/expo-satya-attest
npx expo install react-native-webview react-native-safe-area-context

Re-run npm run build in the SDK directory after TypeScript edits. Re-run the native build scripts after Rust/UniFFI edits so the local package still contains ios/Generated, ios/Frameworks, Android jniLibs, and generated Kotlin.

Use GitHub when you want a pinned unreleased version. The most reliable GitHub install is a release tarball produced by npm pack, because it contains the same files npm would publish:

npm install https://github.com/<owner>/<repo>/releases/download/expo-satya-attest-v3.3.0/burnt-labs-expo-satya-attest-3.3.0.tgz
npx expo install react-native-webview react-native-safe-area-context

Installing from a Git ref also works when that ref has the SDK package at the repository root, such as a dedicated SDK repo or a subtree/split branch:

npm install github:<owner>/<sdk-repo>#v3.3.0
npm install git+https://github.com/<owner>/<sdk-repo>.git#v3.3.0
npx expo install react-native-webview react-native-safe-area-context

Do not point npm at the monorepo root unless that Git ref is prepared so package.json, build/, native artifacts, and Expo module files are at the root of the Git package. npm does not install this monorepo's platform_sdks/expo-satya-attest subdirectory directly from a normal GitHub URL.

After changing the install source, rebuild the native app:

npx expo prebuild --clean
npx expo run:ios --device
npx expo run:android

Plug-And-Play API

Add the Expo config plugin as shown below, rebuild the native app, then render the SDK-owned button:

import { initSatyaAttest, SatyaProviderAttestButton } from '@burnt-labs/expo-satya-attest';

initSatyaAttest({
  providerId: 'kaggle.current_user.v1',
});

export function KaggleAttestation() {
  return (
    <SatyaProviderAttestButton
      providerPolicyRefresh="verifier-first"
      transportConfig={{
        verifierUrl: 'https://satya-verifier.example.com',
        cloudProjectNumber: 0, // Non-production placeholder: replace with the same positive linked number used in Devtool.
      }}
      buttonLabel="Open Kaggle"
      onComplete={(result) => {
        saveSatyaArtifact(result.raw);
        handleSatyaVerification(result.verify, result.backendVerify);
      }}
      onError={(error) => {
        reportSatyaError(error);
      }}
    />
  );
}

When pressed, the component opens the provider WebView inside the same app, captures the matching request, performs native replay with cookie sharing, verifies locally, posts to the backend verifier, and returns a SatyaProviderAttestationResult only after verification succeeds. verifyBackend defaults to true; the verdict is in result.backendVerify, and verifier failures call onError. Enabled Meta Account flows include the attempt's public account context with the original artifact.

Set verifyBackend={false} explicitly for local native verification or when your backend submits the proof independently. Existing explicit overrides remain unchanged. TEE replay and partial native bundles still require backend verification. This default applies to the SDK-owned button flow; the low-level native replay APIs retain their existing behavior.

Apps can customize the button label, modal title, WebView props, and callbacks. Apps that use a custom provider allow-list can pass providerTemplate instead of loading the configured provider id. Explicit spkiPins are still supported for controlled tests and override only the TLS pin source; verifier-backed flows still preflight app/provider access before opening the WebView. The managed WebView uses provider userAgent settings when present, otherwise it falls back to a platform-matched mobile browser user agent (Safari on iOS, Chrome on Android); pass webViewUserAgent to override it explicitly.

OAuth redirects

SDK 3.7.1 fixes a navigation feedback loop that could replay an intermediate OAuth URL and cause HTTP 400 after credentials were accepted (observed with Strava's Google login at accounts.youtube.com). Upgrade the SDK package to 3.7.1 or later; this fix requires no provider configuration changes.

The managed WebView lets the browser own redirects and form submissions. Navigation callbacks track the current page and login progress without reassigning source. Custom WebViewComponent wrappers should forward the SDK's source unchanged rather than deriving it from onNavigationStateChange. SDK-initiated navigation and managed popup returns remain supported.

Presentation

By default the provider WebView opens as an in-app sheet with the host app visible behind it. On iPhone the sheet spans the window at 88% of its portrait height. Its header stays in place while the keyboard is open. Swipe down on the title to dismiss the sheet. iPad uses a native page sheet. Android uses an animated bottom sheet at 85% of the available height. The light blue header centers the service name and “Connect account”, with Close on the right. Refresh appears on provider and Dossier pages and reloads the active page immediately. A thin line below the title tracks webpage loads and refreshes. A Back strip below the header returns from a nested provider window to its parent. Hosted pages retain their own content, text selection and scrolling.

Android native window.open() popups also stay within this sheet and share its navigation controls. Rebuild the Android app to adopt the native popup changes.

SDK messages and the progress tracker are centered and adapt to the sheet’s light or dark surface. Opening, connecting, and verification use the same circular loader on both platforms. Status messages scroll within the sheet and distinguish opening, connecting, verification, finishing, delayed responses and recoverable or permanent errors. Every error includes a tappable session ID. A successful copy shows a checkmark and “Session ID copied”. The SDK tries onCopySessionId first, then the native clipboard on rebuilt apps. When copying is unavailable it offers system sharing and manual selection. “Try again” remains subject to the verifier’s retry policy. The default autoCloseOnComplete: true is unchanged; set it to false to keep the completion screen with “Return to app”. Hosted result receipt is labelled “Account connected” until independently verified. Completion callbacks are not delayed.

SDK 3.3.0 providers can declare an ordered auth.submitSignal[] to start a provisional "Connecting your account" cover as soon as a tightly scoped main-WebView login request or navigation is observed. Request matching supports URL-, header-, JSON-path-, and raw-body rules. Each entry has a unique id and canonical HTTPS url; entries are ORed in order, the first match wins, and that same entry owns response matching and timeout behavior. Optional response body rules are evaluated on a bounded clone inside the WebView; only a private boolean crosses the React Native bridge. A rejection uncovers, an unanswered submission lapses on timeout, and bounded main-frame navigation extensions keep supported redirect chains concealed.

Login-cover configuration is capped at 32 regexes totaling 8192 characters per provider, in addition to the per-pattern and per-rule-list limits. Body matching supports normalized fetch bodies and text XHR; bounded matching fails closed for XHR responseType="json" and XHR FormData/Blob request bodies.

Once the provider's injection confirms authentication with __satyaReady, the sheet promotes to the "Verifying your account…" cover while capture and native replay continue underneath. Only __satyaReady releases readiness-gated capture; both covers remain presentation-only and never change replay or verification policy. If confirmed capture does not start within a short watchdog window, the cover offers a "Return to provider" path that keeps the flow alive. Providers without auth.submitSignal retain the previous timing and policy hash.

Popup close is not an authentication signal. This release does not observe provisional submit matchers inside native Android popup WebViews or managed-popup form navigations. A provider may instead match an observed session/status request that the opener issues after popup close; otherwise concealment waits for the opener's __satyaReady. See PROVIDER_CONFIG.md §2.1 for the complete schema and limitations.

Pass presentation="fullScreen" to keep the legacy full-window takeover. Set prefetch to resolve the provider policy and warm the WebView engine at mount so the sheet opens straight into the loading login page (it trades an eager registry/policy round-trip on mount for a faster first open). The sheet's look is tunable through theme:

<SatyaProviderAttestButton
  presentation="sheet" // default; use "fullScreen" for the legacy full-window modal
  prefetch // resolve policy + warm the WebView at mount for an instant first open
  theme={{
    accentColor: '#2752d9',
    sheetCornerRadius: 20, // default 24
    backdropColor: 'rgba(9, 14, 26, 0.45)', // scrim behind the phone sheet
    showGrabber: true, // optional grabber (hidden by default)
  }}
  // Non-production placeholder: replace 0 with the same positive linked number used in Devtool.
  transportConfig={{ verifierUrl: 'https://satya-verifier.example.com', cloudProjectNumber: 0 }}
/>

Injection, request capture, native replay, and OAuth popup handling are identical in both presentation modes; only the container around the WebView changes. Keyboard handling is also identical: on iOS the modal content automatically insets by the exact keyboard overlap when the keyboard appears (WKWebView does not resize its layout viewport on its own), so provider pages that pin their primary button to the bottom of the screen stay reachable while typing; Android relies on the standard adjustResize behavior.

Error Diagnostics

SDK failures are reported as SatyaError. The error has a stable code, an inferred stage, a per-occurrence errorId, and a redacted diagnostics object that can be forwarded to app telemetry. Native Expo promise rejections are preserved under diagnostics.native when the platform exposes a native code or domain.

import { SatyaError } from '@burnt-labs/expo-satya-attest';

function reportSatyaError(error: SatyaError) {
  telemetry.capture('satya_attestation_failed', error.diagnostics);
}

Diagnostics reach your app through two channels:

  • onError(error) receives the SatyaError itself — read error.code, error.stage, error.errorId, or forward error.diagnostics.
  • onProgress(progress) carries the same payload on the terminal failed phase as progress.error (typed SatyaErrorDiagnostics), so progress-driven UIs can capture diagnostics without a separate onError handler.
import type { SatyaErrorDiagnostics } from '@burnt-labs/expo-satya-attest';

<SatyaProviderAttestButton
  // ...
  onProgress={(progress) => {
    if (progress.phase === 'failed' && progress.error) {
      telemetry.capture('satya_attestation_failed', progress.error);
    }
  }}
  onError={(error) => reportSatyaError(error)}
/>;

JSON.stringify(error) emits the same diagnostics payload. The SDK redacts sensitive context keys such as cookies, authorization headers, tokens, credentials, and request or response bodies before they appear in diagnostics.

SatyaMobileClient.verify() also wraps native verifier rejections as SatyaError. Consumers that previously branched on a native rejection code should inspect error.diagnostics.native?.code or error.diagnostics.cause?.code.

Diagnostics payload

error.diagnostics (type SatyaErrorDiagnostics) is the stable, redacted shape to log or forward to telemetry:

| Field | Type | Notes | | --- | --- | --- | | errorId | string | Per-occurrence id (satya_<time>_<rand>); correlate logs to a single failure. | | code | SatyaErrorCode | Stable machine-readable code (see below). | | stage | SatyaErrorStage | Coarse pipeline bucket (see below). | | message | string | Human-readable summary (not redacted — don't put secrets in messages). | | context? | object | Operation context, recursively redacted (sensitive keys → [redacted Nb]). | | native? | { code?, domain?, message?, name? } | Present when the cause is a native Expo rejection exposing a code/domain. | | cause? | { code?, message?, name? } | Present when an underlying error was wrapped. |

stage is inferred from code, though some operations refine it (e.g. a native module init failure reports stage: 'initialization' while keeping code: 'SATYA_NATIVE_REPLAY_FAILED'). Use code for precise branching and stage for dashboards/alerting.

stage values: initialization, configuration, providerRegistry, providerPolicy, providerTemplate, webViewCapture, nativeReplay, artifactVerification, backendVerification, validation, unexpected.

code values (grouped by the stage they normally map to):

| Stage | Codes | | --- | --- | | configuration | SATYA_CONFIG_INVALID, SATYA_VERIFIER_URL_INVALID | | providerRegistry | SATYA_PROVIDER_ID_REQUIRED, SATYA_PROVIDER_NOT_FOUND, SATYA_REGISTRY_FETCH_FAILED, SATYA_REGISTRY_INFO_MISMATCH, SATYA_REGISTRY_INVALID | | providerPolicy | SATYA_PROVIDER_POLICY_FETCH_FAILED, SATYA_PROVIDER_POLICY_INVALID, SATYA_PROVIDER_POLICY_MISMATCH | | providerTemplate | SATYA_PROVIDER_ENDPOINT_INVALID, SATYA_PROVIDER_RULE_INVALID, SATYA_PROVIDER_TEMPLATE_INVALID, SATYA_PROVIDER_URL_INVALID | | webViewCapture | SATYA_PROVIDER_CAPTURE_INVALID, SATYA_PROVIDER_LOCATION_PERMISSION_DENIED | | nativeReplay | SATYA_NATIVE_REPLAY_FAILED, SATYA_PLATFORM_ATTESTATION_UNAVAILABLE | | artifactVerification | SATYA_ARTIFACT_VERIFICATION_FAILED | | initialization | SATYA_UNSUPPORTED_PLATFORM | | validation | SATYA_VALIDATION_FAILED | | unexpected | SATYA_UNEXPECTED |

SATYA_PLATFORM_ATTESTATION_UNAVAILABLE means the provider replay passed, but the device got no platform attestation: no Play Integrity token on Android (when cloudProjectNumber is set), or an App Attest failure on a real iOS device. The SDK signs no artifact and makes no verifier call, because the verifier always rejects an artifact without that attestation. Show a "check your connection and try again" message, and offer a retry when error.context.retryable is true. The context and the FAILED event logData also carry:

| Key | Meaning | | --- | --- | | retryable | true for a transient cause (timeout, network, platform service unavailable). | | platformAttestationCause | Closed set. Android: timeout, integrity_api_<code>, service_disconnected, empty_token, unexpected. iOS: timeout, app_attest_<keygen\|attest\|assert>_<DCError name>. | | platformAttestationAttempts | Token requests (Android) or attestKey calls (iOS) the SDK sent. | | platformAttestationLatencyMs | Time spent in the platform attestation step. |

The step has one total budget of 30 s and never repeats the provider replay. While the device waits, onProgress reports the platformAttestation phase. On success, ATTESTATION_GENERATED carries platformAttestationAttempts and platformAttestationLatencyMs.

SatyaError, SatyaErrorCode, SatyaErrorDiagnostics, and SatyaErrorStage are all exported from the package root.

App-Owned Buttons And Auto-Start

Apps with their own connect button can mount the same managed flow when they are ready to open the WebView. In this mode, the app owns the visible button and the SDK owns the WebView, capture, native replay, and verification flow:

export function AppOwnedConnectButton() {
  const [openSatya, setOpenSatya] = useState(false);

  return (
    <>
      <Pressable onPress={() => setOpenSatya(true)}>
        <Text>Connect Kaggle</Text>
      </Pressable>

      {openSatya ? (
        <SatyaProviderAttestButton
          autoStart
          renderButton={false}
          transportConfig={{
            verifierUrl: 'https://satya-verifier.example.com',
            cloudProjectNumber: 0, // Non-production placeholder: replace with the same positive linked number used in Devtool.
          }}
          verifyBackend
          onComplete={(result) => {
            setOpenSatya(false);
            saveSatyaArtifact(result.raw);
          }}
          onCancel={() => setOpenSatya(false)}
          onError={(error) => {
            setOpenSatya(false);
            reportSatyaError(error);
          }}
        />
      ) : null}
    </>
  );
}

autoStart opens once per component mount. To start another flow, unmount and remount the component when the app-owned button is pressed again. To open without a user pressing a visible SATYA button, set the state from your own route, onboarding step, deep link, or effect, then render the hidden launcher:

{shouldOpenSatya ? (
  <SatyaProviderAttestButton autoStart renderButton={false} {...satyaProps} />
) : null}

Composite Proofs

A composite proof attests claims from several governed endpoints gathered in one authenticated provider session. Strict-all artifacts are schema 2.0.0 (legacy) or app-bound 2.1.0; signed partial-endpoint artifacts use 2.2.0. Instead of a single endpointId, the app passes a proofPlanId — a registry-defined proof plan that selects an ordered set of 1–8 required endpoint ids. The app never supplies URLs or an endpoint list; every endpoint the plan replays is a pre-approved endpoints[] entry, and the plan is folded into the provider policyHash.

Provider-selective partial endpoints

Some providers cannot guarantee that every proof-plan endpoint fires in every session. An app may opt exact provider ids into partial completion without changing provider or proof-plan config:

initSatyaAttest({
  partialEndpointProviderIds: ['provider.identity.v1'],
});

Matching is exact and case-sensitive; entries are never treated as patterns. An empty or omitted list keeps every provider strict-all. There is no matching Provider Registry, Devtool, or verifier setting. The SDK list is an app availability preference; the backend remains the security authority.

For an opted-in provider, its injected JavaScript can declare the endpoint set that makes the partial proof usable. The preferred endpoint-aware API waits for the SDK itself to capture and correlate a 2xx response for every named endpoint, then starts native replay immediately:

window.SatyaAttest.partialProof.completeWhenCaptured({
  proofPlanId: 'full_profile_with_work',
  endpointIds: ['primary', 'current_user'],
});

The proof-plan ID must exactly match the selected plan. This keeps rules for other plans in shared provider injection inert. The endpoint IDs must be a non-empty proper subset of that plan, appear once in proof-plan order, and include at least one endpoint used by claim-equality account binding. The first valid matching call is latched for the active capture. Before capture settles, repeating the same call is harmless while a conflicting call fails closed. Once capture becomes terminal and replay starts (or capture fails), later page control messages are ignored because there is no active capture left to reconfigure. Calls are also ignored outside the app's partial-provider opt-in. Already-confirmed endpoints count, so the method may be called before or after the relevant requests.

For providers that cannot name a stable endpoint condition, JavaScript can instead request the existing timing-only manual path after its own requests settle:

window.SatyaAttest.partialProof.complete();
// Legacy alias, also supported:
window.__satyaCaptureComplete = true;

Manual completion uses the endpoints already confirmed by the SDK and retains the bounded 1.5s in-flight drain. Once completeWhenCaptured(...) has registered an endpoint condition, complete() cannot bypass it. None of these JavaScript APIs adds a provider-schema field.

An authenticated __satyaReady signal starts the capture window and releases readiness-gated endpoints. Without it, the first accepted ungated capture starts the window. Unless an accepted endpoint-aware or manual JavaScript completion signal settles capture earlier, the capture layer attempts the full plan until maxDurationMs. Full capture success stays on the existing strict-all path. On early settlement or timeout, it sends the confirmed 2xx request subset to native replay, which requires at least one successful exchange and may further omit availability, timeout, non-2xx, or missing-claim failures. TLS trust, SPKI, origin, request-policy, and binding failures remain fatal.

  • the signed set must be a non-empty proper subset in proof-plan order;
  • at least one claim-equality binding endpoint must remain; every configured binding claim on retained endpoints must resolve and all retained values must match. Only references to omitted endpoints are skipped; a missing claim on a retained endpoint still fails;
  • schema 2.2.0 signs completionMode: "partial-endpoint-subset"; the semantic hash, exchange root, and domain-separated proof challenge bind the exact ordered endpoint IDs;
  • schemas 2.0.0 and 2.1.0 have no completion mode and remain strict-all;
  • the verifier directly compares the signed subset with the current full registry proof plan and fully verifies every included exchange;
  • both the managed component and public SatyaMobileClient API require successful backend verification for schema 2.2.0, even when verifyBackend is false;
  • native/local verifyArtifact* returns backend-required for schema 2.2.0 and is not an acceptance verdict;
  • the verifier verdict always distinguishes strict-all from partial-endpoint-subset and returns endpointIds, omittedEndpointIds, and planComplete;
  • relying parties that require full completion must require planComplete: true (equivalently, completionMode: "strict-all" and an empty omittedEndpointIds).

The verifier proves that every presented exchange is valid and belongs to the configured plan. It cannot prove that the omitted endpoints were actually attempted; that is SDK execution behavior, not a property recoverable from a subset proof.

If the window expires without a successful endpoint, capture fails with no-endpoints-captured. Timeout diagnostics list unconfirmedEndpointIds.

proofPlanId is mutually exclusive with endpointId — pass exactly one. It works on the same SatyaProviderAttestButton and low-level client:

Providers without proofPlans[] remain single-endpoint compatible when no plan is requested. Requesting a proofPlanId from a provider with no plans, or requesting an unknown plan id, is rejected instead of silently changing the requested policy.

<SatyaProviderAttestButton
  providerId="provider.example.v1"
  proofPlanId="account-summary" // mutually exclusive with endpointId
  providerPolicyRefresh="verifier-first"
  // Non-production placeholder: replace 0 with the same positive linked number used in Devtool.
  transportConfig={{ verifierUrl: 'https://satya-verifier.example.com', cloudProjectNumber: 0 }}
  verifyBackend
  onComplete={(result) => {
    // result.proofPlanId, result.capturedRequests (every request in plan order),
    // result.capturedRequest aliases the first entry for backward compatibility.
    saveSatyaArtifact(result.raw);
  }}
/>

The SDK captures every required request inside the one WebView session, then native code (iOS Swift / Android Kotlin) replays each endpoint sequentially over a fresh SPKI-pinned connection using a proof-local cookie jar (seeded once from the WebView store, never written back; cookie contents are never serialized or hashed), with redirects disabled and only 2xx responses accepted. onProgress reports proofPlanId, endpointId, exchangeIndex, and exchangeCount as each exchange runs.

Limits

  • 1–8 endpoints per plan, ordered; the order is order-sensitive and participates in policyHash.
  • 8 MiB per claim value, measured as UTF-8 serialized JSON, including quotes and escapes; native uses its existing Rust serialization and TEE preserves exact numbers.
  • 80 MiB of revealed claim values across all endpoints and a separate **80 MiB seria