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