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