diff --git a/ecosystem/typescript/sdk/CHANGELOG.md b/ecosystem/typescript/sdk/CHANGELOG.md index 206ad47c17022..387b2354e7a17 100644 --- a/ecosystem/typescript/sdk/CHANGELOG.md +++ b/ecosystem/typescript/sdk/CHANGELOG.md @@ -3,7 +3,14 @@ All notable changes to the Aptos Node SDK will be captured in this file. This changelog is written by hand for now. It adheres to the format set out by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased + - Export all remaining types and functions in TS SDK +- Add improvements for `IndexerClient` + - Export indexer types - `export * from "/indexer/generated/types"` + - Support for token v2 activities - `getTokenActivities`, response structure has changed + - Aggregate query suports token v2 activities - `getTokenActivitiesCount` + - Support for sorting indexer queries - `orderBy` optional argument in `extraArgs` arguments + - Support for get owned tokens by token address or token data id - `getOwnedTokensByTokenData` ## 1.15.0 (2023-07-28) diff --git a/ecosystem/typescript/sdk/src/index.ts b/ecosystem/typescript/sdk/src/index.ts index e115b60abd4b0..3c8bbf1e4ccec 100644 --- a/ecosystem/typescript/sdk/src/index.ts +++ b/ecosystem/typescript/sdk/src/index.ts @@ -15,3 +15,4 @@ export * from "./utils/hex_string"; export * from "./utils/hd-key"; export * from "./utils/property_map_serde"; export { APTOS_COIN } from "./utils/misc"; +export * from "./indexer/generated/types"; diff --git a/ecosystem/typescript/sdk/src/indexer/generated/operations.ts b/ecosystem/typescript/sdk/src/indexer/generated/operations.ts index f3546361453d7..52358a8db48fc 100644 --- a/ecosystem/typescript/sdk/src/indexer/generated/operations.ts +++ b/ecosystem/typescript/sdk/src/indexer/generated/operations.ts @@ -25,11 +25,13 @@ export type TokenDataFieldsFragment = { __typename?: 'current_token_datas', crea export type CollectionDataFieldsFragment = { __typename?: 'current_collection_datas', metadata_uri: string, supply: any, description: string, collection_name: string, collection_data_id_hash: string, table_handle: string, creator_address: string }; export type GetAccountTokensCountQueryVariables = Types.Exact<{ - owner_address?: Types.InputMaybe; + where_condition?: Types.InputMaybe; + offset?: Types.InputMaybe; + limit?: Types.InputMaybe; }>; -export type GetAccountTokensCountQuery = { __typename?: 'query_root', current_token_ownerships_aggregate: { __typename?: 'current_token_ownerships_aggregate', aggregate?: { __typename?: 'current_token_ownerships_aggregate_fields', count: number } | null } }; +export type GetAccountTokensCountQuery = { __typename?: 'query_root', current_token_ownerships_v2_aggregate: { __typename?: 'current_token_ownerships_v2_aggregate', aggregate?: { __typename?: 'current_token_ownerships_v2_aggregate_fields', count: number } | null } }; export type GetAccountTransactionsCountQueryVariables = Types.Exact<{ address?: Types.InputMaybe; @@ -51,6 +53,7 @@ export type GetCollectionDataQueryVariables = Types.Exact<{ where_condition: Types.Current_Collections_V2_Bool_Exp; offset?: Types.InputMaybe; limit?: Types.InputMaybe; + order_by?: Types.InputMaybe | Types.Current_Collections_V2_Order_By>; }>; @@ -60,6 +63,7 @@ export type GetCollectionsWithOwnedTokensQueryVariables = Types.Exact<{ where_condition: Types.Current_Collection_Ownership_V2_View_Bool_Exp; offset?: Types.InputMaybe; limit?: Types.InputMaybe; + order_by?: Types.InputMaybe | Types.Current_Collection_Ownership_V2_View_Order_By>; }>; @@ -89,29 +93,44 @@ export type GetOwnedTokensQueryVariables = Types.Exact<{ where_condition: Types.Current_Token_Ownerships_V2_Bool_Exp; offset?: Types.InputMaybe; limit?: Types.InputMaybe; + order_by?: Types.InputMaybe | Types.Current_Token_Ownerships_V2_Order_By>; }>; export type GetOwnedTokensQuery = { __typename?: 'query_root', current_token_ownerships_v2: Array<{ __typename?: 'current_token_ownerships_v2', token_standard: string, is_fungible_v2?: boolean | null, is_soulbound_v2?: boolean | null, property_version_v1: any, table_type_v1?: string | null, token_properties_mutated_v1?: any | null, amount: any, last_transaction_timestamp: any, last_transaction_version: any, storage_id: string, owner_address: string, current_token_data?: { __typename?: 'current_token_datas_v2', token_name: string, token_data_id: string, token_uri: string, token_properties: any, supply: any, maximum?: any | null, last_transaction_version: any, last_transaction_timestamp: any, largest_property_version_v1?: any | null, current_collection?: { __typename?: 'current_collections_v2', collection_name: string, creator_address: string, description: string, uri: string, collection_id: string, last_transaction_version: any, current_supply: any, mutable_description?: boolean | null, total_minted_v2?: any | null, table_handle_v1?: string | null, mutable_uri?: boolean | null } | null } | null }> }; +export type GetOwnedTokensByTokenDataQueryVariables = Types.Exact<{ + where_condition: Types.Current_Token_Ownerships_V2_Bool_Exp; + offset?: Types.InputMaybe; + limit?: Types.InputMaybe; + order_by?: Types.InputMaybe | Types.Current_Token_Ownerships_V2_Order_By>; +}>; + + +export type GetOwnedTokensByTokenDataQuery = { __typename?: 'query_root', current_token_ownerships_v2: Array<{ __typename?: 'current_token_ownerships_v2', token_standard: string, is_fungible_v2?: boolean | null, is_soulbound_v2?: boolean | null, property_version_v1: any, table_type_v1?: string | null, token_properties_mutated_v1?: any | null, amount: any, last_transaction_timestamp: any, last_transaction_version: any, storage_id: string, owner_address: string, current_token_data?: { __typename?: 'current_token_datas_v2', token_name: string, token_data_id: string, token_uri: string, token_properties: any, supply: any, maximum?: any | null, last_transaction_version: any, last_transaction_timestamp: any, largest_property_version_v1?: any | null, current_collection?: { __typename?: 'current_collections_v2', collection_name: string, creator_address: string, description: string, uri: string, collection_id: string, last_transaction_version: any, current_supply: any, mutable_description?: boolean | null, total_minted_v2?: any | null, table_handle_v1?: string | null, mutable_uri?: boolean | null } | null } | null }> }; + export type GetTokenActivitiesQueryVariables = Types.Exact<{ - idHash: Types.Scalars['String']; + where_condition: Types.Token_Activities_V2_Bool_Exp; offset?: Types.InputMaybe; limit?: Types.InputMaybe; + order_by?: Types.InputMaybe | Types.Token_Activities_V2_Order_By>; }>; -export type GetTokenActivitiesQuery = { __typename?: 'query_root', token_activities: Array<{ __typename?: 'token_activities', creator_address: string, collection_name: string, name: string, token_data_id_hash: string, collection_data_id_hash: string, from_address?: string | null, to_address?: string | null, transaction_version: any, transaction_timestamp: any, property_version: any, transfer_type: string, event_sequence_number: any, token_amount: any }> }; +export type GetTokenActivitiesQuery = { __typename?: 'query_root', token_activities_v2: Array<{ __typename?: 'token_activities_v2', after_value?: string | null, before_value?: string | null, entry_function_id_str?: string | null, event_account_address: string, event_index: any, from_address?: string | null, is_fungible_v2?: boolean | null, property_version_v1: any, to_address?: string | null, token_amount: any, token_data_id: string, token_standard: string, transaction_timestamp: any, transaction_version: any, type: string }> }; export type GetTokenActivitiesCountQueryVariables = Types.Exact<{ token_id?: Types.InputMaybe; }>; -export type GetTokenActivitiesCountQuery = { __typename?: 'query_root', token_activities_aggregate: { __typename?: 'token_activities_aggregate', aggregate?: { __typename?: 'token_activities_aggregate_fields', count: number } | null } }; +export type GetTokenActivitiesCountQuery = { __typename?: 'query_root', token_activities_v2_aggregate: { __typename?: 'token_activities_v2_aggregate', aggregate?: { __typename?: 'token_activities_v2_aggregate_fields', count: number } | null } }; export type GetTokenCurrentOwnerDataQueryVariables = Types.Exact<{ where_condition: Types.Current_Token_Ownerships_V2_Bool_Exp; + offset?: Types.InputMaybe; + limit?: Types.InputMaybe; + order_by?: Types.InputMaybe | Types.Current_Token_Ownerships_V2_Order_By>; }>; @@ -119,6 +138,9 @@ export type GetTokenCurrentOwnerDataQuery = { __typename?: 'query_root', current export type GetTokenDataQueryVariables = Types.Exact<{ where_condition?: Types.InputMaybe; + offset?: Types.InputMaybe; + limit?: Types.InputMaybe; + order_by?: Types.InputMaybe | Types.Current_Token_Datas_V2_Order_By>; }>; @@ -128,6 +150,7 @@ export type GetTokenOwnedFromCollectionQueryVariables = Types.Exact<{ where_condition: Types.Current_Token_Ownerships_V2_Bool_Exp; offset?: Types.InputMaybe; limit?: Types.InputMaybe; + order_by?: Types.InputMaybe | Types.Current_Token_Ownerships_V2_Order_By>; }>; @@ -135,6 +158,9 @@ export type GetTokenOwnedFromCollectionQuery = { __typename?: 'query_root', curr export type GetTokenOwnersDataQueryVariables = Types.Exact<{ where_condition: Types.Current_Token_Ownerships_V2_Bool_Exp; + offset?: Types.InputMaybe; + limit?: Types.InputMaybe; + order_by?: Types.InputMaybe | Types.Current_Token_Ownerships_V2_Order_By>; }>; diff --git a/ecosystem/typescript/sdk/src/indexer/generated/queries.ts b/ecosystem/typescript/sdk/src/indexer/generated/queries.ts index b3c9b13fa55f9..668155e2f5f2d 100644 --- a/ecosystem/typescript/sdk/src/indexer/generated/queries.ts +++ b/ecosystem/typescript/sdk/src/indexer/generated/queries.ts @@ -102,9 +102,11 @@ export const GetAccountCurrentTokens = ` ${TokenDataFieldsFragmentDoc} ${CollectionDataFieldsFragmentDoc}`; export const GetAccountTokensCount = ` - query getAccountTokensCount($owner_address: String) { - current_token_ownerships_aggregate( - where: {owner_address: {_eq: $owner_address}, amount: {_gt: "0"}} + query getAccountTokensCount($where_condition: current_token_ownerships_v2_bool_exp, $offset: Int, $limit: Int) { + current_token_ownerships_v2_aggregate( + where: $where_condition + offset: $offset + limit: $limit ) { aggregate { count @@ -138,8 +140,13 @@ export const GetAccountTransactionsData = ` } `; export const GetCollectionData = ` - query getCollectionData($where_condition: current_collections_v2_bool_exp!, $offset: Int, $limit: Int) { - current_collections_v2(where: $where_condition, offset: $offset, limit: $limit) { + query getCollectionData($where_condition: current_collections_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_collections_v2_order_by!]) { + current_collections_v2( + where: $where_condition + offset: $offset + limit: $limit + order_by: $order_by + ) { collection_id token_standard collection_name @@ -151,12 +158,12 @@ export const GetCollectionData = ` } `; export const GetCollectionsWithOwnedTokens = ` - query getCollectionsWithOwnedTokens($where_condition: current_collection_ownership_v2_view_bool_exp!, $offset: Int, $limit: Int) { + query getCollectionsWithOwnedTokens($where_condition: current_collection_ownership_v2_view_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_collection_ownership_v2_view_order_by!]) { current_collection_ownership_v2_view( where: $where_condition - order_by: {last_transaction_version: desc} offset: $offset limit: $limit + order_by: $order_by ) { current_collection { creator_address @@ -206,43 +213,58 @@ export const GetNumberOfDelegators = ` } `; export const GetOwnedTokens = ` - query getOwnedTokens($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int) { + query getOwnedTokens($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_token_ownerships_v2_order_by!]) { + current_token_ownerships_v2( + where: $where_condition + offset: $offset + limit: $limit + order_by: $order_by + ) { + ...CurrentTokenOwnershipFields + } +} + ${CurrentTokenOwnershipFieldsFragmentDoc}`; +export const GetOwnedTokensByTokenData = ` + query getOwnedTokensByTokenData($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_token_ownerships_v2_order_by!]) { current_token_ownerships_v2( where: $where_condition offset: $offset limit: $limit + order_by: $order_by ) { ...CurrentTokenOwnershipFields } } ${CurrentTokenOwnershipFieldsFragmentDoc}`; export const GetTokenActivities = ` - query getTokenActivities($idHash: String!, $offset: Int, $limit: Int) { - token_activities( - where: {token_data_id_hash: {_eq: $idHash}} - order_by: {transaction_version: desc} + query getTokenActivities($where_condition: token_activities_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [token_activities_v2_order_by!]) { + token_activities_v2( + where: $where_condition + order_by: $order_by offset: $offset limit: $limit ) { - creator_address - collection_name - name - token_data_id_hash - collection_data_id_hash + after_value + before_value + entry_function_id_str + event_account_address + event_index from_address + is_fungible_v2 + property_version_v1 to_address - transaction_version - transaction_timestamp - property_version - transfer_type - event_sequence_number token_amount + token_data_id + token_standard + transaction_timestamp + transaction_version + type } } `; export const GetTokenActivitiesCount = ` query getTokenActivitiesCount($token_id: String) { - token_activities_aggregate(where: {token_data_id_hash: {_eq: $token_id}}) { + token_activities_v2_aggregate(where: {token_data_id: {_eq: $token_id}}) { aggregate { count } @@ -250,15 +272,25 @@ export const GetTokenActivitiesCount = ` } `; export const GetTokenCurrentOwnerData = ` - query getTokenCurrentOwnerData($where_condition: current_token_ownerships_v2_bool_exp!) { - current_token_ownerships_v2(where: $where_condition) { + query getTokenCurrentOwnerData($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_token_ownerships_v2_order_by!]) { + current_token_ownerships_v2( + where: $where_condition + offset: $offset + limit: $limit + order_by: $order_by + ) { owner_address } } `; export const GetTokenData = ` - query getTokenData($where_condition: current_token_datas_v2_bool_exp) { - current_token_datas_v2(where: $where_condition) { + query getTokenData($where_condition: current_token_datas_v2_bool_exp, $offset: Int, $limit: Int, $order_by: [current_token_datas_v2_order_by!]) { + current_token_datas_v2( + where: $where_condition + offset: $offset + limit: $limit + order_by: $order_by + ) { token_data_id token_name token_uri @@ -281,19 +313,25 @@ export const GetTokenData = ` } `; export const GetTokenOwnedFromCollection = ` - query getTokenOwnedFromCollection($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int) { + query getTokenOwnedFromCollection($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_token_ownerships_v2_order_by!]) { current_token_ownerships_v2( where: $where_condition offset: $offset limit: $limit + order_by: $order_by ) { ...CurrentTokenOwnershipFields } } ${CurrentTokenOwnershipFieldsFragmentDoc}`; export const GetTokenOwnersData = ` - query getTokenOwnersData($where_condition: current_token_ownerships_v2_bool_exp!) { - current_token_ownerships_v2(where: $where_condition) { + query getTokenOwnersData($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_token_ownerships_v2_order_by!]) { + current_token_ownerships_v2( + where: $where_condition + offset: $offset + limit: $limit + order_by: $order_by + ) { owner_address } } @@ -358,6 +396,9 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = getOwnedTokens(variables: Types.GetOwnedTokensQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise { return withWrapper((wrappedRequestHeaders) => client.request(GetOwnedTokens, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'getOwnedTokens', 'query'); }, + getOwnedTokensByTokenData(variables: Types.GetOwnedTokensByTokenDataQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise { + return withWrapper((wrappedRequestHeaders) => client.request(GetOwnedTokensByTokenData, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'getOwnedTokensByTokenData', 'query'); + }, getTokenActivities(variables: Types.GetTokenActivitiesQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise { return withWrapper((wrappedRequestHeaders) => client.request(GetTokenActivities, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'getTokenActivities', 'query'); }, diff --git a/ecosystem/typescript/sdk/src/indexer/generated/types.ts b/ecosystem/typescript/sdk/src/indexer/generated/types.ts index 79e7c058a167f..5b7600a4f25f4 100644 --- a/ecosystem/typescript/sdk/src/indexer/generated/types.ts +++ b/ecosystem/typescript/sdk/src/indexer/generated/types.ts @@ -14,6 +14,7 @@ export type Scalars = { jsonb: any; numeric: any; timestamp: any; + timestamptz: any; }; /** Boolean expression to compare columns of type "Boolean". All fields are combined with logical 'AND'. */ @@ -75,6 +76,229 @@ export type String_Comparison_Exp = { _similar?: InputMaybe; }; +/** columns and relationships of "account_transactions" */ +export type Account_Transactions = { + __typename?: 'account_transactions'; + account_address: Scalars['String']; + coin_activities: Array; + coin_activities_aggregate: Coin_Activities_Aggregate; + delegated_staking_activities: Array; + token_activities: Array; + token_activities_aggregate: Token_Activities_Aggregate; + /** An array relationship */ + token_activities_v2: Array; + /** An aggregate relationship */ + token_activities_v2_aggregate: Token_Activities_V2_Aggregate; + transaction_version: Scalars['bigint']; +}; + + +/** columns and relationships of "account_transactions" */ +export type Account_TransactionsCoin_ActivitiesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "account_transactions" */ +export type Account_TransactionsCoin_Activities_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "account_transactions" */ +export type Account_TransactionsDelegated_Staking_ActivitiesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "account_transactions" */ +export type Account_TransactionsToken_ActivitiesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "account_transactions" */ +export type Account_TransactionsToken_Activities_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "account_transactions" */ +export type Account_TransactionsToken_Activities_V2Args = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "account_transactions" */ +export type Account_TransactionsToken_Activities_V2_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +/** aggregated selection of "account_transactions" */ +export type Account_Transactions_Aggregate = { + __typename?: 'account_transactions_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "account_transactions" */ +export type Account_Transactions_Aggregate_Fields = { + __typename?: 'account_transactions_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "account_transactions" */ +export type Account_Transactions_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Account_Transactions_Avg_Fields = { + __typename?: 'account_transactions_avg_fields'; + transaction_version?: Maybe; +}; + +/** Boolean expression to filter rows from the table "account_transactions". All fields are combined with a logical 'AND'. */ +export type Account_Transactions_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + account_address?: InputMaybe; + coin_activities?: InputMaybe; + delegated_staking_activities?: InputMaybe; + token_activities?: InputMaybe; + token_activities_v2?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Account_Transactions_Max_Fields = { + __typename?: 'account_transactions_max_fields'; + account_address?: Maybe; + transaction_version?: Maybe; +}; + +/** aggregate min on columns */ +export type Account_Transactions_Min_Fields = { + __typename?: 'account_transactions_min_fields'; + account_address?: Maybe; + transaction_version?: Maybe; +}; + +/** Ordering options when selecting data from "account_transactions". */ +export type Account_Transactions_Order_By = { + account_address?: InputMaybe; + coin_activities_aggregate?: InputMaybe; + delegated_staking_activities_aggregate?: InputMaybe; + token_activities_aggregate?: InputMaybe; + token_activities_v2_aggregate?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** select columns of table "account_transactions" */ +export enum Account_Transactions_Select_Column { + /** column name */ + AccountAddress = 'account_address', + /** column name */ + TransactionVersion = 'transaction_version' +} + +/** aggregate stddev on columns */ +export type Account_Transactions_Stddev_Fields = { + __typename?: 'account_transactions_stddev_fields'; + transaction_version?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Account_Transactions_Stddev_Pop_Fields = { + __typename?: 'account_transactions_stddev_pop_fields'; + transaction_version?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Account_Transactions_Stddev_Samp_Fields = { + __typename?: 'account_transactions_stddev_samp_fields'; + transaction_version?: Maybe; +}; + +/** Streaming cursor of the table "account_transactions" */ +export type Account_Transactions_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Account_Transactions_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Account_Transactions_Stream_Cursor_Value_Input = { + account_address?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** aggregate sum on columns */ +export type Account_Transactions_Sum_Fields = { + __typename?: 'account_transactions_sum_fields'; + transaction_version?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Account_Transactions_Var_Pop_Fields = { + __typename?: 'account_transactions_var_pop_fields'; + transaction_version?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Account_Transactions_Var_Samp_Fields = { + __typename?: 'account_transactions_var_samp_fields'; + transaction_version?: Maybe; +}; + +/** aggregate variance on columns */ +export type Account_Transactions_Variance_Fields = { + __typename?: 'account_transactions_variance_fields'; + transaction_version?: Maybe; +}; + /** columns and relationships of "address_events_summary" */ export type Address_Events_Summary = { __typename?: 'address_events_summary'; @@ -135,6 +359,7 @@ export type Address_Version_From_Events = { account_address?: Maybe; coin_activities: Array; coin_activities_aggregate: Coin_Activities_Aggregate; + delegated_staking_activities: Array; token_activities: Array; token_activities_aggregate: Token_Activities_Aggregate; transaction_version?: Maybe; @@ -161,6 +386,16 @@ export type Address_Version_From_EventsCoin_Activities_AggregateArgs = { }; +/** columns and relationships of "address_version_from_events" */ +export type Address_Version_From_EventsDelegated_Staking_ActivitiesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + /** columns and relationships of "address_version_from_events" */ export type Address_Version_From_EventsToken_ActivitiesArgs = { distinct_on?: InputMaybe>; @@ -313,9 +548,64 @@ export type Address_Version_From_Events_Variance_Fields = { export type Address_Version_From_Move_Resources = { __typename?: 'address_version_from_move_resources'; address?: Maybe; + coin_activities: Array; + coin_activities_aggregate: Coin_Activities_Aggregate; + delegated_staking_activities: Array; + token_activities: Array; + token_activities_aggregate: Token_Activities_Aggregate; transaction_version?: Maybe; }; + +/** columns and relationships of "address_version_from_move_resources" */ +export type Address_Version_From_Move_ResourcesCoin_ActivitiesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "address_version_from_move_resources" */ +export type Address_Version_From_Move_ResourcesCoin_Activities_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "address_version_from_move_resources" */ +export type Address_Version_From_Move_ResourcesDelegated_Staking_ActivitiesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "address_version_from_move_resources" */ +export type Address_Version_From_Move_ResourcesToken_ActivitiesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "address_version_from_move_resources" */ +export type Address_Version_From_Move_ResourcesToken_Activities_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + /** Boolean expression to filter rows from the table "address_version_from_move_resources". All fields are combined with a logical 'AND'. */ export type Address_Version_From_Move_Resources_Bool_Exp = { _and?: InputMaybe>; @@ -527,6 +817,21 @@ export type Coin_Activities_Aggregate_FieldsCountArgs = { distinct?: InputMaybe; }; +/** order by aggregate values of table "coin_activities" */ +export type Coin_Activities_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + /** aggregate avg on columns */ export type Coin_Activities_Avg_Fields = { __typename?: 'coin_activities_avg_fields'; @@ -538,6 +843,16 @@ export type Coin_Activities_Avg_Fields = { transaction_version?: Maybe; }; +/** order by avg() on columns of table "coin_activities" */ +export type Coin_Activities_Avg_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** Boolean expression to filter rows from the table "coin_activities". All fields are combined with a logical 'AND'. */ export type Coin_Activities_Bool_Exp = { _and?: InputMaybe>; @@ -578,6 +893,22 @@ export type Coin_Activities_Max_Fields = { transaction_version?: Maybe; }; +/** order by max() on columns of table "coin_activities" */ +export type Coin_Activities_Max_Order_By = { + activity_type?: InputMaybe; + amount?: InputMaybe; + block_height?: InputMaybe; + coin_type?: InputMaybe; + entry_function_id_str?: InputMaybe; + event_account_address?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + owner_address?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** aggregate min on columns */ export type Coin_Activities_Min_Fields = { __typename?: 'coin_activities_min_fields'; @@ -595,6 +926,22 @@ export type Coin_Activities_Min_Fields = { transaction_version?: Maybe; }; +/** order by min() on columns of table "coin_activities" */ +export type Coin_Activities_Min_Order_By = { + activity_type?: InputMaybe; + amount?: InputMaybe; + block_height?: InputMaybe; + coin_type?: InputMaybe; + entry_function_id_str?: InputMaybe; + event_account_address?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + owner_address?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** Ordering options when selecting data from "coin_activities". */ export type Coin_Activities_Order_By = { activity_type?: InputMaybe; @@ -658,6 +1005,16 @@ export type Coin_Activities_Stddev_Fields = { transaction_version?: Maybe; }; +/** order by stddev() on columns of table "coin_activities" */ +export type Coin_Activities_Stddev_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** aggregate stddev_pop on columns */ export type Coin_Activities_Stddev_Pop_Fields = { __typename?: 'coin_activities_stddev_pop_fields'; @@ -669,6 +1026,16 @@ export type Coin_Activities_Stddev_Pop_Fields = { transaction_version?: Maybe; }; +/** order by stddev_pop() on columns of table "coin_activities" */ +export type Coin_Activities_Stddev_Pop_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** aggregate stddev_samp on columns */ export type Coin_Activities_Stddev_Samp_Fields = { __typename?: 'coin_activities_stddev_samp_fields'; @@ -680,11 +1047,21 @@ export type Coin_Activities_Stddev_Samp_Fields = { transaction_version?: Maybe; }; -/** Streaming cursor of the table "coin_activities" */ -export type Coin_Activities_Stream_Cursor_Input = { - /** Stream column input with initial value */ - initial_value: Coin_Activities_Stream_Cursor_Value_Input; - /** cursor ordering */ +/** order by stddev_samp() on columns of table "coin_activities" */ +export type Coin_Activities_Stddev_Samp_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** Streaming cursor of the table "coin_activities" */ +export type Coin_Activities_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Coin_Activities_Stream_Cursor_Value_Input; + /** cursor ordering */ ordering?: InputMaybe; }; @@ -717,6 +1094,16 @@ export type Coin_Activities_Sum_Fields = { transaction_version?: Maybe; }; +/** order by sum() on columns of table "coin_activities" */ +export type Coin_Activities_Sum_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** aggregate var_pop on columns */ export type Coin_Activities_Var_Pop_Fields = { __typename?: 'coin_activities_var_pop_fields'; @@ -728,6 +1115,16 @@ export type Coin_Activities_Var_Pop_Fields = { transaction_version?: Maybe; }; +/** order by var_pop() on columns of table "coin_activities" */ +export type Coin_Activities_Var_Pop_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** aggregate var_samp on columns */ export type Coin_Activities_Var_Samp_Fields = { __typename?: 'coin_activities_var_samp_fields'; @@ -739,6 +1136,16 @@ export type Coin_Activities_Var_Samp_Fields = { transaction_version?: Maybe; }; +/** order by var_samp() on columns of table "coin_activities" */ +export type Coin_Activities_Var_Samp_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** aggregate variance on columns */ export type Coin_Activities_Variance_Fields = { __typename?: 'coin_activities_variance_fields'; @@ -750,6 +1157,16 @@ export type Coin_Activities_Variance_Fields = { transaction_version?: Maybe; }; +/** order by variance() on columns of table "coin_activities" */ +export type Coin_Activities_Variance_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** columns and relationships of "coin_balances" */ export type Coin_Balances = { __typename?: 'coin_balances'; @@ -3111,6 +3528,28 @@ export type Delegated_Staking_Activities = { transaction_version: Scalars['bigint']; }; +/** order by aggregate values of table "delegated_staking_activities" */ +export type Delegated_Staking_Activities_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + +/** order by avg() on columns of table "delegated_staking_activities" */ +export type Delegated_Staking_Activities_Avg_Order_By = { + amount?: InputMaybe; + event_index?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** Boolean expression to filter rows from the table "delegated_staking_activities". All fields are combined with a logical 'AND'. */ export type Delegated_Staking_Activities_Bool_Exp = { _and?: InputMaybe>; @@ -3124,6 +3563,26 @@ export type Delegated_Staking_Activities_Bool_Exp = { transaction_version?: InputMaybe; }; +/** order by max() on columns of table "delegated_staking_activities" */ +export type Delegated_Staking_Activities_Max_Order_By = { + amount?: InputMaybe; + delegator_address?: InputMaybe; + event_index?: InputMaybe; + event_type?: InputMaybe; + pool_address?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** order by min() on columns of table "delegated_staking_activities" */ +export type Delegated_Staking_Activities_Min_Order_By = { + amount?: InputMaybe; + delegator_address?: InputMaybe; + event_index?: InputMaybe; + event_type?: InputMaybe; + pool_address?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** Ordering options when selecting data from "delegated_staking_activities". */ export type Delegated_Staking_Activities_Order_By = { amount?: InputMaybe; @@ -3150,6 +3609,27 @@ export enum Delegated_Staking_Activities_Select_Column { TransactionVersion = 'transaction_version' } +/** order by stddev() on columns of table "delegated_staking_activities" */ +export type Delegated_Staking_Activities_Stddev_Order_By = { + amount?: InputMaybe; + event_index?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** order by stddev_pop() on columns of table "delegated_staking_activities" */ +export type Delegated_Staking_Activities_Stddev_Pop_Order_By = { + amount?: InputMaybe; + event_index?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** order by stddev_samp() on columns of table "delegated_staking_activities" */ +export type Delegated_Staking_Activities_Stddev_Samp_Order_By = { + amount?: InputMaybe; + event_index?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** Streaming cursor of the table "delegated_staking_activities" */ export type Delegated_Staking_Activities_Stream_Cursor_Input = { /** Stream column input with initial value */ @@ -3168,6 +3648,34 @@ export type Delegated_Staking_Activities_Stream_Cursor_Value_Input = { transaction_version?: InputMaybe; }; +/** order by sum() on columns of table "delegated_staking_activities" */ +export type Delegated_Staking_Activities_Sum_Order_By = { + amount?: InputMaybe; + event_index?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** order by var_pop() on columns of table "delegated_staking_activities" */ +export type Delegated_Staking_Activities_Var_Pop_Order_By = { + amount?: InputMaybe; + event_index?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** order by var_samp() on columns of table "delegated_staking_activities" */ +export type Delegated_Staking_Activities_Var_Samp_Order_By = { + amount?: InputMaybe; + event_index?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** order by variance() on columns of table "delegated_staking_activities" */ +export type Delegated_Staking_Activities_Variance_Order_By = { + amount?: InputMaybe; + event_index?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** columns and relationships of "delegated_staking_pools" */ export type Delegated_Staking_Pools = { __typename?: 'delegated_staking_pools'; @@ -3600,285 +4108,936 @@ export type Move_Resources_Variance_Fields = { transaction_version?: Maybe; }; -/** columns and relationships of "num_active_delegator_per_pool" */ -export type Num_Active_Delegator_Per_Pool = { - __typename?: 'num_active_delegator_per_pool'; - num_active_delegator?: Maybe; - pool_address?: Maybe; +/** columns and relationships of "nft_marketplace_v2.current_nft_marketplace_auctions" */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions = { + __typename?: 'nft_marketplace_v2_current_nft_marketplace_auctions'; + buy_it_now_price?: Maybe; + collection_id: Scalars['String']; + contract_address: Scalars['String']; + current_bid_price?: Maybe; + current_bidder?: Maybe; + current_token_data?: Maybe; + entry_function_id_str: Scalars['String']; + expiration_time: Scalars['numeric']; + fee_schedule_id: Scalars['String']; + is_deleted: Scalars['Boolean']; + last_transaction_timestamp: Scalars['timestamptz']; + last_transaction_version: Scalars['bigint']; + listing_id: Scalars['String']; + marketplace: Scalars['String']; + seller: Scalars['String']; + starting_bid_price: Scalars['numeric']; + token_amount: Scalars['numeric']; + token_data_id: Scalars['String']; + token_standard: Scalars['String']; }; -/** Boolean expression to filter rows from the table "num_active_delegator_per_pool". All fields are combined with a logical 'AND'. */ -export type Num_Active_Delegator_Per_Pool_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - num_active_delegator?: InputMaybe; - pool_address?: InputMaybe; +/** Boolean expression to filter rows from the table "nft_marketplace_v2.current_nft_marketplace_auctions". All fields are combined with a logical 'AND'. */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + buy_it_now_price?: InputMaybe; + collection_id?: InputMaybe; + contract_address?: InputMaybe; + current_bid_price?: InputMaybe; + current_bidder?: InputMaybe; + entry_function_id_str?: InputMaybe; + expiration_time?: InputMaybe; + fee_schedule_id?: InputMaybe; + is_deleted?: InputMaybe; + last_transaction_timestamp?: InputMaybe; + last_transaction_version?: InputMaybe; + listing_id?: InputMaybe; + marketplace?: InputMaybe; + seller?: InputMaybe; + starting_bid_price?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; }; -/** Ordering options when selecting data from "num_active_delegator_per_pool". */ -export type Num_Active_Delegator_Per_Pool_Order_By = { - num_active_delegator?: InputMaybe; - pool_address?: InputMaybe; +/** Ordering options when selecting data from "nft_marketplace_v2.current_nft_marketplace_auctions". */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Order_By = { + buy_it_now_price?: InputMaybe; + collection_id?: InputMaybe; + contract_address?: InputMaybe; + current_bid_price?: InputMaybe; + current_bidder?: InputMaybe; + entry_function_id_str?: InputMaybe; + expiration_time?: InputMaybe; + fee_schedule_id?: InputMaybe; + is_deleted?: InputMaybe; + last_transaction_timestamp?: InputMaybe; + last_transaction_version?: InputMaybe; + listing_id?: InputMaybe; + marketplace?: InputMaybe; + seller?: InputMaybe; + starting_bid_price?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; }; -/** select columns of table "num_active_delegator_per_pool" */ -export enum Num_Active_Delegator_Per_Pool_Select_Column { +/** select columns of table "nft_marketplace_v2.current_nft_marketplace_auctions" */ +export enum Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column { /** column name */ - NumActiveDelegator = 'num_active_delegator', + BuyItNowPrice = 'buy_it_now_price', /** column name */ - PoolAddress = 'pool_address' + CollectionId = 'collection_id', + /** column name */ + ContractAddress = 'contract_address', + /** column name */ + CurrentBidPrice = 'current_bid_price', + /** column name */ + CurrentBidder = 'current_bidder', + /** column name */ + EntryFunctionIdStr = 'entry_function_id_str', + /** column name */ + ExpirationTime = 'expiration_time', + /** column name */ + FeeScheduleId = 'fee_schedule_id', + /** column name */ + IsDeleted = 'is_deleted', + /** column name */ + LastTransactionTimestamp = 'last_transaction_timestamp', + /** column name */ + LastTransactionVersion = 'last_transaction_version', + /** column name */ + ListingId = 'listing_id', + /** column name */ + Marketplace = 'marketplace', + /** column name */ + Seller = 'seller', + /** column name */ + StartingBidPrice = 'starting_bid_price', + /** column name */ + TokenAmount = 'token_amount', + /** column name */ + TokenDataId = 'token_data_id', + /** column name */ + TokenStandard = 'token_standard' } -/** Streaming cursor of the table "num_active_delegator_per_pool" */ -export type Num_Active_Delegator_Per_Pool_Stream_Cursor_Input = { +/** Streaming cursor of the table "nft_marketplace_v2_current_nft_marketplace_auctions" */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Stream_Cursor_Input = { /** Stream column input with initial value */ - initial_value: Num_Active_Delegator_Per_Pool_Stream_Cursor_Value_Input; + initial_value: Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Stream_Cursor_Value_Input; /** cursor ordering */ ordering?: InputMaybe; }; /** Initial value of the column from where the streaming should start */ -export type Num_Active_Delegator_Per_Pool_Stream_Cursor_Value_Input = { - num_active_delegator?: InputMaybe; - pool_address?: InputMaybe; -}; - -/** Boolean expression to compare columns of type "numeric". All fields are combined with logical 'AND'. */ -export type Numeric_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Stream_Cursor_Value_Input = { + buy_it_now_price?: InputMaybe; + collection_id?: InputMaybe; + contract_address?: InputMaybe; + current_bid_price?: InputMaybe; + current_bidder?: InputMaybe; + entry_function_id_str?: InputMaybe; + expiration_time?: InputMaybe; + fee_schedule_id?: InputMaybe; + is_deleted?: InputMaybe; + last_transaction_timestamp?: InputMaybe; + last_transaction_version?: InputMaybe; + listing_id?: InputMaybe; + marketplace?: InputMaybe; + seller?: InputMaybe; + starting_bid_price?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; }; -/** column ordering options */ -export enum Order_By { - /** in ascending order, nulls last */ - Asc = 'asc', - /** in ascending order, nulls first */ - AscNullsFirst = 'asc_nulls_first', - /** in ascending order, nulls last */ - AscNullsLast = 'asc_nulls_last', - /** in descending order, nulls first */ - Desc = 'desc', - /** in descending order, nulls first */ - DescNullsFirst = 'desc_nulls_first', - /** in descending order, nulls last */ - DescNullsLast = 'desc_nulls_last' -} - -/** columns and relationships of "processor_status" */ -export type Processor_Status = { - __typename?: 'processor_status'; - last_success_version: Scalars['bigint']; - last_updated: Scalars['timestamp']; - processor: Scalars['String']; +/** columns and relationships of "nft_marketplace_v2.current_nft_marketplace_collection_offers" */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers = { + __typename?: 'nft_marketplace_v2_current_nft_marketplace_collection_offers'; + buyer: Scalars['String']; + collection_id: Scalars['String']; + collection_offer_id: Scalars['String']; + contract_address: Scalars['String']; + current_collection?: Maybe; + entry_function_id_str: Scalars['String']; + expiration_time: Scalars['numeric']; + fee_schedule_id: Scalars['String']; + is_deleted: Scalars['Boolean']; + item_price: Scalars['numeric']; + last_transaction_timestamp: Scalars['timestamptz']; + last_transaction_version: Scalars['bigint']; + marketplace: Scalars['String']; + remaining_token_amount: Scalars['numeric']; + token_standard: Scalars['String']; }; -/** Boolean expression to filter rows from the table "processor_status". All fields are combined with a logical 'AND'. */ -export type Processor_Status_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - last_success_version?: InputMaybe; - last_updated?: InputMaybe; - processor?: InputMaybe; +/** Boolean expression to filter rows from the table "nft_marketplace_v2.current_nft_marketplace_collection_offers". All fields are combined with a logical 'AND'. */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + buyer?: InputMaybe; + collection_id?: InputMaybe; + collection_offer_id?: InputMaybe; + contract_address?: InputMaybe; + entry_function_id_str?: InputMaybe; + expiration_time?: InputMaybe; + fee_schedule_id?: InputMaybe; + is_deleted?: InputMaybe; + item_price?: InputMaybe; + last_transaction_timestamp?: InputMaybe; + last_transaction_version?: InputMaybe; + marketplace?: InputMaybe; + remaining_token_amount?: InputMaybe; + token_standard?: InputMaybe; }; -/** Ordering options when selecting data from "processor_status". */ -export type Processor_Status_Order_By = { - last_success_version?: InputMaybe; - last_updated?: InputMaybe; - processor?: InputMaybe; +/** Ordering options when selecting data from "nft_marketplace_v2.current_nft_marketplace_collection_offers". */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Order_By = { + buyer?: InputMaybe; + collection_id?: InputMaybe; + collection_offer_id?: InputMaybe; + contract_address?: InputMaybe; + entry_function_id_str?: InputMaybe; + expiration_time?: InputMaybe; + fee_schedule_id?: InputMaybe; + is_deleted?: InputMaybe; + item_price?: InputMaybe; + last_transaction_timestamp?: InputMaybe; + last_transaction_version?: InputMaybe; + marketplace?: InputMaybe; + remaining_token_amount?: InputMaybe; + token_standard?: InputMaybe; }; -/** select columns of table "processor_status" */ -export enum Processor_Status_Select_Column { +/** select columns of table "nft_marketplace_v2.current_nft_marketplace_collection_offers" */ +export enum Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column { /** column name */ - LastSuccessVersion = 'last_success_version', + Buyer = 'buyer', /** column name */ - LastUpdated = 'last_updated', + CollectionId = 'collection_id', /** column name */ - Processor = 'processor' -} - -/** Streaming cursor of the table "processor_status" */ -export type Processor_Status_Stream_Cursor_Input = { + CollectionOfferId = 'collection_offer_id', + /** column name */ + ContractAddress = 'contract_address', + /** column name */ + EntryFunctionIdStr = 'entry_function_id_str', + /** column name */ + ExpirationTime = 'expiration_time', + /** column name */ + FeeScheduleId = 'fee_schedule_id', + /** column name */ + IsDeleted = 'is_deleted', + /** column name */ + ItemPrice = 'item_price', + /** column name */ + LastTransactionTimestamp = 'last_transaction_timestamp', + /** column name */ + LastTransactionVersion = 'last_transaction_version', + /** column name */ + Marketplace = 'marketplace', + /** column name */ + RemainingTokenAmount = 'remaining_token_amount', + /** column name */ + TokenStandard = 'token_standard' +} + +/** Streaming cursor of the table "nft_marketplace_v2_current_nft_marketplace_collection_offers" */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Stream_Cursor_Input = { /** Stream column input with initial value */ - initial_value: Processor_Status_Stream_Cursor_Value_Input; + initial_value: Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Stream_Cursor_Value_Input; /** cursor ordering */ ordering?: InputMaybe; }; /** Initial value of the column from where the streaming should start */ -export type Processor_Status_Stream_Cursor_Value_Input = { - last_success_version?: InputMaybe; - last_updated?: InputMaybe; - processor?: InputMaybe; +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Stream_Cursor_Value_Input = { + buyer?: InputMaybe; + collection_id?: InputMaybe; + collection_offer_id?: InputMaybe; + contract_address?: InputMaybe; + entry_function_id_str?: InputMaybe; + expiration_time?: InputMaybe; + fee_schedule_id?: InputMaybe; + is_deleted?: InputMaybe; + item_price?: InputMaybe; + last_transaction_timestamp?: InputMaybe; + last_transaction_version?: InputMaybe; + marketplace?: InputMaybe; + remaining_token_amount?: InputMaybe; + token_standard?: InputMaybe; }; -/** columns and relationships of "proposal_votes" */ -export type Proposal_Votes = { - __typename?: 'proposal_votes'; - num_votes: Scalars['numeric']; - proposal_id: Scalars['bigint']; - should_pass: Scalars['Boolean']; - staking_pool_address: Scalars['String']; - transaction_timestamp: Scalars['timestamp']; - transaction_version: Scalars['bigint']; - voter_address: Scalars['String']; +/** columns and relationships of "nft_marketplace_v2.current_nft_marketplace_listings" */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Listings = { + __typename?: 'nft_marketplace_v2_current_nft_marketplace_listings'; + collection_id: Scalars['String']; + contract_address: Scalars['String']; + current_token_data?: Maybe; + entry_function_id_str: Scalars['String']; + fee_schedule_id: Scalars['String']; + is_deleted: Scalars['Boolean']; + last_transaction_timestamp: Scalars['timestamptz']; + last_transaction_version: Scalars['bigint']; + listing_id: Scalars['String']; + marketplace: Scalars['String']; + price: Scalars['numeric']; + seller: Scalars['String']; + token_amount: Scalars['numeric']; + token_data_id: Scalars['String']; + token_standard: Scalars['String']; }; -/** aggregated selection of "proposal_votes" */ -export type Proposal_Votes_Aggregate = { - __typename?: 'proposal_votes_aggregate'; - aggregate?: Maybe; - nodes: Array; +/** Boolean expression to filter rows from the table "nft_marketplace_v2.current_nft_marketplace_listings". All fields are combined with a logical 'AND'. */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + collection_id?: InputMaybe; + contract_address?: InputMaybe; + entry_function_id_str?: InputMaybe; + fee_schedule_id?: InputMaybe; + is_deleted?: InputMaybe; + last_transaction_timestamp?: InputMaybe; + last_transaction_version?: InputMaybe; + listing_id?: InputMaybe; + marketplace?: InputMaybe; + price?: InputMaybe; + seller?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; }; -/** aggregate fields of "proposal_votes" */ -export type Proposal_Votes_Aggregate_Fields = { - __typename?: 'proposal_votes_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; +/** Ordering options when selecting data from "nft_marketplace_v2.current_nft_marketplace_listings". */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Order_By = { + collection_id?: InputMaybe; + contract_address?: InputMaybe; + entry_function_id_str?: InputMaybe; + fee_schedule_id?: InputMaybe; + is_deleted?: InputMaybe; + last_transaction_timestamp?: InputMaybe; + last_transaction_version?: InputMaybe; + listing_id?: InputMaybe; + marketplace?: InputMaybe; + price?: InputMaybe; + seller?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; }; +/** select columns of table "nft_marketplace_v2.current_nft_marketplace_listings" */ +export enum Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column { + /** column name */ + CollectionId = 'collection_id', + /** column name */ + ContractAddress = 'contract_address', + /** column name */ + EntryFunctionIdStr = 'entry_function_id_str', + /** column name */ + FeeScheduleId = 'fee_schedule_id', + /** column name */ + IsDeleted = 'is_deleted', + /** column name */ + LastTransactionTimestamp = 'last_transaction_timestamp', + /** column name */ + LastTransactionVersion = 'last_transaction_version', + /** column name */ + ListingId = 'listing_id', + /** column name */ + Marketplace = 'marketplace', + /** column name */ + Price = 'price', + /** column name */ + Seller = 'seller', + /** column name */ + TokenAmount = 'token_amount', + /** column name */ + TokenDataId = 'token_data_id', + /** column name */ + TokenStandard = 'token_standard' +} -/** aggregate fields of "proposal_votes" */ -export type Proposal_Votes_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -/** aggregate avg on columns */ -export type Proposal_Votes_Avg_Fields = { - __typename?: 'proposal_votes_avg_fields'; - num_votes?: Maybe; - proposal_id?: Maybe; - transaction_version?: Maybe; +/** Streaming cursor of the table "nft_marketplace_v2_current_nft_marketplace_listings" */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; }; -/** Boolean expression to filter rows from the table "proposal_votes". All fields are combined with a logical 'AND'. */ -export type Proposal_Votes_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - num_votes?: InputMaybe; - proposal_id?: InputMaybe; - should_pass?: InputMaybe; - staking_pool_address?: InputMaybe; - transaction_timestamp?: InputMaybe; - transaction_version?: InputMaybe; - voter_address?: InputMaybe; +/** Initial value of the column from where the streaming should start */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Stream_Cursor_Value_Input = { + collection_id?: InputMaybe; + contract_address?: InputMaybe; + entry_function_id_str?: InputMaybe; + fee_schedule_id?: InputMaybe; + is_deleted?: InputMaybe; + last_transaction_timestamp?: InputMaybe; + last_transaction_version?: InputMaybe; + listing_id?: InputMaybe; + marketplace?: InputMaybe; + price?: InputMaybe; + seller?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; }; -/** aggregate max on columns */ -export type Proposal_Votes_Max_Fields = { - __typename?: 'proposal_votes_max_fields'; - num_votes?: Maybe; - proposal_id?: Maybe; - staking_pool_address?: Maybe; - transaction_timestamp?: Maybe; - transaction_version?: Maybe; - voter_address?: Maybe; +/** columns and relationships of "nft_marketplace_v2.current_nft_marketplace_token_offers" */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers = { + __typename?: 'nft_marketplace_v2_current_nft_marketplace_token_offers'; + buyer: Scalars['String']; + collection_id: Scalars['String']; + contract_address: Scalars['String']; + current_token_data?: Maybe; + entry_function_id_str: Scalars['String']; + expiration_time: Scalars['numeric']; + fee_schedule_id: Scalars['String']; + is_deleted: Scalars['Boolean']; + last_transaction_timestamp: Scalars['timestamptz']; + last_transaction_version: Scalars['bigint']; + marketplace: Scalars['String']; + offer_id: Scalars['String']; + price: Scalars['numeric']; + token_amount: Scalars['numeric']; + token_data_id: Scalars['String']; + token_standard: Scalars['String']; }; -/** aggregate min on columns */ -export type Proposal_Votes_Min_Fields = { - __typename?: 'proposal_votes_min_fields'; - num_votes?: Maybe; - proposal_id?: Maybe; - staking_pool_address?: Maybe; - transaction_timestamp?: Maybe; - transaction_version?: Maybe; - voter_address?: Maybe; +/** Boolean expression to filter rows from the table "nft_marketplace_v2.current_nft_marketplace_token_offers". All fields are combined with a logical 'AND'. */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + buyer?: InputMaybe; + collection_id?: InputMaybe; + contract_address?: InputMaybe; + entry_function_id_str?: InputMaybe; + expiration_time?: InputMaybe; + fee_schedule_id?: InputMaybe; + is_deleted?: InputMaybe; + last_transaction_timestamp?: InputMaybe; + last_transaction_version?: InputMaybe; + marketplace?: InputMaybe; + offer_id?: InputMaybe; + price?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; }; -/** Ordering options when selecting data from "proposal_votes". */ -export type Proposal_Votes_Order_By = { - num_votes?: InputMaybe; - proposal_id?: InputMaybe; - should_pass?: InputMaybe; - staking_pool_address?: InputMaybe; - transaction_timestamp?: InputMaybe; - transaction_version?: InputMaybe; - voter_address?: InputMaybe; +/** Ordering options when selecting data from "nft_marketplace_v2.current_nft_marketplace_token_offers". */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Order_By = { + buyer?: InputMaybe; + collection_id?: InputMaybe; + contract_address?: InputMaybe; + entry_function_id_str?: InputMaybe; + expiration_time?: InputMaybe; + fee_schedule_id?: InputMaybe; + is_deleted?: InputMaybe; + last_transaction_timestamp?: InputMaybe; + last_transaction_version?: InputMaybe; + marketplace?: InputMaybe; + offer_id?: InputMaybe; + price?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; }; -/** select columns of table "proposal_votes" */ -export enum Proposal_Votes_Select_Column { +/** select columns of table "nft_marketplace_v2.current_nft_marketplace_token_offers" */ +export enum Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column { /** column name */ - NumVotes = 'num_votes', + Buyer = 'buyer', /** column name */ - ProposalId = 'proposal_id', + CollectionId = 'collection_id', /** column name */ - ShouldPass = 'should_pass', + ContractAddress = 'contract_address', /** column name */ - StakingPoolAddress = 'staking_pool_address', + EntryFunctionIdStr = 'entry_function_id_str', /** column name */ - TransactionTimestamp = 'transaction_timestamp', + ExpirationTime = 'expiration_time', /** column name */ - TransactionVersion = 'transaction_version', + FeeScheduleId = 'fee_schedule_id', /** column name */ - VoterAddress = 'voter_address' + IsDeleted = 'is_deleted', + /** column name */ + LastTransactionTimestamp = 'last_transaction_timestamp', + /** column name */ + LastTransactionVersion = 'last_transaction_version', + /** column name */ + Marketplace = 'marketplace', + /** column name */ + OfferId = 'offer_id', + /** column name */ + Price = 'price', + /** column name */ + TokenAmount = 'token_amount', + /** column name */ + TokenDataId = 'token_data_id', + /** column name */ + TokenStandard = 'token_standard' } -/** aggregate stddev on columns */ -export type Proposal_Votes_Stddev_Fields = { - __typename?: 'proposal_votes_stddev_fields'; - num_votes?: Maybe; - proposal_id?: Maybe; - transaction_version?: Maybe; -}; - -/** aggregate stddev_pop on columns */ -export type Proposal_Votes_Stddev_Pop_Fields = { - __typename?: 'proposal_votes_stddev_pop_fields'; - num_votes?: Maybe; - proposal_id?: Maybe; - transaction_version?: Maybe; -}; - -/** aggregate stddev_samp on columns */ -export type Proposal_Votes_Stddev_Samp_Fields = { - __typename?: 'proposal_votes_stddev_samp_fields'; - num_votes?: Maybe; - proposal_id?: Maybe; - transaction_version?: Maybe; -}; - -/** Streaming cursor of the table "proposal_votes" */ -export type Proposal_Votes_Stream_Cursor_Input = { +/** Streaming cursor of the table "nft_marketplace_v2_current_nft_marketplace_token_offers" */ +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Stream_Cursor_Input = { /** Stream column input with initial value */ - initial_value: Proposal_Votes_Stream_Cursor_Value_Input; + initial_value: Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Stream_Cursor_Value_Input; /** cursor ordering */ ordering?: InputMaybe; }; /** Initial value of the column from where the streaming should start */ -export type Proposal_Votes_Stream_Cursor_Value_Input = { - num_votes?: InputMaybe; - proposal_id?: InputMaybe; - should_pass?: InputMaybe; - staking_pool_address?: InputMaybe; - transaction_timestamp?: InputMaybe; - transaction_version?: InputMaybe; - voter_address?: InputMaybe; +export type Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Stream_Cursor_Value_Input = { + buyer?: InputMaybe; + collection_id?: InputMaybe; + contract_address?: InputMaybe; + entry_function_id_str?: InputMaybe; + expiration_time?: InputMaybe; + fee_schedule_id?: InputMaybe; + is_deleted?: InputMaybe; + last_transaction_timestamp?: InputMaybe; + last_transaction_version?: InputMaybe; + marketplace?: InputMaybe; + offer_id?: InputMaybe; + price?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; +}; + +/** columns and relationships of "nft_marketplace_v2.nft_marketplace_activities" */ +export type Nft_Marketplace_V2_Nft_Marketplace_Activities = { + __typename?: 'nft_marketplace_v2_nft_marketplace_activities'; + buyer?: Maybe; + collection_id: Scalars['String']; + collection_name: Scalars['String']; + contract_address: Scalars['String']; + creator_address: Scalars['String']; + current_token_data?: Maybe; + entry_function_id_str: Scalars['String']; + event_index: Scalars['bigint']; + event_type: Scalars['String']; + fee_schedule_id: Scalars['String']; + marketplace: Scalars['String']; + offer_or_listing_id: Scalars['String']; + price: Scalars['numeric']; + property_version?: Maybe; + seller?: Maybe; + token_amount: Scalars['numeric']; + token_data_id?: Maybe; + token_name?: Maybe; + token_standard: Scalars['String']; + transaction_timestamp: Scalars['timestamptz']; + transaction_version: Scalars['bigint']; +}; + +/** Boolean expression to filter rows from the table "nft_marketplace_v2.nft_marketplace_activities". All fields are combined with a logical 'AND'. */ +export type Nft_Marketplace_V2_Nft_Marketplace_Activities_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + buyer?: InputMaybe; + collection_id?: InputMaybe; + collection_name?: InputMaybe; + contract_address?: InputMaybe; + creator_address?: InputMaybe; + entry_function_id_str?: InputMaybe; + event_index?: InputMaybe; + event_type?: InputMaybe; + fee_schedule_id?: InputMaybe; + marketplace?: InputMaybe; + offer_or_listing_id?: InputMaybe; + price?: InputMaybe; + property_version?: InputMaybe; + seller?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_name?: InputMaybe; + token_standard?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** Ordering options when selecting data from "nft_marketplace_v2.nft_marketplace_activities". */ +export type Nft_Marketplace_V2_Nft_Marketplace_Activities_Order_By = { + buyer?: InputMaybe; + collection_id?: InputMaybe; + collection_name?: InputMaybe; + contract_address?: InputMaybe; + creator_address?: InputMaybe; + entry_function_id_str?: InputMaybe; + event_index?: InputMaybe; + event_type?: InputMaybe; + fee_schedule_id?: InputMaybe; + marketplace?: InputMaybe; + offer_or_listing_id?: InputMaybe; + price?: InputMaybe; + property_version?: InputMaybe; + seller?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_name?: InputMaybe; + token_standard?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** select columns of table "nft_marketplace_v2.nft_marketplace_activities" */ +export enum Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column { + /** column name */ + Buyer = 'buyer', + /** column name */ + CollectionId = 'collection_id', + /** column name */ + CollectionName = 'collection_name', + /** column name */ + ContractAddress = 'contract_address', + /** column name */ + CreatorAddress = 'creator_address', + /** column name */ + EntryFunctionIdStr = 'entry_function_id_str', + /** column name */ + EventIndex = 'event_index', + /** column name */ + EventType = 'event_type', + /** column name */ + FeeScheduleId = 'fee_schedule_id', + /** column name */ + Marketplace = 'marketplace', + /** column name */ + OfferOrListingId = 'offer_or_listing_id', + /** column name */ + Price = 'price', + /** column name */ + PropertyVersion = 'property_version', + /** column name */ + Seller = 'seller', + /** column name */ + TokenAmount = 'token_amount', + /** column name */ + TokenDataId = 'token_data_id', + /** column name */ + TokenName = 'token_name', + /** column name */ + TokenStandard = 'token_standard', + /** column name */ + TransactionTimestamp = 'transaction_timestamp', + /** column name */ + TransactionVersion = 'transaction_version' +} + +/** Streaming cursor of the table "nft_marketplace_v2_nft_marketplace_activities" */ +export type Nft_Marketplace_V2_Nft_Marketplace_Activities_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Nft_Marketplace_V2_Nft_Marketplace_Activities_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Nft_Marketplace_V2_Nft_Marketplace_Activities_Stream_Cursor_Value_Input = { + buyer?: InputMaybe; + collection_id?: InputMaybe; + collection_name?: InputMaybe; + contract_address?: InputMaybe; + creator_address?: InputMaybe; + entry_function_id_str?: InputMaybe; + event_index?: InputMaybe; + event_type?: InputMaybe; + fee_schedule_id?: InputMaybe; + marketplace?: InputMaybe; + offer_or_listing_id?: InputMaybe; + price?: InputMaybe; + property_version?: InputMaybe; + seller?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_name?: InputMaybe; + token_standard?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** columns and relationships of "num_active_delegator_per_pool" */ +export type Num_Active_Delegator_Per_Pool = { + __typename?: 'num_active_delegator_per_pool'; + num_active_delegator?: Maybe; + pool_address?: Maybe; +}; + +/** Boolean expression to filter rows from the table "num_active_delegator_per_pool". All fields are combined with a logical 'AND'. */ +export type Num_Active_Delegator_Per_Pool_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + num_active_delegator?: InputMaybe; + pool_address?: InputMaybe; +}; + +/** Ordering options when selecting data from "num_active_delegator_per_pool". */ +export type Num_Active_Delegator_Per_Pool_Order_By = { + num_active_delegator?: InputMaybe; + pool_address?: InputMaybe; +}; + +/** select columns of table "num_active_delegator_per_pool" */ +export enum Num_Active_Delegator_Per_Pool_Select_Column { + /** column name */ + NumActiveDelegator = 'num_active_delegator', + /** column name */ + PoolAddress = 'pool_address' +} + +/** Streaming cursor of the table "num_active_delegator_per_pool" */ +export type Num_Active_Delegator_Per_Pool_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Num_Active_Delegator_Per_Pool_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Num_Active_Delegator_Per_Pool_Stream_Cursor_Value_Input = { + num_active_delegator?: InputMaybe; + pool_address?: InputMaybe; +}; + +/** Boolean expression to compare columns of type "numeric". All fields are combined with logical 'AND'. */ +export type Numeric_Comparison_Exp = { + _eq?: InputMaybe; + _gt?: InputMaybe; + _gte?: InputMaybe; + _in?: InputMaybe>; + _is_null?: InputMaybe; + _lt?: InputMaybe; + _lte?: InputMaybe; + _neq?: InputMaybe; + _nin?: InputMaybe>; +}; + +/** column ordering options */ +export enum Order_By { + /** in ascending order, nulls last */ + Asc = 'asc', + /** in ascending order, nulls first */ + AscNullsFirst = 'asc_nulls_first', + /** in ascending order, nulls last */ + AscNullsLast = 'asc_nulls_last', + /** in descending order, nulls first */ + Desc = 'desc', + /** in descending order, nulls first */ + DescNullsFirst = 'desc_nulls_first', + /** in descending order, nulls last */ + DescNullsLast = 'desc_nulls_last' +} + +/** columns and relationships of "processor_status" */ +export type Processor_Status = { + __typename?: 'processor_status'; + last_success_version: Scalars['bigint']; + last_updated: Scalars['timestamp']; + processor: Scalars['String']; +}; + +/** Boolean expression to filter rows from the table "processor_status". All fields are combined with a logical 'AND'. */ +export type Processor_Status_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + last_success_version?: InputMaybe; + last_updated?: InputMaybe; + processor?: InputMaybe; +}; + +/** Ordering options when selecting data from "processor_status". */ +export type Processor_Status_Order_By = { + last_success_version?: InputMaybe; + last_updated?: InputMaybe; + processor?: InputMaybe; +}; + +/** select columns of table "processor_status" */ +export enum Processor_Status_Select_Column { + /** column name */ + LastSuccessVersion = 'last_success_version', + /** column name */ + LastUpdated = 'last_updated', + /** column name */ + Processor = 'processor' +} + +/** Streaming cursor of the table "processor_status" */ +export type Processor_Status_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Processor_Status_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Processor_Status_Stream_Cursor_Value_Input = { + last_success_version?: InputMaybe; + last_updated?: InputMaybe; + processor?: InputMaybe; +}; + +/** columns and relationships of "proposal_votes" */ +export type Proposal_Votes = { + __typename?: 'proposal_votes'; + num_votes: Scalars['numeric']; + proposal_id: Scalars['bigint']; + should_pass: Scalars['Boolean']; + staking_pool_address: Scalars['String']; + transaction_timestamp: Scalars['timestamp']; + transaction_version: Scalars['bigint']; + voter_address: Scalars['String']; +}; + +/** aggregated selection of "proposal_votes" */ +export type Proposal_Votes_Aggregate = { + __typename?: 'proposal_votes_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "proposal_votes" */ +export type Proposal_Votes_Aggregate_Fields = { + __typename?: 'proposal_votes_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "proposal_votes" */ +export type Proposal_Votes_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Proposal_Votes_Avg_Fields = { + __typename?: 'proposal_votes_avg_fields'; + num_votes?: Maybe; + proposal_id?: Maybe; + transaction_version?: Maybe; +}; + +/** Boolean expression to filter rows from the table "proposal_votes". All fields are combined with a logical 'AND'. */ +export type Proposal_Votes_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + num_votes?: InputMaybe; + proposal_id?: InputMaybe; + should_pass?: InputMaybe; + staking_pool_address?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; + voter_address?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Proposal_Votes_Max_Fields = { + __typename?: 'proposal_votes_max_fields'; + num_votes?: Maybe; + proposal_id?: Maybe; + staking_pool_address?: Maybe; + transaction_timestamp?: Maybe; + transaction_version?: Maybe; + voter_address?: Maybe; +}; + +/** aggregate min on columns */ +export type Proposal_Votes_Min_Fields = { + __typename?: 'proposal_votes_min_fields'; + num_votes?: Maybe; + proposal_id?: Maybe; + staking_pool_address?: Maybe; + transaction_timestamp?: Maybe; + transaction_version?: Maybe; + voter_address?: Maybe; +}; + +/** Ordering options when selecting data from "proposal_votes". */ +export type Proposal_Votes_Order_By = { + num_votes?: InputMaybe; + proposal_id?: InputMaybe; + should_pass?: InputMaybe; + staking_pool_address?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; + voter_address?: InputMaybe; +}; + +/** select columns of table "proposal_votes" */ +export enum Proposal_Votes_Select_Column { + /** column name */ + NumVotes = 'num_votes', + /** column name */ + ProposalId = 'proposal_id', + /** column name */ + ShouldPass = 'should_pass', + /** column name */ + StakingPoolAddress = 'staking_pool_address', + /** column name */ + TransactionTimestamp = 'transaction_timestamp', + /** column name */ + TransactionVersion = 'transaction_version', + /** column name */ + VoterAddress = 'voter_address' +} + +/** aggregate stddev on columns */ +export type Proposal_Votes_Stddev_Fields = { + __typename?: 'proposal_votes_stddev_fields'; + num_votes?: Maybe; + proposal_id?: Maybe; + transaction_version?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Proposal_Votes_Stddev_Pop_Fields = { + __typename?: 'proposal_votes_stddev_pop_fields'; + num_votes?: Maybe; + proposal_id?: Maybe; + transaction_version?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Proposal_Votes_Stddev_Samp_Fields = { + __typename?: 'proposal_votes_stddev_samp_fields'; + num_votes?: Maybe; + proposal_id?: Maybe; + transaction_version?: Maybe; +}; + +/** Streaming cursor of the table "proposal_votes" */ +export type Proposal_Votes_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Proposal_Votes_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Proposal_Votes_Stream_Cursor_Value_Input = { + num_votes?: InputMaybe; + proposal_id?: InputMaybe; + should_pass?: InputMaybe; + staking_pool_address?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; + voter_address?: InputMaybe; }; /** aggregate sum on columns */ @@ -3915,6 +5074,12 @@ export type Proposal_Votes_Variance_Fields = { export type Query_Root = { __typename?: 'query_root'; + /** fetch data from the table: "account_transactions" */ + account_transactions: Array; + /** fetch aggregated fields from the table: "account_transactions" */ + account_transactions_aggregate: Account_Transactions_Aggregate; + /** fetch data from the table: "account_transactions" using primary key columns */ + account_transactions_by_pk?: Maybe; /** fetch data from the table: "address_events_summary" */ address_events_summary: Array; /** fetch data from the table: "address_version_from_events" */ @@ -4009,7 +5174,6 @@ export type Query_Root = { current_token_pending_claims: Array; /** fetch data from the table: "current_token_pending_claims" using primary key columns */ current_token_pending_claims_by_pk?: Maybe; - /** fetch data from the table: "delegated_staking_activities" */ delegated_staking_activities: Array; /** fetch data from the table: "delegated_staking_activities" using primary key columns */ delegated_staking_activities_by_pk?: Maybe; @@ -4035,6 +5199,26 @@ export type Query_Root = { move_resources: Array; /** fetch aggregated fields from the table: "move_resources" */ move_resources_aggregate: Move_Resources_Aggregate; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_auctions" */ + nft_marketplace_v2_current_nft_marketplace_auctions: Array; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_auctions" using primary key columns */ + nft_marketplace_v2_current_nft_marketplace_auctions_by_pk?: Maybe; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_collection_offers" */ + nft_marketplace_v2_current_nft_marketplace_collection_offers: Array; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_collection_offers" using primary key columns */ + nft_marketplace_v2_current_nft_marketplace_collection_offers_by_pk?: Maybe; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_listings" */ + nft_marketplace_v2_current_nft_marketplace_listings: Array; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_listings" using primary key columns */ + nft_marketplace_v2_current_nft_marketplace_listings_by_pk?: Maybe; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_token_offers" */ + nft_marketplace_v2_current_nft_marketplace_token_offers: Array; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_token_offers" using primary key columns */ + nft_marketplace_v2_current_nft_marketplace_token_offers_by_pk?: Maybe; + /** fetch data from the table: "nft_marketplace_v2.nft_marketplace_activities" */ + nft_marketplace_v2_nft_marketplace_activities: Array; + /** fetch data from the table: "nft_marketplace_v2.nft_marketplace_activities" using primary key columns */ + nft_marketplace_v2_nft_marketplace_activities_by_pk?: Maybe; /** fetch data from the table: "num_active_delegator_per_pool" */ num_active_delegator_per_pool: Array; /** fetch data from the table: "processor_status" */ @@ -4059,6 +5243,12 @@ export type Query_Root = { token_activities_aggregate: Token_Activities_Aggregate; /** fetch data from the table: "token_activities" using primary key columns */ token_activities_by_pk?: Maybe; + /** An array relationship */ + token_activities_v2: Array; + /** An aggregate relationship */ + token_activities_v2_aggregate: Token_Activities_V2_Aggregate; + /** fetch data from the table: "token_activities_v2" using primary key columns */ + token_activities_v2_by_pk?: Maybe; /** fetch data from the table: "token_datas" */ token_datas: Array; /** fetch data from the table: "token_datas" using primary key columns */ @@ -4078,6 +5268,30 @@ export type Query_Root = { }; +export type Query_RootAccount_TransactionsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootAccount_Transactions_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootAccount_Transactions_By_PkArgs = { + account_address: Scalars['String']; + transaction_version: Scalars['bigint']; +}; + + export type Query_RootAddress_Events_SummaryArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -4555,6 +5769,81 @@ export type Query_RootMove_Resources_AggregateArgs = { }; +export type Query_RootNft_Marketplace_V2_Current_Nft_Marketplace_AuctionsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootNft_Marketplace_V2_Current_Nft_Marketplace_Auctions_By_PkArgs = { + listing_id: Scalars['String']; + token_data_id: Scalars['String']; +}; + + +export type Query_RootNft_Marketplace_V2_Current_Nft_Marketplace_Collection_OffersArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootNft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_By_PkArgs = { + collection_id: Scalars['String']; + collection_offer_id: Scalars['String']; +}; + + +export type Query_RootNft_Marketplace_V2_Current_Nft_Marketplace_ListingsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootNft_Marketplace_V2_Current_Nft_Marketplace_Listings_By_PkArgs = { + listing_id: Scalars['String']; + token_data_id: Scalars['String']; +}; + + +export type Query_RootNft_Marketplace_V2_Current_Nft_Marketplace_Token_OffersArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootNft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_By_PkArgs = { + offer_id: Scalars['String']; + token_data_id: Scalars['String']; +}; + + +export type Query_RootNft_Marketplace_V2_Nft_Marketplace_ActivitiesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootNft_Marketplace_V2_Nft_Marketplace_Activities_By_PkArgs = { + event_index: Scalars['bigint']; + transaction_version: Scalars['bigint']; +}; + + export type Query_RootNum_Active_Delegator_Per_PoolArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -4658,6 +5947,30 @@ export type Query_RootToken_Activities_By_PkArgs = { }; +export type Query_RootToken_Activities_V2Args = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootToken_Activities_V2_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootToken_Activities_V2_By_PkArgs = { + event_index: Scalars['bigint']; + transaction_version: Scalars['bigint']; +}; + + export type Query_RootToken_DatasArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -4721,6 +6034,14 @@ export type Query_RootUser_Transactions_By_PkArgs = { export type Subscription_Root = { __typename?: 'subscription_root'; + /** fetch data from the table: "account_transactions" */ + account_transactions: Array; + /** fetch aggregated fields from the table: "account_transactions" */ + account_transactions_aggregate: Account_Transactions_Aggregate; + /** fetch data from the table: "account_transactions" using primary key columns */ + account_transactions_by_pk?: Maybe; + /** fetch data from the table in a streaming manner : "account_transactions" */ + account_transactions_stream: Array; /** fetch data from the table: "address_events_summary" */ address_events_summary: Array; /** fetch data from the table in a streaming manner : "address_events_summary" */ @@ -4863,7 +6184,6 @@ export type Subscription_Root = { current_token_pending_claims_by_pk?: Maybe; /** fetch data from the table in a streaming manner : "current_token_pending_claims" */ current_token_pending_claims_stream: Array; - /** fetch data from the table: "delegated_staking_activities" */ delegated_staking_activities: Array; /** fetch data from the table: "delegated_staking_activities" using primary key columns */ delegated_staking_activities_by_pk?: Maybe; @@ -4903,6 +6223,36 @@ export type Subscription_Root = { move_resources_aggregate: Move_Resources_Aggregate; /** fetch data from the table in a streaming manner : "move_resources" */ move_resources_stream: Array; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_auctions" */ + nft_marketplace_v2_current_nft_marketplace_auctions: Array; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_auctions" using primary key columns */ + nft_marketplace_v2_current_nft_marketplace_auctions_by_pk?: Maybe; + /** fetch data from the table in a streaming manner : "nft_marketplace_v2.current_nft_marketplace_auctions" */ + nft_marketplace_v2_current_nft_marketplace_auctions_stream: Array; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_collection_offers" */ + nft_marketplace_v2_current_nft_marketplace_collection_offers: Array; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_collection_offers" using primary key columns */ + nft_marketplace_v2_current_nft_marketplace_collection_offers_by_pk?: Maybe; + /** fetch data from the table in a streaming manner : "nft_marketplace_v2.current_nft_marketplace_collection_offers" */ + nft_marketplace_v2_current_nft_marketplace_collection_offers_stream: Array; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_listings" */ + nft_marketplace_v2_current_nft_marketplace_listings: Array; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_listings" using primary key columns */ + nft_marketplace_v2_current_nft_marketplace_listings_by_pk?: Maybe; + /** fetch data from the table in a streaming manner : "nft_marketplace_v2.current_nft_marketplace_listings" */ + nft_marketplace_v2_current_nft_marketplace_listings_stream: Array; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_token_offers" */ + nft_marketplace_v2_current_nft_marketplace_token_offers: Array; + /** fetch data from the table: "nft_marketplace_v2.current_nft_marketplace_token_offers" using primary key columns */ + nft_marketplace_v2_current_nft_marketplace_token_offers_by_pk?: Maybe; + /** fetch data from the table in a streaming manner : "nft_marketplace_v2.current_nft_marketplace_token_offers" */ + nft_marketplace_v2_current_nft_marketplace_token_offers_stream: Array; + /** fetch data from the table: "nft_marketplace_v2.nft_marketplace_activities" */ + nft_marketplace_v2_nft_marketplace_activities: Array; + /** fetch data from the table: "nft_marketplace_v2.nft_marketplace_activities" using primary key columns */ + nft_marketplace_v2_nft_marketplace_activities_by_pk?: Maybe; + /** fetch data from the table in a streaming manner : "nft_marketplace_v2.nft_marketplace_activities" */ + nft_marketplace_v2_nft_marketplace_activities_stream: Array; /** fetch data from the table: "num_active_delegator_per_pool" */ num_active_delegator_per_pool: Array; /** fetch data from the table in a streaming manner : "num_active_delegator_per_pool" */ @@ -4939,6 +6289,14 @@ export type Subscription_Root = { token_activities_by_pk?: Maybe; /** fetch data from the table in a streaming manner : "token_activities" */ token_activities_stream: Array; + /** An array relationship */ + token_activities_v2: Array; + /** An aggregate relationship */ + token_activities_v2_aggregate: Token_Activities_V2_Aggregate; + /** fetch data from the table: "token_activities_v2" using primary key columns */ + token_activities_v2_by_pk?: Maybe; + /** fetch data from the table in a streaming manner : "token_activities_v2" */ + token_activities_v2_stream: Array; /** fetch data from the table: "token_datas" */ token_datas: Array; /** fetch data from the table: "token_datas" using primary key columns */ @@ -4966,6 +6324,37 @@ export type Subscription_Root = { }; +export type Subscription_RootAccount_TransactionsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootAccount_Transactions_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootAccount_Transactions_By_PkArgs = { + account_address: Scalars['String']; + transaction_version: Scalars['bigint']; +}; + + +export type Subscription_RootAccount_Transactions_StreamArgs = { + batch_size: Scalars['Int']; + cursor: Array>; + where?: InputMaybe; +}; + + export type Subscription_RootAddress_Events_SummaryArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -5614,49 +7003,159 @@ export type Subscription_RootIndexer_Status_StreamArgs = { }; -export type Subscription_RootLedger_InfosArgs = { - distinct_on?: InputMaybe>; +export type Subscription_RootLedger_InfosArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootLedger_Infos_By_PkArgs = { + chain_id: Scalars['bigint']; +}; + + +export type Subscription_RootLedger_Infos_StreamArgs = { + batch_size: Scalars['Int']; + cursor: Array>; + where?: InputMaybe; +}; + + +export type Subscription_RootMove_ResourcesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMove_Resources_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMove_Resources_StreamArgs = { + batch_size: Scalars['Int']; + cursor: Array>; + where?: InputMaybe; +}; + + +export type Subscription_RootNft_Marketplace_V2_Current_Nft_Marketplace_AuctionsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootNft_Marketplace_V2_Current_Nft_Marketplace_Auctions_By_PkArgs = { + listing_id: Scalars['String']; + token_data_id: Scalars['String']; +}; + + +export type Subscription_RootNft_Marketplace_V2_Current_Nft_Marketplace_Auctions_StreamArgs = { + batch_size: Scalars['Int']; + cursor: Array>; + where?: InputMaybe; +}; + + +export type Subscription_RootNft_Marketplace_V2_Current_Nft_Marketplace_Collection_OffersArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootNft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_By_PkArgs = { + collection_id: Scalars['String']; + collection_offer_id: Scalars['String']; +}; + + +export type Subscription_RootNft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_StreamArgs = { + batch_size: Scalars['Int']; + cursor: Array>; + where?: InputMaybe; +}; + + +export type Subscription_RootNft_Marketplace_V2_Current_Nft_Marketplace_ListingsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootNft_Marketplace_V2_Current_Nft_Marketplace_Listings_By_PkArgs = { + listing_id: Scalars['String']; + token_data_id: Scalars['String']; +}; + + +export type Subscription_RootNft_Marketplace_V2_Current_Nft_Marketplace_Listings_StreamArgs = { + batch_size: Scalars['Int']; + cursor: Array>; + where?: InputMaybe; +}; + + +export type Subscription_RootNft_Marketplace_V2_Current_Nft_Marketplace_Token_OffersArgs = { + distinct_on?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; }; -export type Subscription_RootLedger_Infos_By_PkArgs = { - chain_id: Scalars['bigint']; +export type Subscription_RootNft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_By_PkArgs = { + offer_id: Scalars['String']; + token_data_id: Scalars['String']; }; -export type Subscription_RootLedger_Infos_StreamArgs = { +export type Subscription_RootNft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_StreamArgs = { batch_size: Scalars['Int']; - cursor: Array>; - where?: InputMaybe; + cursor: Array>; + where?: InputMaybe; }; -export type Subscription_RootMove_ResourcesArgs = { - distinct_on?: InputMaybe>; +export type Subscription_RootNft_Marketplace_V2_Nft_Marketplace_ActivitiesArgs = { + distinct_on?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; }; -export type Subscription_RootMove_Resources_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; +export type Subscription_RootNft_Marketplace_V2_Nft_Marketplace_Activities_By_PkArgs = { + event_index: Scalars['bigint']; + transaction_version: Scalars['bigint']; }; -export type Subscription_RootMove_Resources_StreamArgs = { +export type Subscription_RootNft_Marketplace_V2_Nft_Marketplace_Activities_StreamArgs = { batch_size: Scalars['Int']; - cursor: Array>; - where?: InputMaybe; + cursor: Array>; + where?: InputMaybe; }; @@ -5805,6 +7304,37 @@ export type Subscription_RootToken_Activities_StreamArgs = { }; +export type Subscription_RootToken_Activities_V2Args = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootToken_Activities_V2_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootToken_Activities_V2_By_PkArgs = { + event_index: Scalars['bigint']; + transaction_version: Scalars['bigint']; +}; + + +export type Subscription_RootToken_Activities_V2_StreamArgs = { + batch_size: Scalars['Int']; + cursor: Array>; + where?: InputMaybe; +}; + + export type Subscription_RootToken_DatasArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -5874,477 +7404,981 @@ export type Subscription_RootTokens_StreamArgs = { }; -export type Subscription_RootUser_TransactionsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; +export type Subscription_RootUser_TransactionsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootUser_Transactions_By_PkArgs = { + version: Scalars['bigint']; +}; + + +export type Subscription_RootUser_Transactions_StreamArgs = { + batch_size: Scalars['Int']; + cursor: Array>; + where?: InputMaybe; +}; + +/** columns and relationships of "table_items" */ +export type Table_Items = { + __typename?: 'table_items'; + decoded_key: Scalars['jsonb']; + decoded_value?: Maybe; + key: Scalars['String']; + table_handle: Scalars['String']; + transaction_version: Scalars['bigint']; + write_set_change_index: Scalars['bigint']; +}; + + +/** columns and relationships of "table_items" */ +export type Table_ItemsDecoded_KeyArgs = { + path?: InputMaybe; +}; + + +/** columns and relationships of "table_items" */ +export type Table_ItemsDecoded_ValueArgs = { + path?: InputMaybe; +}; + +/** Boolean expression to filter rows from the table "table_items". All fields are combined with a logical 'AND'. */ +export type Table_Items_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + decoded_key?: InputMaybe; + decoded_value?: InputMaybe; + key?: InputMaybe; + table_handle?: InputMaybe; + transaction_version?: InputMaybe; + write_set_change_index?: InputMaybe; +}; + +/** Ordering options when selecting data from "table_items". */ +export type Table_Items_Order_By = { + decoded_key?: InputMaybe; + decoded_value?: InputMaybe; + key?: InputMaybe; + table_handle?: InputMaybe; + transaction_version?: InputMaybe; + write_set_change_index?: InputMaybe; +}; + +/** select columns of table "table_items" */ +export enum Table_Items_Select_Column { + /** column name */ + DecodedKey = 'decoded_key', + /** column name */ + DecodedValue = 'decoded_value', + /** column name */ + Key = 'key', + /** column name */ + TableHandle = 'table_handle', + /** column name */ + TransactionVersion = 'transaction_version', + /** column name */ + WriteSetChangeIndex = 'write_set_change_index' +} + +/** Streaming cursor of the table "table_items" */ +export type Table_Items_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Table_Items_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Table_Items_Stream_Cursor_Value_Input = { + decoded_key?: InputMaybe; + decoded_value?: InputMaybe; + key?: InputMaybe; + table_handle?: InputMaybe; + transaction_version?: InputMaybe; + write_set_change_index?: InputMaybe; +}; + +/** columns and relationships of "table_metadatas" */ +export type Table_Metadatas = { + __typename?: 'table_metadatas'; + handle: Scalars['String']; + key_type: Scalars['String']; + value_type: Scalars['String']; +}; + +/** Boolean expression to filter rows from the table "table_metadatas". All fields are combined with a logical 'AND'. */ +export type Table_Metadatas_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + handle?: InputMaybe; + key_type?: InputMaybe; + value_type?: InputMaybe; +}; + +/** Ordering options when selecting data from "table_metadatas". */ +export type Table_Metadatas_Order_By = { + handle?: InputMaybe; + key_type?: InputMaybe; + value_type?: InputMaybe; +}; + +/** select columns of table "table_metadatas" */ +export enum Table_Metadatas_Select_Column { + /** column name */ + Handle = 'handle', + /** column name */ + KeyType = 'key_type', + /** column name */ + ValueType = 'value_type' +} + +/** Streaming cursor of the table "table_metadatas" */ +export type Table_Metadatas_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Table_Metadatas_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Table_Metadatas_Stream_Cursor_Value_Input = { + handle?: InputMaybe; + key_type?: InputMaybe; + value_type?: InputMaybe; +}; + +/** Boolean expression to compare columns of type "timestamp". All fields are combined with logical 'AND'. */ +export type Timestamp_Comparison_Exp = { + _eq?: InputMaybe; + _gt?: InputMaybe; + _gte?: InputMaybe; + _in?: InputMaybe>; + _is_null?: InputMaybe; + _lt?: InputMaybe; + _lte?: InputMaybe; + _neq?: InputMaybe; + _nin?: InputMaybe>; +}; + +/** Boolean expression to compare columns of type "timestamptz". All fields are combined with logical 'AND'. */ +export type Timestamptz_Comparison_Exp = { + _eq?: InputMaybe; + _gt?: InputMaybe; + _gte?: InputMaybe; + _in?: InputMaybe>; + _is_null?: InputMaybe; + _lt?: InputMaybe; + _lte?: InputMaybe; + _neq?: InputMaybe; + _nin?: InputMaybe>; +}; + +/** columns and relationships of "token_activities" */ +export type Token_Activities = { + __typename?: 'token_activities'; + /** An array relationship */ + aptos_names_owner: Array; + /** An array relationship */ + aptos_names_to: Array; + coin_amount?: Maybe; + coin_type?: Maybe; + collection_data_id_hash: Scalars['String']; + collection_name: Scalars['String']; + creator_address: Scalars['String']; + /** An object relationship */ + current_token_data?: Maybe; + event_account_address: Scalars['String']; + event_creation_number: Scalars['bigint']; + event_index?: Maybe; + event_sequence_number: Scalars['bigint']; + from_address?: Maybe; + name: Scalars['String']; + property_version: Scalars['numeric']; + to_address?: Maybe; + token_amount: Scalars['numeric']; + token_data_id_hash: Scalars['String']; + transaction_timestamp: Scalars['timestamp']; + transaction_version: Scalars['bigint']; + transfer_type: Scalars['String']; +}; + + +/** columns and relationships of "token_activities" */ +export type Token_ActivitiesAptos_Names_OwnerArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "token_activities" */ +export type Token_ActivitiesAptos_Names_ToArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +/** aggregated selection of "token_activities" */ +export type Token_Activities_Aggregate = { + __typename?: 'token_activities_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "token_activities" */ +export type Token_Activities_Aggregate_Fields = { + __typename?: 'token_activities_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; }; -export type Subscription_RootUser_Transactions_By_PkArgs = { - version: Scalars['bigint']; +/** aggregate fields of "token_activities" */ +export type Token_Activities_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; }; +/** order by aggregate values of table "token_activities" */ +export type Token_Activities_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; -export type Subscription_RootUser_Transactions_StreamArgs = { - batch_size: Scalars['Int']; - cursor: Array>; - where?: InputMaybe; +/** aggregate avg on columns */ +export type Token_Activities_Avg_Fields = { + __typename?: 'token_activities_avg_fields'; + coin_amount?: Maybe; + event_creation_number?: Maybe; + event_index?: Maybe; + event_sequence_number?: Maybe; + property_version?: Maybe; + token_amount?: Maybe; + transaction_version?: Maybe; }; -/** columns and relationships of "table_items" */ -export type Table_Items = { - __typename?: 'table_items'; - decoded_key: Scalars['jsonb']; - decoded_value?: Maybe; - key: Scalars['String']; - table_handle: Scalars['String']; - transaction_version: Scalars['bigint']; - write_set_change_index: Scalars['bigint']; +/** order by avg() on columns of table "token_activities" */ +export type Token_Activities_Avg_Order_By = { + coin_amount?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + property_version?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; }; +/** Boolean expression to filter rows from the table "token_activities". All fields are combined with a logical 'AND'. */ +export type Token_Activities_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + aptos_names_owner?: InputMaybe; + aptos_names_to?: InputMaybe; + coin_amount?: InputMaybe; + coin_type?: InputMaybe; + collection_data_id_hash?: InputMaybe; + collection_name?: InputMaybe; + creator_address?: InputMaybe; + current_token_data?: InputMaybe; + event_account_address?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + from_address?: InputMaybe; + name?: InputMaybe; + property_version?: InputMaybe; + to_address?: InputMaybe; + token_amount?: InputMaybe; + token_data_id_hash?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; + transfer_type?: InputMaybe; +}; -/** columns and relationships of "table_items" */ -export type Table_ItemsDecoded_KeyArgs = { - path?: InputMaybe; +/** aggregate max on columns */ +export type Token_Activities_Max_Fields = { + __typename?: 'token_activities_max_fields'; + coin_amount?: Maybe; + coin_type?: Maybe; + collection_data_id_hash?: Maybe; + collection_name?: Maybe; + creator_address?: Maybe; + event_account_address?: Maybe; + event_creation_number?: Maybe; + event_index?: Maybe; + event_sequence_number?: Maybe; + from_address?: Maybe; + name?: Maybe; + property_version?: Maybe; + to_address?: Maybe; + token_amount?: Maybe; + token_data_id_hash?: Maybe; + transaction_timestamp?: Maybe; + transaction_version?: Maybe; + transfer_type?: Maybe; }; +/** order by max() on columns of table "token_activities" */ +export type Token_Activities_Max_Order_By = { + coin_amount?: InputMaybe; + coin_type?: InputMaybe; + collection_data_id_hash?: InputMaybe; + collection_name?: InputMaybe; + creator_address?: InputMaybe; + event_account_address?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + from_address?: InputMaybe; + name?: InputMaybe; + property_version?: InputMaybe; + to_address?: InputMaybe; + token_amount?: InputMaybe; + token_data_id_hash?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; + transfer_type?: InputMaybe; +}; -/** columns and relationships of "table_items" */ -export type Table_ItemsDecoded_ValueArgs = { - path?: InputMaybe; +/** aggregate min on columns */ +export type Token_Activities_Min_Fields = { + __typename?: 'token_activities_min_fields'; + coin_amount?: Maybe; + coin_type?: Maybe; + collection_data_id_hash?: Maybe; + collection_name?: Maybe; + creator_address?: Maybe; + event_account_address?: Maybe; + event_creation_number?: Maybe; + event_index?: Maybe; + event_sequence_number?: Maybe; + from_address?: Maybe; + name?: Maybe; + property_version?: Maybe; + to_address?: Maybe; + token_amount?: Maybe; + token_data_id_hash?: Maybe; + transaction_timestamp?: Maybe; + transaction_version?: Maybe; + transfer_type?: Maybe; }; -/** Boolean expression to filter rows from the table "table_items". All fields are combined with a logical 'AND'. */ -export type Table_Items_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - decoded_key?: InputMaybe; - decoded_value?: InputMaybe; - key?: InputMaybe; - table_handle?: InputMaybe; - transaction_version?: InputMaybe; - write_set_change_index?: InputMaybe; +/** order by min() on columns of table "token_activities" */ +export type Token_Activities_Min_Order_By = { + coin_amount?: InputMaybe; + coin_type?: InputMaybe; + collection_data_id_hash?: InputMaybe; + collection_name?: InputMaybe; + creator_address?: InputMaybe; + event_account_address?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + from_address?: InputMaybe; + name?: InputMaybe; + property_version?: InputMaybe; + to_address?: InputMaybe; + token_amount?: InputMaybe; + token_data_id_hash?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; + transfer_type?: InputMaybe; }; -/** Ordering options when selecting data from "table_items". */ -export type Table_Items_Order_By = { - decoded_key?: InputMaybe; - decoded_value?: InputMaybe; - key?: InputMaybe; - table_handle?: InputMaybe; +/** Ordering options when selecting data from "token_activities". */ +export type Token_Activities_Order_By = { + aptos_names_owner_aggregate?: InputMaybe; + aptos_names_to_aggregate?: InputMaybe; + coin_amount?: InputMaybe; + coin_type?: InputMaybe; + collection_data_id_hash?: InputMaybe; + collection_name?: InputMaybe; + creator_address?: InputMaybe; + current_token_data?: InputMaybe; + event_account_address?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + from_address?: InputMaybe; + name?: InputMaybe; + property_version?: InputMaybe; + to_address?: InputMaybe; + token_amount?: InputMaybe; + token_data_id_hash?: InputMaybe; + transaction_timestamp?: InputMaybe; transaction_version?: InputMaybe; - write_set_change_index?: InputMaybe; + transfer_type?: InputMaybe; }; -/** select columns of table "table_items" */ -export enum Table_Items_Select_Column { +/** select columns of table "token_activities" */ +export enum Token_Activities_Select_Column { /** column name */ - DecodedKey = 'decoded_key', + CoinAmount = 'coin_amount', /** column name */ - DecodedValue = 'decoded_value', + CoinType = 'coin_type', /** column name */ - Key = 'key', + CollectionDataIdHash = 'collection_data_id_hash', /** column name */ - TableHandle = 'table_handle', + CollectionName = 'collection_name', + /** column name */ + CreatorAddress = 'creator_address', + /** column name */ + EventAccountAddress = 'event_account_address', + /** column name */ + EventCreationNumber = 'event_creation_number', + /** column name */ + EventIndex = 'event_index', + /** column name */ + EventSequenceNumber = 'event_sequence_number', + /** column name */ + FromAddress = 'from_address', + /** column name */ + Name = 'name', + /** column name */ + PropertyVersion = 'property_version', + /** column name */ + ToAddress = 'to_address', + /** column name */ + TokenAmount = 'token_amount', + /** column name */ + TokenDataIdHash = 'token_data_id_hash', + /** column name */ + TransactionTimestamp = 'transaction_timestamp', /** column name */ TransactionVersion = 'transaction_version', /** column name */ - WriteSetChangeIndex = 'write_set_change_index' + TransferType = 'transfer_type' } -/** Streaming cursor of the table "table_items" */ -export type Table_Items_Stream_Cursor_Input = { - /** Stream column input with initial value */ - initial_value: Table_Items_Stream_Cursor_Value_Input; - /** cursor ordering */ - ordering?: InputMaybe; +/** aggregate stddev on columns */ +export type Token_Activities_Stddev_Fields = { + __typename?: 'token_activities_stddev_fields'; + coin_amount?: Maybe; + event_creation_number?: Maybe; + event_index?: Maybe; + event_sequence_number?: Maybe; + property_version?: Maybe; + token_amount?: Maybe; + transaction_version?: Maybe; }; -/** Initial value of the column from where the streaming should start */ -export type Table_Items_Stream_Cursor_Value_Input = { - decoded_key?: InputMaybe; - decoded_value?: InputMaybe; - key?: InputMaybe; - table_handle?: InputMaybe; - transaction_version?: InputMaybe; - write_set_change_index?: InputMaybe; +/** order by stddev() on columns of table "token_activities" */ +export type Token_Activities_Stddev_Order_By = { + coin_amount?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + property_version?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; }; -/** columns and relationships of "table_metadatas" */ -export type Table_Metadatas = { - __typename?: 'table_metadatas'; - handle: Scalars['String']; - key_type: Scalars['String']; - value_type: Scalars['String']; +/** aggregate stddev_pop on columns */ +export type Token_Activities_Stddev_Pop_Fields = { + __typename?: 'token_activities_stddev_pop_fields'; + coin_amount?: Maybe; + event_creation_number?: Maybe; + event_index?: Maybe; + event_sequence_number?: Maybe; + property_version?: Maybe; + token_amount?: Maybe; + transaction_version?: Maybe; }; -/** Boolean expression to filter rows from the table "table_metadatas". All fields are combined with a logical 'AND'. */ -export type Table_Metadatas_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - handle?: InputMaybe; - key_type?: InputMaybe; - value_type?: InputMaybe; +/** order by stddev_pop() on columns of table "token_activities" */ +export type Token_Activities_Stddev_Pop_Order_By = { + coin_amount?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + property_version?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; }; -/** Ordering options when selecting data from "table_metadatas". */ -export type Table_Metadatas_Order_By = { - handle?: InputMaybe; - key_type?: InputMaybe; - value_type?: InputMaybe; +/** aggregate stddev_samp on columns */ +export type Token_Activities_Stddev_Samp_Fields = { + __typename?: 'token_activities_stddev_samp_fields'; + coin_amount?: Maybe; + event_creation_number?: Maybe; + event_index?: Maybe; + event_sequence_number?: Maybe; + property_version?: Maybe; + token_amount?: Maybe; + transaction_version?: Maybe; }; -/** select columns of table "table_metadatas" */ -export enum Table_Metadatas_Select_Column { - /** column name */ - Handle = 'handle', - /** column name */ - KeyType = 'key_type', - /** column name */ - ValueType = 'value_type' -} +/** order by stddev_samp() on columns of table "token_activities" */ +export type Token_Activities_Stddev_Samp_Order_By = { + coin_amount?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + property_version?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; +}; -/** Streaming cursor of the table "table_metadatas" */ -export type Table_Metadatas_Stream_Cursor_Input = { +/** Streaming cursor of the table "token_activities" */ +export type Token_Activities_Stream_Cursor_Input = { /** Stream column input with initial value */ - initial_value: Table_Metadatas_Stream_Cursor_Value_Input; + initial_value: Token_Activities_Stream_Cursor_Value_Input; /** cursor ordering */ ordering?: InputMaybe; }; /** Initial value of the column from where the streaming should start */ -export type Table_Metadatas_Stream_Cursor_Value_Input = { - handle?: InputMaybe; - key_type?: InputMaybe; - value_type?: InputMaybe; +export type Token_Activities_Stream_Cursor_Value_Input = { + coin_amount?: InputMaybe; + coin_type?: InputMaybe; + collection_data_id_hash?: InputMaybe; + collection_name?: InputMaybe; + creator_address?: InputMaybe; + event_account_address?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + from_address?: InputMaybe; + name?: InputMaybe; + property_version?: InputMaybe; + to_address?: InputMaybe; + token_amount?: InputMaybe; + token_data_id_hash?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; + transfer_type?: InputMaybe; }; -/** Boolean expression to compare columns of type "timestamp". All fields are combined with logical 'AND'. */ -export type Timestamp_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; +/** aggregate sum on columns */ +export type Token_Activities_Sum_Fields = { + __typename?: 'token_activities_sum_fields'; + coin_amount?: Maybe; + event_creation_number?: Maybe; + event_index?: Maybe; + event_sequence_number?: Maybe; + property_version?: Maybe; + token_amount?: Maybe; + transaction_version?: Maybe; }; -/** columns and relationships of "token_activities" */ -export type Token_Activities = { - __typename?: 'token_activities'; - /** An array relationship */ - aptos_names_owner: Array; - /** An array relationship */ - aptos_names_to: Array; - coin_amount?: Maybe; - coin_type?: Maybe; - collection_data_id_hash: Scalars['String']; - collection_name: Scalars['String']; - creator_address: Scalars['String']; - /** An object relationship */ - current_token_data?: Maybe; +/** order by sum() on columns of table "token_activities" */ +export type Token_Activities_Sum_Order_By = { + coin_amount?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + property_version?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** columns and relationships of "token_activities_v2" */ +export type Token_Activities_V2 = { + __typename?: 'token_activities_v2'; + after_value?: Maybe; + before_value?: Maybe; + entry_function_id_str?: Maybe; event_account_address: Scalars['String']; - event_creation_number: Scalars['bigint']; - event_index?: Maybe; - event_sequence_number: Scalars['bigint']; + event_index: Scalars['bigint']; from_address?: Maybe; - name: Scalars['String']; - property_version: Scalars['numeric']; + is_fungible_v2?: Maybe; + property_version_v1: Scalars['numeric']; to_address?: Maybe; token_amount: Scalars['numeric']; - token_data_id_hash: Scalars['String']; + token_data_id: Scalars['String']; + token_standard: Scalars['String']; transaction_timestamp: Scalars['timestamp']; transaction_version: Scalars['bigint']; - transfer_type: Scalars['String']; -}; - - -/** columns and relationships of "token_activities" */ -export type Token_ActivitiesAptos_Names_OwnerArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -/** columns and relationships of "token_activities" */ -export type Token_ActivitiesAptos_Names_ToArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; + type: Scalars['String']; }; -/** aggregated selection of "token_activities" */ -export type Token_Activities_Aggregate = { - __typename?: 'token_activities_aggregate'; - aggregate?: Maybe; - nodes: Array; +/** aggregated selection of "token_activities_v2" */ +export type Token_Activities_V2_Aggregate = { + __typename?: 'token_activities_v2_aggregate'; + aggregate?: Maybe; + nodes: Array; }; -/** aggregate fields of "token_activities" */ -export type Token_Activities_Aggregate_Fields = { - __typename?: 'token_activities_aggregate_fields'; - avg?: Maybe; +/** aggregate fields of "token_activities_v2" */ +export type Token_Activities_V2_Aggregate_Fields = { + __typename?: 'token_activities_v2_aggregate_fields'; + avg?: Maybe; count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; }; -/** aggregate fields of "token_activities" */ -export type Token_Activities_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; +/** aggregate fields of "token_activities_v2" */ +export type Token_Activities_V2_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; distinct?: InputMaybe; }; +/** order by aggregate values of table "token_activities_v2" */ +export type Token_Activities_V2_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + /** aggregate avg on columns */ -export type Token_Activities_Avg_Fields = { - __typename?: 'token_activities_avg_fields'; - coin_amount?: Maybe; - event_creation_number?: Maybe; +export type Token_Activities_V2_Avg_Fields = { + __typename?: 'token_activities_v2_avg_fields'; event_index?: Maybe; - event_sequence_number?: Maybe; - property_version?: Maybe; + property_version_v1?: Maybe; token_amount?: Maybe; transaction_version?: Maybe; }; -/** Boolean expression to filter rows from the table "token_activities". All fields are combined with a logical 'AND'. */ -export type Token_Activities_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - aptos_names_owner?: InputMaybe; - aptos_names_to?: InputMaybe; - coin_amount?: InputMaybe; - coin_type?: InputMaybe; - collection_data_id_hash?: InputMaybe; - collection_name?: InputMaybe; - creator_address?: InputMaybe; - current_token_data?: InputMaybe; +/** order by avg() on columns of table "token_activities_v2" */ +export type Token_Activities_V2_Avg_Order_By = { + event_index?: InputMaybe; + property_version_v1?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** Boolean expression to filter rows from the table "token_activities_v2". All fields are combined with a logical 'AND'. */ +export type Token_Activities_V2_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + after_value?: InputMaybe; + before_value?: InputMaybe; + entry_function_id_str?: InputMaybe; event_account_address?: InputMaybe; - event_creation_number?: InputMaybe; event_index?: InputMaybe; - event_sequence_number?: InputMaybe; from_address?: InputMaybe; - name?: InputMaybe; - property_version?: InputMaybe; + is_fungible_v2?: InputMaybe; + property_version_v1?: InputMaybe; to_address?: InputMaybe; token_amount?: InputMaybe; - token_data_id_hash?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; transaction_timestamp?: InputMaybe; transaction_version?: InputMaybe; - transfer_type?: InputMaybe; + type?: InputMaybe; }; /** aggregate max on columns */ -export type Token_Activities_Max_Fields = { - __typename?: 'token_activities_max_fields'; - coin_amount?: Maybe; - coin_type?: Maybe; - collection_data_id_hash?: Maybe; - collection_name?: Maybe; - creator_address?: Maybe; +export type Token_Activities_V2_Max_Fields = { + __typename?: 'token_activities_v2_max_fields'; + after_value?: Maybe; + before_value?: Maybe; + entry_function_id_str?: Maybe; event_account_address?: Maybe; - event_creation_number?: Maybe; event_index?: Maybe; - event_sequence_number?: Maybe; from_address?: Maybe; - name?: Maybe; - property_version?: Maybe; + property_version_v1?: Maybe; to_address?: Maybe; token_amount?: Maybe; - token_data_id_hash?: Maybe; + token_data_id?: Maybe; + token_standard?: Maybe; transaction_timestamp?: Maybe; transaction_version?: Maybe; - transfer_type?: Maybe; + type?: Maybe; +}; + +/** order by max() on columns of table "token_activities_v2" */ +export type Token_Activities_V2_Max_Order_By = { + after_value?: InputMaybe; + before_value?: InputMaybe; + entry_function_id_str?: InputMaybe; + event_account_address?: InputMaybe; + event_index?: InputMaybe; + from_address?: InputMaybe; + property_version_v1?: InputMaybe; + to_address?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; + type?: InputMaybe; }; /** aggregate min on columns */ -export type Token_Activities_Min_Fields = { - __typename?: 'token_activities_min_fields'; - coin_amount?: Maybe; - coin_type?: Maybe; - collection_data_id_hash?: Maybe; - collection_name?: Maybe; - creator_address?: Maybe; +export type Token_Activities_V2_Min_Fields = { + __typename?: 'token_activities_v2_min_fields'; + after_value?: Maybe; + before_value?: Maybe; + entry_function_id_str?: Maybe; event_account_address?: Maybe; - event_creation_number?: Maybe; event_index?: Maybe; - event_sequence_number?: Maybe; from_address?: Maybe; - name?: Maybe; - property_version?: Maybe; + property_version_v1?: Maybe; to_address?: Maybe; token_amount?: Maybe; - token_data_id_hash?: Maybe; + token_data_id?: Maybe; + token_standard?: Maybe; transaction_timestamp?: Maybe; transaction_version?: Maybe; - transfer_type?: Maybe; + type?: Maybe; }; -/** Ordering options when selecting data from "token_activities". */ -export type Token_Activities_Order_By = { - aptos_names_owner_aggregate?: InputMaybe; - aptos_names_to_aggregate?: InputMaybe; - coin_amount?: InputMaybe; - coin_type?: InputMaybe; - collection_data_id_hash?: InputMaybe; - collection_name?: InputMaybe; - creator_address?: InputMaybe; - current_token_data?: InputMaybe; +/** order by min() on columns of table "token_activities_v2" */ +export type Token_Activities_V2_Min_Order_By = { + after_value?: InputMaybe; + before_value?: InputMaybe; + entry_function_id_str?: InputMaybe; event_account_address?: InputMaybe; - event_creation_number?: InputMaybe; event_index?: InputMaybe; - event_sequence_number?: InputMaybe; from_address?: InputMaybe; - name?: InputMaybe; - property_version?: InputMaybe; + property_version_v1?: InputMaybe; to_address?: InputMaybe; token_amount?: InputMaybe; - token_data_id_hash?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; transaction_timestamp?: InputMaybe; transaction_version?: InputMaybe; - transfer_type?: InputMaybe; + type?: InputMaybe; }; -/** select columns of table "token_activities" */ -export enum Token_Activities_Select_Column { - /** column name */ - CoinAmount = 'coin_amount', - /** column name */ - CoinType = 'coin_type', +/** Ordering options when selecting data from "token_activities_v2". */ +export type Token_Activities_V2_Order_By = { + after_value?: InputMaybe; + before_value?: InputMaybe; + entry_function_id_str?: InputMaybe; + event_account_address?: InputMaybe; + event_index?: InputMaybe; + from_address?: InputMaybe; + is_fungible_v2?: InputMaybe; + property_version_v1?: InputMaybe; + to_address?: InputMaybe; + token_amount?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; + transaction_timestamp?: InputMaybe; + transaction_version?: InputMaybe; + type?: InputMaybe; +}; + +/** select columns of table "token_activities_v2" */ +export enum Token_Activities_V2_Select_Column { /** column name */ - CollectionDataIdHash = 'collection_data_id_hash', + AfterValue = 'after_value', /** column name */ - CollectionName = 'collection_name', + BeforeValue = 'before_value', /** column name */ - CreatorAddress = 'creator_address', + EntryFunctionIdStr = 'entry_function_id_str', /** column name */ EventAccountAddress = 'event_account_address', /** column name */ - EventCreationNumber = 'event_creation_number', - /** column name */ EventIndex = 'event_index', /** column name */ - EventSequenceNumber = 'event_sequence_number', - /** column name */ FromAddress = 'from_address', /** column name */ - Name = 'name', + IsFungibleV2 = 'is_fungible_v2', /** column name */ - PropertyVersion = 'property_version', + PropertyVersionV1 = 'property_version_v1', /** column name */ ToAddress = 'to_address', /** column name */ TokenAmount = 'token_amount', /** column name */ - TokenDataIdHash = 'token_data_id_hash', + TokenDataId = 'token_data_id', + /** column name */ + TokenStandard = 'token_standard', /** column name */ TransactionTimestamp = 'transaction_timestamp', /** column name */ TransactionVersion = 'transaction_version', /** column name */ - TransferType = 'transfer_type' + Type = 'type' } /** aggregate stddev on columns */ -export type Token_Activities_Stddev_Fields = { - __typename?: 'token_activities_stddev_fields'; - coin_amount?: Maybe; - event_creation_number?: Maybe; +export type Token_Activities_V2_Stddev_Fields = { + __typename?: 'token_activities_v2_stddev_fields'; event_index?: Maybe; - event_sequence_number?: Maybe; - property_version?: Maybe; + property_version_v1?: Maybe; token_amount?: Maybe; transaction_version?: Maybe; }; +/** order by stddev() on columns of table "token_activities_v2" */ +export type Token_Activities_V2_Stddev_Order_By = { + event_index?: InputMaybe; + property_version_v1?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** aggregate stddev_pop on columns */ -export type Token_Activities_Stddev_Pop_Fields = { - __typename?: 'token_activities_stddev_pop_fields'; - coin_amount?: Maybe; - event_creation_number?: Maybe; +export type Token_Activities_V2_Stddev_Pop_Fields = { + __typename?: 'token_activities_v2_stddev_pop_fields'; event_index?: Maybe; - event_sequence_number?: Maybe; - property_version?: Maybe; + property_version_v1?: Maybe; token_amount?: Maybe; transaction_version?: Maybe; }; +/** order by stddev_pop() on columns of table "token_activities_v2" */ +export type Token_Activities_V2_Stddev_Pop_Order_By = { + event_index?: InputMaybe; + property_version_v1?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** aggregate stddev_samp on columns */ -export type Token_Activities_Stddev_Samp_Fields = { - __typename?: 'token_activities_stddev_samp_fields'; - coin_amount?: Maybe; - event_creation_number?: Maybe; +export type Token_Activities_V2_Stddev_Samp_Fields = { + __typename?: 'token_activities_v2_stddev_samp_fields'; event_index?: Maybe; - event_sequence_number?: Maybe; - property_version?: Maybe; + property_version_v1?: Maybe; token_amount?: Maybe; transaction_version?: Maybe; }; -/** Streaming cursor of the table "token_activities" */ -export type Token_Activities_Stream_Cursor_Input = { +/** order by stddev_samp() on columns of table "token_activities_v2" */ +export type Token_Activities_V2_Stddev_Samp_Order_By = { + event_index?: InputMaybe; + property_version_v1?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** Streaming cursor of the table "token_activities_v2" */ +export type Token_Activities_V2_Stream_Cursor_Input = { /** Stream column input with initial value */ - initial_value: Token_Activities_Stream_Cursor_Value_Input; + initial_value: Token_Activities_V2_Stream_Cursor_Value_Input; /** cursor ordering */ ordering?: InputMaybe; }; /** Initial value of the column from where the streaming should start */ -export type Token_Activities_Stream_Cursor_Value_Input = { - coin_amount?: InputMaybe; - coin_type?: InputMaybe; - collection_data_id_hash?: InputMaybe; - collection_name?: InputMaybe; - creator_address?: InputMaybe; +export type Token_Activities_V2_Stream_Cursor_Value_Input = { + after_value?: InputMaybe; + before_value?: InputMaybe; + entry_function_id_str?: InputMaybe; event_account_address?: InputMaybe; - event_creation_number?: InputMaybe; event_index?: InputMaybe; - event_sequence_number?: InputMaybe; from_address?: InputMaybe; - name?: InputMaybe; - property_version?: InputMaybe; + is_fungible_v2?: InputMaybe; + property_version_v1?: InputMaybe; to_address?: InputMaybe; token_amount?: InputMaybe; - token_data_id_hash?: InputMaybe; + token_data_id?: InputMaybe; + token_standard?: InputMaybe; transaction_timestamp?: InputMaybe; transaction_version?: InputMaybe; - transfer_type?: InputMaybe; + type?: InputMaybe; }; /** aggregate sum on columns */ -export type Token_Activities_Sum_Fields = { - __typename?: 'token_activities_sum_fields'; - coin_amount?: Maybe; - event_creation_number?: Maybe; +export type Token_Activities_V2_Sum_Fields = { + __typename?: 'token_activities_v2_sum_fields'; event_index?: Maybe; - event_sequence_number?: Maybe; - property_version?: Maybe; + property_version_v1?: Maybe; token_amount?: Maybe; transaction_version?: Maybe; }; +/** order by sum() on columns of table "token_activities_v2" */ +export type Token_Activities_V2_Sum_Order_By = { + event_index?: InputMaybe; + property_version_v1?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** aggregate var_pop on columns */ +export type Token_Activities_V2_Var_Pop_Fields = { + __typename?: 'token_activities_v2_var_pop_fields'; + event_index?: Maybe; + property_version_v1?: Maybe; + token_amount?: Maybe; + transaction_version?: Maybe; +}; + +/** order by var_pop() on columns of table "token_activities_v2" */ +export type Token_Activities_V2_Var_Pop_Order_By = { + event_index?: InputMaybe; + property_version_v1?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** aggregate var_samp on columns */ +export type Token_Activities_V2_Var_Samp_Fields = { + __typename?: 'token_activities_v2_var_samp_fields'; + event_index?: Maybe; + property_version_v1?: Maybe; + token_amount?: Maybe; + transaction_version?: Maybe; +}; + +/** order by var_samp() on columns of table "token_activities_v2" */ +export type Token_Activities_V2_Var_Samp_Order_By = { + event_index?: InputMaybe; + property_version_v1?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; +}; + +/** aggregate variance on columns */ +export type Token_Activities_V2_Variance_Fields = { + __typename?: 'token_activities_v2_variance_fields'; + event_index?: Maybe; + property_version_v1?: Maybe; + token_amount?: Maybe; + transaction_version?: Maybe; +}; + +/** order by variance() on columns of table "token_activities_v2" */ +export type Token_Activities_V2_Variance_Order_By = { + event_index?: InputMaybe; + property_version_v1?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** aggregate var_pop on columns */ export type Token_Activities_Var_Pop_Fields = { __typename?: 'token_activities_var_pop_fields'; @@ -6357,6 +8391,17 @@ export type Token_Activities_Var_Pop_Fields = { transaction_version?: Maybe; }; +/** order by var_pop() on columns of table "token_activities" */ +export type Token_Activities_Var_Pop_Order_By = { + coin_amount?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + property_version?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** aggregate var_samp on columns */ export type Token_Activities_Var_Samp_Fields = { __typename?: 'token_activities_var_samp_fields'; @@ -6369,6 +8414,17 @@ export type Token_Activities_Var_Samp_Fields = { transaction_version?: Maybe; }; +/** order by var_samp() on columns of table "token_activities" */ +export type Token_Activities_Var_Samp_Order_By = { + coin_amount?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + property_version?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** aggregate variance on columns */ export type Token_Activities_Variance_Fields = { __typename?: 'token_activities_variance_fields'; @@ -6381,6 +8437,17 @@ export type Token_Activities_Variance_Fields = { transaction_version?: Maybe; }; +/** order by variance() on columns of table "token_activities" */ +export type Token_Activities_Variance_Order_By = { + coin_amount?: InputMaybe; + event_creation_number?: InputMaybe; + event_index?: InputMaybe; + event_sequence_number?: InputMaybe; + property_version?: InputMaybe; + token_amount?: InputMaybe; + transaction_version?: InputMaybe; +}; + /** columns and relationships of "token_datas" */ export type Token_Datas = { __typename?: 'token_datas'; diff --git a/ecosystem/typescript/sdk/src/indexer/queries/getAccountTokensCount.graphql b/ecosystem/typescript/sdk/src/indexer/queries/getAccountTokensCount.graphql index 0ce7eb9d53d95..c1032400cd0ac 100644 --- a/ecosystem/typescript/sdk/src/indexer/queries/getAccountTokensCount.graphql +++ b/ecosystem/typescript/sdk/src/indexer/queries/getAccountTokensCount.graphql @@ -1,5 +1,5 @@ -query getAccountTokensCount($owner_address: String) { - current_token_ownerships_aggregate(where: { owner_address: { _eq: $owner_address }, amount: { _gt: "0" } }) { +query getAccountTokensCount($where_condition: current_token_ownerships_v2_bool_exp, $offset: Int, $limit: Int) { + current_token_ownerships_v2_aggregate(where: $where_condition, offset: $offset, limit: $limit) { aggregate { count } diff --git a/ecosystem/typescript/sdk/src/indexer/queries/getCollectionData.graphql b/ecosystem/typescript/sdk/src/indexer/queries/getCollectionData.graphql index 066f5871e7515..b701d92da079d 100644 --- a/ecosystem/typescript/sdk/src/indexer/queries/getCollectionData.graphql +++ b/ecosystem/typescript/sdk/src/indexer/queries/getCollectionData.graphql @@ -1,5 +1,10 @@ -query getCollectionData($where_condition: current_collections_v2_bool_exp!, $offset: Int, $limit: Int) { - current_collections_v2(where: $where_condition, offset: $offset, limit: $limit) { +query getCollectionData( + $where_condition: current_collections_v2_bool_exp! + $offset: Int + $limit: Int + $order_by: [current_collections_v2_order_by!] +) { + current_collections_v2(where: $where_condition, offset: $offset, limit: $limit, order_by: $order_by) { collection_id token_standard collection_name diff --git a/ecosystem/typescript/sdk/src/indexer/queries/getCollectionsWithOwnedTokens.graphql b/ecosystem/typescript/sdk/src/indexer/queries/getCollectionsWithOwnedTokens.graphql index e919780286597..a27bd1a0609d8 100644 --- a/ecosystem/typescript/sdk/src/indexer/queries/getCollectionsWithOwnedTokens.graphql +++ b/ecosystem/typescript/sdk/src/indexer/queries/getCollectionsWithOwnedTokens.graphql @@ -2,13 +2,9 @@ query getCollectionsWithOwnedTokens( $where_condition: current_collection_ownership_v2_view_bool_exp! $offset: Int $limit: Int + $order_by: [current_collection_ownership_v2_view_order_by!] ) { - current_collection_ownership_v2_view( - where: $where_condition - order_by: { last_transaction_version: desc } - offset: $offset - limit: $limit - ) { + current_collection_ownership_v2_view(where: $where_condition, offset: $offset, limit: $limit, order_by: $order_by) { current_collection { creator_address collection_name diff --git a/ecosystem/typescript/sdk/src/indexer/queries/getOwnedTokens.graphql b/ecosystem/typescript/sdk/src/indexer/queries/getOwnedTokens.graphql index 1ac45b0dfbed7..ece894c01b85b 100644 --- a/ecosystem/typescript/sdk/src/indexer/queries/getOwnedTokens.graphql +++ b/ecosystem/typescript/sdk/src/indexer/queries/getOwnedTokens.graphql @@ -1,6 +1,11 @@ #import "./CurrentTokenOwnershipFieldsFragment"; -query getOwnedTokens($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int) { - current_token_ownerships_v2(where: $where_condition, offset: $offset, limit: $limit) { +query getOwnedTokens( + $where_condition: current_token_ownerships_v2_bool_exp! + $offset: Int + $limit: Int + $order_by: [current_token_ownerships_v2_order_by!] +) { + current_token_ownerships_v2(where: $where_condition, offset: $offset, limit: $limit, order_by: $order_by) { ...CurrentTokenOwnershipFields } } diff --git a/ecosystem/typescript/sdk/src/indexer/queries/getOwnedTokensByTokenData.graphql b/ecosystem/typescript/sdk/src/indexer/queries/getOwnedTokensByTokenData.graphql new file mode 100644 index 0000000000000..5dbc25569bb99 --- /dev/null +++ b/ecosystem/typescript/sdk/src/indexer/queries/getOwnedTokensByTokenData.graphql @@ -0,0 +1,11 @@ +#import "./CurrentTokenOwnershipFieldsFragment"; +query getOwnedTokensByTokenData( + $where_condition: current_token_ownerships_v2_bool_exp! + $offset: Int + $limit: Int + $order_by: [current_token_ownerships_v2_order_by!] +) { + current_token_ownerships_v2(where: $where_condition, offset: $offset, limit: $limit, order_by: $order_by) { + ...CurrentTokenOwnershipFields + } +} diff --git a/ecosystem/typescript/sdk/src/indexer/queries/getTokenActivities.graphql b/ecosystem/typescript/sdk/src/indexer/queries/getTokenActivities.graphql index ab7af8887d06e..4c2cc43027243 100644 --- a/ecosystem/typescript/sdk/src/indexer/queries/getTokenActivities.graphql +++ b/ecosystem/typescript/sdk/src/indexer/queries/getTokenActivities.graphql @@ -1,22 +1,24 @@ -query getTokenActivities($idHash: String!, $offset: Int, $limit: Int) { - token_activities( - where: { token_data_id_hash: { _eq: $idHash } } - order_by: { transaction_version: desc } - offset: $offset - limit: $limit - ) { - creator_address - collection_name - name - token_data_id_hash - collection_data_id_hash +query getTokenActivities( + $where_condition: token_activities_v2_bool_exp! + $offset: Int + $limit: Int + $order_by: [token_activities_v2_order_by!] +) { + token_activities_v2(where: $where_condition, order_by: $order_by, offset: $offset, limit: $limit) { + after_value + before_value + entry_function_id_str + event_account_address + event_index from_address + is_fungible_v2 + property_version_v1 to_address - transaction_version - transaction_timestamp - property_version - transfer_type - event_sequence_number token_amount + token_data_id + token_standard + transaction_timestamp + transaction_version + type } } diff --git a/ecosystem/typescript/sdk/src/indexer/queries/getTokenActivitiesCount.graphql b/ecosystem/typescript/sdk/src/indexer/queries/getTokenActivitiesCount.graphql index 6f8d2e99440f7..905e6e0b4b052 100644 --- a/ecosystem/typescript/sdk/src/indexer/queries/getTokenActivitiesCount.graphql +++ b/ecosystem/typescript/sdk/src/indexer/queries/getTokenActivitiesCount.graphql @@ -1,5 +1,5 @@ query getTokenActivitiesCount($token_id: String) { - token_activities_aggregate(where: { token_data_id_hash: { _eq: $token_id } }) { + token_activities_v2_aggregate(where: { token_data_id: { _eq: $token_id } }) { aggregate { count } diff --git a/ecosystem/typescript/sdk/src/indexer/queries/getTokenCurrentOwnerData.graphql b/ecosystem/typescript/sdk/src/indexer/queries/getTokenCurrentOwnerData.graphql index c1b119e1daec1..b7fa4111a055c 100644 --- a/ecosystem/typescript/sdk/src/indexer/queries/getTokenCurrentOwnerData.graphql +++ b/ecosystem/typescript/sdk/src/indexer/queries/getTokenCurrentOwnerData.graphql @@ -1,5 +1,10 @@ -query getTokenCurrentOwnerData($where_condition: current_token_ownerships_v2_bool_exp!) { - current_token_ownerships_v2(where: $where_condition) { +query getTokenCurrentOwnerData( + $where_condition: current_token_ownerships_v2_bool_exp! + $offset: Int + $limit: Int + $order_by: [current_token_ownerships_v2_order_by!] +) { + current_token_ownerships_v2(where: $where_condition, offset: $offset, limit: $limit, order_by: $order_by) { owner_address } } diff --git a/ecosystem/typescript/sdk/src/indexer/queries/getTokenData.graphql b/ecosystem/typescript/sdk/src/indexer/queries/getTokenData.graphql index f32ccccd4f564..582bec97f67be 100644 --- a/ecosystem/typescript/sdk/src/indexer/queries/getTokenData.graphql +++ b/ecosystem/typescript/sdk/src/indexer/queries/getTokenData.graphql @@ -1,5 +1,10 @@ -query getTokenData($where_condition: current_token_datas_v2_bool_exp) { - current_token_datas_v2(where: $where_condition) { +query getTokenData( + $where_condition: current_token_datas_v2_bool_exp + $offset: Int + $limit: Int + $order_by: [current_token_datas_v2_order_by!] +) { + current_token_datas_v2(where: $where_condition, offset: $offset, limit: $limit, order_by: $order_by) { token_data_id token_name token_uri diff --git a/ecosystem/typescript/sdk/src/indexer/queries/getTokenOwnedFromCollection.graphql b/ecosystem/typescript/sdk/src/indexer/queries/getTokenOwnedFromCollection.graphql index fae4705a36e92..9010fb8feed39 100644 --- a/ecosystem/typescript/sdk/src/indexer/queries/getTokenOwnedFromCollection.graphql +++ b/ecosystem/typescript/sdk/src/indexer/queries/getTokenOwnedFromCollection.graphql @@ -1,6 +1,11 @@ #import "./CurrentTokenOwnershipFieldsFragment"; -query getTokenOwnedFromCollection($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int) { - current_token_ownerships_v2(where: $where_condition, offset: $offset, limit: $limit) { +query getTokenOwnedFromCollection( + $where_condition: current_token_ownerships_v2_bool_exp! + $offset: Int + $limit: Int + $order_by: [current_token_ownerships_v2_order_by!] +) { + current_token_ownerships_v2(where: $where_condition, offset: $offset, limit: $limit, order_by: $order_by) { ...CurrentTokenOwnershipFields } } diff --git a/ecosystem/typescript/sdk/src/indexer/queries/getTokenOwnersData.graphql b/ecosystem/typescript/sdk/src/indexer/queries/getTokenOwnersData.graphql index 12c46d0b58bca..423c6a8b28789 100644 --- a/ecosystem/typescript/sdk/src/indexer/queries/getTokenOwnersData.graphql +++ b/ecosystem/typescript/sdk/src/indexer/queries/getTokenOwnersData.graphql @@ -1,5 +1,10 @@ -query getTokenOwnersData($where_condition: current_token_ownerships_v2_bool_exp!) { - current_token_ownerships_v2(where: $where_condition) { +query getTokenOwnersData( + $where_condition: current_token_ownerships_v2_bool_exp! + $offset: Int + $limit: Int + $order_by: [current_token_ownerships_v2_order_by!] +) { + current_token_ownerships_v2(where: $where_condition, offset: $offset, limit: $limit, order_by: $order_by) { owner_address } } diff --git a/ecosystem/typescript/sdk/src/providers/indexer.ts b/ecosystem/typescript/sdk/src/providers/indexer.ts index 997f803bf018c..1ef67c2c06b6d 100644 --- a/ecosystem/typescript/sdk/src/providers/indexer.ts +++ b/ecosystem/typescript/sdk/src/providers/indexer.ts @@ -20,6 +20,7 @@ import { GetCollectionDataQuery, GetCollectionsWithOwnedTokensQuery, GetTokenCurrentOwnerDataQuery, + GetOwnedTokensByTokenDataQuery, } from "../indexer/generated/operations"; import { GetAccountTokensCount, @@ -41,9 +42,18 @@ import { GetCollectionData, GetCollectionsWithOwnedTokens, GetTokenCurrentOwnerData, + GetOwnedTokensByTokenData, } from "../indexer/generated/queries"; import { ClientConfig, post } from "../client"; import { ApiError } from "./aptos_client"; +import { + Current_Collections_V2_Order_By, + Current_Collection_Ownership_V2_View_Order_By, + Current_Token_Datas_V2_Order_By, + Current_Token_Ownerships_V2_Order_By, + InputMaybe, + Token_Activities_V2_Order_By, +} from "../indexer/generated/types"; /** * Controls the number of results that are returned and the starting position of those results. @@ -58,16 +68,71 @@ export interface IndexerPaginationArgs { limit?: number; } +/** + * Holds a generic type that being passed by each function and holds an + * array of properties we can sort the query by + */ +export type IndexerSortBy = IndexerSortingOptions; + +export type IndexerSortingOptions = { + [K in keyof T]?: T[K] extends InputMaybe + ? IndexerSortingOptions | U | IndexerOrderBy + : T[K] | IndexerOrderBy; +}; + +export type IndexerOrderBy = "asc" | "desc"; + +/** + * Refers to the token standard we want to query for + */ export type TokenStandard = "v1" | "v2"; +/** + * The graphql query type to pass into the `queryIndexer` function + */ export type GraphqlQuery = { query: string; variables?: {}; }; + /** * Provides methods for retrieving data from Aptos Indexer. * For more detailed Queries specification see * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://indexer.mainnet.aptoslabs.com/v1/graphql} + * + * Some methods support optional extra arguments, such as - TokenStandard, IndexerSortBy, IndexerPaginationArgs + * + * @param TokenStandard is of type `v1` or `v2` and it refers to the token standard we want to query for. + * @example An example of how to pass a specific token standard + * ``` + * { + * tokenStandard:"v2" + * } + * ``` + * + * @param IndexerSortBy has a generic type that being passed by each function and holds an + * array of properties we can sort the query by + * @example An example of how to sort by a specific field + * ``` + * { + * orderBy: [{ token_standard: "desc" }] + * } + * ``` + * + * @param IndexerPaginationArgs Controls the number of results that are returned and the starting position + * of those results. + * limit specifies the maximum number of items or records to return in a query result. + * offset parameter specifies the starting position of the query result within the set of data. + * For example, if you want to retrieve records 11-20, + * you would set the offset parameter to 10 (i.e., the index of the first record to retrieve is 10) + * and the limit parameter to 10 (i.e., the number of records to retrieve is 10)) + * + * @example An example of how to set the `limit` and `offset` + * ``` + * { + * { offset: 2, limit: 4 } + * } + * ``` */ export class IndexerClient { readonly endpoint: string; @@ -128,7 +193,11 @@ export class IndexerClient { return this.queryIndexer(graphqlQuery); } + // TOKENS // + /** + * @deprecated please use `getOwnedTokens` query + * * Queries an Aptos account's NFTs by owner address * * @param ownerAddress Hex-encoded 32 byte Aptos account address @@ -149,34 +218,52 @@ export class IndexerClient { } /** - * Queries a token activities by token id hash + * Queries a token activities by token address (v2) or token data id (v1) * - * @param idHash token id hash + * @param idHash token address (v2) or token data id (v1) * @returns GetTokenActivitiesQuery response type */ - async getTokenActivities(idHash: string, options?: IndexerPaginationArgs): Promise { + async getTokenActivities( + token: MaybeHexString, + extraArgs?: { + tokenStandard?: TokenStandard; + options?: IndexerPaginationArgs; + orderBy?: IndexerSortBy[]; + }, + ): Promise { + const tokenAddress = HexString.ensure(token).hex(); + IndexerClient.validateAddress(tokenAddress); + + const whereCondition: any = { + token_data_id: { _eq: tokenAddress }, + }; + + if (extraArgs?.tokenStandard) { + whereCondition.token_standard = { _eq: extraArgs?.tokenStandard }; + } const graphqlQuery = { query: GetTokenActivities, - variables: { idHash, offset: options?.offset, limit: options?.limit }, + variables: { + where_condition: whereCondition, + offset: extraArgs?.options?.offset, + limit: extraArgs?.options?.limit, + order_by: extraArgs?.orderBy, + }, }; + return this.queryIndexer(graphqlQuery); } /** - * Queries an account coin data + * Gets the count of token's activities by token address (v2) or token data id (v1) * - * @param ownerAddress Owner address - * @returns GetAccountCoinsDataQuery response type + * @param token token address (v2) or token data id (v1) + * @returns GetTokenActivitiesCountQuery response type */ - async getAccountCoinsData( - ownerAddress: MaybeHexString, - options?: IndexerPaginationArgs, - ): Promise { - const address = HexString.ensure(ownerAddress).hex(); - IndexerClient.validateAddress(address); + async getTokenActivitiesCount(token: string): Promise { const graphqlQuery = { - query: GetAccountCoinsData, - variables: { owner_address: address, offset: options?.offset, limit: options?.limit }, + query: GetTokenActivitiesCount, + variables: { token_id: token }, }; return this.queryIndexer(graphqlQuery); } @@ -187,103 +274,50 @@ export class IndexerClient { * @param ownerAddress Owner address * @returns AccountTokensCountQuery response type */ - async getAccountTokensCount(ownerAddress: MaybeHexString): Promise { - const address = HexString.ensure(ownerAddress).hex(); - IndexerClient.validateAddress(address); - const graphqlQuery = { - query: GetAccountTokensCount, - variables: { owner_address: address }, + async getAccountTokensCount( + ownerAddress: MaybeHexString, + extraArgs?: { + tokenStandard?: TokenStandard; + options?: IndexerPaginationArgs; + }, + ): Promise { + const whereCondition: any = { + owner_address: { _eq: ownerAddress }, + amount: { _gt: "0" }, }; - return this.queryIndexer(graphqlQuery); - } - /** - * Gets the count of transactions submitted by an account - * - * @param address Account address - * @returns GetAccountTransactionsCountQuery response type - */ - async getAccountTransactionsCount(accountAddress: MaybeHexString): Promise { - const address = HexString.ensure(accountAddress).hex(); - IndexerClient.validateAddress(address); - const graphqlQuery = { - query: GetAccountTransactionsCount, - variables: { address }, - }; - return this.queryIndexer(graphqlQuery); - } + if (extraArgs?.tokenStandard) { + whereCondition.token_standard = { _eq: extraArgs?.tokenStandard }; + } - /** - * Queries an account transactions data - * - * @param address Account address - * @returns GetAccountTransactionsDataQuery response type - */ - async getAccountTransactionsData( - accountAddress: MaybeHexString, - options?: IndexerPaginationArgs, - ): Promise { - const address = HexString.ensure(accountAddress).hex(); + const address = HexString.ensure(ownerAddress).hex(); IndexerClient.validateAddress(address); const graphqlQuery = { - query: GetAccountTransactionsData, - variables: { address, offset: options?.offset, limit: options?.limit }, - }; - return this.queryIndexer(graphqlQuery); - } - - /** - * Queries delegated staking activities - * - * @param delegatorAddress Delegator address - * @param poolAddress Pool address - * @returns GetDelegatedStakingActivitiesQuery response type - */ - async getDelegatedStakingActivities( - delegatorAddress: MaybeHexString, - poolAddress: MaybeHexString, - ): Promise { - const delegator = HexString.ensure(delegatorAddress).hex(); - const pool = HexString.ensure(poolAddress).hex(); - IndexerClient.validateAddress(delegator); - IndexerClient.validateAddress(pool); - const graphqlQuery = { - query: GetDelegatedStakingActivities, + query: GetAccountTokensCount, variables: { - delegatorAddress: delegator, - poolAddress: pool, + where_condition: whereCondition, + offset: extraArgs?.options?.offset, + limit: extraArgs?.options?.limit, }, }; return this.queryIndexer(graphqlQuery); } /** - * Gets the count of token's activities + * Queries token data by token address (v2) or token data id (v1) * - * @param tokenId Token ID - * @returns GetTokenActivitiesCountQuery response type - */ - async getTokenActivitiesCount(tokenId: string): Promise { - const graphqlQuery = { - query: GetTokenActivitiesCount, - variables: { token_id: tokenId }, - }; - return this.queryIndexer(graphqlQuery); - } - - /** - * Queries token data - * - * @param tokenId Token ID address + * @param token token address (v2) or token data id (v1) * @returns GetTokenDataQuery response type */ async getTokenData( - tokenId: string, + token: string, extraArgs?: { tokenStandard?: TokenStandard; + options?: IndexerPaginationArgs; + orderBy?: IndexerSortBy[]; }, ): Promise { - const tokenAddress = HexString.ensure(tokenId).hex(); + const tokenAddress = HexString.ensure(token).hex(); IndexerClient.validateAddress(tokenAddress); const whereCondition: any = { @@ -295,28 +329,37 @@ export class IndexerClient { } const graphqlQuery = { query: GetTokenData, - variables: { where_condition: whereCondition }, + variables: { + where_condition: whereCondition, + offset: extraArgs?.options?.offset, + limit: extraArgs?.options?.limit, + order_by: extraArgs?.orderBy, + }, }; return this.queryIndexer(graphqlQuery); } /** - * Queries token owners data. This query returns historical owners data + * Queries token owners data by token address (v2) or token data id (v1). + * This query returns historical owners data. + * * To fetch token v2 standard, pass in the optional `tokenStandard` parameter and * dont pass `propertyVersion` parameter (as propertyVersion only compatible with v1 standard) * - * @param tokenId Token ID + * @param token token address (v2) or token data id (v1) * @param propertyVersion Property version (optional) - only compatible with token v1 standard * @returns GetTokenOwnersDataQuery response type */ async getTokenOwnersData( - tokenId: string, + token: string, propertyVersion?: number, extraArgs?: { tokenStandard?: TokenStandard; + options?: IndexerPaginationArgs; + orderBy?: IndexerSortBy[]; }, ): Promise { - const tokenAddress = HexString.ensure(tokenId).hex(); + const tokenAddress = HexString.ensure(token).hex(); IndexerClient.validateAddress(tokenAddress); const whereCondition: any = { @@ -333,28 +376,37 @@ export class IndexerClient { const graphqlQuery = { query: GetTokenOwnersData, - variables: { where_condition: whereCondition }, + variables: { + where_condition: whereCondition, + offset: extraArgs?.options?.offset, + limit: extraArgs?.options?.limit, + order_by: extraArgs?.orderBy, + }, }; return this.queryIndexer(graphqlQuery); } /** - * Queries token current owner data. This query returns the current token owner data. + * Queries current token owner data by token address (v2) or token data id (v1). + * This query returns the current token owner data. + * * To fetch token v2 standard, pass in the optional `tokenStandard` parameter and * dont pass `propertyVersion` parameter (as propertyVersion only compatible with v1 standard) * - * @param tokenId Token ID + * @param token token address (v2) or token data id (v1) * @param propertyVersion Property version (optional) - only compatible with token v1 standard * @returns GetTokenCurrentOwnerDataQuery response type */ async getTokenCurrentOwnerData( - tokenId: string, + token: string, propertyVersion?: number, extraArgs?: { tokenStandard?: TokenStandard; + options?: IndexerPaginationArgs; + orderBy?: IndexerSortBy[]; }, ): Promise { - const tokenAddress = HexString.ensure(tokenId).hex(); + const tokenAddress = HexString.ensure(token).hex(); IndexerClient.validateAddress(tokenAddress); const whereCondition: any = { @@ -372,49 +424,12 @@ export class IndexerClient { const graphqlQuery = { query: GetTokenCurrentOwnerData, - variables: { where_condition: whereCondition }, - }; - return this.queryIndexer(graphqlQuery); - } - - /** - * Queries top user transactions - * - * @param limit - * @returns GetTopUserTransactionsQuery response type - */ - async getTopUserTransactions(limit: number): Promise { - const graphqlQuery = { - query: GetTopUserTransactions, - variables: { limit }, - }; - return this.queryIndexer(graphqlQuery); - } - - /** - * Queries top user transactions - * - * @returns GetUserTransactionsQuery response type - */ - async getUserTransactions(startVersion?: number, options?: IndexerPaginationArgs): Promise { - const graphqlQuery = { - query: GetUserTransactions, - variables: { start_version: startVersion, offset: options?.offset, limit: options?.limit }, - }; - return this.queryIndexer(graphqlQuery); - } - - /** - * Queries current number of delegators in a pool - * - * @returns GetNumberOfDelegatorsQuery response type - */ - async getNumberOfDelegators(poolAddress: MaybeHexString): Promise { - const address = HexString.ensure(poolAddress).hex(); - IndexerClient.validateAddress(address); - const graphqlQuery = { - query: GetNumberOfDelegators, - variables: { poolAddress: address }, + variables: { + where_condition: whereCondition, + offset: extraArgs?.options?.offset, + limit: extraArgs?.options?.limit, + order_by: extraArgs?.orderBy, + }, }; return this.queryIndexer(graphqlQuery); } @@ -423,12 +438,7 @@ export class IndexerClient { * Queries account's current owned tokens. * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc. * If you want to get only the token from a specific standrd, you can pass an optional tokenStandard param - * @example An example of how to pass a specific token standard - * ``` - * { - * tokenStandard:"v2" - * } - * ``` + * * @param ownerAddress The token owner address we want to get the tokens for * @returns GetOwnedTokensQuery response type */ @@ -437,6 +447,7 @@ export class IndexerClient { extraArgs?: { tokenStandard?: TokenStandard; options?: IndexerPaginationArgs; + orderBy?: IndexerSortBy[]; }, ): Promise { const address = HexString.ensure(ownerAddress).hex(); @@ -457,6 +468,45 @@ export class IndexerClient { where_condition: whereCondition, offset: extraArgs?.options?.offset, limit: extraArgs?.options?.limit, + order_by: extraArgs?.orderBy, + }, + }; + return this.queryIndexer(graphqlQuery); + } + + /** + * Queries account's current owned tokens by token address (v2) or token data id (v1). + * + * @param token token address (v2) or token data id (v1) + * @returns GetOwnedTokensByTokenDataIdQuery response type + */ + async getOwnedTokensByTokenData( + token: MaybeHexString, + extraArgs?: { + tokenStandard?: TokenStandard; + options?: IndexerPaginationArgs; + orderBy?: IndexerSortBy[]; + }, + ): Promise { + const address = HexString.ensure(token).hex(); + IndexerClient.validateAddress(address); + + const whereCondition: any = { + token_data_id: { _eq: address }, + amount: { _gt: 0 }, + }; + + if (extraArgs?.tokenStandard) { + whereCondition.token_standard = { _eq: extraArgs?.tokenStandard }; + } + + const graphqlQuery = { + query: GetOwnedTokensByTokenData, + variables: { + where_condition: whereCondition, + offset: extraArgs?.options?.offset, + limit: extraArgs?.options?.limit, + order_by: extraArgs?.orderBy, }, }; return this.queryIndexer(graphqlQuery); @@ -475,6 +525,7 @@ export class IndexerClient { extraArgs?: { tokenStandard?: TokenStandard; options?: IndexerPaginationArgs; + orderBy?: IndexerSortBy[]; }, ): Promise { const ownerHexAddress = HexString.ensure(ownerAddress).hex(); @@ -499,6 +550,7 @@ export class IndexerClient { where_condition: whereCondition, offset: extraArgs?.options?.offset, limit: extraArgs?.options?.limit, + order_by: extraArgs?.orderBy, }, }; return this.queryIndexer(graphqlQuery); @@ -543,6 +595,7 @@ export class IndexerClient { extraArgs?: { tokenStandard?: TokenStandard; options?: IndexerPaginationArgs; + orderBy?: IndexerSortBy[]; }, ): Promise { const address = HexString.ensure(creatorAddress).hex(); @@ -563,6 +616,7 @@ export class IndexerClient { where_condition: whereCondition, offset: extraArgs?.options?.offset, limit: extraArgs?.options?.limit, + order_by: extraArgs?.orderBy, }, }; return this.queryIndexer(graphqlQuery); @@ -580,6 +634,7 @@ export class IndexerClient { collectionName: string, extraArgs?: { tokenStandard?: TokenStandard; + orderBy?: IndexerSortBy[]; }, ): Promise { return (await this.getCollectionData(creatorAddress, collectionName, extraArgs)).current_collections_v2[0] @@ -597,6 +652,7 @@ export class IndexerClient { extraArgs?: { tokenStandard?: TokenStandard; options?: IndexerPaginationArgs; + orderBy?: IndexerSortBy[]; }, ): Promise { const ownerHexAddress = HexString.ensure(ownerAddress).hex(); @@ -616,8 +672,136 @@ export class IndexerClient { where_condition: whereCondition, offset: extraArgs?.options?.offset, limit: extraArgs?.options?.limit, + order_by: extraArgs?.orderBy, }, }; return this.queryIndexer(graphqlQuery); } + + // TRANSACTIONS // + + /** + * Gets the count of transactions submitted by an account + * + * @param address Account address + * @returns GetAccountTransactionsCountQuery response type + */ + async getAccountTransactionsCount(accountAddress: MaybeHexString): Promise { + const address = HexString.ensure(accountAddress).hex(); + IndexerClient.validateAddress(address); + const graphqlQuery = { + query: GetAccountTransactionsCount, + variables: { address }, + }; + return this.queryIndexer(graphqlQuery); + } + + /** + * Queries an account transactions data + * + * @param address Account address + * @returns GetAccountTransactionsDataQuery response type + */ + async getAccountTransactionsData( + accountAddress: MaybeHexString, + options?: IndexerPaginationArgs, + ): Promise { + const address = HexString.ensure(accountAddress).hex(); + IndexerClient.validateAddress(address); + const graphqlQuery = { + query: GetAccountTransactionsData, + variables: { address, offset: options?.offset, limit: options?.limit }, + }; + return this.queryIndexer(graphqlQuery); + } + + /** + * Queries top user transactions + * + * @param limit + * @returns GetTopUserTransactionsQuery response type + */ + async getTopUserTransactions(limit: number): Promise { + const graphqlQuery = { + query: GetTopUserTransactions, + variables: { limit }, + }; + return this.queryIndexer(graphqlQuery); + } + + /** + * Queries top user transactions + * + * @returns GetUserTransactionsQuery response type + */ + async getUserTransactions(startVersion?: number, options?: IndexerPaginationArgs): Promise { + const graphqlQuery = { + query: GetUserTransactions, + variables: { start_version: startVersion, offset: options?.offset, limit: options?.limit }, + }; + return this.queryIndexer(graphqlQuery); + } + + // STAKING // + + /** + * Queries delegated staking activities + * + * @param delegatorAddress Delegator address + * @param poolAddress Pool address + * @returns GetDelegatedStakingActivitiesQuery response type + */ + async getDelegatedStakingActivities( + delegatorAddress: MaybeHexString, + poolAddress: MaybeHexString, + ): Promise { + const delegator = HexString.ensure(delegatorAddress).hex(); + const pool = HexString.ensure(poolAddress).hex(); + IndexerClient.validateAddress(delegator); + IndexerClient.validateAddress(pool); + const graphqlQuery = { + query: GetDelegatedStakingActivities, + variables: { + delegatorAddress: delegator, + poolAddress: pool, + }, + }; + return this.queryIndexer(graphqlQuery); + } + + /** + * Queries current number of delegators in a pool + * + * @returns GetNumberOfDelegatorsQuery response type + */ + async getNumberOfDelegators(poolAddress: MaybeHexString): Promise { + const address = HexString.ensure(poolAddress).hex(); + IndexerClient.validateAddress(address); + const graphqlQuery = { + query: GetNumberOfDelegators, + variables: { poolAddress: address }, + }; + return this.queryIndexer(graphqlQuery); + } + + // ACCOUNT // + + /** + * Queries an account coin data + * + * @param ownerAddress Owner address + * @returns GetAccountCoinsDataQuery response type + */ + async getAccountCoinsData( + ownerAddress: MaybeHexString, + options?: IndexerPaginationArgs, + ): Promise { + const address = HexString.ensure(ownerAddress).hex(); + IndexerClient.validateAddress(address); + const graphqlQuery = { + query: GetAccountCoinsData, + variables: { owner_address: address, offset: options?.offset, limit: options?.limit }, + }; + return this.queryIndexer(graphqlQuery); + } } diff --git a/ecosystem/typescript/sdk/src/tests/e2e/aptos_client.test.ts b/ecosystem/typescript/sdk/src/tests/e2e/aptos_client.test.ts index 65bd3936a235c..b9483639d3be6 100644 --- a/ecosystem/typescript/sdk/src/tests/e2e/aptos_client.test.ts +++ b/ecosystem/typescript/sdk/src/tests/e2e/aptos_client.test.ts @@ -49,28 +49,32 @@ test("gets genesis resources", async () => { expect(accountResource).toBeDefined(); }); -test("gets object", async () => { - const alice = new AptosAccount(); - const faucetClient = getFaucetClient(); - await faucetClient.fundAccount(alice.address(), 100000000); - - const provider = new Provider({ - fullnodeUrl: NODE_URL, - indexerUrl: NODE_URL, - }); - const aptosToken = new AptosToken(provider); - - const txn = await provider.waitForTransactionWithResult( - await aptosToken.createCollection(alice, "Alice's simple collection", "AliceCollection", "https://aptos.dev"), - { checkSuccess: true }, - ); - const objectAddress = ((txn as Gen.UserTransaction).changes[0] as WriteSetChange_WriteResource).address; // should be the new object address - - const object = await provider.getAccountResource(objectAddress, "0x4::aptos_token::AptosCollection"); - - expect(object.type).toBeDefined(); - expect(object.data).toBeDefined(); -}); +test( + "gets object", + async () => { + const alice = new AptosAccount(); + const faucetClient = getFaucetClient(); + await faucetClient.fundAccount(alice.address(), 100000000); + + const provider = new Provider({ + fullnodeUrl: NODE_URL, + indexerUrl: NODE_URL, + }); + const aptosToken = new AptosToken(provider); + + const txn = await provider.waitForTransactionWithResult( + await aptosToken.createCollection(alice, "Alice's simple collection", "AliceCollection", "https://aptos.dev"), + { checkSuccess: true }, + ); + const objectAddress = ((txn as Gen.UserTransaction).changes[0] as WriteSetChange_WriteResource).address; // should be the new object address + + const object = await provider.getAccountResource(objectAddress, "0x4::aptos_token::AptosCollection"); + + expect(object.type).toBeDefined(); + expect(object.data).toBeDefined(); + }, + longTestTimeout, +); test("gets the Account resource", async () => { const client = new AptosClient(NODE_URL); diff --git a/ecosystem/typescript/sdk/src/tests/e2e/indexer.test.ts b/ecosystem/typescript/sdk/src/tests/e2e/indexer.test.ts index 38edbebd3f5c9..be031715b01d2 100644 --- a/ecosystem/typescript/sdk/src/tests/e2e/indexer.test.ts +++ b/ecosystem/typescript/sdk/src/tests/e2e/indexer.test.ts @@ -27,19 +27,19 @@ describe("Indexer", () => { it("should throw an error when account address is not valid", async () => { const address1 = "702ca08576f66393140967fef983bb6bf160dafeb73de9c4ddac4d2dc"; expect(async () => { - await indexerClient.getAccountNFTs(address1); + await indexerClient.getOwnedTokens(address1); }).rejects.toThrow(`${address1} is less than 66 chars long.`); const address2 = "0x702ca08576f66393140967fef983bb6bf160dafeb73de9c4ddac4d2dc"; expect(async () => { - await indexerClient.getAccountNFTs(address2); + await indexerClient.getOwnedTokens(address2); }).rejects.toThrow(`${address2} is less than 66 chars long.`); }); it("should not throw an error when account address is missing 0x", async () => { const address = "790a34c702ca08576f66393140967fef983bb6bf160dafeb73de9c4ddac4d2dc"; expect(async () => { - await indexerClient.getAccountNFTs(address); + await indexerClient.getOwnedTokens(address); }).not.toThrow(); }); @@ -55,11 +55,13 @@ describe("Indexer", () => { console.log(`\n fullnode chain id and indexer chain id are not synced, skipping rest of tests`); skipTest = true; runTests = describe.skip; + } else { + console.log(`\n fullnode chain id and indexer chain id are in synced, running tests`); } if (!skipTest) { await faucetClient.fundAccount(alice.address(), 100000000); - // Create collection and token on Alice's account + // Create collection and token V1 on Alice's account await provider.waitForTransaction( await tokenClient.createCollection(alice, collectionName, "Alice's simple collection", "https://aptos.dev"), { checkSuccess: true }, @@ -84,6 +86,7 @@ describe("Indexer", () => { { checkSuccess: true }, ); + // Create collection and token V2 on Alice's account await provider.waitForTransaction( await aptosToken.createCollection( alice, @@ -121,114 +124,205 @@ describe("Indexer", () => { await sleep(1000); }); + it("gets indexer ledger info", async () => { + const ledgerInfo = await indexerClient.getIndexerLedgerInfo(); + expect(ledgerInfo.ledger_infos[0].chain_id).toBeGreaterThan(1); + }); + + // TOKENS // + it( - "gets account NFTs", + "gets token activities", async () => { - const accountNFTs = await indexerClient.getAccountNFTs(alice.address().hex()); - expect(accountNFTs.current_token_ownerships).toHaveLength(1); - expect(accountNFTs.current_token_ownerships[0]).toHaveProperty("current_token_data"); - expect(accountNFTs.current_token_ownerships[0]).toHaveProperty("current_collection_data"); - expect(accountNFTs.current_token_ownerships[0].current_token_data?.name).toBe("Alice Token"); + const accountTokens = await indexerClient.getOwnedTokens(alice.address().hex()); + expect(accountTokens.current_token_ownerships_v2).toHaveLength(2); + // V1 + const tokenActivityV1 = await indexerClient.getTokenActivities( + accountTokens.current_token_ownerships_v2[0].current_token_data!.token_data_id, + ); + expect(tokenActivityV1.token_activities_v2).toHaveLength(2); + + expect(tokenActivityV1.token_activities_v2[0].token_standard).toEqual("v1"); + expect(tokenActivityV1.token_activities_v2[0].from_address).toEqual(alice.address().hex()); + + expect(tokenActivityV1.token_activities_v2[1].token_standard).toEqual("v1"); + expect(tokenActivityV1.token_activities_v2[1].to_address).toEqual(alice.address().hex()); + // V2 + const tokenActivityV2 = await indexerClient.getTokenActivities( + accountTokens.current_token_ownerships_v2[1].current_token_data!.token_data_id, + ); + expect(tokenActivityV2.token_activities_v2).toHaveLength(1); + expect(tokenActivityV2.token_activities_v2[0].token_standard).toEqual("v2"); + expect(tokenActivityV2.token_activities_v2[0].from_address).toEqual(alice.address().hex()); }, longTestTimeout, ); it( - "gets token activities", + "gets token activities count", async () => { - const accountNFTs = await indexerClient.getAccountNFTs(alice.address().hex()); - const tokenActivity = await indexerClient.getTokenActivities( - accountNFTs.current_token_ownerships[0].current_token_data!.token_data_id_hash, + const accountTokens = await indexerClient.getOwnedTokens(alice.address().hex(), { + orderBy: [{ last_transaction_version: "desc" }], + }); + expect(accountTokens.current_token_ownerships_v2[0].token_standard).toBe("v2"); + expect(accountTokens.current_token_ownerships_v2[1].token_standard).toBe("v1"); + const tokenActivitiesV2Count = await indexerClient.getTokenActivitiesCount( + accountTokens.current_token_ownerships_v2[0].current_token_data!.token_data_id, + ); + expect(tokenActivitiesV2Count.token_activities_v2_aggregate.aggregate?.count).toBe(1); + const tokenActivitiesV1Count = await indexerClient.getTokenActivitiesCount( + accountTokens.current_token_ownerships_v2[1].current_token_data!.token_data_id, ); - expect(tokenActivity.token_activities).toHaveLength(2); - expect(tokenActivity.token_activities[0]).toHaveProperty("from_address"); - expect(tokenActivity.token_activities[0]).toHaveProperty("to_address"); + expect(tokenActivitiesV1Count.token_activities_v2_aggregate.aggregate?.count).toBe(2); }, longTestTimeout, ); it( - "gets account coin data", + "gets account token count", async () => { - const accountCoinData = await indexerClient.getAccountCoinsData(alice.address().hex()); - expect(accountCoinData.current_coin_balances[0].coin_type).toEqual("0x1::aptos_coin::AptosCoin"); + const accountTokenCount = await indexerClient.getAccountTokensCount(alice.address().hex()); + expect(accountTokenCount.current_token_ownerships_v2_aggregate.aggregate?.count).toEqual(2); }, longTestTimeout, ); it( - "gets account token count", + "gets token data", async () => { - const accountTokenCount = await indexerClient.getAccountTokensCount(alice.address().hex()); - expect(accountTokenCount.current_token_ownerships_aggregate.aggregate?.count).toEqual(1); + const accountTokens = await indexerClient.getOwnedTokens(alice.address().hex()); + const tokenData = await indexerClient.getTokenData( + accountTokens.current_token_ownerships_v2[0].current_token_data!.token_data_id, + ); + expect(tokenData.current_token_datas_v2[0].token_standard).toEqual("v1"); + expect(tokenData.current_token_datas_v2[0].token_name).toEqual(tokenName); }, longTestTimeout, ); it( - "gets account transactions count", + "gets token owners data", async () => { - const accountTransactionsCount = await indexerClient.getAccountTransactionsCount(alice.address().hex()); - expect(accountTransactionsCount.move_resources_aggregate.aggregate?.count).toEqual(5); + const accountTokens = await indexerClient.getOwnedTokens(alice.address().hex()); + const tokenOwnersData = await indexerClient.getTokenOwnersData( + accountTokens.current_token_ownerships_v2[0].current_token_data!.token_data_id, + 0, + ); + expect(tokenOwnersData.current_token_ownerships_v2[0].owner_address).toEqual(alice.address().hex()); }, longTestTimeout, ); it( - "gets account transactions data", + "gets token current owner data", async () => { - const accountTransactionsData = await indexerClient.getAccountTransactionsData(alice.address().hex()); - expect(accountTransactionsData.move_resources[0]).toHaveProperty("transaction_version"); + const accountTokens = await indexerClient.getOwnedTokens(alice.address().hex()); + const tokenOwnersData = await indexerClient.getTokenCurrentOwnerData( + accountTokens.current_token_ownerships_v2[0].current_token_data!.token_data_id, + 0, + ); + expect(tokenOwnersData.current_token_ownerships_v2[0].owner_address).toEqual(alice.address().hex()); }, longTestTimeout, ); + it("gets account owned tokens", async () => { + const tokens = await indexerClient.getOwnedTokens(alice.address().hex()); + expect(tokens.current_token_ownerships_v2.length).toEqual(2); + }); + + it("gets account owned tokens by token data id", async () => { + const accountTokens = await indexerClient.getOwnedTokens(alice.address().hex()); + + const tokens = await indexerClient.getOwnedTokensByTokenData( + accountTokens.current_token_ownerships_v2[0].current_token_data!.token_data_id, + ); + expect(tokens.current_token_ownerships_v2).toHaveLength(1); + expect(tokens.current_token_ownerships_v2[0].owner_address).toEqual(alice.address().hex()); + }); + + it("gets account tokens owned from collection address", async () => { + const collectionAddress = await indexerClient.getCollectionAddress(alice.address().hex(), collectionNameV2); + const tokensFromCollectionAddress = await indexerClient.getTokenOwnedFromCollectionAddress( + alice.address().hex(), + collectionAddress, + ); + expect(tokensFromCollectionAddress.current_token_ownerships_v2[0].current_token_data!.token_name).toEqual( + tokenName, + ); + }); + it( - "gets token activities count", + "gets account current tokens by collection name and creator address", async () => { - const accountNFTs = await indexerClient.getAccountNFTs(alice.address().hex()); - const tokenActivitiesCount = await indexerClient.getTokenActivitiesCount( - accountNFTs.current_token_ownerships[0].current_token_data!.token_data_id_hash, + const tokens = await indexerClient.getTokenOwnedFromCollectionNameAndCreatorAddress( + alice.address().hex(), + collectionNameV2, + alice.address().hex(), ); - expect(tokenActivitiesCount.token_activities_aggregate.aggregate?.count).toBe(2); + expect(tokens.current_token_ownerships_v2).toHaveLength(1); + expect(tokens.current_token_ownerships_v2[0].current_token_data?.token_name).toEqual(tokenName); }, longTestTimeout, ); it( - "gets token data", + "returns same result for getTokenOwnedFromCollectionNameAndCreatorAddress and getTokenOwnedFromCollectionAddress", async () => { - const accountNFTs = await indexerClient.getAccountNFTs(alice.address().hex()); - const tokenData = await indexerClient.getTokenData( - accountNFTs.current_token_ownerships[0].current_token_data!.token_data_id_hash, + const collectionAddress = await indexerClient.getCollectionAddress(alice.address().hex(), collectionNameV2); + const tokensFromCollectionAddress = await indexerClient.getTokenOwnedFromCollectionAddress( + alice.address().hex(), + collectionAddress, + ); + const tokensFromNameAndCreatorAddress = await indexerClient.getTokenOwnedFromCollectionNameAndCreatorAddress( + alice.address().hex(), + collectionNameV2, + alice.address().hex(), + ); + + expect(tokensFromCollectionAddress.current_token_ownerships_v2).toEqual( + tokensFromNameAndCreatorAddress.current_token_ownerships_v2, ); - expect(tokenData.current_token_datas_v2[0].token_name).toEqual("Alice Token"); }, longTestTimeout, ); + it("gets the collection data", async () => { + const collectionData = await indexerClient.getCollectionData(alice.address().hex(), collectionName); + expect(collectionData.current_collections_v2).toHaveLength(1); + expect(collectionData.current_collections_v2[0].collection_name).toEqual(collectionName); + }); + + it("gets the currect collection address", async () => { + const collectionData = await indexerClient.getCollectionData(alice.address().hex(), collectionNameV2); + const collectionAddress = await indexerClient.getCollectionAddress(alice.address().hex(), collectionNameV2); + expect(collectionData.current_collections_v2[0].collection_id).toEqual(collectionAddress); + }); + it( - "gets token owners data", + "queries for all collections that an account has tokens for", async () => { - const accountNFTs = await indexerClient.getAccountNFTs(alice.address().hex()); - const tokenOwnersData = await indexerClient.getTokenOwnersData( - accountNFTs.current_token_ownerships[0].current_token_data!.token_data_id_hash, - 0, - ); - expect(tokenOwnersData.current_token_ownerships_v2[0].owner_address).toEqual(alice.address().hex()); + const collections = await indexerClient.getCollectionsWithOwnedTokens(alice.address().hex()); + expect(collections.current_collection_ownership_v2_view.length).toEqual(2); }, longTestTimeout, ); + // TRANSACTIONS // it( - "gets token current owner data", + "gets account transactions count", async () => { - const accountNFTs = await indexerClient.getAccountNFTs(alice.address().hex()); - const tokenOwnersData = await indexerClient.getTokenCurrentOwnerData( - accountNFTs.current_token_ownerships[0].current_token_data!.token_data_id_hash, - 0, - ); - expect(tokenOwnersData.current_token_ownerships_v2[0].owner_address).toEqual(alice.address().hex()); + const accountTransactionsCount = await indexerClient.getAccountTransactionsCount(alice.address().hex()); + expect(accountTransactionsCount.move_resources_aggregate.aggregate?.count).toEqual(5); + }, + longTestTimeout, + ); + + it( + "gets account transactions data", + async () => { + const accountTransactionsData = await indexerClient.getAccountTransactionsData(alice.address().hex()); + expect(accountTransactionsData.move_resources[0]).toHaveProperty("transaction_version"); }, longTestTimeout, ); @@ -259,34 +353,24 @@ describe("Indexer", () => { }, longTestTimeout, ); + // ACCOUNT // - it("gets indexer ledger info", async () => { - const ledgerInfo = await indexerClient.getIndexerLedgerInfo(); - expect(ledgerInfo.ledger_infos[0].chain_id).toBeGreaterThan(1); - }); + it( + "gets account coin data", + async () => { + const accountCoinData = await indexerClient.getAccountCoinsData(alice.address().hex()); + expect(accountCoinData.current_coin_balances[0].coin_type).toEqual("0x1::aptos_coin::AptosCoin"); + }, + longTestTimeout, + ); - it("gets account current tokens", async () => { - const tokens = await indexerClient.getOwnedTokens(alice.address().hex()); - expect(tokens.current_token_ownerships_v2).toHaveLength(2); - }); + // TOKEN STANDARD FILTER // - it("gets account current tokens from a specified token standard", async () => { + it("gets account owned tokens with a specified token standard", async () => { const tokens = await indexerClient.getOwnedTokens(alice.address().hex(), { tokenStandard: "v2" }); expect(tokens.current_token_ownerships_v2).toHaveLength(1); }); - it("gets the collection data", async () => { - const collectionData = await indexerClient.getCollectionData(alice.address().hex(), collectionName); - expect(collectionData.current_collections_v2).toHaveLength(1); - expect(collectionData.current_collections_v2[0].collection_name).toEqual(collectionName); - }); - - it("gets the currect collection address", async () => { - const collectionData = await indexerClient.getCollectionData(alice.address().hex(), collectionNameV2); - const collectionAddress = await indexerClient.getCollectionAddress(alice.address().hex(), collectionNameV2); - expect(collectionData.current_collections_v2[0].collection_id).toEqual(collectionAddress); - }); - it( "gets account current tokens of a specific collection by the collection address with token standard specified", async () => { @@ -304,36 +388,6 @@ describe("Indexer", () => { longTestTimeout, ); - it( - "returns same result for getTokenOwnedFromCollectionNameAndCreatorAddress and getTokenOwnedFromCollectionAddress", - async () => { - const collectionAddress = await indexerClient.getCollectionAddress(alice.address().hex(), collectionNameV2); - const tokensFromCollectionAddress = await indexerClient.getTokenOwnedFromCollectionAddress( - alice.address().hex(), - collectionAddress, - ); - const tokensFromNameAndCreatorAddress = await indexerClient.getTokenOwnedFromCollectionNameAndCreatorAddress( - alice.address().hex(), - collectionNameV2, - alice.address().hex(), - ); - - expect(tokensFromCollectionAddress.current_token_ownerships_v2).toEqual( - tokensFromNameAndCreatorAddress.current_token_ownerships_v2, - ); - }, - longTestTimeout, - ); - - it( - "queries for all collections that an account has tokens for", - async () => { - const collections = await indexerClient.getCollectionsWithOwnedTokens(alice.address().hex()); - expect(collections.current_collection_ownership_v2_view.length).toEqual(2); - }, - longTestTimeout, - ); - it( "queries for all v2 collections that an account has tokens for", async () => { @@ -344,5 +398,38 @@ describe("Indexer", () => { }, longTestTimeout, ); + + // ORDER BY // + + it("gets account owned tokens sorted desc by token standard", async () => { + const tokens = await indexerClient.getOwnedTokens(alice.address().hex(), { + orderBy: [{ token_standard: "desc" }], + }); + expect(tokens.current_token_ownerships_v2).toHaveLength(2); + expect(tokens.current_token_ownerships_v2[0].token_standard).toEqual("v2"); + }); + + it("gets account owned tokens sorted desc by collection name", async () => { + const tokens = await indexerClient.getOwnedTokens(alice.address().hex(), { + orderBy: [{ current_token_data: { current_collection: { collection_name: "desc" } } }], + }); + expect(tokens.current_token_ownerships_v2).toHaveLength(2); + expect(tokens.current_token_ownerships_v2[0].token_standard).toEqual("v2"); + }); + + it("gets token activities sorted desc by collection name", async () => { + const accountTokens = await indexerClient.getOwnedTokens(alice.address().hex()); + expect(accountTokens.current_token_ownerships_v2).toHaveLength(2); + expect(accountTokens.current_token_ownerships_v2[0].token_standard).toEqual("v1"); + + const tokens = await indexerClient.getTokenActivities( + accountTokens.current_token_ownerships_v2[0].current_token_data!.token_data_id, + { + orderBy: [{ transaction_version: "desc" }], + }, + ); + expect(tokens.token_activities_v2).toHaveLength(2); + expect(tokens.token_activities_v2[0].token_standard).toEqual("v1"); + }); }); }); diff --git a/ecosystem/typescript/sdk/src/transactions/tests/account_sequence_number.test.ts b/ecosystem/typescript/sdk/src/transactions/tests/account_sequence_number.test.ts index cb89711c1fc94..8de80b28c291c 100644 --- a/ecosystem/typescript/sdk/src/transactions/tests/account_sequence_number.test.ts +++ b/ecosystem/typescript/sdk/src/transactions/tests/account_sequence_number.test.ts @@ -24,11 +24,15 @@ describe("account sequence number", () => { getAccountSpy.mockRestore(); }); - it("initializes with correct sequence number", async () => { - await accountSequenceNumber.initialize(); - expect(accountSequenceNumber.currentNumber).toEqual(BigInt(0)); - expect(accountSequenceNumber.lastUncommintedNumber).toEqual(BigInt(0)); - }); + it( + "initializes with correct sequence number", + async () => { + await accountSequenceNumber.initialize(); + expect(accountSequenceNumber.currentNumber).toEqual(BigInt(0)); + expect(accountSequenceNumber.lastUncommintedNumber).toEqual(BigInt(0)); + }, + longTestTimeout, + ); it("updates with correct sequence number", async () => { const seqNum = "2"; @@ -71,16 +75,20 @@ describe("account sequence number", () => { longTestTimeout, ); - it("synchronize completes when local and on-chain sequnec number equal", async () => { - const nextSequenceNumber = lastSeqNumber! + BigInt(1); + it( + "synchronize completes when local and on-chain sequnec number equal", + async () => { + const nextSequenceNumber = lastSeqNumber! + BigInt(1); - getAccountSpy.mockResolvedValue({ - sequence_number: nextSequenceNumber + "", - authentication_key: account.authKey().hex(), - }); + getAccountSpy.mockResolvedValue({ + sequence_number: nextSequenceNumber + "", + authentication_key: account.authKey().hex(), + }); - expect(accountSequenceNumber.currentNumber).not.toEqual(lastSeqNumber); - await accountSequenceNumber.synchronize(); - expect(accountSequenceNumber.currentNumber).toEqual(nextSequenceNumber); - }); + expect(accountSequenceNumber.currentNumber).not.toEqual(lastSeqNumber); + await accountSequenceNumber.synchronize(); + expect(accountSequenceNumber.currentNumber).toEqual(nextSequenceNumber); + }, + longTestTimeout, + ); }); diff --git a/ecosystem/typescript/sdk/src/transactions/tests/transaction_worker.test.ts b/ecosystem/typescript/sdk/src/transactions/tests/transaction_worker.test.ts index d333038d03ed7..27c3f7b56cb0a 100644 --- a/ecosystem/typescript/sdk/src/transactions/tests/transaction_worker.test.ts +++ b/ecosystem/typescript/sdk/src/transactions/tests/transaction_worker.test.ts @@ -17,24 +17,32 @@ describe("transactionWorker", () => { await faucet.fundAccount(sender.address(), 1000000000); }); - test("throws when starting an already started worker", async () => { - // start transactions worker - const transactionWorker = new TransactionWorker(provider, sender); - transactionWorker.start(); - expect(async () => { + test( + "throws when starting an already started worker", + async () => { + // start transactions worker + const transactionWorker = new TransactionWorker(provider, sender); transactionWorker.start(); - }).rejects.toThrow(`worker has already started`); - }); + expect(async () => { + transactionWorker.start(); + }).rejects.toThrow(`worker has already started`); + }, + longTestTimeout, + ); - test("throws when stopping an already stopped worker", async () => { - // start transactions worker - const transactionWorker = new TransactionWorker(provider, sender); - transactionWorker.start(); - transactionWorker.stop(); - expect(async () => { + test( + "throws when stopping an already stopped worker", + async () => { + // start transactions worker + const transactionWorker = new TransactionWorker(provider, sender); + transactionWorker.start(); transactionWorker.stop(); - }).rejects.toThrow(`worker has already stopped`); - }); + expect(async () => { + transactionWorker.stop(); + }).rejects.toThrow(`worker has already stopped`); + }, + longTestTimeout, + ); test( "adds transaction into the transactionsQueue",