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