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