@solana/rpc-graphql 2.0.0-experimental.d085c72 → 2.0.0-experimental.d148156

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