diff --git a/.changeset/clever-crews-explode.md b/.changeset/clever-crews-explode.md new file mode 100644 index 00000000000..89d4f6f881f --- /dev/null +++ b/.changeset/clever-crews-explode.md @@ -0,0 +1,9 @@ +--- +'@iota/graphql-transport': minor +'@iota/iota-sdk': minor +--- + +Aligns the Typescript SDK for the "fixed gas price" protocol changes: + +- Add typing support for IotaChangeEpochV2 (computationCharge, computationChargeBurned). +- Add Typescript SDK client support for versioned IotaSystemStateSummary. diff --git a/apps/explorer/src/hooks/useSearch.ts b/apps/explorer/src/hooks/useSearch.ts index c73650e7e2b..d9fb4a88d3f 100644 --- a/apps/explorer/src/hooks/useSearch.ts +++ b/apps/explorer/src/hooks/useSearch.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClientQuery, useIotaClient } from '@iota/dapp-kit'; -import { type IotaClient, type IotaSystemStateSummary } from '@iota/iota-sdk/client'; +import { type IotaSystemStateSummaryV1, type IotaClient } from '@iota/iota-sdk/client'; import { isValidTransactionDigest, isValidIotaAddress, @@ -102,18 +102,18 @@ const getResultsForAddress = async (client: IotaClient, query: string): Promise< // Query for validator by pool id or iota address. const getResultsForValidatorByPoolIdOrIotaAddress = async ( - systemStateSummery: IotaSystemStateSummary | null, + systemStateSummary: IotaSystemStateSummaryV1 | null, query: string, ): Promise => { const normalized = normalizeIotaObjectId(query); if ( (!isValidIotaAddress(normalized) && !isValidIotaObjectId(normalized)) || - !systemStateSummery + !systemStateSummary ) return null; // find validator by pool id or iota address - const validator = systemStateSummery.activeValidators?.find( + const validator = systemStateSummary.activeValidators?.find( ({ stakingPoolId, iotaAddress }) => stakingPoolId === normalized || iotaAddress === query, ); @@ -130,7 +130,7 @@ const getResultsForValidatorByPoolIdOrIotaAddress = async ( export function useSearch(query: string): UseQueryResult { const client = useIotaClient(); - const { data: systemStateSummery } = useIotaClientQuery('getLatestIotaSystemState'); + const { data: systemStateSummary } = useIotaClientQuery('getLatestIotaSystemState'); return useQuery({ // eslint-disable-next-line @tanstack/query/exhaustive-deps @@ -142,7 +142,7 @@ export function useSearch(query: string): UseQueryResult { getResultsForCheckpoint(client, query), getResultsForAddress(client, query), getResultsForObject(client, query), - getResultsForValidatorByPoolIdOrIotaAddress(systemStateSummery || null, query), + getResultsForValidatorByPoolIdOrIotaAddress(systemStateSummary || null, query), ]) ).filter( (r) => r.status === 'fulfilled' && r.value, diff --git a/apps/explorer/src/pages/validator/ValidatorDetails.tsx b/apps/explorer/src/pages/validator/ValidatorDetails.tsx index d491edac6da..b3d01e1dd2c 100644 --- a/apps/explorer/src/pages/validator/ValidatorDetails.tsx +++ b/apps/explorer/src/pages/validator/ValidatorDetails.tsx @@ -4,7 +4,7 @@ import { useGetValidatorsApy, useGetValidatorsEvents } from '@iota/core'; import { useIotaClientQuery } from '@iota/dapp-kit'; -import { type IotaSystemStateSummary } from '@iota/iota-sdk/client'; +import { type IotaSystemStateSummaryV1 } from '@iota/iota-sdk/client'; import { useMemo } from 'react'; import { useParams } from 'react-router-dom'; import { PageLayout, ValidatorMeta, ValidatorStats } from '~/components'; @@ -14,7 +14,7 @@ import { InfoBox, InfoBoxStyle, InfoBoxType, LoadingIndicator } from '@iota/apps import { Warning } from '@iota/apps-ui-icons'; const getAtRiskRemainingEpochs = ( - data: IotaSystemStateSummary | undefined, + data: IotaSystemStateSummaryV1 | undefined, validatorId: string | undefined, ): number | null => { if (!data || !validatorId) return null; diff --git a/apps/wallet-dashboard/app/(protected)/staking/page.tsx b/apps/wallet-dashboard/app/(protected)/staking/page.tsx index f95d3ae4dbe..12d0b58c2c0 100644 --- a/apps/wallet-dashboard/app/(protected)/staking/page.tsx +++ b/apps/wallet-dashboard/app/(protected)/staking/page.tsx @@ -36,7 +36,7 @@ import { useFormatCoin, } from '@iota/core'; import { useCurrentAccount, useIotaClient, useIotaClientQuery } from '@iota/dapp-kit'; -import { IotaSystemStateSummary } from '@iota/iota-sdk/client'; +import { IotaSystemStateSummaryV1 } from '@iota/iota-sdk/client'; import { Info } from '@iota/apps-ui-icons'; import { useMemo } from 'react'; import { IotaSignAndExecuteTransactionOutput } from '@iota/wallet-standard'; @@ -44,7 +44,7 @@ import { IotaSignAndExecuteTransactionOutput } from '@iota/wallet-standard'; function StakingDashboardPage(): React.JSX.Element { const account = useCurrentAccount(); const { data: system } = useIotaClientQuery('getLatestIotaSystemState'); - const activeValidators = (system as IotaSystemStateSummary)?.activeValidators; + const activeValidators = (system as IotaSystemStateSummaryV1)?.activeValidators; const iotaClient = useIotaClient(); const { diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 3ad2792cd72..dea8b5b7bd4 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -20,4 +20,4 @@ packages: - "!sdk/typescript/utils" - "!sdk/typescript/verify" - "!sdk/move-bytecode-template/pkg" - - "!sdk/typescript/graphql/schemas/2024.11" + - "!sdk/typescript/graphql/schemas/2025.2" diff --git a/sdk/graphql-transport/codegen.ts b/sdk/graphql-transport/codegen.ts index 2aa95545840..14d2d727fcf 100644 --- a/sdk/graphql-transport/codegen.ts +++ b/sdk/graphql-transport/codegen.ts @@ -13,7 +13,7 @@ const header = ` const config: CodegenConfig = { overwrite: true, - schema: '../typescript/src/graphql/generated/2024.11/schema.graphql', + schema: '../typescript/src/graphql/generated/2025.2/schema.graphql', documents: ['src/queries/*.graphql'], ignoreNoDocuments: true, generates: { diff --git a/sdk/graphql-transport/src/generated/queries.ts b/sdk/graphql-transport/src/generated/queries.ts index 8722a7bd4a6..6f36e941e06 100644 --- a/sdk/graphql-transport/src/generated/queries.ts +++ b/sdk/graphql-transport/src/generated/queries.ts @@ -512,6 +512,67 @@ export type ChangeEpochTransactionSystemPackagesArgs = { last?: InputMaybe; }; +/** + * A system transaction that updates epoch information on-chain (increments the + * current epoch). Executed by the system once per epoch, without using gas. + * Epoch change transactions cannot be submitted by users, because validators + * will refuse to sign them. + */ +export type ChangeEpochTransactionV2 = { + __typename?: 'ChangeEpochTransactionV2'; + /** + * The total amount of gas charged for computation during the previous + * epoch (in NANOS). + */ + computationCharge: Scalars['BigInt']['output']; + /** + * The total amount of gas burned for computation during the previous + * epoch (in NANOS). + */ + computationChargeBurned: Scalars['BigInt']['output']; + /** The next (to become) epoch. */ + epoch?: Maybe; + /** + * The total gas retained from storage fees, that will not be returned by + * storage rebates when the relevant objects are cleaned up (in NANOS). + */ + nonRefundableStorageFee: Scalars['BigInt']['output']; + /** The protocol version in effect in the new epoch. */ + protocolVersion: Scalars['UInt53']['output']; + /** Time at which the next epoch will start. */ + startTimestamp: Scalars['DateTime']['output']; + /** + * The total amount of gas charged for storage during the previous epoch + * (in NANOS). + */ + storageCharge: Scalars['BigInt']['output']; + /** + * The IOTA returned to transaction senders for cleaning up objects (in + * NANOS). + */ + storageRebate: Scalars['BigInt']['output']; + /** + * System packages (specifically framework and move stdlib) that are + * written before the new epoch starts, to upgrade them on-chain. + * Validators write these packages out when running the transaction. + */ + systemPackages: MovePackageConnection; +}; + + +/** + * A system transaction that updates epoch information on-chain (increments the + * current epoch). Executed by the system once per epoch, without using gas. + * Epoch change transactions cannot be submitted by users, because validators + * will refuse to sign them. + */ +export type ChangeEpochTransactionV2SystemPackagesArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + /** * Checkpoints contain finalized transactions and are used for node * synchronization and global transaction ordering. @@ -1232,7 +1293,7 @@ export type EndOfEpochTransactionTransactionsArgs = { last?: InputMaybe; }; -export type EndOfEpochTransactionKind = AuthenticatorStateCreateTransaction | AuthenticatorStateExpireTransaction | BridgeCommitteeInitTransaction | BridgeStateCreateTransaction | ChangeEpochTransaction; +export type EndOfEpochTransactionKind = AuthenticatorStateCreateTransaction | AuthenticatorStateExpireTransaction | BridgeCommitteeInitTransaction | BridgeStateCreateTransaction | ChangeEpochTransaction | ChangeEpochTransactionV2; export type EndOfEpochTransactionKindConnection = { __typename?: 'EndOfEpochTransactionKindConnection'; @@ -1553,7 +1614,7 @@ export type GasCostSummary = { __typename?: 'GasCostSummary'; /** Gas paid for executing this transaction (in NANOS). */ computationCost?: Maybe; - /** Gas burned for executing this transactions (in NANOS). */ + /** Gas burned for executing this transaction (in NANOS). */ computationCostBurned?: Maybe; /** * Part of storage cost that is not reclaimed when data created by this @@ -5115,7 +5176,7 @@ export type GetCheckpointQueryVariables = Exact<{ }>; -export type GetCheckpointQuery = { __typename?: 'Query', checkpoint?: { __typename?: 'Checkpoint', digest: string, networkTotalTransactions?: any | null, previousCheckpointDigest?: string | null, sequenceNumber: any, timestamp: any, validatorSignatures: any, epoch?: { __typename?: 'Epoch', epochId: any } | null, rollingGasSummary?: { __typename?: 'GasCostSummary', computationCost?: any | null, computationCostBurned?: any | null, storageCost?: any | null, storageRebate?: any | null, nonRefundableStorageFee?: any | null } | null, transactionBlocks: { __typename?: 'TransactionBlockConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'TransactionBlock', digest?: string | null }> }, endOfEpoch: { __typename?: 'TransactionBlockConnection', nodes: Array<{ __typename?: 'TransactionBlock', kind?: { __typename: 'AuthenticatorStateUpdateTransaction' } | { __typename: 'ConsensusCommitPrologueTransaction' } | { __typename: 'EndOfEpochTransaction', transactions: { __typename?: 'EndOfEpochTransactionKindConnection', nodes: Array<{ __typename: 'AuthenticatorStateCreateTransaction' } | { __typename: 'AuthenticatorStateExpireTransaction' } | { __typename: 'BridgeCommitteeInitTransaction' } | { __typename: 'BridgeStateCreateTransaction' } | { __typename: 'ChangeEpochTransaction', epoch?: { __typename?: 'Epoch', epochId: any, validatorSet?: { __typename?: 'ValidatorSet', activeValidators: { __typename?: 'ValidatorConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'Validator', votingPower?: number | null, credentials?: { __typename?: 'ValidatorCredentials', protocolPubKey?: any | null } | null }> } } | null, protocolConfigs: { __typename?: 'ProtocolConfigs', protocolVersion: any } } | null }> } } | { __typename: 'GenesisTransaction' } | { __typename: 'ProgrammableTransactionBlock' } | { __typename: 'RandomnessStateUpdateTransaction' } | null }> } } | null }; +export type GetCheckpointQuery = { __typename?: 'Query', checkpoint?: { __typename?: 'Checkpoint', digest: string, networkTotalTransactions?: any | null, previousCheckpointDigest?: string | null, sequenceNumber: any, timestamp: any, validatorSignatures: any, epoch?: { __typename?: 'Epoch', epochId: any } | null, rollingGasSummary?: { __typename?: 'GasCostSummary', computationCost?: any | null, computationCostBurned?: any | null, storageCost?: any | null, storageRebate?: any | null, nonRefundableStorageFee?: any | null } | null, transactionBlocks: { __typename?: 'TransactionBlockConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'TransactionBlock', digest?: string | null }> }, endOfEpoch: { __typename?: 'TransactionBlockConnection', nodes: Array<{ __typename?: 'TransactionBlock', kind?: { __typename: 'AuthenticatorStateUpdateTransaction' } | { __typename: 'ConsensusCommitPrologueTransaction' } | { __typename: 'EndOfEpochTransaction', transactions: { __typename?: 'EndOfEpochTransactionKindConnection', nodes: Array<{ __typename: 'AuthenticatorStateCreateTransaction' } | { __typename: 'AuthenticatorStateExpireTransaction' } | { __typename: 'BridgeCommitteeInitTransaction' } | { __typename: 'BridgeStateCreateTransaction' } | { __typename: 'ChangeEpochTransaction', epoch?: { __typename?: 'Epoch', epochId: any, validatorSet?: { __typename?: 'ValidatorSet', activeValidators: { __typename?: 'ValidatorConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'Validator', votingPower?: number | null, credentials?: { __typename?: 'ValidatorCredentials', protocolPubKey?: any | null } | null }> } } | null, protocolConfigs: { __typename?: 'ProtocolConfigs', protocolVersion: any } } | null } | { __typename: 'ChangeEpochTransactionV2' }> } } | { __typename: 'GenesisTransaction' } | { __typename: 'ProgrammableTransactionBlock' } | { __typename: 'RandomnessStateUpdateTransaction' } | null }> } } | null }; export type GetCheckpointsQueryVariables = Exact<{ first?: InputMaybe; @@ -5125,7 +5186,7 @@ export type GetCheckpointsQueryVariables = Exact<{ }>; -export type GetCheckpointsQuery = { __typename?: 'Query', checkpoints: { __typename?: 'CheckpointConnection', pageInfo: { __typename?: 'PageInfo', startCursor?: string | null, endCursor?: string | null, hasNextPage: boolean, hasPreviousPage: boolean }, nodes: Array<{ __typename?: 'Checkpoint', digest: string, networkTotalTransactions?: any | null, previousCheckpointDigest?: string | null, sequenceNumber: any, timestamp: any, validatorSignatures: any, epoch?: { __typename?: 'Epoch', epochId: any } | null, rollingGasSummary?: { __typename?: 'GasCostSummary', computationCost?: any | null, computationCostBurned?: any | null, storageCost?: any | null, storageRebate?: any | null, nonRefundableStorageFee?: any | null } | null, transactionBlocks: { __typename?: 'TransactionBlockConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'TransactionBlock', digest?: string | null }> }, endOfEpoch: { __typename?: 'TransactionBlockConnection', nodes: Array<{ __typename?: 'TransactionBlock', kind?: { __typename: 'AuthenticatorStateUpdateTransaction' } | { __typename: 'ConsensusCommitPrologueTransaction' } | { __typename: 'EndOfEpochTransaction', transactions: { __typename?: 'EndOfEpochTransactionKindConnection', nodes: Array<{ __typename: 'AuthenticatorStateCreateTransaction' } | { __typename: 'AuthenticatorStateExpireTransaction' } | { __typename: 'BridgeCommitteeInitTransaction' } | { __typename: 'BridgeStateCreateTransaction' } | { __typename: 'ChangeEpochTransaction', epoch?: { __typename?: 'Epoch', epochId: any, validatorSet?: { __typename?: 'ValidatorSet', activeValidators: { __typename?: 'ValidatorConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'Validator', votingPower?: number | null, credentials?: { __typename?: 'ValidatorCredentials', protocolPubKey?: any | null } | null }> } } | null, protocolConfigs: { __typename?: 'ProtocolConfigs', protocolVersion: any } } | null }> } } | { __typename: 'GenesisTransaction' } | { __typename: 'ProgrammableTransactionBlock' } | { __typename: 'RandomnessStateUpdateTransaction' } | null }> } }> } }; +export type GetCheckpointsQuery = { __typename?: 'Query', checkpoints: { __typename?: 'CheckpointConnection', pageInfo: { __typename?: 'PageInfo', startCursor?: string | null, endCursor?: string | null, hasNextPage: boolean, hasPreviousPage: boolean }, nodes: Array<{ __typename?: 'Checkpoint', digest: string, networkTotalTransactions?: any | null, previousCheckpointDigest?: string | null, sequenceNumber: any, timestamp: any, validatorSignatures: any, epoch?: { __typename?: 'Epoch', epochId: any } | null, rollingGasSummary?: { __typename?: 'GasCostSummary', computationCost?: any | null, computationCostBurned?: any | null, storageCost?: any | null, storageRebate?: any | null, nonRefundableStorageFee?: any | null } | null, transactionBlocks: { __typename?: 'TransactionBlockConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'TransactionBlock', digest?: string | null }> }, endOfEpoch: { __typename?: 'TransactionBlockConnection', nodes: Array<{ __typename?: 'TransactionBlock', kind?: { __typename: 'AuthenticatorStateUpdateTransaction' } | { __typename: 'ConsensusCommitPrologueTransaction' } | { __typename: 'EndOfEpochTransaction', transactions: { __typename?: 'EndOfEpochTransactionKindConnection', nodes: Array<{ __typename: 'AuthenticatorStateCreateTransaction' } | { __typename: 'AuthenticatorStateExpireTransaction' } | { __typename: 'BridgeCommitteeInitTransaction' } | { __typename: 'BridgeStateCreateTransaction' } | { __typename: 'ChangeEpochTransaction', epoch?: { __typename?: 'Epoch', epochId: any, validatorSet?: { __typename?: 'ValidatorSet', activeValidators: { __typename?: 'ValidatorConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'Validator', votingPower?: number | null, credentials?: { __typename?: 'ValidatorCredentials', protocolPubKey?: any | null } | null }> } } | null, protocolConfigs: { __typename?: 'ProtocolConfigs', protocolVersion: any } } | null } | { __typename: 'ChangeEpochTransactionV2' }> } } | { __typename: 'GenesisTransaction' } | { __typename: 'ProgrammableTransactionBlock' } | { __typename: 'RandomnessStateUpdateTransaction' } | null }> } }> } }; export type PaginateCheckpointTransactionBlocksQueryVariables = Exact<{ id?: InputMaybe; @@ -5135,7 +5196,7 @@ export type PaginateCheckpointTransactionBlocksQueryVariables = Exact<{ export type PaginateCheckpointTransactionBlocksQuery = { __typename?: 'Query', checkpoint?: { __typename?: 'Checkpoint', transactionBlocks: { __typename?: 'TransactionBlockConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'TransactionBlock', digest?: string | null }> } } | null }; -export type Rpc_Checkpoint_FieldsFragment = { __typename?: 'Checkpoint', digest: string, networkTotalTransactions?: any | null, previousCheckpointDigest?: string | null, sequenceNumber: any, timestamp: any, validatorSignatures: any, epoch?: { __typename?: 'Epoch', epochId: any } | null, rollingGasSummary?: { __typename?: 'GasCostSummary', computationCost?: any | null, computationCostBurned?: any | null, storageCost?: any | null, storageRebate?: any | null, nonRefundableStorageFee?: any | null } | null, transactionBlocks: { __typename?: 'TransactionBlockConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'TransactionBlock', digest?: string | null }> }, endOfEpoch: { __typename?: 'TransactionBlockConnection', nodes: Array<{ __typename?: 'TransactionBlock', kind?: { __typename: 'AuthenticatorStateUpdateTransaction' } | { __typename: 'ConsensusCommitPrologueTransaction' } | { __typename: 'EndOfEpochTransaction', transactions: { __typename?: 'EndOfEpochTransactionKindConnection', nodes: Array<{ __typename: 'AuthenticatorStateCreateTransaction' } | { __typename: 'AuthenticatorStateExpireTransaction' } | { __typename: 'BridgeCommitteeInitTransaction' } | { __typename: 'BridgeStateCreateTransaction' } | { __typename: 'ChangeEpochTransaction', epoch?: { __typename?: 'Epoch', epochId: any, validatorSet?: { __typename?: 'ValidatorSet', activeValidators: { __typename?: 'ValidatorConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'Validator', votingPower?: number | null, credentials?: { __typename?: 'ValidatorCredentials', protocolPubKey?: any | null } | null }> } } | null, protocolConfigs: { __typename?: 'ProtocolConfigs', protocolVersion: any } } | null }> } } | { __typename: 'GenesisTransaction' } | { __typename: 'ProgrammableTransactionBlock' } | { __typename: 'RandomnessStateUpdateTransaction' } | null }> } }; +export type Rpc_Checkpoint_FieldsFragment = { __typename?: 'Checkpoint', digest: string, networkTotalTransactions?: any | null, previousCheckpointDigest?: string | null, sequenceNumber: any, timestamp: any, validatorSignatures: any, epoch?: { __typename?: 'Epoch', epochId: any } | null, rollingGasSummary?: { __typename?: 'GasCostSummary', computationCost?: any | null, computationCostBurned?: any | null, storageCost?: any | null, storageRebate?: any | null, nonRefundableStorageFee?: any | null } | null, transactionBlocks: { __typename?: 'TransactionBlockConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'TransactionBlock', digest?: string | null }> }, endOfEpoch: { __typename?: 'TransactionBlockConnection', nodes: Array<{ __typename?: 'TransactionBlock', kind?: { __typename: 'AuthenticatorStateUpdateTransaction' } | { __typename: 'ConsensusCommitPrologueTransaction' } | { __typename: 'EndOfEpochTransaction', transactions: { __typename?: 'EndOfEpochTransactionKindConnection', nodes: Array<{ __typename: 'AuthenticatorStateCreateTransaction' } | { __typename: 'AuthenticatorStateExpireTransaction' } | { __typename: 'BridgeCommitteeInitTransaction' } | { __typename: 'BridgeStateCreateTransaction' } | { __typename: 'ChangeEpochTransaction', epoch?: { __typename?: 'Epoch', epochId: any, validatorSet?: { __typename?: 'ValidatorSet', activeValidators: { __typename?: 'ValidatorConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, nodes: Array<{ __typename?: 'Validator', votingPower?: number | null, credentials?: { __typename?: 'ValidatorCredentials', protocolPubKey?: any | null } | null }> } } | null, protocolConfigs: { __typename?: 'ProtocolConfigs', protocolVersion: any } } | null } | { __typename: 'ChangeEpochTransactionV2' }> } } | { __typename: 'GenesisTransaction' } | { __typename: 'ProgrammableTransactionBlock' } | { __typename: 'RandomnessStateUpdateTransaction' } | null }> } }; export type DevInspectTransactionBlockQueryVariables = Exact<{ txBytes: Scalars['String']['input']; diff --git a/sdk/typescript/graphql/schemas/2024.11/package.json b/sdk/typescript/graphql/schemas/2024.11/package.json deleted file mode 100644 index ff34b7aa4ab..00000000000 --- a/sdk/typescript/graphql/schemas/2024.11/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "import": "../../../dist/esm/graphql/schemas/2024.11/index.js", - "main": "../../../dist/cjs/graphql/schemas/2024.11/index.js", - "sideEffects": false -} diff --git a/sdk/typescript/graphql/schemas/2025.2/package.json b/sdk/typescript/graphql/schemas/2025.2/package.json new file mode 100644 index 00000000000..6fa12c8a1dc --- /dev/null +++ b/sdk/typescript/graphql/schemas/2025.2/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "import": "../../../dist/esm/graphql/schemas/2025.2/index.js", + "main": "../../../dist/cjs/graphql/schemas/2025.2/index.js", + "sideEffects": false +} diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json index 22b6b6bb7e7..0db47cfcaac 100644 --- a/sdk/typescript/package.json +++ b/sdk/typescript/package.json @@ -77,9 +77,9 @@ "import": "./dist/esm/verify/index.js", "require": "./dist/cjs/verify/index.js" }, - "./graphql/schemas/2024.11": { - "import": "./dist/esm/graphql/schemas/2024.11/index.js", - "require": "./dist/cjs/graphql/schemas/2024.11/index.js" + "./graphql/schemas/2025.2": { + "import": "./dist/esm/graphql/schemas/2025.2/index.js", + "require": "./dist/cjs/graphql/schemas/2025.2/index.js" } }, "scripts": { diff --git a/sdk/typescript/scripts/update-graphql-schemas.ts b/sdk/typescript/scripts/update-graphql-schemas.ts index 17d1b1dc1d9..1c7a650afd0 100644 --- a/sdk/typescript/scripts/update-graphql-schemas.ts +++ b/sdk/typescript/scripts/update-graphql-schemas.ts @@ -13,8 +13,8 @@ import { } from './generate-schema-lib.js'; const BRANCH = 'develop'; -const MAJOR = 2024; -const MINOR = 11; +const MAJOR = 2025; +const MINOR = 2; const PATCH = 0; const VERSION = `${MAJOR}.${MINOR}.${PATCH}`; diff --git a/sdk/typescript/src/client/client.ts b/sdk/typescript/src/client/client.ts index 0133cdabdf1..95bd767376b 100644 --- a/sdk/typescript/src/client/client.ts +++ b/sdk/typescript/src/client/client.ts @@ -89,6 +89,7 @@ import type { GetTimelockedStakesParams, DelegatedTimelockedStake, GetTimelockedStakesByIdsParams, + IotaSystemStateSummaryV1, } from './types/index.js'; export interface PaginationArguments { @@ -536,15 +537,27 @@ export class IotaClient { } /** - * Return the latest system state content. + * Return the latest IOTA system state object on networks supporting protocol version `< 5`. + * These are networks with node software release version `< 0.11`. */ - async getLatestIotaSystemState(): Promise { + async getLatestIotaSystemState(): Promise { return await this.transport.request({ method: 'iotax_getLatestIotaSystemState', params: [], }); } + /** + * Return the latest IOTA system state object on networks supporting protocol version `>= 5`. + * These are networks with node software release version `>= 0.11`. + */ + async getLatestIotaSystemStateV2(): Promise { + return await this.transport.request({ + method: 'iotax_getLatestIotaSystemStateV2', + params: [], + }); + } + /** * Get events for a given query criteria */ diff --git a/sdk/typescript/src/client/types/generated.ts b/sdk/typescript/src/client/types/generated.ts index 2018c763413..234ab7bcaf9 100644 --- a/sdk/typescript/src/client/types/generated.ts +++ b/sdk/typescript/src/client/types/generated.ts @@ -482,6 +482,14 @@ export interface IotaChangeEpoch { storage_charge: string; storage_rebate: string; } +export interface IotaChangeEpochV2 { + computation_charge: string; + computation_charge_burned: string; + epoch: string; + epoch_start_timestamp_ms: string; + storage_charge: string; + storage_rebate: string; +} export interface CoinMetadata { /** Number of decimal places the coin uses. */ decimals: number; @@ -501,6 +509,9 @@ export type IotaEndOfEpochTransactionKind = | { ChangeEpoch: IotaChangeEpoch; } + | { + ChangeEpochV2: IotaChangeEpochV2; + } | { AuthenticatorStateExpire: IotaAuthenticatorStateExpire; } @@ -657,11 +668,23 @@ export interface MoveCallIotaTransaction { type_arguments?: string[]; } /** - * This is the JSON-RPC type for the IOTA system state object. It flattens all fields to make them - * top-level fields such that it as minimum dependencies to the internal data structures of the IOTA - * system state type. + * This is the JSON-RPC type for IOTA system state objects. It is an enum type that can represent + * either V1 or V2 system state objects. + */ +export type IotaSystemStateSummary = + | { + V1: IotaSystemStateSummaryV1; + } + | { + V2: IotaSystemStateSummaryV2; + }; +/** + * This is the JSON-RPC type for the + * [`IotaSystemStateV1`](super::iota_system_state_inner_v1::IotaSystemStateV1) object. It flattens all + * fields to make them top-level fields such that it as minimum dependencies to the internal data + * structures of the IOTA system state type. */ -export interface IotaSystemStateSummary { +export interface IotaSystemStateSummaryV1 { /** The list of active validators in the current epoch. */ activeValidators: IotaValidatorSummary[]; /** Map storing the number of epochs for which each validator has been below the low stake threshold. */ @@ -760,6 +783,113 @@ export interface IotaSystemStateSummary { */ validatorVeryLowStakeThreshold: string; } +/** + * This is the JSON-RPC type for the + * [`IotaSystemStateV2`](super::iota_system_state_inner_v2::IotaSystemStateV2) object. It flattens all + * fields to make them top-level fields such that it as minimum dependencies to the internal data + * structures of the IOTA system state type. + */ +export interface IotaSystemStateSummaryV2 { + /** The list of active validators in the current epoch. */ + activeValidators: IotaValidatorSummary[]; + /** Map storing the number of epochs for which each validator has been below the low stake threshold. */ + atRiskValidators: [string, string][]; + /** The current epoch ID, starting from 0. */ + epoch: string; + /** The duration of an epoch, in milliseconds. */ + epochDurationMs: string; + /** Unix timestamp of the current epoch start */ + epochStartTimestampMs: string; + /** + * ID of the object that maps from a staking pool ID to the inactive validator that has that pool as + * its staking pool. + */ + inactivePoolsId: string; + /** Number of inactive staking pools. */ + inactivePoolsSize: string; + /** The current IOTA supply. */ + iotaTotalSupply: string; + /** The `TreasuryCap` object ID. */ + iotaTreasuryCapId: string; + /** + * Maximum number of active validators at any moment. We do not allow the number of validators in any + * epoch to go above this. + */ + maxValidatorCount: string; + /** + * Minimum number of active validators at any moment. We do not allow the number of validators in any + * epoch to go under this. + */ + minValidatorCount: string; + /** Lower-bound on the amount of stake required to become a validator. */ + minValidatorJoiningStake: string; + /** ID of the object that contains the list of new validators that will join at the end of the epoch. */ + pendingActiveValidatorsId: string; + /** Number of new validators that will join at the end of the epoch. */ + pendingActiveValidatorsSize: string; + /** Removal requests from the validators. Each element is an index pointing to `active_validators`. */ + pendingRemovals: string[]; + /** The current protocol version, starting from 1. */ + protocolVersion: string; + /** The reference gas price for the current epoch. */ + referenceGasPrice: string; + /** + * Whether the system is running in a downgraded safe mode due to a non-recoverable bug. This is set + * whenever we failed to execute advance_epoch, and ended up executing advance_epoch_safe_mode. It can + * be reset once we are able to successfully execute advance_epoch. + */ + safeMode: boolean; + /** Amount of computation charges accumulated (and not yet distributed) during safe mode. */ + safeModeComputationCharges: string; + /** Amount of burned computation charges accumulated during safe mode. */ + safeModeComputationChargesBurned: string; + /** Amount of non-refundable storage fee accumulated during safe mode. */ + safeModeNonRefundableStorageFee: string; + /** Amount of storage charges accumulated (and not yet distributed) during safe mode. */ + safeModeStorageCharges: string; + /** Amount of storage rebates accumulated (and not yet burned) during safe mode. */ + safeModeStorageRebates: string; + /** ID of the object that maps from staking pool's ID to the iota address of a validator. */ + stakingPoolMappingsId: string; + /** Number of staking pool mappings. */ + stakingPoolMappingsSize: string; + /** + * The non-refundable portion of the storage fund coming from non-refundable storage rebates and any + * leftover staking rewards. + */ + storageFundNonRefundableBalance: string; + /** The storage rebates of all the objects on-chain stored in the storage fund. */ + storageFundTotalObjectStorageRebates: string; + /** The current version of the system state data structure type. */ + systemStateVersion: string; + /** Total amount of stake from all active validators at the beginning of the epoch. */ + totalStake: string; + /** + * ID of the object that stores preactive validators, mapping their addresses to their `Validator` + * structs. + */ + validatorCandidatesId: string; + /** Number of preactive validators. */ + validatorCandidatesSize: string; + /** + * A validator can have stake below `validator_low_stake_threshold` for this many epochs before being + * kicked out. + */ + validatorLowStakeGracePeriod: string; + /** + * Validators with stake amount below `validator_low_stake_threshold` are considered to have low stake + * and will be escorted out of the validator set after being below this threshold for more than + * `validator_low_stake_grace_period` number of epochs. + */ + validatorLowStakeThreshold: string; + /** A map storing the records of validator reporting each other. */ + validatorReportRecords: [string, string[]][]; + /** + * Validators with stake below `validator_very_low_stake_threshold` will be removed immediately at + * epoch change, no grace period. + */ + validatorVeryLowStakeThreshold: string; +} /** A single transaction in a programmable transaction block. */ export type IotaTransaction = /** A call to either an entry or a public Move function */ diff --git a/sdk/typescript/src/client/types/params.ts b/sdk/typescript/src/client/types/params.ts index 8790b5a12d3..ef8f2d2f878 100644 --- a/sdk/typescript/src/client/types/params.ts +++ b/sdk/typescript/src/client/types/params.ts @@ -194,6 +194,7 @@ export interface GetAllCoinsParams { /** maximum number of items per page */ limit?: number | null | undefined; } +/** Address related metrics. Exclusively served by the indexer. */ export interface GetAllEpochAddressMetricsParams { descendingOrder?: boolean | null | undefined; } @@ -207,6 +208,7 @@ export interface GetBalanceParams { */ coinType?: string | null | undefined; } +/** Address related metrics. Exclusively served by the indexer. */ export interface GetCheckpointAddressMetricsParams { checkpoint: string; } @@ -234,7 +236,7 @@ export interface GetCommitteeInfoParams { /** The epoch of interest. If None, default to the latest epoch */ epoch?: string | null | undefined; } -/** Return current epoch info */ +/** Return current epoch info. Exclusively served by the indexer. */ export interface GetCurrentEpochParams {} /** Return the dynamic field object information for a specified object */ export interface GetDynamicFieldObjectParams { @@ -255,7 +257,7 @@ export interface GetDynamicFieldsParams { /** Maximum item returned per page, default to [QUERY_MAX_RESULT_LIMIT] if not specified. */ limit?: number | null | undefined; } -/** Return a list of epoch metrics, which is a subset of epoch info */ +/** Return a list of epoch metrics, which is a subset of epoch info. Exclusively served by the indexer. */ export interface GetEpochMetricsParams { /** Optional paging cursor */ cursor?: string | null | undefined; @@ -264,7 +266,7 @@ export interface GetEpochMetricsParams { /** Flag to return results in descending order */ descendingOrder?: boolean | null | undefined; } -/** Return a list of epoch info */ +/** Return a list of epoch info. Exclusively served by the indexer. */ export interface GetEpochsParams { /** Optional paging cursor */ cursor?: string | null | undefined; @@ -273,13 +275,21 @@ export interface GetEpochsParams { /** Flag to return results in descending order */ descendingOrder?: boolean | null | undefined; } -/** Address related metrics */ +/** Address related metrics. Exclusively served by the indexer. */ export interface GetLatestAddressMetricsParams {} -/** Return the latest IOTA system state object on-chain. */ +/** + * Return the latest IOTA system state object on networks supporting protocol version `< 4`. These are + * networks with node software release version `< 0.11`. + */ export interface GetLatestIotaSystemStateParams {} -/** Return move call metrics */ +/** + * Return the latest IOTA system state object on networks supporting protocol version `>= 5`. These are + * networks with node software release version `>= 0.11`. + */ +export interface GetLatestIotaSystemStateV2Params {} +/** Return move call metrics. Exclusively served by the indexer. */ export interface GetMoveCallMetricsParams {} -/** Return Network metrics */ +/** Return Network metrics. Exclusively served by the indexer. */ export interface GetNetworkMetricsParams {} /** * Return the list of objects owned by an address. Note that if the address owns more than @@ -320,6 +330,7 @@ export interface GetTotalSupplyParams { /** type name for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC) */ coinType: string; } +/** Return the total number of transactions. Exclusively served by the indexer. */ export interface GetTotalTransactionsParams {} /** Return the validator APY */ export interface GetValidatorsApyParams {} diff --git a/sdk/typescript/src/graphql/generated/2024.11/schema.graphql b/sdk/typescript/src/graphql/generated/2025.2/schema.graphql similarity index 98% rename from sdk/typescript/src/graphql/generated/2024.11/schema.graphql rename to sdk/typescript/src/graphql/generated/2025.2/schema.graphql index bf07b96258a..7642d3dd8e2 100644 --- a/sdk/typescript/src/graphql/generated/2024.11/schema.graphql +++ b/sdk/typescript/src/graphql/generated/2025.2/schema.graphql @@ -389,6 +389,58 @@ type ChangeEpochTransaction { systemPackages(first: Int, after: String, last: Int, before: String): MovePackageConnection! } +""" +A system transaction that updates epoch information on-chain (increments the +current epoch). Executed by the system once per epoch, without using gas. +Epoch change transactions cannot be submitted by users, because validators +will refuse to sign them. +""" +type ChangeEpochTransactionV2 { + """ + The next (to become) epoch. + """ + epoch: Epoch + """ + The protocol version in effect in the new epoch. + """ + protocolVersion: UInt53! + """ + The total amount of gas charged for storage during the previous epoch + (in NANOS). + """ + storageCharge: BigInt! + """ + The total amount of gas charged for computation during the previous + epoch (in NANOS). + """ + computationCharge: BigInt! + """ + The total amount of gas burned for computation during the previous + epoch (in NANOS). + """ + computationChargeBurned: BigInt! + """ + The IOTA returned to transaction senders for cleaning up objects (in + NANOS). + """ + storageRebate: BigInt! + """ + The total gas retained from storage fees, that will not be returned by + storage rebates when the relevant objects are cleaned up (in NANOS). + """ + nonRefundableStorageFee: BigInt! + """ + Time at which the next epoch will start. + """ + startTimestamp: DateTime! + """ + System packages (specifically framework and move stdlib) that are + written before the new epoch starts, to upgrade them on-chain. + Validators write these packages out when running the transaction. + """ + systemPackages(first: Int, after: String, last: Int, before: String): MovePackageConnection! +} + """ Checkpoints contain finalized transactions and are used for node synchronization and global transaction ordering. @@ -1029,7 +1081,7 @@ type EndOfEpochTransaction { transactions(first: Int, before: String, last: Int, after: String): EndOfEpochTransactionKindConnection! } -union EndOfEpochTransactionKind = ChangeEpochTransaction | AuthenticatorStateCreateTransaction | AuthenticatorStateExpireTransaction | BridgeStateCreateTransaction | BridgeCommitteeInitTransaction +union EndOfEpochTransactionKind = ChangeEpochTransaction | ChangeEpochTransactionV2 | AuthenticatorStateCreateTransaction | AuthenticatorStateExpireTransaction | BridgeStateCreateTransaction | BridgeCommitteeInitTransaction type EndOfEpochTransactionKindConnection { """ @@ -1385,7 +1437,7 @@ type GasCostSummary { """ computationCost: BigInt """ - Gas burned for executing this transactions (in NANOS). + Gas burned for executing this transaction (in NANOS). """ computationCostBurned: BigInt """ @@ -4591,6 +4643,7 @@ type ZkLoginVerifyResult { errors: [String!]! } +directive @deprecated(reason: String = "No longer supported") on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT schema { diff --git a/sdk/typescript/src/graphql/generated/2024.11/tada-env.d.ts b/sdk/typescript/src/graphql/generated/2025.2/tada-env.d.ts similarity index 98% rename from sdk/typescript/src/graphql/generated/2024.11/tada-env.d.ts rename to sdk/typescript/src/graphql/generated/2025.2/tada-env.d.ts index a038600c4a9..dc508f80b81 100644 --- a/sdk/typescript/src/graphql/generated/2024.11/tada-env.d.ts +++ b/sdk/typescript/src/graphql/generated/2025.2/tada-env.d.ts @@ -26,6 +26,7 @@ export type introspection_types = { 'BridgeCommitteeInitTransaction': { kind: 'OBJECT'; name: 'BridgeCommitteeInitTransaction'; fields: { 'bridgeObjInitialSharedVersion': { name: 'bridgeObjInitialSharedVersion'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'UInt53'; ofType: null; }; } }; }; }; 'BridgeStateCreateTransaction': { kind: 'OBJECT'; name: 'BridgeStateCreateTransaction'; fields: { 'chainId': { name: 'chainId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; 'ChangeEpochTransaction': { kind: 'OBJECT'; name: 'ChangeEpochTransaction'; fields: { 'computationCharge': { name: 'computationCharge'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'epoch': { name: 'epoch'; type: { kind: 'OBJECT'; name: 'Epoch'; ofType: null; } }; 'nonRefundableStorageFee': { name: 'nonRefundableStorageFee'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'protocolVersion': { name: 'protocolVersion'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'UInt53'; ofType: null; }; } }; 'startTimestamp': { name: 'startTimestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'storageCharge': { name: 'storageCharge'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'storageRebate': { name: 'storageRebate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'systemPackages': { name: 'systemPackages'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'MovePackageConnection'; ofType: null; }; } }; }; }; + 'ChangeEpochTransactionV2': { kind: 'OBJECT'; name: 'ChangeEpochTransactionV2'; fields: { 'computationCharge': { name: 'computationCharge'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'computationChargeBurned': { name: 'computationChargeBurned'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'epoch': { name: 'epoch'; type: { kind: 'OBJECT'; name: 'Epoch'; ofType: null; } }; 'nonRefundableStorageFee': { name: 'nonRefundableStorageFee'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'protocolVersion': { name: 'protocolVersion'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'UInt53'; ofType: null; }; } }; 'startTimestamp': { name: 'startTimestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'storageCharge': { name: 'storageCharge'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'storageRebate': { name: 'storageRebate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'systemPackages': { name: 'systemPackages'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'MovePackageConnection'; ofType: null; }; } }; }; }; 'Checkpoint': { kind: 'OBJECT'; name: 'Checkpoint'; fields: { 'digest': { name: 'digest'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'epoch': { name: 'epoch'; type: { kind: 'OBJECT'; name: 'Epoch'; ofType: null; } }; 'networkTotalTransactions': { name: 'networkTotalTransactions'; type: { kind: 'SCALAR'; name: 'UInt53'; ofType: null; } }; 'previousCheckpointDigest': { name: 'previousCheckpointDigest'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'rollingGasSummary': { name: 'rollingGasSummary'; type: { kind: 'OBJECT'; name: 'GasCostSummary'; ofType: null; } }; 'sequenceNumber': { name: 'sequenceNumber'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'UInt53'; ofType: null; }; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'transactionBlocks': { name: 'transactionBlocks'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TransactionBlockConnection'; ofType: null; }; } }; 'validatorSignatures': { name: 'validatorSignatures'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Base64'; ofType: null; }; } }; }; }; 'CheckpointConnection': { kind: 'OBJECT'; name: 'CheckpointConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CheckpointEdge'; ofType: null; }; }; }; } }; 'nodes': { name: 'nodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Checkpoint'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; 'CheckpointEdge': { kind: 'OBJECT'; name: 'CheckpointEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Checkpoint'; ofType: null; }; } }; }; }; @@ -49,7 +50,7 @@ export type introspection_types = { 'DynamicFieldName': { kind: 'INPUT_OBJECT'; name: 'DynamicFieldName'; isOneOf: false; inputFields: [{ name: 'type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'bcs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Base64'; ofType: null; }; }; defaultValue: null }]; }; 'DynamicFieldValue': { kind: 'UNION'; name: 'DynamicFieldValue'; fields: {}; possibleTypes: 'MoveObject' | 'MoveValue'; }; 'EndOfEpochTransaction': { kind: 'OBJECT'; name: 'EndOfEpochTransaction'; fields: { 'transactions': { name: 'transactions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'EndOfEpochTransactionKindConnection'; ofType: null; }; } }; }; }; - 'EndOfEpochTransactionKind': { kind: 'UNION'; name: 'EndOfEpochTransactionKind'; fields: {}; possibleTypes: 'AuthenticatorStateCreateTransaction' | 'AuthenticatorStateExpireTransaction' | 'BridgeCommitteeInitTransaction' | 'BridgeStateCreateTransaction' | 'ChangeEpochTransaction'; }; + 'EndOfEpochTransactionKind': { kind: 'UNION'; name: 'EndOfEpochTransactionKind'; fields: {}; possibleTypes: 'AuthenticatorStateCreateTransaction' | 'AuthenticatorStateExpireTransaction' | 'BridgeCommitteeInitTransaction' | 'BridgeStateCreateTransaction' | 'ChangeEpochTransaction' | 'ChangeEpochTransactionV2'; }; 'EndOfEpochTransactionKindConnection': { kind: 'OBJECT'; name: 'EndOfEpochTransactionKindConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'EndOfEpochTransactionKindEdge'; ofType: null; }; }; }; } }; 'nodes': { name: 'nodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'EndOfEpochTransactionKind'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; 'EndOfEpochTransactionKindEdge': { kind: 'OBJECT'; name: 'EndOfEpochTransactionKindEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'EndOfEpochTransactionKind'; ofType: null; }; } }; }; }; 'Epoch': { kind: 'OBJECT'; name: 'Epoch'; fields: { 'checkpoints': { name: 'checkpoints'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CheckpointConnection'; ofType: null; }; } }; 'endTimestamp': { name: 'endTimestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'epochId': { name: 'epochId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'UInt53'; ofType: null; }; } }; 'fundInflow': { name: 'fundInflow'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'fundOutflow': { name: 'fundOutflow'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'fundSize': { name: 'fundSize'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'iotaTotalSupply': { name: 'iotaTotalSupply'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'iotaTreasuryCapId': { name: 'iotaTreasuryCapId'; type: { kind: 'SCALAR'; name: 'IotaAddress'; ofType: null; } }; 'liveObjectSetDigest': { name: 'liveObjectSetDigest'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'netInflow': { name: 'netInflow'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'protocolConfigs': { name: 'protocolConfigs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProtocolConfigs'; ofType: null; }; } }; 'referenceGasPrice': { name: 'referenceGasPrice'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'safeMode': { name: 'safeMode'; type: { kind: 'OBJECT'; name: 'SafeMode'; ofType: null; } }; 'startTimestamp': { name: 'startTimestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'storageFund': { name: 'storageFund'; type: { kind: 'OBJECT'; name: 'StorageFund'; ofType: null; } }; 'systemParameters': { name: 'systemParameters'; type: { kind: 'OBJECT'; name: 'SystemParameters'; ofType: null; } }; 'systemStateVersion': { name: 'systemStateVersion'; type: { kind: 'SCALAR'; name: 'UInt53'; ofType: null; } }; 'totalCheckpoints': { name: 'totalCheckpoints'; type: { kind: 'SCALAR'; name: 'UInt53'; ofType: null; } }; 'totalGasFees': { name: 'totalGasFees'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'totalStakeRewards': { name: 'totalStakeRewards'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'totalTransactions': { name: 'totalTransactions'; type: { kind: 'SCALAR'; name: 'UInt53'; ofType: null; } }; 'transactionBlocks': { name: 'transactionBlocks'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TransactionBlockConnection'; ofType: null; }; } }; 'validatorSet': { name: 'validatorSet'; type: { kind: 'OBJECT'; name: 'ValidatorSet'; ofType: null; } }; }; }; diff --git a/sdk/typescript/src/graphql/generated/2024.11/tsconfig.tada.json b/sdk/typescript/src/graphql/generated/2025.2/tsconfig.tada.json similarity index 92% rename from sdk/typescript/src/graphql/generated/2024.11/tsconfig.tada.json rename to sdk/typescript/src/graphql/generated/2025.2/tsconfig.tada.json index 579383dfe94..bd840cd054d 100644 --- a/sdk/typescript/src/graphql/generated/2024.11/tsconfig.tada.json +++ b/sdk/typescript/src/graphql/generated/2025.2/tsconfig.tada.json @@ -4,7 +4,7 @@ { "name": "gql.tada/ts-plugin", "schema": "./schema.graphql", - "tadaOutputLocation": "src/graphql/generated/2024.11/tada-env.d.ts" + "tadaOutputLocation": "src/graphql/generated/2025.2/tada-env.d.ts" } ] } diff --git a/sdk/typescript/src/graphql/schemas/2024.11/index.ts b/sdk/typescript/src/graphql/schemas/2025.2/index.ts similarity index 87% rename from sdk/typescript/src/graphql/schemas/2024.11/index.ts rename to sdk/typescript/src/graphql/schemas/2025.2/index.ts index 77b61fd7ef4..dff428c8c41 100644 --- a/sdk/typescript/src/graphql/schemas/2024.11/index.ts +++ b/sdk/typescript/src/graphql/schemas/2025.2/index.ts @@ -4,7 +4,7 @@ import { initGraphQLTada } from 'gql.tada'; -import type { introspection } from '../../generated/2024.11/tada-env.js'; +import type { introspection } from '../../generated/2025.2/tada-env.js'; import type { CustomScalars } from '../../types.js'; export * from '../../types.js'; diff --git a/sdk/typescript/src/version.ts b/sdk/typescript/src/version.ts index b50fad6b5f8..3b6a67e27a3 100644 --- a/sdk/typescript/src/version.ts +++ b/sdk/typescript/src/version.ts @@ -5,4 +5,4 @@ // This file is generated by genversion.mjs. Do not edit it directly. export const PACKAGE_VERSION = '0.5.0'; -export const TARGETED_RPC_VERSION = '0.10.0-alpha'; +export const TARGETED_RPC_VERSION = '0.11.0-alpha'; diff --git a/sdk/typescript/test/e2e/graphql.test.ts b/sdk/typescript/test/e2e/graphql.test.ts index ba41e458e63..4e8d85c6048 100644 --- a/sdk/typescript/test/e2e/graphql.test.ts +++ b/sdk/typescript/test/e2e/graphql.test.ts @@ -4,7 +4,7 @@ import { describe, expect, it } from 'vitest'; import { IotaGraphQLClient } from '../../src/graphql'; -import { graphql } from '../../src/graphql/schemas/2024.11'; +import { graphql } from '../../src/graphql/schemas/2025.2'; const queries = { getFirstTransactionBlock: graphql(`