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