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