Platform
Platform hooks
DecaneWallet(config:) uses DecanePlatform.standard(). Pass your own DecanePlatform to replace any piece; each one is a protocol.
swift
var platform = DecanePlatform.standard()
platform.http = MyTransport() // conforms to DecaneHTTPTransport
let wallet = try DecaneWallet(config: config, platform: platform)| Hook | Default | Notes |
|---|---|---|
| HTTP | URLSessionTransport | Ephemeral session; a transport failure is .network |
| Secure store | KeychainStorage | Service decane-connect-kit, WhenUnlockedThisDeviceOnly; the same keys as the Expo SDK, so users moving from an Expo app keep their records |
| Device key | BiometricKey | .biometryCurrentSet |
| Passkeys | PlatformPasskeyProvider | With PRF on iOS 18 and macOS 15 |
| Web sign-in | WebAuthenticationSession | ASWebAuthenticationSession, ephemeral |
| PIN, recovery, attestation | none | DecanePinPrompt, DecaneRecoveryDelegate, DecaneAttestationVerifier |
Attestation
Before sending anything to the enclave, the SDK checks its measurement against the list pinned in the build. Without a DecaneAttestationVerifier, the Decane backend verifies the enclave’s quote. In production, forward the quote to your own backend with a verifier. insecureSkipAttestation is for development only.