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