Skip to content

Mapping between QueryMsg and QueryResponse #125

Open
@adairrr

Description

@adairrr

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:

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions