DustCloudBundleCodec

Plaintext (pre-encryption) wire format for the dust cloud backup — a single versioned container holding one entry per network the user has dust on (≤3).

"KDB1" | version(1) | entryCount(1) | repeated {
addrLen(2 BE) | addrUtf8 | lastEventId(8 BE) | stateLen(4 BE) | stateBytes
}

The 4-byte stateLen accommodates the ~500 KB dust state (the 2-byte field in AppStateBackupEncryptor could not). Encrypt the encoded bytes with DustBackupEncryptor before upload.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun entryFor(bytes: ByteArray, address: String): DustBackupEntry?

Decode and return the entry for address, or null if the bundle has none.