importFoundation/// A just-paired device may have published its key before the serving Mac/// has wrapped the vault key for it. Complete that handoff before a signed/// create or claim. The presence-protected private key is read only once.enumPersonalSigner {staticfunc unlock( core: any CottonCalling, privateKey: String, pause: @Sendable () asyncthrows -> Void ) asyncthrows {structUnlock: Encodable { let privateKey: String }for attempt in0...10 {tryTask.checkCancellation()do { _ = tryawait core.callJSON(CottonMethod.vaultUnlock, Unlock(privateKey: privateKey))return } catchlet error asCottonCallErrorwhere error.code == "vault_not_wrapped_yet" && attempt < 10 {// Push the publication and pull the keeper's wrap. Each later// pass can collect the wrap made after the previous exchange. _ = tryawait core.callJSON(CottonMethod.syncNow)tryTask.checkCancellation()tryawait pause() } } }}