@midnight-ntwrk/wallet-sdk-indexer-client 1.0.0-beta.12 → 1.0.0-beta.14
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.
- package/dist/graphql/generated/fragment-masking.js +1 -1
- package/dist/graphql/generated/gql.d.ts +14 -14
- package/dist/graphql/generated/gql.js +7 -19
- package/dist/graphql/generated/graphql.d.ts +14 -3
- package/dist/graphql/generated/graphql.js +7 -481
- package/dist/graphql/generated/index.d.ts +2 -2
- package/dist/graphql/generated/index.js +2 -14
- package/dist/graphql/queries/BlockHash.js +1 -0
- package/dist/graphql/queries/test/BlockHash.test.js +2 -1
- package/dist/graphql/subscriptions/UnshieldedTransactions.js +7 -0
- package/package.json +4 -4
|
@@ -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(
|
|
15
|
+
return fields.length > 0 && fields.every(field => data && field in data);
|
|
16
16
|
}
|
|
@@ -12,13 +12,13 @@ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-
|
|
|
12
12
|
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
|
|
13
13
|
*/
|
|
14
14
|
type Documents = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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 subscription DustLedgerEvents($id: Int) {\n dustLedgerEvents(id: $id) {\n type: __typename\n id\n raw\n maxId\n }\n }\n ": typeof types.DustLedgerEventsDocument;
|
|
19
|
+
"\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;
|
|
20
|
+
"\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;
|
|
21
|
+
"\n subscription ZswapEvents($id: Int) {\n zswapLedgerEvents(id: $id) {\n id\n raw\n maxId\n }\n }\n ": typeof types.ZswapEventsDocument;
|
|
22
22
|
};
|
|
23
23
|
declare const documents: Documents;
|
|
24
24
|
/**
|
|
@@ -37,30 +37,30 @@ export declare function gql(source: string): unknown;
|
|
|
37
37
|
/**
|
|
38
38
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
39
39
|
*/
|
|
40
|
-
export declare function gql(source:
|
|
40
|
+
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 "];
|
|
41
41
|
/**
|
|
42
42
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
43
43
|
*/
|
|
44
|
-
export declare function gql(source:
|
|
44
|
+
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 "];
|
|
45
45
|
/**
|
|
46
46
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
47
47
|
*/
|
|
48
|
-
export declare function gql(source:
|
|
48
|
+
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 "];
|
|
49
49
|
/**
|
|
50
50
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
51
51
|
*/
|
|
52
|
-
export declare function gql(source:
|
|
52
|
+
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 "];
|
|
53
53
|
/**
|
|
54
54
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
55
55
|
*/
|
|
56
|
-
export declare function gql(source:
|
|
56
|
+
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 "];
|
|
57
57
|
/**
|
|
58
58
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
59
59
|
*/
|
|
60
|
-
export declare function gql(source:
|
|
60
|
+
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 "];
|
|
61
61
|
/**
|
|
62
62
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
63
63
|
*/
|
|
64
|
-
export declare function gql(source:
|
|
64
|
+
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 "];
|
|
65
65
|
export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
|
|
66
66
|
export {};
|
|
@@ -1,25 +1,13 @@
|
|
|
1
|
-
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
-
// Copyright (C) 2025 Midnight Foundation
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// You may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
1
|
/* eslint-disable */
|
|
14
2
|
import * as types from './graphql.js';
|
|
15
3
|
const documents = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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 subscription DustLedgerEvents($id: Int) {\n dustLedgerEvents(id: $id) {\n type: __typename\n id\n raw\n maxId\n }\n }\n ": types.DustLedgerEventsDocument,
|
|
8
|
+
"\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,
|
|
9
|
+
"\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,
|
|
10
|
+
"\n subscription ZswapEvents($id: Int) {\n zswapLedgerEvents(id: $id) {\n id\n raw\n maxId\n }\n }\n ": types.ZswapEventsDocument,
|
|
23
11
|
};
|
|
24
12
|
export function gql(source) {
|
|
25
13
|
return documents[source] ?? {};
|
|
@@ -84,7 +84,7 @@ export type BlockOffset =
|
|
|
84
84
|
{
|
|
85
85
|
hash: Scalars['HexEncoded']['input'];
|
|
86
86
|
height?: never;
|
|
87
|
-
} /** A block height. */
|
|
87
|
+
} | /** A block height. */ {
|
|
88
88
|
hash?: never;
|
|
89
89
|
height: Scalars['Int']['input'];
|
|
90
90
|
};
|
|
@@ -112,7 +112,7 @@ export type ContractActionOffset =
|
|
|
112
112
|
{
|
|
113
113
|
blockOffset: BlockOffset;
|
|
114
114
|
transactionOffset?: never;
|
|
115
|
-
} /** Either a transaction hash or a transaction identifier. */
|
|
115
|
+
} | /** Either a transaction hash or a transaction identifier. */ {
|
|
116
116
|
blockOffset?: never;
|
|
117
117
|
transactionOffset: TransactionOffset;
|
|
118
118
|
};
|
|
@@ -438,7 +438,7 @@ export type TransactionOffset =
|
|
|
438
438
|
{
|
|
439
439
|
hash: Scalars['HexEncoded']['input'];
|
|
440
440
|
identifier?: never;
|
|
441
|
-
} /** A hex-encoded transaction identifier. */
|
|
441
|
+
} | /** A hex-encoded transaction identifier. */ {
|
|
442
442
|
hash?: never;
|
|
443
443
|
identifier: Scalars['HexEncoded']['input'];
|
|
444
444
|
};
|
|
@@ -508,6 +508,7 @@ export type BlockHashQuery = {
|
|
|
508
508
|
height: number;
|
|
509
509
|
hash: string;
|
|
510
510
|
ledgerParameters: string;
|
|
511
|
+
timestamp: number;
|
|
511
512
|
} | null;
|
|
512
513
|
};
|
|
513
514
|
export type ConnectMutationVariables = Exact<{
|
|
@@ -601,6 +602,10 @@ export type UnshieldedTransactionsSubscription = {
|
|
|
601
602
|
hash: string;
|
|
602
603
|
protocolVersion: number;
|
|
603
604
|
type: 'RegularTransaction';
|
|
605
|
+
fees: {
|
|
606
|
+
paidFees: string;
|
|
607
|
+
estimatedFees: string;
|
|
608
|
+
};
|
|
604
609
|
transactionResult: {
|
|
605
610
|
status: TransactionResultStatus;
|
|
606
611
|
segments: Array<{
|
|
@@ -608,11 +613,17 @@ export type UnshieldedTransactionsSubscription = {
|
|
|
608
613
|
success: boolean;
|
|
609
614
|
}> | null;
|
|
610
615
|
};
|
|
616
|
+
block: {
|
|
617
|
+
timestamp: number;
|
|
618
|
+
};
|
|
611
619
|
} | {
|
|
612
620
|
id: number;
|
|
613
621
|
hash: string;
|
|
614
622
|
protocolVersion: number;
|
|
615
623
|
type: 'SystemTransaction';
|
|
624
|
+
block: {
|
|
625
|
+
timestamp: number;
|
|
626
|
+
};
|
|
616
627
|
};
|
|
617
628
|
createdUtxos: Array<{
|
|
618
629
|
owner: string;
|
|
@@ -1,481 +1,7 @@
|
|
|
1
|
-
export const BlockHashDocument = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
variableDefinitions: [
|
|
9
|
-
{
|
|
10
|
-
kind: 'VariableDefinition',
|
|
11
|
-
variable: { kind: 'Variable', name: { kind: 'Name', value: 'offset' } },
|
|
12
|
-
type: { kind: 'NamedType', name: { kind: 'Name', value: 'BlockOffset' } },
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
selectionSet: {
|
|
16
|
-
kind: 'SelectionSet',
|
|
17
|
-
selections: [
|
|
18
|
-
{
|
|
19
|
-
kind: 'Field',
|
|
20
|
-
name: { kind: 'Name', value: 'block' },
|
|
21
|
-
arguments: [
|
|
22
|
-
{
|
|
23
|
-
kind: 'Argument',
|
|
24
|
-
name: { kind: 'Name', value: 'offset' },
|
|
25
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'offset' } },
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
selectionSet: {
|
|
29
|
-
kind: 'SelectionSet',
|
|
30
|
-
selections: [
|
|
31
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'height' } },
|
|
32
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'hash' } },
|
|
33
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'ledgerParameters' } },
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
};
|
|
42
|
-
export const ConnectDocument = {
|
|
43
|
-
kind: 'Document',
|
|
44
|
-
definitions: [
|
|
45
|
-
{
|
|
46
|
-
kind: 'OperationDefinition',
|
|
47
|
-
operation: 'mutation',
|
|
48
|
-
name: { kind: 'Name', value: 'Connect' },
|
|
49
|
-
variableDefinitions: [
|
|
50
|
-
{
|
|
51
|
-
kind: 'VariableDefinition',
|
|
52
|
-
variable: { kind: 'Variable', name: { kind: 'Name', value: 'viewingKey' } },
|
|
53
|
-
type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'ViewingKey' } } },
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
|
-
selectionSet: {
|
|
57
|
-
kind: 'SelectionSet',
|
|
58
|
-
selections: [
|
|
59
|
-
{
|
|
60
|
-
kind: 'Field',
|
|
61
|
-
name: { kind: 'Name', value: 'connect' },
|
|
62
|
-
arguments: [
|
|
63
|
-
{
|
|
64
|
-
kind: 'Argument',
|
|
65
|
-
name: { kind: 'Name', value: 'viewingKey' },
|
|
66
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'viewingKey' } },
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
};
|
|
75
|
-
export const DisconnectDocument = {
|
|
76
|
-
kind: 'Document',
|
|
77
|
-
definitions: [
|
|
78
|
-
{
|
|
79
|
-
kind: 'OperationDefinition',
|
|
80
|
-
operation: 'mutation',
|
|
81
|
-
name: { kind: 'Name', value: 'Disconnect' },
|
|
82
|
-
variableDefinitions: [
|
|
83
|
-
{
|
|
84
|
-
kind: 'VariableDefinition',
|
|
85
|
-
variable: { kind: 'Variable', name: { kind: 'Name', value: 'sessionId' } },
|
|
86
|
-
type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'HexEncoded' } } },
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
selectionSet: {
|
|
90
|
-
kind: 'SelectionSet',
|
|
91
|
-
selections: [
|
|
92
|
-
{
|
|
93
|
-
kind: 'Field',
|
|
94
|
-
name: { kind: 'Name', value: 'disconnect' },
|
|
95
|
-
arguments: [
|
|
96
|
-
{
|
|
97
|
-
kind: 'Argument',
|
|
98
|
-
name: { kind: 'Name', value: 'sessionId' },
|
|
99
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'sessionId' } },
|
|
100
|
-
},
|
|
101
|
-
],
|
|
102
|
-
},
|
|
103
|
-
],
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
],
|
|
107
|
-
};
|
|
108
|
-
export const DustLedgerEventsDocument = {
|
|
109
|
-
kind: 'Document',
|
|
110
|
-
definitions: [
|
|
111
|
-
{
|
|
112
|
-
kind: 'OperationDefinition',
|
|
113
|
-
operation: 'subscription',
|
|
114
|
-
name: { kind: 'Name', value: 'DustLedgerEvents' },
|
|
115
|
-
variableDefinitions: [
|
|
116
|
-
{
|
|
117
|
-
kind: 'VariableDefinition',
|
|
118
|
-
variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } },
|
|
119
|
-
type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } },
|
|
120
|
-
},
|
|
121
|
-
],
|
|
122
|
-
selectionSet: {
|
|
123
|
-
kind: 'SelectionSet',
|
|
124
|
-
selections: [
|
|
125
|
-
{
|
|
126
|
-
kind: 'Field',
|
|
127
|
-
name: { kind: 'Name', value: 'dustLedgerEvents' },
|
|
128
|
-
arguments: [
|
|
129
|
-
{
|
|
130
|
-
kind: 'Argument',
|
|
131
|
-
name: { kind: 'Name', value: 'id' },
|
|
132
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'id' } },
|
|
133
|
-
},
|
|
134
|
-
],
|
|
135
|
-
selectionSet: {
|
|
136
|
-
kind: 'SelectionSet',
|
|
137
|
-
selections: [
|
|
138
|
-
{ kind: 'Field', alias: { kind: 'Name', value: 'type' }, name: { kind: 'Name', value: '__typename' } },
|
|
139
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
140
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'raw' } },
|
|
141
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'maxId' } },
|
|
142
|
-
],
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
],
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
],
|
|
149
|
-
};
|
|
150
|
-
export const ShieldedTransactionsDocument = {
|
|
151
|
-
kind: 'Document',
|
|
152
|
-
definitions: [
|
|
153
|
-
{
|
|
154
|
-
kind: 'OperationDefinition',
|
|
155
|
-
operation: 'subscription',
|
|
156
|
-
name: { kind: 'Name', value: 'ShieldedTransactions' },
|
|
157
|
-
variableDefinitions: [
|
|
158
|
-
{
|
|
159
|
-
kind: 'VariableDefinition',
|
|
160
|
-
variable: { kind: 'Variable', name: { kind: 'Name', value: 'sessionId' } },
|
|
161
|
-
type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'HexEncoded' } } },
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
kind: 'VariableDefinition',
|
|
165
|
-
variable: { kind: 'Variable', name: { kind: 'Name', value: 'index' } },
|
|
166
|
-
type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } },
|
|
167
|
-
},
|
|
168
|
-
],
|
|
169
|
-
selectionSet: {
|
|
170
|
-
kind: 'SelectionSet',
|
|
171
|
-
selections: [
|
|
172
|
-
{
|
|
173
|
-
kind: 'Field',
|
|
174
|
-
name: { kind: 'Name', value: 'shieldedTransactions' },
|
|
175
|
-
arguments: [
|
|
176
|
-
{
|
|
177
|
-
kind: 'Argument',
|
|
178
|
-
name: { kind: 'Name', value: 'sessionId' },
|
|
179
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'sessionId' } },
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
kind: 'Argument',
|
|
183
|
-
name: { kind: 'Name', value: 'index' },
|
|
184
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'index' } },
|
|
185
|
-
},
|
|
186
|
-
],
|
|
187
|
-
selectionSet: {
|
|
188
|
-
kind: 'SelectionSet',
|
|
189
|
-
selections: [
|
|
190
|
-
{ kind: 'Field', name: { kind: 'Name', value: '__typename' } },
|
|
191
|
-
{
|
|
192
|
-
kind: 'InlineFragment',
|
|
193
|
-
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'ShieldedTransactionsProgress' } },
|
|
194
|
-
selectionSet: {
|
|
195
|
-
kind: 'SelectionSet',
|
|
196
|
-
selections: [
|
|
197
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'highestEndIndex' } },
|
|
198
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'highestCheckedEndIndex' } },
|
|
199
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'highestRelevantEndIndex' } },
|
|
200
|
-
],
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
kind: 'InlineFragment',
|
|
205
|
-
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'RelevantTransaction' } },
|
|
206
|
-
selectionSet: {
|
|
207
|
-
kind: 'SelectionSet',
|
|
208
|
-
selections: [
|
|
209
|
-
{
|
|
210
|
-
kind: 'Field',
|
|
211
|
-
name: { kind: 'Name', value: 'transaction' },
|
|
212
|
-
selectionSet: {
|
|
213
|
-
kind: 'SelectionSet',
|
|
214
|
-
selections: [
|
|
215
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
216
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'raw' } },
|
|
217
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'hash' } },
|
|
218
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'protocolVersion' } },
|
|
219
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'identifiers' } },
|
|
220
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'startIndex' } },
|
|
221
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'endIndex' } },
|
|
222
|
-
{
|
|
223
|
-
kind: 'Field',
|
|
224
|
-
name: { kind: 'Name', value: 'fees' },
|
|
225
|
-
selectionSet: {
|
|
226
|
-
kind: 'SelectionSet',
|
|
227
|
-
selections: [
|
|
228
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'paidFees' } },
|
|
229
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'estimatedFees' } },
|
|
230
|
-
],
|
|
231
|
-
},
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
kind: 'Field',
|
|
235
|
-
name: { kind: 'Name', value: 'transactionResult' },
|
|
236
|
-
selectionSet: {
|
|
237
|
-
kind: 'SelectionSet',
|
|
238
|
-
selections: [
|
|
239
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
240
|
-
{
|
|
241
|
-
kind: 'Field',
|
|
242
|
-
name: { kind: 'Name', value: 'segments' },
|
|
243
|
-
selectionSet: {
|
|
244
|
-
kind: 'SelectionSet',
|
|
245
|
-
selections: [
|
|
246
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
247
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'success' } },
|
|
248
|
-
],
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
|
-
],
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
|
-
],
|
|
255
|
-
},
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
kind: 'Field',
|
|
259
|
-
name: { kind: 'Name', value: 'collapsedMerkleTree' },
|
|
260
|
-
selectionSet: {
|
|
261
|
-
kind: 'SelectionSet',
|
|
262
|
-
selections: [
|
|
263
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'startIndex' } },
|
|
264
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'endIndex' } },
|
|
265
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'update' } },
|
|
266
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'protocolVersion' } },
|
|
267
|
-
],
|
|
268
|
-
},
|
|
269
|
-
},
|
|
270
|
-
],
|
|
271
|
-
},
|
|
272
|
-
},
|
|
273
|
-
],
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
],
|
|
277
|
-
},
|
|
278
|
-
},
|
|
279
|
-
],
|
|
280
|
-
};
|
|
281
|
-
export const UnshieldedTransactionsDocument = {
|
|
282
|
-
kind: 'Document',
|
|
283
|
-
definitions: [
|
|
284
|
-
{
|
|
285
|
-
kind: 'OperationDefinition',
|
|
286
|
-
operation: 'subscription',
|
|
287
|
-
name: { kind: 'Name', value: 'UnshieldedTransactions' },
|
|
288
|
-
variableDefinitions: [
|
|
289
|
-
{
|
|
290
|
-
kind: 'VariableDefinition',
|
|
291
|
-
variable: { kind: 'Variable', name: { kind: 'Name', value: 'address' } },
|
|
292
|
-
type: {
|
|
293
|
-
kind: 'NonNullType',
|
|
294
|
-
type: { kind: 'NamedType', name: { kind: 'Name', value: 'UnshieldedAddress' } },
|
|
295
|
-
},
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
kind: 'VariableDefinition',
|
|
299
|
-
variable: { kind: 'Variable', name: { kind: 'Name', value: 'transactionId' } },
|
|
300
|
-
type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } },
|
|
301
|
-
},
|
|
302
|
-
],
|
|
303
|
-
selectionSet: {
|
|
304
|
-
kind: 'SelectionSet',
|
|
305
|
-
selections: [
|
|
306
|
-
{
|
|
307
|
-
kind: 'Field',
|
|
308
|
-
name: { kind: 'Name', value: 'unshieldedTransactions' },
|
|
309
|
-
arguments: [
|
|
310
|
-
{
|
|
311
|
-
kind: 'Argument',
|
|
312
|
-
name: { kind: 'Name', value: 'address' },
|
|
313
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'address' } },
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
kind: 'Argument',
|
|
317
|
-
name: { kind: 'Name', value: 'transactionId' },
|
|
318
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'transactionId' } },
|
|
319
|
-
},
|
|
320
|
-
],
|
|
321
|
-
selectionSet: {
|
|
322
|
-
kind: 'SelectionSet',
|
|
323
|
-
selections: [
|
|
324
|
-
{
|
|
325
|
-
kind: 'InlineFragment',
|
|
326
|
-
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'UnshieldedTransaction' } },
|
|
327
|
-
selectionSet: {
|
|
328
|
-
kind: 'SelectionSet',
|
|
329
|
-
selections: [
|
|
330
|
-
{
|
|
331
|
-
kind: 'Field',
|
|
332
|
-
alias: { kind: 'Name', value: 'type' },
|
|
333
|
-
name: { kind: 'Name', value: '__typename' },
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
kind: 'Field',
|
|
337
|
-
name: { kind: 'Name', value: 'transaction' },
|
|
338
|
-
selectionSet: {
|
|
339
|
-
kind: 'SelectionSet',
|
|
340
|
-
selections: [
|
|
341
|
-
{
|
|
342
|
-
kind: 'Field',
|
|
343
|
-
alias: { kind: 'Name', value: 'type' },
|
|
344
|
-
name: { kind: 'Name', value: '__typename' },
|
|
345
|
-
},
|
|
346
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
347
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'hash' } },
|
|
348
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'protocolVersion' } },
|
|
349
|
-
{
|
|
350
|
-
kind: 'InlineFragment',
|
|
351
|
-
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'RegularTransaction' } },
|
|
352
|
-
selectionSet: {
|
|
353
|
-
kind: 'SelectionSet',
|
|
354
|
-
selections: [
|
|
355
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'identifiers' } },
|
|
356
|
-
{
|
|
357
|
-
kind: 'Field',
|
|
358
|
-
name: { kind: 'Name', value: 'transactionResult' },
|
|
359
|
-
selectionSet: {
|
|
360
|
-
kind: 'SelectionSet',
|
|
361
|
-
selections: [
|
|
362
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
363
|
-
{
|
|
364
|
-
kind: 'Field',
|
|
365
|
-
name: { kind: 'Name', value: 'segments' },
|
|
366
|
-
selectionSet: {
|
|
367
|
-
kind: 'SelectionSet',
|
|
368
|
-
selections: [
|
|
369
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
370
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'success' } },
|
|
371
|
-
],
|
|
372
|
-
},
|
|
373
|
-
},
|
|
374
|
-
],
|
|
375
|
-
},
|
|
376
|
-
},
|
|
377
|
-
],
|
|
378
|
-
},
|
|
379
|
-
},
|
|
380
|
-
],
|
|
381
|
-
},
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
kind: 'Field',
|
|
385
|
-
name: { kind: 'Name', value: 'createdUtxos' },
|
|
386
|
-
selectionSet: {
|
|
387
|
-
kind: 'SelectionSet',
|
|
388
|
-
selections: [
|
|
389
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'owner' } },
|
|
390
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'tokenType' } },
|
|
391
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'value' } },
|
|
392
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'outputIndex' } },
|
|
393
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'intentHash' } },
|
|
394
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'ctime' } },
|
|
395
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'registeredForDustGeneration' } },
|
|
396
|
-
],
|
|
397
|
-
},
|
|
398
|
-
},
|
|
399
|
-
{
|
|
400
|
-
kind: 'Field',
|
|
401
|
-
name: { kind: 'Name', value: 'spentUtxos' },
|
|
402
|
-
selectionSet: {
|
|
403
|
-
kind: 'SelectionSet',
|
|
404
|
-
selections: [
|
|
405
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'owner' } },
|
|
406
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'tokenType' } },
|
|
407
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'value' } },
|
|
408
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'outputIndex' } },
|
|
409
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'intentHash' } },
|
|
410
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'ctime' } },
|
|
411
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'registeredForDustGeneration' } },
|
|
412
|
-
],
|
|
413
|
-
},
|
|
414
|
-
},
|
|
415
|
-
],
|
|
416
|
-
},
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
kind: 'InlineFragment',
|
|
420
|
-
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'UnshieldedTransactionsProgress' } },
|
|
421
|
-
selectionSet: {
|
|
422
|
-
kind: 'SelectionSet',
|
|
423
|
-
selections: [
|
|
424
|
-
{
|
|
425
|
-
kind: 'Field',
|
|
426
|
-
alias: { kind: 'Name', value: 'type' },
|
|
427
|
-
name: { kind: 'Name', value: '__typename' },
|
|
428
|
-
},
|
|
429
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'highestTransactionId' } },
|
|
430
|
-
],
|
|
431
|
-
},
|
|
432
|
-
},
|
|
433
|
-
],
|
|
434
|
-
},
|
|
435
|
-
},
|
|
436
|
-
],
|
|
437
|
-
},
|
|
438
|
-
},
|
|
439
|
-
],
|
|
440
|
-
};
|
|
441
|
-
export const ZswapEventsDocument = {
|
|
442
|
-
kind: 'Document',
|
|
443
|
-
definitions: [
|
|
444
|
-
{
|
|
445
|
-
kind: 'OperationDefinition',
|
|
446
|
-
operation: 'subscription',
|
|
447
|
-
name: { kind: 'Name', value: 'ZswapEvents' },
|
|
448
|
-
variableDefinitions: [
|
|
449
|
-
{
|
|
450
|
-
kind: 'VariableDefinition',
|
|
451
|
-
variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } },
|
|
452
|
-
type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } },
|
|
453
|
-
},
|
|
454
|
-
],
|
|
455
|
-
selectionSet: {
|
|
456
|
-
kind: 'SelectionSet',
|
|
457
|
-
selections: [
|
|
458
|
-
{
|
|
459
|
-
kind: 'Field',
|
|
460
|
-
name: { kind: 'Name', value: 'zswapLedgerEvents' },
|
|
461
|
-
arguments: [
|
|
462
|
-
{
|
|
463
|
-
kind: 'Argument',
|
|
464
|
-
name: { kind: 'Name', value: 'id' },
|
|
465
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'id' } },
|
|
466
|
-
},
|
|
467
|
-
],
|
|
468
|
-
selectionSet: {
|
|
469
|
-
kind: 'SelectionSet',
|
|
470
|
-
selections: [
|
|
471
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
472
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'raw' } },
|
|
473
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'maxId' } },
|
|
474
|
-
],
|
|
475
|
-
},
|
|
476
|
-
},
|
|
477
|
-
],
|
|
478
|
-
},
|
|
479
|
-
},
|
|
480
|
-
],
|
|
481
|
-
};
|
|
1
|
+
export const BlockHashDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "BlockHash" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "offset" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BlockOffset" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "block" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "offset" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "offset" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "height" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hash" } }, { "kind": "Field", "name": { "kind": "Name", "value": "ledgerParameters" } }, { "kind": "Field", "name": { "kind": "Name", "value": "timestamp" } }] } }] } }] };
|
|
2
|
+
export const ConnectDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "Connect" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "viewingKey" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ViewingKey" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "connect" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "viewingKey" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "viewingKey" } } }] }] } }] };
|
|
3
|
+
export const DisconnectDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "Disconnect" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "sessionId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "HexEncoded" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "disconnect" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "sessionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "sessionId" } } }] }] } }] };
|
|
4
|
+
export const DustLedgerEventsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "subscription", "name": { "kind": "Name", "value": "DustLedgerEvents" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "dustLedgerEvents" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "alias": { "kind": "Name", "value": "type" }, "name": { "kind": "Name", "value": "__typename" } }, { "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "raw" } }, { "kind": "Field", "name": { "kind": "Name", "value": "maxId" } }] } }] } }] };
|
|
5
|
+
export const ShieldedTransactionsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "subscription", "name": { "kind": "Name", "value": "ShieldedTransactions" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "sessionId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "HexEncoded" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "index" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "shieldedTransactions" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "sessionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "sessionId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "index" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "index" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "__typename" } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "ShieldedTransactionsProgress" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "highestEndIndex" } }, { "kind": "Field", "name": { "kind": "Name", "value": "highestCheckedEndIndex" } }, { "kind": "Field", "name": { "kind": "Name", "value": "highestRelevantEndIndex" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "RelevantTransaction" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "transaction" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "raw" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hash" } }, { "kind": "Field", "name": { "kind": "Name", "value": "protocolVersion" } }, { "kind": "Field", "name": { "kind": "Name", "value": "identifiers" } }, { "kind": "Field", "name": { "kind": "Name", "value": "startIndex" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endIndex" } }, { "kind": "Field", "name": { "kind": "Name", "value": "fees" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "paidFees" } }, { "kind": "Field", "name": { "kind": "Name", "value": "estimatedFees" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "transactionResult" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "segments" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "success" } }] } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "collapsedMerkleTree" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "startIndex" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endIndex" } }, { "kind": "Field", "name": { "kind": "Name", "value": "update" } }, { "kind": "Field", "name": { "kind": "Name", "value": "protocolVersion" } }] } }] } }] } }] } }] };
|
|
6
|
+
export const UnshieldedTransactionsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "subscription", "name": { "kind": "Name", "value": "UnshieldedTransactions" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "address" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UnshieldedAddress" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "transactionId" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "unshieldedTransactions" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "address" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "address" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "transactionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "transactionId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "UnshieldedTransaction" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "alias": { "kind": "Name", "value": "type" }, "name": { "kind": "Name", "value": "__typename" } }, { "kind": "Field", "name": { "kind": "Name", "value": "transaction" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "alias": { "kind": "Name", "value": "type" }, "name": { "kind": "Name", "value": "__typename" } }, { "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hash" } }, { "kind": "Field", "name": { "kind": "Name", "value": "protocolVersion" } }, { "kind": "Field", "name": { "kind": "Name", "value": "block" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "timestamp" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "RegularTransaction" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "identifiers" } }, { "kind": "Field", "name": { "kind": "Name", "value": "fees" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "paidFees" } }, { "kind": "Field", "name": { "kind": "Name", "value": "estimatedFees" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "transactionResult" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "segments" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "success" } }] } }] } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdUtxos" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "owner" } }, { "kind": "Field", "name": { "kind": "Name", "value": "tokenType" } }, { "kind": "Field", "name": { "kind": "Name", "value": "value" } }, { "kind": "Field", "name": { "kind": "Name", "value": "outputIndex" } }, { "kind": "Field", "name": { "kind": "Name", "value": "intentHash" } }, { "kind": "Field", "name": { "kind": "Name", "value": "ctime" } }, { "kind": "Field", "name": { "kind": "Name", "value": "registeredForDustGeneration" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "spentUtxos" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "owner" } }, { "kind": "Field", "name": { "kind": "Name", "value": "tokenType" } }, { "kind": "Field", "name": { "kind": "Name", "value": "value" } }, { "kind": "Field", "name": { "kind": "Name", "value": "outputIndex" } }, { "kind": "Field", "name": { "kind": "Name", "value": "intentHash" } }, { "kind": "Field", "name": { "kind": "Name", "value": "ctime" } }, { "kind": "Field", "name": { "kind": "Name", "value": "registeredForDustGeneration" } }] } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "UnshieldedTransactionsProgress" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "alias": { "kind": "Name", "value": "type" }, "name": { "kind": "Name", "value": "__typename" } }, { "kind": "Field", "name": { "kind": "Name", "value": "highestTransactionId" } }] } }] } }] } }] };
|
|
7
|
+
export const ZswapEventsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "subscription", "name": { "kind": "Name", "value": "ZswapEvents" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "zswapLedgerEvents" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "raw" } }, { "kind": "Field", "name": { "kind": "Name", "value": "maxId" } }] } }] } }] };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./fragment-masking.js";
|
|
2
|
+
export * from "./gql.js";
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// You may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
export * from './fragment-masking.js';
|
|
14
|
-
export * from './gql.js';
|
|
1
|
+
export * from "./fragment-masking.js";
|
|
2
|
+
export * from "./gql.js";
|
|
@@ -60,12 +60,13 @@ describe('BlockHash query', () => {
|
|
|
60
60
|
}, timeout_minutes(1));
|
|
61
61
|
});
|
|
62
62
|
it('should support query function injection', async () => {
|
|
63
|
-
const block = { block: { height: 1_000, hash: 'SOME_HASH', ledgerParameters: '0x0' } };
|
|
63
|
+
const block = { block: { height: 1_000, hash: 'SOME_HASH', ledgerParameters: '0x0', timestamp: 1 } };
|
|
64
64
|
const blockExpectation = expect.objectContaining({
|
|
65
65
|
block: expect.objectContaining({
|
|
66
66
|
height: block.block.height,
|
|
67
67
|
hash: block.block.hash,
|
|
68
68
|
ledgerParameters: block.block.ledgerParameters,
|
|
69
|
+
timestamp: block.block.timestamp,
|
|
69
70
|
}),
|
|
70
71
|
});
|
|
71
72
|
const mockedQueryFn = vi.fn();
|
|
@@ -22,8 +22,15 @@ export const UnshieldedTransactions = Subscription.make('UnshieldedTransactions'
|
|
|
22
22
|
id
|
|
23
23
|
hash
|
|
24
24
|
protocolVersion
|
|
25
|
+
block {
|
|
26
|
+
timestamp
|
|
27
|
+
}
|
|
25
28
|
... on RegularTransaction {
|
|
26
29
|
identifiers
|
|
30
|
+
fees {
|
|
31
|
+
paidFees
|
|
32
|
+
estimatedFees
|
|
33
|
+
}
|
|
27
34
|
transactionResult {
|
|
28
35
|
status
|
|
29
36
|
segments {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midnight-ntwrk/wallet-sdk-indexer-client",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@effect/platform": "^0.90.0",
|
|
31
31
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
32
32
|
"@midnight-ntwrk/wallet-sdk-abstractions": "1.0.0-beta.9",
|
|
33
|
-
"@midnight-ntwrk/wallet-sdk-utilities": "1.0.0-beta.
|
|
33
|
+
"@midnight-ntwrk/wallet-sdk-utilities": "1.0.0-beta.8",
|
|
34
34
|
"effect": "^3.17.3",
|
|
35
35
|
"graphql": "^16.11.0",
|
|
36
36
|
"graphql-http": "^1.22.4",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"scripts": {
|
|
52
52
|
"gql:codegen": "graphql-codegen",
|
|
53
53
|
"typecheck": "tsc -b ./tsconfig.json --noEmit",
|
|
54
|
-
"format": "prettier --write \"**/*.{ts,js,json,yaml,yml}\"",
|
|
55
|
-
"format:check": "prettier --check \"**/*.{ts,js,json,yaml,yml}\"",
|
|
54
|
+
"format": "prettier --write \"**/*.{ts,js,json,yaml,yml,md}\"",
|
|
55
|
+
"format:check": "prettier --check \"**/*.{ts,js,json,yaml,yml,md}\"",
|
|
56
56
|
"test": "vitest run",
|
|
57
57
|
"lint": "eslint",
|
|
58
58
|
"dist": "tsc -b ./tsconfig.build.json",
|