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