@midnight-ntwrk/wallet-sdk-indexer-client 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  import * as Either from 'effect/Either';
2
- import { URLError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
2
+ import { type URLError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
3
3
  export declare const deriveWebSocketUrl: (url: URL | string) => Either.Either<string, URLError>;
4
4
  export declare const createWebSocketUrl: (httpUrl: URL | string, wsUrl?: string) => Either.Either<string, URLError>;
@@ -1,4 +1,4 @@
1
- import { Layer, Scope } from 'effect';
1
+ import { Layer, type Scope } from 'effect';
2
2
  import { QueryClient } from './QueryClient.js';
3
- import { InvalidProtocolSchemeError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
3
+ import { type InvalidProtocolSchemeError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
4
4
  export declare const layer: (config: QueryClient.ServerConfig) => Layer.Layer<QueryClient, InvalidProtocolSchemeError, Scope.Scope>;
@@ -1,10 +1,8 @@
1
1
  import { Effect, Context } from 'effect';
2
- import { ClientError, ServerError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
2
+ import { type ClientError, type ServerError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
3
3
  import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
4
4
  import { QueryClient } from './QueryClient.js';
5
- /**
6
- * Describes an invocable GraphQL query.
7
- */
5
+ /** Describes an invocable GraphQL query. */
8
6
  export interface Query<R, V, F extends Query.QueryFn<R, V> = Query.QueryFn<R, V>> extends Effect.Effect<F> {
9
7
  readonly tag: Context.Tag<Query<R, V>, F>;
10
8
  readonly run: F;
@@ -13,20 +11,15 @@ export declare namespace Query {
13
11
  /**
14
12
  * A GraphQL query (that may be parameterized with variables), that returns a typed document.
15
13
  *
14
+ * @remarks
15
+ * `Document` is a simple type alias for `TypedDocumentNode`.
16
16
  * @typeParam R The type returned by the GraphQL query.
17
17
  * @typeParam V A type that describes the variables present in the GraphQL query.
18
- *
19
- * @remarks
20
- * `Document` is a simple type alias for `TypedDocumentNode`.
21
18
  */
22
19
  type Document<R, V> = TypedDocumentNode<R, V>;
23
- /**
24
- * The variables of a {@link Document}.
25
- */
20
+ /** The variables of a {@link Document}. */
26
21
  type Variables<T> = T extends Document<any, infer V> ? V : never;
27
- /**
28
- * The expected result of executing a {@link Document}.
29
- */
22
+ /** The expected result of executing a {@link Document}. */
30
23
  type Result<T> = T extends Document<infer R, any> ? R : never;
31
24
  /**
32
25
  * Describes a function that executes a GraphQL query over some given variables.
@@ -1,5 +1,5 @@
1
- import { Effect, Context } from 'effect';
2
- import { ClientError, ServerError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
1
+ import { type Effect, Context } from 'effect';
2
+ import { type ClientError, type ServerError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
3
3
  import type { Query } from './Query.js';
4
4
  declare const QueryClient_base: Context.TagClass<QueryClient, "@midnight-ntwrk/indexer-client#QueryClient", QueryClient.Service>;
5
5
  export declare class QueryClient extends QueryClient_base {
@@ -1,10 +1,8 @@
1
1
  import { Effect, Stream, Context } from 'effect';
2
- import { ClientError, ServerError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
2
+ import { type ClientError, type ServerError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
3
3
  import { SubscriptionClient } from './SubscriptionClient.js';
4
4
  import type { Query } from './Query.js';
5
- /**
6
- * Describes a subscription of elements from an invocable GraphQL query.
7
- */
5
+ /** Describes a subscription of elements from an invocable GraphQL query. */
8
6
  export interface Subscription<R, V, F extends Subscription.SubscriptionFn<R, V> = Subscription.SubscriptionFn<R, V>> extends Effect.Effect<F> {
9
7
  readonly tag: Context.Tag<Subscription<R, V>, F>;
10
8
  readonly run: F;
@@ -1,6 +1,6 @@
1
- import { Stream, Context } from 'effect';
1
+ import { type Stream, Context } from 'effect';
2
2
  import type { Query } from './Query.js';
3
- import { ClientError, ServerError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
3
+ import { type ClientError, type ServerError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
4
4
  declare const SubscriptionClient_base: Context.TagClass<SubscriptionClient, "@midnight-ntwrk/indexer-client#SubscriptionClient", SubscriptionClient.Service>;
5
5
  export declare class SubscriptionClient extends SubscriptionClient_base {
6
6
  }
@@ -1,4 +1,4 @@
1
- import { Layer, Scope } from 'effect';
1
+ import { Layer, type Scope } from 'effect';
2
2
  import { SubscriptionClient } from './SubscriptionClient.js';
3
- import { InvalidProtocolSchemeError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
3
+ import { type InvalidProtocolSchemeError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
4
4
  export declare const layer: (config: SubscriptionClient.ServerConfig) => Layer.Layer<SubscriptionClient, InvalidProtocolSchemeError, Scope.Scope>;
@@ -12,5 +12,5 @@ export function isFragmentReady(queryNode, fragmentNode, data) {
12
12
  const fragDef = fragmentNode.definitions[0];
13
13
  const fragName = fragDef?.name?.value;
14
14
  const fields = (fragName && deferredFields[fragName]) || [];
15
- return fields.length > 0 && fields.every(field => data && field in data);
15
+ return fields.length > 0 && fields.every((field) => data && field in data);
16
16
  }
@@ -4,73 +4,58 @@ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-
4
4
  * Map of all GraphQL operations in the project.
5
5
  *
6
6
  * This map has several performance disadvantages:
7
+ *
7
8
  * 1. It is not tree-shakeable, so it will include all operations in the project.
8
9
  * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.
9
10
  * 3. It does not support dead code elimination, so it will add unused operations.
10
11
  *
11
- * Therefore it is highly recommended to use the babel or swc plugin for production.
12
- * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
12
+ * Therefore it is highly recommended to use the babel or swc plugin for production. Learn more about it here:
13
+ * https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
13
14
  */
14
15
  type Documents = {
15
- "\n query BlockHash($offset: BlockOffset) {\n block(offset: $offset) {\n height\n hash\n ledgerParameters\n timestamp\n }\n }\n ": typeof types.BlockHashDocument;
16
- "\n mutation Connect($viewingKey: ViewingKey!) {\n connect(viewingKey: $viewingKey)\n }\n ": typeof types.ConnectDocument;
17
- "\n mutation Disconnect($sessionId: HexEncoded!) {\n disconnect(sessionId: $sessionId)\n }\n ": typeof types.DisconnectDocument;
18
- "\n query FetchTermsAndConditions {\n block {\n systemParameters {\n termsAndConditions {\n hash\n url\n }\n }\n }\n }\n ": typeof types.FetchTermsAndConditionsDocument;
19
- "\n query TransactionStatus($transactionId: HexEncoded!) {\n transactions(offset: {identifier: $transactionId}) {\n __typename\n ... on RegularTransaction {\n identifiers\n transactionResult {\n segments {\n id\n success\n }\n status\n __typename\n }\n }\n }\n }\n ": typeof types.TransactionStatusDocument;
20
- "\n subscription DustLedgerEvents($id: Int) {\n dustLedgerEvents(id: $id) {\n type: __typename\n id\n raw\n maxId\n }\n }\n ": typeof types.DustLedgerEventsDocument;
21
- "\n subscription ShieldedTransactions($sessionId: HexEncoded!, $index: Int) {\n shieldedTransactions(sessionId: $sessionId, index: $index) {\n __typename\n ... on ShieldedTransactionsProgress {\n highestEndIndex\n highestCheckedEndIndex\n highestRelevantEndIndex\n }\n ... on RelevantTransaction {\n transaction {\n id\n raw\n hash\n protocolVersion\n identifiers\n startIndex\n endIndex\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n collapsedMerkleTree {\n startIndex\n endIndex\n update\n protocolVersion\n }\n }\n }\n }\n ": typeof types.ShieldedTransactionsDocument;
22
- "\n subscription UnshieldedTransactions($address: UnshieldedAddress!, $transactionId: Int) {\n unshieldedTransactions(address: $address, transactionId: $transactionId) {\n ... on UnshieldedTransaction {\n type: __typename\n transaction {\n type: __typename\n id\n hash\n protocolVersion\n block {\n timestamp\n }\n ... on RegularTransaction {\n identifiers\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n }\n createdUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n spentUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n }\n ... on UnshieldedTransactionsProgress {\n type: __typename\n highestTransactionId\n }\n }\n }\n ": typeof types.UnshieldedTransactionsDocument;
23
- "\n subscription ZswapEvents($id: Int) {\n zswapLedgerEvents(id: $id) {\n id\n raw\n maxId\n }\n }\n ": typeof types.ZswapEventsDocument;
16
+ '\n query BlockHash($offset: BlockOffset) {\n block(offset: $offset) {\n height\n hash\n ledgerParameters\n timestamp\n }\n }\n ': typeof types.BlockHashDocument;
17
+ '\n mutation Connect($viewingKey: ViewingKey!) {\n connect(viewingKey: $viewingKey)\n }\n ': typeof types.ConnectDocument;
18
+ '\n mutation Disconnect($sessionId: HexEncoded!) {\n disconnect(sessionId: $sessionId)\n }\n ': typeof types.DisconnectDocument;
19
+ '\n query FetchTermsAndConditions {\n block {\n systemParameters {\n termsAndConditions {\n hash\n url\n }\n }\n }\n }\n ': typeof types.FetchTermsAndConditionsDocument;
20
+ '\n query TransactionHistoryDetail($transactionHash: HexEncoded!) {\n transactions(offset: {hash: $transactionHash}) {\n __typename\n hash\n block {\n timestamp\n }\n ... on RegularTransaction {\n transactionResult {\n status\n }\n }\n }\n }\n ': typeof types.TransactionHistoryDetailDocument;
21
+ '\n query TransactionStatus($transactionId: HexEncoded!) {\n transactions(offset: {identifier: $transactionId}) {\n __typename\n ... on RegularTransaction {\n identifiers\n transactionResult {\n segments {\n id\n success\n }\n status\n __typename\n }\n }\n }\n }\n ': typeof types.TransactionStatusDocument;
22
+ '\n subscription DustLedgerEvents($id: Int) {\n dustLedgerEvents(id: $id) {\n type: __typename\n id\n raw\n maxId\n }\n }\n ': typeof types.DustLedgerEventsDocument;
23
+ '\n subscription ShieldedTransactions($sessionId: HexEncoded!, $index: Int) {\n shieldedTransactions(sessionId: $sessionId, index: $index) {\n __typename\n ... on ShieldedTransactionsProgress {\n highestEndIndex\n highestCheckedEndIndex\n highestRelevantEndIndex\n }\n ... on RelevantTransaction {\n transaction {\n id\n raw\n hash\n protocolVersion\n identifiers\n startIndex\n endIndex\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n collapsedMerkleTree {\n startIndex\n endIndex\n update\n protocolVersion\n }\n }\n }\n }\n ': typeof types.ShieldedTransactionsDocument;
24
+ '\n subscription UnshieldedTransactions($address: UnshieldedAddress!, $transactionId: Int) {\n unshieldedTransactions(address: $address, transactionId: $transactionId) {\n ... on UnshieldedTransaction {\n type: __typename\n transaction {\n type: __typename\n id\n hash\n protocolVersion\n block {\n timestamp\n }\n ... on RegularTransaction {\n identifiers\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n }\n createdUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n spentUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n }\n ... on UnshieldedTransactionsProgress {\n type: __typename\n highestTransactionId\n }\n }\n }\n ': typeof types.UnshieldedTransactionsDocument;
25
+ '\n subscription ZswapEvents($id: Int) {\n zswapLedgerEvents(id: $id) {\n id\n raw\n protocolVersion\n maxId\n }\n }\n ': typeof types.ZswapEventsDocument;
24
26
  };
25
27
  declare const documents: Documents;
26
28
  /**
27
29
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
28
30
  *
29
- *
30
31
  * @example
31
- * ```ts
32
- * const query = gql(`query GetUser($id: ID!) { user(id: $id) { name } }`);
33
- * ```
32
+ * ```ts
33
+ * const query = gql(`query GetUser($id: ID!) { user(id: $id) { name } }`);
34
+ * ```
34
35
  *
35
- * The query argument is unknown!
36
- * Please regenerate the types.
36
+ * The query argument is unknown!
37
+ * Please regenerate the types.
37
38
  */
38
39
  export declare function gql(source: string): unknown;
39
- /**
40
- * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
41
- */
42
- export declare function gql(source: "\n query BlockHash($offset: BlockOffset) {\n block(offset: $offset) {\n height\n hash\n ledgerParameters\n timestamp\n }\n }\n "): (typeof documents)["\n query BlockHash($offset: BlockOffset) {\n block(offset: $offset) {\n height\n hash\n ledgerParameters\n timestamp\n }\n }\n "];
43
- /**
44
- * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
45
- */
46
- export declare function gql(source: "\n mutation Connect($viewingKey: ViewingKey!) {\n connect(viewingKey: $viewingKey)\n }\n "): (typeof documents)["\n mutation Connect($viewingKey: ViewingKey!) {\n connect(viewingKey: $viewingKey)\n }\n "];
47
- /**
48
- * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
49
- */
50
- export declare function gql(source: "\n mutation Disconnect($sessionId: HexEncoded!) {\n disconnect(sessionId: $sessionId)\n }\n "): (typeof documents)["\n mutation Disconnect($sessionId: HexEncoded!) {\n disconnect(sessionId: $sessionId)\n }\n "];
51
- /**
52
- * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
53
- */
54
- export declare function gql(source: "\n query FetchTermsAndConditions {\n block {\n systemParameters {\n termsAndConditions {\n hash\n url\n }\n }\n }\n }\n "): (typeof documents)["\n query FetchTermsAndConditions {\n block {\n systemParameters {\n termsAndConditions {\n hash\n url\n }\n }\n }\n }\n "];
55
- /**
56
- * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
57
- */
58
- export declare function gql(source: "\n query TransactionStatus($transactionId: HexEncoded!) {\n transactions(offset: {identifier: $transactionId}) {\n __typename\n ... on RegularTransaction {\n identifiers\n transactionResult {\n segments {\n id\n success\n }\n status\n __typename\n }\n }\n }\n }\n "): (typeof documents)["\n query TransactionStatus($transactionId: HexEncoded!) {\n transactions(offset: {identifier: $transactionId}) {\n __typename\n ... on RegularTransaction {\n identifiers\n transactionResult {\n segments {\n id\n success\n }\n status\n __typename\n }\n }\n }\n }\n "];
59
- /**
60
- * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
61
- */
62
- export declare function gql(source: "\n subscription DustLedgerEvents($id: Int) {\n dustLedgerEvents(id: $id) {\n type: __typename\n id\n raw\n maxId\n }\n }\n "): (typeof documents)["\n subscription DustLedgerEvents($id: Int) {\n dustLedgerEvents(id: $id) {\n type: __typename\n id\n raw\n maxId\n }\n }\n "];
63
- /**
64
- * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
65
- */
66
- export declare function gql(source: "\n subscription ShieldedTransactions($sessionId: HexEncoded!, $index: Int) {\n shieldedTransactions(sessionId: $sessionId, index: $index) {\n __typename\n ... on ShieldedTransactionsProgress {\n highestEndIndex\n highestCheckedEndIndex\n highestRelevantEndIndex\n }\n ... on RelevantTransaction {\n transaction {\n id\n raw\n hash\n protocolVersion\n identifiers\n startIndex\n endIndex\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n collapsedMerkleTree {\n startIndex\n endIndex\n update\n protocolVersion\n }\n }\n }\n }\n "): (typeof documents)["\n subscription ShieldedTransactions($sessionId: HexEncoded!, $index: Int) {\n shieldedTransactions(sessionId: $sessionId, index: $index) {\n __typename\n ... on ShieldedTransactionsProgress {\n highestEndIndex\n highestCheckedEndIndex\n highestRelevantEndIndex\n }\n ... on RelevantTransaction {\n transaction {\n id\n raw\n hash\n protocolVersion\n identifiers\n startIndex\n endIndex\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n collapsedMerkleTree {\n startIndex\n endIndex\n update\n protocolVersion\n }\n }\n }\n }\n "];
67
- /**
68
- * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
69
- */
70
- export declare function gql(source: "\n subscription UnshieldedTransactions($address: UnshieldedAddress!, $transactionId: Int) {\n unshieldedTransactions(address: $address, transactionId: $transactionId) {\n ... on UnshieldedTransaction {\n type: __typename\n transaction {\n type: __typename\n id\n hash\n protocolVersion\n block {\n timestamp\n }\n ... on RegularTransaction {\n identifiers\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n }\n createdUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n spentUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n }\n ... on UnshieldedTransactionsProgress {\n type: __typename\n highestTransactionId\n }\n }\n }\n "): (typeof documents)["\n subscription UnshieldedTransactions($address: UnshieldedAddress!, $transactionId: Int) {\n unshieldedTransactions(address: $address, transactionId: $transactionId) {\n ... on UnshieldedTransaction {\n type: __typename\n transaction {\n type: __typename\n id\n hash\n protocolVersion\n block {\n timestamp\n }\n ... on RegularTransaction {\n identifiers\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n }\n createdUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n spentUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n }\n ... on UnshieldedTransactionsProgress {\n type: __typename\n highestTransactionId\n }\n }\n }\n "];
71
- /**
72
- * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
73
- */
74
- export declare function gql(source: "\n subscription ZswapEvents($id: Int) {\n zswapLedgerEvents(id: $id) {\n id\n raw\n maxId\n }\n }\n "): (typeof documents)["\n subscription ZswapEvents($id: Int) {\n zswapLedgerEvents(id: $id) {\n id\n raw\n maxId\n }\n }\n "];
40
+ /** The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */
41
+ export declare function gql(source: '\n query BlockHash($offset: BlockOffset) {\n block(offset: $offset) {\n height\n hash\n ledgerParameters\n timestamp\n }\n }\n '): (typeof documents)['\n query BlockHash($offset: BlockOffset) {\n block(offset: $offset) {\n height\n hash\n ledgerParameters\n timestamp\n }\n }\n '];
42
+ /** The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */
43
+ export declare function gql(source: '\n mutation Connect($viewingKey: ViewingKey!) {\n connect(viewingKey: $viewingKey)\n }\n '): (typeof documents)['\n mutation Connect($viewingKey: ViewingKey!) {\n connect(viewingKey: $viewingKey)\n }\n '];
44
+ /** The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */
45
+ export declare function gql(source: '\n mutation Disconnect($sessionId: HexEncoded!) {\n disconnect(sessionId: $sessionId)\n }\n '): (typeof documents)['\n mutation Disconnect($sessionId: HexEncoded!) {\n disconnect(sessionId: $sessionId)\n }\n '];
46
+ /** The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */
47
+ export declare function gql(source: '\n query FetchTermsAndConditions {\n block {\n systemParameters {\n termsAndConditions {\n hash\n url\n }\n }\n }\n }\n '): (typeof documents)['\n query FetchTermsAndConditions {\n block {\n systemParameters {\n termsAndConditions {\n hash\n url\n }\n }\n }\n }\n '];
48
+ /** The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */
49
+ export declare function gql(source: '\n query TransactionHistoryDetail($transactionHash: HexEncoded!) {\n transactions(offset: {hash: $transactionHash}) {\n __typename\n hash\n block {\n timestamp\n }\n ... on RegularTransaction {\n transactionResult {\n status\n }\n }\n }\n }\n '): (typeof documents)['\n query TransactionHistoryDetail($transactionHash: HexEncoded!) {\n transactions(offset: {hash: $transactionHash}) {\n __typename\n hash\n block {\n timestamp\n }\n ... on RegularTransaction {\n transactionResult {\n status\n }\n }\n }\n }\n '];
50
+ /** The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */
51
+ export declare function gql(source: '\n query TransactionStatus($transactionId: HexEncoded!) {\n transactions(offset: {identifier: $transactionId}) {\n __typename\n ... on RegularTransaction {\n identifiers\n transactionResult {\n segments {\n id\n success\n }\n status\n __typename\n }\n }\n }\n }\n '): (typeof documents)['\n query TransactionStatus($transactionId: HexEncoded!) {\n transactions(offset: {identifier: $transactionId}) {\n __typename\n ... on RegularTransaction {\n identifiers\n transactionResult {\n segments {\n id\n success\n }\n status\n __typename\n }\n }\n }\n }\n '];
52
+ /** The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */
53
+ export declare function gql(source: '\n subscription DustLedgerEvents($id: Int) {\n dustLedgerEvents(id: $id) {\n type: __typename\n id\n raw\n maxId\n }\n }\n '): (typeof documents)['\n subscription DustLedgerEvents($id: Int) {\n dustLedgerEvents(id: $id) {\n type: __typename\n id\n raw\n maxId\n }\n }\n '];
54
+ /** The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */
55
+ export declare function gql(source: '\n subscription ShieldedTransactions($sessionId: HexEncoded!, $index: Int) {\n shieldedTransactions(sessionId: $sessionId, index: $index) {\n __typename\n ... on ShieldedTransactionsProgress {\n highestEndIndex\n highestCheckedEndIndex\n highestRelevantEndIndex\n }\n ... on RelevantTransaction {\n transaction {\n id\n raw\n hash\n protocolVersion\n identifiers\n startIndex\n endIndex\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n collapsedMerkleTree {\n startIndex\n endIndex\n update\n protocolVersion\n }\n }\n }\n }\n '): (typeof documents)['\n subscription ShieldedTransactions($sessionId: HexEncoded!, $index: Int) {\n shieldedTransactions(sessionId: $sessionId, index: $index) {\n __typename\n ... on ShieldedTransactionsProgress {\n highestEndIndex\n highestCheckedEndIndex\n highestRelevantEndIndex\n }\n ... on RelevantTransaction {\n transaction {\n id\n raw\n hash\n protocolVersion\n identifiers\n startIndex\n endIndex\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n collapsedMerkleTree {\n startIndex\n endIndex\n update\n protocolVersion\n }\n }\n }\n }\n '];
56
+ /** The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */
57
+ export declare function gql(source: '\n subscription UnshieldedTransactions($address: UnshieldedAddress!, $transactionId: Int) {\n unshieldedTransactions(address: $address, transactionId: $transactionId) {\n ... on UnshieldedTransaction {\n type: __typename\n transaction {\n type: __typename\n id\n hash\n protocolVersion\n block {\n timestamp\n }\n ... on RegularTransaction {\n identifiers\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n }\n createdUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n spentUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n }\n ... on UnshieldedTransactionsProgress {\n type: __typename\n highestTransactionId\n }\n }\n }\n '): (typeof documents)['\n subscription UnshieldedTransactions($address: UnshieldedAddress!, $transactionId: Int) {\n unshieldedTransactions(address: $address, transactionId: $transactionId) {\n ... on UnshieldedTransaction {\n type: __typename\n transaction {\n type: __typename\n id\n hash\n protocolVersion\n block {\n timestamp\n }\n ... on RegularTransaction {\n identifiers\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n }\n createdUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n spentUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n }\n ... on UnshieldedTransactionsProgress {\n type: __typename\n highestTransactionId\n }\n }\n }\n '];
58
+ /** The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */
59
+ export declare function gql(source: '\n subscription ZswapEvents($id: Int) {\n zswapLedgerEvents(id: $id) {\n id\n raw\n protocolVersion\n maxId\n }\n }\n '): (typeof documents)['\n subscription ZswapEvents($id: Int) {\n zswapLedgerEvents(id: $id) {\n id\n raw\n protocolVersion\n maxId\n }\n }\n '];
75
60
  export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
76
61
  export {};
@@ -1,15 +1,16 @@
1
1
  /* eslint-disable */
2
2
  import * as types from './graphql.js';
3
3
  const documents = {
4
- "\n query BlockHash($offset: BlockOffset) {\n block(offset: $offset) {\n height\n hash\n ledgerParameters\n timestamp\n }\n }\n ": types.BlockHashDocument,
5
- "\n mutation Connect($viewingKey: ViewingKey!) {\n connect(viewingKey: $viewingKey)\n }\n ": types.ConnectDocument,
6
- "\n mutation Disconnect($sessionId: HexEncoded!) {\n disconnect(sessionId: $sessionId)\n }\n ": types.DisconnectDocument,
7
- "\n query FetchTermsAndConditions {\n block {\n systemParameters {\n termsAndConditions {\n hash\n url\n }\n }\n }\n }\n ": types.FetchTermsAndConditionsDocument,
8
- "\n query TransactionStatus($transactionId: HexEncoded!) {\n transactions(offset: {identifier: $transactionId}) {\n __typename\n ... on RegularTransaction {\n identifiers\n transactionResult {\n segments {\n id\n success\n }\n status\n __typename\n }\n }\n }\n }\n ": types.TransactionStatusDocument,
9
- "\n subscription DustLedgerEvents($id: Int) {\n dustLedgerEvents(id: $id) {\n type: __typename\n id\n raw\n maxId\n }\n }\n ": types.DustLedgerEventsDocument,
10
- "\n subscription ShieldedTransactions($sessionId: HexEncoded!, $index: Int) {\n shieldedTransactions(sessionId: $sessionId, index: $index) {\n __typename\n ... on ShieldedTransactionsProgress {\n highestEndIndex\n highestCheckedEndIndex\n highestRelevantEndIndex\n }\n ... on RelevantTransaction {\n transaction {\n id\n raw\n hash\n protocolVersion\n identifiers\n startIndex\n endIndex\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n collapsedMerkleTree {\n startIndex\n endIndex\n update\n protocolVersion\n }\n }\n }\n }\n ": types.ShieldedTransactionsDocument,
11
- "\n subscription UnshieldedTransactions($address: UnshieldedAddress!, $transactionId: Int) {\n unshieldedTransactions(address: $address, transactionId: $transactionId) {\n ... on UnshieldedTransaction {\n type: __typename\n transaction {\n type: __typename\n id\n hash\n protocolVersion\n block {\n timestamp\n }\n ... on RegularTransaction {\n identifiers\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n }\n createdUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n spentUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n }\n ... on UnshieldedTransactionsProgress {\n type: __typename\n highestTransactionId\n }\n }\n }\n ": types.UnshieldedTransactionsDocument,
12
- "\n subscription ZswapEvents($id: Int) {\n zswapLedgerEvents(id: $id) {\n id\n raw\n maxId\n }\n }\n ": types.ZswapEventsDocument,
4
+ '\n query BlockHash($offset: BlockOffset) {\n block(offset: $offset) {\n height\n hash\n ledgerParameters\n timestamp\n }\n }\n ': types.BlockHashDocument,
5
+ '\n mutation Connect($viewingKey: ViewingKey!) {\n connect(viewingKey: $viewingKey)\n }\n ': types.ConnectDocument,
6
+ '\n mutation Disconnect($sessionId: HexEncoded!) {\n disconnect(sessionId: $sessionId)\n }\n ': types.DisconnectDocument,
7
+ '\n query FetchTermsAndConditions {\n block {\n systemParameters {\n termsAndConditions {\n hash\n url\n }\n }\n }\n }\n ': types.FetchTermsAndConditionsDocument,
8
+ '\n query TransactionHistoryDetail($transactionHash: HexEncoded!) {\n transactions(offset: {hash: $transactionHash}) {\n __typename\n hash\n block {\n timestamp\n }\n ... on RegularTransaction {\n transactionResult {\n status\n }\n }\n }\n }\n ': types.TransactionHistoryDetailDocument,
9
+ '\n query TransactionStatus($transactionId: HexEncoded!) {\n transactions(offset: {identifier: $transactionId}) {\n __typename\n ... on RegularTransaction {\n identifiers\n transactionResult {\n segments {\n id\n success\n }\n status\n __typename\n }\n }\n }\n }\n ': types.TransactionStatusDocument,
10
+ '\n subscription DustLedgerEvents($id: Int) {\n dustLedgerEvents(id: $id) {\n type: __typename\n id\n raw\n maxId\n }\n }\n ': types.DustLedgerEventsDocument,
11
+ '\n subscription ShieldedTransactions($sessionId: HexEncoded!, $index: Int) {\n shieldedTransactions(sessionId: $sessionId, index: $index) {\n __typename\n ... on ShieldedTransactionsProgress {\n highestEndIndex\n highestCheckedEndIndex\n highestRelevantEndIndex\n }\n ... on RelevantTransaction {\n transaction {\n id\n raw\n hash\n protocolVersion\n identifiers\n startIndex\n endIndex\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n collapsedMerkleTree {\n startIndex\n endIndex\n update\n protocolVersion\n }\n }\n }\n }\n ': types.ShieldedTransactionsDocument,
12
+ '\n subscription UnshieldedTransactions($address: UnshieldedAddress!, $transactionId: Int) {\n unshieldedTransactions(address: $address, transactionId: $transactionId) {\n ... on UnshieldedTransaction {\n type: __typename\n transaction {\n type: __typename\n id\n hash\n protocolVersion\n block {\n timestamp\n }\n ... on RegularTransaction {\n identifiers\n fees {\n paidFees\n estimatedFees\n }\n transactionResult {\n status\n segments {\n id\n success\n }\n }\n }\n }\n createdUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n spentUtxos {\n owner\n tokenType\n value\n outputIndex\n intentHash\n ctime\n registeredForDustGeneration\n }\n }\n ... on UnshieldedTransactionsProgress {\n type: __typename\n highestTransactionId\n }\n }\n }\n ': types.UnshieldedTransactionsDocument,
13
+ '\n subscription ZswapEvents($id: Int) {\n zswapLedgerEvents(id: $id) {\n id\n raw\n protocolVersion\n maxId\n }\n }\n ': types.ZswapEventsDocument,
13
14
  };
14
15
  export function gql(source) {
15
16
  return documents[source] ?? {};
@@ -94,7 +94,7 @@ export type BlockOffset =
94
94
  {
95
95
  readonly hash: Scalars['HexEncoded']['input'];
96
96
  readonly height?: never;
97
- } | /** A block height. */ {
97
+ } /** A block height. */ | {
98
98
  readonly hash?: never;
99
99
  readonly height: Scalars['Int']['input'];
100
100
  };
@@ -132,13 +132,12 @@ export type ContractActionOffset =
132
132
  {
133
133
  readonly blockOffset: BlockOffset;
134
134
  readonly transactionOffset?: never;
135
- } | /** Either a transaction hash or a transaction identifier. */ {
135
+ } /** Either a transaction hash or a transaction identifier. */ | {
136
136
  readonly blockOffset?: never;
137
137
  readonly transactionOffset: TransactionOffset;
138
138
  };
139
139
  /**
140
- * Represents a token balance held by a contract.
141
- * This type is exposed through the GraphQL API to allow clients to query
140
+ * Represents a token balance held by a contract. This type is exposed through the GraphQL API to allow clients to query
142
141
  * unshielded token balances for any contract action (Deploy, Call, Update).
143
142
  */
144
143
  export type ContractBalance = {
@@ -529,10 +528,7 @@ export type RelevantTransaction = {
529
528
  /** A transaction relevant for the subscribing wallet. */
530
529
  readonly transaction: RegularTransaction;
531
530
  };
532
- /**
533
- * One of many segments for a partially successful transaction result showing success for some
534
- * segment.
535
- */
531
+ /** One of many segments for a partially successful transaction result showing success for some segment. */
536
532
  export type Segment = {
537
533
  /** Segment ID. */
538
534
  readonly id: Scalars['Int']['output'];
@@ -544,23 +540,23 @@ export type ShieldedTransactionsEvent = RelevantTransaction | ShieldedTransactio
544
540
  /** Information about the shielded transactions indexing progress. */
545
541
  export type ShieldedTransactionsProgress = {
546
542
  /**
547
- * The highest zswap state end index (see `endIndex` of `Transaction`) of all transactions
548
- * checked for relevance. Initially less than and eventually (when some wallet has been fully
549
- * indexed) equal to `highest_end_index`. A value of zero (very unlikely) means that no wallet
550
- * has subscribed before and indexing for the subscribing wallet has not yet started.
543
+ * The highest zswap state end index (see `endIndex` of `Transaction`) of all transactions checked for relevance.
544
+ * Initially less than and eventually (when some wallet has been fully indexed) equal to `highest_end_index`. A value
545
+ * of zero (very unlikely) means that no wallet has subscribed before and indexing for the subscribing wallet has not
546
+ * yet started.
551
547
  */
552
548
  readonly highestCheckedEndIndex: Scalars['Int']['output'];
553
549
  /**
554
- * The highest zswap state end index (see `endIndex` of `Transaction`) of all transactions. It
555
- * represents the known state of the blockchain. A value of zero (completely unlikely) means
556
- * that no shielded transactions have been indexed yet.
550
+ * The highest zswap state end index (see `endIndex` of `Transaction`) of all transactions. It represents the known
551
+ * state of the blockchain. A value of zero (completely unlikely) means that no shielded transactions have been
552
+ * indexed yet.
557
553
  */
558
554
  readonly highestEndIndex: Scalars['Int']['output'];
559
555
  /**
560
- * The highest zswap state end index (see `endIndex` of `Transaction`) of all relevant
561
- * transactions for the subscribing wallet. Usually less than `highest_checked_end_index`
562
- * unless the latest checked transaction is relevant for the subscribing wallet. A value of
563
- * zero means that no relevant transactions have been indexed for the subscribing wallet.
556
+ * The highest zswap state end index (see `endIndex` of `Transaction`) of all relevant transactions for the
557
+ * subscribing wallet. Usually less than `highest_checked_end_index` unless the latest checked transaction is relevant
558
+ * for the subscribing wallet. A value of zero means that no relevant transactions have been indexed for the
559
+ * subscribing wallet.
564
560
  */
565
561
  readonly highestRelevantEndIndex: Scalars['Int']['output'];
566
562
  };
@@ -621,27 +617,21 @@ export type StakeShare = {
621
617
  readonly ticker: Maybe<Scalars['String']['output']>;
622
618
  };
623
619
  export type Subscription = {
624
- /**
625
- * Subscribe to blocks starting at the given offset or at the latest block if the offset is
626
- * omitted.
627
- */
620
+ /** Subscribe to blocks starting at the given offset or at the latest block if the offset is omitted. */
628
621
  readonly blocks: Block;
629
622
  /**
630
- * Subscribe to contract actions with the given address starting at the given offset or at the
631
- * latest block if the offset is omitted.
623
+ * Subscribe to contract actions with the given address starting at the given offset or at the latest block if the
624
+ * offset is omitted.
632
625
  */
633
626
  readonly contractActions: ContractAction;
634
627
  /** Subscribe to dust ledger events starting at the given ID or at the very start if omitted. */
635
628
  readonly dustLedgerEvents: DustLedgerEvent;
636
629
  /**
637
- * Subscribe to shielded transaction events for the given session ID starting at the given
638
- * index or at zero if omitted.
630
+ * Subscribe to shielded transaction events for the given session ID starting at the given index or at zero if
631
+ * omitted.
639
632
  */
640
633
  readonly shieldedTransactions: ShieldedTransactionsEvent;
641
- /**
642
- * Subscribe unshielded transaction events for the given address and the given transaction ID
643
- * or zero if omitted.
644
- */
634
+ /** Subscribe unshielded transaction events for the given address and the given transaction ID or zero if omitted. */
645
635
  readonly unshieldedTransactions: UnshieldedTransactionsEvent;
646
636
  /** Subscribe to zswap ledger events starting at the given ID or at the very start if omitted. */
647
637
  readonly zswapLedgerEvents: ZswapLedgerEvent;
@@ -743,13 +733,13 @@ export type TransactionOffset =
743
733
  {
744
734
  readonly hash: Scalars['HexEncoded']['input'];
745
735
  readonly identifier?: never;
746
- } | /** A hex-encoded transaction identifier. */ {
736
+ } /** A hex-encoded transaction identifier. */ | {
747
737
  readonly hash?: never;
748
738
  readonly identifier: Scalars['HexEncoded']['input'];
749
739
  };
750
740
  /**
751
- * The result of applying a transaction to the ledger state. In case of a partial success (status),
752
- * there will be segments.
741
+ * The result of applying a transaction to the ledger state. In case of a partial success (status), there will be
742
+ * segments.
753
743
  */
754
744
  export type TransactionResult = {
755
745
  readonly segments: Maybe<ReadonlyArray<Segment>>;
@@ -843,6 +833,27 @@ export type FetchTermsAndConditionsQuery = {
843
833
  };
844
834
  } | null;
845
835
  };
836
+ export type TransactionHistoryDetailQueryVariables = Exact<{
837
+ transactionHash: Scalars['HexEncoded']['input'];
838
+ }>;
839
+ export type TransactionHistoryDetailQuery = {
840
+ readonly transactions: ReadonlyArray<{
841
+ readonly __typename: 'RegularTransaction';
842
+ readonly hash: string;
843
+ readonly transactionResult: {
844
+ readonly status: TransactionResultStatus;
845
+ };
846
+ readonly block: {
847
+ readonly timestamp: number;
848
+ };
849
+ } | {
850
+ readonly __typename: 'SystemTransaction';
851
+ readonly hash: string;
852
+ readonly block: {
853
+ readonly timestamp: number;
854
+ };
855
+ }>;
856
+ };
846
857
  export type TransactionStatusQueryVariables = Exact<{
847
858
  transactionId: Scalars['HexEncoded']['input'];
848
859
  }>;
@@ -994,6 +1005,7 @@ export type ZswapEventsSubscription = {
994
1005
  readonly zswapLedgerEvents: {
995
1006
  readonly id: number;
996
1007
  readonly raw: string;
1008
+ readonly protocolVersion: number;
997
1009
  readonly maxId: number;
998
1010
  };
999
1011
  };
@@ -1001,6 +1013,7 @@ export declare const BlockHashDocument: DocumentNode<BlockHashQuery, BlockHashQu
1001
1013
  export declare const ConnectDocument: DocumentNode<ConnectMutation, ConnectMutationVariables>;
1002
1014
  export declare const DisconnectDocument: DocumentNode<DisconnectMutation, DisconnectMutationVariables>;
1003
1015
  export declare const FetchTermsAndConditionsDocument: DocumentNode<FetchTermsAndConditionsQuery, FetchTermsAndConditionsQueryVariables>;
1016
+ export declare const TransactionHistoryDetailDocument: DocumentNode<TransactionHistoryDetailQuery, TransactionHistoryDetailQueryVariables>;
1004
1017
  export declare const TransactionStatusDocument: DocumentNode<TransactionStatusQuery, TransactionStatusQueryVariables>;
1005
1018
  export declare const DustLedgerEventsDocument: DocumentNode<DustLedgerEventsSubscription, DustLedgerEventsSubscriptionVariables>;
1006
1019
  export declare const ShieldedTransactionsDocument: DocumentNode<ShieldedTransactionsSubscription, ShieldedTransactionsSubscriptionVariables>;