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