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