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