From a5e81a70800928ebed5bea678fbedcd7e0d7a965 Mon Sep 17 00:00:00 2001
From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com>
Date: Fri, 20 Sep 2024 01:13:26 -0300
Subject: [PATCH] refactor: blocks page and search (#540)
---
.gitignore | 3 +-
packages/app-explorer/package.json | 2 +-
.../src/app/block/[id]/layout.tsx | 6 +-
.../src/systems/Block/components/Block.tsx | 2 +-
.../systems/Block/components/BlockHeader.tsx | 11 +-
.../Block/components/BlockScreenSimple.tsx | 9 +-
.../Core/components/Search/SearchForm.tsx | 6 +-
.../Search/SearchInput/SearchInput.tsx | 178 +
.../Search/SearchInput/constants.ts | 1 +
.../components/Search/SearchInput/index.ts | 1 +
.../components/Search/SearchInput/styles.ts | 28 +
.../SearchResultDropdown.tsx} | 241 +-
.../Search/SearchResultDropdown/index.ts | 1 +
.../Search/SearchResultDropdown/styles.ts | 12 +
.../Search/SearchResultDropdown/types.ts | 11 +
.../Core/components/Search/SearchWidget.tsx | 16 +-
.../hooks/usePropagateInputMouseClick.ts | 51 +
.../systems/Core/components/Search/styles.ts | 18 +-
.../systems/Core/components/TopNav/TopNav.tsx | 6 +-
.../src/systems/Home/components/Hero/Hero.tsx | 2 +-
.../src/graphql/generated/sdk-provider.ts | 2446 +++++++++++-
packages/graphql/src/graphql/generated/sdk.ts | 3519 ++++++++++++++++-
.../src/graphql/queries/sdk/block.graphql | 1 +
packages/ui/.storybook/main.ts | 7 +
packages/ui/__mocks__/next/link.tsx | 11 +
packages/ui/__mocks__/next/navigation.tsx | 18 +
packages/ui/package.json | 30 +-
pnpm-lock.yaml | 1724 ++++----
28 files changed, 6949 insertions(+), 1412 deletions(-)
create mode 100644 packages/app-explorer/src/systems/Core/components/Search/SearchInput/SearchInput.tsx
create mode 100644 packages/app-explorer/src/systems/Core/components/Search/SearchInput/constants.ts
create mode 100644 packages/app-explorer/src/systems/Core/components/Search/SearchInput/index.ts
create mode 100644 packages/app-explorer/src/systems/Core/components/Search/SearchInput/styles.ts
rename packages/app-explorer/src/systems/Core/components/Search/{SearchInput.tsx => SearchResultDropdown/SearchResultDropdown.tsx} (52%)
create mode 100644 packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/index.ts
create mode 100644 packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/styles.ts
create mode 100644 packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/types.ts
create mode 100644 packages/app-explorer/src/systems/Core/components/Search/hooks/usePropagateInputMouseClick.ts
create mode 100644 packages/ui/__mocks__/next/link.tsx
create mode 100644 packages/ui/__mocks__/next/navigation.tsx
diff --git a/.gitignore b/.gitignore
index 0d2f80dcb..1bd15fda5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -89,4 +89,5 @@ act-actions
# playwright report
**/**/playwright-report/*
-**/**/playwright-html/*
\ No newline at end of file
+**/**/playwright-html/*
+*storybook.log
\ No newline at end of file
diff --git a/packages/app-explorer/package.json b/packages/app-explorer/package.json
index 77b2636d3..142cbe77f 100644
--- a/packages/app-explorer/package.json
+++ b/packages/app-explorer/package.json
@@ -73,7 +73,7 @@
"autoprefixer": "10.4.17",
"postcss": "8.4.35",
"postcss-import": "16.0.1",
- "storybook": "^8.0.8",
+ "storybook": "8.3.0",
"storybook-addon-theme": "workspace:*",
"tailwindcss": "3.4.4",
"tailwindcss-animate": "1.0.7",
diff --git a/packages/app-explorer/src/app/block/[id]/layout.tsx b/packages/app-explorer/src/app/block/[id]/layout.tsx
index 41d0b3540..d3e7c73f3 100644
--- a/packages/app-explorer/src/app/block/[id]/layout.tsx
+++ b/packages/app-explorer/src/app/block/[id]/layout.tsx
@@ -1,17 +1,19 @@
import type { ReactNode } from 'react';
+import { getBlock } from '~/systems/Block/actions/get-block';
import { BlockHeader } from '~/systems/Block/components/BlockHeader';
import type { BlockRouteParams } from '~/systems/Block/types';
-export default function BlockLayout({
+export default async function BlockLayout({
children,
params: { id },
}: {
children: ReactNode;
params: BlockRouteParams;
}) {
+ const { producer } = await getBlock({ id });
return (
<>
-
+
{children}
>
);
diff --git a/packages/app-explorer/src/systems/Block/components/Block.tsx b/packages/app-explorer/src/systems/Block/components/Block.tsx
index 13beb593b..787eb99b8 100644
--- a/packages/app-explorer/src/systems/Block/components/Block.tsx
+++ b/packages/app-explorer/src/systems/Block/components/Block.tsx
@@ -24,7 +24,7 @@ export async function Block({
}: BlockScreenProps) {
return (
<>
-
+
{viewMode === ViewModes.Simple && (
();
@@ -23,10 +23,11 @@ export function BlockHeader({
isLoading={isLoading}
loadingEl={}
regularEl={
- isValidAddress(id) ? (
-
+ //
+ isValidAddress(producer) ? (
+
) : (
- <>#{id}>
+ <>#{producer}>
)
}
/>
diff --git a/packages/app-explorer/src/systems/Block/components/BlockScreenSimple.tsx b/packages/app-explorer/src/systems/Block/components/BlockScreenSimple.tsx
index db4c7abe8..d5c62fbb1 100644
--- a/packages/app-explorer/src/systems/Block/components/BlockScreenSimple.tsx
+++ b/packages/app-explorer/src/systems/Block/components/BlockScreenSimple.tsx
@@ -31,7 +31,14 @@ export function BlockScreenSimple({
}: BlockScreenSimpleProps) {
return (
-
+
+
+ }
+ regularEl={block?.height}
+ />
+
);
diff --git a/packages/app-explorer/src/systems/Core/components/Search/SearchInput/SearchInput.tsx b/packages/app-explorer/src/systems/Core/components/Search/SearchInput/SearchInput.tsx
new file mode 100644
index 000000000..163c47d9f
--- /dev/null
+++ b/packages/app-explorer/src/systems/Core/components/Search/SearchInput/SearchInput.tsx
@@ -0,0 +1,178 @@
+'use client';
+
+import type { GQLSearchResult, Maybe } from '@fuel-explorer/graphql';
+import type { BaseProps, InputProps } from '@fuels/ui';
+import { Focus, Icon, IconButton, Input, Tooltip, VStack } from '@fuels/ui';
+import { IconCheck, IconSearch, IconX } from '@tabler/icons-react';
+import type { KeyboardEvent } from 'react';
+import { useContext, useRef, useState } from 'react';
+import { useFormStatus } from 'react-dom';
+
+import { cx } from '../../../utils/cx';
+
+import { SearchResultDropdown } from '../SearchResultDropdown';
+import { SearchContext } from '../SearchWidget';
+import { usePropagateInputMouseClick } from '../hooks/usePropagateInputMouseClick';
+import { DEFAULT_SEARCH_INPUT_WIDTH } from './constants';
+import { styles } from './styles';
+
+type SearchInputProps = BaseProps & {
+ onSubmit?: (value: string) => void;
+ searchResult?: Maybe;
+ alwaysDisplayActionButtons?: boolean;
+ variablePosition?: boolean;
+};
+
+export function SearchInput({
+ value: initialValue = '',
+ className,
+ autoFocus,
+ placeholder = 'Search here...',
+ searchResult,
+ variablePosition,
+ ...props
+}: SearchInputProps) {
+ const classes = styles();
+ const [value, setValue] = useState(initialValue as string);
+ const [isFocused, setIsFocused] = useState(false);
+ const [isOpen, setIsOpen] = useState(false);
+ const [hasSubmitted, setHasSubmitted] = useState(false);
+ const inputRef = useRef(null);
+ const containerRef = useRef(null);
+ const { pending } = useFormStatus();
+ const { dropdownRef } = useContext(SearchContext);
+ const openDropdown = hasSubmitted
+ ? !pending
+ : isOpen && !pending && !!searchResult;
+
+ usePropagateInputMouseClick({
+ containerRef,
+ inputRef,
+ enabled: openDropdown,
+ });
+
+ function handleChange(event: React.ChangeEvent) {
+ setValue(event.target.value);
+ }
+
+ function handleSubmit() {
+ setIsOpen(true);
+ setHasSubmitted(true);
+ }
+
+ function close() {
+ setIsOpen(false);
+ setHasSubmitted(false);
+ }
+
+ function handleClear() {
+ setValue('');
+ close();
+ }
+
+ function handleFocus() {
+ setIsFocused(true);
+ }
+
+ function handleBlur() {
+ setIsFocused(false);
+ }
+
+ function onKeyDown(e: KeyboardEvent) {
+ if (e.key === 'Enter') {
+ e.preventDefault();
+ (e.target as HTMLFormElement).form?.dispatchEvent(
+ new Event('submit', { cancelable: true, bubbles: true }),
+ );
+ handleSubmit();
+ }
+ }
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ handleClear();
+ }}
+ onOpenChange={(open) => {
+ setIsOpen(open);
+ if (!open) {
+ close();
+ }
+ }}
+ />
+
+
+ );
+}
diff --git a/packages/app-explorer/src/systems/Core/components/Search/SearchInput/constants.ts b/packages/app-explorer/src/systems/Core/components/Search/SearchInput/constants.ts
new file mode 100644
index 000000000..b41071dcc
--- /dev/null
+++ b/packages/app-explorer/src/systems/Core/components/Search/SearchInput/constants.ts
@@ -0,0 +1 @@
+export const DEFAULT_SEARCH_INPUT_WIDTH = 400;
diff --git a/packages/app-explorer/src/systems/Core/components/Search/SearchInput/index.ts b/packages/app-explorer/src/systems/Core/components/Search/SearchInput/index.ts
new file mode 100644
index 000000000..c068bf432
--- /dev/null
+++ b/packages/app-explorer/src/systems/Core/components/Search/SearchInput/index.ts
@@ -0,0 +1 @@
+export * from './SearchInput';
diff --git a/packages/app-explorer/src/systems/Core/components/Search/SearchInput/styles.ts b/packages/app-explorer/src/systems/Core/components/Search/SearchInput/styles.ts
new file mode 100644
index 000000000..5869642ad
--- /dev/null
+++ b/packages/app-explorer/src/systems/Core/components/Search/SearchInput/styles.ts
@@ -0,0 +1,28 @@
+import { tv } from 'tailwind-variants';
+
+export const styles = tv({
+ slots: {
+ searchBox: [
+ 'transition-all duration-200 [&[data-active=false]]:ease-in [&[data-active=true]]:ease-out',
+ 'group justify-center items-center',
+ 'block left-0 w-full', // needed for properly execution of transitions
+ '[&[data-variable-position=true]]:[&[data-active=true]]:w-[calc(100vw+1px)] [&[data-variable-position=true]]:[&[data-active=true]]:left-[-64px] tablet:[&[data-active=true]]:w-full',
+ '[&[data-active=true]]:absolute tablet:[&[data-active=true]]:left-0 [&[data-active=true]]:right-0',
+ '[&[data-variable-position=true]]:[&[data-active=true]]:top-[-14px] [&[data-variable-position=true]]:tablet:[&[data-active=true]]:top-[-4px] [&[data-variable-position=true]]:desktop:[&[data-active=true]]:top-[-20px]',
+ '[&[data-active=true]]:z-50',
+ ],
+ inputContainer: 'w-full',
+ inputWrapper: [
+ 'outline-none h-[40px] group-[&[data-active=true]]:h-[60px] tablet:group-[&[data-active=true]]:h-[40px]',
+ 'group-[&[data-active=true]]:rounded-none tablet:group-[&[data-active=true]]:rounded-[var(--text-field-border-radius)] ',
+ 'border-x-[1px] border-y-[1px] group-[&[data-active=true]]:border-x-0 group-[&[data-active=true]]:border-y-0 tablet:group-[&[data-active=true]]:border-x-[1px] tablet:group-[&[data-active=true]]:border-y-[1px]',
+ 'border-[var(--color-border)] shadow-none',
+ 'bg-none dark:bg-[var(--color-surface)] group-[&[data-active=true]]:bg-[var(--color-panel-solid)]',
+ '[&_.rt-TextFieldChrome]:bg-gray-1 [&_.rt-TextFieldChrome]:outline-none',
+ '[&_.rt-TextFieldChrome]:[&[data-opened=true]]:rounded-b-none',
+ 'group-[&[data-active=true]]:[&_.rt-TextFieldChrome]:shadow-none',
+ ],
+ inputActionsContainer:
+ '[&[data-show=false]]:hidden absolute flex items-center h-full right-0 top-0 transform',
+ },
+});
diff --git a/packages/app-explorer/src/systems/Core/components/Search/SearchInput.tsx b/packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/SearchResultDropdown.tsx
similarity index 52%
rename from packages/app-explorer/src/systems/Core/components/Search/SearchInput.tsx
rename to packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/SearchResultDropdown.tsx
index 9eca828d1..97d957fb1 100644
--- a/packages/app-explorer/src/systems/Core/components/Search/SearchInput.tsx
+++ b/packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/SearchResultDropdown.tsx
@@ -1,44 +1,26 @@
-'use client';
-
-import type { GQLSearchResult, Maybe } from '@fuel-explorer/graphql';
-import type { BaseProps, InputProps } from '@fuels/ui';
import {
Box,
Dropdown,
- Focus,
- Icon,
- IconButton,
- Input,
Link,
Text,
- Tooltip,
- VStack,
shortAddress,
useBreakpoints,
} from '@fuels/ui';
-import { IconCheck, IconSearch, IconX } from '@tabler/icons-react';
import NextLink from 'next/link';
-import type { KeyboardEvent } from 'react';
-import { forwardRef, useContext, useEffect, useRef, useState } from 'react';
-import { useFormStatus } from 'react-dom';
+import { forwardRef } from 'react';
import { Routes } from '~/routes';
-import { cx } from '../../utils/cx';
+import { cx } from '../../../utils/cx';
-import { SearchContext } from './SearchWidget';
+import { useRouter } from 'next/navigation';
+import { styles as searchStyles } from '../styles';
import { styles } from './styles';
+import type { SearchDropdownProps } from './types';
-type SearchDropdownProps = {
- searchResult?: Maybe;
- openDropdown: boolean;
- onOpenChange: () => void;
- searchValue: string;
- width: number;
- onSelectItem: () => void;
- isExpanded?: boolean;
-};
-
-const SearchResultDropdown = forwardRef(
+export const SearchResultDropdown = forwardRef<
+ HTMLDivElement,
+ SearchDropdownProps
+>(
(
{
searchResult,
@@ -47,11 +29,20 @@ const SearchResultDropdown = forwardRef(
onOpenChange,
width,
onSelectItem,
- isExpanded,
+ isFocused,
},
ref,
) => {
+ const router = useRouter();
+
+ function onClick(href: string | undefined) {
+ onSelectItem?.();
+ if (href) {
+ router.push(href);
+ }
+ }
const classes = styles();
+ const searchClasses = searchStyles();
const { isMobile } = useBreakpoints();
const trimL = isMobile ? 15 : 20;
const trimR = isMobile ? 13 : 18;
@@ -70,10 +61,10 @@ const SearchResultDropdown = forwardRef(
{!searchResult && (
@@ -92,7 +83,15 @@ const SearchResultDropdown = forwardRef(
{searchResult?.account && (
<>
Account
-
+
+ searchResult.account?.address &&
+ onClick(
+ Routes.accountAssets(searchResult.account.address!),
+ )
+ }
+ >
(
+ transaction?.id &&
+ onClick(Routes.txSimple(transaction?.id))
+ }
>
(
)}
{searchResult?.block && (
<>
- {searchResult.block.id && (
+ {searchResult.block.id === searchValue && (
<>
Block Hash
-
+
+ searchResult.block?.id &&
+ onClick(`/block/${searchResult.block.id}/simple`)
+ }
+ >
(
>
)}
- {searchResult.block.height && (
+ {searchResult.block.height === searchValue && (
<>
Block Height
-
+
+ searchResult.block?.height &&
+ onClick(`/block/${searchResult.block?.height}/simple`)
+ }
+ >
(
{searchResult?.contract && (
<>
Contract
-
+
+ searchResult.contract?.id &&
+ onClick(Routes.contractAssets(searchResult.contract.id))
+ }
+ >
(
{searchResult?.transaction && (
<>
Transaction
-
+
+ searchResult.transaction?.id &&
+ onClick(Routes.txSimple(searchResult.transaction?.id))
+ }
+ >
(
);
},
);
-
-type SearchInputProps = BaseProps & {
- onSubmit?: (value: string) => void;
- searchResult?: Maybe;
- alwaysDisplayActionButtons?: boolean;
- expandOnFocus?: boolean;
-};
-
-export function SearchInput({
- value: initialValue = '',
- className,
- autoFocus,
- placeholder = 'Search here...',
- searchResult,
- expandOnFocus,
- ...props
-}: SearchInputProps) {
- const classes = styles();
- const [value, setValue] = useState(initialValue as string);
- const [openDropdown, setOpenDropdown] = useState(false);
- const [hasSubmitted, setHasSubmitted] = useState(false);
- const [isExpanded, setIsExpanded] = useState(false);
- const inputRef = useRef(null);
- const { pending } = useFormStatus();
- const { dropdownRef } = useContext(SearchContext);
-
- useEffect(() => {
- if (!pending && hasSubmitted) {
- setOpenDropdown(true);
- setHasSubmitted(false);
- }
- }, [pending]);
-
- function handleChange(event: React.ChangeEvent) {
- setValue(event.target.value);
- }
-
- function handleSubmit() {
- setHasSubmitted(true);
- }
-
- function handleClear() {
- setValue('');
- setHasSubmitted(false);
- if (isExpanded) {
- setIsExpanded(false);
- } else {
- inputRef.current?.focus();
- }
- }
-
- function expandOnFocusHandler() {
- if (expandOnFocus) {
- setIsExpanded(true);
- }
- }
-
- return (
-
-
- ) => {
- if (e.key === 'Enter') {
- e.preventDefault();
- (e.target as HTMLFormElement).form?.dispatchEvent(
- new Event('submit', { cancelable: true, bubbles: true }),
- );
- handleSubmit();
- }
- }}
- >
- {isExpanded || value?.length ? (
- <>
-
- {!!value?.length && (
-
-
-
- )}
-
-
- >
- ) : (
-
-
-
- )}
-
-
- {
- setOpenDropdown(false);
- handleClear();
- }}
- onOpenChange={() => {
- if (openDropdown) {
- setHasSubmitted(false);
- }
- setOpenDropdown(!openDropdown);
- }}
- />
-
- );
-}
diff --git a/packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/index.ts b/packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/index.ts
new file mode 100644
index 000000000..e1fca467d
--- /dev/null
+++ b/packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/index.ts
@@ -0,0 +1 @@
+export * from './SearchResultDropdown';
diff --git a/packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/styles.ts b/packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/styles.ts
new file mode 100644
index 000000000..9794792ad
--- /dev/null
+++ b/packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/styles.ts
@@ -0,0 +1,12 @@
+import { tv } from 'tailwind-variants';
+
+export const styles = tv({
+ slots: {
+ dropdownItem: 'hover:bg-border focus:bg-border cursor-pointer',
+ dropdownContent: [
+ 'ml-[-10px] tablet:ml-0',
+ 'mt-[-10px] rounded-t-none shadow-none border border-t-0 border-border',
+ '[&[data-active=true]]:border-t-0',
+ ],
+ },
+});
diff --git a/packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/types.ts b/packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/types.ts
new file mode 100644
index 000000000..402d18096
--- /dev/null
+++ b/packages/app-explorer/src/systems/Core/components/Search/SearchResultDropdown/types.ts
@@ -0,0 +1,11 @@
+import type { GQLSearchResult, Maybe } from '@fuel-explorer/graphql/sdk';
+
+export type SearchDropdownProps = {
+ searchResult?: Maybe;
+ openDropdown: boolean;
+ isFocused: boolean;
+ onOpenChange: (open: boolean) => void;
+ searchValue: string;
+ width: number;
+ onSelectItem: () => void;
+};
diff --git a/packages/app-explorer/src/systems/Core/components/Search/SearchWidget.tsx b/packages/app-explorer/src/systems/Core/components/Search/SearchWidget.tsx
index b7aa46a75..e596bcaef 100644
--- a/packages/app-explorer/src/systems/Core/components/Search/SearchWidget.tsx
+++ b/packages/app-explorer/src/systems/Core/components/Search/SearchWidget.tsx
@@ -1,6 +1,6 @@
'use client';
-import { HStack } from '@fuels/ui';
+import { Flex } from '@fuels/ui';
import type { MutableRefObject } from 'react';
import { createContext, useRef } from 'react';
import { SearchForm } from './SearchForm';
@@ -12,29 +12,25 @@ export const SearchContext = createContext<{
type SearchWidgetProps = {
autoFocus?: boolean;
- expandOnFocus?: boolean;
+ variablePosition?: boolean;
};
export const SearchWidget = ({
autoFocus,
- expandOnFocus,
+ variablePosition,
}: SearchWidgetProps) => {
const classes = styles();
- const widgetRef = useRef(null);
const dropdownRef = useRef(null);
return (
-
+
-
+
);
};
diff --git a/packages/app-explorer/src/systems/Core/components/Search/hooks/usePropagateInputMouseClick.ts b/packages/app-explorer/src/systems/Core/components/Search/hooks/usePropagateInputMouseClick.ts
new file mode 100644
index 000000000..ebc224471
--- /dev/null
+++ b/packages/app-explorer/src/systems/Core/components/Search/hooks/usePropagateInputMouseClick.ts
@@ -0,0 +1,51 @@
+import { useBreakpoints } from '@fuels/ui';
+import { type RefObject, useEffect } from 'react';
+
+// Radix's Dropdown component uses a Portal to render the dropdown content,
+// That causes Input to not capture click events, forcing the user to double click the input when the dropdown is open.
+// To fix that we need to render a separate Portal to render the overlay and capture the click to make it work.
+
+export function usePropagateInputMouseClick({
+ containerRef,
+ inputRef,
+ enabled,
+}: {
+ containerRef: RefObject;
+ inputRef: RefObject;
+ enabled: boolean | undefined;
+}) {
+ const { isMobile } = useBreakpoints();
+
+ useEffect(() => {
+ if (!enabled) {
+ return;
+ }
+ const onClick = (e: MouseEvent) => {
+ const boundingData = containerRef.current?.getBoundingClientRect();
+
+ if (boundingData) {
+ const { clientX, clientY } = e;
+ if (
+ clientX >= boundingData.x &&
+ clientX <= boundingData.x + boundingData.width &&
+ clientY >= boundingData.y &&
+ clientY <= boundingData.y + boundingData.height
+ ) {
+ if (isMobile) {
+ setTimeout(() => inputRef.current?.focus(), 200);
+ } else {
+ inputRef.current?.focus();
+ }
+ }
+ }
+ };
+
+ document.addEventListener('click', onClick);
+
+ return () => {
+ setTimeout(() => {
+ document.removeEventListener('click', onClick);
+ }, 500);
+ };
+ }, [enabled, isMobile]);
+}
diff --git a/packages/app-explorer/src/systems/Core/components/Search/styles.ts b/packages/app-explorer/src/systems/Core/components/Search/styles.ts
index 47a0df4ab..451224c2a 100644
--- a/packages/app-explorer/src/systems/Core/components/Search/styles.ts
+++ b/packages/app-explorer/src/systems/Core/components/Search/styles.ts
@@ -2,22 +2,6 @@ import { tv } from 'tailwind-variants';
export const styles = tv({
slots: {
- searchBox: [
- 'group justify-center items-center',
- '[&[data-expanded=true]]:absolute [&[data-expanded=true]]:top-0 [&[data-expanded=true]]:left-0 [&[data-expanded=true]]:right-0',
- '[&[data-expanded=true]]:bg-gray-1 [&[data-expanded=true]]:z-50',
- ],
- dropdownItem: 'hover:bg-border focus:bg-border',
- inputWrapper: [
- 'bg-white dark:bg-[var(--color-surface)] h-[40px]',
- '[&_.rt-TextFieldChrome]:bg-gray-1 [&_.rt-TextFieldChrome]:outline-none',
- '[&_.rt-TextFieldChrome]:[&[data-opened=true]]:rounded-b-none',
- 'group-[&[data-expanded=true]]:[&_.rt-TextFieldChrome]:shadow-none group-[&[data-expanded=true]]:[&_.rt-TextFieldInput]:h-[60px]',
- ],
- searchSize: 'w-full sm:w-[400px] group-[&[data-expanded=true]]:w-full',
- dropdownContent: [
- 'mt-[-4px] rounded-t-none shadow-none border border-t-0 border-border',
- '[&[data-expanded=true]]:ml-[-10px] [&[data-expanded=true]]:border-t-0 [&[data-expanded=true]]:border-x-0',
- ],
+ searchSize: 'w-full sm:w-[400px] group-[&[data-active=true]]:w-full',
},
});
diff --git a/packages/app-explorer/src/systems/Core/components/TopNav/TopNav.tsx b/packages/app-explorer/src/systems/Core/components/TopNav/TopNav.tsx
index e311a0916..e2bbaa02e 100644
--- a/packages/app-explorer/src/systems/Core/components/TopNav/TopNav.tsx
+++ b/packages/app-explorer/src/systems/Core/components/TopNav/TopNav.tsx
@@ -15,7 +15,7 @@ export function TopNav() {
// nav elements are in the DOM and respond to click events.
const [isDesktopSearchOpen, setIsDesktopSearchOpen] = useState(false);
const [isMobileSearchOpen, setIsMobileSearchOpen] = useState(false);
- const { isMobile, isLaptop } = useBreakpoints();
+ const { isLaptop } = useBreakpoints();
const pathname = usePathname();
const isBridge = isRoute(pathname, [
PortalRoutes.bridge,
@@ -82,7 +82,7 @@ export function TopNav() {
{logo}
{externalLinks}
- {!isHomePage && }
+ {!isHomePage && }
{tooling}
{themeToggle}
@@ -91,7 +91,7 @@ export function TopNav() {
{logo}
- {!isHomePage && }
+ {!isHomePage && }
{themeToggle}
diff --git a/packages/app-explorer/src/systems/Home/components/Hero/Hero.tsx b/packages/app-explorer/src/systems/Home/components/Hero/Hero.tsx
index 031314ac5..9730ad906 100644
--- a/packages/app-explorer/src/systems/Home/components/Hero/Hero.tsx
+++ b/packages/app-explorer/src/systems/Home/components/Hero/Hero.tsx
@@ -26,7 +26,7 @@ const styles = tv({
root: 'hero-bg overflow-clip relative w-full border-b border-border',
container: [
'z-20 relative py-8 pt-6 px-8 tablet:py-28 tablet:pt-24 tablet:px-10',
- 'tablet:max-laptop:max-w-[500px] [&_.rt-ContainerInner]:p-2',
+ 'tablet:max-laptop:max-w-[500px] [&_.rt-ContainerInner]:p-2 [&_.rt-ContainerInner]:min-h-[120px]',
'[&_.rt-ContainerInner]:tablet:max-laptop:bg-black [&_.rt-ContainerInner]:tablet:max-laptop:bg-opacity-60 [&_.rt-ContainerInner]:tablet:max-laptop:rounded-lg [&_.rt-ContainerInner]:tablet:max-laptop:shadow-2xl',
],
input: 'w-full tablet:w-[400px]',
diff --git a/packages/graphql/src/graphql/generated/sdk-provider.ts b/packages/graphql/src/graphql/generated/sdk-provider.ts
index a5d752acd..04526dc4a 100644
--- a/packages/graphql/src/graphql/generated/sdk-provider.ts
+++ b/packages/graphql/src/graphql/generated/sdk-provider.ts
@@ -1,38 +1,51 @@
+import { GraphQLError, print } from 'graphql';
import type { GraphQLClient, RequestOptions } from 'graphql-request';
-import { GraphQLError, print } from 'graphql'
import gql from 'graphql-tag';
export type Maybe = T | null;
export type InputMaybe = Maybe;
-export type Exact = { [K in keyof T]: T[K] };
-export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
-export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
-export type MakeEmpty = { [_ in K]?: never };
-export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
+export type Exact = {
+ [K in keyof T]: T[K];
+};
+export type MakeOptional = Omit & {
+ [SubKey in K]?: Maybe;
+};
+export type MakeMaybe = Omit & {
+ [SubKey in K]: Maybe;
+};
+export type MakeEmpty<
+ T extends { [key: string]: unknown },
+ K extends keyof T,
+> = { [_ in K]?: never };
+export type Incremental =
+ | T
+ | {
+ [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
+ };
type GraphQLClientRequestHeaders = RequestOptions['requestHeaders'];
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
- ID: { input: string; output: string; }
- String: { input: string; output: string; }
- Boolean: { input: boolean; output: boolean; }
- Int: { input: number; output: number; }
- Float: { input: number; output: number; }
- Address: { input: string; output: string; }
- AssetId: { input: string; output: string; }
- BlockId: { input: string; output: string; }
- Bytes32: { input: string; output: string; }
- ContractId: { input: string; output: string; }
- HexString: { input: string; output: string; }
- Nonce: { input: string; output: string; }
- RelayedTransactionId: { input: string; output: string; }
- Salt: { input: string; output: string; }
- Signature: { input: string; output: string; }
- Tai64Timestamp: { input: string; output: string; }
- TransactionId: { input: string; output: string; }
- TxPointer: { input: string; output: string; }
- U16: { input: string; output: string; }
- U32: { input: string; output: string; }
- U64: { input: string; output: string; }
- UtxoId: { input: string; output: string; }
+ ID: { input: string; output: string };
+ String: { input: string; output: string };
+ Boolean: { input: boolean; output: boolean };
+ Int: { input: number; output: number };
+ Float: { input: number; output: number };
+ Address: { input: string; output: string };
+ AssetId: { input: string; output: string };
+ BlockId: { input: string; output: string };
+ Bytes32: { input: string; output: string };
+ ContractId: { input: string; output: string };
+ HexString: { input: string; output: string };
+ Nonce: { input: string; output: string };
+ RelayedTransactionId: { input: string; output: string };
+ Salt: { input: string; output: string };
+ Signature: { input: string; output: string };
+ Tai64Timestamp: { input: string; output: string };
+ TransactionId: { input: string; output: string };
+ TxPointer: { input: string; output: string };
+ U16: { input: string; output: string };
+ U32: { input: string; output: string };
+ U64: { input: string; output: string };
+ UtxoId: { input: string; output: string };
};
export type GQLBalance = {
@@ -101,7 +114,7 @@ export type GQLBlockEdge = {
};
export enum GQLBlockVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
/** Breakpoint, defined as a tuple of contract ID and relative PC offset inside it */
@@ -198,7 +211,7 @@ export type GQLConsensusParametersPurpose = {
};
export enum GQLConsensusParametersVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
export type GQLContract = {
@@ -267,7 +280,7 @@ export type GQLContractParameters = {
};
export enum GQLContractParametersVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
export type GQLDependentCost = GQLHeavyOperation | GQLLightOperation;
@@ -296,7 +309,9 @@ export type GQLDryRunTransactionExecutionStatus = {
status: GQLDryRunTransactionStatus;
};
-export type GQLDryRunTransactionStatus = GQLDryRunFailureStatus | GQLDryRunSuccessStatus;
+export type GQLDryRunTransactionStatus =
+ | GQLDryRunFailureStatus
+ | GQLDryRunSuccessStatus;
export type GQLEstimateGasPrice = {
__typename: 'EstimateGasPrice';
@@ -330,7 +345,7 @@ export type GQLFeeParameters = {
};
export enum GQLFeeParametersVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
export type GQLGasCosts = {
@@ -450,7 +465,7 @@ export type GQLGasCosts = {
};
export enum GQLGasCostsVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
export type GQLGenesis = {
@@ -470,7 +485,10 @@ export type GQLGenesis = {
transactionsRoot: Scalars['Bytes32']['output'];
};
-export type GQLGroupedInput = GQLGroupedInputCoin | GQLGroupedInputContract | GQLGroupedInputMessage;
+export type GQLGroupedInput =
+ | GQLGroupedInputCoin
+ | GQLGroupedInputContract
+ | GQLGroupedInputMessage;
export type GQLGroupedInputCoin = {
__typename: 'GroupedInputCoin';
@@ -500,10 +518,13 @@ export type GQLGroupedInputMessage = {
export enum GQLGroupedInputType {
InputCoin = 'InputCoin',
InputContract = 'InputContract',
- InputMessage = 'InputMessage'
+ InputMessage = 'InputMessage',
}
-export type GQLGroupedOutput = GQLGroupedOutputChanged | GQLGroupedOutputCoin | GQLGroupedOutputContractCreated;
+export type GQLGroupedOutput =
+ | GQLGroupedOutputChanged
+ | GQLGroupedOutputCoin
+ | GQLGroupedOutputContractCreated;
export type GQLGroupedOutputChanged = {
__typename: 'GroupedOutputChanged';
@@ -533,7 +554,7 @@ export type GQLGroupedOutputContractCreated = {
export enum GQLGroupedOutputType {
OutputChanged = 'OutputChanged',
OutputCoin = 'OutputCoin',
- OutputContractCreated = 'OutputContractCreated'
+ OutputContractCreated = 'OutputContractCreated',
}
export type GQLHeader = {
@@ -569,7 +590,7 @@ export type GQLHeader = {
};
export enum GQLHeaderVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
export type GQLHeavyOperation = {
@@ -688,7 +709,7 @@ export type GQLMessageProof = {
export enum GQLMessageState {
NotFound = 'NOT_FOUND',
Spent = 'SPENT',
- Unspent = 'UNSPENT'
+ Unspent = 'UNSPENT',
}
export type GQLMessageStatus = {
@@ -742,59 +763,49 @@ export type GQLMutation = {
submit: GQLTransaction;
};
-
export type GQLMutationContinueTxArgs = {
id: Scalars['ID']['input'];
};
-
export type GQLMutationDryRunArgs = {
gasPrice?: InputMaybe;
txs: Array;
utxoValidation?: InputMaybe;
};
-
export type GQLMutationEndSessionArgs = {
id: Scalars['ID']['input'];
};
-
export type GQLMutationExecuteArgs = {
id: Scalars['ID']['input'];
op: Scalars['String']['input'];
};
-
export type GQLMutationProduceBlocksArgs = {
blocksToProduce: Scalars['U32']['input'];
startTimestamp?: InputMaybe;
};
-
export type GQLMutationResetArgs = {
id: Scalars['ID']['input'];
};
-
export type GQLMutationSetBreakpointArgs = {
breakpoint: GQLBreakpoint;
id: Scalars['ID']['input'];
};
-
export type GQLMutationSetSingleSteppingArgs = {
enable: Scalars['Boolean']['input'];
id: Scalars['ID']['input'];
};
-
export type GQLMutationStartTxArgs = {
id: Scalars['ID']['input'];
txJson: Scalars['String']['input'];
};
-
export type GQLMutationSubmitArgs = {
tx: Scalars['HexString']['input'];
};
@@ -826,14 +837,19 @@ export enum GQLOperationType {
FinalResult = 'FINAL_RESULT',
FromAccount = 'FROM_ACCOUNT',
FromContract = 'FROM_CONTRACT',
- Rootless = 'ROOTLESS'
+ Rootless = 'ROOTLESS',
}
export type GQLOperationsFilterInput = {
transactionHash: Scalars['String']['input'];
};
-export type GQLOutput = GQLChangeOutput | GQLCoinOutput | GQLContractCreated | GQLContractOutput | GQLVariableOutput;
+export type GQLOutput =
+ | GQLChangeOutput
+ | GQLCoinOutput
+ | GQLContractCreated
+ | GQLContractOutput
+ | GQLVariableOutput;
/**
* A separate `Breakpoint` type to be used as an output, as a single
@@ -912,7 +928,7 @@ export type GQLPredicateParameters = {
};
export enum GQLPredicateParametersVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
export type GQLProgramState = {
@@ -973,13 +989,11 @@ export type GQLQuery = {
transactionsByOwner: GQLTransactionConnection;
};
-
export type GQLQueryBalanceArgs = {
assetId: Scalars['AssetId']['input'];
owner: Scalars['Address']['input'];
};
-
export type GQLQueryBalancesArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -988,13 +1002,11 @@ export type GQLQueryBalancesArgs = {
last?: InputMaybe;
};
-
export type GQLQueryBlockArgs = {
height?: InputMaybe;
id?: InputMaybe;
};
-
export type GQLQueryBlocksArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1002,12 +1014,10 @@ export type GQLQueryBlocksArgs = {
last?: InputMaybe;
};
-
export type GQLQueryCoinArgs = {
utxoId: Scalars['UtxoId']['input'];
};
-
export type GQLQueryCoinsArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1016,25 +1026,21 @@ export type GQLQueryCoinsArgs = {
last?: InputMaybe;
};
-
export type GQLQueryCoinsToSpendArgs = {
excludedIds?: InputMaybe;
owner: Scalars['Address']['input'];
queryPerAsset: Array;
};
-
export type GQLQueryContractArgs = {
id: Scalars['ContractId']['input'];
};
-
export type GQLQueryContractBalanceArgs = {
asset: Scalars['AssetId']['input'];
contract: Scalars['ContractId']['input'];
};
-
export type GQLQueryContractBalancesArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1043,7 +1049,6 @@ export type GQLQueryContractBalancesArgs = {
last?: InputMaybe;
};
-
export type GQLQueryContractsArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1051,29 +1056,24 @@ export type GQLQueryContractsArgs = {
last?: InputMaybe;
};
-
export type GQLQueryEstimateGasPriceArgs = {
blockHorizon?: InputMaybe;
};
-
export type GQLQueryEstimatePredicatesArgs = {
tx: Scalars['HexString']['input'];
};
-
export type GQLQueryMemoryArgs = {
id: Scalars['ID']['input'];
size: Scalars['U32']['input'];
start: Scalars['U32']['input'];
};
-
export type GQLQueryMessageArgs = {
nonce: Scalars['Nonce']['input'];
};
-
export type GQLQueryMessageProofArgs = {
commitBlockHeight?: InputMaybe;
commitBlockId?: InputMaybe;
@@ -1081,12 +1081,10 @@ export type GQLQueryMessageProofArgs = {
transactionId: Scalars['TransactionId']['input'];
};
-
export type GQLQueryMessageStatusArgs = {
nonce: Scalars['Nonce']['input'];
};
-
export type GQLQueryMessagesArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1095,33 +1093,27 @@ export type GQLQueryMessagesArgs = {
owner?: InputMaybe;
};
-
export type GQLQueryPredicateArgs = {
address: Scalars['String']['input'];
};
-
export type GQLQueryRegisterArgs = {
id: Scalars['ID']['input'];
register: Scalars['U32']['input'];
};
-
export type GQLQueryRelayedTransactionStatusArgs = {
id: Scalars['RelayedTransactionId']['input'];
};
-
export type GQLQuerySearchArgs = {
query: Scalars['String']['input'];
};
-
export type GQLQueryTransactionArgs = {
id: Scalars['TransactionId']['input'];
};
-
export type GQLQueryTransactionsArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1129,7 +1121,6 @@ export type GQLQueryTransactionsArgs = {
last?: InputMaybe;
};
-
export type GQLQueryTransactionsByBlockIdArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1138,7 +1129,6 @@ export type GQLQueryTransactionsByBlockIdArgs = {
last?: InputMaybe;
};
-
export type GQLQueryTransactionsByOwnerArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1193,7 +1183,7 @@ export enum GQLReceiptType {
Revert = 'REVERT',
ScriptResult = 'SCRIPT_RESULT',
Transfer = 'TRANSFER',
- TransferOut = 'TRANSFER_OUT'
+ TransferOut = 'TRANSFER_OUT',
}
export type GQLRelayedTransactionFailed = {
@@ -1207,7 +1197,7 @@ export type GQLRelayedTransactionStatus = GQLRelayedTransactionFailed;
export enum GQLReturnType {
Return = 'RETURN',
ReturnData = 'RETURN_DATA',
- Revert = 'REVERT'
+ Revert = 'REVERT',
}
export type GQLRunResult = {
@@ -1221,7 +1211,7 @@ export enum GQLRunState {
/** Stopped on a breakpoint */
Breakpoint = 'BREAKPOINT',
/** All breakpoints have been processed, and the program has terminated */
- Completed = 'COMPLETED'
+ Completed = 'COMPLETED',
}
export type GQLScriptParameters = {
@@ -1232,7 +1222,7 @@ export type GQLScriptParameters = {
};
export enum GQLScriptParametersVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
export type GQLSearchAccount = {
@@ -1310,12 +1300,10 @@ export type GQLSubscription = {
submitAndAwait: GQLTransactionStatus;
};
-
export type GQLSubscriptionStatusChangeArgs = {
id: Scalars['TransactionId']['input'];
};
-
export type GQLSubscriptionSubmitAndAwaitArgs = {
tx: Scalars['HexString']['input'];
};
@@ -1405,7 +1393,11 @@ export type GQLTransactionGasCosts = {
gasUsed?: Maybe;
};
-export type GQLTransactionStatus = GQLFailureStatus | GQLSqueezedOutStatus | GQLSubmittedStatus | GQLSuccessStatus;
+export type GQLTransactionStatus =
+ | GQLFailureStatus
+ | GQLSqueezedOutStatus
+ | GQLSubmittedStatus
+ | GQLSuccessStatus;
export type GQLTxParameters = {
__typename: 'TxParameters';
@@ -1419,10 +1411,12 @@ export type GQLTxParameters = {
};
export enum GQLTxParametersVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
-export type GQLUpgradePurpose = GQLConsensusParametersPurpose | GQLStateTransitionPurpose;
+export type GQLUpgradePurpose =
+ | GQLConsensusParametersPurpose
+ | GQLStateTransitionPurpose;
export type GQLUtxoItem = {
__typename: 'UtxoItem';
@@ -1444,10 +1438,22 @@ export type GQLBalanceQueryVariables = Exact<{
owner: Scalars['Address']['input'];
}>;
+export type GQLBalanceQuery = {
+ __typename: 'Query';
+ balance: {
+ __typename: 'Balance';
+ amount: string;
+ assetId: string;
+ owner: string;
+ };
+};
-export type GQLBalanceQuery = { __typename: 'Query', balance: { __typename: 'Balance', amount: string, assetId: string, owner: string } };
-
-export type GQLBalanceItemFragment = { __typename: 'Balance', amount: string, assetId: string, owner: string };
+export type GQLBalanceItemFragment = {
+ __typename: 'Balance';
+ amount: string;
+ assetId: string;
+ owner: string;
+};
export type GQLBalancesQueryVariables = Exact<{
after?: InputMaybe;
@@ -1457,10 +1463,329 @@ export type GQLBalancesQueryVariables = Exact<{
last?: InputMaybe;
}>;
+export type GQLBalancesQuery = {
+ __typename: 'Query';
+ balances: {
+ __typename: 'BalanceConnection';
+ nodes: Array<{
+ __typename: 'Balance';
+ amount: string;
+ assetId: string;
+ owner: string;
+ }>;
+ pageInfo: {
+ __typename: 'PageInfo';
+ endCursor?: string | null;
+ hasNextPage: boolean;
+ hasPreviousPage: boolean;
+ startCursor?: string | null;
+ };
+ };
+};
-export type GQLBalancesQuery = { __typename: 'Query', balances: { __typename: 'BalanceConnection', nodes: Array<{ __typename: 'Balance', amount: string, assetId: string, owner: string }>, pageInfo: { __typename: 'PageInfo', endCursor?: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | null } } };
-
-export type GQLBlockItemFragment = { __typename: 'Block', height: string, id: string, consensus: { __typename: 'Genesis', chainConfigHash: string, coinsRoot: string, contractsRoot: string, messagesRoot: string, transactionsRoot: string } | { __typename: 'PoAConsensus', signature: string }, header: { __typename: 'Header', applicationHash: string, consensusParametersVersion: string, daHeight: string, eventInboxRoot: string, height: string, id: string, messageOutboxRoot: string, messageReceiptCount: string, prevRoot: string, stateTransitionBytecodeVersion: string, time: string, transactionsCount: string, transactionsRoot: string }, transactions: Array<{ __typename: 'Transaction', bytecodeRoot?: string | null, bytecodeWitnessIndex?: string | null, id: string, inputAssetIds?: Array | null, inputContracts?: Array | null, isCreate: boolean, isMint: boolean, isScript: boolean, isUpgrade: boolean, isUpload: boolean, maturity?: string | null, mintAmount?: string | null, mintAssetId?: string | null, mintGasPrice?: string | null, proofSet?: Array | null, rawPayload: string, receiptsRoot?: string | null, salt?: string | null, script?: string | null, scriptData?: string | null, scriptGasLimit?: string | null, storageSlots?: Array | null, subsectionIndex?: string | null, subsectionsNumber?: string | null, txPointer?: string | null, witnesses?: Array | null, inputContract?: { __typename: 'InputContract', balanceRoot: string, contractId: string, stateRoot: string, txPointer: string, utxoId: string } | null, inputs?: Array<{ __typename: 'InputCoin', amount: string, assetId: string, owner: string, predicate: string, predicateData: string, predicateGasUsed: string, txPointer: string, utxoId: string, witnessIndex: string } | { __typename: 'InputContract', balanceRoot: string, contractId: string, stateRoot: string, txPointer: string, utxoId: string } | { __typename: 'InputMessage', amount: string, data: string, nonce: string, predicate: string, predicateData: string, predicateGasUsed: string, recipient: string, sender: string, witnessIndex: string }> | null, outputContract?: { __typename: 'ContractOutput', balanceRoot: string, inputIndex: string, stateRoot: string } | null, outputs: Array<{ __typename: 'ChangeOutput', amount: string, assetId: string, to: string } | { __typename: 'CoinOutput', amount: string, assetId: string, to: string } | { __typename: 'ContractCreated', contract: string, stateRoot: string } | { __typename: 'ContractOutput', balanceRoot: string, inputIndex: string, stateRoot: string } | { __typename: 'VariableOutput', amount: string, assetId: string, to: string }>, policies?: { __typename: 'Policies', maturity?: string | null, maxFee?: string | null, tip?: string | null, witnessLimit?: string | null } | null, status?: { __typename: 'FailureStatus', reason: string, time: string, totalFee: string, totalGas: string, transactionId: string, block: { __typename: 'Block', height: string, id: string, consensus: { __typename: 'Genesis', chainConfigHash: string, coinsRoot: string, contractsRoot: string, messagesRoot: string, transactionsRoot: string } | { __typename: 'PoAConsensus', signature: string }, header: { __typename: 'Header', applicationHash: string, consensusParametersVersion: string, daHeight: string, eventInboxRoot: string, height: string, id: string, messageOutboxRoot: string, messageReceiptCount: string, prevRoot: string, stateTransitionBytecodeVersion: string, time: string, transactionsCount: string, transactionsRoot: string } }, programState?: { __typename: 'ProgramState', data: string, returnType: GQLReturnType } | null, receipts: Array<{ __typename: 'Receipt', amount?: string | null, assetId?: string | null, contractId?: string | null, data?: string | null, digest?: string | null, gas?: string | null, gasUsed?: string | null, id?: string | null, is?: string | null, len?: string | null, nonce?: string | null, param1?: string | null, param2?: string | null, pc?: string | null, ptr?: string | null, ra?: string | null, rb?: string | null, rc?: string | null, rd?: string | null, reason?: string | null, receiptType: GQLReceiptType, recipient?: string | null, result?: string | null, sender?: string | null, subId?: string | null, to?: string | null, toAddress?: string | null, val?: string | null }> } | { __typename: 'SqueezedOutStatus', reason: string } | { __typename: 'SubmittedStatus', time: string } | { __typename: 'SuccessStatus', time: string, totalFee: string, totalGas: string, transactionId: string, block: { __typename: 'Block', height: string, id: string, consensus: { __typename: 'Genesis', chainConfigHash: string, coinsRoot: string, contractsRoot: string, messagesRoot: string, transactionsRoot: string } | { __typename: 'PoAConsensus', signature: string }, header: { __typename: 'Header', applicationHash: string, consensusParametersVersion: string, daHeight: string, eventInboxRoot: string, height: string, id: string, messageOutboxRoot: string, messageReceiptCount: string, prevRoot: string, stateTransitionBytecodeVersion: string, time: string, transactionsCount: string, transactionsRoot: string } }, programState?: { __typename: 'ProgramState', data: string, returnType: GQLReturnType } | null, receipts: Array<{ __typename: 'Receipt', amount?: string | null, assetId?: string | null, contractId?: string | null, data?: string | null, digest?: string | null, gas?: string | null, gasUsed?: string | null, id?: string | null, is?: string | null, len?: string | null, nonce?: string | null, param1?: string | null, param2?: string | null, pc?: string | null, ptr?: string | null, ra?: string | null, rb?: string | null, rc?: string | null, rd?: string | null, reason?: string | null, receiptType: GQLReceiptType, recipient?: string | null, result?: string | null, sender?: string | null, subId?: string | null, to?: string | null, toAddress?: string | null, val?: string | null }> } | null, upgradePurpose?: { __typename: 'ConsensusParametersPurpose', checksum: string, witnessIndex: string } | { __typename: 'StateTransitionPurpose', root: string } | null }> };
+export type GQLBlockItemFragment = {
+ __typename: 'Block';
+ height: string;
+ id: string;
+ consensus:
+ | {
+ __typename: 'Genesis';
+ chainConfigHash: string;
+ coinsRoot: string;
+ contractsRoot: string;
+ messagesRoot: string;
+ transactionsRoot: string;
+ }
+ | { __typename: 'PoAConsensus'; signature: string };
+ header: {
+ __typename: 'Header';
+ applicationHash: string;
+ consensusParametersVersion: string;
+ daHeight: string;
+ eventInboxRoot: string;
+ height: string;
+ id: string;
+ messageOutboxRoot: string;
+ messageReceiptCount: string;
+ prevRoot: string;
+ stateTransitionBytecodeVersion: string;
+ time: string;
+ transactionsCount: string;
+ transactionsRoot: string;
+ };
+ transactions: Array<{
+ __typename: 'Transaction';
+ bytecodeRoot?: string | null;
+ bytecodeWitnessIndex?: string | null;
+ id: string;
+ inputAssetIds?: Array | null;
+ inputContracts?: Array | null;
+ isCreate: boolean;
+ isMint: boolean;
+ isScript: boolean;
+ isUpgrade: boolean;
+ isUpload: boolean;
+ maturity?: string | null;
+ mintAmount?: string | null;
+ mintAssetId?: string | null;
+ mintGasPrice?: string | null;
+ proofSet?: Array | null;
+ rawPayload: string;
+ receiptsRoot?: string | null;
+ salt?: string | null;
+ script?: string | null;
+ scriptData?: string | null;
+ scriptGasLimit?: string | null;
+ storageSlots?: Array | null;
+ subsectionIndex?: string | null;
+ subsectionsNumber?: string | null;
+ txPointer?: string | null;
+ witnesses?: Array | null;
+ inputContract?: {
+ __typename: 'InputContract';
+ balanceRoot: string;
+ contractId: string;
+ stateRoot: string;
+ txPointer: string;
+ utxoId: string;
+ } | null;
+ inputs?: Array<
+ | {
+ __typename: 'InputCoin';
+ amount: string;
+ assetId: string;
+ owner: string;
+ predicate: string;
+ predicateData: string;
+ predicateGasUsed: string;
+ txPointer: string;
+ utxoId: string;
+ witnessIndex: string;
+ }
+ | {
+ __typename: 'InputContract';
+ balanceRoot: string;
+ contractId: string;
+ stateRoot: string;
+ txPointer: string;
+ utxoId: string;
+ }
+ | {
+ __typename: 'InputMessage';
+ amount: string;
+ data: string;
+ nonce: string;
+ predicate: string;
+ predicateData: string;
+ predicateGasUsed: string;
+ recipient: string;
+ sender: string;
+ witnessIndex: string;
+ }
+ > | null;
+ outputContract?: {
+ __typename: 'ContractOutput';
+ balanceRoot: string;
+ inputIndex: string;
+ stateRoot: string;
+ } | null;
+ outputs: Array<
+ | {
+ __typename: 'ChangeOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ | {
+ __typename: 'CoinOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ | { __typename: 'ContractCreated'; contract: string; stateRoot: string }
+ | {
+ __typename: 'ContractOutput';
+ balanceRoot: string;
+ inputIndex: string;
+ stateRoot: string;
+ }
+ | {
+ __typename: 'VariableOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ >;
+ policies?: {
+ __typename: 'Policies';
+ maturity?: string | null;
+ maxFee?: string | null;
+ tip?: string | null;
+ witnessLimit?: string | null;
+ } | null;
+ status?:
+ | {
+ __typename: 'FailureStatus';
+ reason: string;
+ time: string;
+ totalFee: string;
+ totalGas: string;
+ transactionId: string;
+ block: {
+ __typename: 'Block';
+ height: string;
+ id: string;
+ consensus:
+ | {
+ __typename: 'Genesis';
+ chainConfigHash: string;
+ coinsRoot: string;
+ contractsRoot: string;
+ messagesRoot: string;
+ transactionsRoot: string;
+ }
+ | { __typename: 'PoAConsensus'; signature: string };
+ header: {
+ __typename: 'Header';
+ applicationHash: string;
+ consensusParametersVersion: string;
+ daHeight: string;
+ eventInboxRoot: string;
+ height: string;
+ id: string;
+ messageOutboxRoot: string;
+ messageReceiptCount: string;
+ prevRoot: string;
+ stateTransitionBytecodeVersion: string;
+ time: string;
+ transactionsCount: string;
+ transactionsRoot: string;
+ };
+ };
+ programState?: {
+ __typename: 'ProgramState';
+ data: string;
+ returnType: GQLReturnType;
+ } | null;
+ receipts: Array<{
+ __typename: 'Receipt';
+ amount?: string | null;
+ assetId?: string | null;
+ contractId?: string | null;
+ data?: string | null;
+ digest?: string | null;
+ gas?: string | null;
+ gasUsed?: string | null;
+ id?: string | null;
+ is?: string | null;
+ len?: string | null;
+ nonce?: string | null;
+ param1?: string | null;
+ param2?: string | null;
+ pc?: string | null;
+ ptr?: string | null;
+ ra?: string | null;
+ rb?: string | null;
+ rc?: string | null;
+ rd?: string | null;
+ reason?: string | null;
+ receiptType: GQLReceiptType;
+ recipient?: string | null;
+ result?: string | null;
+ sender?: string | null;
+ subId?: string | null;
+ to?: string | null;
+ toAddress?: string | null;
+ val?: string | null;
+ }>;
+ }
+ | { __typename: 'SqueezedOutStatus'; reason: string }
+ | { __typename: 'SubmittedStatus'; time: string }
+ | {
+ __typename: 'SuccessStatus';
+ time: string;
+ totalFee: string;
+ totalGas: string;
+ transactionId: string;
+ block: {
+ __typename: 'Block';
+ height: string;
+ id: string;
+ consensus:
+ | {
+ __typename: 'Genesis';
+ chainConfigHash: string;
+ coinsRoot: string;
+ contractsRoot: string;
+ messagesRoot: string;
+ transactionsRoot: string;
+ }
+ | { __typename: 'PoAConsensus'; signature: string };
+ header: {
+ __typename: 'Header';
+ applicationHash: string;
+ consensusParametersVersion: string;
+ daHeight: string;
+ eventInboxRoot: string;
+ height: string;
+ id: string;
+ messageOutboxRoot: string;
+ messageReceiptCount: string;
+ prevRoot: string;
+ stateTransitionBytecodeVersion: string;
+ time: string;
+ transactionsCount: string;
+ transactionsRoot: string;
+ };
+ };
+ programState?: {
+ __typename: 'ProgramState';
+ data: string;
+ returnType: GQLReturnType;
+ } | null;
+ receipts: Array<{
+ __typename: 'Receipt';
+ amount?: string | null;
+ assetId?: string | null;
+ contractId?: string | null;
+ data?: string | null;
+ digest?: string | null;
+ gas?: string | null;
+ gasUsed?: string | null;
+ id?: string | null;
+ is?: string | null;
+ len?: string | null;
+ nonce?: string | null;
+ param1?: string | null;
+ param2?: string | null;
+ pc?: string | null;
+ ptr?: string | null;
+ ra?: string | null;
+ rb?: string | null;
+ rc?: string | null;
+ rd?: string | null;
+ reason?: string | null;
+ receiptType: GQLReceiptType;
+ recipient?: string | null;
+ result?: string | null;
+ sender?: string | null;
+ subId?: string | null;
+ to?: string | null;
+ toAddress?: string | null;
+ val?: string | null;
+ }>;
+ }
+ | null;
+ upgradePurpose?:
+ | {
+ __typename: 'ConsensusParametersPurpose';
+ checksum: string;
+ witnessIndex: string;
+ }
+ | { __typename: 'StateTransitionPurpose'; root: string }
+ | null;
+ }>;
+};
export type GQLBlocksQueryVariables = Exact<{
after?: InputMaybe;
@@ -1469,13 +1794,1587 @@ export type GQLBlocksQueryVariables = Exact<{
last?: InputMaybe;
}>;
+export type GQLBlocksQuery = {
+ __typename: 'Query';
+ blocks: {
+ __typename: 'BlockConnection';
+ edges: Array<{
+ __typename: 'BlockEdge';
+ cursor: string;
+ node: {
+ __typename: 'Block';
+ height: string;
+ id: string;
+ consensus:
+ | {
+ __typename: 'Genesis';
+ chainConfigHash: string;
+ coinsRoot: string;
+ contractsRoot: string;
+ messagesRoot: string;
+ transactionsRoot: string;
+ }
+ | { __typename: 'PoAConsensus'; signature: string };
+ header: {
+ __typename: 'Header';
+ applicationHash: string;
+ consensusParametersVersion: string;
+ daHeight: string;
+ eventInboxRoot: string;
+ height: string;
+ id: string;
+ messageOutboxRoot: string;
+ messageReceiptCount: string;
+ prevRoot: string;
+ stateTransitionBytecodeVersion: string;
+ time: string;
+ transactionsCount: string;
+ transactionsRoot: string;
+ };
+ transactions: Array<{
+ __typename: 'Transaction';
+ bytecodeRoot?: string | null;
+ bytecodeWitnessIndex?: string | null;
+ id: string;
+ inputAssetIds?: Array | null;
+ inputContracts?: Array | null;
+ isCreate: boolean;
+ isMint: boolean;
+ isScript: boolean;
+ isUpgrade: boolean;
+ isUpload: boolean;
+ maturity?: string | null;
+ mintAmount?: string | null;
+ mintAssetId?: string | null;
+ mintGasPrice?: string | null;
+ proofSet?: Array | null;
+ rawPayload: string;
+ receiptsRoot?: string | null;
+ salt?: string | null;
+ script?: string | null;
+ scriptData?: string | null;
+ scriptGasLimit?: string | null;
+ storageSlots?: Array | null;
+ subsectionIndex?: string | null;
+ subsectionsNumber?: string | null;
+ txPointer?: string | null;
+ witnesses?: Array | null;
+ inputContract?: {
+ __typename: 'InputContract';
+ balanceRoot: string;
+ contractId: string;
+ stateRoot: string;
+ txPointer: string;
+ utxoId: string;
+ } | null;
+ inputs?: Array<
+ | {
+ __typename: 'InputCoin';
+ amount: string;
+ assetId: string;
+ owner: string;
+ predicate: string;
+ predicateData: string;
+ predicateGasUsed: string;
+ txPointer: string;
+ utxoId: string;
+ witnessIndex: string;
+ }
+ | {
+ __typename: 'InputContract';
+ balanceRoot: string;
+ contractId: string;
+ stateRoot: string;
+ txPointer: string;
+ utxoId: string;
+ }
+ | {
+ __typename: 'InputMessage';
+ amount: string;
+ data: string;
+ nonce: string;
+ predicate: string;
+ predicateData: string;
+ predicateGasUsed: string;
+ recipient: string;
+ sender: string;
+ witnessIndex: string;
+ }
+ > | null;
+ outputContract?: {
+ __typename: 'ContractOutput';
+ balanceRoot: string;
+ inputIndex: string;
+ stateRoot: string;
+ } | null;
+ outputs: Array<
+ | {
+ __typename: 'ChangeOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ | {
+ __typename: 'CoinOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ | {
+ __typename: 'ContractCreated';
+ contract: string;
+ stateRoot: string;
+ }
+ | {
+ __typename: 'ContractOutput';
+ balanceRoot: string;
+ inputIndex: string;
+ stateRoot: string;
+ }
+ | {
+ __typename: 'VariableOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ >;
+ policies?: {
+ __typename: 'Policies';
+ maturity?: string | null;
+ maxFee?: string | null;
+ tip?: string | null;
+ witnessLimit?: string | null;
+ } | null;
+ status?:
+ | {
+ __typename: 'FailureStatus';
+ reason: string;
+ time: string;
+ totalFee: string;
+ totalGas: string;
+ transactionId: string;
+ block: {
+ __typename: 'Block';
+ height: string;
+ id: string;
+ consensus:
+ | {
+ __typename: 'Genesis';
+ chainConfigHash: string;
+ coinsRoot: string;
+ contractsRoot: string;
+ messagesRoot: string;
+ transactionsRoot: string;
+ }
+ | { __typename: 'PoAConsensus'; signature: string };
+ header: {
+ __typename: 'Header';
+ applicationHash: string;
+ consensusParametersVersion: string;
+ daHeight: string;
+ eventInboxRoot: string;
+ height: string;
+ id: string;
+ messageOutboxRoot: string;
+ messageReceiptCount: string;
+ prevRoot: string;
+ stateTransitionBytecodeVersion: string;
+ time: string;
+ transactionsCount: string;
+ transactionsRoot: string;
+ };
+ };
+ programState?: {
+ __typename: 'ProgramState';
+ data: string;
+ returnType: GQLReturnType;
+ } | null;
+ receipts: Array<{
+ __typename: 'Receipt';
+ amount?: string | null;
+ assetId?: string | null;
+ contractId?: string | null;
+ data?: string | null;
+ digest?: string | null;
+ gas?: string | null;
+ gasUsed?: string | null;
+ id?: string | null;
+ is?: string | null;
+ len?: string | null;
+ nonce?: string | null;
+ param1?: string | null;
+ param2?: string | null;
+ pc?: string | null;
+ ptr?: string | null;
+ ra?: string | null;
+ rb?: string | null;
+ rc?: string | null;
+ rd?: string | null;
+ reason?: string | null;
+ receiptType: GQLReceiptType;
+ recipient?: string | null;
+ result?: string | null;
+ sender?: string | null;
+ subId?: string | null;
+ to?: string | null;
+ toAddress?: string | null;
+ val?: string | null;
+ }>;
+ }
+ | { __typename: 'SqueezedOutStatus'; reason: string }
+ | { __typename: 'SubmittedStatus'; time: string }
+ | {
+ __typename: 'SuccessStatus';
+ time: string;
+ totalFee: string;
+ totalGas: string;
+ transactionId: string;
+ block: {
+ __typename: 'Block';
+ height: string;
+ id: string;
+ consensus:
+ | {
+ __typename: 'Genesis';
+ chainConfigHash: string;
+ coinsRoot: string;
+ contractsRoot: string;
+ messagesRoot: string;
+ transactionsRoot: string;
+ }
+ | { __typename: 'PoAConsensus'; signature: string };
+ header: {
+ __typename: 'Header';
+ applicationHash: string;
+ consensusParametersVersion: string;
+ daHeight: string;
+ eventInboxRoot: string;
+ height: string;
+ id: string;
+ messageOutboxRoot: string;
+ messageReceiptCount: string;
+ prevRoot: string;
+ stateTransitionBytecodeVersion: string;
+ time: string;
+ transactionsCount: string;
+ transactionsRoot: string;
+ };
+ };
+ programState?: {
+ __typename: 'ProgramState';
+ data: string;
+ returnType: GQLReturnType;
+ } | null;
+ receipts: Array<{
+ __typename: 'Receipt';
+ amount?: string | null;
+ assetId?: string | null;
+ contractId?: string | null;
+ data?: string | null;
+ digest?: string | null;
+ gas?: string | null;
+ gasUsed?: string | null;
+ id?: string | null;
+ is?: string | null;
+ len?: string | null;
+ nonce?: string | null;
+ param1?: string | null;
+ param2?: string | null;
+ pc?: string | null;
+ ptr?: string | null;
+ ra?: string | null;
+ rb?: string | null;
+ rc?: string | null;
+ rd?: string | null;
+ reason?: string | null;
+ receiptType: GQLReceiptType;
+ recipient?: string | null;
+ result?: string | null;
+ sender?: string | null;
+ subId?: string | null;
+ to?: string | null;
+ toAddress?: string | null;
+ val?: string | null;
+ }>;
+ }
+ | null;
+ upgradePurpose?:
+ | {
+ __typename: 'ConsensusParametersPurpose';
+ checksum: string;
+ witnessIndex: string;
+ }
+ | { __typename: 'StateTransitionPurpose'; root: string }
+ | null;
+ }>;
+ };
+ }>;
+ nodes: Array<{
+ __typename: 'Block';
+ height: string;
+ id: string;
+ consensus:
+ | {
+ __typename: 'Genesis';
+ chainConfigHash: string;
+ coinsRoot: string;
+ contractsRoot: string;
+ messagesRoot: string;
+ transactionsRoot: string;
+ }
+ | { __typename: 'PoAConsensus'; signature: string };
+ header: {
+ __typename: 'Header';
+ applicationHash: string;
+ consensusParametersVersion: string;
+ daHeight: string;
+ eventInboxRoot: string;
+ height: string;
+ id: string;
+ messageOutboxRoot: string;
+ messageReceiptCount: string;
+ prevRoot: string;
+ stateTransitionBytecodeVersion: string;
+ time: string;
+ transactionsCount: string;
+ transactionsRoot: string;
+ };
+ transactions: Array<{
+ __typename: 'Transaction';
+ bytecodeRoot?: string | null;
+ bytecodeWitnessIndex?: string | null;
+ id: string;
+ inputAssetIds?: Array | null;
+ inputContracts?: Array | null;
+ isCreate: boolean;
+ isMint: boolean;
+ isScript: boolean;
+ isUpgrade: boolean;
+ isUpload: boolean;
+ maturity?: string | null;
+ mintAmount?: string | null;
+ mintAssetId?: string | null;
+ mintGasPrice?: string | null;
+ proofSet?: Array | null;
+ rawPayload: string;
+ receiptsRoot?: string | null;
+ salt?: string | null;
+ script?: string | null;
+ scriptData?: string | null;
+ scriptGasLimit?: string | null;
+ storageSlots?: Array | null;
+ subsectionIndex?: string | null;
+ subsectionsNumber?: string | null;
+ txPointer?: string | null;
+ witnesses?: Array | null;
+ inputContract?: {
+ __typename: 'InputContract';
+ balanceRoot: string;
+ contractId: string;
+ stateRoot: string;
+ txPointer: string;
+ utxoId: string;
+ } | null;
+ inputs?: Array<
+ | {
+ __typename: 'InputCoin';
+ amount: string;
+ assetId: string;
+ owner: string;
+ predicate: string;
+ predicateData: string;
+ predicateGasUsed: string;
+ txPointer: string;
+ utxoId: string;
+ witnessIndex: string;
+ }
+ | {
+ __typename: 'InputContract';
+ balanceRoot: string;
+ contractId: string;
+ stateRoot: string;
+ txPointer: string;
+ utxoId: string;
+ }
+ | {
+ __typename: 'InputMessage';
+ amount: string;
+ data: string;
+ nonce: string;
+ predicate: string;
+ predicateData: string;
+ predicateGasUsed: string;
+ recipient: string;
+ sender: string;
+ witnessIndex: string;
+ }
+ > | null;
+ outputContract?: {
+ __typename: 'ContractOutput';
+ balanceRoot: string;
+ inputIndex: string;
+ stateRoot: string;
+ } | null;
+ outputs: Array<
+ | {
+ __typename: 'ChangeOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ | {
+ __typename: 'CoinOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ | {
+ __typename: 'ContractCreated';
+ contract: string;
+ stateRoot: string;
+ }
+ | {
+ __typename: 'ContractOutput';
+ balanceRoot: string;
+ inputIndex: string;
+ stateRoot: string;
+ }
+ | {
+ __typename: 'VariableOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ >;
+ policies?: {
+ __typename: 'Policies';
+ maturity?: string | null;
+ maxFee?: string | null;
+ tip?: string | null;
+ witnessLimit?: string | null;
+ } | null;
+ status?:
+ | {
+ __typename: 'FailureStatus';
+ reason: string;
+ time: string;
+ totalFee: string;
+ totalGas: string;
+ transactionId: string;
+ block: {
+ __typename: 'Block';
+ height: string;
+ id: string;
+ consensus:
+ | {
+ __typename: 'Genesis';
+ chainConfigHash: string;
+ coinsRoot: string;
+ contractsRoot: string;
+ messagesRoot: string;
+ transactionsRoot: string;
+ }
+ | { __typename: 'PoAConsensus'; signature: string };
+ header: {
+ __typename: 'Header';
+ applicationHash: string;
+ consensusParametersVersion: string;
+ daHeight: string;
+ eventInboxRoot: string;
+ height: string;
+ id: string;
+ messageOutboxRoot: string;
+ messageReceiptCount: string;
+ prevRoot: string;
+ stateTransitionBytecodeVersion: string;
+ time: string;
+ transactionsCount: string;
+ transactionsRoot: string;
+ };
+ };
+ programState?: {
+ __typename: 'ProgramState';
+ data: string;
+ returnType: GQLReturnType;
+ } | null;
+ receipts: Array<{
+ __typename: 'Receipt';
+ amount?: string | null;
+ assetId?: string | null;
+ contractId?: string | null;
+ data?: string | null;
+ digest?: string | null;
+ gas?: string | null;
+ gasUsed?: string | null;
+ id?: string | null;
+ is?: string | null;
+ len?: string | null;
+ nonce?: string | null;
+ param1?: string | null;
+ param2?: string | null;
+ pc?: string | null;
+ ptr?: string | null;
+ ra?: string | null;
+ rb?: string | null;
+ rc?: string | null;
+ rd?: string | null;
+ reason?: string | null;
+ receiptType: GQLReceiptType;
+ recipient?: string | null;
+ result?: string | null;
+ sender?: string | null;
+ subId?: string | null;
+ to?: string | null;
+ toAddress?: string | null;
+ val?: string | null;
+ }>;
+ }
+ | { __typename: 'SqueezedOutStatus'; reason: string }
+ | { __typename: 'SubmittedStatus'; time: string }
+ | {
+ __typename: 'SuccessStatus';
+ time: string;
+ totalFee: string;
+ totalGas: string;
+ transactionId: string;
+ block: {
+ __typename: 'Block';
+ height: string;
+ id: string;
+ consensus:
+ | {
+ __typename: 'Genesis';
+ chainConfigHash: string;
+ coinsRoot: string;
+ contractsRoot: string;
+ messagesRoot: string;
+ transactionsRoot: string;
+ }
+ | { __typename: 'PoAConsensus'; signature: string };
+ header: {
+ __typename: 'Header';
+ applicationHash: string;
+ consensusParametersVersion: string;
+ daHeight: string;
+ eventInboxRoot: string;
+ height: string;
+ id: string;
+ messageOutboxRoot: string;
+ messageReceiptCount: string;
+ prevRoot: string;
+ stateTransitionBytecodeVersion: string;
+ time: string;
+ transactionsCount: string;
+ transactionsRoot: string;
+ };
+ };
+ programState?: {
+ __typename: 'ProgramState';
+ data: string;
+ returnType: GQLReturnType;
+ } | null;
+ receipts: Array<{
+ __typename: 'Receipt';
+ amount?: string | null;
+ assetId?: string | null;
+ contractId?: string | null;
+ data?: string | null;
+ digest?: string | null;
+ gas?: string | null;
+ gasUsed?: string | null;
+ id?: string | null;
+ is?: string | null;
+ len?: string | null;
+ nonce?: string | null;
+ param1?: string | null;
+ param2?: string | null;
+ pc?: string | null;
+ ptr?: string | null;
+ ra?: string | null;
+ rb?: string | null;
+ rc?: string | null;
+ rd?: string | null;
+ reason?: string | null;
+ receiptType: GQLReceiptType;
+ recipient?: string | null;
+ result?: string | null;
+ sender?: string | null;
+ subId?: string | null;
+ to?: string | null;
+ toAddress?: string | null;
+ val?: string | null;
+ }>;
+ }
+ | null;
+ upgradePurpose?:
+ | {
+ __typename: 'ConsensusParametersPurpose';
+ checksum: string;
+ witnessIndex: string;
+ }
+ | { __typename: 'StateTransitionPurpose'; root: string }
+ | null;
+ }>;
+ }>;
+ pageInfo: {
+ __typename: 'PageInfo';
+ endCursor?: string | null;
+ hasNextPage: boolean;
+ hasPreviousPage: boolean;
+ startCursor?: string | null;
+ };
+ };
+};
-export type GQLBlocksQuery = { __typename: 'Query', blocks: { __typename: 'BlockConnection', edges: Array<{ __typename: 'BlockEdge', cursor: string, node: { __typename: 'Block', height: string, id: string, consensus: { __typename: 'Genesis', chainConfigHash: string, coinsRoot: string, contractsRoot: string, messagesRoot: string, transactionsRoot: string } | { __typename: 'PoAConsensus', signature: string }, header: { __typename: 'Header', applicationHash: string, consensusParametersVersion: string, daHeight: string, eventInboxRoot: string, height: string, id: string, messageOutboxRoot: string, messageReceiptCount: string, prevRoot: string, stateTransitionBytecodeVersion: string, time: string, transactionsCount: string, transactionsRoot: string }, transactions: Array<{ __typename: 'Transaction', bytecodeRoot?: string | null, bytecodeWitnessIndex?: string | null, id: string, inputAssetIds?: Array | null, inputContracts?: Array | null, isCreate: boolean, isMint: boolean, isScript: boolean, isUpgrade: boolean, isUpload: boolean, maturity?: string | null, mintAmount?: string | null, mintAssetId?: string | null, mintGasPrice?: string | null, proofSet?: Array | null, rawPayload: string, receiptsRoot?: string | null, salt?: string | null, script?: string | null, scriptData?: string | null, scriptGasLimit?: string | null, storageSlots?: Array | null, subsectionIndex?: string | null, subsectionsNumber?: string | null, txPointer?: string | null, witnesses?: Array | null, inputContract?: { __typename: 'InputContract', balanceRoot: string, contractId: string, stateRoot: string, txPointer: string, utxoId: string } | null, inputs?: Array<{ __typename: 'InputCoin', amount: string, assetId: string, owner: string, predicate: string, predicateData: string, predicateGasUsed: string, txPointer: string, utxoId: string, witnessIndex: string } | { __typename: 'InputContract', balanceRoot: string, contractId: string, stateRoot: string, txPointer: string, utxoId: string } | { __typename: 'InputMessage', amount: string, data: string, nonce: string, predicate: string, predicateData: string, predicateGasUsed: string, recipient: string, sender: string, witnessIndex: string }> | null, outputContract?: { __typename: 'ContractOutput', balanceRoot: string, inputIndex: string, stateRoot: string } | null, outputs: Array<{ __typename: 'ChangeOutput', amount: string, assetId: string, to: string } | { __typename: 'CoinOutput', amount: string, assetId: string, to: string } | { __typename: 'ContractCreated', contract: string, stateRoot: string } | { __typename: 'ContractOutput', balanceRoot: string, inputIndex: string, stateRoot: string } | { __typename: 'VariableOutput', amount: string, assetId: string, to: string }>, policies?: { __typename: 'Policies', maturity?: string | null, maxFee?: string | null, tip?: string | null, witnessLimit?: string | null } | null, status?: { __typename: 'FailureStatus', reason: string, time: string, totalFee: string, totalGas: string, transactionId: string, block: { __typename: 'Block', height: string, id: string, consensus: { __typename: 'Genesis', chainConfigHash: string, coinsRoot: string, contractsRoot: string, messagesRoot: string, transactionsRoot: string } | { __typename: 'PoAConsensus', signature: string }, header: { __typename: 'Header', applicationHash: string, consensusParametersVersion: string, daHeight: string, eventInboxRoot: string, height: string, id: string, messageOutboxRoot: string, messageReceiptCount: string, prevRoot: string, stateTransitionBytecodeVersion: string, time: string, transactionsCount: string, transactionsRoot: string } }, programState?: { __typename: 'ProgramState', data: string, returnType: GQLReturnType } | null, receipts: Array<{ __typename: 'Receipt', amount?: string | null, assetId?: string | null, contractId?: string | null, data?: string | null, digest?: string | null, gas?: string | null, gasUsed?: string | null, id?: string | null, is?: string | null, len?: string | null, nonce?: string | null, param1?: string | null, param2?: string | null, pc?: string | null, ptr?: string | null, ra?: string | null, rb?: string | null, rc?: string | null, rd?: string | null, reason?: string | null, receiptType: GQLReceiptType, recipient?: string | null, result?: string | null, sender?: string | null, subId?: string | null, to?: string | null, toAddress?: string | null, val?: string | null }> } | { __typename: 'SqueezedOutStatus', reason: string } | { __typename: 'SubmittedStatus', time: string } | { __typename: 'SuccessStatus', time: string, totalFee: string, totalGas: string, transactionId: string, block: { __typename: 'Block', height: string, id: string, consensus: { __typename: 'Genesis', chainConfigHash: string, coinsRoot: string, contractsRoot: string, messagesRoot: string, transactionsRoot: string } | { __typename: 'PoAConsensus', signature: string }, header: { __typename: 'Header', applicationHash: string, consensusParametersVersion: string, daHeight: string, eventInboxRoot: string, height: string, id: string, messageOutboxRoot: string, messageReceiptCount: string, prevRoot: string, stateTransitionBytecodeVersion: string, time: string, transactionsCount: string, transactionsRoot: string } }, programState?: { __typename: 'ProgramState', data: string, returnType: GQLReturnType } | null, receipts: Array<{ __typename: 'Receipt', amount?: string | null, assetId?: string | null, contractId?: string | null, data?: string | null, digest?: string | null, gas?: string | null, gasUsed?: string | null, id?: string | null, is?: string | null, len?: string | null, nonce?: string | null, param1?: string | null, param2?: string | null, pc?: string | null, ptr?: string | null, ra?: string | null, rb?: string | null, rc?: string | null, rd?: string | null, reason?: string | null, receiptType: GQLReceiptType, recipient?: string | null, result?: string | null, sender?: string | null, subId?: string | null, to?: string | null, toAddress?: string | null, val?: string | null }> } | null, upgradePurpose?: { __typename: 'ConsensusParametersPurpose', checksum: string, witnessIndex: string } | { __typename: 'StateTransitionPurpose', root: string } | null }> } }>, nodes: Array<{ __typename: 'Block', height: string, id: string, consensus: { __typename: 'Genesis', chainConfigHash: string, coinsRoot: string, contractsRoot: string, messagesRoot: string, transactionsRoot: string } | { __typename: 'PoAConsensus', signature: string }, header: { __typename: 'Header', applicationHash: string, consensusParametersVersion: string, daHeight: string, eventInboxRoot: string, height: string, id: string, messageOutboxRoot: string, messageReceiptCount: string, prevRoot: string, stateTransitionBytecodeVersion: string, time: string, transactionsCount: string, transactionsRoot: string }, transactions: Array<{ __typename: 'Transaction', bytecodeRoot?: string | null, bytecodeWitnessIndex?: string | null, id: string, inputAssetIds?: Array | null, inputContracts?: Array | null, isCreate: boolean, isMint: boolean, isScript: boolean, isUpgrade: boolean, isUpload: boolean, maturity?: string | null, mintAmount?: string | null, mintAssetId?: string | null, mintGasPrice?: string | null, proofSet?: Array | null, rawPayload: string, receiptsRoot?: string | null, salt?: string | null, script?: string | null, scriptData?: string | null, scriptGasLimit?: string | null, storageSlots?: Array | null, subsectionIndex?: string | null, subsectionsNumber?: string | null, txPointer?: string | null, witnesses?: Array | null, inputContract?: { __typename: 'InputContract', balanceRoot: string, contractId: string, stateRoot: string, txPointer: string, utxoId: string } | null, inputs?: Array<{ __typename: 'InputCoin', amount: string, assetId: string, owner: string, predicate: string, predicateData: string, predicateGasUsed: string, txPointer: string, utxoId: string, witnessIndex: string } | { __typename: 'InputContract', balanceRoot: string, contractId: string, stateRoot: string, txPointer: string, utxoId: string } | { __typename: 'InputMessage', amount: string, data: string, nonce: string, predicate: string, predicateData: string, predicateGasUsed: string, recipient: string, sender: string, witnessIndex: string }> | null, outputContract?: { __typename: 'ContractOutput', balanceRoot: string, inputIndex: string, stateRoot: string } | null, outputs: Array<{ __typename: 'ChangeOutput', amount: string, assetId: string, to: string } | { __typename: 'CoinOutput', amount: string, assetId: string, to: string } | { __typename: 'ContractCreated', contract: string, stateRoot: string } | { __typename: 'ContractOutput', balanceRoot: string, inputIndex: string, stateRoot: string } | { __typename: 'VariableOutput', amount: string, assetId: string, to: string }>, policies?: { __typename: 'Policies', maturity?: string | null, maxFee?: string | null, tip?: string | null, witnessLimit?: string | null } | null, status?: { __typename: 'FailureStatus', reason: string, time: string, totalFee: string, totalGas: string, transactionId: string, block: { __typename: 'Block', height: string, id: string, consensus: { __typename: 'Genesis', chainConfigHash: string, coinsRoot: string, contractsRoot: string, messagesRoot: string, transactionsRoot: string } | { __typename: 'PoAConsensus', signature: string }, header: { __typename: 'Header', applicationHash: string, consensusParametersVersion: string, daHeight: string, eventInboxRoot: string, height: string, id: string, messageOutboxRoot: string, messageReceiptCount: string, prevRoot: string, stateTransitionBytecodeVersion: string, time: string, transactionsCount: string, transactionsRoot: string } }, programState?: { __typename: 'ProgramState', data: string, returnType: GQLReturnType } | null, receipts: Array<{ __typename: 'Receipt', amount?: string | null, assetId?: string | null, contractId?: string | null, data?: string | null, digest?: string | null, gas?: string | null, gasUsed?: string | null, id?: string | null, is?: string | null, len?: string | null, nonce?: string | null, param1?: string | null, param2?: string | null, pc?: string | null, ptr?: string | null, ra?: string | null, rb?: string | null, rc?: string | null, rd?: string | null, reason?: string | null, receiptType: GQLReceiptType, recipient?: string | null, result?: string | null, sender?: string | null, subId?: string | null, to?: string | null, toAddress?: string | null, val?: string | null }> } | { __typename: 'SqueezedOutStatus', reason: string } | { __typename: 'SubmittedStatus', time: string } | { __typename: 'SuccessStatus', time: string, totalFee: string, totalGas: string, transactionId: string, block: { __typename: 'Block', height: string, id: string, consensus: { __typename: 'Genesis', chainConfigHash: string, coinsRoot: string, contractsRoot: string, messagesRoot: string, transactionsRoot: string } | { __typename: 'PoAConsensus', signature: string }, header: { __typename: 'Header', applicationHash: string, consensusParametersVersion: string, daHeight: string, eventInboxRoot: string, height: string, id: string, messageOutboxRoot: string, messageReceiptCount: string, prevRoot: string, stateTransitionBytecodeVersion: string, time: string, transactionsCount: string, transactionsRoot: string } }, programState?: { __typename: 'ProgramState', data: string, returnType: GQLReturnType } | null, receipts: Array<{ __typename: 'Receipt', amount?: string | null, assetId?: string | null, contractId?: string | null, data?: string | null, digest?: string | null, gas?: string | null, gasUsed?: string | null, id?: string | null, is?: string | null, len?: string | null, nonce?: string | null, param1?: string | null, param2?: string | null, pc?: string | null, ptr?: string | null, ra?: string | null, rb?: string | null, rc?: string | null, rd?: string | null, reason?: string | null, receiptType: GQLReceiptType, recipient?: string | null, result?: string | null, sender?: string | null, subId?: string | null, to?: string | null, toAddress?: string | null, val?: string | null }> } | null, upgradePurpose?: { __typename: 'ConsensusParametersPurpose', checksum: string, witnessIndex: string } | { __typename: 'StateTransitionPurpose', root: string } | null }> }>, pageInfo: { __typename: 'PageInfo', endCursor?: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | null } } };
-
-export type GQLChainQueryVariables = Exact<{ [key: string]: never; }>;
-
+export type GQLChainQueryVariables = Exact<{ [key: string]: never }>;
-export type GQLChainQuery = { __typename: 'Query', chain: { __typename: 'ChainInfo', daHeight: string, name: string, consensusParameters: { __typename: 'ConsensusParameters', baseAssetId: string, blockGasLimit: string, chainId: string, privilegedAddress: string, contractParams: { __typename: 'ContractParameters', contractMaxSize: string, maxStorageSlots: string }, feeParams: { __typename: 'FeeParameters', gasPerByte: string, gasPriceFactor: string }, gasCosts: { __typename: 'GasCosts', add: string, addi: string, aloc: string, and: string, andi: string, bal: string, bhei: string, bhsh: string, burn: string, cb: string, cfei: string, cfsi: string, div: string, divi: string, eck1: string, ecr1: string, ed19: string, eq: string, exp: string, expi: string, flag: string, gm: string, gt: string, gtf: string, ji: string, jmp: string, jmpb: string, jmpf: string, jne: string, jneb: string, jnef: string, jnei: string, jnzb: string, jnzf: string, jnzi: string, lb: string, log: string, lt: string, lw: string, mint: string, mldv: string, mlog: string, modOp: string, modi: string, moveOp: string, movi: string, mroo: string, mul: string, muli: string, newStoragePerByte: string, noop: string, not: string, or: string, ori: string, poph: string, popl: string, pshh: string, pshl: string, ret: string, rvrt: string, sb: string, sll: string, slli: string, srl: string, srli: string, srw: string, sub: string, subi: string, sw: string, sww: string, time: string, tr: string, tro: string, wdam: string, wdcm: string, wddv: string, wdmd: string, wdml: string, wdmm: string, wdop: string, wqam: string, wqcm: string, wqdv: string, wqmd: string, wqml: string, wqmm: string, wqop: string, xor: string, xori: string, call: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, ccp: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, contractRoot: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, croo: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, csiz: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, k256: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, ldc: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, logd: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, mcl: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, mcli: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, mcp: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, mcpi: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, meq: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, retd: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, s256: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, scwq: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, smo: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, srwq: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, stateRoot: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, swwq: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, vmInitialization: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string } }, predicateParams: { __typename: 'PredicateParameters', maxGasPerPredicate: string, maxMessageDataLength: string, maxPredicateDataLength: string, maxPredicateLength: string }, scriptParams: { __typename: 'ScriptParameters', maxScriptDataLength: string, maxScriptLength: string }, txParams: { __typename: 'TxParameters', maxBytecodeSubsections: string, maxGasPerTx: string, maxInputs: string, maxOutputs: string, maxSize: string, maxWitnesses: string } }, gasCosts: { __typename: 'GasCosts', add: string, addi: string, aloc: string, and: string, andi: string, bal: string, bhei: string, bhsh: string, burn: string, cb: string, cfei: string, cfsi: string, div: string, divi: string, eck1: string, ecr1: string, ed19: string, eq: string, exp: string, expi: string, flag: string, gm: string, gt: string, gtf: string, ji: string, jmp: string, jmpb: string, jmpf: string, jne: string, jneb: string, jnef: string, jnei: string, jnzb: string, jnzf: string, jnzi: string, lb: string, log: string, lt: string, lw: string, mint: string, mldv: string, mlog: string, modOp: string, modi: string, moveOp: string, movi: string, mroo: string, mul: string, muli: string, newStoragePerByte: string, noop: string, not: string, or: string, ori: string, poph: string, popl: string, pshh: string, pshl: string, ret: string, rvrt: string, sb: string, sll: string, slli: string, srl: string, srli: string, srw: string, sub: string, subi: string, sw: string, sww: string, time: string, tr: string, tro: string, wdam: string, wdcm: string, wddv: string, wdmd: string, wdml: string, wdmm: string, wdop: string, wqam: string, wqcm: string, wqdv: string, wqmd: string, wqml: string, wqmm: string, wqop: string, xor: string, xori: string, call: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, ccp: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, contractRoot: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, croo: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, csiz: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, k256: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, ldc: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, logd: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, mcl: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, mcli: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, mcp: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, mcpi: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, meq: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, retd: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, s256: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, scwq: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, smo: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, srwq: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, stateRoot: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, swwq: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string }, vmInitialization: { __typename: 'HeavyOperation', base: string, gasPerUnit: string } | { __typename: 'LightOperation', base: string, unitsPerGas: string } }, latestBlock: { __typename: 'Block', height: string, id: string, consensus: { __typename: 'Genesis', chainConfigHash: string, coinsRoot: string, contractsRoot: string, messagesRoot: string, transactionsRoot: string } | { __typename: 'PoAConsensus', signature: string }, header: { __typename: 'Header', applicationHash: string, consensusParametersVersion: string, daHeight: string, eventInboxRoot: string, height: string, id: string, messageOutboxRoot: string, messageReceiptCount: string, prevRoot: string, stateTransitionBytecodeVersion: string, time: string, transactionsCount: string, transactionsRoot: string }, transactions: Array<{ __typename: 'Transaction', bytecodeRoot?: string | null, bytecodeWitnessIndex?: string | null, id: string, inputAssetIds?: Array | null, inputContracts?: Array | null, isCreate: boolean, isMint: boolean, isScript: boolean, isUpgrade: boolean, isUpload: boolean, maturity?: string | null, mintAmount?: string | null, mintAssetId?: string | null, mintGasPrice?: string | null, proofSet?: Array | null, rawPayload: string, receiptsRoot?: string | null, salt?: string | null, script?: string | null, scriptData?: string | null, scriptGasLimit?: string | null, storageSlots?: Array | null, subsectionIndex?: string | null, subsectionsNumber?: string | null, txPointer?: string | null, witnesses?: Array | null, inputContract?: { __typename: 'InputContract', balanceRoot: string, contractId: string, stateRoot: string, txPointer: string, utxoId: string } | null, inputs?: Array<{ __typename: 'InputCoin', amount: string, assetId: string, owner: string, predicate: string, predicateData: string, predicateGasUsed: string, txPointer: string, utxoId: string, witnessIndex: string } | { __typename: 'InputContract', balanceRoot: string, contractId: string, stateRoot: string, txPointer: string, utxoId: string } | { __typename: 'InputMessage', amount: string, data: string, nonce: string, predicate: string, predicateData: string, predicateGasUsed: string, recipient: string, sender: string, witnessIndex: string }> | null, outputContract?: { __typename: 'ContractOutput', balanceRoot: string, inputIndex: string, stateRoot: string } | null, outputs: Array<{ __typename: 'ChangeOutput', amount: string, assetId: string, to: string } | { __typename: 'CoinOutput', amount: string, assetId: string, to: string } | { __typename: 'ContractCreated', contract: string, stateRoot: string } | { __typename: 'ContractOutput', balanceRoot: string, inputIndex: string, stateRoot: string } | { __typename: 'VariableOutput', amount: string, assetId: string, to: string }>, policies?: { __typename: 'Policies', maturity?: string | null, maxFee?: string | null, tip?: string | null, witnessLimit?: string | null } | null, status?: { __typename: 'FailureStatus', reason: string, time: string, totalFee: string, totalGas: string, transactionId: string, block: { __typename: 'Block', height: string, id: string, consensus: { __typename: 'Genesis', chainConfigHash: string, coinsRoot: string, contractsRoot: string, messagesRoot: string, transactionsRoot: string } | { __typename: 'PoAConsensus', signature: string }, header: { __typename: 'Header', applicationHash: string, consensusParametersVersion: string, daHeight: string, eventInboxRoot: string, height: string, id: string, messageOutboxRoot: string, messageReceiptCount: string, prevRoot: string, stateTransitionBytecodeVersion: string, time: string, transactionsCount: string, transactionsRoot: string }, transactions: Array<{ __typename: 'Transaction', bytecodeRoot?: string | null, bytecodeWitnessIndex?: string | null, id: string, inputAssetIds?: Array | null, inputContracts?: Array | null, isCreate: boolean, isMint: boolean, isScript: boolean, isUpgrade: boolean, isUpload: boolean, maturity?: string | null, mintAmount?: string | null, mintAssetId?: string | null, mintGasPrice?: string | null, proofSet?: Array | null, rawPayload: string, receiptsRoot?: string | null, salt?: string | null, script?: string | null, scriptData?: string | null, scriptGasLimit?: string | null, storageSlots?: Array | null, subsectionIndex?: string | null, subsectionsNumber?: string | null, txPointer?: string | null, witnesses?: Array | null, inputContract?: { __typename: 'InputContract', balanceRoot: string, contractId: string, stateRoot: string, txPointer: string, utxoId: string } | null, inputs?: Array<{ __typename: 'InputCoin', amount: string, assetId: string, owner: string, predicate: string, predicateData: string, predicateGasUsed: string, txPointer: string, utxoId: string, witnessIndex: string } | { __typename: 'InputContract', balanceRoot: string, contractId: string, stateRoot: string, txPointer: string, utxoId: string } | { __typename: 'InputMessage', amount: string, data: string, nonce: string, predicate: string, predicateData: string, predicateGasUsed: string, recipient: string, sender: string, witnessIndex: string }> | null, outputContract?: { __typename: 'ContractOutput', balanceRoot: string, inputIndex: string, stateRoot: string } | null, outputs: Array<{ __typename: 'ChangeOutput', amount: string, assetId: string, to: string } | { __typename: 'CoinOutput', amount: string, assetId: string, to: string } | { __typename: 'ContractCreated', contract: string, stateRoot: string } | { __typename: 'ContractOutput', balanceRoot: string, inputIndex: string, stateRoot: string } | { __typename: 'VariableOutput', amount: string, assetId: string, to: string }>, policies?: { __typename: 'Policies', maturity?: string | null, maxFee?: string | null, tip?: string | null, witnessLimit?: string | null } | null, status?: { __typename: 'FailureStatus', reason: string, time: string, totalFee: string, totalGas: string, transactionId: string } | { __typename: 'SqueezedOutStatus', reason: string } | { __typename: 'SubmittedStatus', time: string } | { __typename: 'SuccessStatus', time: string, totalFee: string, totalGas: string, transactionId: string } | null, upgradePurpose?: { __typename: 'ConsensusParametersPurpose', checksum: string, witnessIndex: string } | { __typename: 'StateTransitionPurpose', root: string } | null }> }, programState?: { __typename: 'ProgramState', data: string, returnType: GQLReturnType } | null, receipts: Array<{ __typename: 'Receipt', amount?: string | null, assetId?: string | null, contractId?: string | null, data?: string | null, digest?: string | null, gas?: string | null, gasUsed?: string | null, id?: string | null, is?: string | null, len?: string | null, nonce?: string | null, param1?: string | null, param2?: string | null, pc?: string | null, ptr?: string | null, ra?: string | null, rb?: string | null, rc?: string | null, rd?: string | null, reason?: string | null, receiptType: GQLReceiptType, recipient?: string | null, result?: string | null, sender?: string | null, subId?: string | null, to?: string | null, toAddress?: string | null, val?: string | null }> } | { __typename: 'SqueezedOutStatus', reason: string } | { __typename: 'SubmittedStatus', time: string } | { __typename: 'SuccessStatus', time: string, totalFee: string, totalGas: string, transactionId: string, block: { __typename: 'Block', height: string, id: string, consensus: { __typename: 'Genesis', chainConfigHash: string, coinsRoot: string, contractsRoot: string, messagesRoot: string, transactionsRoot: string } | { __typename: 'PoAConsensus', signature: string }, header: { __typename: 'Header', applicationHash: string, consensusParametersVersion: string, daHeight: string, eventInboxRoot: string, height: string, id: string, messageOutboxRoot: string, messageReceiptCount: string, prevRoot: string, stateTransitionBytecodeVersion: string, time: string, transactionsCount: string, transactionsRoot: string }, transactions: Array<{ __typename: 'Transaction', bytecodeRoot?: string | null, bytecodeWitnessIndex?: string | null, id: string, inputAssetIds?: Array | null, inputContracts?: Array | null, isCreate: boolean, isMint: boolean, isScript: boolean, isUpgrade: boolean, isUpload: boolean, maturity?: string | null, mintAmount?: string | null, mintAssetId?: string | null, mintGasPrice?: string | null, proofSet?: Array | null, rawPayload: string, receiptsRoot?: string | null, salt?: string | null, script?: string | null, scriptData?: string | null, scriptGasLimit?: string | null, storageSlots?: Array | null, subsectionIndex?: string | null, subsectionsNumber?: string | null, txPointer?: string | null, witnesses?: Array | null, inputContract?: { __typename: 'InputContract', balanceRoot: string, contractId: string, stateRoot: string, txPointer: string, utxoId: string } | null, inputs?: Array<{ __typename: 'InputCoin', amount: string, assetId: string, owner: string, predicate: string, predicateData: string, predicateGasUsed: string, txPointer: string, utxoId: string, witnessIndex: string } | { __typename: 'InputContract', balanceRoot: string, contractId: string, stateRoot: string, txPointer: string, utxoId: string } | { __typename: 'InputMessage', amount: string, data: string, nonce: string, predicate: string, predicateData: string, predicateGasUsed: string, recipient: string, sender: string, witnessIndex: string }> | null, outputContract?: { __typename: 'ContractOutput', balanceRoot: string, inputIndex: string, stateRoot: string } | null, outputs: Array<{ __typename: 'ChangeOutput', amount: string, assetId: string, to: string } | { __typename: 'CoinOutput', amount: string, assetId: string, to: string } | { __typename: 'ContractCreated', contract: string, stateRoot: string } | { __typename: 'ContractOutput', balanceRoot: string, inputIndex: string, stateRoot: string } | { __typename: 'VariableOutput', amount: string, assetId: string, to: string }>, policies?: { __typename: 'Policies', maturity?: string | null, maxFee?: string | null, tip?: string | null, witnessLimit?: string | null } | null, status?: { __typename: 'FailureStatus', reason: string, time: string, totalFee: string, totalGas: string, transactionId: string } | { __typename: 'SqueezedOutStatus', reason: string } | { __typename: 'SubmittedStatus', time: string } | { __typename: 'SuccessStatus', time: string, totalFee: string, totalGas: string, transactionId: string } | null, upgradePurpose?: { __typename: 'ConsensusParametersPurpose', checksum: string, witnessIndex: string } | { __typename: 'StateTransitionPurpose', root: string } | null }> }, programState?: { __typename: 'ProgramState', data: string, returnType: GQLReturnType } | null, receipts: Array<{ __typename: 'Receipt', amount?: string | null, assetId?: string | null, contractId?: string | null, data?: string | null, digest?: string | null, gas?: string | null, gasUsed?: string | null, id?: string | null, is?: string | null, len?: string | null, nonce?: string | null, param1?: string | null, param2?: string | null, pc?: string | null, ptr?: string | null, ra?: string | null, rb?: string | null, rc?: string | null, rd?: string | null, reason?: string | null, receiptType: GQLReceiptType, recipient?: string | null, result?: string | null, sender?: string | null, subId?: string | null, to?: string | null, toAddress?: string | null, val?: string | null }> } | null, upgradePurpose?: { __typename: 'ConsensusParametersPurpose', checksum: string, witnessIndex: string } | { __typename: 'StateTransitionPurpose', root: string } | null }> } } };
+export type GQLChainQuery = {
+ __typename: 'Query';
+ chain: {
+ __typename: 'ChainInfo';
+ daHeight: string;
+ name: string;
+ consensusParameters: {
+ __typename: 'ConsensusParameters';
+ baseAssetId: string;
+ blockGasLimit: string;
+ chainId: string;
+ privilegedAddress: string;
+ contractParams: {
+ __typename: 'ContractParameters';
+ contractMaxSize: string;
+ maxStorageSlots: string;
+ };
+ feeParams: {
+ __typename: 'FeeParameters';
+ gasPerByte: string;
+ gasPriceFactor: string;
+ };
+ gasCosts: {
+ __typename: 'GasCosts';
+ add: string;
+ addi: string;
+ aloc: string;
+ and: string;
+ andi: string;
+ bal: string;
+ bhei: string;
+ bhsh: string;
+ burn: string;
+ cb: string;
+ cfei: string;
+ cfsi: string;
+ div: string;
+ divi: string;
+ eck1: string;
+ ecr1: string;
+ ed19: string;
+ eq: string;
+ exp: string;
+ expi: string;
+ flag: string;
+ gm: string;
+ gt: string;
+ gtf: string;
+ ji: string;
+ jmp: string;
+ jmpb: string;
+ jmpf: string;
+ jne: string;
+ jneb: string;
+ jnef: string;
+ jnei: string;
+ jnzb: string;
+ jnzf: string;
+ jnzi: string;
+ lb: string;
+ log: string;
+ lt: string;
+ lw: string;
+ mint: string;
+ mldv: string;
+ mlog: string;
+ modOp: string;
+ modi: string;
+ moveOp: string;
+ movi: string;
+ mroo: string;
+ mul: string;
+ muli: string;
+ newStoragePerByte: string;
+ noop: string;
+ not: string;
+ or: string;
+ ori: string;
+ poph: string;
+ popl: string;
+ pshh: string;
+ pshl: string;
+ ret: string;
+ rvrt: string;
+ sb: string;
+ sll: string;
+ slli: string;
+ srl: string;
+ srli: string;
+ srw: string;
+ sub: string;
+ subi: string;
+ sw: string;
+ sww: string;
+ time: string;
+ tr: string;
+ tro: string;
+ wdam: string;
+ wdcm: string;
+ wddv: string;
+ wdmd: string;
+ wdml: string;
+ wdmm: string;
+ wdop: string;
+ wqam: string;
+ wqcm: string;
+ wqdv: string;
+ wqmd: string;
+ wqml: string;
+ wqmm: string;
+ wqop: string;
+ xor: string;
+ xori: string;
+ call:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ ccp:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ contractRoot:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ croo:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ csiz:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ k256:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ ldc:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ logd:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ mcl:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ mcli:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ mcp:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ mcpi:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ meq:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ retd:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ s256:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ scwq:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ smo:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ srwq:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ stateRoot:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ swwq:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ vmInitialization:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ };
+ predicateParams: {
+ __typename: 'PredicateParameters';
+ maxGasPerPredicate: string;
+ maxMessageDataLength: string;
+ maxPredicateDataLength: string;
+ maxPredicateLength: string;
+ };
+ scriptParams: {
+ __typename: 'ScriptParameters';
+ maxScriptDataLength: string;
+ maxScriptLength: string;
+ };
+ txParams: {
+ __typename: 'TxParameters';
+ maxBytecodeSubsections: string;
+ maxGasPerTx: string;
+ maxInputs: string;
+ maxOutputs: string;
+ maxSize: string;
+ maxWitnesses: string;
+ };
+ };
+ gasCosts: {
+ __typename: 'GasCosts';
+ add: string;
+ addi: string;
+ aloc: string;
+ and: string;
+ andi: string;
+ bal: string;
+ bhei: string;
+ bhsh: string;
+ burn: string;
+ cb: string;
+ cfei: string;
+ cfsi: string;
+ div: string;
+ divi: string;
+ eck1: string;
+ ecr1: string;
+ ed19: string;
+ eq: string;
+ exp: string;
+ expi: string;
+ flag: string;
+ gm: string;
+ gt: string;
+ gtf: string;
+ ji: string;
+ jmp: string;
+ jmpb: string;
+ jmpf: string;
+ jne: string;
+ jneb: string;
+ jnef: string;
+ jnei: string;
+ jnzb: string;
+ jnzf: string;
+ jnzi: string;
+ lb: string;
+ log: string;
+ lt: string;
+ lw: string;
+ mint: string;
+ mldv: string;
+ mlog: string;
+ modOp: string;
+ modi: string;
+ moveOp: string;
+ movi: string;
+ mroo: string;
+ mul: string;
+ muli: string;
+ newStoragePerByte: string;
+ noop: string;
+ not: string;
+ or: string;
+ ori: string;
+ poph: string;
+ popl: string;
+ pshh: string;
+ pshl: string;
+ ret: string;
+ rvrt: string;
+ sb: string;
+ sll: string;
+ slli: string;
+ srl: string;
+ srli: string;
+ srw: string;
+ sub: string;
+ subi: string;
+ sw: string;
+ sww: string;
+ time: string;
+ tr: string;
+ tro: string;
+ wdam: string;
+ wdcm: string;
+ wddv: string;
+ wdmd: string;
+ wdml: string;
+ wdmm: string;
+ wdop: string;
+ wqam: string;
+ wqcm: string;
+ wqdv: string;
+ wqmd: string;
+ wqml: string;
+ wqmm: string;
+ wqop: string;
+ xor: string;
+ xori: string;
+ call:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ ccp:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ contractRoot:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ croo:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ csiz:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ k256:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ ldc:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ logd:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ mcl:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ mcli:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ mcp:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ mcpi:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ meq:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ retd:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ s256:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ scwq:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ smo:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ srwq:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ stateRoot:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ swwq:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ vmInitialization:
+ | { __typename: 'HeavyOperation'; base: string; gasPerUnit: string }
+ | { __typename: 'LightOperation'; base: string; unitsPerGas: string };
+ };
+ latestBlock: {
+ __typename: 'Block';
+ height: string;
+ id: string;
+ consensus:
+ | {
+ __typename: 'Genesis';
+ chainConfigHash: string;
+ coinsRoot: string;
+ contractsRoot: string;
+ messagesRoot: string;
+ transactionsRoot: string;
+ }
+ | { __typename: 'PoAConsensus'; signature: string };
+ header: {
+ __typename: 'Header';
+ applicationHash: string;
+ consensusParametersVersion: string;
+ daHeight: string;
+ eventInboxRoot: string;
+ height: string;
+ id: string;
+ messageOutboxRoot: string;
+ messageReceiptCount: string;
+ prevRoot: string;
+ stateTransitionBytecodeVersion: string;
+ time: string;
+ transactionsCount: string;
+ transactionsRoot: string;
+ };
+ transactions: Array<{
+ __typename: 'Transaction';
+ bytecodeRoot?: string | null;
+ bytecodeWitnessIndex?: string | null;
+ id: string;
+ inputAssetIds?: Array | null;
+ inputContracts?: Array | null;
+ isCreate: boolean;
+ isMint: boolean;
+ isScript: boolean;
+ isUpgrade: boolean;
+ isUpload: boolean;
+ maturity?: string | null;
+ mintAmount?: string | null;
+ mintAssetId?: string | null;
+ mintGasPrice?: string | null;
+ proofSet?: Array | null;
+ rawPayload: string;
+ receiptsRoot?: string | null;
+ salt?: string | null;
+ script?: string | null;
+ scriptData?: string | null;
+ scriptGasLimit?: string | null;
+ storageSlots?: Array | null;
+ subsectionIndex?: string | null;
+ subsectionsNumber?: string | null;
+ txPointer?: string | null;
+ witnesses?: Array | null;
+ inputContract?: {
+ __typename: 'InputContract';
+ balanceRoot: string;
+ contractId: string;
+ stateRoot: string;
+ txPointer: string;
+ utxoId: string;
+ } | null;
+ inputs?: Array<
+ | {
+ __typename: 'InputCoin';
+ amount: string;
+ assetId: string;
+ owner: string;
+ predicate: string;
+ predicateData: string;
+ predicateGasUsed: string;
+ txPointer: string;
+ utxoId: string;
+ witnessIndex: string;
+ }
+ | {
+ __typename: 'InputContract';
+ balanceRoot: string;
+ contractId: string;
+ stateRoot: string;
+ txPointer: string;
+ utxoId: string;
+ }
+ | {
+ __typename: 'InputMessage';
+ amount: string;
+ data: string;
+ nonce: string;
+ predicate: string;
+ predicateData: string;
+ predicateGasUsed: string;
+ recipient: string;
+ sender: string;
+ witnessIndex: string;
+ }
+ > | null;
+ outputContract?: {
+ __typename: 'ContractOutput';
+ balanceRoot: string;
+ inputIndex: string;
+ stateRoot: string;
+ } | null;
+ outputs: Array<
+ | {
+ __typename: 'ChangeOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ | {
+ __typename: 'CoinOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ | {
+ __typename: 'ContractCreated';
+ contract: string;
+ stateRoot: string;
+ }
+ | {
+ __typename: 'ContractOutput';
+ balanceRoot: string;
+ inputIndex: string;
+ stateRoot: string;
+ }
+ | {
+ __typename: 'VariableOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ >;
+ policies?: {
+ __typename: 'Policies';
+ maturity?: string | null;
+ maxFee?: string | null;
+ tip?: string | null;
+ witnessLimit?: string | null;
+ } | null;
+ status?:
+ | {
+ __typename: 'FailureStatus';
+ reason: string;
+ time: string;
+ totalFee: string;
+ totalGas: string;
+ transactionId: string;
+ block: {
+ __typename: 'Block';
+ height: string;
+ id: string;
+ consensus:
+ | {
+ __typename: 'Genesis';
+ chainConfigHash: string;
+ coinsRoot: string;
+ contractsRoot: string;
+ messagesRoot: string;
+ transactionsRoot: string;
+ }
+ | { __typename: 'PoAConsensus'; signature: string };
+ header: {
+ __typename: 'Header';
+ applicationHash: string;
+ consensusParametersVersion: string;
+ daHeight: string;
+ eventInboxRoot: string;
+ height: string;
+ id: string;
+ messageOutboxRoot: string;
+ messageReceiptCount: string;
+ prevRoot: string;
+ stateTransitionBytecodeVersion: string;
+ time: string;
+ transactionsCount: string;
+ transactionsRoot: string;
+ };
+ transactions: Array<{
+ __typename: 'Transaction';
+ bytecodeRoot?: string | null;
+ bytecodeWitnessIndex?: string | null;
+ id: string;
+ inputAssetIds?: Array | null;
+ inputContracts?: Array | null;
+ isCreate: boolean;
+ isMint: boolean;
+ isScript: boolean;
+ isUpgrade: boolean;
+ isUpload: boolean;
+ maturity?: string | null;
+ mintAmount?: string | null;
+ mintAssetId?: string | null;
+ mintGasPrice?: string | null;
+ proofSet?: Array | null;
+ rawPayload: string;
+ receiptsRoot?: string | null;
+ salt?: string | null;
+ script?: string | null;
+ scriptData?: string | null;
+ scriptGasLimit?: string | null;
+ storageSlots?: Array | null;
+ subsectionIndex?: string | null;
+ subsectionsNumber?: string | null;
+ txPointer?: string | null;
+ witnesses?: Array | null;
+ inputContract?: {
+ __typename: 'InputContract';
+ balanceRoot: string;
+ contractId: string;
+ stateRoot: string;
+ txPointer: string;
+ utxoId: string;
+ } | null;
+ inputs?: Array<
+ | {
+ __typename: 'InputCoin';
+ amount: string;
+ assetId: string;
+ owner: string;
+ predicate: string;
+ predicateData: string;
+ predicateGasUsed: string;
+ txPointer: string;
+ utxoId: string;
+ witnessIndex: string;
+ }
+ | {
+ __typename: 'InputContract';
+ balanceRoot: string;
+ contractId: string;
+ stateRoot: string;
+ txPointer: string;
+ utxoId: string;
+ }
+ | {
+ __typename: 'InputMessage';
+ amount: string;
+ data: string;
+ nonce: string;
+ predicate: string;
+ predicateData: string;
+ predicateGasUsed: string;
+ recipient: string;
+ sender: string;
+ witnessIndex: string;
+ }
+ > | null;
+ outputContract?: {
+ __typename: 'ContractOutput';
+ balanceRoot: string;
+ inputIndex: string;
+ stateRoot: string;
+ } | null;
+ outputs: Array<
+ | {
+ __typename: 'ChangeOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ | {
+ __typename: 'CoinOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ | {
+ __typename: 'ContractCreated';
+ contract: string;
+ stateRoot: string;
+ }
+ | {
+ __typename: 'ContractOutput';
+ balanceRoot: string;
+ inputIndex: string;
+ stateRoot: string;
+ }
+ | {
+ __typename: 'VariableOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ >;
+ policies?: {
+ __typename: 'Policies';
+ maturity?: string | null;
+ maxFee?: string | null;
+ tip?: string | null;
+ witnessLimit?: string | null;
+ } | null;
+ status?:
+ | {
+ __typename: 'FailureStatus';
+ reason: string;
+ time: string;
+ totalFee: string;
+ totalGas: string;
+ transactionId: string;
+ }
+ | { __typename: 'SqueezedOutStatus'; reason: string }
+ | { __typename: 'SubmittedStatus'; time: string }
+ | {
+ __typename: 'SuccessStatus';
+ time: string;
+ totalFee: string;
+ totalGas: string;
+ transactionId: string;
+ }
+ | null;
+ upgradePurpose?:
+ | {
+ __typename: 'ConsensusParametersPurpose';
+ checksum: string;
+ witnessIndex: string;
+ }
+ | { __typename: 'StateTransitionPurpose'; root: string }
+ | null;
+ }>;
+ };
+ programState?: {
+ __typename: 'ProgramState';
+ data: string;
+ returnType: GQLReturnType;
+ } | null;
+ receipts: Array<{
+ __typename: 'Receipt';
+ amount?: string | null;
+ assetId?: string | null;
+ contractId?: string | null;
+ data?: string | null;
+ digest?: string | null;
+ gas?: string | null;
+ gasUsed?: string | null;
+ id?: string | null;
+ is?: string | null;
+ len?: string | null;
+ nonce?: string | null;
+ param1?: string | null;
+ param2?: string | null;
+ pc?: string | null;
+ ptr?: string | null;
+ ra?: string | null;
+ rb?: string | null;
+ rc?: string | null;
+ rd?: string | null;
+ reason?: string | null;
+ receiptType: GQLReceiptType;
+ recipient?: string | null;
+ result?: string | null;
+ sender?: string | null;
+ subId?: string | null;
+ to?: string | null;
+ toAddress?: string | null;
+ val?: string | null;
+ }>;
+ }
+ | { __typename: 'SqueezedOutStatus'; reason: string }
+ | { __typename: 'SubmittedStatus'; time: string }
+ | {
+ __typename: 'SuccessStatus';
+ time: string;
+ totalFee: string;
+ totalGas: string;
+ transactionId: string;
+ block: {
+ __typename: 'Block';
+ height: string;
+ id: string;
+ consensus:
+ | {
+ __typename: 'Genesis';
+ chainConfigHash: string;
+ coinsRoot: string;
+ contractsRoot: string;
+ messagesRoot: string;
+ transactionsRoot: string;
+ }
+ | { __typename: 'PoAConsensus'; signature: string };
+ header: {
+ __typename: 'Header';
+ applicationHash: string;
+ consensusParametersVersion: string;
+ daHeight: string;
+ eventInboxRoot: string;
+ height: string;
+ id: string;
+ messageOutboxRoot: string;
+ messageReceiptCount: string;
+ prevRoot: string;
+ stateTransitionBytecodeVersion: string;
+ time: string;
+ transactionsCount: string;
+ transactionsRoot: string;
+ };
+ transactions: Array<{
+ __typename: 'Transaction';
+ bytecodeRoot?: string | null;
+ bytecodeWitnessIndex?: string | null;
+ id: string;
+ inputAssetIds?: Array | null;
+ inputContracts?: Array | null;
+ isCreate: boolean;
+ isMint: boolean;
+ isScript: boolean;
+ isUpgrade: boolean;
+ isUpload: boolean;
+ maturity?: string | null;
+ mintAmount?: string | null;
+ mintAssetId?: string | null;
+ mintGasPrice?: string | null;
+ proofSet?: Array | null;
+ rawPayload: string;
+ receiptsRoot?: string | null;
+ salt?: string | null;
+ script?: string | null;
+ scriptData?: string | null;
+ scriptGasLimit?: string | null;
+ storageSlots?: Array | null;
+ subsectionIndex?: string | null;
+ subsectionsNumber?: string | null;
+ txPointer?: string | null;
+ witnesses?: Array | null;
+ inputContract?: {
+ __typename: 'InputContract';
+ balanceRoot: string;
+ contractId: string;
+ stateRoot: string;
+ txPointer: string;
+ utxoId: string;
+ } | null;
+ inputs?: Array<
+ | {
+ __typename: 'InputCoin';
+ amount: string;
+ assetId: string;
+ owner: string;
+ predicate: string;
+ predicateData: string;
+ predicateGasUsed: string;
+ txPointer: string;
+ utxoId: string;
+ witnessIndex: string;
+ }
+ | {
+ __typename: 'InputContract';
+ balanceRoot: string;
+ contractId: string;
+ stateRoot: string;
+ txPointer: string;
+ utxoId: string;
+ }
+ | {
+ __typename: 'InputMessage';
+ amount: string;
+ data: string;
+ nonce: string;
+ predicate: string;
+ predicateData: string;
+ predicateGasUsed: string;
+ recipient: string;
+ sender: string;
+ witnessIndex: string;
+ }
+ > | null;
+ outputContract?: {
+ __typename: 'ContractOutput';
+ balanceRoot: string;
+ inputIndex: string;
+ stateRoot: string;
+ } | null;
+ outputs: Array<
+ | {
+ __typename: 'ChangeOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ | {
+ __typename: 'CoinOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ | {
+ __typename: 'ContractCreated';
+ contract: string;
+ stateRoot: string;
+ }
+ | {
+ __typename: 'ContractOutput';
+ balanceRoot: string;
+ inputIndex: string;
+ stateRoot: string;
+ }
+ | {
+ __typename: 'VariableOutput';
+ amount: string;
+ assetId: string;
+ to: string;
+ }
+ >;
+ policies?: {
+ __typename: 'Policies';
+ maturity?: string | null;
+ maxFee?: string | null;
+ tip?: string | null;
+ witnessLimit?: string | null;
+ } | null;
+ status?:
+ | {
+ __typename: 'FailureStatus';
+ reason: string;
+ time: string;
+ totalFee: string;
+ totalGas: string;
+ transactionId: string;
+ }
+ | { __typename: 'SqueezedOutStatus'; reason: string }
+ | { __typename: 'SubmittedStatus'; time: string }
+ | {
+ __typename: 'SuccessStatus';
+ time: string;
+ totalFee: string;
+ totalGas: string;
+ transactionId: string;
+ }
+ | null;
+ upgradePurpose?:
+ | {
+ __typename: 'ConsensusParametersPurpose';
+ checksum: string;
+ witnessIndex: string;
+ }
+ | { __typename: 'StateTransitionPurpose'; root: string }
+ | null;
+ }>;
+ };
+ programState?: {
+ __typename: 'ProgramState';
+ data: string;
+ returnType: GQLReturnType;
+ } | null;
+ receipts: Array<{
+ __typename: 'Receipt';
+ amount?: string | null;
+ assetId?: string | null;
+ contractId?: string | null;
+ data?: string | null;
+ digest?: string | null;
+ gas?: string | null;
+ gasUsed?: string | null;
+ id?: string | null;
+ is?: string | null;
+ len?: string | null;
+ nonce?: string | null;
+ param1?: string | null;
+ param2?: string | null;
+ pc?: string | null;
+ ptr?: string | null;
+ ra?: string | null;
+ rb?: string | null;
+ rc?: string | null;
+ rd?: string | null;
+ reason?: string | null;
+ receiptType: GQLReceiptType;
+ recipient?: string | null;
+ result?: string | null;
+ sender?: string | null;
+ subId?: string | null;
+ to?: string | null;
+ toAddress?: string | null;
+ val?: string | null;
+ }>;
+ }
+ | null;
+ upgradePurpose?:
+ | {
+ __typename: 'ConsensusParametersPurpose';
+ checksum: string;
+ witnessIndex: string;
+ }
+ | { __typename: 'StateTransitionPurpose'; root: string }
+ | null;
+ }>;
+ };
+ };
+};
export type GQLCoinsQueryVariables = Exact<{
after?: InputMaybe;
@@ -1485,27 +3384,87 @@ export type GQLCoinsQueryVariables = Exact<{
last?: InputMaybe;
}>;
-
-export type GQLCoinsQuery = { __typename: 'Query', coins: { __typename: 'CoinConnection', edges: Array<{ __typename: 'CoinEdge', cursor: string, node: { __typename: 'Coin', amount: string, assetId: string, blockCreated: string, owner: string, txCreatedIdx: string, utxoId: string } }>, nodes: Array<{ __typename: 'Coin', amount: string, assetId: string, blockCreated: string, owner: string, txCreatedIdx: string, utxoId: string }>, pageInfo: { __typename: 'PageInfo', endCursor?: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | null } } };
+export type GQLCoinsQuery = {
+ __typename: 'Query';
+ coins: {
+ __typename: 'CoinConnection';
+ edges: Array<{
+ __typename: 'CoinEdge';
+ cursor: string;
+ node: {
+ __typename: 'Coin';
+ amount: string;
+ assetId: string;
+ blockCreated: string;
+ owner: string;
+ txCreatedIdx: string;
+ utxoId: string;
+ };
+ }>;
+ nodes: Array<{
+ __typename: 'Coin';
+ amount: string;
+ assetId: string;
+ blockCreated: string;
+ owner: string;
+ txCreatedIdx: string;
+ utxoId: string;
+ }>;
+ pageInfo: {
+ __typename: 'PageInfo';
+ endCursor?: string | null;
+ hasNextPage: boolean;
+ hasPreviousPage: boolean;
+ startCursor?: string | null;
+ };
+ };
+};
export type GQLContractQueryVariables = Exact<{
id: Scalars['ContractId']['input'];
}>;
-
-export type GQLContractQuery = { __typename: 'Query', contract?: { __typename: 'Contract', id: string, bytecode: string } | null };
+export type GQLContractQuery = {
+ __typename: 'Query';
+ contract?: { __typename: 'Contract'; id: string; bytecode: string } | null;
+};
export type GQLContractBalanceQueryVariables = Exact<{
asset: Scalars['AssetId']['input'];
contract: Scalars['ContractId']['input'];
}>;
+export type GQLContractBalanceQuery = {
+ __typename: 'Query';
+ contractBalance: {
+ __typename: 'ContractBalance';
+ amount: string;
+ assetId: string;
+ contract: string;
+ };
+};
-export type GQLContractBalanceQuery = { __typename: 'Query', contractBalance: { __typename: 'ContractBalance', amount: string, assetId: string, contract: string } };
-
-export type GQLContractBalanceNodeFragment = { __typename: 'ContractBalance', amount: string, assetId: string };
+export type GQLContractBalanceNodeFragment = {
+ __typename: 'ContractBalance';
+ amount: string;
+ assetId: string;
+};
-export type GQLContractBalanceConnectionNodeFragment = { __typename: 'ContractBalanceConnection', edges: Array<{ __typename: 'ContractBalanceEdge', cursor: string, node: { __typename: 'ContractBalance', amount: string, assetId: string } }>, pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, endCursor?: string | null, startCursor?: string | null } };
+export type GQLContractBalanceConnectionNodeFragment = {
+ __typename: 'ContractBalanceConnection';
+ edges: Array<{
+ __typename: 'ContractBalanceEdge';
+ cursor: string;
+ node: { __typename: 'ContractBalance'; amount: string; assetId: string };
+ }>;
+ pageInfo: {
+ __typename: 'PageInfo';
+ hasNextPage: boolean;
+ hasPreviousPage: boolean;
+ endCursor?: string | null;
+ startCursor?: string | null;
+ };
+};
export type GQLContractBalancesQueryVariables = Exact<{
after?: InputMaybe;
@@ -1515,13 +3474,47 @@ export type GQLContractBalancesQueryVariables = Exact<{
last?: InputMaybe;
}>;
+export type GQLContractBalancesQuery = {
+ __typename: 'Query';
+ contractBalances: {
+ __typename: 'ContractBalanceConnection';
+ edges: Array<{
+ __typename: 'ContractBalanceEdge';
+ cursor: string;
+ node: { __typename: 'ContractBalance'; amount: string; assetId: string };
+ }>;
+ pageInfo: {
+ __typename: 'PageInfo';
+ hasNextPage: boolean;
+ hasPreviousPage: boolean;
+ endCursor?: string | null;
+ startCursor?: string | null;
+ };
+ };
+};
-export type GQLContractBalancesQuery = { __typename: 'Query', contractBalances: { __typename: 'ContractBalanceConnection', edges: Array<{ __typename: 'ContractBalanceEdge', cursor: string, node: { __typename: 'ContractBalance', amount: string, assetId: string } }>, pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, endCursor?: string | null, startCursor?: string | null } } };
-
-export type GQLNodeInfoQueryVariables = Exact<{ [key: string]: never; }>;
-
+export type GQLNodeInfoQueryVariables = Exact<{ [key: string]: never }>;
-export type GQLNodeInfoQuery = { __typename: 'Query', nodeInfo: { __typename: 'NodeInfo', maxDepth: string, maxTx: string, nodeVersion: string, utxoValidation: boolean, vmBacktrace: boolean, peers: Array<{ __typename: 'PeerInfo', addresses: Array, appScore: number, blockHeight?: string | null, clientVersion?: string | null, id: string, lastHeartbeatMs: string }> } };
+export type GQLNodeInfoQuery = {
+ __typename: 'Query';
+ nodeInfo: {
+ __typename: 'NodeInfo';
+ maxDepth: string;
+ maxTx: string;
+ nodeVersion: string;
+ utxoValidation: boolean;
+ vmBacktrace: boolean;
+ peers: Array<{
+ __typename: 'PeerInfo';
+ addresses: Array;
+ appScore: number;
+ blockHeight?: string | null;
+ clientVersion?: string | null;
+ id: string;
+ lastHeartbeatMs: string;
+ }>;
+ };
+};
export const BalanceItemFragmentDoc = gql`
fragment BalanceItem on Balance {
@@ -3252,10 +5245,19 @@ export const NodeInfoDocument = gql`
}
`;
-export type SdkFunctionWrapper = (action: (requestHeaders?:Record) => Promise, operationName: string, operationType?: string, variables?: any) => Promise;
-
-
-const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType, _variables) => action();
+export type SdkFunctionWrapper = (
+ action: (requestHeaders?: Record) => Promise,
+ operationName: string,
+ operationType?: string,
+ variables?: any,
+) => Promise;
+
+const defaultWrapper: SdkFunctionWrapper = (
+ action,
+ _operationName,
+ _operationType,
+ _variables,
+) => action();
const BalanceDocumentString = print(BalanceDocument);
const BalancesDocumentString = print(BalancesDocument);
const BlocksDocumentString = print(BlocksDocument);
@@ -3265,35 +5267,205 @@ const ContractDocumentString = print(ContractDocument);
const ContractBalanceDocumentString = print(ContractBalanceDocument);
const ContractBalancesDocumentString = print(ContractBalancesDocument);
const NodeInfoDocumentString = print(NodeInfoDocument);
-export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) {
+export function getSdk(
+ client: GraphQLClient,
+ withWrapper: SdkFunctionWrapper = defaultWrapper,
+) {
return {
- balance(variables: GQLBalanceQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{ data: GQLBalanceQuery; errors?: GraphQLError[]; extensions?: any; headers: Headers; status: number; }> {
- return withWrapper((wrappedRequestHeaders) => client.rawRequest(BalanceDocumentString, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'balance', 'query', variables);
+ balance(
+ variables: GQLBalanceQueryVariables,
+ requestHeaders?: GraphQLClientRequestHeaders,
+ ): Promise<{
+ data: GQLBalanceQuery;
+ errors?: GraphQLError[];
+ extensions?: any;
+ headers: Headers;
+ status: number;
+ }> {
+ return withWrapper(
+ (wrappedRequestHeaders) =>
+ client.rawRequest(BalanceDocumentString, variables, {
+ ...requestHeaders,
+ ...wrappedRequestHeaders,
+ }),
+ 'balance',
+ 'query',
+ variables,
+ );
},
- balances(variables: GQLBalancesQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{ data: GQLBalancesQuery; errors?: GraphQLError[]; extensions?: any; headers: Headers; status: number; }> {
- return withWrapper((wrappedRequestHeaders) => client.rawRequest(BalancesDocumentString, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'balances', 'query', variables);
+ balances(
+ variables: GQLBalancesQueryVariables,
+ requestHeaders?: GraphQLClientRequestHeaders,
+ ): Promise<{
+ data: GQLBalancesQuery;
+ errors?: GraphQLError[];
+ extensions?: any;
+ headers: Headers;
+ status: number;
+ }> {
+ return withWrapper(
+ (wrappedRequestHeaders) =>
+ client.rawRequest(
+ BalancesDocumentString,
+ variables,
+ { ...requestHeaders, ...wrappedRequestHeaders },
+ ),
+ 'balances',
+ 'query',
+ variables,
+ );
},
- blocks(variables?: GQLBlocksQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{ data: GQLBlocksQuery; errors?: GraphQLError[]; extensions?: any; headers: Headers; status: number; }> {
- return withWrapper((wrappedRequestHeaders) => client.rawRequest(BlocksDocumentString, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'blocks', 'query', variables);
+ blocks(
+ variables?: GQLBlocksQueryVariables,
+ requestHeaders?: GraphQLClientRequestHeaders,
+ ): Promise<{
+ data: GQLBlocksQuery;
+ errors?: GraphQLError[];
+ extensions?: any;
+ headers: Headers;
+ status: number;
+ }> {
+ return withWrapper(
+ (wrappedRequestHeaders) =>
+ client.rawRequest(BlocksDocumentString, variables, {
+ ...requestHeaders,
+ ...wrappedRequestHeaders,
+ }),
+ 'blocks',
+ 'query',
+ variables,
+ );
},
- chain(variables?: GQLChainQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{ data: GQLChainQuery; errors?: GraphQLError[]; extensions?: any; headers: Headers; status: number; }> {
- return withWrapper((wrappedRequestHeaders) => client.rawRequest(ChainDocumentString, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'chain', 'query', variables);
+ chain(
+ variables?: GQLChainQueryVariables,
+ requestHeaders?: GraphQLClientRequestHeaders,
+ ): Promise<{
+ data: GQLChainQuery;
+ errors?: GraphQLError[];
+ extensions?: any;
+ headers: Headers;
+ status: number;
+ }> {
+ return withWrapper(
+ (wrappedRequestHeaders) =>
+ client.rawRequest(ChainDocumentString, variables, {
+ ...requestHeaders,
+ ...wrappedRequestHeaders,
+ }),
+ 'chain',
+ 'query',
+ variables,
+ );
},
- coins(variables: GQLCoinsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{ data: GQLCoinsQuery; errors?: GraphQLError[]; extensions?: any; headers: Headers; status: number; }> {
- return withWrapper((wrappedRequestHeaders) => client.rawRequest(CoinsDocumentString, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'coins', 'query', variables);
+ coins(
+ variables: GQLCoinsQueryVariables,
+ requestHeaders?: GraphQLClientRequestHeaders,
+ ): Promise<{
+ data: GQLCoinsQuery;
+ errors?: GraphQLError[];
+ extensions?: any;
+ headers: Headers;
+ status: number;
+ }> {
+ return withWrapper(
+ (wrappedRequestHeaders) =>
+ client.rawRequest(CoinsDocumentString, variables, {
+ ...requestHeaders,
+ ...wrappedRequestHeaders,
+ }),
+ 'coins',
+ 'query',
+ variables,
+ );
},
- contract(variables: GQLContractQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{ data: GQLContractQuery; errors?: GraphQLError[]; extensions?: any; headers: Headers; status: number; }> {
- return withWrapper((wrappedRequestHeaders) => client.rawRequest(ContractDocumentString, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'contract', 'query', variables);
+ contract(
+ variables: GQLContractQueryVariables,
+ requestHeaders?: GraphQLClientRequestHeaders,
+ ): Promise<{
+ data: GQLContractQuery;
+ errors?: GraphQLError[];
+ extensions?: any;
+ headers: Headers;
+ status: number;
+ }> {
+ return withWrapper(
+ (wrappedRequestHeaders) =>
+ client.rawRequest(
+ ContractDocumentString,
+ variables,
+ { ...requestHeaders, ...wrappedRequestHeaders },
+ ),
+ 'contract',
+ 'query',
+ variables,
+ );
},
- contractBalance(variables: GQLContractBalanceQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{ data: GQLContractBalanceQuery; errors?: GraphQLError[]; extensions?: any; headers: Headers; status: number; }> {
- return withWrapper((wrappedRequestHeaders) => client.rawRequest(ContractBalanceDocumentString, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'contractBalance', 'query', variables);
+ contractBalance(
+ variables: GQLContractBalanceQueryVariables,
+ requestHeaders?: GraphQLClientRequestHeaders,
+ ): Promise<{
+ data: GQLContractBalanceQuery;
+ errors?: GraphQLError[];
+ extensions?: any;
+ headers: Headers;
+ status: number;
+ }> {
+ return withWrapper(
+ (wrappedRequestHeaders) =>
+ client.rawRequest(
+ ContractBalanceDocumentString,
+ variables,
+ { ...requestHeaders, ...wrappedRequestHeaders },
+ ),
+ 'contractBalance',
+ 'query',
+ variables,
+ );
},
- contractBalances(variables: GQLContractBalancesQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{ data: GQLContractBalancesQuery; errors?: GraphQLError[]; extensions?: any; headers: Headers; status: number; }> {
- return withWrapper((wrappedRequestHeaders) => client.rawRequest(ContractBalancesDocumentString, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'contractBalances', 'query', variables);
+ contractBalances(
+ variables: GQLContractBalancesQueryVariables,
+ requestHeaders?: GraphQLClientRequestHeaders,
+ ): Promise<{
+ data: GQLContractBalancesQuery;
+ errors?: GraphQLError[];
+ extensions?: any;
+ headers: Headers;
+ status: number;
+ }> {
+ return withWrapper(
+ (wrappedRequestHeaders) =>
+ client.rawRequest(
+ ContractBalancesDocumentString,
+ variables,
+ { ...requestHeaders, ...wrappedRequestHeaders },
+ ),
+ 'contractBalances',
+ 'query',
+ variables,
+ );
+ },
+ nodeInfo(
+ variables?: GQLNodeInfoQueryVariables,
+ requestHeaders?: GraphQLClientRequestHeaders,
+ ): Promise<{
+ data: GQLNodeInfoQuery;
+ errors?: GraphQLError[];
+ extensions?: any;
+ headers: Headers;
+ status: number;
+ }> {
+ return withWrapper(
+ (wrappedRequestHeaders) =>
+ client.rawRequest(
+ NodeInfoDocumentString,
+ variables,
+ { ...requestHeaders, ...wrappedRequestHeaders },
+ ),
+ 'nodeInfo',
+ 'query',
+ variables,
+ );
},
- nodeInfo(variables?: GQLNodeInfoQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{ data: GQLNodeInfoQuery; errors?: GraphQLError[]; extensions?: any; headers: Headers; status: number; }> {
- return withWrapper((wrappedRequestHeaders) => client.rawRequest(NodeInfoDocumentString, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'nodeInfo', 'query', variables);
- }
};
}
-export type Sdk = ReturnType;
\ No newline at end of file
+export type Sdk = ReturnType;
diff --git a/packages/graphql/src/graphql/generated/sdk.ts b/packages/graphql/src/graphql/generated/sdk.ts
index 007072263..7d00e6408 100644
--- a/packages/graphql/src/graphql/generated/sdk.ts
+++ b/packages/graphql/src/graphql/generated/sdk.ts
@@ -1,38 +1,51 @@
+import { GraphQLError, print } from 'graphql';
import type { GraphQLClient, RequestOptions } from 'graphql-request';
-import { GraphQLError, print } from 'graphql'
import gql from 'graphql-tag';
export type Maybe = T | null;
export type InputMaybe = Maybe;
-export type Exact = { [K in keyof T]: T[K] };
-export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
-export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
-export type MakeEmpty = { [_ in K]?: never };
-export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
+export type Exact = {
+ [K in keyof T]: T[K];
+};
+export type MakeOptional = Omit & {
+ [SubKey in K]?: Maybe;
+};
+export type MakeMaybe = Omit & {
+ [SubKey in K]: Maybe;
+};
+export type MakeEmpty<
+ T extends { [key: string]: unknown },
+ K extends keyof T,
+> = { [_ in K]?: never };
+export type Incremental =
+ | T
+ | {
+ [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
+ };
type GraphQLClientRequestHeaders = RequestOptions['requestHeaders'];
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
- ID: { input: string; output: string; }
- String: { input: string; output: string; }
- Boolean: { input: boolean; output: boolean; }
- Int: { input: number; output: number; }
- Float: { input: number; output: number; }
- Address: { input: string; output: string; }
- AssetId: { input: string; output: string; }
- BlockId: { input: string; output: string; }
- Bytes32: { input: string; output: string; }
- ContractId: { input: string; output: string; }
- HexString: { input: string; output: string; }
- Nonce: { input: string; output: string; }
- RelayedTransactionId: { input: string; output: string; }
- Salt: { input: string; output: string; }
- Signature: { input: string; output: string; }
- Tai64Timestamp: { input: string; output: string; }
- TransactionId: { input: string; output: string; }
- TxPointer: { input: string; output: string; }
- U16: { input: string; output: string; }
- U32: { input: string; output: string; }
- U64: { input: string; output: string; }
- UtxoId: { input: string; output: string; }
+ ID: { input: string; output: string };
+ String: { input: string; output: string };
+ Boolean: { input: boolean; output: boolean };
+ Int: { input: number; output: number };
+ Float: { input: number; output: number };
+ Address: { input: string; output: string };
+ AssetId: { input: string; output: string };
+ BlockId: { input: string; output: string };
+ Bytes32: { input: string; output: string };
+ ContractId: { input: string; output: string };
+ HexString: { input: string; output: string };
+ Nonce: { input: string; output: string };
+ RelayedTransactionId: { input: string; output: string };
+ Salt: { input: string; output: string };
+ Signature: { input: string; output: string };
+ Tai64Timestamp: { input: string; output: string };
+ TransactionId: { input: string; output: string };
+ TxPointer: { input: string; output: string };
+ U16: { input: string; output: string };
+ U32: { input: string; output: string };
+ U64: { input: string; output: string };
+ UtxoId: { input: string; output: string };
};
export type GQLBalance = {
@@ -101,7 +114,7 @@ export type GQLBlockEdge = {
};
export enum GQLBlockVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
/** Breakpoint, defined as a tuple of contract ID and relative PC offset inside it */
@@ -198,7 +211,7 @@ export type GQLConsensusParametersPurpose = {
};
export enum GQLConsensusParametersVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
export type GQLContract = {
@@ -267,7 +280,7 @@ export type GQLContractParameters = {
};
export enum GQLContractParametersVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
export type GQLDependentCost = GQLHeavyOperation | GQLLightOperation;
@@ -296,7 +309,9 @@ export type GQLDryRunTransactionExecutionStatus = {
status: GQLDryRunTransactionStatus;
};
-export type GQLDryRunTransactionStatus = GQLDryRunFailureStatus | GQLDryRunSuccessStatus;
+export type GQLDryRunTransactionStatus =
+ | GQLDryRunFailureStatus
+ | GQLDryRunSuccessStatus;
export type GQLEstimateGasPrice = {
__typename: 'EstimateGasPrice';
@@ -330,7 +345,7 @@ export type GQLFeeParameters = {
};
export enum GQLFeeParametersVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
export type GQLGasCosts = {
@@ -450,7 +465,7 @@ export type GQLGasCosts = {
};
export enum GQLGasCostsVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
export type GQLGenesis = {
@@ -470,7 +485,10 @@ export type GQLGenesis = {
transactionsRoot: Scalars['Bytes32']['output'];
};
-export type GQLGroupedInput = GQLGroupedInputCoin | GQLGroupedInputContract | GQLGroupedInputMessage;
+export type GQLGroupedInput =
+ | GQLGroupedInputCoin
+ | GQLGroupedInputContract
+ | GQLGroupedInputMessage;
export type GQLGroupedInputCoin = {
__typename: 'GroupedInputCoin';
@@ -500,10 +518,13 @@ export type GQLGroupedInputMessage = {
export enum GQLGroupedInputType {
InputCoin = 'InputCoin',
InputContract = 'InputContract',
- InputMessage = 'InputMessage'
+ InputMessage = 'InputMessage',
}
-export type GQLGroupedOutput = GQLGroupedOutputChanged | GQLGroupedOutputCoin | GQLGroupedOutputContractCreated;
+export type GQLGroupedOutput =
+ | GQLGroupedOutputChanged
+ | GQLGroupedOutputCoin
+ | GQLGroupedOutputContractCreated;
export type GQLGroupedOutputChanged = {
__typename: 'GroupedOutputChanged';
@@ -533,7 +554,7 @@ export type GQLGroupedOutputContractCreated = {
export enum GQLGroupedOutputType {
OutputChanged = 'OutputChanged',
OutputCoin = 'OutputCoin',
- OutputContractCreated = 'OutputContractCreated'
+ OutputContractCreated = 'OutputContractCreated',
}
export type GQLHeader = {
@@ -569,7 +590,7 @@ export type GQLHeader = {
};
export enum GQLHeaderVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
export type GQLHeavyOperation = {
@@ -688,7 +709,7 @@ export type GQLMessageProof = {
export enum GQLMessageState {
NotFound = 'NOT_FOUND',
Spent = 'SPENT',
- Unspent = 'UNSPENT'
+ Unspent = 'UNSPENT',
}
export type GQLMessageStatus = {
@@ -742,59 +763,49 @@ export type GQLMutation = {
submit: GQLTransaction;
};
-
export type GQLMutationContinueTxArgs = {
id: Scalars['ID']['input'];
};
-
export type GQLMutationDryRunArgs = {
gasPrice?: InputMaybe;
txs: Array;
utxoValidation?: InputMaybe;
};
-
export type GQLMutationEndSessionArgs = {
id: Scalars['ID']['input'];
};
-
export type GQLMutationExecuteArgs = {
id: Scalars['ID']['input'];
op: Scalars['String']['input'];
};
-
export type GQLMutationProduceBlocksArgs = {
blocksToProduce: Scalars['U32']['input'];
startTimestamp?: InputMaybe;
};
-
export type GQLMutationResetArgs = {
id: Scalars['ID']['input'];
};
-
export type GQLMutationSetBreakpointArgs = {
breakpoint: GQLBreakpoint;
id: Scalars['ID']['input'];
};
-
export type GQLMutationSetSingleSteppingArgs = {
enable: Scalars['Boolean']['input'];
id: Scalars['ID']['input'];
};
-
export type GQLMutationStartTxArgs = {
id: Scalars['ID']['input'];
txJson: Scalars['String']['input'];
};
-
export type GQLMutationSubmitArgs = {
tx: Scalars['HexString']['input'];
};
@@ -826,14 +837,19 @@ export enum GQLOperationType {
FinalResult = 'FINAL_RESULT',
FromAccount = 'FROM_ACCOUNT',
FromContract = 'FROM_CONTRACT',
- Rootless = 'ROOTLESS'
+ Rootless = 'ROOTLESS',
}
export type GQLOperationsFilterInput = {
transactionHash: Scalars['String']['input'];
};
-export type GQLOutput = GQLChangeOutput | GQLCoinOutput | GQLContractCreated | GQLContractOutput | GQLVariableOutput;
+export type GQLOutput =
+ | GQLChangeOutput
+ | GQLCoinOutput
+ | GQLContractCreated
+ | GQLContractOutput
+ | GQLVariableOutput;
/**
* A separate `Breakpoint` type to be used as an output, as a single
@@ -912,7 +928,7 @@ export type GQLPredicateParameters = {
};
export enum GQLPredicateParametersVersion {
- V1 = 'V1'
+ V1 = 'V1',
}
export type GQLProgramState = {
@@ -973,13 +989,11 @@ export type GQLQuery = {
transactionsByOwner: GQLTransactionConnection;
};
-
export type GQLQueryBalanceArgs = {
assetId: Scalars['AssetId']['input'];
owner: Scalars['Address']['input'];
};
-
export type GQLQueryBalancesArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -988,13 +1002,11 @@ export type GQLQueryBalancesArgs = {
last?: InputMaybe;
};
-
export type GQLQueryBlockArgs = {
height?: InputMaybe;
id?: InputMaybe;
};
-
export type GQLQueryBlocksArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1002,12 +1014,10 @@ export type GQLQueryBlocksArgs = {
last?: InputMaybe;
};
-
export type GQLQueryCoinArgs = {
utxoId: Scalars['UtxoId']['input'];
};
-
export type GQLQueryCoinsArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1016,25 +1026,21 @@ export type GQLQueryCoinsArgs = {
last?: InputMaybe;
};
-
export type GQLQueryCoinsToSpendArgs = {
excludedIds?: InputMaybe;
owner: Scalars['Address']['input'];
queryPerAsset: Array;
};
-
export type GQLQueryContractArgs = {
id: Scalars['ContractId']['input'];
};
-
export type GQLQueryContractBalanceArgs = {
asset: Scalars['AssetId']['input'];
contract: Scalars['ContractId']['input'];
};
-
export type GQLQueryContractBalancesArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1043,7 +1049,6 @@ export type GQLQueryContractBalancesArgs = {
last?: InputMaybe;
};
-
export type GQLQueryContractsArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1051,29 +1056,24 @@ export type GQLQueryContractsArgs = {
last?: InputMaybe;
};
-
export type GQLQueryEstimateGasPriceArgs = {
blockHorizon?: InputMaybe;
};
-
export type GQLQueryEstimatePredicatesArgs = {
tx: Scalars['HexString']['input'];
};
-
export type GQLQueryMemoryArgs = {
id: Scalars['ID']['input'];
size: Scalars['U32']['input'];
start: Scalars['U32']['input'];
};
-
export type GQLQueryMessageArgs = {
nonce: Scalars['Nonce']['input'];
};
-
export type GQLQueryMessageProofArgs = {
commitBlockHeight?: InputMaybe;
commitBlockId?: InputMaybe;
@@ -1081,12 +1081,10 @@ export type GQLQueryMessageProofArgs = {
transactionId: Scalars['TransactionId']['input'];
};
-
export type GQLQueryMessageStatusArgs = {
nonce: Scalars['Nonce']['input'];
};
-
export type GQLQueryMessagesArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1095,33 +1093,27 @@ export type GQLQueryMessagesArgs = {
owner?: InputMaybe;
};
-
export type GQLQueryPredicateArgs = {
address: Scalars['String']['input'];
};
-
export type GQLQueryRegisterArgs = {
id: Scalars['ID']['input'];
register: Scalars['U32']['input'];
};
-
export type GQLQueryRelayedTransactionStatusArgs = {
id: Scalars['RelayedTransactionId']['input'];
};
-
export type GQLQuerySearchArgs = {
query: Scalars['String']['input'];
};
-
export type GQLQueryTransactionArgs = {
id: Scalars['TransactionId']['input'];
};
-
export type GQLQueryTransactionsArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1129,7 +1121,6 @@ export type GQLQueryTransactionsArgs = {
last?: InputMaybe;
};
-
export type GQLQueryTransactionsByBlockIdArgs = {
after?: InputMaybe;
before?: InputMaybe;
@@ -1138,7 +1129,6 @@ export type GQLQueryTransactionsByBlockIdArgs = {
last?: InputMaybe;
};
-
export type GQLQueryTransactionsByOwnerArgs = {
after?: InputMaybe;
before?: InputMaybe