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