Creating profiles
Creating a profile is as simple as calling the CreateProfile
method. The only thing we require you to send us, is an string that uniquely represents the player on your end. We call this your EntityID
, and you decide what this ID is.
const profile = await beam.profiles.createProfile({ entityId: "some-string-unique-to-you", chainId: 4337 });
A couple of examples what this ID could contain:
- An ID representing an entity in your own service (for example: a match ID)
- A pre-defined constant, eg; ‘Minter’
It’s up to you! But consider this carefully: in case of an application emergency on your end, you will want to be able to restore a mapping to the correct Profiles, hence our recommendation using an identifier which you already have, preventing from having to store it.
The entityId
you provide to us, is included in most Profile related responses as the externalEntityId
, should you ever need to refer to it.
Profiles on chain
Note that the wallets we create do not exist on-chain up until a first transaction happens, so once a profile is created, it will not be deployed until the first on-chain activity takes place.