hyperweb-io / hyperweb-io/ts-codegen
Mapping between QueryMsg and QueryResponse
Open
- Dominant language
- TypeScript
- Stars
- 126
- Forks
- 31
- Avg merge
- 19m
- Merged PRs (30d)
- 2
Description
It would be great if we could generate a nice mapping between the query messages and their responses for use in libraries leveraging ts inference.
Example:
```ts
export type QueryMsg = {
simulate_swap: {
ask_asset: AssetEntry
dex?: string | null
offer_asset: AnsAsset
}
}
export interface SimulateSwapResponse {
commission: [AssetEntry, Uint128]
pool: DexAssetPairing
return_amount: Uint128
spread_amount: Uint128
}
export type QueryMsgResponses = {
simulate_swap: SimulateSwapResponse
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.