Home

Smart Accounts

Using Openfort to interact with smart accounts.

Welcome to the world of Smart Accounts with Openfort! This guide dives deep into how Openfort facilitates interaction with smart accounts for game developers.

Openfort streamlines the creation of players and their respective accounts. This is integral for your game's ecosystem. Remember, each player you create can possess accounts across multiple chains, but they'll all share a common public address.

Understanding Players#

Players are at the heart of Openfort. Every time a user registers on your platform, a player is born. These players serve a dual purpose:

  1. Identification of users.
  2. Enabling interaction within your game.

For a seamless experience, create a player immediately upon user registration. Once created, assign them the unique playerId that Openfort provides.

player-account-relation

For your backend needs, Openfort offers a dedicated SDK direct API access.

Understanding accounts#

Think of Openfort accounts as a virtual representation of Ethereum account. Their main purpose? Managing a player's assets. Interestingly, when a player is created, they don't have any associated account.

Want to create an account? It's simple. Just use the playerId and a chainId. In most scenarios, you won't even need to manually create an account. Just use the playerId for any on-chain activity, and Openfort will handle the rest, creating an account in the given chainId automatically.

player-account-relation

Exploring the custody model#

It's a prevalent misconception that AA wallets inherently denote non-custodial nature. However, the "AA" label isn't the determining factor for custodianship; rather, it's the signers behind the wallet.

Simply put:

  • Use a non-custodial signer like local private keys with your AA wallet? It remains non-custodial.
  • Opt for a custodial key provider, say Fireblocks, for your AA wallet? It's custodial.

In essence, the custody of a wallet hinges on the custody of its signers. Openfort offers both approaches to the custodial model based on your preference, while also allowing you to use external wallet signers. Learn more here.

tip

The custody model of a new account depends on whether you supply the externalOwnerAddress. Without this, Openfort sets up a custodial signer. But remember, even post-creation, you can shift from a custodial to a non-custodial account. Curious? Dive into Transfer Account Ownership.