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