@solana/rpc-graphql 2.0.0-experimental.efe6f4d → 2.0.0-experimental.f5d64e6

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