This resolves an email address to an Ethereum public Address. Returns an account if it already exists on torus network. Creates a new wallet for that user if it does not exist.
const publicAddress = await torus.getPublicAddress(params);
Parameters
params
- VerifierArgs
: The parameters passed to the method
verifier
- enum
: The verifier to use. Supported enums are google
, reddit
, discord
verifierId
- string
: The unique identifier for that verifier. (Say email for google, username for reddit and id for discord).
Returns
Promise<string>
: Returns a promise which resolves to the Ethereum address associated with the email.
Reference
interface VerifierArgs {verifier: "google" | "reddit" | "discord";verifierId: string;}
Examples
const publicAddress = await torus.getPublicAddress({verifier: "google",verifierId: "random@gmail.com"});