Skip to content

Commit

Permalink
Add missing JS annotation to prc-1
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienGllmt committed May 1, 2024
1 parent f3ea615 commit 684b3c5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/home/20000-PRCs/prc-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ This achievement system can be used by the target game itself for unlocking func
### Response Interfaces

General Game Info
```
interface Game = {
```js
interface Game {
id: string // Game ID
name?: string // Optional Game Name
version?: string // Optional Game Version
Expand All @@ -42,17 +42,17 @@ interface Game = {

Data Validity
For cross-game on-chain interoperability, this field allows the requester to confirm when the data is valid, and which is the reference blockchain.
```
interface Validity = {
```js
interface Validity {
block: number; // Data Block height (0 always valid)
caip2: string; // CAIP-2 blockchain identifier
time: string; // Optional Date ISO8601 YYYY-MM-DDTHH:mm:ss.sssZ
}
```

Player Info
```
interface Player = {
```js
interface Player {
wallet: // e.g., addr1234... or 0x1234..,
walletType?: 'cardano' | 'evm' | 'polkadot' | 'algorand' | string // (Optional) Wallet-type
userId?: string; // (Optional) User ID for a specific player account.
Expand All @@ -74,7 +74,7 @@ Optional: Subset of active achievements
`{BASE_URL}/achievements/public/list?isActive=true`


```
```js
interface AchievementPublicList extends Game, Validity {
achievements: {
name: string; // Unique Achievement String
Expand Down Expand Up @@ -106,7 +106,7 @@ e.g., /achievements/erc/erc721/cards/20
Optional subset of achievements by name
`{BASE_URL}/achievements/wallet/:wallet?name=start_game,end_game,defeat_red_dragon`

```
```js
interface PlayerAchievements extends Validity, Player {
completed: number; // Total number of completed achievements for the game
achievements: {
Expand Down

0 comments on commit 684b3c5

Please sign in to comment.