[TOC] --- # Seamless Wallet API Flow ## Join \ Leave Game Flow ``` mermaid sequenceDiagram Title: participant Player participant Integrator Frontend participant Launch Page participant Game Frontend participant Backend participant Integrator Backend Player-->>Integrator Frontend:Click Game ICon Integrator Frontend-->>Launch Page: redirect /game/launch Launch Page-->>Game Frontend: redirect Game Frontend->>Backend: Backend->>Integrator Backend: Post /user/authenticate Integrator Backend-->>Backend: response Backend->>Integrator Backend: Post /account/token Integrator Backend-->>Backend: response Backend-->>Game Frontend: response Note over Game Frontend,Integrator Backend: Play Game Flow Player-->>Game Frontend: Click Exit Button Game Frontend->>Backend: Backend-->>Game Frontend: response alt has backurl Game Frontend-->>Integrator Frontend: [redirect] else Game Frontend->>Game Frontend: close window end alt integrator had subscribed game session event Backend->>Integrator Backend: post /event/gameSession Integrator Backend-->>Backend: response end ``` ## Play Game Flow ### Slot Game ``` mermaid sequenceDiagram Title: participant Player participant Game Frontend participant Backend participant Integrator Backend Player-->>Game Frontend: Click Play Button Game Frontend->>Backend: Backend->>Integrator Backend: Post /wager/transaction Note right of Backend: Valid Operations<br/>---<br/>create<br/>withdraw<br/>item<br/>jp Integrator Backend-->>Backend: response Backend->>Backend: calculate Backend->>Integrator Backend: Post /wager/transaction Note right of Backend: Valid Operations<br/>---<br/>deposit<br/>tag<br/>confirm<br/>cancel Integrator Backend-->>Backend: response Backend-->>Game Frontend: response Game Frontend->>Game Frontend: animation acting Game Frontend->>Backend: Backend->>Integrator Backend: Get /Balance Integrator Backend-->>Backend: response Backend-->>Game Frontend: response ```