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