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