Skip to content

Commit

Permalink
Update types of responses
Browse files Browse the repository at this point in the history
  • Loading branch information
ilamanov committed Jan 23, 2025
1 parent 7f90e35 commit 6a45783
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
28 changes: 22 additions & 6 deletions src/evm/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ export type BalanceData = {
wallet_address: string;
next_offset?: string | null;
balances: TokenBalance[];
errors?: {
token_errors?: {
address: string;
chain_id: number;
description?: string;
}[];
};
};

export type FetchError = Error & {
Expand Down Expand Up @@ -53,17 +60,29 @@ export type TransactionsParams = {
/** Maximum number of transactions to return */
limit?: number | null;

/** Return only transactions before this block time */
block_time?: number | null;

/** Comma separated list of chain ids to get transactions for */
chainIds?: string | null;

/** Return only transactions with this method id */
method_id?: string | null;

/** Filter transactions to a given address */
to?: string | null;

/** Return only transactions with this method id */
method_id?: string | null;

/** Return abi decoded transactions and logs */
decode?: boolean | null;

/** Return only transactions with this address in logs */
log_address?: string | null;

/** Return only transactions with this topic0 */
topic0?: string | null;

/** Return only transactions with this block number */
min_block_number?: number | null;
};

export type UseTokenBalancesConfig = {
Expand Down Expand Up @@ -95,9 +114,6 @@ export type Transaction = {
};

export type TransactionData = {
request_time: string;
response_time: string;
wallet_address: string;
transactions: Transaction[];
next_offset?: string | null;
};
7 changes: 7 additions & 0 deletions src/svm/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ export type BalanceData = {
wallet_address: string;
balances: TokenBalance[];
next_offset?: string | null;
errors?: {
token_errors?: {
address: string;
chain_id: number;
description?: string;
}[];
};
};

export type FetchError = Error & {
Expand Down

0 comments on commit 6a45783

Please sign in to comment.