pub struct ShareExport {
pub version: u8,
pub threshold: u16,
pub total: u16,
pub identifier: u16,
pub group_pubkey: String,
pub encrypted_share: String,
pub nonce: String,
pub salt: String,
pub ciphersuite: Ciphersuite,
}Expand description
An encrypted share export for backup and transfer.
Fields§
§version: u8Format version.
threshold: u16Threshold required to sign.
total: u16Total number of shares.
identifier: u16Share identifier.
group_pubkey: StringGroup public key (hex).
Encrypted share data (hex).
nonce: StringEncryption nonce (hex).
salt: StringKey derivation salt (hex).
ciphersuite: CiphersuiteFROST ciphersuite of this share.
Defaults to Secp256k1Tr so exports written before this field existed
parse unchanged. Authenticated via the AEAD associated data of
encrypted_share, so it cannot be flipped without decryption failure.
Implementations§
Create an encrypted secp256k1 export from a share package.
Create an encrypted export from a share package, binding the ciphersuite.
Decrypt and restore the share package.
Sourcepub fn parse(input: &str) -> Result<Self>
pub fn parse(input: &str) -> Result<Self>
Parse from either bech32 or JSON format, auto-detecting based on prefix.
Sourcepub fn from_bech32(encoded: &str) -> Result<Self>
pub fn from_bech32(encoded: &str) -> Result<Self>
Decode from a bech32 string.
Sourcepub fn to_animated_frames(&self, max_bytes: usize) -> Result<Vec<String>>
pub fn to_animated_frames(&self, max_bytes: usize) -> Result<Vec<String>>
Split into animated QR code frames.
Sourcepub fn from_animated_frames(frames: &[String]) -> Result<Self>
pub fn from_animated_frames(frames: &[String]) -> Result<Self>
Reassemble from animated QR code frames.