Skip to main content
public func exportRecoveryKeyShares(tssKeyShareGroupIDs: [String], exportPassphrase: String) throws -> String
let tssKeyShareGroupIDs = ["gjRIvhmnDfpcGrzjOABE"]
let exportPassphrase = "wZdcycVuexvmgt7aMkaeA_2_ioCKrw!B"

do {
    if let jsonRecoverySecrets = try sdkInstance?.exportRecoveryKeyShares(tssKeyShareGroupIDs: tssKeyShareGroupIDs, exportPassphrase: exportPassphrase) {
        print("\(jsonRecoverySecrets)\n")
    } else {
        print("Failed to export recovery key shares")
    }
} catch {
    print("Error: \(error)")
}

Parameters

tssKeyShareGroupIDs
string[]
The list of TSS key share group IDs.
exportPassphrase
string
The passphrase used to encrypt the exported JSON data of recovery key shares. Must be at least 16 characters long.

Response

jsonRecoverySecrets
string
The exported passphrase-encrypted JSON data of the specified recovery key shares.