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