Using Openfort to interact with smart accounts.
Learn how and when to create a player and their respective accounts using Openfort SDKs and APIs.
This guide explains how to use Openfort to interact and manage your players and their accounts inside your game ecosystem.
When using Openfort, you must create a
player for each individual that wants to use your game.
Each player can have accounts on different chains; they all will have the same public address.
What are Players?#
You create players every time a user signs up in your platform.
Players are used to identify users and enable them to interact with your game. Ideally, you want to create a player as soon as a new user signs up to your game and assing the newly created user with the
playerId that Openfort returns.
What are Accounts?#
Openfort accounts represent the Ethereum account and they are used to manage the assets of a player. Players in Openfort don't have any account assigned to them when created.
Whenever you want to create an account, you'll simply need to create it using a
playerId and a
chainId. In most circumstances it's not necessary to create an account manually. Whenever you use that
playerId to perform an on-chain action, Openfort will automatically create an account for you in the specified
The custodial sheme of that newly created account will depend on wether you provide the
external_owner_address or not. When not provided, a custodial signer will be created for the new account.
Even after creating a custodial account, your can convert it to non-custodial or self-custodial by transferring its ownership. Learn more at Transfer Account Ownership.