Skip to content

Commit 9e7e28c

Browse files
committed
docs: update
1 parent 51a734d commit 9e7e28c

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

src/api/schemas.ts

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,19 @@ const TokenDescription = Type.String({
156156
examples: [
157157
'Heavy hitters, all-stars and legends of the game join forces to create a collection of unique varsity jackets',
158158
],
159+
description: 'Description',
159160
});
160161

161162
const TokenImage = Type.String({
162163
format: 'uri',
163164
examples: ['ipfs://ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png'],
165+
description: 'Original image URL',
164166
});
165167

166168
const TokenCachedImage = Type.String({
167169
format: 'uri',
168170
examples: ['https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png'],
171+
description: 'Cached image URL',
169172
});
170173

171174
export const Metadata = Type.Object(
@@ -187,6 +190,7 @@ export type MetadataType = Static<typeof Metadata>;
187190
export const TokenUri = Type.String({
188191
format: 'uri',
189192
examples: ['ipfs://ipfs/Qmf9yDYuPTrp8NRUFf8xxDd5Ud24Dx9uYMwMn8o8G2cWPW/12200.json'],
193+
description: "URI for this token's metadata JSON",
190194
});
191195

192196
export const TokenNotFoundResponse = Type.Object(
@@ -245,21 +249,37 @@ export const PaginatedResponse = <T extends TSchema>(type: T, title: string) =>
245249

246250
export const FtMetadataResponse = Type.Object(
247251
{
248-
name: Type.Optional(Type.String({ examples: ['Wrapped USD'] })),
249-
symbol: Type.Optional(Type.String({ examples: ['xUSD'] })),
250-
decimals: Type.Optional(Type.Integer({ examples: [8] })),
251-
total_supply: Type.Optional(Type.String({ examples: ['9999980000000'] })),
252+
name: Type.Optional(Type.String({ examples: ['Wrapped USD'], description: 'Token name' })),
253+
symbol: Type.Optional(Type.String({ examples: ['xUSD'], description: 'Token symbol' })),
254+
decimals: Type.Optional(
255+
Type.Integer({
256+
examples: [8],
257+
description: "Number of decimal places clients should use to format this token's amounts",
258+
})
259+
),
260+
total_supply: Type.Optional(
261+
Type.String({
262+
examples: ['9999980000000'],
263+
description:
264+
'Current circulating supply as reported by its contract. Clients should format this amount with the correct number of `decimals` before displaying to users',
265+
})
266+
),
252267
token_uri: Type.Optional(TokenUri),
253268
description: Type.Optional(TokenDescription),
254269
image_uri: Type.Optional(TokenCachedImage),
255270
image_thumbnail_uri: Type.Optional(TokenCachedImage),
256271
image_canonical_uri: Type.Optional(TokenImage),
257272
tx_id: Type.String({
258273
examples: ['0x5642ca7d68976b6b2a2055689d9a57de26d67f0dd8b016d1b0d94cb634454cdd'],
274+
description: 'ID for the transaction that deployed this token',
275+
}),
276+
sender_address: Type.String({
277+
examples: ['SPZA22A4D15RKH5G8XDGQ7BPC20Q5JNMH0VQKSR6'],
278+
description: 'Deployer address',
259279
}),
260-
sender_address: Type.String({ examples: ['SPZA22A4D15RKH5G8XDGQ7BPC20Q5JNMH0VQKSR6'] }),
261280
asset_identifier: Type.String({
262281
examples: ['SPZA22A4D15RKH5G8XDGQ7BPC20Q5JNMH0VQKSR6.token-ststx-earn-v1::stSTXearn'],
282+
description: 'Clarity asset identifier',
263283
}),
264284
metadata: Type.Optional(Metadata),
265285
},

0 commit comments

Comments
 (0)