Skip to content

Add missing SVM and TVM response type exports#53

Merged
0237h merged 2 commits into
mainfrom
copilot/add-svm-response-type-exports
Mar 19, 2026
Merged

Add missing SVM and TVM response type exports#53
0237h merged 2 commits into
mainfrom
copilot/add-svm-response-type-exports

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 19, 2026

SVM and TVM namespaces were missing several response type aliases that EVM already exported, forcing consumers to hand-roll these types locally.

Changes

  • SVM — adds SvmTokensResponse, SvmBalancesResponse, SvmHoldersResponse, SvmPoolsResponse
  • TVM — adds TvmTokensResponse, TvmPoolsResponse
    (TVM has no getBalances/getHolders endpoints, so those are intentionally absent)

All follow the existing pattern:

export type SvmTokensResponse   = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['svm']['tokens']['getTokenMetadata']>>>;
export type SvmBalancesResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['svm']['tokens']['getBalances']>>>;
export type SvmHoldersResponse  = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['svm']['tokens']['getHolders']>>>;
export type SvmPoolsResponse    = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['svm']['dexs']['getPools']>>>;

export type TvmTokensResponse   = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['tvm']['tokens']['getTokenMetadata']>>>;
export type TvmPoolsResponse    = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['tvm']['dexs']['getPools']>>>;
Original prompt

This section details on the original issue you should resolve

<issue_title>Missing response type exports</issue_title>
<issue_description>## Summary

The SDK exports EVM response type aliases for all resource types but is missing the equivalent SVM types for tokens and holders.

Current exports (index.d.ts)

EVM — complete set

export type EvmTransfersResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['evm']['tokens']['getTransfers']>>>;
export type EvmSwapsResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['evm']['dexs']['getSwaps']>>>;
export type EvmTokensResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['evm']['tokens']['getTokenMetadata']>>>;
export type EvmBalancesResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['evm']['tokens']['getBalances']>>>;
export type EvmHoldersResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['evm']['tokens']['getHolders']>>>;
export type EvmPoolsResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['evm']['dexs']['getPools']>>>;

SVM — missing tokens and holders

export type SvmTransfersResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['svm']['tokens']['getTransfers']>>>;
export type SvmSwapsResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['svm']['dexs']['getSwaps']>>>;
// ❌ SvmTokensResponse — missing
// ❌ SvmHoldersResponse — missing
// ❌ SvmBalancesResponse — missing
// ❌ SvmPoolsResponse — missing

Expected additions

export type SvmTokensResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['svm']['tokens']['getTokenMetadata']>>>;
export type SvmHoldersResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['svm']['tokens']['getHolders']>>>;
export type SvmBalancesResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['svm']['tokens']['getBalances']>>>;
export type SvmPoolsResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['svm']['dexs']['getPools']>>>;

Also missing: TVM types

Same pattern applies to TVM — only transfers and swaps are exported:

export type TvmTransfersResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['tvm']['tokens']['getTransfers']>>>;
export type TvmSwapsResponse = NonNullable<Awaited<ReturnType<InstanceType<typeof TokenAPI>['tvm']['dexs']['getSwaps']>>>;
// ❌ TvmTokensResponse — missing

Impact

Consumers need to define these types locally, duplicating the pattern that already exists for EVM. The token-api-validator project needs SvmTokensResponse and SvmHoldersResponse to type-safely handle SVM token validation.

Action items

  1. Add the missing SVM and TVM type exports listed above.
  2. Audit all VM namespaces for completeness — for every method on client.evm.tokens.* and client.evm.dexs.* that has a corresponding response type export, verify that the equivalent SVM and TVM methods also have exports. The examples above may not be exhaustive.
    </issue_description>

<agent_instructions>Pay attention to the Action Items listed in the issue</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: 0237h <23462475+0237h@users.noreply.github.com>
Copilot AI changed the title [WIP] Add missing SVM response type exports for tokens and holders Add missing SVM and TVM response type exports Mar 19, 2026
Copilot AI requested a review from 0237h March 19, 2026 18:25
@0237h 0237h marked this pull request as ready for review March 19, 2026 18:38
@0237h 0237h merged commit acd28db into main Mar 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing response type exports

2 participants