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