DeFiCh / DeFiCh/jellyfishsdk

`WhaleApiResponse` should include a "meta" field that include defid node stats.

Open
#1,663 1 comment 0 reactions 0 assignees View on GitHub
apps/whale-api area/apps area/packages kind/feature priority/important-soon triage/accepted
Dominant language
TypeScript
Stars
101
Forks
34
PR merge metrics
No merged PRs in 30d

Description

#### What would you like to be added:

https://github.com/JellyfishSDK/jellyfish/blob/7e88ff530a4f97216086c6e09ec23654c7778033/packages/whale-api-client/src/whale.api.response.ts#L4-L8

Should include:

```json
{
"data":{},
"meta": {
"blockchain": {
"hash": "923fe2d3f5920163d2401095de5647ce25ee3463863fad04e76eec48719fb8a3",
"height": 1398516,
"medianTime": 1637921787,
"time": 1637921973
}
}
}
```

#### Why is this needed:

Including blockchain information to `WhaleApiResponse` will make it easier for the client to determine the `ApiResponse` is reliable and up to date before they perform their subsequent actions.

/triage accepted
/area packages apps
/apps whale-api

Contributor guide

Open the contributing guide

Research direction

Start with packages/whale-api-client/src/whale.api.response.ts at the linked lines and inspect how WhaleApiResponse currently models API results. Compare that type with the issue's example, then trace its response usage to confirm the expected shape. Done means the response type represents data alongside blockchain hash, height, medianTime, and time metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, blockchain
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.