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