User Tools

Site Tools


en:outskirts:mages-peaks:onboarding-api

This is an old revision of the document!


About the APIs for the onboarding process, we need:

1) The Backend should manage the creation and delivery of Shells

  • Associated with a User Account
  • With a token-protected API for the front to query the presence of the Shell and its ID
  • Possibly a few attributes such a Color (can be added later if needed)
  • Possibly an inital number of Elith

2) The Backend should manage Eliths

  • Will be attached to Player Characters, but we need to have an Initial Amount (possibly stored in the Shell, if we have to “gift” more or less to different guests)

3) The Backend should manage Base Player Characters

  • See PlayerCharacter.ts in the www project
  • Probabilities for the different Traits depend on the species - the proba tables from PlayerCharacter.ts should be moved to the backend generator
  • The representation should produce a “seed” bigint with the different fields bitmapped as indicated in the “seed structure” section of PlayerCharacter.ts. The Seed embodies all Traits and can serve as a compact basis to Mint an NFT (if you want, see the BaseCharacter.sol contract in my Web2draw Pull Request of https://github.com/lephitar/LaeCryp – we may extend it later with the player-choosen Name, if we accept to “put it in stone”)
  • Each can have a number of Eliths stacked on it
  • The Front-End must be able to Get the list of 5 Choosable PCs (must be stable), and the associated Elith Stack, and the Amount of Elith available to the logged in user (e.g. may be in the Shell)
  • You may see the MisableOriginToken.sol contract, but I don't doubt you will find it easier to recode it from scratch :)
  • The Front-End should be able to tell the Backend which is the choosen character, and apply the consequences (PC ownership, Eliths).
  • The Front-end must be able to Query at anytime the Eliths and PCs of the logged in user.

4) The Backend should manage a list of Wallet Accounts for an User

  • TBD Later - Primary decision will be to determine whether to associate this to the user (probably) or character.
  • Each is just a String
en/outskirts/mages-peaks/onboarding-api.1701444952.txt.gz · Last modified: 2024/10/28 08:00 (external edit)