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