import { api } from '@/slices/api/slice' export type Maybe = T | null export type InputMaybe = Maybe export type Exact = { [K in keyof T]: T[K] } export type MakeOptional = Omit & { [SubKey in K]?: Maybe } export type MakeMaybe = Omit & { [SubKey in K]: Maybe } export type MakeEmpty< T extends { [key: string]: unknown }, K extends keyof T > = { [_ in K]?: never } export type Incremental = | T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never } /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: { input: string; output: string } String: { input: string; output: string } Boolean: { input: boolean; output: boolean } Int: { input: number; output: number } Float: { input: number; output: number } } export type AddressChainRanking = { __typename?: 'AddressChainRanking' chainID?: Maybe rank?: Maybe volumeUsd?: Maybe } export type AddressDailyCount = { __typename?: 'AddressDailyCount' count?: Maybe date?: Maybe } export type AddressData = { __typename?: 'AddressData' bridgeFees?: Maybe bridgeTxs?: Maybe bridgeVolume?: Maybe chainRanking?: Maybe>> dailyData?: Maybe>> earliestTx?: Maybe rank?: Maybe swapFees?: Maybe swapTxs?: Maybe swapVolume?: Maybe } /** AddressRanking gives the amount of transactions that occurred for a specific address across all chains. */ export type AddressRanking = { __typename?: 'AddressRanking' address?: Maybe count?: Maybe } export type BlockHeight = { __typename?: 'BlockHeight' blockNumber?: Maybe chainID?: Maybe type?: Maybe } /** * BridgeTransaction represents an entire bridge transaction, including both * to and from transactions. If a `from` transaction does not have a corresponding * `to` transaction, `pending` will be true. */ export type BridgeTransaction = { __typename?: 'BridgeTransaction' fromInfo?: Maybe kappa?: Maybe pending?: Maybe swapSuccess?: Maybe toInfo?: Maybe } export enum BridgeTxType { Destination = 'DESTINATION', Origin = 'ORIGIN', } export enum BridgeType { Bridge = 'BRIDGE', Cctp = 'CCTP', } /** BridgeWatcherTx represents a single sided bridge transaction specifically for the bridge watcher. */ export type BridgeWatcherTx = { __typename?: 'BridgeWatcherTx' bridgeTx?: Maybe kappa?: Maybe kappaStatus?: Maybe pending?: Maybe type?: Maybe } export type ContractQuery = { chainID: Scalars['Int']['input'] type: ContractType } export enum ContractType { Bridge = 'BRIDGE', Cctp = 'CCTP', } export enum DailyStatisticType { Addresses = 'ADDRESSES', Fee = 'FEE', Transactions = 'TRANSACTIONS', Volume = 'VOLUME', } /** DateResult is a given statistic for a given date. */ export type DateResult = { __typename?: 'DateResult' date?: Maybe total?: Maybe } /** DateResult is a given statistic for a given date. */ export type DateResultByChain = { __typename?: 'DateResultByChain' arbitrum?: Maybe aurora?: Maybe avalanche?: Maybe base?: Maybe boba?: Maybe bsc?: Maybe canto?: Maybe cronos?: Maybe date?: Maybe dfk?: Maybe dogechain?: Maybe ethereum?: Maybe fantom?: Maybe harmony?: Maybe klaytn?: Maybe metis?: Maybe moonbeam?: Maybe moonriver?: Maybe optimism?: Maybe polygon?: Maybe total?: Maybe } export enum Direction { In = 'IN', Out = 'OUT', } export enum Duration { AllTime = 'ALL_TIME', Past_3Months = 'PAST_3_MONTHS', Past_6Months = 'PAST_6_MONTHS', PastDay = 'PAST_DAY', PastMonth = 'PAST_MONTH', PastYear = 'PAST_YEAR', } export type HeroType = { __typename?: 'HeroType' heroID: Scalars['String']['output'] recipient: Scalars['String']['output'] } /** HistoricalResult is a given statistic for dates. */ export type HistoricalResult = { __typename?: 'HistoricalResult' dateResults?: Maybe>> total?: Maybe type?: Maybe } export enum HistoricalResultType { Addresses = 'ADDRESSES', Bridgevolume = 'BRIDGEVOLUME', Transactions = 'TRANSACTIONS', } export enum KappaStatus { Exists = 'EXISTS', Pending = 'PENDING', Unknown = 'UNKNOWN', } export type Leaderboard = { __typename?: 'Leaderboard' address?: Maybe avgVolumeUSD?: Maybe fees?: Maybe rank?: Maybe txs?: Maybe volumeUSD?: Maybe } export type MessageBusTransaction = { __typename?: 'MessageBusTransaction' fromInfo?: Maybe messageID?: Maybe pending?: Maybe toInfo?: Maybe } export type MessageType = HeroType | PetType | TearType | UnknownType /** PartialInfo is a transaction that occurred on one chain. */ export type PartialInfo = { __typename?: 'PartialInfo' USDValue?: Maybe address?: Maybe blockNumber?: Maybe chainID?: Maybe destinationChainID?: Maybe eventType?: Maybe formattedEventType?: Maybe formattedTime?: Maybe formattedValue?: Maybe time?: Maybe tokenAddress?: Maybe tokenSymbol?: Maybe txnHash?: Maybe value?: Maybe } export type PartialMessageBusInfo = { __typename?: 'PartialMessageBusInfo' blockNumber?: Maybe chainID?: Maybe chainName?: Maybe contractAddress?: Maybe destinationChainID?: Maybe destinationChainName?: Maybe formattedTime?: Maybe message?: Maybe messageType?: Maybe revertedReason?: Maybe time?: Maybe txnHash?: Maybe } export type PetType = { __typename?: 'PetType' name: Scalars['String']['output'] petID: Scalars['String']['output'] recipient: Scalars['String']['output'] } export enum Platform { All = 'ALL', Bridge = 'BRIDGE', MessageBus = 'MESSAGE_BUS', Swap = 'SWAP', } export type Query = { __typename?: 'Query' /** Get wallet information */ addressData?: Maybe /** * Returns addresses and transaction count (origin) over time. * Specifying no parameters defaults to 24 hours. */ addressRanking?: Maybe>> /** * Returns mean/median/total/count of transactions transacted for a given duration, chain and address. * Specifying no duration defaults to ALL_TIME, and no chain or address searches across all. */ amountStatistic?: Maybe /** Returns bridged transactions filterable by chain, to/from address, to/from txn hash, token address, and keccak hash. */ bridgeTransactions?: Maybe>> /** * Returns the COUNT of bridged transactions for a given chain. If direction of bridge transactions * is not specified, it defaults to IN. * Specifying no duration defaults to the last 24 hours. */ countByChainId?: Maybe>> /** * Returns counts of token addresses source and time. * Specifying no parameters defaults to origin and 24 hours. */ countByTokenAddress?: Maybe>> /** Daily statistic data */ dailyStatisticsByChain?: Maybe>> /** GetBlockHeight gets block heights from the current bridge. Returns results in an array of increased block heights. */ getBlockHeight?: Maybe>> /** GetDestinationBridgeTx is the bridge watcher endpoint for getting an destination bridge tx (BETA). */ getDestinationBridgeTx?: Maybe /** GetOriginBridgeTx is the bridge watcher endpoint for getting an origin bridge tx (BETA). */ getOriginBridgeTx?: Maybe /** Get LeaderBoard */ leaderboard?: Maybe>> /** Message bus transactions */ messageBusTransactions?: Maybe>> /** Ranked chainIDs by volume */ rankedChainIDsByVolume?: Maybe>> } export type QueryAddressDataArgs = { address: Scalars['String']['input'] } export type QueryAddressRankingArgs = { hours?: InputMaybe } export type QueryAmountStatisticArgs = { address?: InputMaybe chainID?: InputMaybe duration?: InputMaybe platform?: InputMaybe tokenAddress?: InputMaybe type: StatisticType useCache?: InputMaybe useMv?: InputMaybe } export type QueryBridgeTransactionsArgs = { addressFrom?: InputMaybe addressTo?: InputMaybe chainIDFrom?: InputMaybe>> chainIDTo?: InputMaybe>> endTime?: InputMaybe kappa?: InputMaybe maxAmount?: InputMaybe maxAmountUsd?: InputMaybe minAmount?: InputMaybe minAmountUsd?: InputMaybe onlyCCTP?: InputMaybe page?: InputMaybe pending?: InputMaybe startTime?: InputMaybe tokenAddressFrom?: InputMaybe>> tokenAddressTo?: InputMaybe>> txnHash?: InputMaybe useMv?: InputMaybe } export type QueryCountByChainIdArgs = { address?: InputMaybe chainID?: InputMaybe direction?: InputMaybe hours?: InputMaybe } export type QueryCountByTokenAddressArgs = { address?: InputMaybe chainID?: InputMaybe direction?: InputMaybe hours?: InputMaybe } export type QueryDailyStatisticsByChainArgs = { chainID?: InputMaybe duration?: InputMaybe platform?: InputMaybe type?: InputMaybe useCache?: InputMaybe useMv?: InputMaybe } export type QueryGetBlockHeightArgs = { contracts?: InputMaybe>> } export type QueryGetDestinationBridgeTxArgs = { address: Scalars['String']['input'] bridgeType: BridgeType chainID: Scalars['Int']['input'] historical?: InputMaybe kappa: Scalars['String']['input'] timestamp: Scalars['Int']['input'] } export type QueryGetOriginBridgeTxArgs = { bridgeType: BridgeType chainID: Scalars['Int']['input'] txnHash: Scalars['String']['input'] } export type QueryLeaderboardArgs = { chainID?: InputMaybe duration?: InputMaybe page?: InputMaybe useMv?: InputMaybe } export type QueryMessageBusTransactionsArgs = { chainID?: InputMaybe>> contractAddress?: InputMaybe endTime?: InputMaybe messageID?: InputMaybe page?: InputMaybe pending?: InputMaybe reverted?: InputMaybe startTime?: InputMaybe txnHash?: InputMaybe } export type QueryRankedChainIDsByVolumeArgs = { duration?: InputMaybe useCache?: InputMaybe } export enum StatisticType { CountAddresses = 'COUNT_ADDRESSES', CountTransactions = 'COUNT_TRANSACTIONS', MeanFeeUsd = 'MEAN_FEE_USD', MeanVolumeUsd = 'MEAN_VOLUME_USD', MedianFeeUsd = 'MEDIAN_FEE_USD', MedianVolumeUsd = 'MEDIAN_VOLUME_USD', TotalFeeUsd = 'TOTAL_FEE_USD', TotalVolumeUsd = 'TOTAL_VOLUME_USD', } export type TearType = { __typename?: 'TearType' amount: Scalars['String']['output'] recipient: Scalars['String']['output'] } /** TokenCountResult gives the amount of transactions that occurred for a specific token, separated by chain ID. */ export type TokenCountResult = { __typename?: 'TokenCountResult' chainID?: Maybe count?: Maybe tokenAddress?: Maybe } /** TransactionCountResult gives the amount of transactions that occurred for a specific chain ID. */ export type TransactionCountResult = { __typename?: 'TransactionCountResult' chainID?: Maybe count?: Maybe } export type UnknownType = { __typename?: 'UnknownType' known: Scalars['Boolean']['output'] } /** ValueResult is a value result of either USD or numeric value. */ export type ValueResult = { __typename?: 'ValueResult' value?: Maybe } export type VolumeByChainId = { __typename?: 'VolumeByChainID' chainID?: Maybe total?: Maybe } export type GetUserHistoricalActivityQueryVariables = Exact<{ address: Scalars['String']['input'] startTime: Scalars['Int']['input'] }> export type GetUserHistoricalActivityQuery = { __typename?: 'Query' bridgeTransactions?: Array<{ __typename?: 'BridgeTransaction' kappa?: string | null fromInfo?: { __typename?: 'PartialInfo' chainID?: number | null destinationChainID?: number | null address?: string | null txnHash?: string | null value?: string | null formattedValue?: number | null USDValue?: number | null tokenAddress?: string | null tokenSymbol?: string | null blockNumber?: number | null time?: number | null formattedTime?: string | null formattedEventType?: string | null eventType?: number | null } | null toInfo?: { __typename?: 'PartialInfo' chainID?: number | null destinationChainID?: number | null address?: string | null txnHash?: string | null value?: string | null formattedValue?: number | null USDValue?: number | null tokenAddress?: string | null tokenSymbol?: string | null blockNumber?: number | null time?: number | null formattedTime?: string | null formattedEventType?: string | null eventType?: number | null } | null } | null> | null } export const GetUserHistoricalActivityDocument = ` query GetUserHistoricalActivity($address: String!, $startTime: Int!) { bridgeTransactions( pending: false addressFrom: $address startTime: $startTime page: 1 useMv: true ) { fromInfo { chainID destinationChainID address txnHash value formattedValue USDValue tokenAddress tokenSymbol blockNumber time formattedTime formattedEventType eventType } toInfo { chainID destinationChainID address txnHash value formattedValue USDValue tokenAddress tokenSymbol blockNumber time formattedTime formattedEventType eventType } kappa } } ` const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ GetUserHistoricalActivity: build.query< GetUserHistoricalActivityQuery, GetUserHistoricalActivityQueryVariables >({ query: (variables) => ({ document: GetUserHistoricalActivityDocument, variables, }), }), }), }) export { injectedRtkApi as api } export const { useGetUserHistoricalActivityQuery, useLazyGetUserHistoricalActivityQuery, } = injectedRtkApi