import { Turnkey } from "@turnkey/sdk-server";const turnkeyClient = new Turnkey({ apiBaseUrl: "https://api.turnkey.com", apiPublicKey: process.env.API_PUBLIC_KEY!, apiPrivateKey: process.env.API_PRIVATE_KEY!, defaultOrganizationId: process.env.ORGANIZATION_ID!,});const response = await turnkeyClient.apiClient().initUserEmailRecovery({ email: "<string> (Email of the user starting recovery)", targetPublicKey: "<string> (Client-side public key generated by the user, to which the recovery bundle will be encrypted.)", expirationSeconds: "<string> (Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used.)", emailCustomization: { // emailCustomization field, appName: "<string> (The name of the application. This field is required and will be used in email notifications if an email template is not provided.)", logoUrl: "<string> (A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.)", magicLinkTemplate: "<string> (A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.)", templateVariables: "<string> (JSON object containing key/value pairs to be used with custom templates.)", templateId: "<string> (Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.)", }, sendFromEmailAddress: "<string> (Optional custom email address from which to send the OTP email)", sendFromEmailSenderName: "<string> (Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications')", replyToEmailAddress: "<string> (Optional custom email address to use as reply-to)"});
import { Turnkey } from "@turnkey/sdk-server";const turnkeyClient = new Turnkey({ apiBaseUrl: "https://api.turnkey.com", apiPublicKey: process.env.API_PUBLIC_KEY!, apiPrivateKey: process.env.API_PRIVATE_KEY!, defaultOrganizationId: process.env.ORGANIZATION_ID!,});const response = await turnkeyClient.apiClient().initUserEmailRecovery({ email: "<string> (Email of the user starting recovery)", targetPublicKey: "<string> (Client-side public key generated by the user, to which the recovery bundle will be encrypted.)", expirationSeconds: "<string> (Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used.)", emailCustomization: { // emailCustomization field, appName: "<string> (The name of the application. This field is required and will be used in email notifications if an email template is not provided.)", logoUrl: "<string> (A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.)", magicLinkTemplate: "<string> (A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.)", templateVariables: "<string> (JSON object containing key/value pairs to be used with custom templates.)", templateId: "<string> (Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.)", }, sendFromEmailAddress: "<string> (Optional custom email address from which to send the OTP email)", sendFromEmailSenderName: "<string> (Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications')", replyToEmailAddress: "<string> (Optional custom email address to use as reply-to)"});
import { Turnkey } from "@turnkey/sdk-server";const turnkeyClient = new Turnkey({ apiBaseUrl: "https://api.turnkey.com", apiPublicKey: process.env.API_PUBLIC_KEY!, apiPrivateKey: process.env.API_PRIVATE_KEY!, defaultOrganizationId: process.env.ORGANIZATION_ID!,});const response = await turnkeyClient.apiClient().initUserEmailRecovery({ email: "<string> (Email of the user starting recovery)", targetPublicKey: "<string> (Client-side public key generated by the user, to which the recovery bundle will be encrypted.)", expirationSeconds: "<string> (Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used.)", emailCustomization: { // emailCustomization field, appName: "<string> (The name of the application. This field is required and will be used in email notifications if an email template is not provided.)", logoUrl: "<string> (A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.)", magicLinkTemplate: "<string> (A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.)", templateVariables: "<string> (JSON object containing key/value pairs to be used with custom templates.)", templateId: "<string> (Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.)", }, sendFromEmailAddress: "<string> (Optional custom email address from which to send the OTP email)", sendFromEmailSenderName: "<string> (Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications')", replyToEmailAddress: "<string> (Optional custom email address to use as reply-to)"});