There is a function
export function createIdentityRecoveryRequest(
input: IdentityRecoveryRequestInput
): Versioned<IdRecoveryRequest>
which you use to generate the request for recovering the identity. This in particular takes a seed phrase as an argument.
This is how it is then used (this code examples if from the browser wallet)
function getRecoverUrl(inputs: RecoveryInputs, provider: IdentityProvider) {
const timestamp = Math.floor(Date.now() / 1000);
const idRecoveryRequest = createIdentityRecoveryRequest({ ...inputs, timestamp, ipInfo: provider.ipInfo });
const searchParams = new URLSearchParams({
state: JSON.stringify({ idRecoveryRequest }),
});
return `${provider.metadata.recoveryStart}?${searchParams.toString()}`;
}
This construct the recovery URL, query it then and if there is an identity with those credentials the IDP will return the identity object.