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