Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Pregenerating an embedded wallet

You can pregenerate a non-custodial wallet associated with a given account, such as an email address or third-party authentication provider, without requiring the user to log in. You can send assets to the wallet before the user logs in for the first time. Once the user logs in, they can access the pregenerated wallet and any assets sent to them.

Users claim their pregenerated wallet by logging into your app with one of the linked accounts.

Provide one of the following user identification methods:

  • email: the user's email address when using Openfort authentication.
  • thirdPartyUserId and thirdPartyProvider: the user's ID and provider when using a third-party authentication service such as Firebase, Supabase, or Auth0. Both fields are required when using this method.

For the shield configuration:

  • shieldAuthProvider: set to ShieldAuthProvider.OPENFORT.
  • shieldApiKey: your Shield API key from the dashboard.
  • shieldApiSecret: your Shield API secret from the dashboard.
  • encryptionShare: your Shield encryption share.

A successful response includes the new embedded account object along with the user's ID:

EVM Response
{
  "id": "acc_ff54b031-a878-4ca2-9cf5-ae190f921e9b",
  "user": "usr_ff54b031-a878-4ca2-9cf5-ae190f921e9b",
  "address": "0x1234567890abcdef1234567890abcdef12345678",
  "ownerAddress": "0xabcdef1234567890abcdef1234567890abcdef12",
  "accountType": "Externally Owned Account",
  "chainType": "EVM",
  "createdAt": 1691658234
}
Copyright © 2023-present Alamas Labs, Inc