@solana-program/compute-budget 0.1.0
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/README.md +38 -0
- package/dist/src/index.cjs +382 -0
- package/dist/src/index.cjs.map +1 -0
- package/dist/src/index.js +339 -0
- package/dist/src/index.js.map +1 -0
- package/dist/types/src/generated/index.d.ts +11 -0
- package/dist/types/src/generated/index.d.ts.map +1 -0
- package/dist/types/src/generated/instructions/index.d.ts +13 -0
- package/dist/types/src/generated/instructions/index.d.ts.map +1 -0
- package/dist/types/src/generated/instructions/requestHeapFrame.d.ts +45 -0
- package/dist/types/src/generated/instructions/requestHeapFrame.d.ts.map +1 -0
- package/dist/types/src/generated/instructions/requestUnits.d.ts +45 -0
- package/dist/types/src/generated/instructions/requestUnits.d.ts.map +1 -0
- package/dist/types/src/generated/instructions/setComputeUnitLimit.d.ts +39 -0
- package/dist/types/src/generated/instructions/setComputeUnitLimit.d.ts.map +1 -0
- package/dist/types/src/generated/instructions/setComputeUnitPrice.d.ts +39 -0
- package/dist/types/src/generated/instructions/setComputeUnitPrice.d.ts.map +1 -0
- package/dist/types/src/generated/instructions/setLoadedAccountsDataSizeLimit.d.ts +37 -0
- package/dist/types/src/generated/instructions/setLoadedAccountsDataSizeLimit.d.ts.map +1 -0
- package/dist/types/src/generated/programs/computeBudget.d.ts +35 -0
- package/dist/types/src/generated/programs/computeBudget.d.ts.map +1 -0
- package/dist/types/src/generated/programs/index.d.ts +9 -0
- package/dist/types/src/generated/programs/index.d.ts.map +1 -0
- package/dist/types/src/generated/shared/index.d.ts +61 -0
- package/dist/types/src/generated/shared/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/test/_setup.d.ts +14 -0
- package/dist/types/test/_setup.d.ts.map +1 -0
- package/dist/types/test/setComputeUnitLimit.test.d.ts +2 -0
- package/dist/types/test/setComputeUnitLimit.test.d.ts.map +1 -0
- package/package.json +75 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { mapEncoder, getStructEncoder, getU8Encoder, getU32Encoder, getStructDecoder, getU8Decoder, getU32Decoder, combineCodec, getU64Encoder, getU64Decoder } from '@solana/codecs';
|
|
2
|
+
import { isProgramDerivedAddress } from '@solana/addresses';
|
|
3
|
+
import { AccountRole, upgradeRoleToSigner } from '@solana/instructions';
|
|
4
|
+
import { isTransactionSigner as isTransactionSigner$1 } from '@solana/signers';
|
|
5
|
+
|
|
6
|
+
// src/generated/instructions/requestHeapFrame.ts
|
|
7
|
+
function getRequestHeapFrameInstructionDataEncoder() {
|
|
8
|
+
return mapEncoder(
|
|
9
|
+
getStructEncoder([
|
|
10
|
+
["discriminator", getU8Encoder()],
|
|
11
|
+
["bytes", getU32Encoder()]
|
|
12
|
+
]),
|
|
13
|
+
(value) => ({ ...value, discriminator: 1 })
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function getRequestHeapFrameInstructionDataDecoder() {
|
|
17
|
+
return getStructDecoder([
|
|
18
|
+
["discriminator", getU8Decoder()],
|
|
19
|
+
["bytes", getU32Decoder()]
|
|
20
|
+
]);
|
|
21
|
+
}
|
|
22
|
+
function getRequestHeapFrameInstructionDataCodec() {
|
|
23
|
+
return combineCodec(
|
|
24
|
+
getRequestHeapFrameInstructionDataEncoder(),
|
|
25
|
+
getRequestHeapFrameInstructionDataDecoder()
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
function getRequestHeapFrameInstruction(input) {
|
|
29
|
+
const programAddress = "ComputeBudget111111111111111111111111111111";
|
|
30
|
+
const args = { ...input };
|
|
31
|
+
const instruction = getRequestHeapFrameInstructionRaw(
|
|
32
|
+
args,
|
|
33
|
+
programAddress
|
|
34
|
+
);
|
|
35
|
+
return instruction;
|
|
36
|
+
}
|
|
37
|
+
function getRequestHeapFrameInstructionRaw(args, programAddress = "ComputeBudget111111111111111111111111111111", remainingAccounts) {
|
|
38
|
+
return {
|
|
39
|
+
accounts: remainingAccounts ?? [],
|
|
40
|
+
data: getRequestHeapFrameInstructionDataEncoder().encode(args),
|
|
41
|
+
programAddress
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function parseRequestHeapFrameInstruction(instruction) {
|
|
45
|
+
return {
|
|
46
|
+
programAddress: instruction.programAddress,
|
|
47
|
+
data: getRequestHeapFrameInstructionDataDecoder().decode(instruction.data)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function getRequestUnitsInstructionDataEncoder() {
|
|
51
|
+
return mapEncoder(
|
|
52
|
+
getStructEncoder([
|
|
53
|
+
["discriminator", getU8Encoder()],
|
|
54
|
+
["units", getU32Encoder()],
|
|
55
|
+
["additionalFee", getU32Encoder()]
|
|
56
|
+
]),
|
|
57
|
+
(value) => ({ ...value, discriminator: 0 })
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
function getRequestUnitsInstructionDataDecoder() {
|
|
61
|
+
return getStructDecoder([
|
|
62
|
+
["discriminator", getU8Decoder()],
|
|
63
|
+
["units", getU32Decoder()],
|
|
64
|
+
["additionalFee", getU32Decoder()]
|
|
65
|
+
]);
|
|
66
|
+
}
|
|
67
|
+
function getRequestUnitsInstructionDataCodec() {
|
|
68
|
+
return combineCodec(
|
|
69
|
+
getRequestUnitsInstructionDataEncoder(),
|
|
70
|
+
getRequestUnitsInstructionDataDecoder()
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function getRequestUnitsInstruction(input) {
|
|
74
|
+
const programAddress = "ComputeBudget111111111111111111111111111111";
|
|
75
|
+
const args = { ...input };
|
|
76
|
+
const instruction = getRequestUnitsInstructionRaw(
|
|
77
|
+
args,
|
|
78
|
+
programAddress
|
|
79
|
+
);
|
|
80
|
+
return instruction;
|
|
81
|
+
}
|
|
82
|
+
function getRequestUnitsInstructionRaw(args, programAddress = "ComputeBudget111111111111111111111111111111", remainingAccounts) {
|
|
83
|
+
return {
|
|
84
|
+
accounts: remainingAccounts ?? [],
|
|
85
|
+
data: getRequestUnitsInstructionDataEncoder().encode(args),
|
|
86
|
+
programAddress
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function parseRequestUnitsInstruction(instruction) {
|
|
90
|
+
return {
|
|
91
|
+
programAddress: instruction.programAddress,
|
|
92
|
+
data: getRequestUnitsInstructionDataDecoder().decode(instruction.data)
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function getSetComputeUnitLimitInstructionDataEncoder() {
|
|
96
|
+
return mapEncoder(
|
|
97
|
+
getStructEncoder([
|
|
98
|
+
["discriminator", getU8Encoder()],
|
|
99
|
+
["units", getU32Encoder()]
|
|
100
|
+
]),
|
|
101
|
+
(value) => ({ ...value, discriminator: 2 })
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
function getSetComputeUnitLimitInstructionDataDecoder() {
|
|
105
|
+
return getStructDecoder([
|
|
106
|
+
["discriminator", getU8Decoder()],
|
|
107
|
+
["units", getU32Decoder()]
|
|
108
|
+
]);
|
|
109
|
+
}
|
|
110
|
+
function getSetComputeUnitLimitInstructionDataCodec() {
|
|
111
|
+
return combineCodec(
|
|
112
|
+
getSetComputeUnitLimitInstructionDataEncoder(),
|
|
113
|
+
getSetComputeUnitLimitInstructionDataDecoder()
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
function getSetComputeUnitLimitInstruction(input) {
|
|
117
|
+
const programAddress = "ComputeBudget111111111111111111111111111111";
|
|
118
|
+
const args = { ...input };
|
|
119
|
+
const instruction = getSetComputeUnitLimitInstructionRaw(
|
|
120
|
+
args,
|
|
121
|
+
programAddress
|
|
122
|
+
);
|
|
123
|
+
return instruction;
|
|
124
|
+
}
|
|
125
|
+
function getSetComputeUnitLimitInstructionRaw(args, programAddress = "ComputeBudget111111111111111111111111111111", remainingAccounts) {
|
|
126
|
+
return {
|
|
127
|
+
accounts: remainingAccounts ?? [],
|
|
128
|
+
data: getSetComputeUnitLimitInstructionDataEncoder().encode(args),
|
|
129
|
+
programAddress
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function parseSetComputeUnitLimitInstruction(instruction) {
|
|
133
|
+
return {
|
|
134
|
+
programAddress: instruction.programAddress,
|
|
135
|
+
data: getSetComputeUnitLimitInstructionDataDecoder().decode(
|
|
136
|
+
instruction.data
|
|
137
|
+
)
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function getSetComputeUnitPriceInstructionDataEncoder() {
|
|
141
|
+
return mapEncoder(
|
|
142
|
+
getStructEncoder([
|
|
143
|
+
["discriminator", getU8Encoder()],
|
|
144
|
+
["microLamports", getU64Encoder()]
|
|
145
|
+
]),
|
|
146
|
+
(value) => ({ ...value, discriminator: 3 })
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
function getSetComputeUnitPriceInstructionDataDecoder() {
|
|
150
|
+
return getStructDecoder([
|
|
151
|
+
["discriminator", getU8Decoder()],
|
|
152
|
+
["microLamports", getU64Decoder()]
|
|
153
|
+
]);
|
|
154
|
+
}
|
|
155
|
+
function getSetComputeUnitPriceInstructionDataCodec() {
|
|
156
|
+
return combineCodec(
|
|
157
|
+
getSetComputeUnitPriceInstructionDataEncoder(),
|
|
158
|
+
getSetComputeUnitPriceInstructionDataDecoder()
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
function getSetComputeUnitPriceInstruction(input) {
|
|
162
|
+
const programAddress = "ComputeBudget111111111111111111111111111111";
|
|
163
|
+
const args = { ...input };
|
|
164
|
+
const instruction = getSetComputeUnitPriceInstructionRaw(
|
|
165
|
+
args,
|
|
166
|
+
programAddress
|
|
167
|
+
);
|
|
168
|
+
return instruction;
|
|
169
|
+
}
|
|
170
|
+
function getSetComputeUnitPriceInstructionRaw(args, programAddress = "ComputeBudget111111111111111111111111111111", remainingAccounts) {
|
|
171
|
+
return {
|
|
172
|
+
accounts: remainingAccounts ?? [],
|
|
173
|
+
data: getSetComputeUnitPriceInstructionDataEncoder().encode(args),
|
|
174
|
+
programAddress
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
function parseSetComputeUnitPriceInstruction(instruction) {
|
|
178
|
+
return {
|
|
179
|
+
programAddress: instruction.programAddress,
|
|
180
|
+
data: getSetComputeUnitPriceInstructionDataDecoder().decode(
|
|
181
|
+
instruction.data
|
|
182
|
+
)
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function getSetLoadedAccountsDataSizeLimitInstructionDataEncoder() {
|
|
186
|
+
return mapEncoder(
|
|
187
|
+
getStructEncoder([
|
|
188
|
+
["discriminator", getU8Encoder()],
|
|
189
|
+
["accountDataSizeLimit", getU32Encoder()]
|
|
190
|
+
]),
|
|
191
|
+
(value) => ({ ...value, discriminator: 4 })
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
function getSetLoadedAccountsDataSizeLimitInstructionDataDecoder() {
|
|
195
|
+
return getStructDecoder([
|
|
196
|
+
["discriminator", getU8Decoder()],
|
|
197
|
+
["accountDataSizeLimit", getU32Decoder()]
|
|
198
|
+
]);
|
|
199
|
+
}
|
|
200
|
+
function getSetLoadedAccountsDataSizeLimitInstructionDataCodec() {
|
|
201
|
+
return combineCodec(
|
|
202
|
+
getSetLoadedAccountsDataSizeLimitInstructionDataEncoder(),
|
|
203
|
+
getSetLoadedAccountsDataSizeLimitInstructionDataDecoder()
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
function getSetLoadedAccountsDataSizeLimitInstruction(input) {
|
|
207
|
+
const programAddress = "ComputeBudget111111111111111111111111111111";
|
|
208
|
+
const args = { ...input };
|
|
209
|
+
const instruction = getSetLoadedAccountsDataSizeLimitInstructionRaw(
|
|
210
|
+
args,
|
|
211
|
+
programAddress
|
|
212
|
+
);
|
|
213
|
+
return instruction;
|
|
214
|
+
}
|
|
215
|
+
function getSetLoadedAccountsDataSizeLimitInstructionRaw(args, programAddress = "ComputeBudget111111111111111111111111111111", remainingAccounts) {
|
|
216
|
+
return {
|
|
217
|
+
accounts: remainingAccounts ?? [],
|
|
218
|
+
data: getSetLoadedAccountsDataSizeLimitInstructionDataEncoder().encode(
|
|
219
|
+
args
|
|
220
|
+
),
|
|
221
|
+
programAddress
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
function parseSetLoadedAccountsDataSizeLimitInstruction(instruction) {
|
|
225
|
+
return {
|
|
226
|
+
programAddress: instruction.programAddress,
|
|
227
|
+
data: getSetLoadedAccountsDataSizeLimitInstructionDataDecoder().decode(
|
|
228
|
+
instruction.data
|
|
229
|
+
)
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
function expectSome(value) {
|
|
233
|
+
if (value == null) {
|
|
234
|
+
throw new Error("Expected a value but received null or undefined.");
|
|
235
|
+
}
|
|
236
|
+
return value;
|
|
237
|
+
}
|
|
238
|
+
function expectAddress(value) {
|
|
239
|
+
if (!value) {
|
|
240
|
+
throw new Error("Expected a Address.");
|
|
241
|
+
}
|
|
242
|
+
if (typeof value === "object" && "address" in value) {
|
|
243
|
+
return value.address;
|
|
244
|
+
}
|
|
245
|
+
if (Array.isArray(value)) {
|
|
246
|
+
return value[0];
|
|
247
|
+
}
|
|
248
|
+
return value;
|
|
249
|
+
}
|
|
250
|
+
function expectProgramDerivedAddress(value) {
|
|
251
|
+
if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {
|
|
252
|
+
throw new Error("Expected a ProgramDerivedAddress.");
|
|
253
|
+
}
|
|
254
|
+
return value;
|
|
255
|
+
}
|
|
256
|
+
function expectTransactionSigner(value) {
|
|
257
|
+
if (!value || !isTransactionSigner(value)) {
|
|
258
|
+
throw new Error("Expected a TransactionSigner.");
|
|
259
|
+
}
|
|
260
|
+
return value;
|
|
261
|
+
}
|
|
262
|
+
function accountMetaWithDefault(account, role) {
|
|
263
|
+
if (account === void 0)
|
|
264
|
+
return void 0;
|
|
265
|
+
return typeof account === "string" ? { address: account, role } : account;
|
|
266
|
+
}
|
|
267
|
+
function getAccountMetasWithSigners(accounts, optionalAccountStrategy, programAddress) {
|
|
268
|
+
const accountMetas = {};
|
|
269
|
+
Object.keys(accounts).forEach((key) => {
|
|
270
|
+
const account = accounts[key];
|
|
271
|
+
if (!account.value) {
|
|
272
|
+
if (optionalAccountStrategy === "omitted")
|
|
273
|
+
return;
|
|
274
|
+
accountMetas[key] = {
|
|
275
|
+
address: programAddress,
|
|
276
|
+
role: AccountRole.READONLY
|
|
277
|
+
};
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
|
|
281
|
+
accountMetas[key] = Object.freeze({
|
|
282
|
+
address: expectAddress(account.value),
|
|
283
|
+
role: isTransactionSigner(account.value) ? upgradeRoleToSigner(writableRole) : writableRole,
|
|
284
|
+
...isTransactionSigner(account.value) ? { signer: account.value } : {}
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
return accountMetas;
|
|
288
|
+
}
|
|
289
|
+
function isTransactionSigner(value) {
|
|
290
|
+
return !!value && typeof value === "object" && "address" in value && isTransactionSigner$1(value);
|
|
291
|
+
}
|
|
292
|
+
function memcmp(data, bytes, offset) {
|
|
293
|
+
const slice = data.slice(offset, offset + bytes.length);
|
|
294
|
+
if (slice.length !== bytes.length)
|
|
295
|
+
return false;
|
|
296
|
+
return bytes.every((b, i) => b === slice[i]);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// src/generated/programs/computeBudget.ts
|
|
300
|
+
var COMPUTE_BUDGET_PROGRAM_ADDRESS = "ComputeBudget111111111111111111111111111111";
|
|
301
|
+
function getComputeBudgetProgram() {
|
|
302
|
+
return {
|
|
303
|
+
name: "computeBudget",
|
|
304
|
+
address: COMPUTE_BUDGET_PROGRAM_ADDRESS
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
var ComputeBudgetInstruction = /* @__PURE__ */ ((ComputeBudgetInstruction2) => {
|
|
308
|
+
ComputeBudgetInstruction2[ComputeBudgetInstruction2["RequestUnits"] = 0] = "RequestUnits";
|
|
309
|
+
ComputeBudgetInstruction2[ComputeBudgetInstruction2["RequestHeapFrame"] = 1] = "RequestHeapFrame";
|
|
310
|
+
ComputeBudgetInstruction2[ComputeBudgetInstruction2["SetComputeUnitLimit"] = 2] = "SetComputeUnitLimit";
|
|
311
|
+
ComputeBudgetInstruction2[ComputeBudgetInstruction2["SetComputeUnitPrice"] = 3] = "SetComputeUnitPrice";
|
|
312
|
+
ComputeBudgetInstruction2[ComputeBudgetInstruction2["SetLoadedAccountsDataSizeLimit"] = 4] = "SetLoadedAccountsDataSizeLimit";
|
|
313
|
+
return ComputeBudgetInstruction2;
|
|
314
|
+
})(ComputeBudgetInstruction || {});
|
|
315
|
+
function identifyComputeBudgetInstruction(instruction) {
|
|
316
|
+
const data = instruction instanceof Uint8Array ? instruction : instruction.data;
|
|
317
|
+
if (memcmp(data, getU8Encoder().encode(0), 0)) {
|
|
318
|
+
return 0 /* RequestUnits */;
|
|
319
|
+
}
|
|
320
|
+
if (memcmp(data, getU8Encoder().encode(1), 0)) {
|
|
321
|
+
return 1 /* RequestHeapFrame */;
|
|
322
|
+
}
|
|
323
|
+
if (memcmp(data, getU8Encoder().encode(2), 0)) {
|
|
324
|
+
return 2 /* SetComputeUnitLimit */;
|
|
325
|
+
}
|
|
326
|
+
if (memcmp(data, getU8Encoder().encode(3), 0)) {
|
|
327
|
+
return 3 /* SetComputeUnitPrice */;
|
|
328
|
+
}
|
|
329
|
+
if (memcmp(data, getU8Encoder().encode(4), 0)) {
|
|
330
|
+
return 4 /* SetLoadedAccountsDataSizeLimit */;
|
|
331
|
+
}
|
|
332
|
+
throw new Error(
|
|
333
|
+
"The provided instruction could not be identified as a computeBudget instruction."
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export { COMPUTE_BUDGET_PROGRAM_ADDRESS, ComputeBudgetInstruction, accountMetaWithDefault, expectAddress, expectProgramDerivedAddress, expectSome, expectTransactionSigner, getAccountMetasWithSigners, getComputeBudgetProgram, getRequestHeapFrameInstruction, getRequestHeapFrameInstructionDataCodec, getRequestHeapFrameInstructionDataDecoder, getRequestHeapFrameInstructionDataEncoder, getRequestHeapFrameInstructionRaw, getRequestUnitsInstruction, getRequestUnitsInstructionDataCodec, getRequestUnitsInstructionDataDecoder, getRequestUnitsInstructionDataEncoder, getRequestUnitsInstructionRaw, getSetComputeUnitLimitInstruction, getSetComputeUnitLimitInstructionDataCodec, getSetComputeUnitLimitInstructionDataDecoder, getSetComputeUnitLimitInstructionDataEncoder, getSetComputeUnitLimitInstructionRaw, getSetComputeUnitPriceInstruction, getSetComputeUnitPriceInstructionDataCodec, getSetComputeUnitPriceInstructionDataDecoder, getSetComputeUnitPriceInstructionDataEncoder, getSetComputeUnitPriceInstructionRaw, getSetLoadedAccountsDataSizeLimitInstruction, getSetLoadedAccountsDataSizeLimitInstructionDataCodec, getSetLoadedAccountsDataSizeLimitInstructionDataDecoder, getSetLoadedAccountsDataSizeLimitInstructionDataEncoder, getSetLoadedAccountsDataSizeLimitInstructionRaw, identifyComputeBudgetInstruction, isTransactionSigner, memcmp, parseRequestHeapFrameInstruction, parseRequestUnitsInstruction, parseSetComputeUnitLimitInstruction, parseSetComputeUnitPriceInstruction, parseSetLoadedAccountsDataSizeLimitInstruction };
|
|
338
|
+
//# sourceMappingURL=out.js.map
|
|
339
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/generated/instructions/requestHeapFrame.ts","../../src/generated/instructions/requestUnits.ts","../../src/generated/instructions/setComputeUnitLimit.ts","../../src/generated/instructions/setComputeUnitPrice.ts","../../src/generated/instructions/setLoadedAccountsDataSizeLimit.ts","../../src/generated/programs/computeBudget.ts","../../src/generated/shared/index.ts"],"names":["combineCodec","getStructDecoder","getStructEncoder","getU32Decoder","getU32Encoder","getU8Decoder","getU8Encoder","mapEncoder","ComputeBudgetInstruction"],"mappings":";AASA;AAAA,EAIE;AAAA,EACA;AAAA,EACA;AAA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EAAAA,oDAAA;AACA,EAAAA,oDAAA;AALU,SAAAA;AAAA,GAAA;AAQL,SAAS,iCACd,aAC0B;AAC1B,QAAM,OACJ,uBAAuB,aAAa,cAAc,YAAY;AAChE,MAAI,OAAO,MAAMF,cAAa,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;AAC7C,WAAO;AAAA,EACT;AACA,MAAI,OAAO,MAAMA,cAAa,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;AAC7C,WAAO;AAAA,EACT;AACA,MAAI,OAAO,MAAMA,cAAa,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;AAC7C,WAAO;AAAA,EACT;AACA,MAAI,OAAO,MAAMA,cAAa,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;AAC7C,WAAO;AAAA,EACT;AACA,MAAI,OAAO,MAAMA,cAAa,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;AAC7C,WAAO;AAAA,EACT;AACA,QAAM,IAAI;AAAA,IACR;AAAA,EACF;AACF","sourcesContent":["/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n} from '@solana/instructions';\n\nexport type RequestHeapFrameInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<TRemainingAccounts>;\n\nexport type RequestHeapFrameInstructionWithSigners<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<TRemainingAccounts>;\n\nexport type RequestHeapFrameInstructionData = {\n discriminator: number;\n /**\n * Requested transaction-wide program heap size in bytes.\n * Must be multiple of 1024. Applies to each program, including CPIs.\n */\n bytes: number;\n};\n\nexport type RequestHeapFrameInstructionDataArgs = {\n /**\n * Requested transaction-wide program heap size in bytes.\n * Must be multiple of 1024. Applies to each program, including CPIs.\n */\n bytes: number;\n};\n\nexport function getRequestHeapFrameInstructionDataEncoder(): Encoder<RequestHeapFrameInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['bytes', getU32Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 1 })\n );\n}\n\nexport function getRequestHeapFrameInstructionDataDecoder(): Decoder<RequestHeapFrameInstructionData> {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['bytes', getU32Decoder()],\n ]);\n}\n\nexport function getRequestHeapFrameInstructionDataCodec(): Codec<\n RequestHeapFrameInstructionDataArgs,\n RequestHeapFrameInstructionData\n> {\n return combineCodec(\n getRequestHeapFrameInstructionDataEncoder(),\n getRequestHeapFrameInstructionDataDecoder()\n );\n}\n\nexport type RequestHeapFrameInput = {\n bytes: RequestHeapFrameInstructionDataArgs['bytes'];\n};\n\nexport type RequestHeapFrameInputWithSigners = {\n bytes: RequestHeapFrameInstructionDataArgs['bytes'];\n};\n\nexport function getRequestHeapFrameInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n>(\n input: RequestHeapFrameInputWithSigners\n): RequestHeapFrameInstructionWithSigners<TProgram>;\nexport function getRequestHeapFrameInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n>(input: RequestHeapFrameInput): RequestHeapFrameInstruction<TProgram>;\nexport function getRequestHeapFrameInstruction(\n input: RequestHeapFrameInput\n): IInstruction {\n // Program address.\n const programAddress =\n 'ComputeBudget111111111111111111111111111111' as Address<'ComputeBudget111111111111111111111111111111'>;\n\n // Original args.\n const args = { ...input };\n\n const instruction = getRequestHeapFrameInstructionRaw(\n args as RequestHeapFrameInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getRequestHeapFrameInstructionRaw<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n args: RequestHeapFrameInstructionDataArgs,\n programAddress: Address<TProgram> = 'ComputeBudget111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: remainingAccounts ?? [],\n data: getRequestHeapFrameInstructionDataEncoder().encode(args),\n programAddress,\n } as RequestHeapFrameInstruction<TProgram, TRemainingAccounts>;\n}\n\nexport type ParsedRequestHeapFrameInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n> = {\n programAddress: Address<TProgram>;\n data: RequestHeapFrameInstructionData;\n};\n\nexport function parseRequestHeapFrameInstruction<TProgram extends string>(\n instruction: IInstruction<TProgram> & IInstructionWithData<Uint8Array>\n): ParsedRequestHeapFrameInstruction<TProgram> {\n return {\n programAddress: instruction.programAddress,\n data: getRequestHeapFrameInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n} from '@solana/instructions';\n\nexport type RequestUnitsInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<TRemainingAccounts>;\n\nexport type RequestUnitsInstructionWithSigners<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<TRemainingAccounts>;\n\nexport type RequestUnitsInstructionData = {\n discriminator: number;\n /** Units to request for transaction-wide compute. */\n units: number;\n /** Prioritization fee lamports. */\n additionalFee: number;\n};\n\nexport type RequestUnitsInstructionDataArgs = {\n /** Units to request for transaction-wide compute. */\n units: number;\n /** Prioritization fee lamports. */\n additionalFee: number;\n};\n\nexport function getRequestUnitsInstructionDataEncoder(): Encoder<RequestUnitsInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['units', getU32Encoder()],\n ['additionalFee', getU32Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 0 })\n );\n}\n\nexport function getRequestUnitsInstructionDataDecoder(): Decoder<RequestUnitsInstructionData> {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['units', getU32Decoder()],\n ['additionalFee', getU32Decoder()],\n ]);\n}\n\nexport function getRequestUnitsInstructionDataCodec(): Codec<\n RequestUnitsInstructionDataArgs,\n RequestUnitsInstructionData\n> {\n return combineCodec(\n getRequestUnitsInstructionDataEncoder(),\n getRequestUnitsInstructionDataDecoder()\n );\n}\n\nexport type RequestUnitsInput = {\n units: RequestUnitsInstructionDataArgs['units'];\n additionalFee: RequestUnitsInstructionDataArgs['additionalFee'];\n};\n\nexport type RequestUnitsInputWithSigners = {\n units: RequestUnitsInstructionDataArgs['units'];\n additionalFee: RequestUnitsInstructionDataArgs['additionalFee'];\n};\n\nexport function getRequestUnitsInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n>(\n input: RequestUnitsInputWithSigners\n): RequestUnitsInstructionWithSigners<TProgram>;\nexport function getRequestUnitsInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n>(input: RequestUnitsInput): RequestUnitsInstruction<TProgram>;\nexport function getRequestUnitsInstruction(\n input: RequestUnitsInput\n): IInstruction {\n // Program address.\n const programAddress =\n 'ComputeBudget111111111111111111111111111111' as Address<'ComputeBudget111111111111111111111111111111'>;\n\n // Original args.\n const args = { ...input };\n\n const instruction = getRequestUnitsInstructionRaw(\n args as RequestUnitsInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getRequestUnitsInstructionRaw<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n args: RequestUnitsInstructionDataArgs,\n programAddress: Address<TProgram> = 'ComputeBudget111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: remainingAccounts ?? [],\n data: getRequestUnitsInstructionDataEncoder().encode(args),\n programAddress,\n } as RequestUnitsInstruction<TProgram, TRemainingAccounts>;\n}\n\nexport type ParsedRequestUnitsInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n> = {\n programAddress: Address<TProgram>;\n data: RequestUnitsInstructionData;\n};\n\nexport function parseRequestUnitsInstruction<TProgram extends string>(\n instruction: IInstruction<TProgram> & IInstructionWithData<Uint8Array>\n): ParsedRequestUnitsInstruction<TProgram> {\n return {\n programAddress: instruction.programAddress,\n data: getRequestUnitsInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n} from '@solana/instructions';\n\nexport type SetComputeUnitLimitInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<TRemainingAccounts>;\n\nexport type SetComputeUnitLimitInstructionWithSigners<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<TRemainingAccounts>;\n\nexport type SetComputeUnitLimitInstructionData = {\n discriminator: number;\n /** Transaction-wide compute unit limit. */\n units: number;\n};\n\nexport type SetComputeUnitLimitInstructionDataArgs = {\n /** Transaction-wide compute unit limit. */\n units: number;\n};\n\nexport function getSetComputeUnitLimitInstructionDataEncoder(): Encoder<SetComputeUnitLimitInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['units', getU32Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 2 })\n );\n}\n\nexport function getSetComputeUnitLimitInstructionDataDecoder(): Decoder<SetComputeUnitLimitInstructionData> {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['units', getU32Decoder()],\n ]);\n}\n\nexport function getSetComputeUnitLimitInstructionDataCodec(): Codec<\n SetComputeUnitLimitInstructionDataArgs,\n SetComputeUnitLimitInstructionData\n> {\n return combineCodec(\n getSetComputeUnitLimitInstructionDataEncoder(),\n getSetComputeUnitLimitInstructionDataDecoder()\n );\n}\n\nexport type SetComputeUnitLimitInput = {\n units: SetComputeUnitLimitInstructionDataArgs['units'];\n};\n\nexport type SetComputeUnitLimitInputWithSigners = {\n units: SetComputeUnitLimitInstructionDataArgs['units'];\n};\n\nexport function getSetComputeUnitLimitInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n>(\n input: SetComputeUnitLimitInputWithSigners\n): SetComputeUnitLimitInstructionWithSigners<TProgram>;\nexport function getSetComputeUnitLimitInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n>(input: SetComputeUnitLimitInput): SetComputeUnitLimitInstruction<TProgram>;\nexport function getSetComputeUnitLimitInstruction(\n input: SetComputeUnitLimitInput\n): IInstruction {\n // Program address.\n const programAddress =\n 'ComputeBudget111111111111111111111111111111' as Address<'ComputeBudget111111111111111111111111111111'>;\n\n // Original args.\n const args = { ...input };\n\n const instruction = getSetComputeUnitLimitInstructionRaw(\n args as SetComputeUnitLimitInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getSetComputeUnitLimitInstructionRaw<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n args: SetComputeUnitLimitInstructionDataArgs,\n programAddress: Address<TProgram> = 'ComputeBudget111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: remainingAccounts ?? [],\n data: getSetComputeUnitLimitInstructionDataEncoder().encode(args),\n programAddress,\n } as SetComputeUnitLimitInstruction<TProgram, TRemainingAccounts>;\n}\n\nexport type ParsedSetComputeUnitLimitInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n> = {\n programAddress: Address<TProgram>;\n data: SetComputeUnitLimitInstructionData;\n};\n\nexport function parseSetComputeUnitLimitInstruction<TProgram extends string>(\n instruction: IInstruction<TProgram> & IInstructionWithData<Uint8Array>\n): ParsedSetComputeUnitLimitInstruction<TProgram> {\n return {\n programAddress: instruction.programAddress,\n data: getSetComputeUnitLimitInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n} from '@solana/instructions';\n\nexport type SetComputeUnitPriceInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<TRemainingAccounts>;\n\nexport type SetComputeUnitPriceInstructionWithSigners<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<TRemainingAccounts>;\n\nexport type SetComputeUnitPriceInstructionData = {\n discriminator: number;\n /** Transaction compute unit price used for prioritization fees. */\n microLamports: bigint;\n};\n\nexport type SetComputeUnitPriceInstructionDataArgs = {\n /** Transaction compute unit price used for prioritization fees. */\n microLamports: number | bigint;\n};\n\nexport function getSetComputeUnitPriceInstructionDataEncoder(): Encoder<SetComputeUnitPriceInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['microLamports', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 3 })\n );\n}\n\nexport function getSetComputeUnitPriceInstructionDataDecoder(): Decoder<SetComputeUnitPriceInstructionData> {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['microLamports', getU64Decoder()],\n ]);\n}\n\nexport function getSetComputeUnitPriceInstructionDataCodec(): Codec<\n SetComputeUnitPriceInstructionDataArgs,\n SetComputeUnitPriceInstructionData\n> {\n return combineCodec(\n getSetComputeUnitPriceInstructionDataEncoder(),\n getSetComputeUnitPriceInstructionDataDecoder()\n );\n}\n\nexport type SetComputeUnitPriceInput = {\n microLamports: SetComputeUnitPriceInstructionDataArgs['microLamports'];\n};\n\nexport type SetComputeUnitPriceInputWithSigners = {\n microLamports: SetComputeUnitPriceInstructionDataArgs['microLamports'];\n};\n\nexport function getSetComputeUnitPriceInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n>(\n input: SetComputeUnitPriceInputWithSigners\n): SetComputeUnitPriceInstructionWithSigners<TProgram>;\nexport function getSetComputeUnitPriceInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n>(input: SetComputeUnitPriceInput): SetComputeUnitPriceInstruction<TProgram>;\nexport function getSetComputeUnitPriceInstruction(\n input: SetComputeUnitPriceInput\n): IInstruction {\n // Program address.\n const programAddress =\n 'ComputeBudget111111111111111111111111111111' as Address<'ComputeBudget111111111111111111111111111111'>;\n\n // Original args.\n const args = { ...input };\n\n const instruction = getSetComputeUnitPriceInstructionRaw(\n args as SetComputeUnitPriceInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getSetComputeUnitPriceInstructionRaw<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n args: SetComputeUnitPriceInstructionDataArgs,\n programAddress: Address<TProgram> = 'ComputeBudget111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: remainingAccounts ?? [],\n data: getSetComputeUnitPriceInstructionDataEncoder().encode(args),\n programAddress,\n } as SetComputeUnitPriceInstruction<TProgram, TRemainingAccounts>;\n}\n\nexport type ParsedSetComputeUnitPriceInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n> = {\n programAddress: Address<TProgram>;\n data: SetComputeUnitPriceInstructionData;\n};\n\nexport function parseSetComputeUnitPriceInstruction<TProgram extends string>(\n instruction: IInstruction<TProgram> & IInstructionWithData<Uint8Array>\n): ParsedSetComputeUnitPriceInstruction<TProgram> {\n return {\n programAddress: instruction.programAddress,\n data: getSetComputeUnitPriceInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n} from '@solana/instructions';\n\nexport type SetLoadedAccountsDataSizeLimitInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<TRemainingAccounts>;\n\nexport type SetLoadedAccountsDataSizeLimitInstructionWithSigners<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<TRemainingAccounts>;\n\nexport type SetLoadedAccountsDataSizeLimitInstructionData = {\n discriminator: number;\n accountDataSizeLimit: number;\n};\n\nexport type SetLoadedAccountsDataSizeLimitInstructionDataArgs = {\n accountDataSizeLimit: number;\n};\n\nexport function getSetLoadedAccountsDataSizeLimitInstructionDataEncoder(): Encoder<SetLoadedAccountsDataSizeLimitInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['accountDataSizeLimit', getU32Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 4 })\n );\n}\n\nexport function getSetLoadedAccountsDataSizeLimitInstructionDataDecoder(): Decoder<SetLoadedAccountsDataSizeLimitInstructionData> {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['accountDataSizeLimit', getU32Decoder()],\n ]);\n}\n\nexport function getSetLoadedAccountsDataSizeLimitInstructionDataCodec(): Codec<\n SetLoadedAccountsDataSizeLimitInstructionDataArgs,\n SetLoadedAccountsDataSizeLimitInstructionData\n> {\n return combineCodec(\n getSetLoadedAccountsDataSizeLimitInstructionDataEncoder(),\n getSetLoadedAccountsDataSizeLimitInstructionDataDecoder()\n );\n}\n\nexport type SetLoadedAccountsDataSizeLimitInput = {\n accountDataSizeLimit: SetLoadedAccountsDataSizeLimitInstructionDataArgs['accountDataSizeLimit'];\n};\n\nexport type SetLoadedAccountsDataSizeLimitInputWithSigners = {\n accountDataSizeLimit: SetLoadedAccountsDataSizeLimitInstructionDataArgs['accountDataSizeLimit'];\n};\n\nexport function getSetLoadedAccountsDataSizeLimitInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n>(\n input: SetLoadedAccountsDataSizeLimitInputWithSigners\n): SetLoadedAccountsDataSizeLimitInstructionWithSigners<TProgram>;\nexport function getSetLoadedAccountsDataSizeLimitInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n>(\n input: SetLoadedAccountsDataSizeLimitInput\n): SetLoadedAccountsDataSizeLimitInstruction<TProgram>;\nexport function getSetLoadedAccountsDataSizeLimitInstruction(\n input: SetLoadedAccountsDataSizeLimitInput\n): IInstruction {\n // Program address.\n const programAddress =\n 'ComputeBudget111111111111111111111111111111' as Address<'ComputeBudget111111111111111111111111111111'>;\n\n // Original args.\n const args = { ...input };\n\n const instruction = getSetLoadedAccountsDataSizeLimitInstructionRaw(\n args as SetLoadedAccountsDataSizeLimitInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getSetLoadedAccountsDataSizeLimitInstructionRaw<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n args: SetLoadedAccountsDataSizeLimitInstructionDataArgs,\n programAddress: Address<TProgram> = 'ComputeBudget111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: remainingAccounts ?? [],\n data: getSetLoadedAccountsDataSizeLimitInstructionDataEncoder().encode(\n args\n ),\n programAddress,\n } as SetLoadedAccountsDataSizeLimitInstruction<TProgram, TRemainingAccounts>;\n}\n\nexport type ParsedSetLoadedAccountsDataSizeLimitInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n> = {\n programAddress: Address<TProgram>;\n data: SetLoadedAccountsDataSizeLimitInstructionData;\n};\n\nexport function parseSetLoadedAccountsDataSizeLimitInstruction<\n TProgram extends string\n>(\n instruction: IInstruction<TProgram> & IInstructionWithData<Uint8Array>\n): ParsedSetLoadedAccountsDataSizeLimitInstruction<TProgram> {\n return {\n programAddress: instruction.programAddress,\n data: getSetLoadedAccountsDataSizeLimitInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport { getU8Encoder } from '@solana/codecs';\nimport { Program } from '@solana/programs';\nimport {\n ParsedRequestHeapFrameInstruction,\n ParsedRequestUnitsInstruction,\n ParsedSetComputeUnitLimitInstruction,\n ParsedSetComputeUnitPriceInstruction,\n ParsedSetLoadedAccountsDataSizeLimitInstruction,\n} from '../instructions';\nimport { memcmp } from '../shared';\n\nexport const COMPUTE_BUDGET_PROGRAM_ADDRESS =\n 'ComputeBudget111111111111111111111111111111' as Address<'ComputeBudget111111111111111111111111111111'>;\n\nexport type ComputeBudgetProgram =\n Program<'ComputeBudget111111111111111111111111111111'>;\n\nexport function getComputeBudgetProgram(): ComputeBudgetProgram {\n return {\n name: 'computeBudget',\n address: COMPUTE_BUDGET_PROGRAM_ADDRESS,\n };\n}\n\nexport enum ComputeBudgetInstruction {\n RequestUnits,\n RequestHeapFrame,\n SetComputeUnitLimit,\n SetComputeUnitPrice,\n SetLoadedAccountsDataSizeLimit,\n}\n\nexport function identifyComputeBudgetInstruction(\n instruction: { data: Uint8Array } | Uint8Array\n): ComputeBudgetInstruction {\n const data =\n instruction instanceof Uint8Array ? instruction : instruction.data;\n if (memcmp(data, getU8Encoder().encode(0), 0)) {\n return ComputeBudgetInstruction.RequestUnits;\n }\n if (memcmp(data, getU8Encoder().encode(1), 0)) {\n return ComputeBudgetInstruction.RequestHeapFrame;\n }\n if (memcmp(data, getU8Encoder().encode(2), 0)) {\n return ComputeBudgetInstruction.SetComputeUnitLimit;\n }\n if (memcmp(data, getU8Encoder().encode(3), 0)) {\n return ComputeBudgetInstruction.SetComputeUnitPrice;\n }\n if (memcmp(data, getU8Encoder().encode(4), 0)) {\n return ComputeBudgetInstruction.SetLoadedAccountsDataSizeLimit;\n }\n throw new Error(\n 'The provided instruction could not be identified as a computeBudget instruction.'\n );\n}\n\nexport type ParsedComputeBudgetInstruction<\n TProgram extends string = 'ComputeBudget111111111111111111111111111111'\n> =\n | ({\n instructionType: ComputeBudgetInstruction.RequestUnits;\n } & ParsedRequestUnitsInstruction<TProgram>)\n | ({\n instructionType: ComputeBudgetInstruction.RequestHeapFrame;\n } & ParsedRequestHeapFrameInstruction<TProgram>)\n | ({\n instructionType: ComputeBudgetInstruction.SetComputeUnitLimit;\n } & ParsedSetComputeUnitLimitInstruction<TProgram>)\n | ({\n instructionType: ComputeBudgetInstruction.SetComputeUnitPrice;\n } & ParsedSetComputeUnitPriceInstruction<TProgram>)\n | ({\n instructionType: ComputeBudgetInstruction.SetLoadedAccountsDataSizeLimit;\n } & ParsedSetLoadedAccountsDataSizeLimitInstruction<TProgram>);\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n isProgramDerivedAddress,\n ProgramDerivedAddress,\n} from '@solana/addresses';\nimport {\n AccountRole,\n IAccountMeta,\n upgradeRoleToSigner,\n} from '@solana/instructions';\nimport {\n IAccountSignerMeta,\n isTransactionSigner as web3JsIsTransactionSigner,\n TransactionSigner,\n} from '@solana/signers';\n\n/**\n * Asserts that the given value is not null or undefined.\n * @internal\n */\nexport function expectSome<T>(value: T | null | undefined): T {\n if (value == null) {\n throw new Error('Expected a value but received null or undefined.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a PublicKey.\n * @internal\n */\nexport function expectAddress<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): Address<T> {\n if (!value) {\n throw new Error('Expected a Address.');\n }\n if (typeof value === 'object' && 'address' in value) {\n return value.address;\n }\n if (Array.isArray(value)) {\n return value[0];\n }\n return value as Address<T>;\n}\n\n/**\n * Asserts that the given value is a PDA.\n * @internal\n */\nexport function expectProgramDerivedAddress<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): ProgramDerivedAddress<T> {\n if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {\n throw new Error('Expected a ProgramDerivedAddress.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a TransactionSigner.\n * @internal\n */\nexport function expectTransactionSigner<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): TransactionSigner<T> {\n if (!value || !isTransactionSigner(value)) {\n throw new Error('Expected a TransactionSigner.');\n }\n return value;\n}\n\n/**\n * Defines an instruction account to resolve.\n * @internal\n */\nexport type ResolvedAccount<\n T extends string = string,\n U extends\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null = Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null\n> = {\n isWritable: boolean;\n value: U;\n};\n\n/**\n * Add an account meta with a default role if only an address is provided.\n * @internal\n */\nexport function accountMetaWithDefault<\n TAccount extends string | IAccountMeta<string>,\n TRole extends AccountRole\n>(account: TAccount | undefined, role: TRole) {\n if (account === undefined) return undefined;\n return (\n typeof account === 'string' ? { address: account, role } : account\n ) as TAccount extends string\n ? { address: Address<TAccount>; role: TRole }\n : TAccount;\n}\n\n/**\n * Defines an instruction that stores additional bytes on-chain.\n * @internal\n */\nexport type IInstructionWithByteDelta = {\n byteDelta: number;\n};\n\n/**\n * Get account metas and signers from resolved accounts.\n * @internal\n */\nexport function getAccountMetasWithSigners<TKey extends string = string>(\n accounts: Record<TKey, ResolvedAccount>,\n optionalAccountStrategy: 'omitted' | 'programId',\n programAddress: Address\n): Record<TKey, IAccountMeta | IAccountSignerMeta> {\n const accountMetas: Record<string, IAccountMeta | IAccountSignerMeta> = {};\n\n Object.keys(accounts).forEach((key) => {\n const account = accounts[key as TKey] as ResolvedAccount;\n if (!account.value) {\n if (optionalAccountStrategy === 'omitted') return;\n accountMetas[key] = {\n address: programAddress,\n role: AccountRole.READONLY,\n };\n return;\n }\n\n const writableRole = account.isWritable\n ? AccountRole.WRITABLE\n : AccountRole.READONLY;\n accountMetas[key] = Object.freeze({\n address: expectAddress(account.value),\n role: isTransactionSigner(account.value)\n ? upgradeRoleToSigner(writableRole)\n : writableRole,\n ...(isTransactionSigner(account.value) ? { signer: account.value } : {}),\n });\n });\n\n return accountMetas;\n}\n\nexport function isTransactionSigner<TAddress extends string = string>(\n value:\n | Address<TAddress>\n | ProgramDerivedAddress<TAddress>\n | TransactionSigner<TAddress>\n): value is TransactionSigner<TAddress> {\n return (\n !!value &&\n typeof value === 'object' &&\n 'address' in value &&\n web3JsIsTransactionSigner(value)\n );\n}\n\nexport function memcmp(data: Uint8Array, bytes: Uint8Array, offset: number) {\n const slice = data.slice(offset, offset + bytes.length);\n if (slice.length !== bytes.length) return false;\n return bytes.every((b, i) => b === slice[i]);\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun kinobi to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
|
+
*/
|
|
8
|
+
export * from './instructions';
|
|
9
|
+
export * from './programs';
|
|
10
|
+
export * from './shared';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun kinobi to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
|
+
*/
|
|
8
|
+
export * from './requestHeapFrame';
|
|
9
|
+
export * from './requestUnits';
|
|
10
|
+
export * from './setComputeUnitLimit';
|
|
11
|
+
export * from './setComputeUnitPrice';
|
|
12
|
+
export * from './setLoadedAccountsDataSizeLimit';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun kinobi to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
|
+
*/
|
|
8
|
+
import { Address } from '@solana/addresses';
|
|
9
|
+
import { Codec, Decoder, Encoder } from '@solana/codecs';
|
|
10
|
+
import { IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/instructions';
|
|
11
|
+
export type RequestHeapFrameInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
12
|
+
export type RequestHeapFrameInstructionWithSigners<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
13
|
+
export type RequestHeapFrameInstructionData = {
|
|
14
|
+
discriminator: number;
|
|
15
|
+
/**
|
|
16
|
+
* Requested transaction-wide program heap size in bytes.
|
|
17
|
+
* Must be multiple of 1024. Applies to each program, including CPIs.
|
|
18
|
+
*/
|
|
19
|
+
bytes: number;
|
|
20
|
+
};
|
|
21
|
+
export type RequestHeapFrameInstructionDataArgs = {
|
|
22
|
+
/**
|
|
23
|
+
* Requested transaction-wide program heap size in bytes.
|
|
24
|
+
* Must be multiple of 1024. Applies to each program, including CPIs.
|
|
25
|
+
*/
|
|
26
|
+
bytes: number;
|
|
27
|
+
};
|
|
28
|
+
export declare function getRequestHeapFrameInstructionDataEncoder(): Encoder<RequestHeapFrameInstructionDataArgs>;
|
|
29
|
+
export declare function getRequestHeapFrameInstructionDataDecoder(): Decoder<RequestHeapFrameInstructionData>;
|
|
30
|
+
export declare function getRequestHeapFrameInstructionDataCodec(): Codec<RequestHeapFrameInstructionDataArgs, RequestHeapFrameInstructionData>;
|
|
31
|
+
export type RequestHeapFrameInput = {
|
|
32
|
+
bytes: RequestHeapFrameInstructionDataArgs['bytes'];
|
|
33
|
+
};
|
|
34
|
+
export type RequestHeapFrameInputWithSigners = {
|
|
35
|
+
bytes: RequestHeapFrameInstructionDataArgs['bytes'];
|
|
36
|
+
};
|
|
37
|
+
export declare function getRequestHeapFrameInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'>(input: RequestHeapFrameInputWithSigners): RequestHeapFrameInstructionWithSigners<TProgram>;
|
|
38
|
+
export declare function getRequestHeapFrameInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'>(input: RequestHeapFrameInput): RequestHeapFrameInstruction<TProgram>;
|
|
39
|
+
export declare function getRequestHeapFrameInstructionRaw<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []>(args: RequestHeapFrameInstructionDataArgs, programAddress?: Address<TProgram>, remainingAccounts?: TRemainingAccounts): RequestHeapFrameInstruction<TProgram, TRemainingAccounts>;
|
|
40
|
+
export type ParsedRequestHeapFrameInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'> = {
|
|
41
|
+
programAddress: Address<TProgram>;
|
|
42
|
+
data: RequestHeapFrameInstructionData;
|
|
43
|
+
};
|
|
44
|
+
export declare function parseRequestHeapFrameInstruction<TProgram extends string>(instruction: IInstruction<TProgram> & IInstructionWithData<Uint8Array>): ParsedRequestHeapFrameInstruction<TProgram>;
|
|
45
|
+
//# sourceMappingURL=requestHeapFrame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestHeapFrame.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/requestHeapFrame.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,KAAK,EACL,OAAO,EACP,OAAO,EASR,MAAM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SAAS,MAAM,GAAG,6CAA6C,EAEvE,KAAK,EAAE,gCAAgC,GACtC,sCAAsC,CAAC,QAAQ,CAAC,CAAC;AACpD,wBAAgB,8BAA8B,CAC5C,QAAQ,SAAS,MAAM,GAAG,6CAA6C,EACvE,KAAK,EAAE,qBAAqB,GAAG,2BAA2B,CAAC,QAAQ,CAAC,CAAC;AAmBvE,wBAAgB,iCAAiC,CAC/C,QAAQ,SAAS,MAAM,GAAG,6CAA6C,EACvE,kBAAkB,SAAS,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAE3D,IAAI,EAAE,mCAAmC,EACzC,cAAc,GAAE,OAAO,CAAC,QAAQ,CAAsE,EACtG,iBAAiB,CAAC,EAAE,kBAAkB,6DAOvC;AAED,MAAM,MAAM,iCAAiC,CAC3C,QAAQ,SAAS,MAAM,GAAG,6CAA6C,IACrE;IACF,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,IAAI,EAAE,+BAA+B,CAAC;CACvC,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,QAAQ,SAAS,MAAM,EACtE,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAC,UAAU,CAAC,GACrE,iCAAiC,CAAC,QAAQ,CAAC,CAK7C"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun kinobi to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
|
+
*/
|
|
8
|
+
import { Address } from '@solana/addresses';
|
|
9
|
+
import { Codec, Decoder, Encoder } from '@solana/codecs';
|
|
10
|
+
import { IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/instructions';
|
|
11
|
+
export type RequestUnitsInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
12
|
+
export type RequestUnitsInstructionWithSigners<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
13
|
+
export type RequestUnitsInstructionData = {
|
|
14
|
+
discriminator: number;
|
|
15
|
+
/** Units to request for transaction-wide compute. */
|
|
16
|
+
units: number;
|
|
17
|
+
/** Prioritization fee lamports. */
|
|
18
|
+
additionalFee: number;
|
|
19
|
+
};
|
|
20
|
+
export type RequestUnitsInstructionDataArgs = {
|
|
21
|
+
/** Units to request for transaction-wide compute. */
|
|
22
|
+
units: number;
|
|
23
|
+
/** Prioritization fee lamports. */
|
|
24
|
+
additionalFee: number;
|
|
25
|
+
};
|
|
26
|
+
export declare function getRequestUnitsInstructionDataEncoder(): Encoder<RequestUnitsInstructionDataArgs>;
|
|
27
|
+
export declare function getRequestUnitsInstructionDataDecoder(): Decoder<RequestUnitsInstructionData>;
|
|
28
|
+
export declare function getRequestUnitsInstructionDataCodec(): Codec<RequestUnitsInstructionDataArgs, RequestUnitsInstructionData>;
|
|
29
|
+
export type RequestUnitsInput = {
|
|
30
|
+
units: RequestUnitsInstructionDataArgs['units'];
|
|
31
|
+
additionalFee: RequestUnitsInstructionDataArgs['additionalFee'];
|
|
32
|
+
};
|
|
33
|
+
export type RequestUnitsInputWithSigners = {
|
|
34
|
+
units: RequestUnitsInstructionDataArgs['units'];
|
|
35
|
+
additionalFee: RequestUnitsInstructionDataArgs['additionalFee'];
|
|
36
|
+
};
|
|
37
|
+
export declare function getRequestUnitsInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'>(input: RequestUnitsInputWithSigners): RequestUnitsInstructionWithSigners<TProgram>;
|
|
38
|
+
export declare function getRequestUnitsInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'>(input: RequestUnitsInput): RequestUnitsInstruction<TProgram>;
|
|
39
|
+
export declare function getRequestUnitsInstructionRaw<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []>(args: RequestUnitsInstructionDataArgs, programAddress?: Address<TProgram>, remainingAccounts?: TRemainingAccounts): RequestUnitsInstruction<TProgram, TRemainingAccounts>;
|
|
40
|
+
export type ParsedRequestUnitsInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'> = {
|
|
41
|
+
programAddress: Address<TProgram>;
|
|
42
|
+
data: RequestUnitsInstructionData;
|
|
43
|
+
};
|
|
44
|
+
export declare function parseRequestUnitsInstruction<TProgram extends string>(instruction: IInstruction<TProgram> & IInstructionWithData<Uint8Array>): ParsedRequestUnitsInstruction<TProgram>;
|
|
45
|
+
//# sourceMappingURL=requestUnits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestUnits.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/requestUnits.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,KAAK,EACL,OAAO,EACP,OAAO,EASR,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,uBAAuB,CACjC,QAAQ,SAAS,MAAM,GAAG,6CAA6C,EACvE,kBAAkB,SAAS,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IACzD,YAAY,CAAC,QAAQ,CAAC,GACxB,oBAAoB,CAAC,UAAU,CAAC,GAChC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;AAE/C,MAAM,MAAM,kCAAkC,CAC5C,QAAQ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AC,QAAQ,CAAC,CAAC;AAmB/D,wBAAgB,6BAA6B,CAC3C,QAAQ,SAAS,MAAM,GAAG,6CAA6C,EACvE,kBAAkB,SAAS,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAE3D,IAAI,EAAE,+BAA+B,EACrC,cAAc,GAAE,OAAO,CAAC,QAAQ,CAAsE,EACtG,iBAAiB,CAAC,EAAE,kBAAkB,yDAOvC;AAED,MAAM,MAAM,6BAA6B,CACvC,QAAQ,SAAS,MAAM,GAAG,6CAA6C,IACrE;IACF,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,IAAI,EAAE,2BAA2B,CAAC;CACnC,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,QAAQ,SAAS,MAAM,EAClE,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAC,UAAU,CAAC,GACrE,6BAA6B,CAAC,QAAQ,CAAC,CAKzC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun kinobi to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
|
+
*/
|
|
8
|
+
import { Address } from '@solana/addresses';
|
|
9
|
+
import { Codec, Decoder, Encoder } from '@solana/codecs';
|
|
10
|
+
import { IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/instructions';
|
|
11
|
+
export type SetComputeUnitLimitInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
12
|
+
export type SetComputeUnitLimitInstructionWithSigners<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
13
|
+
export type SetComputeUnitLimitInstructionData = {
|
|
14
|
+
discriminator: number;
|
|
15
|
+
/** Transaction-wide compute unit limit. */
|
|
16
|
+
units: number;
|
|
17
|
+
};
|
|
18
|
+
export type SetComputeUnitLimitInstructionDataArgs = {
|
|
19
|
+
/** Transaction-wide compute unit limit. */
|
|
20
|
+
units: number;
|
|
21
|
+
};
|
|
22
|
+
export declare function getSetComputeUnitLimitInstructionDataEncoder(): Encoder<SetComputeUnitLimitInstructionDataArgs>;
|
|
23
|
+
export declare function getSetComputeUnitLimitInstructionDataDecoder(): Decoder<SetComputeUnitLimitInstructionData>;
|
|
24
|
+
export declare function getSetComputeUnitLimitInstructionDataCodec(): Codec<SetComputeUnitLimitInstructionDataArgs, SetComputeUnitLimitInstructionData>;
|
|
25
|
+
export type SetComputeUnitLimitInput = {
|
|
26
|
+
units: SetComputeUnitLimitInstructionDataArgs['units'];
|
|
27
|
+
};
|
|
28
|
+
export type SetComputeUnitLimitInputWithSigners = {
|
|
29
|
+
units: SetComputeUnitLimitInstructionDataArgs['units'];
|
|
30
|
+
};
|
|
31
|
+
export declare function getSetComputeUnitLimitInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'>(input: SetComputeUnitLimitInputWithSigners): SetComputeUnitLimitInstructionWithSigners<TProgram>;
|
|
32
|
+
export declare function getSetComputeUnitLimitInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'>(input: SetComputeUnitLimitInput): SetComputeUnitLimitInstruction<TProgram>;
|
|
33
|
+
export declare function getSetComputeUnitLimitInstructionRaw<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []>(args: SetComputeUnitLimitInstructionDataArgs, programAddress?: Address<TProgram>, remainingAccounts?: TRemainingAccounts): SetComputeUnitLimitInstruction<TProgram, TRemainingAccounts>;
|
|
34
|
+
export type ParsedSetComputeUnitLimitInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'> = {
|
|
35
|
+
programAddress: Address<TProgram>;
|
|
36
|
+
data: SetComputeUnitLimitInstructionData;
|
|
37
|
+
};
|
|
38
|
+
export declare function parseSetComputeUnitLimitInstruction<TProgram extends string>(instruction: IInstruction<TProgram> & IInstructionWithData<Uint8Array>): ParsedSetComputeUnitLimitInstruction<TProgram>;
|
|
39
|
+
//# sourceMappingURL=setComputeUnitLimit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setComputeUnitLimit.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/setComputeUnitLimit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,KAAK,EACL,OAAO,EACP,OAAO,EASR,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,8BAA8B,CACxC,QAAQ,SAAS,MAAM,GAAG,6CAA6C,EACvE,kBAAkB,SAAS,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IACzD,YAAY,CAAC,QAAQ,CAAC,GACxB,oBAAoB,CAAC,UAAU,CAAC,GAChC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;AAE/C,MAAM,MAAM,yCAAyC,CACnD,QAAQ,SAAS,MAAM,GAAG,6CAA6C,EACvE,kBAAkB,SAAS,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IACzD,YAAY,CAAC,QAAQ,CAAC,GACxB,oBAAoB,CAAC,UAAU,CAAC,GAChC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;AAE/C,MAAM,MAAM,kCAAkC,GAAG;IAC/C,aAAa,E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