Skip to main content

Export

Export reconstructs the user's full private key — not just the device's share — and returns it as raw bytes. Anyone holding the exported file can re-import the wallet on a fresh device.

Unlike duo's 3-step protocol, trio export is a single SDK call — the SDK coordinates with both mobile and cloud party internally over the websocket, the key reconstruction happens on mobile side.

For the SDK contract see Export Key (Kotlin) and Export Key (Swift).

How the example does it

vault/.../session/VaultSessionManager.kt
suspend fun exportKeyshare(keyId: String): ByteArray {
val dao = readDao(keyId)
return sessionFor(dao.keyType).export(keyId).getOrThrow()
}

The example wraps the exported key (hex-encoded) into a JSON entry and writes it to a user-chosen file:

{ "keyType": "ECDSA", "chain": "ETHEREUM_SEPOLIA", "exportDataHex": "abc123..." }

The vault never persists exports — the file is purely for the user to store.

Export screen