@solana/rpc-graphql 2.0.0-experimental.ee4214c → 2.0.0-experimental.f46b34c
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 +1088 -30
- package/dist/index.browser.cjs +2710 -1881
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +2711 -1882
- package/dist/index.browser.js.map +1 -1
- package/dist/index.native.js +2711 -1882
- package/dist/index.native.js.map +1 -1
- package/dist/index.node.cjs +2710 -1881
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.js +2711 -1882
- package/dist/index.node.js.map +1 -1
- package/dist/types/cache.d.ts.map +1 -0
- package/dist/types/context.d.ts +15 -15
- package/dist/types/context.d.ts.map +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/loaders/account.d.ts +14 -0
- package/dist/types/loaders/account.d.ts.map +1 -0
- package/dist/types/loaders/block.d.ts +6 -0
- package/dist/types/loaders/block.d.ts.map +1 -0
- package/dist/types/loaders/program-accounts.d.ts +6 -0
- package/dist/types/loaders/program-accounts.d.ts.map +1 -0
- package/dist/types/loaders/transaction.d.ts +16 -0
- package/dist/types/loaders/transaction.d.ts.map +1 -0
- package/dist/types/resolvers/account.d.ts +8 -0
- package/dist/types/resolvers/account.d.ts.map +1 -0
- package/dist/types/rpc.d.ts +7 -2
- package/dist/types/rpc.d.ts.map +1 -0
- package/dist/types/schema/account.d.ts +124 -0
- package/dist/types/schema/account.d.ts.map +1 -0
- package/dist/types/schema/block.d.ts +17 -0
- package/dist/types/schema/block.d.ts.map +1 -0
- package/dist/types/schema/common/inputs.d.ts +10 -0
- package/dist/types/schema/common/inputs.d.ts.map +1 -0
- package/dist/types/schema/common/scalars.d.ts +13 -0
- package/dist/types/schema/common/scalars.d.ts.map +1 -0
- package/dist/types/schema/common/types.d.ts +12 -0
- package/dist/types/schema/common/types.d.ts.map +1 -0
- package/dist/types/schema/index.d.ts +2 -0
- package/dist/types/schema/index.d.ts.map +1 -0
- package/dist/types/schema/instruction.d.ts +954 -0
- package/dist/types/schema/instruction.d.ts.map +1 -0
- package/dist/types/schema/program-accounts.d.ts +12 -0
- package/dist/types/schema/program-accounts.d.ts.map +1 -0
- package/dist/types/schema/transaction.d.ts +16 -0
- package/dist/types/schema/transaction.d.ts.map +1 -0
- package/package.json +14 -11
- package/dist/types/schema/account/index.d.ts +0 -3
- package/dist/types/schema/account/query.d.ts +0 -38
- package/dist/types/schema/account/types.d.ts +0 -5
- package/dist/types/schema/block/index.d.ts +0 -3
- package/dist/types/schema/block/query.d.ts +0 -42
- package/dist/types/schema/block/types.d.ts +0 -7
- package/dist/types/schema/inputs.d.ts +0 -9
- package/dist/types/schema/picks.d.ts +0 -36
- package/dist/types/schema/program-accounts/index.d.ts +0 -2
- package/dist/types/schema/program-accounts/query.d.ts +0 -47
- package/dist/types/schema/program-accounts/types.d.ts +0 -3
- package/dist/types/schema/scalars.d.ts +0 -3
- package/dist/types/schema/transaction/index.d.ts +0 -3
- package/dist/types/schema/transaction/query.d.ts +0 -33
- package/dist/types/schema/transaction/types.d.ts +0 -12
package/dist/index.browser.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { graphql, Kind } from 'graphql';
|
|
2
|
+
import { makeExecutableSchema } from '@graphql-tools/schema';
|
|
2
3
|
|
|
3
4
|
// src/rpc.ts
|
|
4
5
|
|
|
@@ -37,9 +38,62 @@ function createGraphQLCache() {
|
|
|
37
38
|
} ;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
// src/
|
|
41
|
-
|
|
42
|
-
const
|
|
41
|
+
// src/loaders/account.ts
|
|
42
|
+
function normalizeArgs(args) {
|
|
43
|
+
const { commitment, dataSlice, encoding, minContextSlot } = args;
|
|
44
|
+
return {
|
|
45
|
+
commitment: commitment ?? "confirmed",
|
|
46
|
+
dataSlice,
|
|
47
|
+
encoding: encoding ?? "jsonParsed",
|
|
48
|
+
minContextSlot
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function onlyAddressRequested(info) {
|
|
52
|
+
if (info && info.fieldNodes[0].selectionSet) {
|
|
53
|
+
const selectionSet = info.fieldNodes[0].selectionSet;
|
|
54
|
+
const requestedFields = selectionSet.selections.map((field) => {
|
|
55
|
+
if (field.kind === "Field") {
|
|
56
|
+
return field.name.value;
|
|
57
|
+
}
|
|
58
|
+
return null;
|
|
59
|
+
});
|
|
60
|
+
if (requestedFields && requestedFields.length === 1 && requestedFields[0] === "address") {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
function refineJsonParsedAccountData(jsonParsedAccountData) {
|
|
67
|
+
const meta = {
|
|
68
|
+
program: jsonParsedAccountData.program,
|
|
69
|
+
space: jsonParsedAccountData.space,
|
|
70
|
+
type: jsonParsedAccountData.parsed.type
|
|
71
|
+
};
|
|
72
|
+
const data = jsonParsedAccountData.parsed.info;
|
|
73
|
+
return { data, meta };
|
|
74
|
+
}
|
|
75
|
+
function processQueryResponse({ address, account, encoding }) {
|
|
76
|
+
const [refinedData, responseEncoding] = Array.isArray(account.data) ? encoding === "jsonParsed" ? [account.data[0], "base64"] : [account.data[0], encoding] : [refineJsonParsedAccountData(account.data), "jsonParsed"];
|
|
77
|
+
const responseBase = {
|
|
78
|
+
...account,
|
|
79
|
+
address,
|
|
80
|
+
encoding: responseEncoding
|
|
81
|
+
};
|
|
82
|
+
return typeof refinedData === "object" && "meta" in refinedData ? {
|
|
83
|
+
...responseBase,
|
|
84
|
+
data: refinedData.data,
|
|
85
|
+
meta: refinedData.meta
|
|
86
|
+
} : {
|
|
87
|
+
...responseBase,
|
|
88
|
+
data: refinedData
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
async function loadAccount({ address, ...config }, cache, rpc, info) {
|
|
92
|
+
if (onlyAddressRequested(info)) {
|
|
93
|
+
return { address };
|
|
94
|
+
}
|
|
95
|
+
const requestConfig = normalizeArgs(config);
|
|
96
|
+
const { encoding } = requestConfig;
|
|
43
97
|
const cached = cache.get(address, requestConfig);
|
|
44
98
|
if (cached !== null) {
|
|
45
99
|
return cached;
|
|
@@ -48,32 +102,197 @@ async function resolveAccount({ address, encoding = "jsonParsed", ...config }, c
|
|
|
48
102
|
throw e;
|
|
49
103
|
});
|
|
50
104
|
if (account === null) {
|
|
51
|
-
return
|
|
105
|
+
return { address };
|
|
52
106
|
}
|
|
53
|
-
const
|
|
54
|
-
const queryResponse = {
|
|
55
|
-
...account,
|
|
56
|
-
data,
|
|
57
|
-
encoding: responseEncoding
|
|
58
|
-
};
|
|
107
|
+
const queryResponse = processQueryResponse({ account, address, encoding });
|
|
59
108
|
cache.insert(address, requestConfig, queryResponse);
|
|
60
109
|
return queryResponse;
|
|
61
110
|
}
|
|
62
|
-
|
|
63
|
-
|
|
111
|
+
|
|
112
|
+
// src/loaders/transaction.ts
|
|
113
|
+
function normalizeArgs2(args) {
|
|
114
|
+
const { commitment, encoding } = args;
|
|
115
|
+
return {
|
|
116
|
+
commitment: commitment ?? "confirmed",
|
|
117
|
+
encoding: encoding ?? "jsonParsed",
|
|
118
|
+
// Always use 0 to avoid silly errors
|
|
119
|
+
maxSupportedTransactionVersion: 0
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function refineJsonParsedInstructionData(jsonParsedInstructionData) {
|
|
123
|
+
if ("parsed" in jsonParsedInstructionData) {
|
|
124
|
+
const meta = {
|
|
125
|
+
program: jsonParsedInstructionData.program,
|
|
126
|
+
type: jsonParsedInstructionData.parsed.type
|
|
127
|
+
};
|
|
128
|
+
const programId = jsonParsedInstructionData.programId;
|
|
129
|
+
const data = jsonParsedInstructionData.parsed.info;
|
|
130
|
+
return { data, meta, programId };
|
|
131
|
+
} else {
|
|
132
|
+
return jsonParsedInstructionData;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function refineJsonParsedTransactionData(jsonParsedTransactionData) {
|
|
136
|
+
const refinedInstructions = jsonParsedTransactionData.message.instructions.map(
|
|
137
|
+
(instruction) => refineJsonParsedInstructionData(instruction)
|
|
138
|
+
);
|
|
139
|
+
const message = {
|
|
140
|
+
...jsonParsedTransactionData.message,
|
|
141
|
+
instructions: refinedInstructions
|
|
142
|
+
};
|
|
143
|
+
return { message, signatures: jsonParsedTransactionData.signatures };
|
|
144
|
+
}
|
|
145
|
+
function refineJsonParsedTransactionMeta(jsonParsedTransactionMeta) {
|
|
146
|
+
const refinedInnerInstructions = jsonParsedTransactionMeta.innerInstructions.map(
|
|
147
|
+
({ index, instructions }) => {
|
|
148
|
+
return {
|
|
149
|
+
index,
|
|
150
|
+
instructions: instructions.map((instruction) => refineJsonParsedInstructionData(instruction))
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
return {
|
|
155
|
+
...jsonParsedTransactionMeta,
|
|
156
|
+
innerInstructions: refinedInnerInstructions
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function refineJsonParsedTransaction({ encoding, transaction }) {
|
|
160
|
+
const [transactionData, transactionMeta] = Array.isArray(transaction.transaction) ? [transaction.transaction[0], transaction.meta] : [refineJsonParsedTransactionData(transaction.transaction), refineJsonParsedTransactionMeta(transaction.meta)];
|
|
161
|
+
return {
|
|
162
|
+
data: transactionData,
|
|
163
|
+
encoding,
|
|
164
|
+
meta: transactionMeta,
|
|
165
|
+
slot: transaction.slot,
|
|
166
|
+
version: transaction.version
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function processQueryResponse2({ encoding, transaction }) {
|
|
170
|
+
return refineJsonParsedTransaction({ encoding, transaction });
|
|
171
|
+
}
|
|
172
|
+
async function loadTransaction({ signature, ...config }, cache, rpc, _info) {
|
|
173
|
+
const requestConfig = normalizeArgs2(config);
|
|
174
|
+
const { encoding } = requestConfig;
|
|
175
|
+
const cached = cache.get(signature, requestConfig);
|
|
176
|
+
if (cached !== null) {
|
|
177
|
+
return cached;
|
|
178
|
+
}
|
|
179
|
+
let transaction = await rpc.getTransaction(signature, requestConfig).send().catch((e) => {
|
|
180
|
+
throw e;
|
|
181
|
+
});
|
|
182
|
+
if (transaction === null) {
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
if (encoding !== "jsonParsed") {
|
|
186
|
+
const transactionJsonParsed = await rpc.getTransaction(signature, requestConfig).send().catch((e) => {
|
|
187
|
+
throw e;
|
|
188
|
+
});
|
|
189
|
+
if (transactionJsonParsed === null) {
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
transaction = {
|
|
193
|
+
...transaction,
|
|
194
|
+
meta: transactionJsonParsed.meta
|
|
195
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
const queryResponse = processQueryResponse2({ encoding, transaction });
|
|
199
|
+
cache.insert(signature, requestConfig, queryResponse);
|
|
200
|
+
return queryResponse;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// src/loaders/block.ts
|
|
204
|
+
function normalizeArgs3(args) {
|
|
205
|
+
const { commitment, encoding, transactionDetails } = args;
|
|
206
|
+
return {
|
|
207
|
+
commitment: commitment ?? "confirmed",
|
|
208
|
+
encoding: encoding ?? "jsonParsed",
|
|
209
|
+
// Always use 0 to avoid silly errors
|
|
210
|
+
maxSupportedTransactionVersion: 0,
|
|
211
|
+
transactionDetails: transactionDetails ?? "full"
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
function refineJsonParsedTransactionForAccounts({ transaction }) {
|
|
215
|
+
return {
|
|
216
|
+
data: transaction.transaction,
|
|
217
|
+
meta: transaction.meta,
|
|
218
|
+
version: transaction.version
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
function processQueryResponse3({
|
|
222
|
+
encoding,
|
|
223
|
+
block,
|
|
224
|
+
transactionDetails
|
|
225
|
+
}) {
|
|
226
|
+
if (typeof block === "object" && "transactions" in block) {
|
|
227
|
+
const refinedBlock = {
|
|
228
|
+
...block,
|
|
229
|
+
transactions: block.transactions.map((transaction) => {
|
|
230
|
+
if (transactionDetails === "accounts") {
|
|
231
|
+
return refineJsonParsedTransactionForAccounts({ transaction });
|
|
232
|
+
} else {
|
|
233
|
+
return refineJsonParsedTransaction({ encoding, transaction });
|
|
234
|
+
}
|
|
235
|
+
})
|
|
236
|
+
};
|
|
237
|
+
block = refinedBlock;
|
|
238
|
+
}
|
|
239
|
+
return {
|
|
240
|
+
...block,
|
|
241
|
+
encoding,
|
|
242
|
+
transactionDetails
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
async function loadBlock({ slot, ...config }, cache, rpc, _info) {
|
|
246
|
+
const requestConfig = normalizeArgs3(config);
|
|
247
|
+
const { encoding, transactionDetails } = requestConfig;
|
|
64
248
|
const cached = cache.get(slot, config);
|
|
65
249
|
if (cached !== null) {
|
|
66
250
|
return cached;
|
|
67
251
|
}
|
|
68
|
-
const block = await rpc.getBlock(slot, requestConfig).send()
|
|
252
|
+
const block = await rpc.getBlock(slot, requestConfig).send().catch((e) => {
|
|
253
|
+
throw e;
|
|
254
|
+
});
|
|
69
255
|
if (block === null) {
|
|
70
|
-
return
|
|
256
|
+
return { slot };
|
|
71
257
|
}
|
|
72
|
-
|
|
73
|
-
|
|
258
|
+
const queryResponse = processQueryResponse3({ block, encoding, transactionDetails });
|
|
259
|
+
cache.insert(slot, requestConfig, queryResponse);
|
|
260
|
+
return queryResponse;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// src/loaders/program-accounts.ts
|
|
264
|
+
function normalizeArgs4(args) {
|
|
265
|
+
const { commitment, dataSlice, encoding, filters, minContextSlot } = args;
|
|
266
|
+
return {
|
|
267
|
+
commitment: commitment ?? "confirmed",
|
|
268
|
+
dataSlice,
|
|
269
|
+
encoding: encoding ?? "jsonParsed",
|
|
270
|
+
filters,
|
|
271
|
+
minContextSlot
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
function processQueryResponse4({ encoding, programAccounts }) {
|
|
275
|
+
return programAccounts.map((programAccount) => {
|
|
276
|
+
const [refinedData, responseEncoding] = Array.isArray(programAccount.account.data) ? encoding === "jsonParsed" ? [programAccount.account.data[0], "base64"] : [programAccount.account.data[0], encoding] : [refineJsonParsedAccountData(programAccount.account.data), "jsonParsed"];
|
|
277
|
+
const pubkey = programAccount.pubkey;
|
|
278
|
+
const responseBase = {
|
|
279
|
+
...programAccount.account,
|
|
280
|
+
address: pubkey,
|
|
281
|
+
encoding: responseEncoding
|
|
282
|
+
};
|
|
283
|
+
return typeof refinedData === "object" && "meta" in refinedData ? {
|
|
284
|
+
...responseBase,
|
|
285
|
+
data: refinedData.data,
|
|
286
|
+
meta: refinedData.meta
|
|
287
|
+
} : {
|
|
288
|
+
...responseBase,
|
|
289
|
+
data: refinedData
|
|
290
|
+
};
|
|
291
|
+
});
|
|
74
292
|
}
|
|
75
|
-
async function
|
|
76
|
-
const requestConfig =
|
|
293
|
+
async function loadProgramAccounts({ programAddress, ...config }, cache, rpc, _info) {
|
|
294
|
+
const requestConfig = normalizeArgs4(config);
|
|
295
|
+
const { encoding } = requestConfig;
|
|
77
296
|
const cached = cache.get(programAddress, requestConfig);
|
|
78
297
|
if (cached !== null) {
|
|
79
298
|
return cached;
|
|
@@ -86,2100 +305,2710 @@ async function resolveProgramAccounts({ programAddress, encoding = "jsonParsed",
|
|
|
86
305
|
}).catch((e) => {
|
|
87
306
|
throw e;
|
|
88
307
|
});
|
|
89
|
-
const queryResponse =
|
|
90
|
-
const [data, responseEncoding] = Array.isArray(programAccount2.account.data) ? encoding === "jsonParsed" ? [programAccount2.account.data[0], "base64"] : [programAccount2.account.data[0], encoding] : [programAccount2.account.data, "jsonParsed"];
|
|
91
|
-
const pubkey = programAccount2.pubkey;
|
|
92
|
-
const account = { ...programAccount2.account, data, encoding: responseEncoding };
|
|
93
|
-
return {
|
|
94
|
-
account,
|
|
95
|
-
pubkey
|
|
96
|
-
};
|
|
97
|
-
});
|
|
308
|
+
const queryResponse = processQueryResponse4({ encoding, programAccounts });
|
|
98
309
|
cache.insert(programAddress, requestConfig, queryResponse);
|
|
99
310
|
return queryResponse;
|
|
100
311
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const cached = cache.get(signature, requestConfig);
|
|
104
|
-
if (cached !== null) {
|
|
105
|
-
return cached;
|
|
106
|
-
}
|
|
107
|
-
const transaction = await rpc.getTransaction(signature, requestConfig).send();
|
|
108
|
-
if (transaction === null) {
|
|
109
|
-
return null;
|
|
110
|
-
}
|
|
111
|
-
const [transactionData, responseEncoding, responseFormat] = Array.isArray(transaction.transaction) ? encoding === "jsonParsed" ? [transaction.transaction[0], "base64", "unparsed"] : [transaction.transaction[0], encoding, "unparsed"] : encoding === "jsonParsed" ? [transaction.transaction, encoding, "parsed"] : [transaction.transaction, encoding, "unparsed"];
|
|
112
|
-
if (transaction.meta) {
|
|
113
|
-
transaction.meta["format"] = responseFormat;
|
|
114
|
-
}
|
|
115
|
-
if (transactionData.message) {
|
|
116
|
-
transactionData.message["format"] = responseFormat;
|
|
117
|
-
}
|
|
118
|
-
const queryResponse = {
|
|
119
|
-
...transaction,
|
|
120
|
-
encoding: responseEncoding,
|
|
121
|
-
transaction: transactionData
|
|
122
|
-
};
|
|
123
|
-
cache.insert(signature, requestConfig, queryResponse);
|
|
124
|
-
return queryResponse;
|
|
125
|
-
}
|
|
312
|
+
|
|
313
|
+
// src/context.ts
|
|
126
314
|
function createSolanaGraphQLContext(rpc) {
|
|
127
315
|
const cache = createGraphQLCache();
|
|
128
316
|
return {
|
|
129
317
|
cache,
|
|
130
|
-
|
|
131
|
-
return
|
|
318
|
+
loadAccount(args, info) {
|
|
319
|
+
return loadAccount(args, this.cache, this.rpc, info);
|
|
132
320
|
},
|
|
133
|
-
|
|
134
|
-
return
|
|
321
|
+
loadBlock(args, info) {
|
|
322
|
+
return loadBlock(args, this.cache, this.rpc);
|
|
135
323
|
},
|
|
136
|
-
|
|
137
|
-
return
|
|
324
|
+
loadProgramAccounts(args, info) {
|
|
325
|
+
return loadProgramAccounts(args, this.cache, this.rpc);
|
|
138
326
|
},
|
|
139
|
-
|
|
140
|
-
return
|
|
327
|
+
loadTransaction(args, info) {
|
|
328
|
+
return loadTransaction(args, this.cache, this.rpc);
|
|
141
329
|
},
|
|
142
330
|
rpc
|
|
143
331
|
};
|
|
144
332
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
333
|
+
|
|
334
|
+
// src/resolvers/account.ts
|
|
335
|
+
var resolveAccount = (fieldName) => {
|
|
336
|
+
return (parent, args, context, info) => parent[fieldName] === null ? null : context.loadAccount({ ...args, address: parent[fieldName] }, info);
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
// src/schema/account.ts
|
|
340
|
+
var accountTypeDefs = (
|
|
341
|
+
/* GraphQL */
|
|
342
|
+
`
|
|
343
|
+
# Account interface
|
|
344
|
+
interface Account {
|
|
345
|
+
address: String
|
|
346
|
+
encoding: String
|
|
347
|
+
executable: Boolean
|
|
348
|
+
lamports: BigInt
|
|
349
|
+
owner: Account
|
|
350
|
+
rentEpoch: BigInt
|
|
150
351
|
}
|
|
151
|
-
return null;
|
|
152
|
-
},
|
|
153
|
-
parseValue(value) {
|
|
154
|
-
return BigInt(value);
|
|
155
|
-
},
|
|
156
|
-
serialize(value) {
|
|
157
|
-
return BigInt(value);
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
352
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
function number() {
|
|
172
|
-
return { type: GraphQLInt };
|
|
173
|
-
}
|
|
174
|
-
function string() {
|
|
175
|
-
return { type: GraphQLString };
|
|
176
|
-
}
|
|
177
|
-
function type(fieldType) {
|
|
178
|
-
return {
|
|
179
|
-
type: fieldType
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
function nonNull(fieldType) {
|
|
183
|
-
return {
|
|
184
|
-
type: new GraphQLNonNull(fieldType.type)
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
function list(elementType) {
|
|
188
|
-
return {
|
|
189
|
-
type: new GraphQLList(elementType.type)
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
function object(name, fields) {
|
|
193
|
-
return {
|
|
194
|
-
type: new GraphQLObjectType({
|
|
195
|
-
fields,
|
|
196
|
-
name
|
|
197
|
-
})
|
|
198
|
-
};
|
|
199
|
-
}
|
|
353
|
+
# An account with base58 encoded data
|
|
354
|
+
type AccountBase58 implements Account {
|
|
355
|
+
address: String
|
|
356
|
+
data: String
|
|
357
|
+
encoding: String
|
|
358
|
+
executable: Boolean
|
|
359
|
+
lamports: BigInt
|
|
360
|
+
owner: Account
|
|
361
|
+
rentEpoch: BigInt
|
|
362
|
+
}
|
|
200
363
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
364
|
+
# An account with base64 encoded data
|
|
365
|
+
type AccountBase64 implements Account {
|
|
366
|
+
address: String
|
|
367
|
+
data: String
|
|
368
|
+
encoding: String
|
|
369
|
+
executable: Boolean
|
|
370
|
+
lamports: BigInt
|
|
371
|
+
owner: Account
|
|
372
|
+
rentEpoch: BigInt
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
# An account with base64+zstd encoded data
|
|
376
|
+
type AccountBase64Zstd implements Account {
|
|
377
|
+
address: String
|
|
378
|
+
data: String
|
|
379
|
+
encoding: String
|
|
380
|
+
executable: Boolean
|
|
381
|
+
lamports: BigInt
|
|
382
|
+
owner: Account
|
|
383
|
+
rentEpoch: BigInt
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
# Interface for JSON-parsed meta
|
|
387
|
+
type JsonParsedAccountMeta {
|
|
388
|
+
program: String
|
|
389
|
+
space: BigInt
|
|
390
|
+
type: String
|
|
391
|
+
}
|
|
392
|
+
interface AccountJsonParsed {
|
|
393
|
+
meta: JsonParsedAccountMeta
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
# A nonce account
|
|
397
|
+
type NonceAccountFeeCalculator {
|
|
398
|
+
lamportsPerSignature: String
|
|
399
|
+
}
|
|
400
|
+
type NonceAccountData {
|
|
401
|
+
authority: Account
|
|
402
|
+
blockhash: String
|
|
403
|
+
feeCalculator: NonceAccountFeeCalculator
|
|
404
|
+
}
|
|
405
|
+
type NonceAccount implements Account & AccountJsonParsed {
|
|
406
|
+
address: String
|
|
407
|
+
data: NonceAccountData
|
|
408
|
+
encoding: String
|
|
409
|
+
executable: Boolean
|
|
410
|
+
lamports: BigInt
|
|
411
|
+
meta: JsonParsedAccountMeta
|
|
412
|
+
owner: Account
|
|
413
|
+
rentEpoch: BigInt
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
# A lookup table account
|
|
417
|
+
type LookupTableAccountData {
|
|
418
|
+
addresses: [String]
|
|
419
|
+
authority: Account
|
|
420
|
+
deactivationSlot: String
|
|
421
|
+
lastExtendedSlot: String
|
|
422
|
+
lastExtendedSlotStartIndex: Int
|
|
423
|
+
}
|
|
424
|
+
type LookupTableAccount implements Account & AccountJsonParsed {
|
|
425
|
+
address: String
|
|
426
|
+
data: LookupTableAccountData
|
|
427
|
+
encoding: String
|
|
428
|
+
executable: Boolean
|
|
429
|
+
lamports: BigInt
|
|
430
|
+
meta: JsonParsedAccountMeta
|
|
431
|
+
owner: Account
|
|
432
|
+
rentEpoch: BigInt
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
# A mint account
|
|
436
|
+
type MintAccountData {
|
|
437
|
+
decimals: Int
|
|
438
|
+
freezeAuthority: Account
|
|
439
|
+
isInitialized: Boolean
|
|
440
|
+
mintAuthority: Account
|
|
441
|
+
supply: String
|
|
442
|
+
}
|
|
443
|
+
type MintAccount implements Account & AccountJsonParsed {
|
|
444
|
+
address: String
|
|
445
|
+
data: MintAccountData
|
|
446
|
+
encoding: String
|
|
447
|
+
executable: Boolean
|
|
448
|
+
lamports: BigInt
|
|
449
|
+
meta: JsonParsedAccountMeta
|
|
450
|
+
owner: Account
|
|
451
|
+
rentEpoch: BigInt
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
# A token account
|
|
455
|
+
type TokenAccountData {
|
|
456
|
+
isNative: Boolean
|
|
457
|
+
mint: Account
|
|
458
|
+
owner: Account
|
|
459
|
+
state: String
|
|
460
|
+
tokenAmount: TokenAmount
|
|
461
|
+
}
|
|
462
|
+
type TokenAccount implements Account & AccountJsonParsed {
|
|
463
|
+
address: String
|
|
464
|
+
data: TokenAccountData
|
|
465
|
+
encoding: String
|
|
466
|
+
executable: Boolean
|
|
467
|
+
lamports: BigInt
|
|
468
|
+
meta: JsonParsedAccountMeta
|
|
469
|
+
owner: Account
|
|
470
|
+
rentEpoch: BigInt
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
# A stake account
|
|
474
|
+
type StakeAccountDataMetaAuthorized {
|
|
475
|
+
staker: Account
|
|
476
|
+
withdrawer: Account
|
|
477
|
+
}
|
|
478
|
+
type StakeAccountDataMetaLockup {
|
|
479
|
+
custodian: Account
|
|
480
|
+
epoch: BigInt
|
|
481
|
+
unixTimestamp: BigInt
|
|
482
|
+
}
|
|
483
|
+
type StakeAccountDataMeta {
|
|
484
|
+
authorized: StakeAccountDataMetaAuthorized
|
|
485
|
+
lockup: StakeAccountDataMetaLockup
|
|
486
|
+
rentExemptReserve: String
|
|
487
|
+
}
|
|
488
|
+
type StakeAccountDataStakeDelegation {
|
|
489
|
+
activationEpoch: BigInt
|
|
490
|
+
deactivationEpoch: BigInt
|
|
491
|
+
stake: String
|
|
492
|
+
voter: Account
|
|
493
|
+
warmupCooldownRate: Int
|
|
494
|
+
}
|
|
495
|
+
type StakeAccountDataStake {
|
|
496
|
+
creditsObserved: BigInt
|
|
497
|
+
delegation: StakeAccountDataStakeDelegation
|
|
498
|
+
}
|
|
499
|
+
type StakeAccountData {
|
|
500
|
+
meta: StakeAccountDataMeta
|
|
501
|
+
stake: StakeAccountDataStake
|
|
502
|
+
}
|
|
503
|
+
type StakeAccount implements Account & AccountJsonParsed {
|
|
504
|
+
address: String
|
|
505
|
+
data: StakeAccountData
|
|
506
|
+
encoding: String
|
|
507
|
+
executable: Boolean
|
|
508
|
+
lamports: BigInt
|
|
509
|
+
meta: JsonParsedAccountMeta
|
|
510
|
+
owner: Account
|
|
511
|
+
rentEpoch: BigInt
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
# A vote account
|
|
515
|
+
type VoteAccountDataAuthorizedVoter {
|
|
516
|
+
authorizedVoter: Account
|
|
517
|
+
epoch: BigInt
|
|
518
|
+
}
|
|
519
|
+
type VoteAccountDataEpochCredit {
|
|
520
|
+
credits: String
|
|
521
|
+
epoch: BigInt
|
|
522
|
+
previousCredits: String
|
|
523
|
+
}
|
|
524
|
+
type VoteAccountDataLastTimestamp {
|
|
525
|
+
slot: BigInt
|
|
526
|
+
timestamp: BigInt
|
|
527
|
+
}
|
|
528
|
+
type VoteAccountDataVote {
|
|
529
|
+
confirmationCount: Int
|
|
530
|
+
slot: BigInt
|
|
531
|
+
}
|
|
532
|
+
type VoteAccountData {
|
|
533
|
+
authorizedVoters: [VoteAccountDataAuthorizedVoter]
|
|
534
|
+
authorizedWithdrawer: Account
|
|
535
|
+
commission: Int
|
|
536
|
+
epochCredits: [VoteAccountDataEpochCredit]
|
|
537
|
+
lastTimestamp: VoteAccountDataLastTimestamp
|
|
538
|
+
node: Account
|
|
539
|
+
priorVoters: [String]
|
|
540
|
+
rootSlot: BigInt
|
|
541
|
+
votes: [VoteAccountDataVote]
|
|
542
|
+
}
|
|
543
|
+
type VoteAccount implements Account & AccountJsonParsed {
|
|
544
|
+
address: String
|
|
545
|
+
data: VoteAccountData
|
|
546
|
+
encoding: String
|
|
547
|
+
executable: Boolean
|
|
548
|
+
lamports: BigInt
|
|
549
|
+
meta: JsonParsedAccountMeta
|
|
550
|
+
owner: Account
|
|
551
|
+
rentEpoch: BigInt
|
|
552
|
+
}
|
|
553
|
+
`
|
|
554
|
+
);
|
|
555
|
+
var accountResolvers = {
|
|
556
|
+
Account: {
|
|
557
|
+
__resolveType(account) {
|
|
558
|
+
if (account.encoding === "base58") {
|
|
559
|
+
return "AccountBase58";
|
|
220
560
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
};
|
|
224
|
-
var memoisedBlockTransactionDetailsInputType;
|
|
225
|
-
var blockTransactionDetailsInputType = () => {
|
|
226
|
-
if (!memoisedBlockTransactionDetailsInputType)
|
|
227
|
-
memoisedBlockTransactionDetailsInputType = new GraphQLEnumType({
|
|
228
|
-
name: "BlockTransactionDetails",
|
|
229
|
-
values: {
|
|
230
|
-
accounts: {
|
|
231
|
-
value: "accounts"
|
|
232
|
-
},
|
|
233
|
-
full: {
|
|
234
|
-
value: "full"
|
|
235
|
-
},
|
|
236
|
-
none: {
|
|
237
|
-
value: "none"
|
|
238
|
-
},
|
|
239
|
-
signatures: {
|
|
240
|
-
value: "signatures"
|
|
241
|
-
}
|
|
561
|
+
if (account.encoding === "base64") {
|
|
562
|
+
return "AccountBase64";
|
|
242
563
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
};
|
|
246
|
-
var memoisedCommitmentInputType;
|
|
247
|
-
var commitmentInputType = () => {
|
|
248
|
-
if (!memoisedCommitmentInputType)
|
|
249
|
-
memoisedCommitmentInputType = new GraphQLEnumType({
|
|
250
|
-
name: "Commitment",
|
|
251
|
-
values: {
|
|
252
|
-
confirmed: {
|
|
253
|
-
value: "confirmed"
|
|
254
|
-
},
|
|
255
|
-
finalized: {
|
|
256
|
-
value: "finalized"
|
|
257
|
-
},
|
|
258
|
-
processed: {
|
|
259
|
-
value: "processed"
|
|
260
|
-
}
|
|
564
|
+
if (account.encoding === "base64+zstd") {
|
|
565
|
+
return "AccountBase64Zstd";
|
|
261
566
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
var memoisedDataSliceInputType;
|
|
266
|
-
var dataSliceInputType = () => {
|
|
267
|
-
if (!memoisedDataSliceInputType)
|
|
268
|
-
memoisedDataSliceInputType = new GraphQLInputObjectType({
|
|
269
|
-
fields: {
|
|
270
|
-
length: number(),
|
|
271
|
-
offset: number()
|
|
272
|
-
},
|
|
273
|
-
name: "DataSliceConfig"
|
|
274
|
-
});
|
|
275
|
-
return memoisedDataSliceInputType;
|
|
276
|
-
};
|
|
277
|
-
var memoisedMaxSupportedTransactionVersionInputType;
|
|
278
|
-
var maxSupportedTransactionVersionInputType = () => {
|
|
279
|
-
if (!memoisedMaxSupportedTransactionVersionInputType)
|
|
280
|
-
memoisedMaxSupportedTransactionVersionInputType = new GraphQLEnumType({
|
|
281
|
-
name: "MaxSupportedTransactionVersion",
|
|
282
|
-
values: {
|
|
283
|
-
legacy: {
|
|
284
|
-
value: "legacy"
|
|
285
|
-
},
|
|
286
|
-
zero: {
|
|
287
|
-
value: "0"
|
|
567
|
+
if (account.encoding === "jsonParsed") {
|
|
568
|
+
if (account.meta.program === "nonce") {
|
|
569
|
+
return "NonceAccount";
|
|
288
570
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
return memoisedMaxSupportedTransactionVersionInputType;
|
|
292
|
-
};
|
|
293
|
-
var memoisedProgramAccountFilterInputType;
|
|
294
|
-
var programAccountFilterInputType = () => {
|
|
295
|
-
if (!memoisedProgramAccountFilterInputType)
|
|
296
|
-
memoisedProgramAccountFilterInputType = new GraphQLInputObjectType({
|
|
297
|
-
fields: {
|
|
298
|
-
bytes: bigint(),
|
|
299
|
-
dataSize: bigint(),
|
|
300
|
-
encoding: string(),
|
|
301
|
-
offset: bigint()
|
|
302
|
-
},
|
|
303
|
-
name: "ProgramAccountFilter"
|
|
304
|
-
});
|
|
305
|
-
return memoisedProgramAccountFilterInputType;
|
|
306
|
-
};
|
|
307
|
-
var memoisedTransactionEncodingInputType;
|
|
308
|
-
var transactionEncodingInputType = () => {
|
|
309
|
-
if (!memoisedTransactionEncodingInputType)
|
|
310
|
-
memoisedTransactionEncodingInputType = new GraphQLEnumType({
|
|
311
|
-
name: "TransactionEncoding",
|
|
312
|
-
values: {
|
|
313
|
-
base58: {
|
|
314
|
-
value: "base58"
|
|
315
|
-
},
|
|
316
|
-
base64: {
|
|
317
|
-
value: "base64"
|
|
318
|
-
},
|
|
319
|
-
json: {
|
|
320
|
-
value: "json"
|
|
321
|
-
},
|
|
322
|
-
jsonParsed: {
|
|
323
|
-
value: "jsonParsed"
|
|
571
|
+
if (account.meta.type === "mint" && account.meta.program === "spl-token") {
|
|
572
|
+
return "MintAccount";
|
|
324
573
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
return memoisedTransactionEncodingInputType;
|
|
328
|
-
};
|
|
329
|
-
var memoisedTokenAmountType;
|
|
330
|
-
var tokenAmountType = () => {
|
|
331
|
-
if (!memoisedTokenAmountType) {
|
|
332
|
-
memoisedTokenAmountType = new GraphQLObjectType({
|
|
333
|
-
fields: {
|
|
334
|
-
amount: string(),
|
|
335
|
-
decimals: number(),
|
|
336
|
-
uiAmount: bigint(),
|
|
337
|
-
uiAmountString: string()
|
|
338
|
-
},
|
|
339
|
-
name: "TokenAmount"
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
return memoisedTokenAmountType;
|
|
343
|
-
};
|
|
344
|
-
var memoisedAccountInterfaceFields;
|
|
345
|
-
var accountInterfaceFields = () => {
|
|
346
|
-
if (!memoisedAccountInterfaceFields) {
|
|
347
|
-
memoisedAccountInterfaceFields = {
|
|
348
|
-
encoding: string(),
|
|
349
|
-
executable: boolean(),
|
|
350
|
-
lamports: bigint(),
|
|
351
|
-
rentEpoch: bigint()
|
|
352
|
-
};
|
|
353
|
-
}
|
|
354
|
-
return memoisedAccountInterfaceFields;
|
|
355
|
-
};
|
|
356
|
-
var memoisedAccountInterface;
|
|
357
|
-
var accountInterface = () => {
|
|
358
|
-
if (!memoisedAccountInterface) {
|
|
359
|
-
memoisedAccountInterface = new GraphQLInterfaceType({
|
|
360
|
-
description: "A Solana account",
|
|
361
|
-
fields: () => ({
|
|
362
|
-
...accountInterfaceFields(),
|
|
363
|
-
owner: type(accountInterface())
|
|
364
|
-
}),
|
|
365
|
-
name: "Account",
|
|
366
|
-
resolveType(account) {
|
|
367
|
-
if (account.encoding === "base58") {
|
|
368
|
-
return "AccountBase58";
|
|
574
|
+
if (account.meta.type === "account" && account.meta.program === "spl-token") {
|
|
575
|
+
return "TokenAccount";
|
|
369
576
|
}
|
|
370
|
-
if (account.
|
|
371
|
-
return "
|
|
577
|
+
if (account.meta.program === "stake") {
|
|
578
|
+
return "StakeAccount";
|
|
372
579
|
}
|
|
373
|
-
if (account.
|
|
374
|
-
return "
|
|
580
|
+
if (account.meta.type === "vote" && account.meta.program === "vote") {
|
|
581
|
+
return "VoteAccount";
|
|
375
582
|
}
|
|
376
|
-
if (account.
|
|
377
|
-
|
|
378
|
-
return "MintAccount";
|
|
379
|
-
}
|
|
380
|
-
if (account.data.parsed.type === "account" && account.data.program === "spl-token") {
|
|
381
|
-
return "TokenAccount";
|
|
382
|
-
}
|
|
383
|
-
if (account.data.program === "nonce") {
|
|
384
|
-
return "NonceAccount";
|
|
385
|
-
}
|
|
386
|
-
if (account.data.program === "stake") {
|
|
387
|
-
return "StakeAccount";
|
|
388
|
-
}
|
|
389
|
-
if (account.data.parsed.type === "vote" && account.data.program === "vote") {
|
|
390
|
-
return "VoteAccount";
|
|
391
|
-
}
|
|
392
|
-
if (account.data.parsed.type === "lookupTable" && account.data.program === "address-lookup-table") {
|
|
393
|
-
return "LookupTableAccount";
|
|
394
|
-
}
|
|
583
|
+
if (account.meta.type === "lookupTable" && account.meta.program === "address-lookup-table") {
|
|
584
|
+
return "LookupTableAccount";
|
|
395
585
|
}
|
|
396
|
-
return "AccountBase64";
|
|
397
586
|
}
|
|
398
|
-
|
|
587
|
+
return "AccountBase64";
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
AccountBase58: {
|
|
591
|
+
owner: resolveAccount("owner")
|
|
592
|
+
},
|
|
593
|
+
AccountBase64: {
|
|
594
|
+
owner: resolveAccount("owner")
|
|
595
|
+
},
|
|
596
|
+
AccountBase64Zstd: {
|
|
597
|
+
owner: resolveAccount("owner")
|
|
598
|
+
},
|
|
599
|
+
NonceAccountData: {
|
|
600
|
+
authority: resolveAccount("authority")
|
|
601
|
+
},
|
|
602
|
+
NonceAccount: {
|
|
603
|
+
owner: resolveAccount("owner")
|
|
604
|
+
},
|
|
605
|
+
LookupTableAccountData: {
|
|
606
|
+
authority: resolveAccount("authority")
|
|
607
|
+
},
|
|
608
|
+
LookupTableAccount: {
|
|
609
|
+
owner: resolveAccount("owner")
|
|
610
|
+
},
|
|
611
|
+
MintAccountData: {
|
|
612
|
+
freezeAuthority: resolveAccount("freezeAuthority"),
|
|
613
|
+
mintAuthority: resolveAccount("mintAuthority")
|
|
614
|
+
},
|
|
615
|
+
MintAccount: {
|
|
616
|
+
owner: resolveAccount("owner")
|
|
617
|
+
},
|
|
618
|
+
TokenAccountData: {
|
|
619
|
+
mint: resolveAccount("mint"),
|
|
620
|
+
owner: resolveAccount("owner")
|
|
621
|
+
},
|
|
622
|
+
TokenAccount: {
|
|
623
|
+
owner: resolveAccount("owner")
|
|
624
|
+
},
|
|
625
|
+
StakeAccountDataMetaAuthorized: {
|
|
626
|
+
staker: resolveAccount("staker"),
|
|
627
|
+
withdrawer: resolveAccount("withdrawer")
|
|
628
|
+
},
|
|
629
|
+
StakeAccountDataMetaLockup: {
|
|
630
|
+
custodian: resolveAccount("custodian")
|
|
631
|
+
},
|
|
632
|
+
StakeAccountDataStakeDelegation: {
|
|
633
|
+
voter: resolveAccount("voter")
|
|
634
|
+
},
|
|
635
|
+
StakeAccount: {
|
|
636
|
+
owner: resolveAccount("owner")
|
|
637
|
+
},
|
|
638
|
+
VoteAccountDataAuthorizedVoter: {
|
|
639
|
+
authorizedVoter: resolveAccount("authorizedVoter")
|
|
640
|
+
},
|
|
641
|
+
VoteAccountData: {
|
|
642
|
+
authorizedWithdrawer: resolveAccount("authorizedWithdrawer"),
|
|
643
|
+
node: resolveAccount("nodePubkey")
|
|
644
|
+
},
|
|
645
|
+
VoteAccount: {
|
|
646
|
+
owner: resolveAccount("owner")
|
|
399
647
|
}
|
|
400
|
-
return memoisedAccountInterface;
|
|
401
|
-
};
|
|
402
|
-
var accountType = (name, description, data) => new GraphQLObjectType({
|
|
403
|
-
description,
|
|
404
|
-
fields: {
|
|
405
|
-
...accountInterfaceFields(),
|
|
406
|
-
data,
|
|
407
|
-
owner: {
|
|
408
|
-
args: {
|
|
409
|
-
commitment: type(commitmentInputType()),
|
|
410
|
-
dataSlice: type(dataSliceInputType()),
|
|
411
|
-
encoding: type(accountEncodingInputType()),
|
|
412
|
-
minContextSlot: bigint()
|
|
413
|
-
},
|
|
414
|
-
resolve: (parent, args, context) => context.resolveAccount({ ...args, address: parent.owner }),
|
|
415
|
-
type: accountInterface()
|
|
416
|
-
}
|
|
417
|
-
},
|
|
418
|
-
interfaces: [accountInterface()],
|
|
419
|
-
name
|
|
420
|
-
});
|
|
421
|
-
var accountDataJsonParsed = (name, parsedInfoFields) => object(name + "Data", {
|
|
422
|
-
parsed: object(name + "DataParsed", {
|
|
423
|
-
info: object(name + "DataParsedInfo", parsedInfoFields),
|
|
424
|
-
type: string()
|
|
425
|
-
}),
|
|
426
|
-
program: string(),
|
|
427
|
-
space: bigint()
|
|
428
|
-
});
|
|
429
|
-
var memoisedAccountBase58;
|
|
430
|
-
var accountBase58 = () => {
|
|
431
|
-
if (!memoisedAccountBase58)
|
|
432
|
-
memoisedAccountBase58 = accountType("AccountBase58", "A Solana account with base58 encoded data", string());
|
|
433
|
-
return memoisedAccountBase58;
|
|
434
648
|
};
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
649
|
+
|
|
650
|
+
// src/schema/block.ts
|
|
651
|
+
var blockTypeDefs = (
|
|
652
|
+
/* GraphQL */
|
|
653
|
+
`
|
|
654
|
+
type TransactionMetaForAccounts {
|
|
655
|
+
err: String
|
|
656
|
+
fee: BigInt
|
|
657
|
+
postBalances: [BigInt]
|
|
658
|
+
postTokenBalances: [TokenBalance]
|
|
659
|
+
preBalances: [BigInt]
|
|
660
|
+
preTokenBalances: [TokenBalance]
|
|
661
|
+
status: TransactionStatus
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
type TransactionDataForAccounts {
|
|
665
|
+
accountKeys: [String]
|
|
666
|
+
signatures: [String]
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
type BlockTransactionAccounts {
|
|
670
|
+
meta: TransactionMetaForAccounts
|
|
671
|
+
data: TransactionDataForAccounts
|
|
672
|
+
version: String
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
# Block interface
|
|
676
|
+
interface Block {
|
|
677
|
+
blockhash: String
|
|
678
|
+
blockHeight: BigInt
|
|
679
|
+
blockTime: Int
|
|
680
|
+
parentSlot: BigInt
|
|
681
|
+
previousBlockhash: String
|
|
682
|
+
rewards: [Reward]
|
|
683
|
+
transactionDetails: String
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
# A block with account transaction details
|
|
687
|
+
type BlockWithAccounts implements Block {
|
|
688
|
+
blockhash: String
|
|
689
|
+
blockHeight: BigInt
|
|
690
|
+
blockTime: Int
|
|
691
|
+
parentSlot: BigInt
|
|
692
|
+
previousBlockhash: String
|
|
693
|
+
rewards: [Reward]
|
|
694
|
+
transactions: [BlockTransactionAccounts]
|
|
695
|
+
transactionDetails: String
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
# A block with full transaction details
|
|
699
|
+
type BlockWithFull implements Block {
|
|
700
|
+
blockhash: String
|
|
701
|
+
blockHeight: BigInt
|
|
702
|
+
blockTime: Int
|
|
703
|
+
parentSlot: BigInt
|
|
704
|
+
previousBlockhash: String
|
|
705
|
+
rewards: [Reward]
|
|
706
|
+
transactions: [Transaction]
|
|
707
|
+
transactionDetails: String
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
# A block with none transaction details
|
|
711
|
+
type BlockWithNone implements Block {
|
|
712
|
+
blockhash: String
|
|
713
|
+
blockHeight: BigInt
|
|
714
|
+
blockTime: Int
|
|
715
|
+
parentSlot: BigInt
|
|
716
|
+
previousBlockhash: String
|
|
717
|
+
rewards: [Reward]
|
|
718
|
+
transactionDetails: String
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
# A block with signature transaction details
|
|
722
|
+
type BlockWithSignatures implements Block {
|
|
723
|
+
blockhash: String
|
|
724
|
+
blockHeight: BigInt
|
|
725
|
+
blockTime: Int
|
|
726
|
+
parentSlot: BigInt
|
|
727
|
+
previousBlockhash: String
|
|
728
|
+
rewards: [Reward]
|
|
729
|
+
signatures: [String]
|
|
730
|
+
transactionDetails: String
|
|
731
|
+
}
|
|
732
|
+
`
|
|
733
|
+
);
|
|
734
|
+
var blockResolvers = {
|
|
735
|
+
Block: {
|
|
736
|
+
__resolveType(block) {
|
|
737
|
+
switch (block.transactionDetails) {
|
|
738
|
+
case "accounts":
|
|
739
|
+
return "BlockWithAccounts";
|
|
740
|
+
case "none":
|
|
741
|
+
return "BlockWithNone";
|
|
742
|
+
case "signatures":
|
|
743
|
+
return "BlockWithSignatures";
|
|
744
|
+
default:
|
|
745
|
+
return "BlockWithFull";
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}
|
|
440
749
|
};
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
750
|
+
|
|
751
|
+
// src/schema/common/inputs.ts
|
|
752
|
+
var inputTypeDefs = (
|
|
753
|
+
/* GraphQL */
|
|
754
|
+
`
|
|
755
|
+
enum AccountEncoding {
|
|
756
|
+
base58
|
|
757
|
+
base64
|
|
758
|
+
base64Zstd
|
|
759
|
+
jsonParsed
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
enum BlockTransactionDetails {
|
|
763
|
+
accounts
|
|
764
|
+
full
|
|
765
|
+
none
|
|
766
|
+
signatures
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
enum Commitment {
|
|
770
|
+
confirmed
|
|
771
|
+
finalized
|
|
772
|
+
processed
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
input DataSlice {
|
|
776
|
+
offset: Int
|
|
777
|
+
length: Int
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
input ProgramAccountsFilter {
|
|
781
|
+
bytes: BigInt
|
|
782
|
+
dataSize: BigInt
|
|
783
|
+
encoding: String
|
|
784
|
+
offset: BigInt
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
enum TransactionEncoding {
|
|
788
|
+
base58
|
|
789
|
+
base64
|
|
790
|
+
jsonParsed
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
enum TransactionVersion {
|
|
794
|
+
legacy
|
|
795
|
+
zero
|
|
796
|
+
}
|
|
797
|
+
`
|
|
798
|
+
);
|
|
799
|
+
var inputResolvers = {
|
|
800
|
+
AccountEncoding: {
|
|
801
|
+
base64Zstd: "base64+zstd"
|
|
802
|
+
},
|
|
803
|
+
TransactionVersion: {
|
|
804
|
+
zero: 0
|
|
805
|
+
}
|
|
450
806
|
};
|
|
451
|
-
var
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
807
|
+
var scalarTypeDefs = (
|
|
808
|
+
/* GraphQL */
|
|
809
|
+
`
|
|
810
|
+
scalar BigInt
|
|
811
|
+
`
|
|
812
|
+
);
|
|
813
|
+
var scalarResolvers = {
|
|
814
|
+
BigInt: {
|
|
815
|
+
__parseLiteral(ast) {
|
|
816
|
+
if (ast.kind === Kind.STRING) {
|
|
817
|
+
return BigInt(ast.value);
|
|
818
|
+
}
|
|
819
|
+
return null;
|
|
820
|
+
},
|
|
821
|
+
__parseValue(value) {
|
|
822
|
+
return BigInt(value);
|
|
823
|
+
},
|
|
824
|
+
__serialize(value) {
|
|
825
|
+
return BigInt(value);
|
|
826
|
+
}
|
|
827
|
+
}
|
|
466
828
|
};
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
isNative: boolean(),
|
|
507
|
-
mint: string(),
|
|
508
|
-
owner: string(),
|
|
509
|
-
state: string(),
|
|
510
|
-
tokenAmount: type(tokenAmountType())
|
|
511
|
-
})
|
|
512
|
-
);
|
|
513
|
-
return memoisedAccountTokenAccount;
|
|
514
|
-
};
|
|
515
|
-
var memoisedAccountStakeAccount;
|
|
516
|
-
var accountStakeAccount = () => {
|
|
517
|
-
if (!memoisedAccountStakeAccount)
|
|
518
|
-
memoisedAccountStakeAccount = accountType(
|
|
519
|
-
"StakeAccount",
|
|
520
|
-
"A stake account",
|
|
521
|
-
accountDataJsonParsed("Stake", {
|
|
522
|
-
meta: object("StakeMeta", {
|
|
523
|
-
authorized: object("StakeMetaAuthorized", {
|
|
524
|
-
staker: string(),
|
|
525
|
-
withdrawer: string()
|
|
526
|
-
}),
|
|
527
|
-
lockup: object("StakeMetaLockup", {
|
|
528
|
-
custodian: string(),
|
|
529
|
-
epoch: bigint(),
|
|
530
|
-
unixTimestamp: bigint()
|
|
531
|
-
}),
|
|
532
|
-
rentExemptReserve: string()
|
|
533
|
-
}),
|
|
534
|
-
stake: object("StakeStake", {
|
|
535
|
-
creditsObserved: bigint(),
|
|
536
|
-
delegation: object("StakeStakeDelegation", {
|
|
537
|
-
activationEpoch: bigint(),
|
|
538
|
-
deactivationEpoch: bigint(),
|
|
539
|
-
stake: string(),
|
|
540
|
-
voter: string(),
|
|
541
|
-
warmupCooldownRate: number()
|
|
542
|
-
})
|
|
543
|
-
})
|
|
544
|
-
})
|
|
545
|
-
);
|
|
546
|
-
return memoisedAccountStakeAccount;
|
|
547
|
-
};
|
|
548
|
-
var memoisedAccountVoteAccount;
|
|
549
|
-
var accountVoteAccount = () => {
|
|
550
|
-
if (!memoisedAccountVoteAccount)
|
|
551
|
-
memoisedAccountVoteAccount = accountType(
|
|
552
|
-
"VoteAccount",
|
|
553
|
-
"A vote account",
|
|
554
|
-
accountDataJsonParsed("Vote", {
|
|
555
|
-
authorizedVoters: list(
|
|
556
|
-
object("VoteAuthorizedVoter", {
|
|
557
|
-
authorizedVoter: string(),
|
|
558
|
-
epoch: bigint()
|
|
559
|
-
})
|
|
560
|
-
),
|
|
561
|
-
authorizedWithdrawer: string(),
|
|
562
|
-
commission: number(),
|
|
563
|
-
epochCredits: list(
|
|
564
|
-
object("VoteEpochCredits", {
|
|
565
|
-
credits: string(),
|
|
566
|
-
epoch: bigint(),
|
|
567
|
-
previousCredits: string()
|
|
568
|
-
})
|
|
569
|
-
),
|
|
570
|
-
lastTimestamp: object("VoteLastTimestamp", {
|
|
571
|
-
slot: bigint(),
|
|
572
|
-
timestamp: bigint()
|
|
573
|
-
}),
|
|
574
|
-
nodePubkey: string(),
|
|
575
|
-
priorVoters: list(string()),
|
|
576
|
-
rootSlot: bigint(),
|
|
577
|
-
votes: list(
|
|
578
|
-
object("VoteVote", {
|
|
579
|
-
confirmationCount: number(),
|
|
580
|
-
slot: bigint()
|
|
581
|
-
})
|
|
582
|
-
)
|
|
583
|
-
})
|
|
584
|
-
);
|
|
585
|
-
return memoisedAccountVoteAccount;
|
|
586
|
-
};
|
|
587
|
-
var memoisedAccountTypes;
|
|
588
|
-
var accountTypes = () => {
|
|
589
|
-
if (!memoisedAccountTypes)
|
|
590
|
-
memoisedAccountTypes = [
|
|
591
|
-
accountBase58(),
|
|
592
|
-
accountBase64(),
|
|
593
|
-
accountBase64Zstd(),
|
|
594
|
-
accountNonceAccount(),
|
|
595
|
-
accountLookupTable(),
|
|
596
|
-
accountMint(),
|
|
597
|
-
accountTokenAccount(),
|
|
598
|
-
accountStakeAccount(),
|
|
599
|
-
accountVoteAccount()
|
|
600
|
-
];
|
|
601
|
-
return memoisedAccountTypes;
|
|
829
|
+
|
|
830
|
+
// src/schema/common/types.ts
|
|
831
|
+
var commonTypeDefs = (
|
|
832
|
+
/* GraphQL */
|
|
833
|
+
`
|
|
834
|
+
type ReturnData {
|
|
835
|
+
data: String
|
|
836
|
+
programId: String
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
type Reward {
|
|
840
|
+
commission: Int
|
|
841
|
+
lamports: BigInt
|
|
842
|
+
postBalance: BigInt
|
|
843
|
+
pubkey: String
|
|
844
|
+
rewardType: String
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
type TokenAmount {
|
|
848
|
+
amount: String
|
|
849
|
+
decimals: Int
|
|
850
|
+
uiAmount: BigInt
|
|
851
|
+
uiAmountString: String
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
type TokenBalance {
|
|
855
|
+
accountIndex: Int
|
|
856
|
+
mint: Account
|
|
857
|
+
owner: Account
|
|
858
|
+
programId: String
|
|
859
|
+
uiTokenAmount: TokenAmount
|
|
860
|
+
}
|
|
861
|
+
`
|
|
862
|
+
);
|
|
863
|
+
var commonResolvers = {
|
|
864
|
+
TokenBalance: {
|
|
865
|
+
mint: resolveAccount("mint"),
|
|
866
|
+
owner: resolveAccount("owner")
|
|
867
|
+
}
|
|
602
868
|
};
|
|
603
869
|
|
|
604
|
-
// src/schema/
|
|
605
|
-
var
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
870
|
+
// src/schema/instruction.ts
|
|
871
|
+
var instructionTypeDefs = (
|
|
872
|
+
/* GraphQL */
|
|
873
|
+
`
|
|
874
|
+
type JsonParsedInstructionMeta {
|
|
875
|
+
program: String
|
|
876
|
+
type: String
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
# Transaction instruction interface
|
|
880
|
+
interface TransactionInstruction {
|
|
881
|
+
programId: String
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
# Generic transaction instruction
|
|
885
|
+
type GenericInstruction implements TransactionInstruction {
|
|
886
|
+
accounts: [String]
|
|
887
|
+
data: String
|
|
888
|
+
programId: String
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
# AddressLookupTable: CreateLookupTable
|
|
892
|
+
type CreateLookupTableInstructionData {
|
|
893
|
+
bumpSeed: BigInt # FIXME:*
|
|
894
|
+
lookupTableAccount: Account
|
|
895
|
+
lookupTableAuthority: Account
|
|
896
|
+
payerAccount: Account
|
|
897
|
+
recentSlot: BigInt
|
|
898
|
+
systemProgram: Account
|
|
899
|
+
}
|
|
900
|
+
type CreateLookupTableInstruction implements TransactionInstruction {
|
|
901
|
+
data: CreateLookupTableInstructionData
|
|
902
|
+
meta: JsonParsedInstructionMeta
|
|
903
|
+
programId: String
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
# AddressLookupTable: ExtendLookupTable
|
|
907
|
+
type ExtendLookupTableInstructionData {
|
|
908
|
+
lookupTableAccount: Account
|
|
909
|
+
lookupTableAuthority: Account
|
|
910
|
+
newAddresses: [String]
|
|
911
|
+
payerAccount: Account
|
|
912
|
+
systemProgram: Account
|
|
913
|
+
}
|
|
914
|
+
type ExtendLookupTableInstruction implements TransactionInstruction {
|
|
915
|
+
data: ExtendLookupTableInstructionData
|
|
916
|
+
meta: JsonParsedInstructionMeta
|
|
917
|
+
programId: String
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
# AddressLookupTable: FreezeLookupTable
|
|
921
|
+
type FreezeLookupTableInstructionData {
|
|
922
|
+
lookupTableAccount: Account
|
|
923
|
+
lookupTableAuthority: Account
|
|
924
|
+
}
|
|
925
|
+
type FreezeLookupTableInstruction implements TransactionInstruction {
|
|
926
|
+
data: FreezeLookupTableInstructionData
|
|
927
|
+
meta: JsonParsedInstructionMeta
|
|
928
|
+
programId: String
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
# AddressLookupTable: DeactivateLookupTable
|
|
932
|
+
type DeactivateLookupTableInstructionData {
|
|
933
|
+
lookupTableAccount: Account
|
|
934
|
+
lookupTableAuthority: Account
|
|
935
|
+
}
|
|
936
|
+
type DeactivateLookupTableInstruction implements TransactionInstruction {
|
|
937
|
+
data: DeactivateLookupTableInstructionData
|
|
938
|
+
meta: JsonParsedInstructionMeta
|
|
939
|
+
programId: String
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
# AddressLookupTable: CloseLookupTable
|
|
943
|
+
type CloseLookupTableInstructionData {
|
|
944
|
+
lookupTableAccount: Account
|
|
945
|
+
lookupTableAuthority: Account
|
|
946
|
+
recipient: Account
|
|
947
|
+
}
|
|
948
|
+
type CloseLookupTableInstruction implements TransactionInstruction {
|
|
949
|
+
data: CloseLookupTableInstructionData
|
|
950
|
+
meta: JsonParsedInstructionMeta
|
|
951
|
+
programId: String
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
# BpfLoader: Write
|
|
955
|
+
type BpfLoaderWriteInstructionData {
|
|
956
|
+
account: Account
|
|
957
|
+
bytes: String
|
|
958
|
+
offset: BigInt # FIXME:*
|
|
959
|
+
}
|
|
960
|
+
type BpfLoaderWriteInstruction implements TransactionInstruction {
|
|
961
|
+
data: BpfLoaderWriteInstructionData
|
|
962
|
+
meta: JsonParsedInstructionMeta
|
|
963
|
+
programId: String
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
# BpfLoader: Finalize
|
|
967
|
+
type BpfLoaderFinalizeInstructionData {
|
|
968
|
+
account: Account
|
|
969
|
+
}
|
|
970
|
+
type BpfLoaderFinalizeInstruction implements TransactionInstruction {
|
|
971
|
+
data: BpfLoaderFinalizeInstructionData
|
|
972
|
+
meta: JsonParsedInstructionMeta
|
|
973
|
+
programId: String
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
# BpfUpgradeableLoader: InitializeBuffer
|
|
977
|
+
type BpfUpgradeableLoaderInitializeBufferInstructionData {
|
|
978
|
+
account: Account
|
|
979
|
+
}
|
|
980
|
+
type BpfUpgradeableLoaderInitializeBufferInstruction implements TransactionInstruction {
|
|
981
|
+
data: BpfUpgradeableLoaderInitializeBufferInstructionData
|
|
982
|
+
meta: JsonParsedInstructionMeta
|
|
983
|
+
programId: String
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
# BpfUpgradeableLoader: Write
|
|
987
|
+
type BpfUpgradeableLoaderWriteInstructionData {
|
|
988
|
+
account: Account
|
|
989
|
+
authority: Account
|
|
990
|
+
bytes: String
|
|
991
|
+
offset: BigInt # FIXME:*
|
|
992
|
+
}
|
|
993
|
+
type BpfUpgradeableLoaderWriteInstruction implements TransactionInstruction {
|
|
994
|
+
data: BpfUpgradeableLoaderWriteInstructionData
|
|
995
|
+
meta: JsonParsedInstructionMeta
|
|
996
|
+
programId: String
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
# BpfUpgradeableLoader: DeployWithMaxDataLen
|
|
1000
|
+
type BpfUpgradeableLoaderDeployWithMaxDataLenInstructionData {
|
|
1001
|
+
authority: Account
|
|
1002
|
+
bufferAccount: Account
|
|
1003
|
+
clockSysvar: String
|
|
1004
|
+
maxDataLen: BigInt
|
|
1005
|
+
payerAccount: Account
|
|
1006
|
+
programAccount: Account
|
|
1007
|
+
programDataAccount: Account
|
|
1008
|
+
rentSysvar: String
|
|
1009
|
+
}
|
|
1010
|
+
type BpfUpgradeableLoaderDeployWithMaxDataLenInstruction implements TransactionInstruction {
|
|
1011
|
+
data: BpfUpgradeableLoaderDeployWithMaxDataLenInstructionData
|
|
1012
|
+
meta: JsonParsedInstructionMeta
|
|
1013
|
+
programId: String
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
# BpfUpgradeableLoader: Upgrade
|
|
1017
|
+
type BpfUpgradeableLoaderUpgradeInstructionData {
|
|
1018
|
+
authority: Account
|
|
1019
|
+
bufferAccount: Account
|
|
1020
|
+
clockSysvar: String
|
|
1021
|
+
programAccount: Account
|
|
1022
|
+
programDataAccount: Account
|
|
1023
|
+
rentSysvar: String
|
|
1024
|
+
spillAccount: Account
|
|
1025
|
+
}
|
|
1026
|
+
type BpfUpgradeableLoaderUpgradeInstruction implements TransactionInstruction {
|
|
1027
|
+
data: BpfUpgradeableLoaderUpgradeInstructionData
|
|
1028
|
+
meta: JsonParsedInstructionMeta
|
|
1029
|
+
programId: String
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
# BpfUpgradeableLoader: SetAuthority
|
|
1033
|
+
type BpfUpgradeableLoaderSetAuthorityInstructionData {
|
|
1034
|
+
account: Account
|
|
1035
|
+
authority: Account
|
|
1036
|
+
newAuthority: Account
|
|
1037
|
+
}
|
|
1038
|
+
type BpfUpgradeableLoaderSetAuthorityInstruction implements TransactionInstruction {
|
|
1039
|
+
data: BpfUpgradeableLoaderSetAuthorityInstructionData
|
|
1040
|
+
meta: JsonParsedInstructionMeta
|
|
1041
|
+
programId: String
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
# BpfUpgradeableLoader: SetAuthorityChecked
|
|
1045
|
+
type BpfUpgradeableLoaderSetAuthorityCheckedInstructionData {
|
|
1046
|
+
account: Account
|
|
1047
|
+
authority: Account
|
|
1048
|
+
newAuthority: Account
|
|
1049
|
+
}
|
|
1050
|
+
type BpfUpgradeableLoaderSetAuthorityCheckedInstruction implements TransactionInstruction {
|
|
1051
|
+
data: BpfUpgradeableLoaderSetAuthorityCheckedInstructionData
|
|
1052
|
+
meta: JsonParsedInstructionMeta
|
|
1053
|
+
programId: String
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
# BpfUpgradeableLoader: Close
|
|
1057
|
+
type BpfUpgradeableLoaderCloseInstructionData {
|
|
1058
|
+
account: Account
|
|
1059
|
+
authority: Account
|
|
1060
|
+
programAccount: Account
|
|
1061
|
+
recipient: Account
|
|
1062
|
+
}
|
|
1063
|
+
type BpfUpgradeableLoaderCloseInstruction implements TransactionInstruction {
|
|
1064
|
+
data: BpfUpgradeableLoaderCloseInstructionData
|
|
1065
|
+
meta: JsonParsedInstructionMeta
|
|
1066
|
+
programId: String
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
# BpfUpgradeableLoader: ExtendProgram
|
|
1070
|
+
type BpfUpgradeableLoaderExtendProgramInstructionData {
|
|
1071
|
+
additionalBytes: BigInt
|
|
1072
|
+
payerAccount: Account
|
|
1073
|
+
programAccount: Account
|
|
1074
|
+
programDataAccount: Account
|
|
1075
|
+
systemProgram: Account
|
|
1076
|
+
}
|
|
1077
|
+
type BpfUpgradeableLoaderExtendProgramInstruction implements TransactionInstruction {
|
|
1078
|
+
data: BpfUpgradeableLoaderExtendProgramInstructionData
|
|
1079
|
+
meta: JsonParsedInstructionMeta
|
|
1080
|
+
programId: String
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
# SplAssociatedTokenAccount: Create
|
|
1084
|
+
type SplAssociatedTokenCreateInstructionData {
|
|
1085
|
+
account: Account
|
|
1086
|
+
mint: String
|
|
1087
|
+
source: Account
|
|
1088
|
+
systemProgram: Account
|
|
1089
|
+
tokenProgram: Account
|
|
1090
|
+
wallet: Account
|
|
1091
|
+
}
|
|
1092
|
+
type SplAssociatedTokenCreateInstruction implements TransactionInstruction {
|
|
1093
|
+
data: SplAssociatedTokenCreateInstructionData
|
|
1094
|
+
meta: JsonParsedInstructionMeta
|
|
1095
|
+
programId: String
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
# SplAssociatedTokenAccount: CreateIdempotent
|
|
1099
|
+
type SplAssociatedTokenCreateIdempotentInstructionData {
|
|
1100
|
+
account: Account
|
|
1101
|
+
mint: String
|
|
1102
|
+
source: Account
|
|
1103
|
+
systemProgram: Account
|
|
1104
|
+
tokenProgram: Account
|
|
1105
|
+
wallet: Account
|
|
1106
|
+
}
|
|
1107
|
+
type SplAssociatedTokenCreateIdempotentInstruction implements TransactionInstruction {
|
|
1108
|
+
data: SplAssociatedTokenCreateIdempotentInstructionData
|
|
1109
|
+
meta: JsonParsedInstructionMeta
|
|
1110
|
+
programId: String
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
# SplAssociatedTokenAccount: RecoverNested
|
|
1114
|
+
type SplAssociatedTokenRecoverNestedInstructionData {
|
|
1115
|
+
destination: Account
|
|
1116
|
+
nestedMint: Account
|
|
1117
|
+
nestedOwner: Account
|
|
1118
|
+
nestedSource: Account
|
|
1119
|
+
ownerMint: Account
|
|
1120
|
+
tokenProgram: Account
|
|
1121
|
+
wallet: Account
|
|
1122
|
+
}
|
|
1123
|
+
type SplAssociatedTokenRecoverNestedInstruction implements TransactionInstruction {
|
|
1124
|
+
data: SplAssociatedTokenRecoverNestedInstructionData
|
|
1125
|
+
meta: JsonParsedInstructionMeta
|
|
1126
|
+
programId: String
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
# SplMemo
|
|
1130
|
+
type SplMemoInstructionData {
|
|
1131
|
+
data: String
|
|
1132
|
+
}
|
|
1133
|
+
type SplMemoInstruction implements TransactionInstruction {
|
|
1134
|
+
data: SplMemoInstructionData
|
|
1135
|
+
meta: JsonParsedInstructionMeta
|
|
1136
|
+
programId: String
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
# SplToken: InitializeMint
|
|
1140
|
+
type SplTokenInitializeMintInstructionData {
|
|
1141
|
+
decimals: BigInt # FIXME:*
|
|
1142
|
+
freezeAuthority: Account
|
|
1143
|
+
mint: Account
|
|
1144
|
+
mintAuthority: Account
|
|
1145
|
+
rentSysvar: String
|
|
1146
|
+
}
|
|
1147
|
+
type SplTokenInitializeMintInstruction implements TransactionInstruction {
|
|
1148
|
+
data: SplTokenInitializeMintInstructionData
|
|
1149
|
+
meta: JsonParsedInstructionMeta
|
|
1150
|
+
programId: String
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
# SplToken: InitializeMint2
|
|
1154
|
+
type SplTokenInitializeMint2InstructionData {
|
|
1155
|
+
decimals: BigInt # FIXME:*
|
|
1156
|
+
freezeAuthority: Account
|
|
1157
|
+
mint: Account
|
|
1158
|
+
mintAuthority: Account
|
|
1159
|
+
}
|
|
1160
|
+
type SplTokenInitializeMint2Instruction implements TransactionInstruction {
|
|
1161
|
+
data: SplTokenInitializeMint2InstructionData
|
|
1162
|
+
meta: JsonParsedInstructionMeta
|
|
1163
|
+
programId: String
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
# SplToken: InitializeAccount
|
|
1167
|
+
type SplTokenInitializeAccountInstructionData {
|
|
1168
|
+
account: Account
|
|
1169
|
+
mint: Account
|
|
1170
|
+
owner: Account
|
|
1171
|
+
rentSysvar: String
|
|
1172
|
+
}
|
|
1173
|
+
type SplTokenInitializeAccountInstruction implements TransactionInstruction {
|
|
1174
|
+
data: SplTokenInitializeAccountInstructionData
|
|
1175
|
+
meta: JsonParsedInstructionMeta
|
|
1176
|
+
programId: String
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
# SplToken: InitializeAccount2
|
|
1180
|
+
type SplTokenInitializeAccount2InstructionData {
|
|
1181
|
+
account: Account
|
|
1182
|
+
mint: Account
|
|
1183
|
+
owner: Account
|
|
1184
|
+
rentSysvar: String
|
|
1185
|
+
}
|
|
1186
|
+
type SplTokenInitializeAccount2Instruction implements TransactionInstruction {
|
|
1187
|
+
data: SplTokenInitializeAccount2InstructionData
|
|
1188
|
+
meta: JsonParsedInstructionMeta
|
|
1189
|
+
programId: String
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
# SplToken: InitializeAccount3
|
|
1193
|
+
type SplTokenInitializeAccount3InstructionData {
|
|
1194
|
+
account: Account
|
|
1195
|
+
mint: Account
|
|
1196
|
+
owner: Account
|
|
1197
|
+
}
|
|
1198
|
+
type SplTokenInitializeAccount3Instruction implements TransactionInstruction {
|
|
1199
|
+
data: SplTokenInitializeAccount3InstructionData
|
|
1200
|
+
meta: JsonParsedInstructionMeta
|
|
1201
|
+
programId: String
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
# SplToken: InitializeMultisig
|
|
1205
|
+
type SplTokenInitializeMultisigInstructionData {
|
|
1206
|
+
m: BigInt # FIXME:*
|
|
1207
|
+
multisig: Account
|
|
1208
|
+
rentSysvar: String
|
|
1209
|
+
signers: [String]
|
|
1210
|
+
}
|
|
1211
|
+
type SplTokenInitializeMultisigInstruction implements TransactionInstruction {
|
|
1212
|
+
data: SplTokenInitializeMultisigInstructionData
|
|
1213
|
+
meta: JsonParsedInstructionMeta
|
|
1214
|
+
programId: String
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
# SplToken: InitializeMultisig2
|
|
1218
|
+
type SplTokenInitializeMultisig2InstructionData {
|
|
1219
|
+
m: BigInt # FIXME:*
|
|
1220
|
+
multisig: Account
|
|
1221
|
+
signers: [String]
|
|
1222
|
+
}
|
|
1223
|
+
type SplTokenInitializeMultisig2Instruction implements TransactionInstruction {
|
|
1224
|
+
data: SplTokenInitializeMultisig2InstructionData
|
|
1225
|
+
meta: JsonParsedInstructionMeta
|
|
1226
|
+
programId: String
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
# SplToken: Transfer
|
|
1230
|
+
type SplTokenTransferInstructionData {
|
|
1231
|
+
amount: String
|
|
1232
|
+
authority: Account
|
|
1233
|
+
destination: Account
|
|
1234
|
+
multisigAuthority: Account
|
|
1235
|
+
source: Account
|
|
1236
|
+
}
|
|
1237
|
+
type SplTokenTransferInstruction implements TransactionInstruction {
|
|
1238
|
+
data: SplTokenTransferInstructionData
|
|
1239
|
+
meta: JsonParsedInstructionMeta
|
|
1240
|
+
programId: String
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
# SplToken: Approve
|
|
1244
|
+
type SplTokenApproveInstructionData {
|
|
1245
|
+
amount: String
|
|
1246
|
+
delegate: Account
|
|
1247
|
+
multisigOwner: Account
|
|
1248
|
+
owner: Account
|
|
1249
|
+
source: Account
|
|
1250
|
+
}
|
|
1251
|
+
type SplTokenApproveInstruction implements TransactionInstruction {
|
|
1252
|
+
data: SplTokenApproveInstructionData
|
|
1253
|
+
meta: JsonParsedInstructionMeta
|
|
1254
|
+
programId: String
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
# SplToken: Revoke
|
|
1258
|
+
type SplTokenRevokeInstructionData {
|
|
1259
|
+
multisigOwner: Account
|
|
1260
|
+
owner: Account
|
|
1261
|
+
source: Account
|
|
1262
|
+
}
|
|
1263
|
+
type SplTokenRevokeInstruction implements TransactionInstruction {
|
|
1264
|
+
data: SplTokenRevokeInstructionData
|
|
1265
|
+
meta: JsonParsedInstructionMeta
|
|
1266
|
+
programId: String
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
# SplToken: SetAuthority
|
|
1270
|
+
type SplTokenSetAuthorityInstructionData {
|
|
1271
|
+
authority: Account
|
|
1272
|
+
authorityType: String
|
|
1273
|
+
multisigAuthority: Account
|
|
1274
|
+
newAuthority: Account
|
|
1275
|
+
}
|
|
1276
|
+
type SplTokenSetAuthorityInstruction implements TransactionInstruction {
|
|
1277
|
+
data: SplTokenSetAuthorityInstructionData
|
|
1278
|
+
meta: JsonParsedInstructionMeta
|
|
1279
|
+
programId: String
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
# SplToken: MintTo
|
|
1283
|
+
type SplTokenMintToInstructionData {
|
|
1284
|
+
account: Account
|
|
1285
|
+
amount: String
|
|
1286
|
+
authority: Account
|
|
1287
|
+
mint: Account
|
|
1288
|
+
mintAuthority: Account
|
|
1289
|
+
multisigMintAuthority: Account
|
|
1290
|
+
}
|
|
1291
|
+
type SplTokenMintToInstruction implements TransactionInstruction {
|
|
1292
|
+
data: SplTokenMintToInstructionData
|
|
1293
|
+
meta: JsonParsedInstructionMeta
|
|
1294
|
+
programId: String
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
# SplToken: Burn
|
|
1298
|
+
type SplTokenBurnInstructionData {
|
|
1299
|
+
account: Account
|
|
1300
|
+
amount: String
|
|
1301
|
+
authority: Account
|
|
1302
|
+
mint: Account
|
|
1303
|
+
multisigAuthority: Account
|
|
1304
|
+
}
|
|
1305
|
+
type SplTokenBurnInstruction implements TransactionInstruction {
|
|
1306
|
+
data: SplTokenBurnInstructionData
|
|
1307
|
+
meta: JsonParsedInstructionMeta
|
|
1308
|
+
programId: String
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
# SplToken: CloseAccount
|
|
1312
|
+
type SplTokenCloseAccountInstructionData {
|
|
1313
|
+
account: Account
|
|
1314
|
+
destination: Account
|
|
1315
|
+
multisigOwner: Account
|
|
1316
|
+
owner: Account
|
|
1317
|
+
}
|
|
1318
|
+
type SplTokenCloseAccountInstruction implements TransactionInstruction {
|
|
1319
|
+
data: SplTokenCloseAccountInstructionData
|
|
1320
|
+
meta: JsonParsedInstructionMeta
|
|
1321
|
+
programId: String
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
# SplToken: FreezeAccount
|
|
1325
|
+
type SplTokenFreezeAccountInstructionData {
|
|
1326
|
+
account: Account
|
|
1327
|
+
freezeAuthority: Account
|
|
1328
|
+
mint: Account
|
|
1329
|
+
multisigFreezeAuthority: Account
|
|
1330
|
+
}
|
|
1331
|
+
type SplTokenFreezeAccountInstruction implements TransactionInstruction {
|
|
1332
|
+
data: SplTokenFreezeAccountInstructionData
|
|
1333
|
+
meta: JsonParsedInstructionMeta
|
|
1334
|
+
programId: String
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
# SplToken: ThawAccount
|
|
1338
|
+
type SplTokenThawAccountInstructionData {
|
|
1339
|
+
account: Account
|
|
1340
|
+
freezeAuthority: Account
|
|
1341
|
+
mint: Account
|
|
1342
|
+
multisigFreezeAuthority: Account
|
|
1343
|
+
}
|
|
1344
|
+
type SplTokenThawAccountInstruction implements TransactionInstruction {
|
|
1345
|
+
data: SplTokenThawAccountInstructionData
|
|
1346
|
+
meta: JsonParsedInstructionMeta
|
|
1347
|
+
programId: String
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
# SplToken: TransferChecked
|
|
1351
|
+
type SplTokenTransferCheckedInstructionData {
|
|
1352
|
+
amount: String
|
|
1353
|
+
authority: Account
|
|
1354
|
+
decimals: BigInt # FIXME:*
|
|
1355
|
+
destination: Account
|
|
1356
|
+
mint: Account
|
|
1357
|
+
multisigAuthority: Account
|
|
1358
|
+
source: Account
|
|
1359
|
+
tokenAmount: String
|
|
1360
|
+
}
|
|
1361
|
+
type SplTokenTransferCheckedInstruction implements TransactionInstruction {
|
|
1362
|
+
data: SplTokenTransferCheckedInstructionData
|
|
1363
|
+
meta: JsonParsedInstructionMeta
|
|
1364
|
+
programId: String
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
# SplToken: ApproveChecked
|
|
1368
|
+
type SplTokenApproveCheckedInstructionData {
|
|
1369
|
+
delegate: Account
|
|
1370
|
+
mint: Account
|
|
1371
|
+
multisigOwner: Account
|
|
1372
|
+
owner: Account
|
|
1373
|
+
source: Account
|
|
1374
|
+
tokenAmount: String
|
|
1375
|
+
}
|
|
1376
|
+
type SplTokenApproveCheckedInstruction implements TransactionInstruction {
|
|
1377
|
+
data: SplTokenApproveCheckedInstructionData
|
|
1378
|
+
meta: JsonParsedInstructionMeta
|
|
1379
|
+
programId: String
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
# SplToken: MintToChecked
|
|
1383
|
+
type SplTokenMintToCheckedInstructionData {
|
|
1384
|
+
account: Account
|
|
1385
|
+
authority: Account
|
|
1386
|
+
mint: Account
|
|
1387
|
+
mintAuthority: Account
|
|
1388
|
+
multisigMintAuthority: Account
|
|
1389
|
+
tokenAmount: String
|
|
1390
|
+
}
|
|
1391
|
+
type SplTokenMintToCheckedInstruction implements TransactionInstruction {
|
|
1392
|
+
data: SplTokenMintToCheckedInstructionData
|
|
1393
|
+
meta: JsonParsedInstructionMeta
|
|
1394
|
+
programId: String
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
# SplToken: BurnChecked
|
|
1398
|
+
type SplTokenBurnCheckedInstructionData {
|
|
1399
|
+
account: Account
|
|
1400
|
+
authority: Account
|
|
1401
|
+
mint: Account
|
|
1402
|
+
multisigAuthority: Account
|
|
1403
|
+
tokenAmount: String
|
|
1404
|
+
}
|
|
1405
|
+
type SplTokenBurnCheckedInstruction implements TransactionInstruction {
|
|
1406
|
+
data: SplTokenBurnCheckedInstructionData
|
|
1407
|
+
meta: JsonParsedInstructionMeta
|
|
1408
|
+
programId: String
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
# SplToken: SyncNative
|
|
1412
|
+
type SplTokenSyncNativeInstructionData {
|
|
1413
|
+
account: Account
|
|
1414
|
+
}
|
|
1415
|
+
type SplTokenSyncNativeInstruction implements TransactionInstruction {
|
|
1416
|
+
data: SplTokenSyncNativeInstructionData
|
|
1417
|
+
meta: JsonParsedInstructionMeta
|
|
1418
|
+
programId: String
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
# SplToken: GetAccountDataSize
|
|
1422
|
+
type SplTokenGetAccountDataSizeInstructionData {
|
|
1423
|
+
extensionTypes: [String]
|
|
1424
|
+
mint: Account
|
|
1425
|
+
}
|
|
1426
|
+
type SplTokenGetAccountDataSizeInstruction implements TransactionInstruction {
|
|
1427
|
+
data: SplTokenGetAccountDataSizeInstructionData
|
|
1428
|
+
meta: JsonParsedInstructionMeta
|
|
1429
|
+
programId: String
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
# SplToken: InitializeImmutableOwner
|
|
1433
|
+
type SplTokenInitializeImmutableOwnerInstructionData {
|
|
1434
|
+
account: Account
|
|
1435
|
+
}
|
|
1436
|
+
type SplTokenInitializeImmutableOwnerInstruction implements TransactionInstruction {
|
|
1437
|
+
data: SplTokenInitializeImmutableOwnerInstructionData
|
|
1438
|
+
meta: JsonParsedInstructionMeta
|
|
1439
|
+
programId: String
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
# SplToken: AmountToUiAmount
|
|
1443
|
+
type SplTokenAmountToUiAmountInstructionData {
|
|
1444
|
+
amount: String
|
|
1445
|
+
mint: Account
|
|
1446
|
+
}
|
|
1447
|
+
type SplTokenAmountToUiAmountInstruction implements TransactionInstruction {
|
|
1448
|
+
data: SplTokenAmountToUiAmountInstructionData
|
|
1449
|
+
meta: JsonParsedInstructionMeta
|
|
1450
|
+
programId: String
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
# SplToken: UiAmountToAmount
|
|
1454
|
+
type SplTokenUiAmountToAmountInstructionData {
|
|
1455
|
+
mint: Account
|
|
1456
|
+
uiAmount: String
|
|
1457
|
+
}
|
|
1458
|
+
type SplTokenUiAmountToAmountInstruction implements TransactionInstruction {
|
|
1459
|
+
data: SplTokenUiAmountToAmountInstructionData
|
|
1460
|
+
meta: JsonParsedInstructionMeta
|
|
1461
|
+
programId: String
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
# SplToken: InitializeMintCloseAuthority
|
|
1465
|
+
type SplTokenInitializeMintCloseAuthorityInstructionData {
|
|
1466
|
+
mint: Account
|
|
1467
|
+
newAuthority: Account
|
|
1468
|
+
}
|
|
1469
|
+
type SplTokenInitializeMintCloseAuthorityInstruction implements TransactionInstruction {
|
|
1470
|
+
data: SplTokenInitializeMintCloseAuthorityInstructionData
|
|
1471
|
+
meta: JsonParsedInstructionMeta
|
|
1472
|
+
programId: String
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
# TODO: Extensions!
|
|
1476
|
+
# - TransferFeeExtension
|
|
1477
|
+
# - ConfidentialTransferFeeExtension
|
|
1478
|
+
# - DefaultAccountStateExtension
|
|
1479
|
+
# - Reallocate
|
|
1480
|
+
# - MemoTransferExtension
|
|
1481
|
+
# - CreateNativeMint
|
|
1482
|
+
# - InitializeNonTransferableMint
|
|
1483
|
+
# - InterestBearingMintExtension
|
|
1484
|
+
# - CpiGuardExtension
|
|
1485
|
+
# - InitializePermanentDelegate
|
|
1486
|
+
# - TransferHookExtension
|
|
1487
|
+
# - ConfidentialTransferFeeExtension
|
|
1488
|
+
# - WithdrawExcessLamports
|
|
1489
|
+
# - MetadataPointerExtension
|
|
1490
|
+
|
|
1491
|
+
type Lockup {
|
|
1492
|
+
custodian: Account
|
|
1493
|
+
epoch: BigInt
|
|
1494
|
+
unixTimestamp: BigInt
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
# Stake: Initialize
|
|
1498
|
+
type StakeInitializeInstructionDataAuthorized {
|
|
1499
|
+
staker: Account
|
|
1500
|
+
withdrawer: Account
|
|
1501
|
+
}
|
|
1502
|
+
type StakeInitializeInstructionData {
|
|
1503
|
+
authorized: StakeInitializeInstructionDataAuthorized
|
|
1504
|
+
lockup: Lockup
|
|
1505
|
+
rentSysvar: String
|
|
1506
|
+
stakeAccount: Account
|
|
1507
|
+
}
|
|
1508
|
+
type StakeInitializeInstruction implements TransactionInstruction {
|
|
1509
|
+
data: StakeInitializeInstructionData
|
|
1510
|
+
meta: JsonParsedInstructionMeta
|
|
1511
|
+
programId: String
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
# Stake: Authorize
|
|
1515
|
+
type StakeAuthorizeInstructionData {
|
|
1516
|
+
authority: Account
|
|
1517
|
+
authorityType: String
|
|
1518
|
+
clockSysvar: String
|
|
1519
|
+
custodian: Account
|
|
1520
|
+
newAuthority: Account
|
|
1521
|
+
stakeAccount: Account
|
|
1522
|
+
}
|
|
1523
|
+
type StakeAuthorizeInstruction implements TransactionInstruction {
|
|
1524
|
+
data: StakeAuthorizeInstructionData
|
|
1525
|
+
meta: JsonParsedInstructionMeta
|
|
1526
|
+
programId: String
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
# Stake: DelegateStake
|
|
1530
|
+
type StakeDelegateStakeInstructionData {
|
|
1531
|
+
clockSysvar: String
|
|
1532
|
+
stakeAccount: Account
|
|
1533
|
+
stakeAuthority: Account
|
|
1534
|
+
stakeConfigAccount: Account
|
|
1535
|
+
stakeHistorySysvar: String
|
|
1536
|
+
voteAccount: Account
|
|
1537
|
+
}
|
|
1538
|
+
type StakeDelegateStakeInstruction implements TransactionInstruction {
|
|
1539
|
+
data: StakeDelegateStakeInstructionData
|
|
1540
|
+
meta: JsonParsedInstructionMeta
|
|
1541
|
+
programId: String
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
# Stake: Split
|
|
1545
|
+
type StakeSplitInstructionData {
|
|
1546
|
+
lamports: BigInt
|
|
1547
|
+
newSplitAccount: Account
|
|
1548
|
+
stakeAccount: Account
|
|
1549
|
+
stakeAuthority: Account
|
|
1550
|
+
}
|
|
1551
|
+
type StakeSplitInstruction implements TransactionInstruction {
|
|
1552
|
+
data: StakeSplitInstructionData
|
|
1553
|
+
meta: JsonParsedInstructionMeta
|
|
1554
|
+
programId: String
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
# Stake: Withdraw
|
|
1558
|
+
type StakeWithdrawInstructionData {
|
|
1559
|
+
clockSysvar: String
|
|
1560
|
+
destination: Account
|
|
1561
|
+
lamports: BigInt
|
|
1562
|
+
stakeAccount: Account
|
|
1563
|
+
withdrawAuthority: Account
|
|
1564
|
+
}
|
|
1565
|
+
type StakeWithdrawInstruction implements TransactionInstruction {
|
|
1566
|
+
data: StakeWithdrawInstructionData
|
|
1567
|
+
meta: JsonParsedInstructionMeta
|
|
1568
|
+
programId: String
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
# Stake: Deactivate
|
|
1572
|
+
type StakeDeactivateInstructionData {
|
|
1573
|
+
clockSysvar: String
|
|
1574
|
+
stakeAccount: Account
|
|
1575
|
+
stakeAuthority: Account
|
|
1576
|
+
}
|
|
1577
|
+
type StakeDeactivateInstruction implements TransactionInstruction {
|
|
1578
|
+
data: StakeDeactivateInstructionData
|
|
1579
|
+
meta: JsonParsedInstructionMeta
|
|
1580
|
+
programId: String
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
# Stake: SetLockup
|
|
1584
|
+
type StakeSetLockupInstructionData {
|
|
1585
|
+
custodian: Account
|
|
1586
|
+
lockup: Lockup
|
|
1587
|
+
stakeAccount: Account
|
|
1588
|
+
}
|
|
1589
|
+
type StakeSetLockupInstruction implements TransactionInstruction {
|
|
1590
|
+
data: StakeSetLockupInstructionData
|
|
1591
|
+
meta: JsonParsedInstructionMeta
|
|
1592
|
+
programId: String
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
# Stake: Merge
|
|
1596
|
+
type StakeMergeInstructionData {
|
|
1597
|
+
clockSysvar: String
|
|
1598
|
+
destination: Account
|
|
1599
|
+
source: Account
|
|
1600
|
+
stakeAuthority: Account
|
|
1601
|
+
stakeHistorySysvar: String
|
|
1602
|
+
}
|
|
1603
|
+
type StakeMergeInstruction implements TransactionInstruction {
|
|
1604
|
+
data: StakeMergeInstructionData
|
|
1605
|
+
meta: JsonParsedInstructionMeta
|
|
1606
|
+
programId: String
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
# Stake: AuthorizeWithSeed
|
|
1610
|
+
type StakeAuthorizeWithSeedInstructionData {
|
|
1611
|
+
authorityBase: Account
|
|
1612
|
+
authorityOwner: Account
|
|
1613
|
+
authoritySeed: String
|
|
1614
|
+
authorityType: String
|
|
1615
|
+
clockSysvar: String
|
|
1616
|
+
custodian: Account
|
|
1617
|
+
newAuthorized: Account
|
|
1618
|
+
stakeAccount: Account
|
|
1619
|
+
}
|
|
1620
|
+
type StakeAuthorizeWithSeedInstruction implements TransactionInstruction {
|
|
1621
|
+
data: StakeAuthorizeWithSeedInstructionData
|
|
1622
|
+
meta: JsonParsedInstructionMeta
|
|
1623
|
+
programId: String
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
# Stake: InitializeChecked
|
|
1627
|
+
type StakeInitializeCheckedInstructionDataAuthorized {
|
|
1628
|
+
rentSysvar: String
|
|
1629
|
+
stakeAccount: Account
|
|
1630
|
+
staker: Account
|
|
1631
|
+
withdrawer: Account
|
|
1632
|
+
}
|
|
1633
|
+
type StakeInitializeCheckedInstruction implements TransactionInstruction {
|
|
1634
|
+
data: StakeInitializeCheckedInstructionDataAuthorized
|
|
1635
|
+
meta: JsonParsedInstructionMeta
|
|
1636
|
+
programId: String
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
# Stake: AuthorizeChecked
|
|
1640
|
+
type StakeAuthorizeCheckedInstructionData {
|
|
1641
|
+
authority: Account
|
|
1642
|
+
authorityType: String
|
|
1643
|
+
clockSysvar: String
|
|
1644
|
+
custodian: Account
|
|
1645
|
+
newAuthority: Account
|
|
1646
|
+
stakeAccount: Account
|
|
1647
|
+
}
|
|
1648
|
+
type StakeAuthorizeCheckedInstruction implements TransactionInstruction {
|
|
1649
|
+
data: StakeAuthorizeCheckedInstructionData
|
|
1650
|
+
meta: JsonParsedInstructionMeta
|
|
1651
|
+
programId: String
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
# Stake: AuthorizeCheckedWithSeed
|
|
1655
|
+
type StakeAuthorizeCheckedWithSeedInstructionData {
|
|
1656
|
+
authorityBase: Account
|
|
1657
|
+
authorityOwner: Account
|
|
1658
|
+
authoritySeed: String
|
|
1659
|
+
authorityType: String
|
|
1660
|
+
clockSysvar: String
|
|
1661
|
+
custodian: Account
|
|
1662
|
+
newAuthorized: Account
|
|
1663
|
+
stakeAccount: Account
|
|
1664
|
+
}
|
|
1665
|
+
type StakeAuthorizeCheckedWithSeedInstruction implements TransactionInstruction {
|
|
1666
|
+
data: StakeAuthorizeCheckedWithSeedInstructionData
|
|
1667
|
+
meta: JsonParsedInstructionMeta
|
|
1668
|
+
programId: String
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
# Stake: SetLockupChecked
|
|
1672
|
+
type StakeSetLockupCheckedInstructionData {
|
|
1673
|
+
custodian: Account
|
|
1674
|
+
lockup: Lockup
|
|
1675
|
+
stakeAccount: Account
|
|
1676
|
+
}
|
|
1677
|
+
type StakeSetLockupCheckedInstruction implements TransactionInstruction {
|
|
1678
|
+
data: StakeSetLockupCheckedInstructionData
|
|
1679
|
+
meta: JsonParsedInstructionMeta
|
|
1680
|
+
programId: String
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
# Stake: DeactivateDelinquent
|
|
1684
|
+
type StakeDeactivateDelinquentInstructionData {
|
|
1685
|
+
referenceVoteAccount: Account
|
|
1686
|
+
stakeAccount: Account
|
|
1687
|
+
voteAccount: Account
|
|
1688
|
+
}
|
|
1689
|
+
type StakeDeactivateDelinquentInstruction implements TransactionInstruction {
|
|
1690
|
+
data: StakeDeactivateDelinquentInstructionData
|
|
1691
|
+
meta: JsonParsedInstructionMeta
|
|
1692
|
+
programId: String
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
# Stake: Redelegate
|
|
1696
|
+
type StakeRedelegateInstructionData {
|
|
1697
|
+
newStakeAccount: Account
|
|
1698
|
+
stakeAccount: Account
|
|
1699
|
+
stakeAuthority: Account
|
|
1700
|
+
stakeConfigAccount: Account
|
|
1701
|
+
voteAccount: Account
|
|
1702
|
+
}
|
|
1703
|
+
type StakeRedelegateInstruction implements TransactionInstruction {
|
|
1704
|
+
data: StakeRedelegateInstructionData
|
|
1705
|
+
meta: JsonParsedInstructionMeta
|
|
1706
|
+
programId: String
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
# System: CreateAccount
|
|
1710
|
+
type CreateAccountInstructionData {
|
|
1711
|
+
lamports: BigInt
|
|
1712
|
+
newAccount: Account
|
|
1713
|
+
owner: Account
|
|
1714
|
+
source: Account
|
|
1715
|
+
space: BigInt
|
|
1716
|
+
}
|
|
1717
|
+
type CreateAccountInstruction implements TransactionInstruction {
|
|
1718
|
+
data: CreateAccountInstructionData
|
|
1719
|
+
meta: JsonParsedInstructionMeta
|
|
1720
|
+
programId: String
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
# System: Assign
|
|
1724
|
+
type AssignInstructionData {
|
|
1725
|
+
account: Account
|
|
1726
|
+
owner: Account
|
|
1727
|
+
}
|
|
1728
|
+
type AssignInstruction implements TransactionInstruction {
|
|
1729
|
+
data: AssignInstructionData
|
|
1730
|
+
meta: JsonParsedInstructionMeta
|
|
1731
|
+
programId: String
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
# System: Transfer
|
|
1735
|
+
type TransferInstructionData {
|
|
1736
|
+
destination: Account
|
|
1737
|
+
lamports: BigInt
|
|
1738
|
+
source: Account
|
|
1739
|
+
}
|
|
1740
|
+
type TransferInstruction implements TransactionInstruction {
|
|
1741
|
+
data: TransferInstructionData
|
|
1742
|
+
meta: JsonParsedInstructionMeta
|
|
1743
|
+
programId: String
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
# System: CreateAccountWithSeed
|
|
1747
|
+
type CreateAccountWithSeedInstructionData {
|
|
1748
|
+
base: Account
|
|
1749
|
+
lamports: BigInt
|
|
1750
|
+
owner: Account
|
|
1751
|
+
seed: String
|
|
1752
|
+
space: BigInt
|
|
1753
|
+
}
|
|
1754
|
+
type CreateAccountWithSeedInstruction implements TransactionInstruction {
|
|
1755
|
+
data: CreateAccountWithSeedInstructionData
|
|
1756
|
+
meta: JsonParsedInstructionMeta
|
|
1757
|
+
programId: String
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
# System: AdvanceNonceAccount
|
|
1761
|
+
type AdvanceNonceAccountInstructionData {
|
|
1762
|
+
nonceAccount: Account
|
|
1763
|
+
nonceAuthority: Account
|
|
1764
|
+
recentBlockhashesSysvar: String
|
|
1765
|
+
}
|
|
1766
|
+
type AdvanceNonceAccountInstruction implements TransactionInstruction {
|
|
1767
|
+
data: AdvanceNonceAccountInstructionData
|
|
1768
|
+
meta: JsonParsedInstructionMeta
|
|
1769
|
+
programId: String
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
# System: WithdrawNonceAccount
|
|
1773
|
+
type WithdrawNonceAccountInstructionData {
|
|
1774
|
+
destination: Account
|
|
1775
|
+
lamports: BigInt
|
|
1776
|
+
nonceAccount: Account
|
|
1777
|
+
nonceAuthority: Account
|
|
1778
|
+
recentBlockhashesSysvar: String
|
|
1779
|
+
rentSysvar: String
|
|
1780
|
+
}
|
|
1781
|
+
type WithdrawNonceAccountInstruction implements TransactionInstruction {
|
|
1782
|
+
data: WithdrawNonceAccountInstructionData
|
|
1783
|
+
meta: JsonParsedInstructionMeta
|
|
1784
|
+
programId: String
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
# System: InitializeNonceAccount
|
|
1788
|
+
type InitializeNonceAccountInstructionData {
|
|
1789
|
+
nonceAccount: Account
|
|
1790
|
+
nonceAuthority: Account
|
|
1791
|
+
recentBlockhashesSysvar: String
|
|
1792
|
+
rentSysvar: String
|
|
1793
|
+
}
|
|
1794
|
+
type InitializeNonceAccountInstruction implements TransactionInstruction {
|
|
1795
|
+
data: InitializeNonceAccountInstructionData
|
|
1796
|
+
meta: JsonParsedInstructionMeta
|
|
1797
|
+
programId: String
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
# System: AuthorizeNonceAccount
|
|
1801
|
+
type AuthorizeNonceAccountInstructionData {
|
|
1802
|
+
newAuthorized: Account
|
|
1803
|
+
nonceAccount: Account
|
|
1804
|
+
nonceAuthority: Account
|
|
1805
|
+
}
|
|
1806
|
+
type AuthorizeNonceAccountInstruction implements TransactionInstruction {
|
|
1807
|
+
data: AuthorizeNonceAccountInstructionData
|
|
1808
|
+
meta: JsonParsedInstructionMeta
|
|
1809
|
+
programId: String
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
# System: UpgradeNonceAccount
|
|
1813
|
+
type UpgradeNonceAccountInstructionData {
|
|
1814
|
+
nonceAccount: Account
|
|
1815
|
+
nonceAuthority: Account
|
|
1816
|
+
}
|
|
1817
|
+
type UpgradeNonceAccountInstruction implements TransactionInstruction {
|
|
1818
|
+
data: UpgradeNonceAccountInstructionData
|
|
1819
|
+
meta: JsonParsedInstructionMeta
|
|
1820
|
+
programId: String
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
# System: Allocate
|
|
1824
|
+
type AllocateInstructionData {
|
|
1825
|
+
account: Account
|
|
1826
|
+
space: BigInt
|
|
1827
|
+
}
|
|
1828
|
+
type AllocateInstruction implements TransactionInstruction {
|
|
1829
|
+
data: AllocateInstructionData
|
|
1830
|
+
meta: JsonParsedInstructionMeta
|
|
1831
|
+
programId: String
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
# System: AllocateWithSeed
|
|
1835
|
+
type AllocateWithSeedInstructionData {
|
|
1836
|
+
account: Account
|
|
1837
|
+
base: String
|
|
1838
|
+
owner: Account
|
|
1839
|
+
seed: String
|
|
1840
|
+
space: BigInt
|
|
1841
|
+
}
|
|
1842
|
+
type AllocateWithSeedInstruction implements TransactionInstruction {
|
|
1843
|
+
data: AllocateWithSeedInstructionData
|
|
1844
|
+
meta: JsonParsedInstructionMeta
|
|
1845
|
+
programId: String
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
# System: AssignWithSeed
|
|
1849
|
+
type AssignWithSeedInstructionData {
|
|
1850
|
+
account: Account
|
|
1851
|
+
base: String
|
|
1852
|
+
owner: Account
|
|
1853
|
+
seed: String
|
|
1854
|
+
}
|
|
1855
|
+
type AssignWithSeedInstruction implements TransactionInstruction {
|
|
1856
|
+
data: AssignWithSeedInstructionData
|
|
1857
|
+
meta: JsonParsedInstructionMeta
|
|
1858
|
+
programId: String
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
# System: TransferWithSeed
|
|
1862
|
+
type TransferWithSeedInstructionData {
|
|
1863
|
+
destination: Account
|
|
1864
|
+
lamports: BigInt
|
|
1865
|
+
source: Account
|
|
1866
|
+
sourceBase: String
|
|
1867
|
+
sourceOwner: Account
|
|
1868
|
+
sourceSeed: String
|
|
1869
|
+
}
|
|
1870
|
+
type TransferWithSeedInstruction implements TransactionInstruction {
|
|
1871
|
+
data: TransferWithSeedInstructionData
|
|
1872
|
+
meta: JsonParsedInstructionMeta
|
|
1873
|
+
programId: String
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
# Vote: InitializeAccount
|
|
1877
|
+
type VoteInitializeAccountInstructionData {
|
|
1878
|
+
authorizedVoter: Account
|
|
1879
|
+
authorizedWithdrawer: Account
|
|
1880
|
+
clockSysvar: String
|
|
1881
|
+
commission: BigInt # FIXME:*
|
|
1882
|
+
node: Account
|
|
1883
|
+
rentSysvar: String
|
|
1884
|
+
voteAccount: Account
|
|
1885
|
+
}
|
|
1886
|
+
type VoteInitializeAccountInstruction implements TransactionInstruction {
|
|
1887
|
+
data: VoteInitializeAccountInstructionData
|
|
1888
|
+
meta: JsonParsedInstructionMeta
|
|
1889
|
+
programId: String
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
# Vote: Authorize
|
|
1893
|
+
type VoteAuthorizeInstructionData {
|
|
1894
|
+
authority: Account
|
|
1895
|
+
authorityType: String
|
|
1896
|
+
clockSysvar: String
|
|
1897
|
+
newAuthority: Account
|
|
1898
|
+
voteAccount: Account
|
|
1899
|
+
}
|
|
1900
|
+
type VoteAuthorizeInstruction implements TransactionInstruction {
|
|
1901
|
+
data: VoteAuthorizeInstructionData
|
|
1902
|
+
meta: JsonParsedInstructionMeta
|
|
1903
|
+
programId: String
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
# Vote: AuthorizeWithSeed
|
|
1907
|
+
type VoteAuthorizeWithSeedInstructionData {
|
|
1908
|
+
authorityBaseKey: String
|
|
1909
|
+
authorityOwner: Account
|
|
1910
|
+
authoritySeed: String
|
|
1911
|
+
authorityType: String
|
|
1912
|
+
clockSysvar: String
|
|
1913
|
+
newAuthority: Account
|
|
1914
|
+
voteAccount: Account
|
|
1915
|
+
}
|
|
1916
|
+
type VoteAuthorizeWithSeedInstruction implements TransactionInstruction {
|
|
1917
|
+
data: VoteAuthorizeWithSeedInstructionData
|
|
1918
|
+
meta: JsonParsedInstructionMeta
|
|
1919
|
+
programId: String
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
# Vote: AuthorizeCheckedWithSeed
|
|
1923
|
+
type VoteAuthorizeCheckedWithSeedInstructionData {
|
|
1924
|
+
authorityBaseKey: String
|
|
1925
|
+
authorityOwner: Account
|
|
1926
|
+
authoritySeed: String
|
|
1927
|
+
authorityType: String
|
|
1928
|
+
clockSysvar: String
|
|
1929
|
+
newAuthority: Account
|
|
1930
|
+
voteAccount: Account
|
|
1931
|
+
}
|
|
1932
|
+
type VoteAuthorizeCheckedWithSeedInstruction implements TransactionInstruction {
|
|
1933
|
+
data: VoteAuthorizeCheckedWithSeedInstructionData
|
|
1934
|
+
meta: JsonParsedInstructionMeta
|
|
1935
|
+
programId: String
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
type Vote {
|
|
1939
|
+
hash: String
|
|
1940
|
+
slots: [BigInt]
|
|
1941
|
+
timestamp: BigInt
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
# Vote: Vote
|
|
1945
|
+
type VoteVoteInstructionData {
|
|
1946
|
+
clockSysvar: String
|
|
1947
|
+
slotHashesSysvar: String
|
|
1948
|
+
vote: Vote
|
|
1949
|
+
voteAccount: Account
|
|
1950
|
+
voteAuthority: Account
|
|
1951
|
+
}
|
|
1952
|
+
type VoteVoteInstruction implements TransactionInstruction {
|
|
1953
|
+
data: VoteVoteInstructionData
|
|
1954
|
+
meta: JsonParsedInstructionMeta
|
|
1955
|
+
programId: String
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
type VoteStateUpdateLockout {
|
|
1959
|
+
confirmationCount: BigInt # FIXME:*
|
|
1960
|
+
slot: BigInt
|
|
1961
|
+
}
|
|
1962
|
+
type VoteStateUpdate {
|
|
1963
|
+
hash: String
|
|
1964
|
+
lockouts: [VoteStateUpdateLockout]
|
|
1965
|
+
root: BigInt
|
|
1966
|
+
timestamp: BigInt
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
# Vote: UpdateVoteState
|
|
1970
|
+
type VoteUpdateVoteStateInstructionData {
|
|
1971
|
+
hash: String
|
|
1972
|
+
voteAccount: Account
|
|
1973
|
+
voteAuthority: Account
|
|
1974
|
+
voteStateUpdate: VoteStateUpdate
|
|
1975
|
+
}
|
|
1976
|
+
type VoteUpdateVoteStateInstruction implements TransactionInstruction {
|
|
1977
|
+
data: VoteUpdateVoteStateInstructionData
|
|
1978
|
+
meta: JsonParsedInstructionMeta
|
|
1979
|
+
programId: String
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
# Vote: UpdateVoteStateSwitch
|
|
1983
|
+
type VoteUpdateVoteStateSwitchInstructionData {
|
|
1984
|
+
hash: String
|
|
1985
|
+
voteAccount: Account
|
|
1986
|
+
voteAuthority: Account
|
|
1987
|
+
voteStateUpdate: VoteStateUpdate
|
|
1988
|
+
}
|
|
1989
|
+
type VoteUpdateVoteStateSwitchInstruction implements TransactionInstruction {
|
|
1990
|
+
data: VoteUpdateVoteStateSwitchInstructionData
|
|
1991
|
+
meta: JsonParsedInstructionMeta
|
|
1992
|
+
programId: String
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
# Vote: CompactUpdateVoteState
|
|
1996
|
+
type VoteCompactUpdateVoteStateInstructionData {
|
|
1997
|
+
hash: String
|
|
1998
|
+
voteAccount: Account
|
|
1999
|
+
voteAuthority: Account
|
|
2000
|
+
voteStateUpdate: VoteStateUpdate
|
|
2001
|
+
}
|
|
2002
|
+
type VoteCompactUpdateVoteStateInstruction implements TransactionInstruction {
|
|
2003
|
+
data: VoteCompactUpdateVoteStateInstructionData
|
|
2004
|
+
meta: JsonParsedInstructionMeta
|
|
2005
|
+
programId: String
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
# Vote: CompactUpdateVoteStateSwitch
|
|
2009
|
+
type VoteCompactUpdateVoteStateSwitchInstructionData {
|
|
2010
|
+
hash: String
|
|
2011
|
+
voteAccount: Account
|
|
2012
|
+
voteAuthority: Account
|
|
2013
|
+
voteStateUpdate: VoteStateUpdate
|
|
2014
|
+
}
|
|
2015
|
+
type VoteCompactUpdateVoteStateSwitchInstruction implements TransactionInstruction {
|
|
2016
|
+
data: VoteCompactUpdateVoteStateSwitchInstructionData
|
|
2017
|
+
meta: JsonParsedInstructionMeta
|
|
2018
|
+
programId: String
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
# Vote: Withdraw
|
|
2022
|
+
type VoteWithdrawInstructionData {
|
|
2023
|
+
destination: Account
|
|
2024
|
+
lamports: BigInt
|
|
2025
|
+
voteAccount: Account
|
|
2026
|
+
withdrawAuthority: Account
|
|
2027
|
+
}
|
|
2028
|
+
type VoteWithdrawInstruction implements TransactionInstruction {
|
|
2029
|
+
data: VoteWithdrawInstructionData
|
|
2030
|
+
meta: JsonParsedInstructionMeta
|
|
2031
|
+
programId: String
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
# Vote: UpdateValidatorIdentity
|
|
2035
|
+
type VoteUpdateValidatorIdentityInstructionData {
|
|
2036
|
+
newValidatorIdentity: Account
|
|
2037
|
+
voteAccount: Account
|
|
2038
|
+
withdrawAuthority: Account
|
|
2039
|
+
}
|
|
2040
|
+
type VoteUpdateValidatorIdentityInstruction implements TransactionInstruction {
|
|
2041
|
+
data: VoteUpdateValidatorIdentityInstructionData
|
|
2042
|
+
meta: JsonParsedInstructionMeta
|
|
2043
|
+
programId: String
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
# Vote: UpdateCommission
|
|
2047
|
+
type VoteUpdateCommissionInstructionData {
|
|
2048
|
+
commission: BigInt # FIXME:*
|
|
2049
|
+
voteAccount: Account
|
|
2050
|
+
withdrawAuthority: Account
|
|
2051
|
+
}
|
|
2052
|
+
type VoteUpdateCommissionInstruction implements TransactionInstruction {
|
|
2053
|
+
data: VoteUpdateCommissionInstructionData
|
|
2054
|
+
meta: JsonParsedInstructionMeta
|
|
2055
|
+
programId: String
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
# Vote: VoteSwitch
|
|
2059
|
+
type VoteVoteSwitchInstructionData {
|
|
2060
|
+
clockSysvar: String
|
|
2061
|
+
hash: String
|
|
2062
|
+
slotHashesSysvar: String
|
|
2063
|
+
vote: Vote
|
|
2064
|
+
voteAccount: Account
|
|
2065
|
+
voteAuthority: Account
|
|
2066
|
+
}
|
|
2067
|
+
type VoteVoteSwitchInstruction implements TransactionInstruction {
|
|
2068
|
+
data: VoteVoteSwitchInstructionData
|
|
2069
|
+
meta: JsonParsedInstructionMeta
|
|
2070
|
+
programId: String
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
# Vote: AuthorizeChecked
|
|
2074
|
+
type VoteAuthorizeCheckedInstructionData {
|
|
2075
|
+
authority: Account
|
|
2076
|
+
authorityType: String
|
|
2077
|
+
clockSysvar: String
|
|
2078
|
+
newAuthority: Account
|
|
2079
|
+
voteAccount: Account
|
|
2080
|
+
}
|
|
2081
|
+
type VoteAuthorizeCheckedInstruction implements TransactionInstruction {
|
|
2082
|
+
data: VoteAuthorizeCheckedInstructionData
|
|
2083
|
+
meta: JsonParsedInstructionMeta
|
|
2084
|
+
programId: String
|
|
2085
|
+
}
|
|
2086
|
+
`
|
|
2087
|
+
);
|
|
2088
|
+
var instructionResolvers = {
|
|
2089
|
+
TransactionInstruction: {
|
|
2090
|
+
__resolveType(instruction) {
|
|
2091
|
+
if (instruction.meta) {
|
|
2092
|
+
if (instruction.meta.program === "address-lookup-table") {
|
|
2093
|
+
if (instruction.meta.type === "createLookupTable") {
|
|
733
2094
|
return "CreateLookupTableInstruction";
|
|
734
2095
|
}
|
|
735
|
-
if (instruction.
|
|
2096
|
+
if (instruction.meta.type === "freezeLookupTable") {
|
|
736
2097
|
return "FreezeLookupTableInstruction";
|
|
737
2098
|
}
|
|
738
|
-
if (instruction.
|
|
2099
|
+
if (instruction.meta.type === "extendLookupTable") {
|
|
739
2100
|
return "ExtendLookupTableInstruction";
|
|
740
2101
|
}
|
|
741
|
-
if (instruction.
|
|
2102
|
+
if (instruction.meta.type === "deactivateLookupTable") {
|
|
742
2103
|
return "DeactivateLookupTableInstruction";
|
|
743
2104
|
}
|
|
744
|
-
if (instruction.
|
|
2105
|
+
if (instruction.meta.type === "closeLookupTable") {
|
|
745
2106
|
return "CloseLookupTableInstruction";
|
|
746
2107
|
}
|
|
747
2108
|
}
|
|
748
|
-
if (instruction.program === "bpf-loader") {
|
|
749
|
-
if (instruction.
|
|
2109
|
+
if (instruction.meta.program === "bpf-loader") {
|
|
2110
|
+
if (instruction.meta.type === "write") {
|
|
750
2111
|
return "BpfLoaderWriteInstruction";
|
|
751
2112
|
}
|
|
752
|
-
if (instruction.
|
|
2113
|
+
if (instruction.meta.type === "finalize") {
|
|
753
2114
|
return "BpfLoaderFinalizeInstruction";
|
|
754
2115
|
}
|
|
755
2116
|
}
|
|
756
|
-
if (instruction.program === "bpf-upgradeable-loader") {
|
|
757
|
-
if (instruction.
|
|
2117
|
+
if (instruction.meta.program === "bpf-upgradeable-loader") {
|
|
2118
|
+
if (instruction.meta.type === "initializeBuffer") {
|
|
758
2119
|
return "BpfUpgradeableLoaderInitializeBufferInstruction";
|
|
759
2120
|
}
|
|
760
|
-
if (instruction.
|
|
2121
|
+
if (instruction.meta.type === "write") {
|
|
761
2122
|
return "BpfUpgradeableLoaderWriteInstruction";
|
|
762
2123
|
}
|
|
763
|
-
if (instruction.
|
|
2124
|
+
if (instruction.meta.type === "deployWithMaxDataLen") {
|
|
764
2125
|
return "BpfUpgradeableLoaderDeployWithMaxDataLenInstruction";
|
|
765
2126
|
}
|
|
766
|
-
if (instruction.
|
|
2127
|
+
if (instruction.meta.type === "upgrade") {
|
|
767
2128
|
return "BpfUpgradeableLoaderUpgradeInstruction";
|
|
768
2129
|
}
|
|
769
|
-
if (instruction.
|
|
2130
|
+
if (instruction.meta.type === "setAuthority") {
|
|
770
2131
|
return "BpfUpgradeableLoaderSetAuthorityInstruction";
|
|
771
2132
|
}
|
|
772
|
-
if (instruction.
|
|
2133
|
+
if (instruction.meta.type === "setAuthorityChecked") {
|
|
773
2134
|
return "BpfUpgradeableLoaderSetAuthorityCheckedInstruction";
|
|
774
2135
|
}
|
|
775
|
-
if (instruction.
|
|
2136
|
+
if (instruction.meta.type === "close") {
|
|
776
2137
|
return "BpfUpgradeableLoaderCloseInstruction";
|
|
777
2138
|
}
|
|
778
|
-
if (instruction.
|
|
2139
|
+
if (instruction.meta.type === "extendProgram") {
|
|
779
2140
|
return "BpfUpgradeableLoaderExtendProgramInstruction";
|
|
780
2141
|
}
|
|
781
2142
|
}
|
|
782
|
-
if (instruction.program === "spl-associated-token-account") {
|
|
783
|
-
if (instruction.
|
|
2143
|
+
if (instruction.meta.program === "spl-associated-token-account") {
|
|
2144
|
+
if (instruction.meta.type === "create") {
|
|
784
2145
|
return "SplAssociatedTokenCreateInstruction";
|
|
785
2146
|
}
|
|
786
|
-
if (instruction.
|
|
2147
|
+
if (instruction.meta.type === "createIdempotent") {
|
|
787
2148
|
return "SplAssociatedTokenCreateIdempotentInstruction";
|
|
788
2149
|
}
|
|
789
|
-
if (instruction.
|
|
2150
|
+
if (instruction.meta.type === "recoverNested") {
|
|
790
2151
|
return "SplAssociatedTokenRecoverNestedInstruction";
|
|
791
2152
|
}
|
|
792
2153
|
}
|
|
793
|
-
if (instruction.program === "spl-memo") {
|
|
2154
|
+
if (instruction.meta.program === "spl-memo") {
|
|
794
2155
|
return "SplMemoInstruction";
|
|
795
2156
|
}
|
|
796
|
-
if (instruction.program === "spl-token") {
|
|
797
|
-
if (instruction.
|
|
2157
|
+
if (instruction.meta.program === "spl-token") {
|
|
2158
|
+
if (instruction.meta.type === "initializeMint") {
|
|
798
2159
|
return "SplTokenInitializeMintInstruction";
|
|
799
2160
|
}
|
|
800
|
-
if (instruction.
|
|
2161
|
+
if (instruction.meta.type === "initializeMint2") {
|
|
801
2162
|
return "SplTokenInitializeMint2Instruction";
|
|
802
2163
|
}
|
|
803
|
-
if (instruction.
|
|
2164
|
+
if (instruction.meta.type === "initializeAccount") {
|
|
804
2165
|
return "SplTokenInitializeAccountInstruction";
|
|
805
2166
|
}
|
|
806
|
-
if (instruction.
|
|
2167
|
+
if (instruction.meta.type === "initializeAccount2") {
|
|
807
2168
|
return "SplTokenInitializeAccount2Instruction";
|
|
808
2169
|
}
|
|
809
|
-
if (instruction.
|
|
2170
|
+
if (instruction.meta.type === "initializeAccount3") {
|
|
810
2171
|
return "SplTokenInitializeAccount3Instruction";
|
|
811
2172
|
}
|
|
812
|
-
if (instruction.
|
|
2173
|
+
if (instruction.meta.type === "initializeMultisig") {
|
|
813
2174
|
return "SplTokenInitializeMultisigInstruction";
|
|
814
2175
|
}
|
|
815
|
-
if (instruction.
|
|
2176
|
+
if (instruction.meta.type === "initializeMultisig2") {
|
|
816
2177
|
return "SplTokenInitializeMultisig2Instruction";
|
|
817
2178
|
}
|
|
818
|
-
if (instruction.
|
|
2179
|
+
if (instruction.meta.type === "transfer") {
|
|
819
2180
|
return "SplTokenTransferInstruction";
|
|
820
2181
|
}
|
|
821
|
-
if (instruction.
|
|
2182
|
+
if (instruction.meta.type === "approve") {
|
|
822
2183
|
return "SplTokenApproveInstruction";
|
|
823
2184
|
}
|
|
824
|
-
if (instruction.
|
|
2185
|
+
if (instruction.meta.type === "revoke") {
|
|
825
2186
|
return "SplTokenRevokeInstruction";
|
|
826
2187
|
}
|
|
827
|
-
if (instruction.
|
|
2188
|
+
if (instruction.meta.type === "setAuthority") {
|
|
828
2189
|
return "SplTokenSetAuthorityInstruction";
|
|
829
2190
|
}
|
|
830
|
-
if (instruction.
|
|
2191
|
+
if (instruction.meta.type === "mintTo") {
|
|
831
2192
|
return "SplTokenMintToInstruction";
|
|
832
2193
|
}
|
|
833
|
-
if (instruction.
|
|
2194
|
+
if (instruction.meta.type === "burn") {
|
|
834
2195
|
return "SplTokenBurnInstruction";
|
|
835
2196
|
}
|
|
836
|
-
if (instruction.
|
|
2197
|
+
if (instruction.meta.type === "closeAccount") {
|
|
837
2198
|
return "SplTokenCloseAccountInstruction";
|
|
838
2199
|
}
|
|
839
|
-
if (instruction.
|
|
2200
|
+
if (instruction.meta.type === "freezeAccount") {
|
|
840
2201
|
return "SplTokenFreezeAccountInstruction";
|
|
841
2202
|
}
|
|
842
|
-
if (instruction.
|
|
2203
|
+
if (instruction.meta.type === "thawAccount") {
|
|
843
2204
|
return "SplTokenThawAccountInstruction";
|
|
844
2205
|
}
|
|
845
|
-
if (instruction.
|
|
2206
|
+
if (instruction.meta.type === "transferChecked") {
|
|
846
2207
|
return "SplTokenTransferCheckedInstruction";
|
|
847
2208
|
}
|
|
848
|
-
if (instruction.
|
|
2209
|
+
if (instruction.meta.type === "approveChecked") {
|
|
849
2210
|
return "SplTokenApproveCheckedInstruction";
|
|
850
2211
|
}
|
|
851
|
-
if (instruction.
|
|
2212
|
+
if (instruction.meta.type === "mintToChecked") {
|
|
852
2213
|
return "SplTokenMintToCheckedInstruction";
|
|
853
2214
|
}
|
|
854
|
-
if (instruction.
|
|
2215
|
+
if (instruction.meta.type === "burnChecked") {
|
|
855
2216
|
return "SplTokenBurnCheckedInstruction";
|
|
856
2217
|
}
|
|
857
|
-
if (instruction.
|
|
2218
|
+
if (instruction.meta.type === "syncNative") {
|
|
858
2219
|
return "SplTokenSyncNativeInstruction";
|
|
859
2220
|
}
|
|
860
|
-
if (instruction.
|
|
2221
|
+
if (instruction.meta.type === "getAccountDataSize") {
|
|
861
2222
|
return "SplTokenGetAccountDataSizeInstruction";
|
|
862
2223
|
}
|
|
863
|
-
if (instruction.
|
|
2224
|
+
if (instruction.meta.type === "initializeImmutableOwner") {
|
|
864
2225
|
return "SplTokenInitializeImmutableOwnerInstruction";
|
|
865
2226
|
}
|
|
866
|
-
if (instruction.
|
|
2227
|
+
if (instruction.meta.type === "amountToUiAmount") {
|
|
867
2228
|
return "SplTokenAmountToUiAmountInstruction";
|
|
868
2229
|
}
|
|
869
|
-
if (instruction.
|
|
2230
|
+
if (instruction.meta.type === "uiAmountToAmount") {
|
|
870
2231
|
return "SplTokenUiAmountToAmountInstruction";
|
|
871
2232
|
}
|
|
872
|
-
if (instruction.
|
|
2233
|
+
if (instruction.meta.type === "initializeMintCloseAuthority") {
|
|
873
2234
|
return "SplTokenInitializeMintCloseAuthorityInstruction";
|
|
874
2235
|
}
|
|
875
2236
|
}
|
|
876
|
-
if (instruction.program === "stake") {
|
|
877
|
-
if (instruction.
|
|
2237
|
+
if (instruction.meta.program === "stake") {
|
|
2238
|
+
if (instruction.meta.type === "initialize") {
|
|
878
2239
|
return "StakeInitializeInstruction";
|
|
879
2240
|
}
|
|
880
|
-
if (instruction.
|
|
2241
|
+
if (instruction.meta.type === "authorize") {
|
|
881
2242
|
return "StakeAuthorizeInstruction";
|
|
882
2243
|
}
|
|
883
|
-
if (instruction.
|
|
2244
|
+
if (instruction.meta.type === "delegate") {
|
|
884
2245
|
return "StakeDelegateStakeInstruction";
|
|
885
2246
|
}
|
|
886
|
-
if (instruction.
|
|
2247
|
+
if (instruction.meta.type === "split") {
|
|
887
2248
|
return "StakeSplitInstruction";
|
|
888
2249
|
}
|
|
889
|
-
if (instruction.
|
|
2250
|
+
if (instruction.meta.type === "withdraw") {
|
|
890
2251
|
return "StakeWithdrawInstruction";
|
|
891
2252
|
}
|
|
892
|
-
if (instruction.
|
|
2253
|
+
if (instruction.meta.type === "deactivate") {
|
|
893
2254
|
return "StakeDeactivateInstruction";
|
|
894
2255
|
}
|
|
895
|
-
if (instruction.
|
|
2256
|
+
if (instruction.meta.type === "setLockup") {
|
|
896
2257
|
return "StakeSetLockupInstruction";
|
|
897
2258
|
}
|
|
898
|
-
if (instruction.
|
|
2259
|
+
if (instruction.meta.type === "merge") {
|
|
899
2260
|
return "StakeMergeInstruction";
|
|
900
2261
|
}
|
|
901
|
-
if (instruction.
|
|
2262
|
+
if (instruction.meta.type === "authorizeWithSeed") {
|
|
902
2263
|
return "StakeAuthorizeWithSeedInstruction";
|
|
903
2264
|
}
|
|
904
|
-
if (instruction.
|
|
2265
|
+
if (instruction.meta.type === "initializeChecked") {
|
|
905
2266
|
return "StakeInitializeCheckedInstruction";
|
|
906
2267
|
}
|
|
907
|
-
if (instruction.
|
|
2268
|
+
if (instruction.meta.type === "authorizeChecked") {
|
|
908
2269
|
return "StakeAuthorizeCheckedInstruction";
|
|
909
2270
|
}
|
|
910
|
-
if (instruction.
|
|
2271
|
+
if (instruction.meta.type === "authorizeCheckedWithSeed") {
|
|
911
2272
|
return "StakeAuthorizeCheckedWithSeedInstruction";
|
|
912
2273
|
}
|
|
913
|
-
if (instruction.
|
|
2274
|
+
if (instruction.meta.type === "setLockupChecked") {
|
|
914
2275
|
return "StakeSetLockupCheckedInstruction";
|
|
915
2276
|
}
|
|
916
|
-
if (instruction.
|
|
2277
|
+
if (instruction.meta.type === "deactivateDelinquent") {
|
|
917
2278
|
return "StakeDeactivateDelinquentInstruction";
|
|
918
2279
|
}
|
|
919
|
-
if (instruction.
|
|
2280
|
+
if (instruction.meta.type === "redelegate") {
|
|
920
2281
|
return "StakeRedelegateInstruction";
|
|
921
2282
|
}
|
|
922
2283
|
}
|
|
923
|
-
if (instruction.program === "system") {
|
|
924
|
-
if (instruction.
|
|
2284
|
+
if (instruction.meta.program === "system") {
|
|
2285
|
+
if (instruction.meta.type === "createAccount") {
|
|
925
2286
|
return "CreateAccountInstruction";
|
|
926
2287
|
}
|
|
927
|
-
if (instruction.
|
|
2288
|
+
if (instruction.meta.type === "assign") {
|
|
928
2289
|
return "AssignInstruction";
|
|
929
2290
|
}
|
|
930
|
-
if (instruction.
|
|
2291
|
+
if (instruction.meta.type === "transfer") {
|
|
931
2292
|
return "TransferInstruction";
|
|
932
2293
|
}
|
|
933
|
-
if (instruction.
|
|
2294
|
+
if (instruction.meta.type === "createAccountWithSeed") {
|
|
934
2295
|
return "CreateAccountWithSeedInstruction";
|
|
935
2296
|
}
|
|
936
|
-
if (instruction.
|
|
2297
|
+
if (instruction.meta.type === "advanceNonceAccount") {
|
|
937
2298
|
return "AdvanceNonceAccountInstruction";
|
|
938
2299
|
}
|
|
939
|
-
if (instruction.
|
|
2300
|
+
if (instruction.meta.type === "withdrawNonceAccount") {
|
|
940
2301
|
return "WithdrawNonceAccountInstruction";
|
|
941
2302
|
}
|
|
942
|
-
if (instruction.
|
|
2303
|
+
if (instruction.meta.type === "initializeNonceAccount") {
|
|
943
2304
|
return "InitializeNonceAccountInstruction";
|
|
944
2305
|
}
|
|
945
|
-
if (instruction.
|
|
2306
|
+
if (instruction.meta.type === "authorizeNonceAccount") {
|
|
946
2307
|
return "AuthorizeNonceAccountInstruction";
|
|
947
2308
|
}
|
|
948
|
-
if (instruction.
|
|
2309
|
+
if (instruction.meta.type === "upgradeNonceAccount") {
|
|
949
2310
|
return "UpgradeNonceAccountInstruction";
|
|
950
2311
|
}
|
|
951
|
-
if (instruction.
|
|
2312
|
+
if (instruction.meta.type === "allocate") {
|
|
952
2313
|
return "AllocateInstruction";
|
|
953
2314
|
}
|
|
954
|
-
if (instruction.
|
|
2315
|
+
if (instruction.meta.type === "allocateWithSeed") {
|
|
955
2316
|
return "AllocateWithSeedInstruction";
|
|
956
2317
|
}
|
|
957
|
-
if (instruction.
|
|
2318
|
+
if (instruction.meta.type === "assignWithSeed") {
|
|
958
2319
|
return "AssignWithSeedInstruction";
|
|
959
2320
|
}
|
|
960
|
-
if (instruction.
|
|
2321
|
+
if (instruction.meta.type === "transferWithSeed") {
|
|
961
2322
|
return "TransferWithSeedInstruction";
|
|
962
2323
|
}
|
|
963
2324
|
}
|
|
964
|
-
if (instruction.program === "vote") {
|
|
965
|
-
if (instruction.
|
|
2325
|
+
if (instruction.meta.program === "vote") {
|
|
2326
|
+
if (instruction.meta.type === "initialize") {
|
|
966
2327
|
return "VoteInitializeAccountInstruction";
|
|
967
2328
|
}
|
|
968
|
-
if (instruction.
|
|
2329
|
+
if (instruction.meta.type === "authorize") {
|
|
969
2330
|
return "VoteAuthorizeInstruction";
|
|
970
2331
|
}
|
|
971
|
-
if (instruction.
|
|
2332
|
+
if (instruction.meta.type === "authorizeWithSeed") {
|
|
972
2333
|
return "VoteAuthorizeWithSeedInstruction";
|
|
973
2334
|
}
|
|
974
|
-
if (instruction.
|
|
2335
|
+
if (instruction.meta.type === "authorizeCheckedWithSeed") {
|
|
975
2336
|
return "VoteAuthorizeCheckedWithSeedInstruction";
|
|
976
2337
|
}
|
|
977
|
-
if (instruction.
|
|
2338
|
+
if (instruction.meta.type === "vote") {
|
|
978
2339
|
return "VoteVoteInstruction";
|
|
979
2340
|
}
|
|
980
|
-
if (instruction.
|
|
2341
|
+
if (instruction.meta.type === "updatevotestate") {
|
|
981
2342
|
return "VoteUpdateVoteStateInstruction";
|
|
982
2343
|
}
|
|
983
|
-
if (instruction.
|
|
2344
|
+
if (instruction.meta.type === "updatevotestateswitch") {
|
|
984
2345
|
return "VoteUpdateVoteStateSwitchInstruction";
|
|
985
2346
|
}
|
|
986
|
-
if (instruction.
|
|
2347
|
+
if (instruction.meta.type === "compactupdatevotestate") {
|
|
987
2348
|
return "VoteCompactUpdateVoteStateInstruction";
|
|
988
2349
|
}
|
|
989
|
-
if (instruction.
|
|
2350
|
+
if (instruction.meta.type === "compactupdatevotestateswitch") {
|
|
990
2351
|
return "VoteCompactUpdateVoteStateSwitchInstruction";
|
|
991
2352
|
}
|
|
992
|
-
if (instruction.
|
|
2353
|
+
if (instruction.meta.type === "withdraw") {
|
|
993
2354
|
return "VoteWithdrawInstruction";
|
|
994
2355
|
}
|
|
995
|
-
if (instruction.
|
|
2356
|
+
if (instruction.meta.type === "updateValidatorIdentity") {
|
|
996
2357
|
return "VoteUpdateValidatorIdentityInstruction";
|
|
997
2358
|
}
|
|
998
|
-
if (instruction.
|
|
2359
|
+
if (instruction.meta.type === "updateCommission") {
|
|
999
2360
|
return "VoteUpdateCommissionInstruction";
|
|
1000
2361
|
}
|
|
1001
|
-
if (instruction.
|
|
2362
|
+
if (instruction.meta.type === "voteSwitch") {
|
|
1002
2363
|
return "VoteVoteSwitchInstruction";
|
|
1003
2364
|
}
|
|
1004
|
-
if (instruction.
|
|
2365
|
+
if (instruction.meta.type === "authorizeChecked") {
|
|
1005
2366
|
return "VoteAuthorizeCheckedInstruction";
|
|
1006
2367
|
}
|
|
1007
2368
|
}
|
|
1008
|
-
return "PartiallyDecodedInstruction";
|
|
1009
|
-
}
|
|
1010
|
-
});
|
|
1011
|
-
return memoisedParsedTransactionInstructionInterface;
|
|
1012
|
-
};
|
|
1013
|
-
var parsedTransactionInstructionType = (name, parsedInfoFields) => new GraphQLObjectType({
|
|
1014
|
-
fields: {
|
|
1015
|
-
parsed: object(name + "Parsed", {
|
|
1016
|
-
info: object(name + "ParsedInfo", parsedInfoFields),
|
|
1017
|
-
type: string()
|
|
1018
|
-
}),
|
|
1019
|
-
program: string(),
|
|
1020
|
-
programId: string()
|
|
1021
|
-
},
|
|
1022
|
-
interfaces: [parsedTransactionInstructionInterface()],
|
|
1023
|
-
name
|
|
1024
|
-
});
|
|
1025
|
-
var memoisedPartiallyDecodedTransactionInstruction;
|
|
1026
|
-
var partiallyDecodedTransactionInstruction = () => {
|
|
1027
|
-
if (!memoisedPartiallyDecodedTransactionInstruction)
|
|
1028
|
-
memoisedPartiallyDecodedTransactionInstruction = new GraphQLObjectType({
|
|
1029
|
-
fields: {
|
|
1030
|
-
accounts: list(string()),
|
|
1031
|
-
data: string(),
|
|
1032
|
-
programId: string()
|
|
1033
|
-
},
|
|
1034
|
-
interfaces: [parsedTransactionInstructionInterface()],
|
|
1035
|
-
name: "PartiallyDecodedInstruction"
|
|
1036
|
-
});
|
|
1037
|
-
return memoisedPartiallyDecodedTransactionInstruction;
|
|
1038
|
-
};
|
|
1039
|
-
var memoisedParsedInstructionsAddressLookupTable;
|
|
1040
|
-
var parsedInstructionsAddressLookupTable = () => {
|
|
1041
|
-
if (!memoisedParsedInstructionsAddressLookupTable)
|
|
1042
|
-
memoisedParsedInstructionsAddressLookupTable = [
|
|
1043
|
-
parsedTransactionInstructionType("CreateLookupTableInstruction", {
|
|
1044
|
-
bumpSeed: number(),
|
|
1045
|
-
lookupTableAccount: string(),
|
|
1046
|
-
lookupTableAuthority: string(),
|
|
1047
|
-
payerAccount: string(),
|
|
1048
|
-
recentSlot: bigint(),
|
|
1049
|
-
systemProgram: string()
|
|
1050
|
-
}),
|
|
1051
|
-
parsedTransactionInstructionType("FreezeLookupTableInstruction", {
|
|
1052
|
-
lookupTableAccount: string(),
|
|
1053
|
-
lookupTableAuthority: string()
|
|
1054
|
-
}),
|
|
1055
|
-
parsedTransactionInstructionType("ExtendLookupTableInstruction", {
|
|
1056
|
-
lookupTableAccount: string(),
|
|
1057
|
-
lookupTableAuthority: string(),
|
|
1058
|
-
newAddresses: list(string()),
|
|
1059
|
-
payerAccount: string(),
|
|
1060
|
-
systemProgram: string()
|
|
1061
|
-
}),
|
|
1062
|
-
parsedTransactionInstructionType("DeactivateLookupTableInstruction", {
|
|
1063
|
-
lookupTableAccount: string(),
|
|
1064
|
-
lookupTableAuthority: string()
|
|
1065
|
-
}),
|
|
1066
|
-
parsedTransactionInstructionType("CloseLookupTableInstruction", {
|
|
1067
|
-
lookupTableAccount: string(),
|
|
1068
|
-
lookupTableAuthority: string(),
|
|
1069
|
-
recipient: string()
|
|
1070
|
-
})
|
|
1071
|
-
];
|
|
1072
|
-
return memoisedParsedInstructionsAddressLookupTable;
|
|
1073
|
-
};
|
|
1074
|
-
var memoisedParsedInstructionsBpfLoader;
|
|
1075
|
-
var parsedInstructionsBpfLoader = () => {
|
|
1076
|
-
if (!memoisedParsedInstructionsBpfLoader)
|
|
1077
|
-
memoisedParsedInstructionsBpfLoader = [
|
|
1078
|
-
parsedTransactionInstructionType("BpfLoaderWriteInstruction", {
|
|
1079
|
-
account: string(),
|
|
1080
|
-
bytes: string(),
|
|
1081
|
-
offset: number()
|
|
1082
|
-
}),
|
|
1083
|
-
parsedTransactionInstructionType("BpfLoaderFinalizeInstruction", {
|
|
1084
|
-
account: string()
|
|
1085
|
-
})
|
|
1086
|
-
];
|
|
1087
|
-
return memoisedParsedInstructionsBpfLoader;
|
|
1088
|
-
};
|
|
1089
|
-
var memoisedParsedInstructionsBpfUpgradeableLoader;
|
|
1090
|
-
var parsedInstructionsBpfUpgradeableLoader = () => {
|
|
1091
|
-
if (!memoisedParsedInstructionsBpfUpgradeableLoader)
|
|
1092
|
-
memoisedParsedInstructionsBpfUpgradeableLoader = [
|
|
1093
|
-
parsedTransactionInstructionType("BpfUpgradeableLoaderInitializeBufferInstruction", {
|
|
1094
|
-
account: string()
|
|
1095
|
-
}),
|
|
1096
|
-
parsedTransactionInstructionType("BpfUpgradeableLoaderWriteInstruction", {
|
|
1097
|
-
account: string(),
|
|
1098
|
-
authority: string(),
|
|
1099
|
-
bytes: string(),
|
|
1100
|
-
offset: number()
|
|
1101
|
-
}),
|
|
1102
|
-
parsedTransactionInstructionType("BpfUpgradeableLoaderDeployWithMaxDataLenInstruction", {
|
|
1103
|
-
authority: string(),
|
|
1104
|
-
bufferAccount: string(),
|
|
1105
|
-
clockSysvar: string(),
|
|
1106
|
-
maxDataLen: bigint(),
|
|
1107
|
-
payerAccount: string(),
|
|
1108
|
-
programAccount: string(),
|
|
1109
|
-
programDataAccount: string(),
|
|
1110
|
-
rentSysvar: string()
|
|
1111
|
-
}),
|
|
1112
|
-
parsedTransactionInstructionType("BpfUpgradeableLoaderUpgradeInstruction", {
|
|
1113
|
-
authority: string(),
|
|
1114
|
-
bufferAccount: string(),
|
|
1115
|
-
clockSysvar: string(),
|
|
1116
|
-
programAccount: string(),
|
|
1117
|
-
programDataAccount: string(),
|
|
1118
|
-
rentSysvar: string(),
|
|
1119
|
-
spillAccount: string()
|
|
1120
|
-
}),
|
|
1121
|
-
parsedTransactionInstructionType("BpfUpgradeableLoaderSetAuthorityInstruction", {
|
|
1122
|
-
account: string(),
|
|
1123
|
-
authority: string(),
|
|
1124
|
-
newAuthority: string()
|
|
1125
|
-
}),
|
|
1126
|
-
parsedTransactionInstructionType("BpfUpgradeableLoaderSetAuthorityCheckedInstruction", {
|
|
1127
|
-
account: string(),
|
|
1128
|
-
authority: string(),
|
|
1129
|
-
newAuthority: string()
|
|
1130
|
-
}),
|
|
1131
|
-
parsedTransactionInstructionType("BpfUpgradeableLoaderCloseInstruction", {
|
|
1132
|
-
account: string(),
|
|
1133
|
-
authority: string(),
|
|
1134
|
-
programAccount: string(),
|
|
1135
|
-
recipient: string()
|
|
1136
|
-
}),
|
|
1137
|
-
parsedTransactionInstructionType("BpfUpgradeableLoaderExtendProgramInstruction", {
|
|
1138
|
-
additionalBytes: bigint(),
|
|
1139
|
-
payerAccount: string(),
|
|
1140
|
-
programAccount: string(),
|
|
1141
|
-
programDataAccount: string(),
|
|
1142
|
-
systemProgram: string()
|
|
1143
|
-
})
|
|
1144
|
-
];
|
|
1145
|
-
return memoisedParsedInstructionsBpfUpgradeableLoader;
|
|
1146
|
-
};
|
|
1147
|
-
var memoisedParsedInstructionsSplAssociatedToken;
|
|
1148
|
-
var parsedInstructionsSplAssociatedToken = () => {
|
|
1149
|
-
if (!memoisedParsedInstructionsSplAssociatedToken)
|
|
1150
|
-
memoisedParsedInstructionsSplAssociatedToken = [
|
|
1151
|
-
parsedTransactionInstructionType("SplAssociatedTokenCreateInstruction", {
|
|
1152
|
-
account: string(),
|
|
1153
|
-
mint: string(),
|
|
1154
|
-
source: string(),
|
|
1155
|
-
systemProgram: string(),
|
|
1156
|
-
tokenProgram: string(),
|
|
1157
|
-
wallet: string()
|
|
1158
|
-
}),
|
|
1159
|
-
parsedTransactionInstructionType("SplAssociatedTokenCreateIdempotentInstruction", {
|
|
1160
|
-
account: string(),
|
|
1161
|
-
mint: string(),
|
|
1162
|
-
source: string(),
|
|
1163
|
-
systemProgram: string(),
|
|
1164
|
-
tokenProgram: string(),
|
|
1165
|
-
wallet: string()
|
|
1166
|
-
}),
|
|
1167
|
-
parsedTransactionInstructionType("SplAssociatedTokenRecoverNestedInstruction", {
|
|
1168
|
-
destination: string(),
|
|
1169
|
-
nestedMint: string(),
|
|
1170
|
-
nestedOwner: string(),
|
|
1171
|
-
nestedSource: string(),
|
|
1172
|
-
ownerMint: string(),
|
|
1173
|
-
tokenProgram: string(),
|
|
1174
|
-
wallet: string()
|
|
1175
|
-
})
|
|
1176
|
-
];
|
|
1177
|
-
return memoisedParsedInstructionsSplAssociatedToken;
|
|
1178
|
-
};
|
|
1179
|
-
var memoisedParsedInstructionSplMemo;
|
|
1180
|
-
var parsedInstructionSplMemo = () => {
|
|
1181
|
-
if (!memoisedParsedInstructionSplMemo)
|
|
1182
|
-
memoisedParsedInstructionSplMemo = new GraphQLObjectType({
|
|
1183
|
-
fields: {
|
|
1184
|
-
parsed: string(),
|
|
1185
|
-
program: string(),
|
|
1186
|
-
programId: string()
|
|
1187
|
-
},
|
|
1188
|
-
interfaces: [parsedTransactionInstructionInterface()],
|
|
1189
|
-
name: "SplMemoInstruction"
|
|
1190
|
-
});
|
|
1191
|
-
return memoisedParsedInstructionSplMemo;
|
|
1192
|
-
};
|
|
1193
|
-
var memoisedParsedInstructionsSplToken;
|
|
1194
|
-
var parsedInstructionsSplToken = () => {
|
|
1195
|
-
if (!memoisedParsedInstructionsSplToken)
|
|
1196
|
-
memoisedParsedInstructionsSplToken = [
|
|
1197
|
-
parsedTransactionInstructionType("SplTokenInitializeMintInstruction", {
|
|
1198
|
-
decimals: number(),
|
|
1199
|
-
freezeAuthority: string(),
|
|
1200
|
-
mint: string(),
|
|
1201
|
-
mintAuthority: string(),
|
|
1202
|
-
rentSysvar: string()
|
|
1203
|
-
}),
|
|
1204
|
-
parsedTransactionInstructionType("SplTokenInitializeMint2Instruction", {
|
|
1205
|
-
decimals: number(),
|
|
1206
|
-
freezeAuthority: string(),
|
|
1207
|
-
mint: string(),
|
|
1208
|
-
mintAuthority: string()
|
|
1209
|
-
}),
|
|
1210
|
-
parsedTransactionInstructionType("SplTokenInitializeAccountInstruction", {
|
|
1211
|
-
account: string(),
|
|
1212
|
-
mint: string(),
|
|
1213
|
-
owner: string(),
|
|
1214
|
-
rentSysvar: string()
|
|
1215
|
-
}),
|
|
1216
|
-
parsedTransactionInstructionType("SplTokenInitializeAccount2Instruction", {
|
|
1217
|
-
account: string(),
|
|
1218
|
-
mint: string(),
|
|
1219
|
-
owner: string(),
|
|
1220
|
-
rentSysvar: string()
|
|
1221
|
-
}),
|
|
1222
|
-
parsedTransactionInstructionType("SplTokenInitializeAccount3Instruction", {
|
|
1223
|
-
account: string(),
|
|
1224
|
-
mint: string(),
|
|
1225
|
-
owner: string()
|
|
1226
|
-
}),
|
|
1227
|
-
parsedTransactionInstructionType("SplTokenInitializeMultisigInstruction", {
|
|
1228
|
-
m: number(),
|
|
1229
|
-
multisig: string(),
|
|
1230
|
-
rentSysvar: string(),
|
|
1231
|
-
signers: list(string())
|
|
1232
|
-
}),
|
|
1233
|
-
parsedTransactionInstructionType("SplTokenInitializeMultisig2Instruction", {
|
|
1234
|
-
m: number(),
|
|
1235
|
-
multisig: string(),
|
|
1236
|
-
signers: list(string())
|
|
1237
|
-
}),
|
|
1238
|
-
parsedTransactionInstructionType("SplTokenTransferInstruction", {
|
|
1239
|
-
amount: string(),
|
|
1240
|
-
authority: string(),
|
|
1241
|
-
destination: string(),
|
|
1242
|
-
multisigAuthority: string(),
|
|
1243
|
-
source: string()
|
|
1244
|
-
}),
|
|
1245
|
-
parsedTransactionInstructionType("SplTokenApproveInstruction", {
|
|
1246
|
-
amount: string(),
|
|
1247
|
-
delegate: string(),
|
|
1248
|
-
multisigOwner: string(),
|
|
1249
|
-
owner: string(),
|
|
1250
|
-
source: string()
|
|
1251
|
-
}),
|
|
1252
|
-
parsedTransactionInstructionType("SplTokenRevokeInstruction", {
|
|
1253
|
-
multisigOwner: string(),
|
|
1254
|
-
owner: string(),
|
|
1255
|
-
source: string()
|
|
1256
|
-
}),
|
|
1257
|
-
parsedTransactionInstructionType("SplTokenSetAuthorityInstruction", {
|
|
1258
|
-
authority: string(),
|
|
1259
|
-
authorityType: string(),
|
|
1260
|
-
multisigAuthority: string(),
|
|
1261
|
-
newAuthority: string()
|
|
1262
|
-
}),
|
|
1263
|
-
parsedTransactionInstructionType("SplTokenMintToInstruction", {
|
|
1264
|
-
account: string(),
|
|
1265
|
-
amount: string(),
|
|
1266
|
-
authority: string(),
|
|
1267
|
-
mint: string(),
|
|
1268
|
-
mintAuthority: string(),
|
|
1269
|
-
multisigMintAuthority: string()
|
|
1270
|
-
}),
|
|
1271
|
-
parsedTransactionInstructionType("SplTokenBurnInstruction", {
|
|
1272
|
-
account: string(),
|
|
1273
|
-
amount: string(),
|
|
1274
|
-
authority: string(),
|
|
1275
|
-
mint: string(),
|
|
1276
|
-
multisigAuthority: string()
|
|
1277
|
-
}),
|
|
1278
|
-
parsedTransactionInstructionType("SplTokenCloseAccountInstruction", {
|
|
1279
|
-
account: string(),
|
|
1280
|
-
destination: string(),
|
|
1281
|
-
multisigOwner: string(),
|
|
1282
|
-
owner: string()
|
|
1283
|
-
}),
|
|
1284
|
-
parsedTransactionInstructionType("SplTokenFreezeAccountInstruction", {
|
|
1285
|
-
account: string(),
|
|
1286
|
-
freezeAuthority: string(),
|
|
1287
|
-
mint: string(),
|
|
1288
|
-
multisigFreezeAuthority: string()
|
|
1289
|
-
}),
|
|
1290
|
-
parsedTransactionInstructionType("SplTokenThawAccountInstruction", {
|
|
1291
|
-
account: string(),
|
|
1292
|
-
freezeAuthority: string(),
|
|
1293
|
-
mint: string(),
|
|
1294
|
-
multisigFreezeAuthority: string()
|
|
1295
|
-
}),
|
|
1296
|
-
parsedTransactionInstructionType("SplTokenTransferCheckedInstruction", {
|
|
1297
|
-
authority: string(),
|
|
1298
|
-
destination: string(),
|
|
1299
|
-
mint: string(),
|
|
1300
|
-
multisigAuthority: string(),
|
|
1301
|
-
source: string(),
|
|
1302
|
-
tokenAmount: string()
|
|
1303
|
-
}),
|
|
1304
|
-
parsedTransactionInstructionType("SplTokenApproveCheckedInstruction", {
|
|
1305
|
-
delegate: string(),
|
|
1306
|
-
mint: string(),
|
|
1307
|
-
multisigOwner: string(),
|
|
1308
|
-
owner: string(),
|
|
1309
|
-
source: string(),
|
|
1310
|
-
tokenAmount: string()
|
|
1311
|
-
}),
|
|
1312
|
-
parsedTransactionInstructionType("SplTokenMintToCheckedInstruction", {
|
|
1313
|
-
account: string(),
|
|
1314
|
-
authority: string(),
|
|
1315
|
-
mint: string(),
|
|
1316
|
-
mintAuthority: string(),
|
|
1317
|
-
multisigMintAuthority: string(),
|
|
1318
|
-
tokenAmount: string()
|
|
1319
|
-
}),
|
|
1320
|
-
parsedTransactionInstructionType("SplTokenBurnCheckedInstruction", {
|
|
1321
|
-
account: string(),
|
|
1322
|
-
authority: string(),
|
|
1323
|
-
mint: string(),
|
|
1324
|
-
multisigAuthority: string(),
|
|
1325
|
-
tokenAmount: string()
|
|
1326
|
-
}),
|
|
1327
|
-
parsedTransactionInstructionType("SplTokenSyncNativeInstruction", {
|
|
1328
|
-
account: string()
|
|
1329
|
-
}),
|
|
1330
|
-
parsedTransactionInstructionType("SplTokenGetAccountDataSizeInstruction", {
|
|
1331
|
-
extensionTypes: list(string()),
|
|
1332
|
-
mint: string()
|
|
1333
|
-
}),
|
|
1334
|
-
parsedTransactionInstructionType("SplTokenInitializeImmutableOwnerInstruction", {
|
|
1335
|
-
account: string()
|
|
1336
|
-
}),
|
|
1337
|
-
parsedTransactionInstructionType("SplTokenAmountToUiAmountInstruction", {
|
|
1338
|
-
amount: string(),
|
|
1339
|
-
mint: string()
|
|
1340
|
-
}),
|
|
1341
|
-
parsedTransactionInstructionType("SplTokenUiAmountToAmountInstruction", {
|
|
1342
|
-
mint: string(),
|
|
1343
|
-
uiAmount: string()
|
|
1344
|
-
}),
|
|
1345
|
-
parsedTransactionInstructionType("SplTokenInitializeMintCloseAuthorityInstruction", {
|
|
1346
|
-
mint: string(),
|
|
1347
|
-
newAuthority: string()
|
|
1348
|
-
})
|
|
1349
|
-
// TODO: Extensions!
|
|
1350
|
-
// - TransferFeeExtension
|
|
1351
|
-
// - ConfidentialTransferFeeExtension
|
|
1352
|
-
// - DefaultAccountStateExtension
|
|
1353
|
-
// - Reallocate
|
|
1354
|
-
// - MemoTransferExtension
|
|
1355
|
-
// - CreateNativeMint
|
|
1356
|
-
// - InitializeNonTransferableMint
|
|
1357
|
-
// - InterestBearingMintExtension
|
|
1358
|
-
// - CpiGuardExtension
|
|
1359
|
-
// - InitializePermanentDelegate
|
|
1360
|
-
// - TransferHookExtension
|
|
1361
|
-
// - ConfidentialTransferFeeExtension
|
|
1362
|
-
// - WithdrawExcessLamports
|
|
1363
|
-
// - MetadataPointerExtension
|
|
1364
|
-
];
|
|
1365
|
-
return memoisedParsedInstructionsSplToken;
|
|
1366
|
-
};
|
|
1367
|
-
var memoisedLockup;
|
|
1368
|
-
var lockup = () => {
|
|
1369
|
-
if (!memoisedLockup)
|
|
1370
|
-
memoisedLockup = new GraphQLObjectType({
|
|
1371
|
-
fields: {
|
|
1372
|
-
custodian: string(),
|
|
1373
|
-
epoch: bigint(),
|
|
1374
|
-
unixTimestamp: bigint()
|
|
1375
|
-
},
|
|
1376
|
-
name: "Lockup"
|
|
1377
|
-
});
|
|
1378
|
-
return memoisedLockup;
|
|
1379
|
-
};
|
|
1380
|
-
var memoisedParsedInstructionsStake;
|
|
1381
|
-
var parsedInstructionsStake = () => {
|
|
1382
|
-
if (!memoisedParsedInstructionsStake)
|
|
1383
|
-
memoisedParsedInstructionsStake = [
|
|
1384
|
-
parsedTransactionInstructionType("StakeInitializeInstruction", {
|
|
1385
|
-
authorized: object("StakeInitializeInstructionAuthorized", {
|
|
1386
|
-
staker: string(),
|
|
1387
|
-
withdrawer: string()
|
|
1388
|
-
}),
|
|
1389
|
-
lockup: object("StakeInitializeInstructionLockup", {
|
|
1390
|
-
custodian: string(),
|
|
1391
|
-
epoch: bigint(),
|
|
1392
|
-
unixTimestamp: bigint()
|
|
1393
|
-
}),
|
|
1394
|
-
rentSysvar: string(),
|
|
1395
|
-
stakeAccount: string()
|
|
1396
|
-
}),
|
|
1397
|
-
parsedTransactionInstructionType("StakeAuthorizeInstruction", {
|
|
1398
|
-
authority: string(),
|
|
1399
|
-
authorityType: string(),
|
|
1400
|
-
clockSysvar: string(),
|
|
1401
|
-
custodian: string(),
|
|
1402
|
-
newAuthority: string(),
|
|
1403
|
-
stakeAccount: string()
|
|
1404
|
-
}),
|
|
1405
|
-
parsedTransactionInstructionType("StakeDelegateStakeInstruction", {
|
|
1406
|
-
clockSysvar: string(),
|
|
1407
|
-
stakeAccount: string(),
|
|
1408
|
-
stakeAuthority: string(),
|
|
1409
|
-
stakeConfigAccount: string(),
|
|
1410
|
-
stakeHistorySysvar: string(),
|
|
1411
|
-
voteAccount: string()
|
|
1412
|
-
}),
|
|
1413
|
-
parsedTransactionInstructionType("StakeSplitInstruction", {
|
|
1414
|
-
lamports: bigint(),
|
|
1415
|
-
newSplitAccount: string(),
|
|
1416
|
-
stakeAccount: string(),
|
|
1417
|
-
stakeAuthority: string()
|
|
1418
|
-
}),
|
|
1419
|
-
parsedTransactionInstructionType("StakeWithdrawInstruction", {
|
|
1420
|
-
clockSysvar: string(),
|
|
1421
|
-
destination: string(),
|
|
1422
|
-
lamports: bigint(),
|
|
1423
|
-
stakeAccount: string(),
|
|
1424
|
-
withdrawAuthority: string()
|
|
1425
|
-
}),
|
|
1426
|
-
parsedTransactionInstructionType("StakeDeactivateInstruction", {
|
|
1427
|
-
clockSysvar: string(),
|
|
1428
|
-
stakeAccount: string(),
|
|
1429
|
-
stakeAuthority: string()
|
|
1430
|
-
}),
|
|
1431
|
-
parsedTransactionInstructionType("StakeSetLockupInstruction", {
|
|
1432
|
-
custodian: string(),
|
|
1433
|
-
lockup: type(lockup()),
|
|
1434
|
-
stakeAccount: string()
|
|
1435
|
-
}),
|
|
1436
|
-
parsedTransactionInstructionType("StakeMergeInstruction", {
|
|
1437
|
-
clockSysvar: string(),
|
|
1438
|
-
destination: string(),
|
|
1439
|
-
source: string(),
|
|
1440
|
-
stakeAuthority: string(),
|
|
1441
|
-
stakeHistorySysvar: string()
|
|
1442
|
-
}),
|
|
1443
|
-
parsedTransactionInstructionType("StakeAuthorizeWithSeedInstruction", {
|
|
1444
|
-
authorityBase: string(),
|
|
1445
|
-
authorityOwner: string(),
|
|
1446
|
-
authoritySeed: string(),
|
|
1447
|
-
authorityType: string(),
|
|
1448
|
-
clockSysvar: string(),
|
|
1449
|
-
custodian: string(),
|
|
1450
|
-
newAuthorized: string(),
|
|
1451
|
-
stakeAccount: string()
|
|
1452
|
-
}),
|
|
1453
|
-
parsedTransactionInstructionType("StakeInitializeCheckedInstruction", {
|
|
1454
|
-
rentSysvar: string(),
|
|
1455
|
-
stakeAccount: string(),
|
|
1456
|
-
staker: string(),
|
|
1457
|
-
withdrawer: string()
|
|
1458
|
-
}),
|
|
1459
|
-
parsedTransactionInstructionType("StakeAuthorizeCheckedInstruction", {
|
|
1460
|
-
authority: string(),
|
|
1461
|
-
authorityType: string(),
|
|
1462
|
-
clockSysvar: string(),
|
|
1463
|
-
custodian: string(),
|
|
1464
|
-
newAuthority: string(),
|
|
1465
|
-
stakeAccount: string()
|
|
1466
|
-
}),
|
|
1467
|
-
parsedTransactionInstructionType("StakeAuthorizeCheckedWithSeedInstruction", {
|
|
1468
|
-
authorityBase: string(),
|
|
1469
|
-
authorityOwner: string(),
|
|
1470
|
-
authoritySeed: string(),
|
|
1471
|
-
authorityType: string(),
|
|
1472
|
-
clockSysvar: string(),
|
|
1473
|
-
custodian: string(),
|
|
1474
|
-
newAuthorized: string(),
|
|
1475
|
-
stakeAccount: string()
|
|
1476
|
-
}),
|
|
1477
|
-
parsedTransactionInstructionType("StakeSetLockupCheckedInstruction", {
|
|
1478
|
-
custodian: string(),
|
|
1479
|
-
lockup: type(lockup()),
|
|
1480
|
-
stakeAccount: string()
|
|
1481
|
-
}),
|
|
1482
|
-
parsedTransactionInstructionType("StakeDeactivateDelinquentInstruction", {
|
|
1483
|
-
referenceVoteAccount: string(),
|
|
1484
|
-
stakeAccount: string(),
|
|
1485
|
-
voteAccount: string()
|
|
1486
|
-
}),
|
|
1487
|
-
parsedTransactionInstructionType("StakeRedelegateInstruction", {
|
|
1488
|
-
newStakeAccount: string(),
|
|
1489
|
-
stakeAccount: string(),
|
|
1490
|
-
stakeAuthority: string(),
|
|
1491
|
-
stakeConfigAccount: string(),
|
|
1492
|
-
voteAccount: string()
|
|
1493
|
-
})
|
|
1494
|
-
];
|
|
1495
|
-
return memoisedParsedInstructionsStake;
|
|
1496
|
-
};
|
|
1497
|
-
var memoisedParsedInstructionsSystem;
|
|
1498
|
-
var parsedInstructionsSystem = () => {
|
|
1499
|
-
if (!memoisedParsedInstructionsSystem)
|
|
1500
|
-
memoisedParsedInstructionsSystem = [
|
|
1501
|
-
parsedTransactionInstructionType("CreateAccountInstruction", {
|
|
1502
|
-
lamports: bigint(),
|
|
1503
|
-
newAccount: string(),
|
|
1504
|
-
owner: string(),
|
|
1505
|
-
source: string(),
|
|
1506
|
-
space: bigint()
|
|
1507
|
-
}),
|
|
1508
|
-
parsedTransactionInstructionType("AssignInstruction", {
|
|
1509
|
-
owner: string()
|
|
1510
|
-
}),
|
|
1511
|
-
parsedTransactionInstructionType("TransferInstruction", {
|
|
1512
|
-
amount: string(),
|
|
1513
|
-
lamports: number(),
|
|
1514
|
-
source: string()
|
|
1515
|
-
}),
|
|
1516
|
-
parsedTransactionInstructionType("CreateAccountWithSeedInstruction", {
|
|
1517
|
-
base: string(),
|
|
1518
|
-
lamports: bigint(),
|
|
1519
|
-
owner: string(),
|
|
1520
|
-
seed: string(),
|
|
1521
|
-
space: bigint()
|
|
1522
|
-
}),
|
|
1523
|
-
parsedTransactionInstructionType("AdvanceNonceAccountInstruction", {
|
|
1524
|
-
nonceAccount: string(),
|
|
1525
|
-
nonceAuthority: string(),
|
|
1526
|
-
recentBlockhashesSysvar: string()
|
|
1527
|
-
}),
|
|
1528
|
-
parsedTransactionInstructionType("WithdrawNonceAccountInstruction", {
|
|
1529
|
-
destination: string(),
|
|
1530
|
-
lamports: bigint(),
|
|
1531
|
-
nonceAccount: string(),
|
|
1532
|
-
nonceAuthority: string(),
|
|
1533
|
-
recentBlockhashesSysvar: string(),
|
|
1534
|
-
rentSysvar: string()
|
|
1535
|
-
}),
|
|
1536
|
-
parsedTransactionInstructionType("InitializeNonceAccountInstruction", {
|
|
1537
|
-
nonceAccount: string(),
|
|
1538
|
-
nonceAuthority: string(),
|
|
1539
|
-
recentBlockhashesSysvar: string(),
|
|
1540
|
-
rentSysvar: string()
|
|
1541
|
-
}),
|
|
1542
|
-
parsedTransactionInstructionType("AuthorizeNonceAccountInstruction", {
|
|
1543
|
-
newAuthorized: string(),
|
|
1544
|
-
nonceAccount: string(),
|
|
1545
|
-
nonceAuthority: string()
|
|
1546
|
-
}),
|
|
1547
|
-
parsedTransactionInstructionType("UpgradeNonceAccountInstruction", {
|
|
1548
|
-
nonceAccount: string()
|
|
1549
|
-
}),
|
|
1550
|
-
parsedTransactionInstructionType("AllocateInstruction", {
|
|
1551
|
-
account: string(),
|
|
1552
|
-
space: bigint()
|
|
1553
|
-
}),
|
|
1554
|
-
parsedTransactionInstructionType("AllocateWithSeedInstruction", {
|
|
1555
|
-
account: string(),
|
|
1556
|
-
base: string(),
|
|
1557
|
-
owner: string(),
|
|
1558
|
-
seed: string(),
|
|
1559
|
-
space: bigint()
|
|
1560
|
-
}),
|
|
1561
|
-
parsedTransactionInstructionType("AssignWithSeedInstruction", {
|
|
1562
|
-
account: string(),
|
|
1563
|
-
base: string(),
|
|
1564
|
-
owner: string(),
|
|
1565
|
-
seed: string()
|
|
1566
|
-
}),
|
|
1567
|
-
parsedTransactionInstructionType("TransferWithSeedInstruction", {
|
|
1568
|
-
destination: string(),
|
|
1569
|
-
lamports: bigint(),
|
|
1570
|
-
source: string(),
|
|
1571
|
-
sourceBase: string(),
|
|
1572
|
-
sourceOwner: string(),
|
|
1573
|
-
sourceSeed: string()
|
|
1574
|
-
})
|
|
1575
|
-
];
|
|
1576
|
-
return memoisedParsedInstructionsSystem;
|
|
1577
|
-
};
|
|
1578
|
-
var memoisedVote;
|
|
1579
|
-
var vote = () => {
|
|
1580
|
-
if (!memoisedVote)
|
|
1581
|
-
memoisedVote = new GraphQLObjectType({
|
|
1582
|
-
fields: {
|
|
1583
|
-
hash: string(),
|
|
1584
|
-
slots: list(bigint()),
|
|
1585
|
-
timestamp: bigint()
|
|
1586
|
-
},
|
|
1587
|
-
name: "Vote"
|
|
1588
|
-
});
|
|
1589
|
-
return memoisedVote;
|
|
1590
|
-
};
|
|
1591
|
-
var memoisedVoteStateUpdate;
|
|
1592
|
-
var voteStateUpdate = () => {
|
|
1593
|
-
if (!memoisedVoteStateUpdate)
|
|
1594
|
-
memoisedVoteStateUpdate = new GraphQLObjectType({
|
|
1595
|
-
fields: {
|
|
1596
|
-
hash: string(),
|
|
1597
|
-
lockouts: list(
|
|
1598
|
-
object("VoteStateUpdateLockout", {
|
|
1599
|
-
confirmationCount: number(),
|
|
1600
|
-
slot: bigint()
|
|
1601
|
-
})
|
|
1602
|
-
),
|
|
1603
|
-
root: bigint(),
|
|
1604
|
-
timestamp: bigint()
|
|
1605
|
-
},
|
|
1606
|
-
name: "VoteStateUpdate"
|
|
1607
|
-
});
|
|
1608
|
-
return memoisedVoteStateUpdate;
|
|
1609
|
-
};
|
|
1610
|
-
var memoisedParsedInstructionsVote;
|
|
1611
|
-
var parsedInstructionsVote = () => {
|
|
1612
|
-
if (!memoisedParsedInstructionsVote)
|
|
1613
|
-
memoisedParsedInstructionsVote = [
|
|
1614
|
-
parsedTransactionInstructionType("VoteInitializeAccountInstruction", {
|
|
1615
|
-
authorizedVoter: string(),
|
|
1616
|
-
authorizedWithdrawer: string(),
|
|
1617
|
-
clockSysvar: string(),
|
|
1618
|
-
commission: number(),
|
|
1619
|
-
node: string(),
|
|
1620
|
-
rentSysvar: string(),
|
|
1621
|
-
voteAccount: string()
|
|
1622
|
-
}),
|
|
1623
|
-
parsedTransactionInstructionType("VoteAuthorizeInstruction", {
|
|
1624
|
-
authority: string(),
|
|
1625
|
-
authorityType: string(),
|
|
1626
|
-
clockSysvar: string(),
|
|
1627
|
-
newAuthority: string(),
|
|
1628
|
-
voteAccount: string()
|
|
1629
|
-
}),
|
|
1630
|
-
parsedTransactionInstructionType("VoteAuthorizeWithSeedInstruction", {
|
|
1631
|
-
authorityBaseKey: string(),
|
|
1632
|
-
authorityOwner: string(),
|
|
1633
|
-
authoritySeed: string(),
|
|
1634
|
-
authorityType: string(),
|
|
1635
|
-
clockSysvar: string(),
|
|
1636
|
-
newAuthority: string(),
|
|
1637
|
-
voteAccount: string()
|
|
1638
|
-
}),
|
|
1639
|
-
parsedTransactionInstructionType("VoteAuthorizeCheckedWithSeedInstruction", {
|
|
1640
|
-
authorityBaseKey: string(),
|
|
1641
|
-
authorityOwner: string(),
|
|
1642
|
-
authoritySeed: string(),
|
|
1643
|
-
authorityType: string(),
|
|
1644
|
-
clockSysvar: string(),
|
|
1645
|
-
newAuthority: string(),
|
|
1646
|
-
voteAccount: string()
|
|
1647
|
-
}),
|
|
1648
|
-
parsedTransactionInstructionType("VoteVoteInstruction", {
|
|
1649
|
-
clockSysvar: string(),
|
|
1650
|
-
slotHashedSysvar: string(),
|
|
1651
|
-
vote: type(vote()),
|
|
1652
|
-
voteAccount: string(),
|
|
1653
|
-
voteAuthority: string()
|
|
1654
|
-
}),
|
|
1655
|
-
parsedTransactionInstructionType("VoteUpdateVoteStateInstruction", {
|
|
1656
|
-
hash: string(),
|
|
1657
|
-
voteAccount: string(),
|
|
1658
|
-
voteAuthority: string(),
|
|
1659
|
-
voteStateUpdate: type(voteStateUpdate())
|
|
1660
|
-
}),
|
|
1661
|
-
parsedTransactionInstructionType("VoteUpdateVoteStateSwitchInstruction", {
|
|
1662
|
-
hash: string(),
|
|
1663
|
-
voteAccount: string(),
|
|
1664
|
-
voteAuthority: string(),
|
|
1665
|
-
voteStateUpdate: type(voteStateUpdate())
|
|
1666
|
-
}),
|
|
1667
|
-
parsedTransactionInstructionType("VoteCompactUpdateVoteStateInstruction", {
|
|
1668
|
-
hash: string(),
|
|
1669
|
-
voteAccount: string(),
|
|
1670
|
-
voteAuthority: string(),
|
|
1671
|
-
voteStateUpdate: type(voteStateUpdate())
|
|
1672
|
-
}),
|
|
1673
|
-
parsedTransactionInstructionType("VoteCompactUpdateVoteStateSwitchInstruction", {
|
|
1674
|
-
hash: string(),
|
|
1675
|
-
voteAccount: string(),
|
|
1676
|
-
voteAuthority: string(),
|
|
1677
|
-
voteStateUpdate: type(voteStateUpdate())
|
|
1678
|
-
}),
|
|
1679
|
-
parsedTransactionInstructionType("VoteWithdrawInstruction", {
|
|
1680
|
-
destination: string(),
|
|
1681
|
-
lamports: bigint(),
|
|
1682
|
-
voteAccount: string(),
|
|
1683
|
-
withdrawAuthority: string()
|
|
1684
|
-
}),
|
|
1685
|
-
parsedTransactionInstructionType("VoteUpdateValidatorIdentityInstruction", {
|
|
1686
|
-
newValidatorIdentity: string(),
|
|
1687
|
-
voteAccount: string(),
|
|
1688
|
-
withdrawAuthority: string()
|
|
1689
|
-
}),
|
|
1690
|
-
parsedTransactionInstructionType("VoteUpdateCommissionInstruction", {
|
|
1691
|
-
commission: string(),
|
|
1692
|
-
voteAccount: string(),
|
|
1693
|
-
withdrawAuthority: string()
|
|
1694
|
-
}),
|
|
1695
|
-
parsedTransactionInstructionType("VoteVoteSwitchInstruction", {
|
|
1696
|
-
clockSysvar: string(),
|
|
1697
|
-
hash: string(),
|
|
1698
|
-
slotHashesSysvar: string(),
|
|
1699
|
-
vote: type(vote()),
|
|
1700
|
-
voteAccount: string(),
|
|
1701
|
-
voteAuthority: string()
|
|
1702
|
-
}),
|
|
1703
|
-
parsedTransactionInstructionType("VoteAuthorizeCheckedInstruction", {
|
|
1704
|
-
authority: string(),
|
|
1705
|
-
authorityType: string(),
|
|
1706
|
-
clockSysvar: string(),
|
|
1707
|
-
newAuthority: string(),
|
|
1708
|
-
voteAccount: string()
|
|
1709
|
-
})
|
|
1710
|
-
];
|
|
1711
|
-
return memoisedParsedInstructionsVote;
|
|
1712
|
-
};
|
|
1713
|
-
var memoisedTransactionMetaInterfaceFields;
|
|
1714
|
-
var transactionMetaInterfaceFields = () => {
|
|
1715
|
-
if (!memoisedTransactionMetaInterfaceFields)
|
|
1716
|
-
memoisedTransactionMetaInterfaceFields = {
|
|
1717
|
-
computeUnitsConsumed: bigint(),
|
|
1718
|
-
err: string(),
|
|
1719
|
-
fee: bigint(),
|
|
1720
|
-
format: string(),
|
|
1721
|
-
loadedAddresses: type(transactionMetaLoadedAddresses()),
|
|
1722
|
-
logMessages: list(string()),
|
|
1723
|
-
postBalances: list(bigint()),
|
|
1724
|
-
postTokenBalances: list(type(tokenBalance())),
|
|
1725
|
-
preBalances: list(bigint()),
|
|
1726
|
-
preTokenBalances: list(type(tokenBalance())),
|
|
1727
|
-
returnData: type(returnData()),
|
|
1728
|
-
rewards: list(type(reward())),
|
|
1729
|
-
status: type(transactionStatus())
|
|
1730
|
-
};
|
|
1731
|
-
return memoisedTransactionMetaInterfaceFields;
|
|
1732
|
-
};
|
|
1733
|
-
var memoisedTransactionMetaInterface;
|
|
1734
|
-
var transactionMetaInterface = () => {
|
|
1735
|
-
if (!memoisedTransactionMetaInterface)
|
|
1736
|
-
memoisedTransactionMetaInterface = new GraphQLInterfaceType({
|
|
1737
|
-
fields: {
|
|
1738
|
-
...transactionMetaInterfaceFields()
|
|
1739
|
-
},
|
|
1740
|
-
name: "TransactionMeta",
|
|
1741
|
-
resolveType(meta) {
|
|
1742
|
-
if (meta.format === "parsed") {
|
|
1743
|
-
return "TransactionMetaParsed";
|
|
1744
|
-
}
|
|
1745
|
-
return "TransactionMetaUnparsed";
|
|
1746
|
-
}
|
|
1747
|
-
});
|
|
1748
|
-
return memoisedTransactionMetaInterface;
|
|
1749
|
-
};
|
|
1750
|
-
var transactionMetaType = (name, description, innerInstructions) => new GraphQLObjectType({
|
|
1751
|
-
description,
|
|
1752
|
-
fields: {
|
|
1753
|
-
...transactionMetaInterfaceFields(),
|
|
1754
|
-
innerInstructions
|
|
1755
|
-
},
|
|
1756
|
-
interfaces: [transactionMetaInterface()],
|
|
1757
|
-
name
|
|
1758
|
-
});
|
|
1759
|
-
var memoisedTransactionMetaUnparsed;
|
|
1760
|
-
var transactionMetaUnparsed = () => {
|
|
1761
|
-
if (!memoisedTransactionMetaUnparsed)
|
|
1762
|
-
memoisedTransactionMetaUnparsed = transactionMetaType(
|
|
1763
|
-
"TransactionMetaUnparsed",
|
|
1764
|
-
"Non-parsed transaction meta",
|
|
1765
|
-
list(
|
|
1766
|
-
object("TransactionMetaInnerInstructionsUnparsed", {
|
|
1767
|
-
index: number(),
|
|
1768
|
-
instructions: list(
|
|
1769
|
-
object("TransactionMetaInnerInstructionsUnparsedInstruction", {
|
|
1770
|
-
index: number(),
|
|
1771
|
-
instructions: list(type(transactionInstruction()))
|
|
1772
|
-
})
|
|
1773
|
-
)
|
|
1774
|
-
})
|
|
1775
|
-
)
|
|
1776
|
-
);
|
|
1777
|
-
return memoisedTransactionMetaUnparsed;
|
|
1778
|
-
};
|
|
1779
|
-
var memoisedTransactionMetaParsed;
|
|
1780
|
-
var transactionMetaParsed = () => {
|
|
1781
|
-
if (!memoisedTransactionMetaParsed)
|
|
1782
|
-
memoisedTransactionMetaParsed = transactionMetaType(
|
|
1783
|
-
"TransactionMetaParsed",
|
|
1784
|
-
"Parsed transaction meta",
|
|
1785
|
-
list(
|
|
1786
|
-
object("TransactionMetaInnerInstructionsParsed", {
|
|
1787
|
-
index: number(),
|
|
1788
|
-
instructions: list(type(parsedTransactionInstructionInterface()))
|
|
1789
|
-
})
|
|
1790
|
-
)
|
|
1791
|
-
);
|
|
1792
|
-
return memoisedTransactionMetaParsed;
|
|
1793
|
-
};
|
|
1794
|
-
var memoisedTransactionMessageInterfaceFields;
|
|
1795
|
-
var transactionMessageInterfaceFields = () => {
|
|
1796
|
-
if (!memoisedTransactionMessageInterfaceFields)
|
|
1797
|
-
memoisedTransactionMessageInterfaceFields = {
|
|
1798
|
-
addressTableLookups: list(type(addressTableLookup())),
|
|
1799
|
-
format: string(),
|
|
1800
|
-
header: object("TransactionJsonTransactionHeader", {
|
|
1801
|
-
numReadonlySignedAccounts: number(),
|
|
1802
|
-
numReadonlyUnsignedAccounts: number(),
|
|
1803
|
-
numRequiredSignatures: number()
|
|
1804
|
-
}),
|
|
1805
|
-
recentBlockhash: string()
|
|
1806
|
-
};
|
|
1807
|
-
return memoisedTransactionMessageInterfaceFields;
|
|
1808
|
-
};
|
|
1809
|
-
var memoisedTransactionMessageInterface;
|
|
1810
|
-
var transactionMessageInterface = () => {
|
|
1811
|
-
if (!memoisedTransactionMessageInterface)
|
|
1812
|
-
memoisedTransactionMessageInterface = new GraphQLInterfaceType({
|
|
1813
|
-
fields: {
|
|
1814
|
-
...transactionMessageInterfaceFields()
|
|
1815
|
-
},
|
|
1816
|
-
name: "TransactionMessage",
|
|
1817
|
-
resolveType(message) {
|
|
1818
|
-
if (message.format === "parsed") {
|
|
1819
|
-
return "TransactionMessageParsed";
|
|
1820
|
-
}
|
|
1821
|
-
return "TransactionMessageUnparsed";
|
|
1822
2369
|
}
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
)
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
)
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
}
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
2370
|
+
return "GenericInstruction";
|
|
2371
|
+
}
|
|
2372
|
+
},
|
|
2373
|
+
CreateLookupTableInstructionData: {
|
|
2374
|
+
lookupTableAccount: resolveAccount("lookupTableAccount"),
|
|
2375
|
+
lookupTableAuthority: resolveAccount("lookupTableAuthority"),
|
|
2376
|
+
payerAccount: resolveAccount("payerAccount"),
|
|
2377
|
+
systemProgram: resolveAccount("systemProgram")
|
|
2378
|
+
},
|
|
2379
|
+
ExtendLookupTableInstructionData: {
|
|
2380
|
+
lookupTableAccount: resolveAccount("lookupTableAccount"),
|
|
2381
|
+
lookupTableAuthority: resolveAccount("lookupTableAuthority"),
|
|
2382
|
+
payerAccount: resolveAccount("payerAccount"),
|
|
2383
|
+
systemProgram: resolveAccount("systemProgram")
|
|
2384
|
+
},
|
|
2385
|
+
FreezeLookupTableInstructionData: {
|
|
2386
|
+
lookupTableAccount: resolveAccount("lookupTableAccount"),
|
|
2387
|
+
lookupTableAuthority: resolveAccount("lookupTableAuthority")
|
|
2388
|
+
},
|
|
2389
|
+
DeactivateLookupTableInstructionData: {
|
|
2390
|
+
lookupTableAccount: resolveAccount("lookupTableAccount"),
|
|
2391
|
+
lookupTableAuthority: resolveAccount("lookupTableAuthority")
|
|
2392
|
+
},
|
|
2393
|
+
CloseLookupTableInstructionData: {
|
|
2394
|
+
lookupTableAccount: resolveAccount("lookupTableAccount"),
|
|
2395
|
+
lookupTableAuthority: resolveAccount("lookupTableAuthority"),
|
|
2396
|
+
recipient: resolveAccount("recipient")
|
|
2397
|
+
},
|
|
2398
|
+
BpfLoaderWriteInstructionData: {
|
|
2399
|
+
account: resolveAccount("account")
|
|
2400
|
+
},
|
|
2401
|
+
BpfLoaderFinalizeInstructionData: {
|
|
2402
|
+
account: resolveAccount("account")
|
|
2403
|
+
},
|
|
2404
|
+
BpfUpgradeableLoaderInitializeBufferInstructionData: {
|
|
2405
|
+
account: resolveAccount("account")
|
|
2406
|
+
},
|
|
2407
|
+
BpfUpgradeableLoaderWriteInstructionData: {
|
|
2408
|
+
account: resolveAccount("account"),
|
|
2409
|
+
authority: resolveAccount("authority")
|
|
2410
|
+
},
|
|
2411
|
+
BpfUpgradeableLoaderDeployWithMaxDataLenInstructionData: {
|
|
2412
|
+
authority: resolveAccount("authority"),
|
|
2413
|
+
bufferAccount: resolveAccount("bufferAccount"),
|
|
2414
|
+
payerAccount: resolveAccount("payerAccount"),
|
|
2415
|
+
programAccount: resolveAccount("programAccount"),
|
|
2416
|
+
programDataAccount: resolveAccount("programDataAccount")
|
|
2417
|
+
},
|
|
2418
|
+
BpfUpgradeableLoaderUpgradeInstructionData: {
|
|
2419
|
+
authority: resolveAccount("authority"),
|
|
2420
|
+
bufferAccount: resolveAccount("bufferAccount"),
|
|
2421
|
+
programAccount: resolveAccount("programAccount"),
|
|
2422
|
+
programDataAccount: resolveAccount("programDataAccount")
|
|
2423
|
+
},
|
|
2424
|
+
BpfUpgradeableLoaderSetAuthorityInstructionData: {
|
|
2425
|
+
account: resolveAccount("account"),
|
|
2426
|
+
authority: resolveAccount("authority"),
|
|
2427
|
+
newAuthority: resolveAccount("newAuthority")
|
|
2428
|
+
},
|
|
2429
|
+
BpfUpgradeableLoaderSetAuthorityCheckedInstructionData: {
|
|
2430
|
+
account: resolveAccount("account"),
|
|
2431
|
+
authority: resolveAccount("authority"),
|
|
2432
|
+
newAuthority: resolveAccount("newAuthority")
|
|
2433
|
+
},
|
|
2434
|
+
BpfUpgradeableLoaderCloseInstructionData: {
|
|
2435
|
+
account: resolveAccount("account"),
|
|
2436
|
+
authority: resolveAccount("authority"),
|
|
2437
|
+
programAccount: resolveAccount("programAccount"),
|
|
2438
|
+
recipient: resolveAccount("recipient")
|
|
2439
|
+
},
|
|
2440
|
+
BpfUpgradeableLoaderExtendProgramInstructionData: {
|
|
2441
|
+
payerAccount: resolveAccount("payerAccount"),
|
|
2442
|
+
programAccount: resolveAccount("programAccount"),
|
|
2443
|
+
programDataAccount: resolveAccount("programDataAccount"),
|
|
2444
|
+
systemProgram: resolveAccount("systemProgram")
|
|
2445
|
+
},
|
|
2446
|
+
SplAssociatedTokenCreateInstructionData: {
|
|
2447
|
+
account: resolveAccount("account"),
|
|
2448
|
+
mint: resolveAccount("mint"),
|
|
2449
|
+
source: resolveAccount("source"),
|
|
2450
|
+
systemProgram: resolveAccount("systemProgram"),
|
|
2451
|
+
tokenProgram: resolveAccount("tokenProgram"),
|
|
2452
|
+
wallet: resolveAccount("wallet")
|
|
2453
|
+
},
|
|
2454
|
+
SplAssociatedTokenCreateIdempotentInstructionData: {
|
|
2455
|
+
account: resolveAccount("account"),
|
|
2456
|
+
mint: resolveAccount("mint"),
|
|
2457
|
+
source: resolveAccount("source"),
|
|
2458
|
+
systemProgram: resolveAccount("systemProgram"),
|
|
2459
|
+
tokenProgram: resolveAccount("tokenProgram"),
|
|
2460
|
+
wallet: resolveAccount("wallet")
|
|
2461
|
+
},
|
|
2462
|
+
SplAssociatedTokenRecoverNestedInstructionData: {
|
|
2463
|
+
destination: resolveAccount("destination"),
|
|
2464
|
+
nestedMint: resolveAccount("nestedMint"),
|
|
2465
|
+
nestedOwner: resolveAccount("nestedOwner"),
|
|
2466
|
+
nestedSource: resolveAccount("nestedSource"),
|
|
2467
|
+
ownerMint: resolveAccount("ownerMint"),
|
|
2468
|
+
tokenProgram: resolveAccount("tokenProgram"),
|
|
2469
|
+
wallet: resolveAccount("wallet")
|
|
2470
|
+
},
|
|
2471
|
+
SplTokenInitializeMintInstructionData: {
|
|
2472
|
+
freezeAuthority: resolveAccount("freezeAuthority"),
|
|
2473
|
+
mint: resolveAccount("mint"),
|
|
2474
|
+
mintAuthority: resolveAccount("mintAuthority")
|
|
2475
|
+
},
|
|
2476
|
+
SplTokenInitializeMint2InstructionData: {
|
|
2477
|
+
freezeAuthority: resolveAccount("freezeAuthority"),
|
|
2478
|
+
mint: resolveAccount("mint"),
|
|
2479
|
+
mintAuthority: resolveAccount("mintAuthority")
|
|
2480
|
+
},
|
|
2481
|
+
SplTokenInitializeAccountInstructionData: {
|
|
2482
|
+
account: resolveAccount("account"),
|
|
2483
|
+
mint: resolveAccount("mint"),
|
|
2484
|
+
owner: resolveAccount("owner")
|
|
2485
|
+
},
|
|
2486
|
+
SplTokenInitializeAccount2InstructionData: {
|
|
2487
|
+
account: resolveAccount("account"),
|
|
2488
|
+
mint: resolveAccount("mint"),
|
|
2489
|
+
owner: resolveAccount("owner")
|
|
2490
|
+
},
|
|
2491
|
+
SplTokenInitializeAccount3InstructionData: {
|
|
2492
|
+
account: resolveAccount("account"),
|
|
2493
|
+
mint: resolveAccount("mint"),
|
|
2494
|
+
owner: resolveAccount("owner")
|
|
2495
|
+
},
|
|
2496
|
+
SplTokenInitializeMultisigInstructionData: {
|
|
2497
|
+
multisig: resolveAccount("multisig")
|
|
2498
|
+
},
|
|
2499
|
+
SplTokenInitializeMultisig2InstructionData: {
|
|
2500
|
+
multisig: resolveAccount("multisig")
|
|
2501
|
+
},
|
|
2502
|
+
SplTokenTransferInstructionData: {
|
|
2503
|
+
authority: resolveAccount("authority"),
|
|
2504
|
+
destination: resolveAccount("destination"),
|
|
2505
|
+
multisigAuthority: resolveAccount("multisigAuthority"),
|
|
2506
|
+
source: resolveAccount("source")
|
|
2507
|
+
},
|
|
2508
|
+
SplTokenApproveInstructionData: {
|
|
2509
|
+
delegate: resolveAccount("delegate"),
|
|
2510
|
+
multisigOwner: resolveAccount("multisigOwner"),
|
|
2511
|
+
owner: resolveAccount("owner"),
|
|
2512
|
+
source: resolveAccount("source")
|
|
2513
|
+
},
|
|
2514
|
+
SplTokenRevokeInstructionData: {
|
|
2515
|
+
multisigOwner: resolveAccount("multisigOwner"),
|
|
2516
|
+
owner: resolveAccount("owner"),
|
|
2517
|
+
source: resolveAccount("source")
|
|
2518
|
+
},
|
|
2519
|
+
SplTokenSetAuthorityInstructionData: {
|
|
2520
|
+
authority: resolveAccount("authority"),
|
|
2521
|
+
multisigAuthority: resolveAccount("multisigAuthority"),
|
|
2522
|
+
newAuthority: resolveAccount("newAuthority")
|
|
2523
|
+
},
|
|
2524
|
+
SplTokenMintToInstructionData: {
|
|
2525
|
+
account: resolveAccount("account"),
|
|
2526
|
+
authority: resolveAccount("authority"),
|
|
2527
|
+
mint: resolveAccount("mint"),
|
|
2528
|
+
mintAuthority: resolveAccount("mintAuthority"),
|
|
2529
|
+
multisigMintAuthority: resolveAccount("multisigMintAuthority")
|
|
2530
|
+
},
|
|
2531
|
+
SplTokenBurnInstructionData: {
|
|
2532
|
+
account: resolveAccount("account"),
|
|
2533
|
+
authority: resolveAccount("authority"),
|
|
2534
|
+
mint: resolveAccount("mint"),
|
|
2535
|
+
multisigAuthority: resolveAccount("multisigAuthority")
|
|
2536
|
+
},
|
|
2537
|
+
SplTokenCloseAccountInstructionData: {
|
|
2538
|
+
account: resolveAccount("account"),
|
|
2539
|
+
destination: resolveAccount("destination"),
|
|
2540
|
+
multisigOwner: resolveAccount("multisigOwner"),
|
|
2541
|
+
owner: resolveAccount("owner")
|
|
2542
|
+
},
|
|
2543
|
+
SplTokenFreezeAccountInstructionData: {
|
|
2544
|
+
account: resolveAccount("account"),
|
|
2545
|
+
freezeAuthority: resolveAccount("freezeAuthority"),
|
|
2546
|
+
mint: resolveAccount("mint"),
|
|
2547
|
+
multisigFreezeAuthority: resolveAccount("multisigFreezeAuthority")
|
|
2548
|
+
},
|
|
2549
|
+
SplTokenThawAccountInstructionData: {
|
|
2550
|
+
account: resolveAccount("account"),
|
|
2551
|
+
freezeAuthority: resolveAccount("freezeAuthority"),
|
|
2552
|
+
mint: resolveAccount("mint"),
|
|
2553
|
+
multisigFreezeAuthority: resolveAccount("multisigFreezeAuthority")
|
|
2554
|
+
},
|
|
2555
|
+
SplTokenTransferCheckedInstructionData: {
|
|
2556
|
+
authority: resolveAccount("authority"),
|
|
2557
|
+
destination: resolveAccount("destination"),
|
|
2558
|
+
mint: resolveAccount("mint"),
|
|
2559
|
+
multisigAuthority: resolveAccount("multisigAuthority"),
|
|
2560
|
+
source: resolveAccount("source")
|
|
2561
|
+
},
|
|
2562
|
+
SplTokenApproveCheckedInstructionData: {
|
|
2563
|
+
delegate: resolveAccount("delegate"),
|
|
2564
|
+
mint: resolveAccount("mint"),
|
|
2565
|
+
multisigOwner: resolveAccount("multisigOwner"),
|
|
2566
|
+
owner: resolveAccount("owner"),
|
|
2567
|
+
source: resolveAccount("source")
|
|
2568
|
+
},
|
|
2569
|
+
SplTokenMintToCheckedInstructionData: {
|
|
2570
|
+
account: resolveAccount("account"),
|
|
2571
|
+
authority: resolveAccount("authority"),
|
|
2572
|
+
mint: resolveAccount("mint"),
|
|
2573
|
+
mintAuthority: resolveAccount("mintAuthority"),
|
|
2574
|
+
multisigMintAuthority: resolveAccount("multisigMintAuthority")
|
|
2575
|
+
},
|
|
2576
|
+
SplTokenBurnCheckedInstructionData: {
|
|
2577
|
+
account: resolveAccount("account"),
|
|
2578
|
+
authority: resolveAccount("authority"),
|
|
2579
|
+
mint: resolveAccount("mint"),
|
|
2580
|
+
multisigAuthority: resolveAccount("multisigAuthority")
|
|
2581
|
+
},
|
|
2582
|
+
SplTokenSyncNativeInstructionData: {
|
|
2583
|
+
account: resolveAccount("account")
|
|
2584
|
+
},
|
|
2585
|
+
SplTokenGetAccountDataSizeInstructionData: {
|
|
2586
|
+
mint: resolveAccount("mint")
|
|
2587
|
+
},
|
|
2588
|
+
SplTokenAmountToUiAmountInstructionData: {
|
|
2589
|
+
mint: resolveAccount("mint")
|
|
2590
|
+
},
|
|
2591
|
+
SplTokenUiAmountToAmountInstructionData: {
|
|
2592
|
+
mint: resolveAccount("mint")
|
|
2593
|
+
},
|
|
2594
|
+
SplTokenInitializeMintCloseAuthorityInstructionData: {
|
|
2595
|
+
mint: resolveAccount("mint"),
|
|
2596
|
+
newAuthority: resolveAccount("newAuthority")
|
|
2597
|
+
},
|
|
2598
|
+
Lockup: {
|
|
2599
|
+
custodian: resolveAccount("custodian")
|
|
2600
|
+
},
|
|
2601
|
+
StakeInitializeInstructionDataAuthorized: {
|
|
2602
|
+
staker: resolveAccount("staker"),
|
|
2603
|
+
withdrawer: resolveAccount("withdrawer")
|
|
2604
|
+
},
|
|
2605
|
+
StakeInitializeInstructionData: {
|
|
2606
|
+
stakeAccount: resolveAccount("stakeAccount")
|
|
2607
|
+
},
|
|
2608
|
+
StakeAuthorizeInstructionData: {
|
|
2609
|
+
authority: resolveAccount("authority"),
|
|
2610
|
+
custodian: resolveAccount("custodian"),
|
|
2611
|
+
newAuthority: resolveAccount("newAuthority"),
|
|
2612
|
+
stakeAccount: resolveAccount("stakeAccount")
|
|
2613
|
+
},
|
|
2614
|
+
StakeDelegateStakeInstructionData: {
|
|
2615
|
+
stakeAccount: resolveAccount("stakeAccount"),
|
|
2616
|
+
stakeAuthority: resolveAccount("stakeAuthority"),
|
|
2617
|
+
stakeConfigAccount: resolveAccount("stakeConfigAccount"),
|
|
2618
|
+
voteAccount: resolveAccount("voteAccount")
|
|
2619
|
+
},
|
|
2620
|
+
StakeSplitInstructionData: {
|
|
2621
|
+
newSplitAccount: resolveAccount("newSplitAccount"),
|
|
2622
|
+
stakeAccount: resolveAccount("stakeAccount"),
|
|
2623
|
+
stakeAuthority: resolveAccount("stakeAuthority")
|
|
2624
|
+
},
|
|
2625
|
+
StakeWithdrawInstructionData: {
|
|
2626
|
+
destination: resolveAccount("destination"),
|
|
2627
|
+
stakeAccount: resolveAccount("stakeAccount"),
|
|
2628
|
+
withdrawAuthority: resolveAccount("withdrawAuthority")
|
|
2629
|
+
},
|
|
2630
|
+
StakeDeactivateInstructionData: {
|
|
2631
|
+
stakeAccount: resolveAccount("stakeAccount"),
|
|
2632
|
+
stakeAuthority: resolveAccount("stakeAuthority")
|
|
2633
|
+
},
|
|
2634
|
+
StakeSetLockupInstructionData: {
|
|
2635
|
+
custodian: resolveAccount("custodian"),
|
|
2636
|
+
stakeAccount: resolveAccount("stakeAccount")
|
|
2637
|
+
},
|
|
2638
|
+
StakeMergeInstructionData: {
|
|
2639
|
+
destination: resolveAccount("destination"),
|
|
2640
|
+
source: resolveAccount("source"),
|
|
2641
|
+
stakeAuthority: resolveAccount("stakeAuthority")
|
|
2642
|
+
},
|
|
2643
|
+
StakeAuthorizeWithSeedInstructionData: {
|
|
2644
|
+
authorityBase: resolveAccount("authorityBase"),
|
|
2645
|
+
authorityOwner: resolveAccount("authorityOwner"),
|
|
2646
|
+
custodian: resolveAccount("custodian"),
|
|
2647
|
+
newAuthorized: resolveAccount("newAuthorized"),
|
|
2648
|
+
stakeAccount: resolveAccount("stakeAccount")
|
|
2649
|
+
},
|
|
2650
|
+
StakeInitializeCheckedInstructionDataAuthorized: {
|
|
2651
|
+
stakeAccount: resolveAccount("stakeAccount"),
|
|
2652
|
+
staker: resolveAccount("staker"),
|
|
2653
|
+
withdrawer: resolveAccount("withdrawer")
|
|
2654
|
+
},
|
|
2655
|
+
StakeAuthorizeCheckedInstructionData: {
|
|
2656
|
+
authority: resolveAccount("authority"),
|
|
2657
|
+
custodian: resolveAccount("custodian"),
|
|
2658
|
+
newAuthority: resolveAccount("newAuthority"),
|
|
2659
|
+
stakeAccount: resolveAccount("stakeAccount")
|
|
2660
|
+
},
|
|
2661
|
+
StakeAuthorizeCheckedWithSeedInstructionData: {
|
|
2662
|
+
authorityBase: resolveAccount("authorityBase"),
|
|
2663
|
+
authorityOwner: resolveAccount("authorityOwner"),
|
|
2664
|
+
custodian: resolveAccount("custodian"),
|
|
2665
|
+
newAuthorized: resolveAccount("newAuthorized"),
|
|
2666
|
+
stakeAccount: resolveAccount("stakeAccount")
|
|
2667
|
+
},
|
|
2668
|
+
StakeSetLockupCheckedInstructionData: {
|
|
2669
|
+
custodian: resolveAccount("custodian"),
|
|
2670
|
+
stakeAccount: resolveAccount("stakeAccount")
|
|
2671
|
+
},
|
|
2672
|
+
StakeDeactivateDelinquentInstructionData: {
|
|
2673
|
+
referenceVoteAccount: resolveAccount("referenceVoteAccount"),
|
|
2674
|
+
stakeAccount: resolveAccount("stakeAccount"),
|
|
2675
|
+
voteAccount: resolveAccount("voteAccount")
|
|
2676
|
+
},
|
|
2677
|
+
StakeRedelegateInstructionData: {
|
|
2678
|
+
newStakeAccount: resolveAccount("newStakeAccount"),
|
|
2679
|
+
stakeAccount: resolveAccount("stakeAccount"),
|
|
2680
|
+
stakeAuthority: resolveAccount("stakeAuthority"),
|
|
2681
|
+
stakeConfigAccount: resolveAccount("stakeConfigAccount"),
|
|
2682
|
+
voteAccount: resolveAccount("voteAccount")
|
|
2683
|
+
},
|
|
2684
|
+
CreateAccountInstructionData: {
|
|
2685
|
+
newAccount: resolveAccount("newAccount"),
|
|
2686
|
+
owner: resolveAccount("owner"),
|
|
2687
|
+
source: resolveAccount("source")
|
|
2688
|
+
},
|
|
2689
|
+
AssignInstructionData: {
|
|
2690
|
+
account: resolveAccount("account"),
|
|
2691
|
+
owner: resolveAccount("owner")
|
|
2692
|
+
},
|
|
2693
|
+
TransferInstructionData: {
|
|
2694
|
+
destination: resolveAccount("destination"),
|
|
2695
|
+
source: resolveAccount("source")
|
|
2696
|
+
},
|
|
2697
|
+
CreateAccountWithSeedInstructionData: {
|
|
2698
|
+
base: resolveAccount("base"),
|
|
2699
|
+
owner: resolveAccount("owner"),
|
|
2700
|
+
seed: resolveAccount("seed")
|
|
2701
|
+
},
|
|
2702
|
+
AdvanceNonceAccountInstructionData: {
|
|
2703
|
+
nonceAccount: resolveAccount("nonceAccount"),
|
|
2704
|
+
nonceAuthority: resolveAccount("nonceAuthority")
|
|
2705
|
+
},
|
|
2706
|
+
WithdrawNonceAccountInstructionData: {
|
|
2707
|
+
destination: resolveAccount("destination"),
|
|
2708
|
+
nonceAccount: resolveAccount("nonceAccount"),
|
|
2709
|
+
nonceAuthority: resolveAccount("nonceAuthority")
|
|
2710
|
+
},
|
|
2711
|
+
InitializeNonceAccountInstructionData: {
|
|
2712
|
+
nonceAccount: resolveAccount("nonceAccount"),
|
|
2713
|
+
nonceAuthority: resolveAccount("nonceAuthority")
|
|
2714
|
+
},
|
|
2715
|
+
AuthorizeNonceAccountInstructionData: {
|
|
2716
|
+
newAuthorized: resolveAccount("newAuthorized"),
|
|
2717
|
+
nonceAccount: resolveAccount("nonceAccount"),
|
|
2718
|
+
nonceAuthority: resolveAccount("nonceAuthority")
|
|
2719
|
+
},
|
|
2720
|
+
UpgradeNonceAccountInstructionData: {
|
|
2721
|
+
nonceAccount: resolveAccount("nonceAccount"),
|
|
2722
|
+
nonceAuthority: resolveAccount("nonceAuthority")
|
|
2723
|
+
},
|
|
2724
|
+
AllocateInstructionData: {
|
|
2725
|
+
account: resolveAccount("account")
|
|
2726
|
+
},
|
|
2727
|
+
AllocateWithSeedInstructionData: {
|
|
2728
|
+
account: resolveAccount("account"),
|
|
2729
|
+
owner: resolveAccount("owner")
|
|
2730
|
+
},
|
|
2731
|
+
AssignWithSeedInstructionData: {
|
|
2732
|
+
account: resolveAccount("account"),
|
|
2733
|
+
owner: resolveAccount("owner")
|
|
2734
|
+
},
|
|
2735
|
+
TransferWithSeedInstructionData: {
|
|
2736
|
+
destination: resolveAccount("destination"),
|
|
2737
|
+
source: resolveAccount("source"),
|
|
2738
|
+
sourceOwner: resolveAccount("sourceOwner")
|
|
2739
|
+
},
|
|
2740
|
+
VoteInitializeAccountInstructionData: {
|
|
2741
|
+
authorizedVoter: resolveAccount("authorizedVoter"),
|
|
2742
|
+
authorizedWithdrawer: resolveAccount("authorizedWithdrawer"),
|
|
2743
|
+
node: resolveAccount("node"),
|
|
2744
|
+
voteAccount: resolveAccount("voteAccount")
|
|
2745
|
+
},
|
|
2746
|
+
VoteAuthorizeInstructionData: {
|
|
2747
|
+
authority: resolveAccount("authority"),
|
|
2748
|
+
newAuthority: resolveAccount("newAuthority"),
|
|
2749
|
+
voteAccount: resolveAccount("voteAccount")
|
|
2750
|
+
},
|
|
2751
|
+
VoteAuthorizeWithSeedInstructionData: {
|
|
2752
|
+
authorityOwner: resolveAccount("authorityOwner"),
|
|
2753
|
+
newAuthority: resolveAccount("newAuthority"),
|
|
2754
|
+
voteAccount: resolveAccount("voteAccount")
|
|
2755
|
+
},
|
|
2756
|
+
VoteAuthorizeCheckedWithSeedInstructionData: {
|
|
2757
|
+
authorityOwner: resolveAccount("authorityOwner"),
|
|
2758
|
+
newAuthority: resolveAccount("newAuthority"),
|
|
2759
|
+
voteAccount: resolveAccount("voteAccount")
|
|
2760
|
+
},
|
|
2761
|
+
VoteVoteInstructionData: {
|
|
2762
|
+
voteAccount: resolveAccount("voteAccount"),
|
|
2763
|
+
voteAuthority: resolveAccount("voteAuthority")
|
|
2764
|
+
},
|
|
2765
|
+
VoteUpdateVoteStateInstructionData: {
|
|
2766
|
+
voteAccount: resolveAccount("voteAccount"),
|
|
2767
|
+
voteAuthority: resolveAccount("voteAuthority")
|
|
2768
|
+
},
|
|
2769
|
+
VoteUpdateVoteStateSwitchInstructionData: {
|
|
2770
|
+
voteAccount: resolveAccount("voteAccount"),
|
|
2771
|
+
voteAuthority: resolveAccount("voteAuthority")
|
|
2772
|
+
},
|
|
2773
|
+
VoteCompactUpdateVoteStateInstructionData: {
|
|
2774
|
+
voteAccount: resolveAccount("voteAccount"),
|
|
2775
|
+
voteAuthority: resolveAccount("voteAuthority")
|
|
2776
|
+
},
|
|
2777
|
+
VoteCompactUpdateVoteStateSwitchInstructionData: {
|
|
2778
|
+
voteAccount: resolveAccount("voteAccount"),
|
|
2779
|
+
voteAuthority: resolveAccount("voteAuthority")
|
|
2780
|
+
},
|
|
2781
|
+
VoteWithdrawInstructionData: {
|
|
2782
|
+
voteAccount: resolveAccount("voteAccount"),
|
|
2783
|
+
withdrawAuthority: resolveAccount("withdrawAuthority")
|
|
2784
|
+
},
|
|
2785
|
+
VoteUpdateValidatorIdentityInstructionData: {
|
|
2786
|
+
newValidatorIdentity: resolveAccount("newValidatorIdentity"),
|
|
2787
|
+
voteAccount: resolveAccount("voteAccount"),
|
|
2788
|
+
withdrawAuthority: resolveAccount("withdrawAuthority")
|
|
2789
|
+
},
|
|
2790
|
+
VoteUpdateCommissionInstructionData: {
|
|
2791
|
+
voteAccount: resolveAccount("voteAccount"),
|
|
2792
|
+
withdrawAuthority: resolveAccount("withdrawAuthority")
|
|
2793
|
+
},
|
|
2794
|
+
VoteVoteSwitchInstructionData: {
|
|
2795
|
+
voteAccount: resolveAccount("voteAccount"),
|
|
2796
|
+
voteAuthority: resolveAccount("voteAuthority")
|
|
2797
|
+
},
|
|
2798
|
+
VoteAuthorizeCheckedInstructionData: {
|
|
2799
|
+
authority: resolveAccount("authority"),
|
|
2800
|
+
newAuthority: resolveAccount("newAuthority"),
|
|
2801
|
+
voteAccount: resolveAccount("voteAccount")
|
|
2802
|
+
}
|
|
1887
2803
|
};
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
2804
|
+
|
|
2805
|
+
// src/schema/transaction.ts
|
|
2806
|
+
var transactionTypeDefs = (
|
|
2807
|
+
/* GraphQL */
|
|
2808
|
+
`
|
|
2809
|
+
type TransactionStatusOk {
|
|
2810
|
+
Ok: String
|
|
2811
|
+
}
|
|
2812
|
+
type TransactionStatusErr {
|
|
2813
|
+
Err: String
|
|
2814
|
+
}
|
|
2815
|
+
union TransactionStatus = TransactionStatusOk | TransactionStatusErr
|
|
2816
|
+
|
|
2817
|
+
type TransactionLoadedAddresses {
|
|
2818
|
+
readonly: [String]
|
|
2819
|
+
writable: [String]
|
|
2820
|
+
}
|
|
2821
|
+
|
|
2822
|
+
type TransactionInnerInstruction {
|
|
2823
|
+
index: Int
|
|
2824
|
+
instructions: [TransactionInstruction]
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
type TransactionMeta {
|
|
2828
|
+
computeUnitsConsumed: BigInt
|
|
2829
|
+
err: String
|
|
2830
|
+
fee: BigInt
|
|
2831
|
+
innerInstructions: [TransactionInnerInstruction]
|
|
2832
|
+
loadedAddresses: TransactionLoadedAddresses
|
|
2833
|
+
logMessages: [String]
|
|
2834
|
+
postBalances: [BigInt]
|
|
2835
|
+
postTokenBalances: [TokenBalance]
|
|
2836
|
+
preBalances: [BigInt]
|
|
2837
|
+
preTokenBalances: [TokenBalance]
|
|
2838
|
+
returnData: ReturnData
|
|
2839
|
+
rewards: [Reward]
|
|
2840
|
+
status: TransactionStatus
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
type TransactionMessageAccountKey {
|
|
2844
|
+
pubkey: String
|
|
2845
|
+
signer: Boolean
|
|
2846
|
+
source: String
|
|
2847
|
+
writable: Boolean
|
|
2848
|
+
}
|
|
2849
|
+
|
|
2850
|
+
type TransactionMessageAddressTableLookup {
|
|
2851
|
+
accountKey: String
|
|
2852
|
+
readableIndexes: [Int]
|
|
2853
|
+
writableIndexes: [Int]
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2856
|
+
type TransactionMessageHeader {
|
|
2857
|
+
numReadonlySignedAccounts: Int
|
|
2858
|
+
numReadonlyUnsignedAccounts: Int
|
|
2859
|
+
numRequiredSignatures: Int
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2862
|
+
type TransactionMessage {
|
|
2863
|
+
accountKeys: [TransactionMessageAccountKey]
|
|
2864
|
+
addressTableLookups: [TransactionMessageAddressTableLookup]
|
|
2865
|
+
header: TransactionMessageHeader
|
|
2866
|
+
instructions: [TransactionInstruction]
|
|
2867
|
+
recentBlockhash: String
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2870
|
+
# Transaction interface
|
|
2871
|
+
interface Transaction {
|
|
2872
|
+
blockTime: String
|
|
2873
|
+
encoding: String
|
|
2874
|
+
meta: TransactionMeta
|
|
2875
|
+
slot: BigInt
|
|
2876
|
+
version: String
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
# A transaction with base58 encoded data
|
|
2880
|
+
type TransactionBase58 implements Transaction {
|
|
2881
|
+
blockTime: String
|
|
2882
|
+
data: String
|
|
2883
|
+
encoding: String
|
|
2884
|
+
meta: TransactionMeta
|
|
2885
|
+
slot: BigInt
|
|
2886
|
+
version: String
|
|
2887
|
+
}
|
|
2888
|
+
|
|
2889
|
+
# A transaction with base64 encoded data
|
|
2890
|
+
type TransactionBase64 implements Transaction {
|
|
2891
|
+
blockTime: String
|
|
2892
|
+
data: String
|
|
2893
|
+
encoding: String
|
|
2894
|
+
meta: TransactionMeta
|
|
2895
|
+
slot: BigInt
|
|
2896
|
+
version: String
|
|
2897
|
+
}
|
|
2898
|
+
|
|
2899
|
+
# A transaction with JSON encoded data
|
|
2900
|
+
type TransactionDataParsed {
|
|
2901
|
+
message: TransactionMessage
|
|
2902
|
+
signatures: [String]
|
|
2903
|
+
}
|
|
2904
|
+
type TransactionParsed implements Transaction {
|
|
2905
|
+
blockTime: String
|
|
2906
|
+
data: TransactionDataParsed
|
|
2907
|
+
encoding: String
|
|
2908
|
+
meta: TransactionMeta
|
|
2909
|
+
slot: BigInt
|
|
2910
|
+
version: String
|
|
2911
|
+
}
|
|
2912
|
+
`
|
|
2913
|
+
);
|
|
2914
|
+
var transactionResolvers = {
|
|
2915
|
+
Transaction: {
|
|
2916
|
+
__resolveType(transaction) {
|
|
2917
|
+
switch (transaction.encoding) {
|
|
2918
|
+
case "base58":
|
|
1898
2919
|
return "TransactionBase58";
|
|
1899
|
-
|
|
1900
|
-
if (transaction.encoding === "base64") {
|
|
2920
|
+
case "base64":
|
|
1901
2921
|
return "TransactionBase64";
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
return "TransactionJson";
|
|
1905
|
-
}
|
|
1906
|
-
return "TransactionJsonParsed";
|
|
2922
|
+
default:
|
|
2923
|
+
return "TransactionParsed";
|
|
1907
2924
|
}
|
|
1908
|
-
}
|
|
1909
|
-
return memoisedTransactionInterface;
|
|
1910
|
-
};
|
|
1911
|
-
var transactionType = (name, description, transaction) => new GraphQLObjectType({
|
|
1912
|
-
description,
|
|
1913
|
-
fields: {
|
|
1914
|
-
...transactionInterfaceFields(),
|
|
1915
|
-
transaction
|
|
1916
|
-
},
|
|
1917
|
-
interfaces: [transactionInterface()],
|
|
1918
|
-
name
|
|
1919
|
-
});
|
|
1920
|
-
var memoisedTransactionBase58;
|
|
1921
|
-
var transactionBase58 = () => {
|
|
1922
|
-
if (!memoisedTransactionBase58)
|
|
1923
|
-
memoisedTransactionBase58 = transactionType(
|
|
1924
|
-
"TransactionBase58",
|
|
1925
|
-
"A Solana transaction as base58 encoded data",
|
|
1926
|
-
string()
|
|
1927
|
-
);
|
|
1928
|
-
return memoisedTransactionBase58;
|
|
1929
|
-
};
|
|
1930
|
-
var memoisedTransactionBase64;
|
|
1931
|
-
var transactionBase64 = () => {
|
|
1932
|
-
if (!memoisedTransactionBase64)
|
|
1933
|
-
memoisedTransactionBase64 = transactionType(
|
|
1934
|
-
"TransactionBase64",
|
|
1935
|
-
"A Solana transaction as base64 encoded data",
|
|
1936
|
-
string()
|
|
1937
|
-
);
|
|
1938
|
-
return memoisedTransactionBase64;
|
|
1939
|
-
};
|
|
1940
|
-
var memoisedTransactionJson;
|
|
1941
|
-
var transactionJson = () => {
|
|
1942
|
-
if (!memoisedTransactionJson)
|
|
1943
|
-
memoisedTransactionJson = transactionType(
|
|
1944
|
-
"TransactionJson",
|
|
1945
|
-
"A Solana transaction as a JSON object",
|
|
1946
|
-
type(transactionTransaction())
|
|
1947
|
-
);
|
|
1948
|
-
return memoisedTransactionJson;
|
|
1949
|
-
};
|
|
1950
|
-
var memoisedTransactionJsonParsed;
|
|
1951
|
-
var transactionJsonParsed = () => {
|
|
1952
|
-
if (!memoisedTransactionJsonParsed)
|
|
1953
|
-
memoisedTransactionJsonParsed = transactionType(
|
|
1954
|
-
"TransactionJsonParsed",
|
|
1955
|
-
"A Solana transaction as a parsed JSON object",
|
|
1956
|
-
type(transactionTransaction())
|
|
1957
|
-
);
|
|
1958
|
-
return memoisedTransactionJsonParsed;
|
|
1959
|
-
};
|
|
1960
|
-
var memoisedTransactionTypes;
|
|
1961
|
-
var transactionTypes = () => {
|
|
1962
|
-
if (!memoisedTransactionTypes)
|
|
1963
|
-
memoisedTransactionTypes = [
|
|
1964
|
-
partiallyDecodedTransactionInstruction(),
|
|
1965
|
-
...parsedInstructionsAddressLookupTable(),
|
|
1966
|
-
...parsedInstructionsBpfLoader(),
|
|
1967
|
-
...parsedInstructionsBpfUpgradeableLoader(),
|
|
1968
|
-
...parsedInstructionsStake(),
|
|
1969
|
-
...parsedInstructionsSplAssociatedToken(),
|
|
1970
|
-
parsedInstructionSplMemo(),
|
|
1971
|
-
...parsedInstructionsSplToken(),
|
|
1972
|
-
...parsedInstructionsSystem(),
|
|
1973
|
-
...parsedInstructionsVote(),
|
|
1974
|
-
transactionMetaUnparsed(),
|
|
1975
|
-
transactionMetaParsed(),
|
|
1976
|
-
transactionMessageUnparsed(),
|
|
1977
|
-
transactionMessageParsed(),
|
|
1978
|
-
transactionBase58(),
|
|
1979
|
-
transactionBase64(),
|
|
1980
|
-
transactionJson(),
|
|
1981
|
-
transactionJsonParsed()
|
|
1982
|
-
];
|
|
1983
|
-
return memoisedTransactionTypes;
|
|
1984
|
-
};
|
|
1985
|
-
|
|
1986
|
-
// src/schema/transaction/query.ts
|
|
1987
|
-
var transactionQuery = () => ({
|
|
1988
|
-
transaction: {
|
|
1989
|
-
args: {
|
|
1990
|
-
commitment: type(commitmentInputType()),
|
|
1991
|
-
encoding: type(transactionEncodingInputType()),
|
|
1992
|
-
maxSupportedTransactionVersion: type(maxSupportedTransactionVersionInputType()),
|
|
1993
|
-
signature: nonNull(string())
|
|
1994
|
-
},
|
|
1995
|
-
resolve: (_parent, args, context) => context.resolveTransaction(args),
|
|
1996
|
-
type: transactionInterface()
|
|
2925
|
+
}
|
|
1997
2926
|
}
|
|
1998
|
-
});
|
|
1999
|
-
|
|
2000
|
-
// src/schema/block/types.ts
|
|
2001
|
-
var memoisedTransactionForAccounts;
|
|
2002
|
-
var transactionForAccounts = () => {
|
|
2003
|
-
if (!memoisedTransactionForAccounts)
|
|
2004
|
-
memoisedTransactionForAccounts = new GraphQLObjectType({
|
|
2005
|
-
fields: {
|
|
2006
|
-
meta: object("TransactionMetaForAccounts", {
|
|
2007
|
-
computeUnitsUsed: bigint(),
|
|
2008
|
-
err: string(),
|
|
2009
|
-
fee: bigint(),
|
|
2010
|
-
format: string(),
|
|
2011
|
-
loadedAddresses: type(transactionMetaLoadedAddresses()),
|
|
2012
|
-
logMessages: list(string()),
|
|
2013
|
-
postBalances: list(bigint()),
|
|
2014
|
-
postTokenBalances: list(type(tokenBalance())),
|
|
2015
|
-
preBalances: list(bigint()),
|
|
2016
|
-
preTokenBalances: list(type(tokenBalance())),
|
|
2017
|
-
returnData: type(returnData()),
|
|
2018
|
-
rewards: list(type(reward())),
|
|
2019
|
-
status: type(transactionStatus())
|
|
2020
|
-
}),
|
|
2021
|
-
transaction: type(transactionInterface()),
|
|
2022
|
-
// TODO
|
|
2023
|
-
version: string()
|
|
2024
|
-
},
|
|
2025
|
-
name: "TransactionForAccounts"
|
|
2026
|
-
});
|
|
2027
|
-
return memoisedTransactionForAccounts;
|
|
2028
|
-
};
|
|
2029
|
-
var memoisedBlockInterfaceFields;
|
|
2030
|
-
var blockInterfaceFields = () => {
|
|
2031
|
-
if (!memoisedBlockInterfaceFields)
|
|
2032
|
-
memoisedBlockInterfaceFields = {
|
|
2033
|
-
blockHeight: bigint(),
|
|
2034
|
-
blockTime: bigint(),
|
|
2035
|
-
blockhash: string(),
|
|
2036
|
-
parentSlot: bigint(),
|
|
2037
|
-
previousBlockhash: string(),
|
|
2038
|
-
rewards: list(type(reward()))
|
|
2039
|
-
};
|
|
2040
|
-
return memoisedBlockInterfaceFields;
|
|
2041
|
-
};
|
|
2042
|
-
var memoisedBlockInterface;
|
|
2043
|
-
var blockInterface = () => {
|
|
2044
|
-
if (!memoisedBlockInterface)
|
|
2045
|
-
memoisedBlockInterface = new GraphQLInterfaceType({
|
|
2046
|
-
fields: {
|
|
2047
|
-
...blockInterfaceFields()
|
|
2048
|
-
},
|
|
2049
|
-
name: "Block",
|
|
2050
|
-
resolveType(block) {
|
|
2051
|
-
if (block.transactionDetails === "signatures") {
|
|
2052
|
-
return "BlockWithSignatures";
|
|
2053
|
-
}
|
|
2054
|
-
if (block.transactionDetails === "accounts") {
|
|
2055
|
-
return "BlockWithAccounts";
|
|
2056
|
-
}
|
|
2057
|
-
if (block.transactionDetails === "none") {
|
|
2058
|
-
return "BlockWithNoTransactions";
|
|
2059
|
-
}
|
|
2060
|
-
return "BlockWithTransactions";
|
|
2061
|
-
}
|
|
2062
|
-
});
|
|
2063
|
-
return memoisedBlockInterface;
|
|
2064
|
-
};
|
|
2065
|
-
var memoisedBlockWithNoTransactions;
|
|
2066
|
-
var blockWithNoTransactions = () => {
|
|
2067
|
-
if (!memoisedBlockWithNoTransactions)
|
|
2068
|
-
memoisedBlockWithNoTransactions = new GraphQLObjectType({
|
|
2069
|
-
fields: {
|
|
2070
|
-
...blockInterfaceFields()
|
|
2071
|
-
},
|
|
2072
|
-
interfaces: [blockInterface()],
|
|
2073
|
-
name: "BlockWithNoTransactions"
|
|
2074
|
-
});
|
|
2075
|
-
return memoisedBlockWithNoTransactions;
|
|
2076
|
-
};
|
|
2077
|
-
var memoisedBlockWithSignatures;
|
|
2078
|
-
var blockWithSignatures = () => {
|
|
2079
|
-
if (!memoisedBlockWithSignatures)
|
|
2080
|
-
memoisedBlockWithSignatures = new GraphQLObjectType({
|
|
2081
|
-
fields: {
|
|
2082
|
-
...blockInterfaceFields(),
|
|
2083
|
-
signatures: list(string())
|
|
2084
|
-
},
|
|
2085
|
-
interfaces: [blockInterface()],
|
|
2086
|
-
name: "BlockWithSignatures"
|
|
2087
|
-
});
|
|
2088
|
-
return memoisedBlockWithSignatures;
|
|
2089
|
-
};
|
|
2090
|
-
var memoisedBlockWithAccounts;
|
|
2091
|
-
var blockWithAccounts = () => {
|
|
2092
|
-
if (!memoisedBlockWithAccounts)
|
|
2093
|
-
memoisedBlockWithAccounts = new GraphQLObjectType({
|
|
2094
|
-
fields: {
|
|
2095
|
-
...blockInterfaceFields(),
|
|
2096
|
-
transactions: list(type(transactionForAccounts()))
|
|
2097
|
-
},
|
|
2098
|
-
interfaces: [blockInterface()],
|
|
2099
|
-
name: "BlockWithAccounts"
|
|
2100
|
-
});
|
|
2101
|
-
return memoisedBlockWithAccounts;
|
|
2102
|
-
};
|
|
2103
|
-
var memoisedBlockWithTransactions;
|
|
2104
|
-
var blockWithTransactions = () => {
|
|
2105
|
-
if (!memoisedBlockWithTransactions)
|
|
2106
|
-
memoisedBlockWithTransactions = new GraphQLObjectType({
|
|
2107
|
-
fields: {
|
|
2108
|
-
...blockInterfaceFields(),
|
|
2109
|
-
transactions: list(type(transactionInterface()))
|
|
2110
|
-
},
|
|
2111
|
-
interfaces: [blockInterface()],
|
|
2112
|
-
name: "BlockWithTransactions"
|
|
2113
|
-
});
|
|
2114
|
-
return memoisedBlockWithTransactions;
|
|
2115
|
-
};
|
|
2116
|
-
var memoisedBlockTypes;
|
|
2117
|
-
var blockTypes = () => {
|
|
2118
|
-
if (!memoisedBlockTypes)
|
|
2119
|
-
memoisedBlockTypes = [
|
|
2120
|
-
blockWithNoTransactions(),
|
|
2121
|
-
blockWithSignatures(),
|
|
2122
|
-
blockWithAccounts(),
|
|
2123
|
-
blockWithTransactions()
|
|
2124
|
-
];
|
|
2125
|
-
return memoisedBlockTypes;
|
|
2126
2927
|
};
|
|
2127
2928
|
|
|
2128
|
-
// src/schema/
|
|
2129
|
-
var
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2929
|
+
// src/schema/index.ts
|
|
2930
|
+
var schemaTypeDefs = (
|
|
2931
|
+
/* GraphQL */
|
|
2932
|
+
`
|
|
2933
|
+
type Query {
|
|
2934
|
+
account(
|
|
2935
|
+
address: String!
|
|
2936
|
+
commitment: Commitment
|
|
2937
|
+
dataSlice: DataSlice
|
|
2938
|
+
encoding: AccountEncoding
|
|
2939
|
+
minContextSlot: BigInt
|
|
2940
|
+
): Account
|
|
2941
|
+
block(
|
|
2942
|
+
slot: BigInt!
|
|
2943
|
+
commitment: Commitment
|
|
2944
|
+
encoding: TransactionEncoding
|
|
2945
|
+
transactionDetails: BlockTransactionDetails
|
|
2946
|
+
): Block
|
|
2947
|
+
programAccounts(
|
|
2948
|
+
programAddress: String!
|
|
2949
|
+
commitment: Commitment
|
|
2950
|
+
dataSlice: DataSlice
|
|
2951
|
+
encoding: AccountEncoding
|
|
2952
|
+
filters: [ProgramAccountsFilter]
|
|
2953
|
+
minContextSlot: BigInt
|
|
2954
|
+
): [Account]
|
|
2955
|
+
transaction(
|
|
2956
|
+
signature: String!
|
|
2957
|
+
commitment: Commitment
|
|
2958
|
+
encoding: TransactionEncoding
|
|
2959
|
+
): Transaction
|
|
2960
|
+
}
|
|
2150
2961
|
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2962
|
+
schema {
|
|
2963
|
+
query: Query
|
|
2964
|
+
}
|
|
2965
|
+
`
|
|
2966
|
+
);
|
|
2967
|
+
var schemaResolvers = {
|
|
2968
|
+
Query: {
|
|
2969
|
+
account(_, args, context, info) {
|
|
2970
|
+
return context.loadAccount(args, info);
|
|
2971
|
+
},
|
|
2972
|
+
block(_, args, context, info) {
|
|
2973
|
+
return context.loadBlock(args, info);
|
|
2162
2974
|
},
|
|
2163
|
-
|
|
2164
|
-
|
|
2975
|
+
programAccounts(_, args, context, info) {
|
|
2976
|
+
return context.loadProgramAccounts(args, info);
|
|
2977
|
+
},
|
|
2978
|
+
transaction(_, args, context, info) {
|
|
2979
|
+
return context.loadTransaction(args, info);
|
|
2980
|
+
}
|
|
2165
2981
|
}
|
|
2166
|
-
}
|
|
2982
|
+
};
|
|
2983
|
+
function createSolanaGraphQLSchema() {
|
|
2984
|
+
return makeExecutableSchema({
|
|
2985
|
+
resolvers: {
|
|
2986
|
+
...accountResolvers,
|
|
2987
|
+
...blockResolvers,
|
|
2988
|
+
...commonResolvers,
|
|
2989
|
+
...inputResolvers,
|
|
2990
|
+
...instructionResolvers,
|
|
2991
|
+
...scalarResolvers,
|
|
2992
|
+
...schemaResolvers,
|
|
2993
|
+
...transactionResolvers
|
|
2994
|
+
},
|
|
2995
|
+
typeDefs: [
|
|
2996
|
+
accountTypeDefs,
|
|
2997
|
+
blockTypeDefs,
|
|
2998
|
+
commonTypeDefs,
|
|
2999
|
+
inputTypeDefs,
|
|
3000
|
+
instructionTypeDefs,
|
|
3001
|
+
scalarTypeDefs,
|
|
3002
|
+
schemaTypeDefs,
|
|
3003
|
+
transactionTypeDefs
|
|
3004
|
+
]
|
|
3005
|
+
});
|
|
3006
|
+
}
|
|
2167
3007
|
|
|
2168
3008
|
// src/rpc.ts
|
|
2169
3009
|
function createRpcGraphQL(rpc) {
|
|
2170
3010
|
const context = createSolanaGraphQLContext(rpc);
|
|
2171
|
-
const schema =
|
|
2172
|
-
query: new GraphQLObjectType({
|
|
2173
|
-
fields: {
|
|
2174
|
-
...accountQuery(),
|
|
2175
|
-
...blockQuery(),
|
|
2176
|
-
...programAccountsQuery(),
|
|
2177
|
-
...transactionQuery()
|
|
2178
|
-
},
|
|
2179
|
-
name: "RootQuery"
|
|
2180
|
-
}),
|
|
2181
|
-
types: [...accountTypes(), ...blockTypes(), ...transactionTypes()]
|
|
2182
|
-
});
|
|
3011
|
+
const schema = createSolanaGraphQLSchema();
|
|
2183
3012
|
return {
|
|
2184
3013
|
context,
|
|
2185
3014
|
async query(source, variableValues) {
|