@solana/rpc-graphql 2.0.0-experimental.aa4a701 → 2.0.0-experimental.ae3f1f0

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