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