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