@solana/rpc-graphql 2.0.0-experimental.b153bb7 → 2.0.0-experimental.b315352

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