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