@midnight-ntwrk/wallet-sdk-indexer-client 1.0.0-beta.11
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/README.md +1 -0
- package/dist/effect/ConnectionHelper.d.ts +4 -0
- package/dist/effect/ConnectionHelper.js +29 -0
- package/dist/effect/HttpQueryClient.d.ts +4 -0
- package/dist/effect/HttpQueryClient.js +38 -0
- package/dist/effect/Query.d.ts +46 -0
- package/dist/effect/Query.js +35 -0
- package/dist/effect/QueryClient.d.ts +15 -0
- package/dist/effect/QueryClient.js +3 -0
- package/dist/effect/Subscription.d.ts +21 -0
- package/dist/effect/Subscription.js +28 -0
- package/dist/effect/SubscriptionClient.d.ts +15 -0
- package/dist/effect/SubscriptionClient.js +3 -0
- package/dist/effect/WsSubscriptionClient.d.ts +4 -0
- package/dist/effect/WsSubscriptionClient.js +32 -0
- package/dist/effect/index.d.ts +7 -0
- package/dist/effect/index.js +7 -0
- package/dist/effect/test/httpQueryClient.spied.test.d.ts +1 -0
- package/dist/effect/test/httpQueryClient.spied.test.js +25 -0
- package/dist/effect/test/httpQueryClient.test.d.ts +1 -0
- package/dist/effect/test/httpQueryClient.test.js +20 -0
- package/dist/effect/test/wsSubscriptionClient.spied.test.d.ts +1 -0
- package/dist/effect/test/wsSubscriptionClient.spied.test.js +25 -0
- package/dist/effect/test/wsSubscriptionClient.test.d.ts +1 -0
- package/dist/effect/test/wsSubscriptionClient.test.js +20 -0
- package/dist/graphql/generated/fragment-masking.d.ts +19 -0
- package/dist/graphql/generated/fragment-masking.js +16 -0
- package/dist/graphql/generated/gql.d.ts +66 -0
- package/dist/graphql/generated/gql.js +14 -0
- package/dist/graphql/generated/graphql.d.ts +656 -0
- package/dist/graphql/generated/graphql.js +7 -0
- package/dist/graphql/generated/index.d.ts +2 -0
- package/dist/graphql/generated/index.js +2 -0
- package/dist/graphql/queries/BlockHash.d.ts +6 -0
- package/dist/graphql/queries/BlockHash.js +11 -0
- package/dist/graphql/queries/Connect.d.ts +6 -0
- package/dist/graphql/queries/Connect.js +7 -0
- package/dist/graphql/queries/Disconnect.d.ts +6 -0
- package/dist/graphql/queries/Disconnect.js +7 -0
- package/dist/graphql/queries/index.d.ts +3 -0
- package/dist/graphql/queries/index.js +3 -0
- package/dist/graphql/queries/test/BlockHash.test.d.ts +1 -0
- package/dist/graphql/queries/test/BlockHash.test.js +69 -0
- package/dist/graphql/subscriptions/DustLedgerEvents.d.ts +6 -0
- package/dist/graphql/subscriptions/DustLedgerEvents.js +12 -0
- package/dist/graphql/subscriptions/ShieldedTransactions.d.ts +8 -0
- package/dist/graphql/subscriptions/ShieldedTransactions.js +42 -0
- package/dist/graphql/subscriptions/UnshieldedTransactions.d.ts +8 -0
- package/dist/graphql/subscriptions/UnshieldedTransactions.js +49 -0
- package/dist/graphql/subscriptions/ZswapEvents.d.ts +6 -0
- package/dist/graphql/subscriptions/ZswapEvents.js +11 -0
- package/dist/graphql/subscriptions/index.d.ts +4 -0
- package/dist/graphql/subscriptions/index.js +4 -0
- package/dist/graphql/subscriptions/test/ShieldedTransactions.test.d.ts +1 -0
- package/dist/graphql/subscriptions/test/ShieldedTransactions.test.js +41 -0
- package/dist/graphql/subscriptions/test/UnshieldedTransactions.test.d.ts +1 -0
- package/dist/graphql/subscriptions/test/UnshieldedTransactions.test.js +38 -0
- package/dist/graphql/subscriptions/test/ZswapEvents.test.d.ts +1 -0
- package/dist/graphql/subscriptions/test/ZswapEvents.test.js +36 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/package.json +61 -0
|
@@ -0,0 +1,656 @@
|
|
|
1
|
+
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
|
|
2
|
+
export type Maybe<T> = T | null;
|
|
3
|
+
export type InputMaybe<T> = Maybe<T>;
|
|
4
|
+
export type Exact<T extends {
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}> = {
|
|
7
|
+
[K in keyof T]: T[K];
|
|
8
|
+
};
|
|
9
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
10
|
+
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
11
|
+
};
|
|
12
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
13
|
+
[SubKey in K]: Maybe<T[SubKey]>;
|
|
14
|
+
};
|
|
15
|
+
export type MakeEmpty<T extends {
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}, K extends keyof T> = {
|
|
18
|
+
[_ in K]?: never;
|
|
19
|
+
};
|
|
20
|
+
export type Incremental<T> = T | {
|
|
21
|
+
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
|
|
22
|
+
};
|
|
23
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
24
|
+
export type Scalars = {
|
|
25
|
+
ID: {
|
|
26
|
+
input: string;
|
|
27
|
+
output: string;
|
|
28
|
+
};
|
|
29
|
+
String: {
|
|
30
|
+
input: string;
|
|
31
|
+
output: string;
|
|
32
|
+
};
|
|
33
|
+
Boolean: {
|
|
34
|
+
input: boolean;
|
|
35
|
+
output: boolean;
|
|
36
|
+
};
|
|
37
|
+
Int: {
|
|
38
|
+
input: number;
|
|
39
|
+
output: number;
|
|
40
|
+
};
|
|
41
|
+
Float: {
|
|
42
|
+
input: number;
|
|
43
|
+
output: number;
|
|
44
|
+
};
|
|
45
|
+
HexEncoded: {
|
|
46
|
+
input: string;
|
|
47
|
+
output: string;
|
|
48
|
+
};
|
|
49
|
+
Unit: {
|
|
50
|
+
input: null;
|
|
51
|
+
output: null;
|
|
52
|
+
};
|
|
53
|
+
UnshieldedAddress: {
|
|
54
|
+
input: string;
|
|
55
|
+
output: string;
|
|
56
|
+
};
|
|
57
|
+
ViewingKey: {
|
|
58
|
+
input: string;
|
|
59
|
+
output: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
/** A block with its relevant data. */
|
|
63
|
+
export type Block = {
|
|
64
|
+
/** The hex-encoded block author. */
|
|
65
|
+
author: Maybe<Scalars['HexEncoded']['output']>;
|
|
66
|
+
/** The block hash. */
|
|
67
|
+
hash: Scalars['HexEncoded']['output'];
|
|
68
|
+
/** The block height. */
|
|
69
|
+
height: Scalars['Int']['output'];
|
|
70
|
+
/** The hex-encoded ledger parameters for this block. */
|
|
71
|
+
ledgerParameters: Scalars['HexEncoded']['output'];
|
|
72
|
+
/** The parent of this block. */
|
|
73
|
+
parent: Maybe<Block>;
|
|
74
|
+
/** The protocol version. */
|
|
75
|
+
protocolVersion: Scalars['Int']['output'];
|
|
76
|
+
/** The UNIX timestamp. */
|
|
77
|
+
timestamp: Scalars['Int']['output'];
|
|
78
|
+
/** The transactions within this block. */
|
|
79
|
+
transactions: Array<Transaction>;
|
|
80
|
+
};
|
|
81
|
+
/** Either a block hash or a block height. */
|
|
82
|
+
export type BlockOffset =
|
|
83
|
+
/** A hex-encoded block hash. */
|
|
84
|
+
{
|
|
85
|
+
hash: Scalars['HexEncoded']['input'];
|
|
86
|
+
height?: never;
|
|
87
|
+
} | /** A block height. */ {
|
|
88
|
+
hash?: never;
|
|
89
|
+
height: Scalars['Int']['input'];
|
|
90
|
+
};
|
|
91
|
+
export type CollapsedMerkleTree = {
|
|
92
|
+
/** The zswap state end index. */
|
|
93
|
+
endIndex: Scalars['Int']['output'];
|
|
94
|
+
/** The protocol version. */
|
|
95
|
+
protocolVersion: Scalars['Int']['output'];
|
|
96
|
+
/** The zswap state start index. */
|
|
97
|
+
startIndex: Scalars['Int']['output'];
|
|
98
|
+
/** The hex-encoded value. */
|
|
99
|
+
update: Scalars['HexEncoded']['output'];
|
|
100
|
+
};
|
|
101
|
+
/** A contract action. */
|
|
102
|
+
export type ContractAction = {
|
|
103
|
+
address: Scalars['HexEncoded']['output'];
|
|
104
|
+
chainState: Scalars['HexEncoded']['output'];
|
|
105
|
+
state: Scalars['HexEncoded']['output'];
|
|
106
|
+
transaction: Transaction;
|
|
107
|
+
unshieldedBalances: Array<ContractBalance>;
|
|
108
|
+
};
|
|
109
|
+
/** Either a block offset or a transaction offset. */
|
|
110
|
+
export type ContractActionOffset =
|
|
111
|
+
/** Either a block hash or a block height. */
|
|
112
|
+
{
|
|
113
|
+
blockOffset: BlockOffset;
|
|
114
|
+
transactionOffset?: never;
|
|
115
|
+
} | /** Either a transaction hash or a transaction identifier. */ {
|
|
116
|
+
blockOffset?: never;
|
|
117
|
+
transactionOffset: TransactionOffset;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Represents a token balance held by a contract.
|
|
121
|
+
* This type is exposed through the GraphQL API to allow clients to query
|
|
122
|
+
* unshielded token balances for any contract action (Deploy, Call, Update).
|
|
123
|
+
*/
|
|
124
|
+
export type ContractBalance = {
|
|
125
|
+
/** Balance amount as string to support larger integer values (up to 16 bytes). */
|
|
126
|
+
amount: Scalars['String']['output'];
|
|
127
|
+
/** Hex-encoded token type identifier. */
|
|
128
|
+
tokenType: Scalars['HexEncoded']['output'];
|
|
129
|
+
};
|
|
130
|
+
/** A contract call. */
|
|
131
|
+
export type ContractCall = ContractAction & {
|
|
132
|
+
/** The hex-encoded serialized address. */
|
|
133
|
+
address: Scalars['HexEncoded']['output'];
|
|
134
|
+
/** The hex-encoded serialized contract-specific zswap state. */
|
|
135
|
+
chainState: Scalars['HexEncoded']['output'];
|
|
136
|
+
/** Contract deploy for this contract call. */
|
|
137
|
+
deploy: ContractDeploy;
|
|
138
|
+
/** The entry point. */
|
|
139
|
+
entryPoint: Scalars['String']['output'];
|
|
140
|
+
/** The hex-encoded serialized state. */
|
|
141
|
+
state: Scalars['HexEncoded']['output'];
|
|
142
|
+
/** Transaction for this contract call. */
|
|
143
|
+
transaction: Transaction;
|
|
144
|
+
/** Unshielded token balances held by this contract. */
|
|
145
|
+
unshieldedBalances: Array<ContractBalance>;
|
|
146
|
+
};
|
|
147
|
+
/** A contract deployment. */
|
|
148
|
+
export type ContractDeploy = ContractAction & {
|
|
149
|
+
/** The hex-encoded serialized address. */
|
|
150
|
+
address: Scalars['HexEncoded']['output'];
|
|
151
|
+
/** The hex-encoded serialized contract-specific zswap state. */
|
|
152
|
+
chainState: Scalars['HexEncoded']['output'];
|
|
153
|
+
/** The hex-encoded serialized state. */
|
|
154
|
+
state: Scalars['HexEncoded']['output'];
|
|
155
|
+
/** Transaction for this contract deploy. */
|
|
156
|
+
transaction: Transaction;
|
|
157
|
+
/** Unshielded token balances held by this contract. */
|
|
158
|
+
unshieldedBalances: Array<ContractBalance>;
|
|
159
|
+
};
|
|
160
|
+
/** A contract update. */
|
|
161
|
+
export type ContractUpdate = ContractAction & {
|
|
162
|
+
/** The hex-encoded serialized address. */
|
|
163
|
+
address: Scalars['HexEncoded']['output'];
|
|
164
|
+
/** The hex-encoded serialized contract-specific zswap state. */
|
|
165
|
+
chainState: Scalars['HexEncoded']['output'];
|
|
166
|
+
/** The hex-encoded serialized state. */
|
|
167
|
+
state: Scalars['HexEncoded']['output'];
|
|
168
|
+
/** Transaction for this contract update. */
|
|
169
|
+
transaction: Transaction;
|
|
170
|
+
/** Unshielded token balances held by this contract after the update. */
|
|
171
|
+
unshieldedBalances: Array<ContractBalance>;
|
|
172
|
+
};
|
|
173
|
+
export type DustGenerationDtimeUpdate = DustLedgerEvent & {
|
|
174
|
+
/** The ID of this dust ledger event. */
|
|
175
|
+
id: Scalars['Int']['output'];
|
|
176
|
+
/** The maximum ID of all dust ledger events. */
|
|
177
|
+
maxId: Scalars['Int']['output'];
|
|
178
|
+
/** The hex-encoded serialized event. */
|
|
179
|
+
raw: Scalars['HexEncoded']['output'];
|
|
180
|
+
};
|
|
181
|
+
/** DUST generation status for a specific Cardano stake key. */
|
|
182
|
+
export type DustGenerationStatus = {
|
|
183
|
+
/** The hex-encoded Cardano stake key. */
|
|
184
|
+
cardanoStakeKey: Scalars['HexEncoded']['output'];
|
|
185
|
+
/** Current DUST capacity. */
|
|
186
|
+
currentCapacity: Scalars['String']['output'];
|
|
187
|
+
/** The hex-encoded associated DUST address if registered. */
|
|
188
|
+
dustAddress: Maybe<Scalars['HexEncoded']['output']>;
|
|
189
|
+
/** Generation rate in Specks per second. */
|
|
190
|
+
generationRate: Scalars['String']['output'];
|
|
191
|
+
/** NIGHT balance backing generation. */
|
|
192
|
+
nightBalance: Scalars['String']['output'];
|
|
193
|
+
/** Whether this stake key is registered. */
|
|
194
|
+
registered: Scalars['Boolean']['output'];
|
|
195
|
+
};
|
|
196
|
+
export type DustInitialUtxo = DustLedgerEvent & {
|
|
197
|
+
/** The ID of this dust ledger event. */
|
|
198
|
+
id: Scalars['Int']['output'];
|
|
199
|
+
/** The maximum ID of all dust ledger events. */
|
|
200
|
+
maxId: Scalars['Int']['output'];
|
|
201
|
+
/** The dust output. */
|
|
202
|
+
output: DustOutput;
|
|
203
|
+
/** The hex-encoded serialized event. */
|
|
204
|
+
raw: Scalars['HexEncoded']['output'];
|
|
205
|
+
};
|
|
206
|
+
/** A dust related ledger event. */
|
|
207
|
+
export type DustLedgerEvent = {
|
|
208
|
+
id: Scalars['Int']['output'];
|
|
209
|
+
maxId: Scalars['Int']['output'];
|
|
210
|
+
raw: Scalars['HexEncoded']['output'];
|
|
211
|
+
};
|
|
212
|
+
/** A dust output. */
|
|
213
|
+
export type DustOutput = {
|
|
214
|
+
/** The hex-encoded 32-byte nonce. */
|
|
215
|
+
nonce: Scalars['HexEncoded']['output'];
|
|
216
|
+
};
|
|
217
|
+
export type DustSpendProcessed = DustLedgerEvent & {
|
|
218
|
+
/** The ID of this dust ledger event. */
|
|
219
|
+
id: Scalars['Int']['output'];
|
|
220
|
+
/** The maximum ID of all dust ledger events. */
|
|
221
|
+
maxId: Scalars['Int']['output'];
|
|
222
|
+
/** The hex-encoded serialized event. */
|
|
223
|
+
raw: Scalars['HexEncoded']['output'];
|
|
224
|
+
};
|
|
225
|
+
export type Mutation = {
|
|
226
|
+
/** Connect the wallet with the given viewing key and return a session ID. */
|
|
227
|
+
connect: Scalars['HexEncoded']['output'];
|
|
228
|
+
/** Disconnect the wallet with the given session ID. */
|
|
229
|
+
disconnect: Scalars['Unit']['output'];
|
|
230
|
+
};
|
|
231
|
+
export type MutationConnectArgs = {
|
|
232
|
+
viewingKey: Scalars['ViewingKey']['input'];
|
|
233
|
+
};
|
|
234
|
+
export type MutationDisconnectArgs = {
|
|
235
|
+
sessionId: Scalars['HexEncoded']['input'];
|
|
236
|
+
};
|
|
237
|
+
export type ParamChange = DustLedgerEvent & {
|
|
238
|
+
/** The ID of this dust ledger event. */
|
|
239
|
+
id: Scalars['Int']['output'];
|
|
240
|
+
/** The maximum ID of all dust ledger events. */
|
|
241
|
+
maxId: Scalars['Int']['output'];
|
|
242
|
+
/** The hex-encoded serialized event. */
|
|
243
|
+
raw: Scalars['HexEncoded']['output'];
|
|
244
|
+
};
|
|
245
|
+
export type Query = {
|
|
246
|
+
/** Find a block for the given optional offset; if not present, the latest block is returned. */
|
|
247
|
+
block: Maybe<Block>;
|
|
248
|
+
/** Find a contract action for the given address and optional offset. */
|
|
249
|
+
contractAction: Maybe<ContractAction>;
|
|
250
|
+
/** Get DUST generation status for specific Cardano stake keys. */
|
|
251
|
+
dustGenerationStatus: Array<DustGenerationStatus>;
|
|
252
|
+
/** Find transactions for the given offset. */
|
|
253
|
+
transactions: Array<Transaction>;
|
|
254
|
+
};
|
|
255
|
+
export type QueryBlockArgs = {
|
|
256
|
+
offset: InputMaybe<BlockOffset>;
|
|
257
|
+
};
|
|
258
|
+
export type QueryContractActionArgs = {
|
|
259
|
+
address: Scalars['HexEncoded']['input'];
|
|
260
|
+
offset: InputMaybe<ContractActionOffset>;
|
|
261
|
+
};
|
|
262
|
+
export type QueryDustGenerationStatusArgs = {
|
|
263
|
+
cardanoStakeKeys: Array<Scalars['HexEncoded']['input']>;
|
|
264
|
+
};
|
|
265
|
+
export type QueryTransactionsArgs = {
|
|
266
|
+
offset: TransactionOffset;
|
|
267
|
+
};
|
|
268
|
+
/** A regular Midnight transaction. */
|
|
269
|
+
export type RegularTransaction = Transaction & {
|
|
270
|
+
/** The block for this transaction. */
|
|
271
|
+
block: Block;
|
|
272
|
+
/** The contract actions for this transaction. */
|
|
273
|
+
contractActions: Array<ContractAction>;
|
|
274
|
+
/** Dust ledger events of this transaction. */
|
|
275
|
+
dustLedgerEvents: Array<DustLedgerEvent>;
|
|
276
|
+
/** The zswap state end index. */
|
|
277
|
+
endIndex: Scalars['Int']['output'];
|
|
278
|
+
/** Fee information for this transaction. */
|
|
279
|
+
fees: TransactionFees;
|
|
280
|
+
/** The hex-encoded transaction hash. */
|
|
281
|
+
hash: Scalars['HexEncoded']['output'];
|
|
282
|
+
/** The transaction ID. */
|
|
283
|
+
id: Scalars['Int']['output'];
|
|
284
|
+
/** The hex-encoded serialized transaction identifiers. */
|
|
285
|
+
identifiers: Array<Scalars['HexEncoded']['output']>;
|
|
286
|
+
/** The hex-encoded serialized merkle-tree root. */
|
|
287
|
+
merkleTreeRoot: Scalars['HexEncoded']['output'];
|
|
288
|
+
/** The protocol version. */
|
|
289
|
+
protocolVersion: Scalars['Int']['output'];
|
|
290
|
+
/** The hex-encoded serialized transaction content. */
|
|
291
|
+
raw: Scalars['HexEncoded']['output'];
|
|
292
|
+
/** The zswap state start index. */
|
|
293
|
+
startIndex: Scalars['Int']['output'];
|
|
294
|
+
/** The result of applying this transaction to the ledger state. */
|
|
295
|
+
transactionResult: TransactionResult;
|
|
296
|
+
/** Unshielded UTXOs created by this transaction. */
|
|
297
|
+
unshieldedCreatedOutputs: Array<UnshieldedUtxo>;
|
|
298
|
+
/** Unshielded UTXOs spent (consumed) by this transaction. */
|
|
299
|
+
unshieldedSpentOutputs: Array<UnshieldedUtxo>;
|
|
300
|
+
/** Zswap ledger events of this transaction. */
|
|
301
|
+
zswapLedgerEvents: Array<ZswapLedgerEvent>;
|
|
302
|
+
};
|
|
303
|
+
/** A transaction relevant for the subscribing wallet and an optional collapsed merkle tree. */
|
|
304
|
+
export type RelevantTransaction = {
|
|
305
|
+
/** An optional collapsed merkle tree. */
|
|
306
|
+
collapsedMerkleTree: Maybe<CollapsedMerkleTree>;
|
|
307
|
+
/** A transaction relevant for the subscribing wallet. */
|
|
308
|
+
transaction: RegularTransaction;
|
|
309
|
+
};
|
|
310
|
+
/**
|
|
311
|
+
* One of many segments for a partially successful transaction result showing success for some
|
|
312
|
+
* segment.
|
|
313
|
+
*/
|
|
314
|
+
export type Segment = {
|
|
315
|
+
/** Segment ID. */
|
|
316
|
+
id: Scalars['Int']['output'];
|
|
317
|
+
/** Successful or not. */
|
|
318
|
+
success: Scalars['Boolean']['output'];
|
|
319
|
+
};
|
|
320
|
+
/** An event of the shielded transactions subscription. */
|
|
321
|
+
export type ShieldedTransactionsEvent = RelevantTransaction | ShieldedTransactionsProgress;
|
|
322
|
+
/** Information about the shielded transactions indexing progress. */
|
|
323
|
+
export type ShieldedTransactionsProgress = {
|
|
324
|
+
/**
|
|
325
|
+
* The highest zswap state end index (see `endIndex` of `Transaction`) of all transactions
|
|
326
|
+
* checked for relevance. Initially less than and eventually (when some wallet has been fully
|
|
327
|
+
* indexed) equal to `highest_end_index`. A value of zero (very unlikely) means that no wallet
|
|
328
|
+
* has subscribed before and indexing for the subscribing wallet has not yet started.
|
|
329
|
+
*/
|
|
330
|
+
highestCheckedEndIndex: Scalars['Int']['output'];
|
|
331
|
+
/**
|
|
332
|
+
* The highest zswap state end index (see `endIndex` of `Transaction`) of all transactions. It
|
|
333
|
+
* represents the known state of the blockchain. A value of zero (completely unlikely) means
|
|
334
|
+
* that no shielded transactions have been indexed yet.
|
|
335
|
+
*/
|
|
336
|
+
highestEndIndex: Scalars['Int']['output'];
|
|
337
|
+
/**
|
|
338
|
+
* The highest zswap state end index (see `endIndex` of `Transaction`) of all relevant
|
|
339
|
+
* transactions for the subscribing wallet. Usually less than `highest_checked_end_index`
|
|
340
|
+
* unless the latest checked transaction is relevant for the subscribing wallet. A value of
|
|
341
|
+
* zero means that no relevant transactions have been indexed for the subscribing wallet.
|
|
342
|
+
*/
|
|
343
|
+
highestRelevantEndIndex: Scalars['Int']['output'];
|
|
344
|
+
};
|
|
345
|
+
export type Subscription = {
|
|
346
|
+
/**
|
|
347
|
+
* Subscribe to blocks starting at the given offset or at the latest block if the offset is
|
|
348
|
+
* omitted.
|
|
349
|
+
*/
|
|
350
|
+
blocks: Block;
|
|
351
|
+
/**
|
|
352
|
+
* Subscribe to contract actions with the given address starting at the given offset or at the
|
|
353
|
+
* latest block if the offset is omitted.
|
|
354
|
+
*/
|
|
355
|
+
contractActions: ContractAction;
|
|
356
|
+
/** Subscribe to dust ledger events starting at the given ID or at the very start if omitted. */
|
|
357
|
+
dustLedgerEvents: DustLedgerEvent;
|
|
358
|
+
/**
|
|
359
|
+
* Subscribe to shielded transaction events for the given session ID starting at the given
|
|
360
|
+
* index or at zero if omitted.
|
|
361
|
+
*/
|
|
362
|
+
shieldedTransactions: ShieldedTransactionsEvent;
|
|
363
|
+
/**
|
|
364
|
+
* Subscribe unshielded transaction events for the given address and the given transaction ID
|
|
365
|
+
* or zero if omitted.
|
|
366
|
+
*/
|
|
367
|
+
unshieldedTransactions: UnshieldedTransactionsEvent;
|
|
368
|
+
/** Subscribe to zswap ledger events starting at the given ID or at the very start if omitted. */
|
|
369
|
+
zswapLedgerEvents: ZswapLedgerEvent;
|
|
370
|
+
};
|
|
371
|
+
export type SubscriptionBlocksArgs = {
|
|
372
|
+
offset: InputMaybe<BlockOffset>;
|
|
373
|
+
};
|
|
374
|
+
export type SubscriptionContractActionsArgs = {
|
|
375
|
+
address: Scalars['HexEncoded']['input'];
|
|
376
|
+
offset: InputMaybe<BlockOffset>;
|
|
377
|
+
};
|
|
378
|
+
export type SubscriptionDustLedgerEventsArgs = {
|
|
379
|
+
id: InputMaybe<Scalars['Int']['input']>;
|
|
380
|
+
};
|
|
381
|
+
export type SubscriptionShieldedTransactionsArgs = {
|
|
382
|
+
index: InputMaybe<Scalars['Int']['input']>;
|
|
383
|
+
sessionId: Scalars['HexEncoded']['input'];
|
|
384
|
+
};
|
|
385
|
+
export type SubscriptionUnshieldedTransactionsArgs = {
|
|
386
|
+
address: Scalars['UnshieldedAddress']['input'];
|
|
387
|
+
transactionId: InputMaybe<Scalars['Int']['input']>;
|
|
388
|
+
};
|
|
389
|
+
export type SubscriptionZswapLedgerEventsArgs = {
|
|
390
|
+
id: InputMaybe<Scalars['Int']['input']>;
|
|
391
|
+
};
|
|
392
|
+
/** A system Midnight transaction. */
|
|
393
|
+
export type SystemTransaction = Transaction & {
|
|
394
|
+
/** The block for this transaction. */
|
|
395
|
+
block: Block;
|
|
396
|
+
/** The contract actions for this transaction. */
|
|
397
|
+
contractActions: Array<ContractAction>;
|
|
398
|
+
/** Dust ledger events of this transaction. */
|
|
399
|
+
dustLedgerEvents: Array<DustLedgerEvent>;
|
|
400
|
+
/** The hex-encoded transaction hash. */
|
|
401
|
+
hash: Scalars['HexEncoded']['output'];
|
|
402
|
+
/** The transaction ID. */
|
|
403
|
+
id: Scalars['Int']['output'];
|
|
404
|
+
/** The protocol version. */
|
|
405
|
+
protocolVersion: Scalars['Int']['output'];
|
|
406
|
+
/** The hex-encoded serialized transaction content. */
|
|
407
|
+
raw: Scalars['HexEncoded']['output'];
|
|
408
|
+
/** Unshielded UTXOs created by this transaction. */
|
|
409
|
+
unshieldedCreatedOutputs: Array<UnshieldedUtxo>;
|
|
410
|
+
/** Unshielded UTXOs spent (consumed) by this transaction. */
|
|
411
|
+
unshieldedSpentOutputs: Array<UnshieldedUtxo>;
|
|
412
|
+
/** Zswap ledger events of this transaction. */
|
|
413
|
+
zswapLedgerEvents: Array<ZswapLedgerEvent>;
|
|
414
|
+
};
|
|
415
|
+
/** A Midnight transaction. */
|
|
416
|
+
export type Transaction = {
|
|
417
|
+
block: Block;
|
|
418
|
+
contractActions: Array<ContractAction>;
|
|
419
|
+
dustLedgerEvents: Array<DustLedgerEvent>;
|
|
420
|
+
hash: Scalars['HexEncoded']['output'];
|
|
421
|
+
id: Scalars['Int']['output'];
|
|
422
|
+
protocolVersion: Scalars['Int']['output'];
|
|
423
|
+
raw: Scalars['HexEncoded']['output'];
|
|
424
|
+
unshieldedCreatedOutputs: Array<UnshieldedUtxo>;
|
|
425
|
+
unshieldedSpentOutputs: Array<UnshieldedUtxo>;
|
|
426
|
+
zswapLedgerEvents: Array<ZswapLedgerEvent>;
|
|
427
|
+
};
|
|
428
|
+
/** Fees information for a transaction, including both paid and estimated fees. */
|
|
429
|
+
export type TransactionFees = {
|
|
430
|
+
/** The estimated fees that was calculated for this transaction in DUST. */
|
|
431
|
+
estimatedFees: Scalars['String']['output'];
|
|
432
|
+
/** The actual fees paid for this transaction in DUST. */
|
|
433
|
+
paidFees: Scalars['String']['output'];
|
|
434
|
+
};
|
|
435
|
+
/** Either a transaction hash or a transaction identifier. */
|
|
436
|
+
export type TransactionOffset =
|
|
437
|
+
/** A hex-encoded transaction hash. */
|
|
438
|
+
{
|
|
439
|
+
hash: Scalars['HexEncoded']['input'];
|
|
440
|
+
identifier?: never;
|
|
441
|
+
} | /** A hex-encoded transaction identifier. */ {
|
|
442
|
+
hash?: never;
|
|
443
|
+
identifier: Scalars['HexEncoded']['input'];
|
|
444
|
+
};
|
|
445
|
+
/**
|
|
446
|
+
* The result of applying a transaction to the ledger state. In case of a partial success (status),
|
|
447
|
+
* there will be segments.
|
|
448
|
+
*/
|
|
449
|
+
export type TransactionResult = {
|
|
450
|
+
segments: Maybe<Array<Segment>>;
|
|
451
|
+
status: TransactionResultStatus;
|
|
452
|
+
};
|
|
453
|
+
/** The status of the transaction result: success, partial success or failure. */
|
|
454
|
+
export type TransactionResultStatus = 'FAILURE' | 'PARTIAL_SUCCESS' | 'SUCCESS' | '%future added value';
|
|
455
|
+
/** A transaction that created and/or spent UTXOs alongside these and other information. */
|
|
456
|
+
export type UnshieldedTransaction = {
|
|
457
|
+
/** UTXOs created in the above transaction, possibly empty. */
|
|
458
|
+
createdUtxos: Array<UnshieldedUtxo>;
|
|
459
|
+
/** UTXOs spent in the above transaction, possibly empty. */
|
|
460
|
+
spentUtxos: Array<UnshieldedUtxo>;
|
|
461
|
+
/** The transaction that created and/or spent UTXOs. */
|
|
462
|
+
transaction: Transaction;
|
|
463
|
+
};
|
|
464
|
+
/** An event of the unshielded transactions subscription. */
|
|
465
|
+
export type UnshieldedTransactionsEvent = UnshieldedTransaction | UnshieldedTransactionsProgress;
|
|
466
|
+
/** Information about the unshielded indexing progress. */
|
|
467
|
+
export type UnshieldedTransactionsProgress = {
|
|
468
|
+
/** The highest transaction ID of all currently known transactions for a subscribed address. */
|
|
469
|
+
highestTransactionId: Scalars['Int']['output'];
|
|
470
|
+
};
|
|
471
|
+
/** Represents an unshielded UTXO. */
|
|
472
|
+
export type UnshieldedUtxo = {
|
|
473
|
+
/** Transaction that created this UTXO. */
|
|
474
|
+
createdAtTransaction: Transaction;
|
|
475
|
+
/** The creation time in seconds. */
|
|
476
|
+
ctime: Maybe<Scalars['Int']['output']>;
|
|
477
|
+
/** The hex-encoded initial nonce for DUST generation tracking. */
|
|
478
|
+
initialNonce: Scalars['HexEncoded']['output'];
|
|
479
|
+
/** The hex-encoded serialized intent hash. */
|
|
480
|
+
intentHash: Scalars['HexEncoded']['output'];
|
|
481
|
+
/** Index of this output within its creating transaction. */
|
|
482
|
+
outputIndex: Scalars['Int']['output'];
|
|
483
|
+
/** Owner Bech32m-encoded address. */
|
|
484
|
+
owner: Scalars['UnshieldedAddress']['output'];
|
|
485
|
+
/** Whether this UTXO is registered for DUST generation. */
|
|
486
|
+
registeredForDustGeneration: Scalars['Boolean']['output'];
|
|
487
|
+
/** Transaction that spent this UTXO. */
|
|
488
|
+
spentAtTransaction: Maybe<Transaction>;
|
|
489
|
+
/** Token hex-encoded serialized token type. */
|
|
490
|
+
tokenType: Scalars['HexEncoded']['output'];
|
|
491
|
+
/** UTXO value (quantity) as a string to support u128. */
|
|
492
|
+
value: Scalars['String']['output'];
|
|
493
|
+
};
|
|
494
|
+
/** A zswap related ledger event. */
|
|
495
|
+
export type ZswapLedgerEvent = {
|
|
496
|
+
/** The ID of this zswap ledger event. */
|
|
497
|
+
id: Scalars['Int']['output'];
|
|
498
|
+
/** The maximum ID of all zswap ledger events. */
|
|
499
|
+
maxId: Scalars['Int']['output'];
|
|
500
|
+
/** The hex-encoded serialized event. */
|
|
501
|
+
raw: Scalars['HexEncoded']['output'];
|
|
502
|
+
};
|
|
503
|
+
export type BlockHashQueryVariables = Exact<{
|
|
504
|
+
offset: InputMaybe<BlockOffset>;
|
|
505
|
+
}>;
|
|
506
|
+
export type BlockHashQuery = {
|
|
507
|
+
block: {
|
|
508
|
+
height: number;
|
|
509
|
+
hash: string;
|
|
510
|
+
ledgerParameters: string;
|
|
511
|
+
} | null;
|
|
512
|
+
};
|
|
513
|
+
export type ConnectMutationVariables = Exact<{
|
|
514
|
+
viewingKey: Scalars['ViewingKey']['input'];
|
|
515
|
+
}>;
|
|
516
|
+
export type ConnectMutation = {
|
|
517
|
+
connect: string;
|
|
518
|
+
};
|
|
519
|
+
export type DisconnectMutationVariables = Exact<{
|
|
520
|
+
sessionId: Scalars['HexEncoded']['input'];
|
|
521
|
+
}>;
|
|
522
|
+
export type DisconnectMutation = {
|
|
523
|
+
disconnect: null;
|
|
524
|
+
};
|
|
525
|
+
export type DustLedgerEventsSubscriptionVariables = Exact<{
|
|
526
|
+
id: InputMaybe<Scalars['Int']['input']>;
|
|
527
|
+
}>;
|
|
528
|
+
export type DustLedgerEventsSubscription = {
|
|
529
|
+
dustLedgerEvents: {
|
|
530
|
+
id: number;
|
|
531
|
+
raw: string;
|
|
532
|
+
maxId: number;
|
|
533
|
+
type: 'DustGenerationDtimeUpdate';
|
|
534
|
+
} | {
|
|
535
|
+
id: number;
|
|
536
|
+
raw: string;
|
|
537
|
+
maxId: number;
|
|
538
|
+
type: 'DustInitialUtxo';
|
|
539
|
+
} | {
|
|
540
|
+
id: number;
|
|
541
|
+
raw: string;
|
|
542
|
+
maxId: number;
|
|
543
|
+
type: 'DustSpendProcessed';
|
|
544
|
+
} | {
|
|
545
|
+
id: number;
|
|
546
|
+
raw: string;
|
|
547
|
+
maxId: number;
|
|
548
|
+
type: 'ParamChange';
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
export type ShieldedTransactionsSubscriptionVariables = Exact<{
|
|
552
|
+
sessionId: Scalars['HexEncoded']['input'];
|
|
553
|
+
index: InputMaybe<Scalars['Int']['input']>;
|
|
554
|
+
}>;
|
|
555
|
+
export type ShieldedTransactionsSubscription = {
|
|
556
|
+
shieldedTransactions: {
|
|
557
|
+
__typename: 'RelevantTransaction';
|
|
558
|
+
transaction: {
|
|
559
|
+
id: number;
|
|
560
|
+
raw: string;
|
|
561
|
+
hash: string;
|
|
562
|
+
protocolVersion: number;
|
|
563
|
+
identifiers: Array<string>;
|
|
564
|
+
startIndex: number;
|
|
565
|
+
endIndex: number;
|
|
566
|
+
fees: {
|
|
567
|
+
paidFees: string;
|
|
568
|
+
estimatedFees: string;
|
|
569
|
+
};
|
|
570
|
+
transactionResult: {
|
|
571
|
+
status: TransactionResultStatus;
|
|
572
|
+
segments: Array<{
|
|
573
|
+
id: number;
|
|
574
|
+
success: boolean;
|
|
575
|
+
}> | null;
|
|
576
|
+
};
|
|
577
|
+
};
|
|
578
|
+
collapsedMerkleTree: {
|
|
579
|
+
startIndex: number;
|
|
580
|
+
endIndex: number;
|
|
581
|
+
update: string;
|
|
582
|
+
protocolVersion: number;
|
|
583
|
+
} | null;
|
|
584
|
+
} | {
|
|
585
|
+
__typename: 'ShieldedTransactionsProgress';
|
|
586
|
+
highestEndIndex: number;
|
|
587
|
+
highestCheckedEndIndex: number;
|
|
588
|
+
highestRelevantEndIndex: number;
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
export type UnshieldedTransactionsSubscriptionVariables = Exact<{
|
|
592
|
+
address: Scalars['UnshieldedAddress']['input'];
|
|
593
|
+
transactionId: InputMaybe<Scalars['Int']['input']>;
|
|
594
|
+
}>;
|
|
595
|
+
export type UnshieldedTransactionsSubscription = {
|
|
596
|
+
unshieldedTransactions: {
|
|
597
|
+
type: 'UnshieldedTransaction';
|
|
598
|
+
transaction: {
|
|
599
|
+
identifiers: Array<string>;
|
|
600
|
+
id: number;
|
|
601
|
+
hash: string;
|
|
602
|
+
protocolVersion: number;
|
|
603
|
+
type: 'RegularTransaction';
|
|
604
|
+
transactionResult: {
|
|
605
|
+
status: TransactionResultStatus;
|
|
606
|
+
segments: Array<{
|
|
607
|
+
id: number;
|
|
608
|
+
success: boolean;
|
|
609
|
+
}> | null;
|
|
610
|
+
};
|
|
611
|
+
} | {
|
|
612
|
+
id: number;
|
|
613
|
+
hash: string;
|
|
614
|
+
protocolVersion: number;
|
|
615
|
+
type: 'SystemTransaction';
|
|
616
|
+
};
|
|
617
|
+
createdUtxos: Array<{
|
|
618
|
+
owner: string;
|
|
619
|
+
tokenType: string;
|
|
620
|
+
value: string;
|
|
621
|
+
outputIndex: number;
|
|
622
|
+
intentHash: string;
|
|
623
|
+
ctime: number | null;
|
|
624
|
+
registeredForDustGeneration: boolean;
|
|
625
|
+
}>;
|
|
626
|
+
spentUtxos: Array<{
|
|
627
|
+
owner: string;
|
|
628
|
+
tokenType: string;
|
|
629
|
+
value: string;
|
|
630
|
+
outputIndex: number;
|
|
631
|
+
intentHash: string;
|
|
632
|
+
ctime: number | null;
|
|
633
|
+
registeredForDustGeneration: boolean;
|
|
634
|
+
}>;
|
|
635
|
+
} | {
|
|
636
|
+
highestTransactionId: number;
|
|
637
|
+
type: 'UnshieldedTransactionsProgress';
|
|
638
|
+
};
|
|
639
|
+
};
|
|
640
|
+
export type ZswapEventsSubscriptionVariables = Exact<{
|
|
641
|
+
id: InputMaybe<Scalars['Int']['input']>;
|
|
642
|
+
}>;
|
|
643
|
+
export type ZswapEventsSubscription = {
|
|
644
|
+
zswapLedgerEvents: {
|
|
645
|
+
id: number;
|
|
646
|
+
raw: string;
|
|
647
|
+
maxId: number;
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
export declare const BlockHashDocument: DocumentNode<BlockHashQuery, BlockHashQueryVariables>;
|
|
651
|
+
export declare const ConnectDocument: DocumentNode<ConnectMutation, ConnectMutationVariables>;
|
|
652
|
+
export declare const DisconnectDocument: DocumentNode<DisconnectMutation, DisconnectMutationVariables>;
|
|
653
|
+
export declare const DustLedgerEventsDocument: DocumentNode<DustLedgerEventsSubscription, DustLedgerEventsSubscriptionVariables>;
|
|
654
|
+
export declare const ShieldedTransactionsDocument: DocumentNode<ShieldedTransactionsSubscription, ShieldedTransactionsSubscriptionVariables>;
|
|
655
|
+
export declare const UnshieldedTransactionsDocument: DocumentNode<UnshieldedTransactionsSubscription, UnshieldedTransactionsSubscriptionVariables>;
|
|
656
|
+
export declare const ZswapEventsDocument: DocumentNode<ZswapEventsSubscription, ZswapEventsSubscriptionVariables>;
|