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