@solana-program/compute-budget 0.2.0 → 0.3.1
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/src/index.cjs +48 -124
- package/dist/src/index.cjs.map +1 -1
- package/dist/src/index.js +12 -80
- package/dist/src/index.js.map +1 -1
- package/dist/types/src/generated/index.d.ts +0 -1
- package/dist/types/src/generated/index.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/requestHeapFrame.d.ts +1 -3
- package/dist/types/src/generated/instructions/requestHeapFrame.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/requestUnits.d.ts +1 -3
- package/dist/types/src/generated/instructions/requestUnits.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/setComputeUnitLimit.d.ts +1 -3
- package/dist/types/src/generated/instructions/setComputeUnitLimit.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/setComputeUnitPrice.d.ts +1 -3
- package/dist/types/src/generated/instructions/setComputeUnitPrice.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/setLoadedAccountsDataSizeLimit.d.ts +1 -3
- package/dist/types/src/generated/instructions/setLoadedAccountsDataSizeLimit.d.ts.map +1 -1
- package/dist/types/src/generated/programs/computeBudget.d.ts +1 -4
- package/dist/types/src/generated/programs/computeBudget.d.ts.map +1 -1
- package/dist/types/src/generated/shared/index.d.ts +1 -4
- package/dist/types/src/generated/shared/index.d.ts.map +1 -1
- package/dist/types/test/_setup.d.ts +5 -5
- package/dist/types/test/_setup.d.ts.map +1 -1
- package/package.json +5 -10
package/dist/src/index.cjs
CHANGED
|
@@ -1,77 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var addresses = require('@solana/addresses');
|
|
5
|
-
var instructions = require('@solana/instructions');
|
|
6
|
-
var signers = require('@solana/signers');
|
|
3
|
+
var web3_js = require('@solana/web3.js');
|
|
7
4
|
|
|
8
5
|
// src/generated/instructions/requestHeapFrame.ts
|
|
9
|
-
function expectSome(value) {
|
|
10
|
-
if (value == null) {
|
|
11
|
-
throw new Error("Expected a value but received null or undefined.");
|
|
12
|
-
}
|
|
13
|
-
return value;
|
|
14
|
-
}
|
|
15
|
-
function expectAddress(value) {
|
|
16
|
-
if (!value) {
|
|
17
|
-
throw new Error("Expected a Address.");
|
|
18
|
-
}
|
|
19
|
-
if (typeof value === "object" && "address" in value) {
|
|
20
|
-
return value.address;
|
|
21
|
-
}
|
|
22
|
-
if (Array.isArray(value)) {
|
|
23
|
-
return value[0];
|
|
24
|
-
}
|
|
25
|
-
return value;
|
|
26
|
-
}
|
|
27
|
-
function expectProgramDerivedAddress(value) {
|
|
28
|
-
if (!value || !Array.isArray(value) || !addresses.isProgramDerivedAddress(value)) {
|
|
29
|
-
throw new Error("Expected a ProgramDerivedAddress.");
|
|
30
|
-
}
|
|
31
|
-
return value;
|
|
32
|
-
}
|
|
33
|
-
function expectTransactionSigner(value) {
|
|
34
|
-
if (!value || !isTransactionSigner(value)) {
|
|
35
|
-
throw new Error("Expected a TransactionSigner.");
|
|
36
|
-
}
|
|
37
|
-
return value;
|
|
38
|
-
}
|
|
39
|
-
function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
|
|
40
|
-
return (account) => {
|
|
41
|
-
if (!account.value) {
|
|
42
|
-
if (optionalAccountStrategy === "omitted")
|
|
43
|
-
return;
|
|
44
|
-
return Object.freeze({
|
|
45
|
-
address: programAddress,
|
|
46
|
-
role: instructions.AccountRole.READONLY
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
const writableRole = account.isWritable ? instructions.AccountRole.WRITABLE : instructions.AccountRole.READONLY;
|
|
50
|
-
return Object.freeze({
|
|
51
|
-
address: expectAddress(account.value),
|
|
52
|
-
role: isTransactionSigner(account.value) ? instructions.upgradeRoleToSigner(writableRole) : writableRole,
|
|
53
|
-
...isTransactionSigner(account.value) ? { signer: account.value } : {}
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
function isTransactionSigner(value) {
|
|
58
|
-
return !!value && typeof value === "object" && "address" in value && signers.isTransactionSigner(value);
|
|
59
|
-
}
|
|
60
|
-
function memcmp(data, bytes, offset) {
|
|
61
|
-
const slice = data.slice(offset, offset + bytes.length);
|
|
62
|
-
if (slice.length !== bytes.length)
|
|
63
|
-
return false;
|
|
64
|
-
return bytes.every((b, i) => b === slice[i]);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// src/generated/programs/computeBudget.ts
|
|
68
6
|
var COMPUTE_BUDGET_PROGRAM_ADDRESS = "ComputeBudget111111111111111111111111111111";
|
|
69
|
-
function getComputeBudgetProgram() {
|
|
70
|
-
return {
|
|
71
|
-
name: "computeBudget",
|
|
72
|
-
address: COMPUTE_BUDGET_PROGRAM_ADDRESS
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
7
|
var ComputeBudgetInstruction = /* @__PURE__ */ ((ComputeBudgetInstruction2) => {
|
|
76
8
|
ComputeBudgetInstruction2[ComputeBudgetInstruction2["RequestUnits"] = 0] = "RequestUnits";
|
|
77
9
|
ComputeBudgetInstruction2[ComputeBudgetInstruction2["RequestHeapFrame"] = 1] = "RequestHeapFrame";
|
|
@@ -82,19 +14,19 @@ var ComputeBudgetInstruction = /* @__PURE__ */ ((ComputeBudgetInstruction2) => {
|
|
|
82
14
|
})(ComputeBudgetInstruction || {});
|
|
83
15
|
function identifyComputeBudgetInstruction(instruction) {
|
|
84
16
|
const data = instruction instanceof Uint8Array ? instruction : instruction.data;
|
|
85
|
-
if (
|
|
17
|
+
if (web3_js.containsBytes(data, web3_js.getU8Encoder().encode(0), 0)) {
|
|
86
18
|
return 0 /* RequestUnits */;
|
|
87
19
|
}
|
|
88
|
-
if (
|
|
20
|
+
if (web3_js.containsBytes(data, web3_js.getU8Encoder().encode(1), 0)) {
|
|
89
21
|
return 1 /* RequestHeapFrame */;
|
|
90
22
|
}
|
|
91
|
-
if (
|
|
23
|
+
if (web3_js.containsBytes(data, web3_js.getU8Encoder().encode(2), 0)) {
|
|
92
24
|
return 2 /* SetComputeUnitLimit */;
|
|
93
25
|
}
|
|
94
|
-
if (
|
|
26
|
+
if (web3_js.containsBytes(data, web3_js.getU8Encoder().encode(3), 0)) {
|
|
95
27
|
return 3 /* SetComputeUnitPrice */;
|
|
96
28
|
}
|
|
97
|
-
if (
|
|
29
|
+
if (web3_js.containsBytes(data, web3_js.getU8Encoder().encode(4), 0)) {
|
|
98
30
|
return 4 /* SetLoadedAccountsDataSizeLimit */;
|
|
99
31
|
}
|
|
100
32
|
throw new Error(
|
|
@@ -104,22 +36,22 @@ function identifyComputeBudgetInstruction(instruction) {
|
|
|
104
36
|
|
|
105
37
|
// src/generated/instructions/requestHeapFrame.ts
|
|
106
38
|
function getRequestHeapFrameInstructionDataEncoder() {
|
|
107
|
-
return
|
|
108
|
-
|
|
109
|
-
["discriminator",
|
|
110
|
-
["bytes",
|
|
39
|
+
return web3_js.transformEncoder(
|
|
40
|
+
web3_js.getStructEncoder([
|
|
41
|
+
["discriminator", web3_js.getU8Encoder()],
|
|
42
|
+
["bytes", web3_js.getU32Encoder()]
|
|
111
43
|
]),
|
|
112
44
|
(value) => ({ ...value, discriminator: 1 })
|
|
113
45
|
);
|
|
114
46
|
}
|
|
115
47
|
function getRequestHeapFrameInstructionDataDecoder() {
|
|
116
|
-
return
|
|
117
|
-
["discriminator",
|
|
118
|
-
["bytes",
|
|
48
|
+
return web3_js.getStructDecoder([
|
|
49
|
+
["discriminator", web3_js.getU8Decoder()],
|
|
50
|
+
["bytes", web3_js.getU32Decoder()]
|
|
119
51
|
]);
|
|
120
52
|
}
|
|
121
53
|
function getRequestHeapFrameInstructionDataCodec() {
|
|
122
|
-
return
|
|
54
|
+
return web3_js.combineCodec(
|
|
123
55
|
getRequestHeapFrameInstructionDataEncoder(),
|
|
124
56
|
getRequestHeapFrameInstructionDataDecoder()
|
|
125
57
|
);
|
|
@@ -142,24 +74,24 @@ function parseRequestHeapFrameInstruction(instruction) {
|
|
|
142
74
|
};
|
|
143
75
|
}
|
|
144
76
|
function getRequestUnitsInstructionDataEncoder() {
|
|
145
|
-
return
|
|
146
|
-
|
|
147
|
-
["discriminator",
|
|
148
|
-
["units",
|
|
149
|
-
["additionalFee",
|
|
77
|
+
return web3_js.transformEncoder(
|
|
78
|
+
web3_js.getStructEncoder([
|
|
79
|
+
["discriminator", web3_js.getU8Encoder()],
|
|
80
|
+
["units", web3_js.getU32Encoder()],
|
|
81
|
+
["additionalFee", web3_js.getU32Encoder()]
|
|
150
82
|
]),
|
|
151
83
|
(value) => ({ ...value, discriminator: 0 })
|
|
152
84
|
);
|
|
153
85
|
}
|
|
154
86
|
function getRequestUnitsInstructionDataDecoder() {
|
|
155
|
-
return
|
|
156
|
-
["discriminator",
|
|
157
|
-
["units",
|
|
158
|
-
["additionalFee",
|
|
87
|
+
return web3_js.getStructDecoder([
|
|
88
|
+
["discriminator", web3_js.getU8Decoder()],
|
|
89
|
+
["units", web3_js.getU32Decoder()],
|
|
90
|
+
["additionalFee", web3_js.getU32Decoder()]
|
|
159
91
|
]);
|
|
160
92
|
}
|
|
161
93
|
function getRequestUnitsInstructionDataCodec() {
|
|
162
|
-
return
|
|
94
|
+
return web3_js.combineCodec(
|
|
163
95
|
getRequestUnitsInstructionDataEncoder(),
|
|
164
96
|
getRequestUnitsInstructionDataDecoder()
|
|
165
97
|
);
|
|
@@ -182,22 +114,22 @@ function parseRequestUnitsInstruction(instruction) {
|
|
|
182
114
|
};
|
|
183
115
|
}
|
|
184
116
|
function getSetComputeUnitLimitInstructionDataEncoder() {
|
|
185
|
-
return
|
|
186
|
-
|
|
187
|
-
["discriminator",
|
|
188
|
-
["units",
|
|
117
|
+
return web3_js.transformEncoder(
|
|
118
|
+
web3_js.getStructEncoder([
|
|
119
|
+
["discriminator", web3_js.getU8Encoder()],
|
|
120
|
+
["units", web3_js.getU32Encoder()]
|
|
189
121
|
]),
|
|
190
122
|
(value) => ({ ...value, discriminator: 2 })
|
|
191
123
|
);
|
|
192
124
|
}
|
|
193
125
|
function getSetComputeUnitLimitInstructionDataDecoder() {
|
|
194
|
-
return
|
|
195
|
-
["discriminator",
|
|
196
|
-
["units",
|
|
126
|
+
return web3_js.getStructDecoder([
|
|
127
|
+
["discriminator", web3_js.getU8Decoder()],
|
|
128
|
+
["units", web3_js.getU32Decoder()]
|
|
197
129
|
]);
|
|
198
130
|
}
|
|
199
131
|
function getSetComputeUnitLimitInstructionDataCodec() {
|
|
200
|
-
return
|
|
132
|
+
return web3_js.combineCodec(
|
|
201
133
|
getSetComputeUnitLimitInstructionDataEncoder(),
|
|
202
134
|
getSetComputeUnitLimitInstructionDataDecoder()
|
|
203
135
|
);
|
|
@@ -222,22 +154,22 @@ function parseSetComputeUnitLimitInstruction(instruction) {
|
|
|
222
154
|
};
|
|
223
155
|
}
|
|
224
156
|
function getSetComputeUnitPriceInstructionDataEncoder() {
|
|
225
|
-
return
|
|
226
|
-
|
|
227
|
-
["discriminator",
|
|
228
|
-
["microLamports",
|
|
157
|
+
return web3_js.transformEncoder(
|
|
158
|
+
web3_js.getStructEncoder([
|
|
159
|
+
["discriminator", web3_js.getU8Encoder()],
|
|
160
|
+
["microLamports", web3_js.getU64Encoder()]
|
|
229
161
|
]),
|
|
230
162
|
(value) => ({ ...value, discriminator: 3 })
|
|
231
163
|
);
|
|
232
164
|
}
|
|
233
165
|
function getSetComputeUnitPriceInstructionDataDecoder() {
|
|
234
|
-
return
|
|
235
|
-
["discriminator",
|
|
236
|
-
["microLamports",
|
|
166
|
+
return web3_js.getStructDecoder([
|
|
167
|
+
["discriminator", web3_js.getU8Decoder()],
|
|
168
|
+
["microLamports", web3_js.getU64Decoder()]
|
|
237
169
|
]);
|
|
238
170
|
}
|
|
239
171
|
function getSetComputeUnitPriceInstructionDataCodec() {
|
|
240
|
-
return
|
|
172
|
+
return web3_js.combineCodec(
|
|
241
173
|
getSetComputeUnitPriceInstructionDataEncoder(),
|
|
242
174
|
getSetComputeUnitPriceInstructionDataDecoder()
|
|
243
175
|
);
|
|
@@ -262,22 +194,22 @@ function parseSetComputeUnitPriceInstruction(instruction) {
|
|
|
262
194
|
};
|
|
263
195
|
}
|
|
264
196
|
function getSetLoadedAccountsDataSizeLimitInstructionDataEncoder() {
|
|
265
|
-
return
|
|
266
|
-
|
|
267
|
-
["discriminator",
|
|
268
|
-
["accountDataSizeLimit",
|
|
197
|
+
return web3_js.transformEncoder(
|
|
198
|
+
web3_js.getStructEncoder([
|
|
199
|
+
["discriminator", web3_js.getU8Encoder()],
|
|
200
|
+
["accountDataSizeLimit", web3_js.getU32Encoder()]
|
|
269
201
|
]),
|
|
270
202
|
(value) => ({ ...value, discriminator: 4 })
|
|
271
203
|
);
|
|
272
204
|
}
|
|
273
205
|
function getSetLoadedAccountsDataSizeLimitInstructionDataDecoder() {
|
|
274
|
-
return
|
|
275
|
-
["discriminator",
|
|
276
|
-
["accountDataSizeLimit",
|
|
206
|
+
return web3_js.getStructDecoder([
|
|
207
|
+
["discriminator", web3_js.getU8Decoder()],
|
|
208
|
+
["accountDataSizeLimit", web3_js.getU32Decoder()]
|
|
277
209
|
]);
|
|
278
210
|
}
|
|
279
211
|
function getSetLoadedAccountsDataSizeLimitInstructionDataCodec() {
|
|
280
|
-
return
|
|
212
|
+
return web3_js.combineCodec(
|
|
281
213
|
getSetLoadedAccountsDataSizeLimitInstructionDataEncoder(),
|
|
282
214
|
getSetLoadedAccountsDataSizeLimitInstructionDataDecoder()
|
|
283
215
|
);
|
|
@@ -304,12 +236,6 @@ function parseSetLoadedAccountsDataSizeLimitInstruction(instruction) {
|
|
|
304
236
|
|
|
305
237
|
exports.COMPUTE_BUDGET_PROGRAM_ADDRESS = COMPUTE_BUDGET_PROGRAM_ADDRESS;
|
|
306
238
|
exports.ComputeBudgetInstruction = ComputeBudgetInstruction;
|
|
307
|
-
exports.expectAddress = expectAddress;
|
|
308
|
-
exports.expectProgramDerivedAddress = expectProgramDerivedAddress;
|
|
309
|
-
exports.expectSome = expectSome;
|
|
310
|
-
exports.expectTransactionSigner = expectTransactionSigner;
|
|
311
|
-
exports.getAccountMetaFactory = getAccountMetaFactory;
|
|
312
|
-
exports.getComputeBudgetProgram = getComputeBudgetProgram;
|
|
313
239
|
exports.getRequestHeapFrameInstruction = getRequestHeapFrameInstruction;
|
|
314
240
|
exports.getRequestHeapFrameInstructionDataCodec = getRequestHeapFrameInstructionDataCodec;
|
|
315
241
|
exports.getRequestHeapFrameInstructionDataDecoder = getRequestHeapFrameInstructionDataDecoder;
|
|
@@ -331,8 +257,6 @@ exports.getSetLoadedAccountsDataSizeLimitInstructionDataCodec = getSetLoadedAcco
|
|
|
331
257
|
exports.getSetLoadedAccountsDataSizeLimitInstructionDataDecoder = getSetLoadedAccountsDataSizeLimitInstructionDataDecoder;
|
|
332
258
|
exports.getSetLoadedAccountsDataSizeLimitInstructionDataEncoder = getSetLoadedAccountsDataSizeLimitInstructionDataEncoder;
|
|
333
259
|
exports.identifyComputeBudgetInstruction = identifyComputeBudgetInstruction;
|
|
334
|
-
exports.isTransactionSigner = isTransactionSigner;
|
|
335
|
-
exports.memcmp = memcmp;
|
|
336
260
|
exports.parseRequestHeapFrameInstruction = parseRequestHeapFrameInstruction;
|
|
337
261
|
exports.parseRequestUnitsInstruction = parseRequestUnitsInstruction;
|
|
338
262
|
exports.parseSetComputeUnitLimitInstruction = parseSetComputeUnitLimitInstruction;
|
package/dist/src/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/generated/instructions/requestHeapFrame.ts","../../src/generated/programs/computeBudget.ts","../../src/generated/shared/index.ts","../../src/generated/instructions/requestUnits.ts","../../src/generated/instructions/setComputeUnitLimit.ts","../../src/generated/instructions/setComputeUnitPrice.ts","../../src/generated/instructions/setLoadedAccountsDataSizeLimit.ts"],"names":["getU8Encoder","ComputeBudgetInstruction","combineCodec","getStructDecoder","getStructEncoder","getU32Decoder","getU32Encoder","getU8Decoder","mapEncoder"],"mappings":";AASA;AAA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AAA,IACL,gBAAgB,YAAY;AAAA,IAC5B,MAAM,6CAA6C,EAAE;AAAA,MACnD,YAAY;AAAA,IACd;AAAA,EACF;AACF;;;ACzGA;AAAA,EAIE,gBAAAA;AAAA,EACA,oBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAP;AAAA,EACA,cAAAQ;AAAA,OACK;AAyBA,SAAS,0DAAsH;AACpI,SAAOA;AAAA,IACLJ,kBAAiB;AAAA,MACf,CAAC,iBAAiBJ,cAAa,CAAC;AAAA,MAChC,CAAC,wBAAwBM,eAAc,CAAC;AAAA,IAC1C,CAAC;AAAA,IACD,CAAC,WAAW,EAAE,GAAG,OAAO,eAAe,EAAE;AAAA,EAC3C;AACF;AAEO,SAAS,0DAAkH;AAChI,SAAOH,kBAAiB;AAAA,IACtB,CAAC,iBAAiBI,cAAa,CAAC;AAAA,IAChC,CAAC,wBAAwBF,eAAc,CAAC;AAAA,EAC1C,CAAC;AACH;AAEO,SAAS,wDAGd;AACA,SAAOH;AAAA,IACL,wDAAwD;AAAA,IACxD,wDAAwD;AAAA,EAC1D;AACF;AAMO,SAAS,6CACd,OAGA;AAEA,QAAM,iBAAiB;AAGvB,QAAM,OAAO,EAAE,GAAG,MAAM;AAExB,QAAM,cAAc;AAAA,IAClB;AAAA,IACA,MAAM,wDAAwD,EAAE;AAAA,MAC9D;AAAA,IACF;AAAA,EACF;AAIA,SAAO;AACT;AASO,SAAS,+CAGd,aAC2D;AAC3D,SAAO;AAAA,IACL,gBAAgB,YAAY;AAAA,IAC5B,MAAM,wDAAwD,EAAE;AAAA,MAC9D,YAAY;AAAA,IACd;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';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type RequestHeapFrameInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 function getRequestHeapFrameInstruction(\n input: RequestHeapFrameInput\n): RequestHeapFrameInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getRequestHeapFrameInstructionDataEncoder().encode(\n args as RequestHeapFrameInstructionDataArgs\n ),\n } as RequestHeapFrameInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedRequestHeapFrameInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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 { 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 =\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null,\n> = {\n isWritable: boolean;\n value: U;\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 getAccountMetaFactory(\n programAddress: Address,\n optionalAccountStrategy: 'omitted' | 'programId'\n) {\n return (\n account: ResolvedAccount\n ): IAccountMeta | IAccountSignerMeta | undefined => {\n if (!account.value) {\n if (optionalAccountStrategy === 'omitted') return;\n return Object.freeze({\n address: programAddress,\n role: AccountRole.READONLY,\n });\n }\n\n const writableRole = account.isWritable\n ? AccountRole.WRITABLE\n : AccountRole.READONLY;\n return 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\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","/**\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';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type RequestUnitsInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 function getRequestUnitsInstruction(\n input: RequestUnitsInput\n): RequestUnitsInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getRequestUnitsInstructionDataEncoder().encode(\n args as RequestUnitsInstructionDataArgs\n ),\n } as RequestUnitsInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedRequestUnitsInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type SetComputeUnitLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 function getSetComputeUnitLimitInstruction(\n input: SetComputeUnitLimitInput\n): SetComputeUnitLimitInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getSetComputeUnitLimitInstructionDataEncoder().encode(\n args as SetComputeUnitLimitInstructionDataArgs\n ),\n } as SetComputeUnitLimitInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedSetComputeUnitLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type SetComputeUnitPriceInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 function getSetComputeUnitPriceInstruction(\n input: SetComputeUnitPriceInput\n): SetComputeUnitPriceInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getSetComputeUnitPriceInstructionDataEncoder().encode(\n args as SetComputeUnitPriceInstructionDataArgs\n ),\n } as SetComputeUnitPriceInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedSetComputeUnitPriceInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type SetLoadedAccountsDataSizeLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 function getSetLoadedAccountsDataSizeLimitInstruction(\n input: SetLoadedAccountsDataSizeLimitInput\n): SetLoadedAccountsDataSizeLimitInstruction<\n typeof COMPUTE_BUDGET_PROGRAM_ADDRESS\n> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getSetLoadedAccountsDataSizeLimitInstructionDataEncoder().encode(\n args as SetLoadedAccountsDataSizeLimitInstructionDataArgs\n ),\n } as SetLoadedAccountsDataSizeLimitInstruction<\n typeof COMPUTE_BUDGET_PROGRAM_ADDRESS\n >;\n\n return instruction;\n}\n\nexport type ParsedSetLoadedAccountsDataSizeLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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"]}
|
|
1
|
+
{"version":3,"sources":["../../src/generated/instructions/requestHeapFrame.ts","../../src/generated/programs/computeBudget.ts","../../src/generated/instructions/requestUnits.ts","../../src/generated/instructions/setComputeUnitLimit.ts","../../src/generated/instructions/setComputeUnitPrice.ts","../../src/generated/instructions/setLoadedAccountsDataSizeLimit.ts"],"names":["getU8Encoder","ComputeBudgetInstruction","combineCodec","getStructDecoder","getStructEncoder","getU32Decoder","getU32Encoder","getU8Decoder","transformEncoder"],"mappings":";AAQA;AAAA,EASE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAAA;AAAA,EACA;AAAA,OACK;;;ACjBP,SAAkB,eAAe,oBAAoB;AAS9C,IAAM,iCACX;AAEK,IAAK,2BAAL,kBAAKC,8BAAL;AACL,EAAAA,oDAAA;AACA,EAAAA,oDAAA;AACA,EAAAA,oDAAA;AACA,EAAAA,oDAAA;AACA,EAAAA,oDAAA;AALU,SAAAA;AAAA,GAAA;AAQL,SAAS,iCACd,aAC0B;AAC1B,QAAM,OACJ,uBAAuB,aAAa,cAAc,YAAY;AAChE,MAAI,cAAc,MAAM,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;AACpD,WAAO;AAAA,EACT;AACA,MAAI,cAAc,MAAM,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;AACpD,WAAO;AAAA,EACT;AACA,MAAI,cAAc,M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DAAwD,EAAE;AAAA,MAC9D,YAAY;AAAA,IACd;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 {\n Address,\n Codec,\n Decoder,\n Encoder,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n} from '@solana/web3.js';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type RequestHeapFrameInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 transformEncoder(\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 function getRequestHeapFrameInstruction(\n input: RequestHeapFrameInput\n): RequestHeapFrameInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getRequestHeapFrameInstructionDataEncoder().encode(\n args as RequestHeapFrameInstructionDataArgs\n ),\n } as RequestHeapFrameInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedRequestHeapFrameInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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, containsBytes, getU8Encoder } from '@solana/web3.js';\nimport {\n ParsedRequestHeapFrameInstruction,\n ParsedRequestUnitsInstruction,\n ParsedSetComputeUnitLimitInstruction,\n ParsedSetComputeUnitPriceInstruction,\n ParsedSetLoadedAccountsDataSizeLimitInstruction,\n} from '../instructions';\n\nexport const COMPUTE_BUDGET_PROGRAM_ADDRESS =\n 'ComputeBudget111111111111111111111111111111' as Address<'ComputeBudget111111111111111111111111111111'>;\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 (containsBytes(data, getU8Encoder().encode(0), 0)) {\n return ComputeBudgetInstruction.RequestUnits;\n }\n if (containsBytes(data, getU8Encoder().encode(1), 0)) {\n return ComputeBudgetInstruction.RequestHeapFrame;\n }\n if (containsBytes(data, getU8Encoder().encode(2), 0)) {\n return ComputeBudgetInstruction.SetComputeUnitLimit;\n }\n if (containsBytes(data, getU8Encoder().encode(3), 0)) {\n return ComputeBudgetInstruction.SetComputeUnitPrice;\n }\n if (containsBytes(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 Codec,\n Decoder,\n Encoder,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n} from '@solana/web3.js';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type RequestUnitsInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 transformEncoder(\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 function getRequestUnitsInstruction(\n input: RequestUnitsInput\n): RequestUnitsInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getRequestUnitsInstructionDataEncoder().encode(\n args as RequestUnitsInstructionDataArgs\n ),\n } as RequestUnitsInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedRequestUnitsInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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 {\n Address,\n Codec,\n Decoder,\n Encoder,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n} from '@solana/web3.js';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type SetComputeUnitLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 transformEncoder(\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 function getSetComputeUnitLimitInstruction(\n input: SetComputeUnitLimitInput\n): SetComputeUnitLimitInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getSetComputeUnitLimitInstructionDataEncoder().encode(\n args as SetComputeUnitLimitInstructionDataArgs\n ),\n } as SetComputeUnitLimitInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedSetComputeUnitLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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 {\n Address,\n Codec,\n Decoder,\n Encoder,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n} from '@solana/web3.js';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type SetComputeUnitPriceInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 transformEncoder(\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 function getSetComputeUnitPriceInstruction(\n input: SetComputeUnitPriceInput\n): SetComputeUnitPriceInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getSetComputeUnitPriceInstructionDataEncoder().encode(\n args as SetComputeUnitPriceInstructionDataArgs\n ),\n } as SetComputeUnitPriceInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedSetComputeUnitPriceInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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 {\n Address,\n Codec,\n Decoder,\n Encoder,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n} from '@solana/web3.js';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type SetLoadedAccountsDataSizeLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 transformEncoder(\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 function getSetLoadedAccountsDataSizeLimitInstruction(\n input: SetLoadedAccountsDataSizeLimitInput\n): SetLoadedAccountsDataSizeLimitInstruction<\n typeof COMPUTE_BUDGET_PROGRAM_ADDRESS\n> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getSetLoadedAccountsDataSizeLimitInstructionDataEncoder().encode(\n args as SetLoadedAccountsDataSizeLimitInstructionDataArgs\n ),\n } as SetLoadedAccountsDataSizeLimitInstruction<\n typeof COMPUTE_BUDGET_PROGRAM_ADDRESS\n >;\n\n return instruction;\n}\n\nexport type ParsedSetLoadedAccountsDataSizeLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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"]}
|
package/dist/src/index.js
CHANGED
|
@@ -1,75 +1,7 @@
|
|
|
1
|
-
import { getU8Encoder,
|
|
2
|
-
import { isProgramDerivedAddress } from '@solana/addresses';
|
|
3
|
-
import { AccountRole, upgradeRoleToSigner } from '@solana/instructions';
|
|
4
|
-
import { isTransactionSigner as isTransactionSigner$1 } from '@solana/signers';
|
|
1
|
+
import { containsBytes, getU8Encoder, transformEncoder, getStructEncoder, getU32Encoder, getStructDecoder, getU8Decoder, getU32Decoder, combineCodec, getU64Encoder, getU64Decoder } from '@solana/web3.js';
|
|
5
2
|
|
|
6
3
|
// src/generated/instructions/requestHeapFrame.ts
|
|
7
|
-
function expectSome(value) {
|
|
8
|
-
if (value == null) {
|
|
9
|
-
throw new Error("Expected a value but received null or undefined.");
|
|
10
|
-
}
|
|
11
|
-
return value;
|
|
12
|
-
}
|
|
13
|
-
function expectAddress(value) {
|
|
14
|
-
if (!value) {
|
|
15
|
-
throw new Error("Expected a Address.");
|
|
16
|
-
}
|
|
17
|
-
if (typeof value === "object" && "address" in value) {
|
|
18
|
-
return value.address;
|
|
19
|
-
}
|
|
20
|
-
if (Array.isArray(value)) {
|
|
21
|
-
return value[0];
|
|
22
|
-
}
|
|
23
|
-
return value;
|
|
24
|
-
}
|
|
25
|
-
function expectProgramDerivedAddress(value) {
|
|
26
|
-
if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {
|
|
27
|
-
throw new Error("Expected a ProgramDerivedAddress.");
|
|
28
|
-
}
|
|
29
|
-
return value;
|
|
30
|
-
}
|
|
31
|
-
function expectTransactionSigner(value) {
|
|
32
|
-
if (!value || !isTransactionSigner(value)) {
|
|
33
|
-
throw new Error("Expected a TransactionSigner.");
|
|
34
|
-
}
|
|
35
|
-
return value;
|
|
36
|
-
}
|
|
37
|
-
function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
|
|
38
|
-
return (account) => {
|
|
39
|
-
if (!account.value) {
|
|
40
|
-
if (optionalAccountStrategy === "omitted")
|
|
41
|
-
return;
|
|
42
|
-
return Object.freeze({
|
|
43
|
-
address: programAddress,
|
|
44
|
-
role: AccountRole.READONLY
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
|
|
48
|
-
return Object.freeze({
|
|
49
|
-
address: expectAddress(account.value),
|
|
50
|
-
role: isTransactionSigner(account.value) ? upgradeRoleToSigner(writableRole) : writableRole,
|
|
51
|
-
...isTransactionSigner(account.value) ? { signer: account.value } : {}
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function isTransactionSigner(value) {
|
|
56
|
-
return !!value && typeof value === "object" && "address" in value && isTransactionSigner$1(value);
|
|
57
|
-
}
|
|
58
|
-
function memcmp(data, bytes, offset) {
|
|
59
|
-
const slice = data.slice(offset, offset + bytes.length);
|
|
60
|
-
if (slice.length !== bytes.length)
|
|
61
|
-
return false;
|
|
62
|
-
return bytes.every((b, i) => b === slice[i]);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// src/generated/programs/computeBudget.ts
|
|
66
4
|
var COMPUTE_BUDGET_PROGRAM_ADDRESS = "ComputeBudget111111111111111111111111111111";
|
|
67
|
-
function getComputeBudgetProgram() {
|
|
68
|
-
return {
|
|
69
|
-
name: "computeBudget",
|
|
70
|
-
address: COMPUTE_BUDGET_PROGRAM_ADDRESS
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
5
|
var ComputeBudgetInstruction = /* @__PURE__ */ ((ComputeBudgetInstruction2) => {
|
|
74
6
|
ComputeBudgetInstruction2[ComputeBudgetInstruction2["RequestUnits"] = 0] = "RequestUnits";
|
|
75
7
|
ComputeBudgetInstruction2[ComputeBudgetInstruction2["RequestHeapFrame"] = 1] = "RequestHeapFrame";
|
|
@@ -80,19 +12,19 @@ var ComputeBudgetInstruction = /* @__PURE__ */ ((ComputeBudgetInstruction2) => {
|
|
|
80
12
|
})(ComputeBudgetInstruction || {});
|
|
81
13
|
function identifyComputeBudgetInstruction(instruction) {
|
|
82
14
|
const data = instruction instanceof Uint8Array ? instruction : instruction.data;
|
|
83
|
-
if (
|
|
15
|
+
if (containsBytes(data, getU8Encoder().encode(0), 0)) {
|
|
84
16
|
return 0 /* RequestUnits */;
|
|
85
17
|
}
|
|
86
|
-
if (
|
|
18
|
+
if (containsBytes(data, getU8Encoder().encode(1), 0)) {
|
|
87
19
|
return 1 /* RequestHeapFrame */;
|
|
88
20
|
}
|
|
89
|
-
if (
|
|
21
|
+
if (containsBytes(data, getU8Encoder().encode(2), 0)) {
|
|
90
22
|
return 2 /* SetComputeUnitLimit */;
|
|
91
23
|
}
|
|
92
|
-
if (
|
|
24
|
+
if (containsBytes(data, getU8Encoder().encode(3), 0)) {
|
|
93
25
|
return 3 /* SetComputeUnitPrice */;
|
|
94
26
|
}
|
|
95
|
-
if (
|
|
27
|
+
if (containsBytes(data, getU8Encoder().encode(4), 0)) {
|
|
96
28
|
return 4 /* SetLoadedAccountsDataSizeLimit */;
|
|
97
29
|
}
|
|
98
30
|
throw new Error(
|
|
@@ -102,7 +34,7 @@ function identifyComputeBudgetInstruction(instruction) {
|
|
|
102
34
|
|
|
103
35
|
// src/generated/instructions/requestHeapFrame.ts
|
|
104
36
|
function getRequestHeapFrameInstructionDataEncoder() {
|
|
105
|
-
return
|
|
37
|
+
return transformEncoder(
|
|
106
38
|
getStructEncoder([
|
|
107
39
|
["discriminator", getU8Encoder()],
|
|
108
40
|
["bytes", getU32Encoder()]
|
|
@@ -140,7 +72,7 @@ function parseRequestHeapFrameInstruction(instruction) {
|
|
|
140
72
|
};
|
|
141
73
|
}
|
|
142
74
|
function getRequestUnitsInstructionDataEncoder() {
|
|
143
|
-
return
|
|
75
|
+
return transformEncoder(
|
|
144
76
|
getStructEncoder([
|
|
145
77
|
["discriminator", getU8Encoder()],
|
|
146
78
|
["units", getU32Encoder()],
|
|
@@ -180,7 +112,7 @@ function parseRequestUnitsInstruction(instruction) {
|
|
|
180
112
|
};
|
|
181
113
|
}
|
|
182
114
|
function getSetComputeUnitLimitInstructionDataEncoder() {
|
|
183
|
-
return
|
|
115
|
+
return transformEncoder(
|
|
184
116
|
getStructEncoder([
|
|
185
117
|
["discriminator", getU8Encoder()],
|
|
186
118
|
["units", getU32Encoder()]
|
|
@@ -220,7 +152,7 @@ function parseSetComputeUnitLimitInstruction(instruction) {
|
|
|
220
152
|
};
|
|
221
153
|
}
|
|
222
154
|
function getSetComputeUnitPriceInstructionDataEncoder() {
|
|
223
|
-
return
|
|
155
|
+
return transformEncoder(
|
|
224
156
|
getStructEncoder([
|
|
225
157
|
["discriminator", getU8Encoder()],
|
|
226
158
|
["microLamports", getU64Encoder()]
|
|
@@ -260,7 +192,7 @@ function parseSetComputeUnitPriceInstruction(instruction) {
|
|
|
260
192
|
};
|
|
261
193
|
}
|
|
262
194
|
function getSetLoadedAccountsDataSizeLimitInstructionDataEncoder() {
|
|
263
|
-
return
|
|
195
|
+
return transformEncoder(
|
|
264
196
|
getStructEncoder([
|
|
265
197
|
["discriminator", getU8Encoder()],
|
|
266
198
|
["accountDataSizeLimit", getU32Encoder()]
|
|
@@ -300,6 +232,6 @@ function parseSetLoadedAccountsDataSizeLimitInstruction(instruction) {
|
|
|
300
232
|
};
|
|
301
233
|
}
|
|
302
234
|
|
|
303
|
-
export { COMPUTE_BUDGET_PROGRAM_ADDRESS, ComputeBudgetInstruction,
|
|
235
|
+
export { COMPUTE_BUDGET_PROGRAM_ADDRESS, ComputeBudgetInstruction, getRequestHeapFrameInstruction, getRequestHeapFrameInstructionDataCodec, getRequestHeapFrameInstructionDataDecoder, getRequestHeapFrameInstructionDataEncoder, getRequestUnitsInstruction, getRequestUnitsInstructionDataCodec, getRequestUnitsInstructionDataDecoder, getRequestUnitsInstructionDataEncoder, getSetComputeUnitLimitInstruction, getSetComputeUnitLimitInstructionDataCodec, getSetComputeUnitLimitInstructionDataDecoder, getSetComputeUnitLimitInstructionDataEncoder, getSetComputeUnitPriceInstruction, getSetComputeUnitPriceInstructionDataCodec, getSetComputeUnitPriceInstructionDataDecoder, getSetComputeUnitPriceInstructionDataEncoder, getSetLoadedAccountsDataSizeLimitInstruction, getSetLoadedAccountsDataSizeLimitInstructionDataCodec, getSetLoadedAccountsDataSizeLimitInstructionDataDecoder, getSetLoadedAccountsDataSizeLimitInstructionDataEncoder, identifyComputeBudgetInstruction, parseRequestHeapFrameInstruction, parseRequestUnitsInstruction, parseSetComputeUnitLimitInstruction, parseSetComputeUnitPriceInstruction, parseSetLoadedAccountsDataSizeLimitInstruction };
|
|
304
236
|
//# sourceMappingURL=out.js.map
|
|
305
237
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/generated/instructions/requestHeapFrame.ts","../../src/generated/programs/computeBudget.ts","../../src/generated/shared/index.ts","../../src/generated/instructions/requestUnits.ts","../../src/generated/instructions/setComputeUnitLimit.ts","../../src/generated/instructions/setComputeUnitPrice.ts","../../src/generated/instructions/setLoadedAccountsDataSizeLimit.ts"],"names":["getU8Encoder","ComputeBudgetInstruction","combineCodec","getStructDecoder","getStructEncoder","getU32Decoder","getU32Encoder","getU8Decoder","mapEncoder"],"mappings":";AASA;AAA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AAA,IACL,gBAAgB,YAAY;AAAA,IAC5B,MAAM,6CAA6C,EAAE;AAAA,MACnD,YAAY;AAAA,IACd;AAAA,EACF;AACF;;;ACzGA;AAAA,EAIE,gBAAAA;AAAA,EACA,oBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAP;AAAA,EACA,cAAAQ;AAAA,OACK;AAyBA,SAAS,0DAAsH;AACpI,SAAOA;AAAA,IACLJ,kBAAiB;AAAA,MACf,CAAC,iBAAiBJ,cAAa,CAAC;AAAA,MAChC,CAAC,wBAAwBM,eAAc,CAAC;AAAA,IAC1C,CAAC;AAAA,IACD,CAAC,WAAW,EAAE,GAAG,OAAO,eAAe,EAAE;AAAA,EAC3C;AACF;AAEO,SAAS,0DAAkH;AAChI,SAAOH,kBAAiB;AAAA,IACtB,CAAC,iBAAiBI,cAAa,CAAC;AAAA,IAChC,CAAC,wBAAwBF,eAAc,CAAC;AAAA,EAC1C,CAAC;AACH;AAEO,SAAS,wDAGd;AACA,SAAOH;AAAA,IACL,wDAAwD;AAAA,IACxD,wDAAwD;AAAA,EAC1D;AACF;AAMO,SAAS,6CACd,OAGA;AAEA,QAAM,iBAAiB;AAGvB,QAAM,OAAO,EAAE,GAAG,MAAM;AAExB,QAAM,cAAc;AAAA,IAClB;AAAA,IACA,MAAM,wDAAwD,EAAE;AAAA,MAC9D;AAAA,IACF;AAAA,EACF;AAIA,SAAO;AACT;AASO,SAAS,+CAGd,aAC2D;AAC3D,SAAO;AAAA,IACL,gBAAgB,YAAY;AAAA,IAC5B,MAAM,wDAAwD,EAAE;AAAA,MAC9D,YAAY;AAAA,IACd;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';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type RequestHeapFrameInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 function getRequestHeapFrameInstruction(\n input: RequestHeapFrameInput\n): RequestHeapFrameInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getRequestHeapFrameInstructionDataEncoder().encode(\n args as RequestHeapFrameInstructionDataArgs\n ),\n } as RequestHeapFrameInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedRequestHeapFrameInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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 { 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 =\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null,\n> = {\n isWritable: boolean;\n value: U;\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 getAccountMetaFactory(\n programAddress: Address,\n optionalAccountStrategy: 'omitted' | 'programId'\n) {\n return (\n account: ResolvedAccount\n ): IAccountMeta | IAccountSignerMeta | undefined => {\n if (!account.value) {\n if (optionalAccountStrategy === 'omitted') return;\n return Object.freeze({\n address: programAddress,\n role: AccountRole.READONLY,\n });\n }\n\n const writableRole = account.isWritable\n ? AccountRole.WRITABLE\n : AccountRole.READONLY;\n return 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\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","/**\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';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type RequestUnitsInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 function getRequestUnitsInstruction(\n input: RequestUnitsInput\n): RequestUnitsInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getRequestUnitsInstructionDataEncoder().encode(\n args as RequestUnitsInstructionDataArgs\n ),\n } as RequestUnitsInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedRequestUnitsInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type SetComputeUnitLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 function getSetComputeUnitLimitInstruction(\n input: SetComputeUnitLimitInput\n): SetComputeUnitLimitInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getSetComputeUnitLimitInstructionDataEncoder().encode(\n args as SetComputeUnitLimitInstructionDataArgs\n ),\n } as SetComputeUnitLimitInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedSetComputeUnitLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type SetComputeUnitPriceInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 function getSetComputeUnitPriceInstruction(\n input: SetComputeUnitPriceInput\n): SetComputeUnitPriceInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getSetComputeUnitPriceInstructionDataEncoder().encode(\n args as SetComputeUnitPriceInstructionDataArgs\n ),\n } as SetComputeUnitPriceInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedSetComputeUnitPriceInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type SetLoadedAccountsDataSizeLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 function getSetLoadedAccountsDataSizeLimitInstruction(\n input: SetLoadedAccountsDataSizeLimitInput\n): SetLoadedAccountsDataSizeLimitInstruction<\n typeof COMPUTE_BUDGET_PROGRAM_ADDRESS\n> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getSetLoadedAccountsDataSizeLimitInstructionDataEncoder().encode(\n args as SetLoadedAccountsDataSizeLimitInstructionDataArgs\n ),\n } as SetLoadedAccountsDataSizeLimitInstruction<\n typeof COMPUTE_BUDGET_PROGRAM_ADDRESS\n >;\n\n return instruction;\n}\n\nexport type ParsedSetLoadedAccountsDataSizeLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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"]}
|
|
1
|
+
{"version":3,"sources":["../../src/generated/instructions/requestHeapFrame.ts","../../src/generated/programs/computeBudget.ts","../../src/generated/instructions/requestUnits.ts","../../src/generated/instructions/setComputeUnitLimit.ts","../../src/generated/instructions/setComputeUnitPrice.ts","../../src/generated/instructions/setLoadedAccountsDataSizeLimit.ts"],"names":["getU8Encoder","ComputeBudgetInstruction","combineCodec","getStructDecoder","getStructEncoder","getU32Decoder","getU32Encoder","getU8Decoder","transformEncoder"],"mappings":";AAQA;AAAA,EASE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAAA;AAAA,EACA;AAAA,OACK;;;ACjBP,SAAkB,eAAe,oBAAoB;AAS9C,IAAM,iCACX;AAEK,IAAK,2BAAL,kBAAKC,8BAAL;AACL,EAAAA,oDAAA;AACA,EAAAA,oDAAA;AACA,EAAAA,oDAAA;AACA,EAAAA,oDAAA;AACA,EAAAA,oDAAA;AALU,SAAAA;AAAA,GAAA;AAQL,SAAS,iCACd,aAC0B;AAC1B,QAAM,OACJ,uBAAuB,aAAa,cAAc,YAAY;AAChE,MAAI,cAAc,MAAM,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;AACpD,WAAO;AAAA,EACT;AACA,MAAI,cAAc,MAAM,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;AACpD,WAAO;AAAA,EACT;AACA,MAAI,cAAc,M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DAAwD,EAAE;AAAA,MAC9D,YAAY;AAAA,IACd;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 {\n Address,\n Codec,\n Decoder,\n Encoder,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n} from '@solana/web3.js';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type RequestHeapFrameInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 transformEncoder(\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 function getRequestHeapFrameInstruction(\n input: RequestHeapFrameInput\n): RequestHeapFrameInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getRequestHeapFrameInstructionDataEncoder().encode(\n args as RequestHeapFrameInstructionDataArgs\n ),\n } as RequestHeapFrameInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedRequestHeapFrameInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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, containsBytes, getU8Encoder } from '@solana/web3.js';\nimport {\n ParsedRequestHeapFrameInstruction,\n ParsedRequestUnitsInstruction,\n ParsedSetComputeUnitLimitInstruction,\n ParsedSetComputeUnitPriceInstruction,\n ParsedSetLoadedAccountsDataSizeLimitInstruction,\n} from '../instructions';\n\nexport const COMPUTE_BUDGET_PROGRAM_ADDRESS =\n 'ComputeBudget111111111111111111111111111111' as Address<'ComputeBudget111111111111111111111111111111'>;\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 (containsBytes(data, getU8Encoder().encode(0), 0)) {\n return ComputeBudgetInstruction.RequestUnits;\n }\n if (containsBytes(data, getU8Encoder().encode(1), 0)) {\n return ComputeBudgetInstruction.RequestHeapFrame;\n }\n if (containsBytes(data, getU8Encoder().encode(2), 0)) {\n return ComputeBudgetInstruction.SetComputeUnitLimit;\n }\n if (containsBytes(data, getU8Encoder().encode(3), 0)) {\n return ComputeBudgetInstruction.SetComputeUnitPrice;\n }\n if (containsBytes(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 Codec,\n Decoder,\n Encoder,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n} from '@solana/web3.js';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type RequestUnitsInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 transformEncoder(\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 function getRequestUnitsInstruction(\n input: RequestUnitsInput\n): RequestUnitsInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getRequestUnitsInstructionDataEncoder().encode(\n args as RequestUnitsInstructionDataArgs\n ),\n } as RequestUnitsInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedRequestUnitsInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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 {\n Address,\n Codec,\n Decoder,\n Encoder,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n} from '@solana/web3.js';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type SetComputeUnitLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 transformEncoder(\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 function getSetComputeUnitLimitInstruction(\n input: SetComputeUnitLimitInput\n): SetComputeUnitLimitInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getSetComputeUnitLimitInstructionDataEncoder().encode(\n args as SetComputeUnitLimitInstructionDataArgs\n ),\n } as SetComputeUnitLimitInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedSetComputeUnitLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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 {\n Address,\n Codec,\n Decoder,\n Encoder,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n} from '@solana/web3.js';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type SetComputeUnitPriceInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 transformEncoder(\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 function getSetComputeUnitPriceInstruction(\n input: SetComputeUnitPriceInput\n): SetComputeUnitPriceInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getSetComputeUnitPriceInstructionDataEncoder().encode(\n args as SetComputeUnitPriceInstructionDataArgs\n ),\n } as SetComputeUnitPriceInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;\n\n return instruction;\n}\n\nexport type ParsedSetComputeUnitPriceInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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 {\n Address,\n Codec,\n Decoder,\n Encoder,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n} from '@solana/web3.js';\nimport { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';\n\nexport type SetLoadedAccountsDataSizeLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\n TRemainingAccounts extends readonly 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 transformEncoder(\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 function getSetLoadedAccountsDataSizeLimitInstruction(\n input: SetLoadedAccountsDataSizeLimitInput\n): SetLoadedAccountsDataSizeLimitInstruction<\n typeof COMPUTE_BUDGET_PROGRAM_ADDRESS\n> {\n // Program address.\n const programAddress = COMPUTE_BUDGET_PROGRAM_ADDRESS;\n\n // Original args.\n const args = { ...input };\n\n const instruction = {\n programAddress,\n data: getSetLoadedAccountsDataSizeLimitInstructionDataEncoder().encode(\n args as SetLoadedAccountsDataSizeLimitInstructionDataArgs\n ),\n } as SetLoadedAccountsDataSizeLimitInstruction<\n typeof COMPUTE_BUDGET_PROGRAM_ADDRESS\n >;\n\n return instruction;\n}\n\nexport type ParsedSetLoadedAccountsDataSizeLimitInstruction<\n TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,\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"]}
|
|
@@ -1 +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
|
|
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"}
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address } from '@solana/
|
|
9
|
-
import { Codec, Decoder, Encoder } from '@solana/codecs';
|
|
10
|
-
import { IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/instructions';
|
|
8
|
+
import { Address, Codec, Decoder, Encoder, IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/web3.js';
|
|
11
9
|
import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
|
|
12
10
|
export type RequestHeapFrameInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
13
11
|
export type RequestHeapFrameInstructionData = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestHeapFrame.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/requestHeapFrame.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"requestHeapFrame.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/requestHeapFrame.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EASrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,MAAM,2BAA2B,CACrC,QAAQ,SAAS,MAAM,GAAG,OAAO,8BAA8B,EAC/D,kBAAkB,SAAS,SAAS,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,IAC7D,YAAY,CAAC,QAAQ,CAAC,GACxB,oBAAoB,CAAC,UAAU,CAAC,GAChC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;AAE/C,MAAM,MAAM,+BAA+B,GAAG;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG;IAChD;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,yCAAyC,IAAI,OAAO,CAAC,mCAAmC,CAAC,CAQxG;AAED,wBAAgB,yCAAyC,IAAI,OAAO,CAAC,+BAA+B,CAAC,CAKpG;AAED,wBAAgB,uCAAuC,IAAI,KAAK,CAC9D,mCAAmC,EACnC,+BAA+B,CAChC,CAKA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,mCAAmC,CAAC,OAAO,CAAC,CAAC;CACrD,CAAC;AAEF,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,qBAAqB,GAC3B,2BAA2B,CAAC,OAAO,8BAA8B,CAAC,CAepE;AAED,MAAM,MAAM,iCAAiC,CAC3C,QAAQ,SAAS,MAAM,GAAG,OAAO,8BAA8B,IAC7D;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"}
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address } from '@solana/
|
|
9
|
-
import { Codec, Decoder, Encoder } from '@solana/codecs';
|
|
10
|
-
import { IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/instructions';
|
|
8
|
+
import { Address, Codec, Decoder, Encoder, IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/web3.js';
|
|
11
9
|
import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
|
|
12
10
|
export type RequestUnitsInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
13
11
|
export type RequestUnitsInstructionData = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestUnits.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/requestUnits.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"requestUnits.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/requestUnits.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EASrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,MAAM,uBAAuB,CACjC,QAAQ,SAAS,MAAM,GAAG,OAAO,8BAA8B,EAC/D,kBAAkB,SAAS,SAAS,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,IAC7D,YAAY,CAAC,QAAQ,CAAC,GACxB,oBAAoB,CAAC,UAAU,CAAC,GAChC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;AAE/C,MAAM,MAAM,2BAA2B,GAAG;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,wBAAgB,qCAAqC,IAAI,OAAO,CAAC,+BAA+B,CAAC,CAShG;AAED,wBAAgB,qCAAqC,IAAI,OAAO,CAAC,2BAA2B,CAAC,CAM5F;AAED,wBAAgB,mCAAmC,IAAI,KAAK,CAC1D,+BAA+B,EAC/B,2BAA2B,CAC5B,CAKA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,+BAA+B,CAAC,OAAO,CAAC,CAAC;IAChD,aAAa,EAAE,+BAA+B,CAAC,eAAe,CAAC,CAAC;CACjE,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,iBAAiB,GACvB,uBAAuB,CAAC,OAAO,8BAA8B,CAAC,CAehE;AAED,MAAM,MAAM,6BAA6B,CACvC,QAAQ,SAAS,MAAM,GAAG,OAAO,8BAA8B,IAC7D;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"}
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address } from '@solana/
|
|
9
|
-
import { Codec, Decoder, Encoder } from '@solana/codecs';
|
|
10
|
-
import { IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/instructions';
|
|
8
|
+
import { Address, Codec, Decoder, Encoder, IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/web3.js';
|
|
11
9
|
import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
|
|
12
10
|
export type SetComputeUnitLimitInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
13
11
|
export type SetComputeUnitLimitInstructionData = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setComputeUnitLimit.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/setComputeUnitLimit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"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,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,IAAI,EAAE,kCAAkC,CAAC;CAC1C,CAAC;AAEF,wBAAgB,mCAAmC,CAAC,QAAQ,SAAS,MAAM,EACzE,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAC,UAAU,CAAC,GACrE,oCAAoC,CAAC,QAAQ,CAAC,CAOhD"}
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address } from '@solana/
|
|
9
|
-
import { Codec, Decoder, Encoder } from '@solana/codecs';
|
|
10
|
-
import { IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/instructions';
|
|
8
|
+
import { Address, Codec, Decoder, Encoder, IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/web3.js';
|
|
11
9
|
import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
|
|
12
10
|
export type SetComputeUnitPriceInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
13
11
|
export type SetComputeUnitPriceInstructionData = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setComputeUnitPrice.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/setComputeUnitPrice.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"setComputeUnitPrice.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/setComputeUnitPrice.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACxB,oB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UAAU,CAAC,GACrE,oCAAoC,CAAC,QAAQ,CAAC,CAOhD"}
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address } from '@solana/
|
|
9
|
-
import { Codec, Decoder, Encoder } from '@solana/codecs';
|
|
10
|
-
import { IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/instructions';
|
|
8
|
+
import { Address, Codec, Decoder, Encoder, IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/web3.js';
|
|
11
9
|
import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
|
|
12
10
|
export type SetLoadedAccountsDataSizeLimitInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
13
11
|
export type SetLoadedAccountsDataSizeLimitInstructionData = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setLoadedAccountsDataSizeLimit.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/setLoadedAccountsDataSizeLimit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"setLoadedAccountsDataSizeLimit.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/setLoadedAccountsDataSizeLimit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EASrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,MAAM,yCAAyC,CACnD,QAAQ,SAAS,MAAM,GAA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{ Address } from '@solana/
|
|
9
|
-
import { Program } from '@solana/programs';
|
|
8
|
+
import { Address } from '@solana/web3.js';
|
|
10
9
|
import { ParsedRequestHeapFrameInstruction, ParsedRequestUnitsInstruction, ParsedSetComputeUnitLimitInstruction, ParsedSetComputeUnitPriceInstruction, ParsedSetLoadedAccountsDataSizeLimitInstruction } from '../instructions';
|
|
11
10
|
export declare const COMPUTE_BUDGET_PROGRAM_ADDRESS: Address<"ComputeBudget111111111111111111111111111111">;
|
|
12
|
-
export type ComputeBudgetProgram = Program<'ComputeBudget111111111111111111111111111111'>;
|
|
13
|
-
export declare function getComputeBudgetProgram(): ComputeBudgetProgram;
|
|
14
11
|
export declare enum ComputeBudgetInstruction {
|
|
15
12
|
RequestUnits = 0,
|
|
16
13
|
RequestHeapFrame = 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeBudget.d.ts","sourceRoot":"","sources":["../../../../../src/generated/programs/computeBudget.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"computeBudget.d.ts","sourceRoot":"","sources":["../../../../../src/generated/programs/computeBudget.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAA+B,MAAM,iBAAiB,CAAC;AACvE,OAAO,EACL,iCAAiC,EACjC,6BAA6B,EAC7B,oCAAoC,EACpC,oCAAoC,EACpC,+CAA+C,EAChD,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,8BAA8B,wDAC8D,CAAC;AAE1G,oBAAY,wBAAwB;IAClC,YAAY,IAAA;IACZ,gBAAgB,IAAA;IAChB,mBAAmB,IAAA;IACnB,mBAAmB,IAAA;IACnB,8BAA8B,IAAA;CAC/B;AAED,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG,UAAU,GAC7C,wBAAwB,CAqB1B;AAED,MAAM,MAAM,8BAA8B,CACxC,QAAQ,SAAS,MAAM,GAAG,6CAA6C,IAErE,CAAC;IACC,eAAe,EAAE,wBAAwB,CAAC,YAAY,CAAC;CACxD,GAAG,6BAA6B,CAAC,QAAQ,CAAC,CAAC,GAC5C,CAAC;IACC,eAAe,EAAE,wBAAwB,CAAC,gBAAgB,CAAC;CAC5D,GAAG,iCAAiC,CAAC,QAAQ,CAAC,CAAC,GAChD,CAAC;IACC,eAAe,EAAE,wBAAwB,CAAC,mBAAmB,CAAC;CAC/D,GAAG,oCAAoC,CAAC,QAAQ,CAAC,CAAC,GACnD,CAAC;IACC,eAAe,EAAE,wBAAwB,CAAC,mBAAmB,CAAC;CAC/D,GAAG,oCAAoC,CAAC,QAAQ,CAAC,CAAC,GACnD,CAAC;IACC,eAAe,EAAE,wBAAwB,CAAC,8BAA8B,CAAC;CAC1E,GAAG,+CAA+C,CAAC,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address, ProgramDerivedAddress } from '@solana/
|
|
9
|
-
import { IAccountMeta } from '@solana/instructions';
|
|
10
|
-
import { IAccountSignerMeta, TransactionSigner } from '@solana/signers';
|
|
8
|
+
import { Address, IAccountMeta, IAccountSignerMeta, ProgramDerivedAddress, TransactionSigner } from '@solana/web3.js';
|
|
11
9
|
/**
|
|
12
10
|
* Asserts that the given value is not null or undefined.
|
|
13
11
|
* @internal
|
|
@@ -49,5 +47,4 @@ export type IInstructionWithByteDelta = {
|
|
|
49
47
|
*/
|
|
50
48
|
export declare function getAccountMetaFactory(programAddress: Address, optionalAccountStrategy: 'omitted' | 'programId'): (account: ResolvedAccount) => IAccountMeta | IAccountSignerMeta | undefined;
|
|
51
49
|
export declare function isTransactionSigner<TAddress extends string = string>(value: Address<TAddress> | ProgramDerivedAddress<TAddress> | TransactionSigner<TAddress>): value is TransactionSigner<TAddress>;
|
|
52
|
-
export declare function memcmp(data: Uint8Array, bytes: Uint8Array, offset: number): boolean;
|
|
53
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAEL,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAEzB;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,CAK5D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EACrD,KAAK,EACD,OAAO,CAAC,CAAC,CAAC,GACV,qBAAqB,CAAC,CAAC,CAAC,GACxB,iBAAiB,CAAC,CAAC,CAAC,GACpB,IAAI,GACJ,SAAS,GACZ,OAAO,CAAC,CAAC,CAAC,CAWZ;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EACnE,KAAK,EACD,OAAO,CAAC,CAAC,CAAC,GACV,qBAAqB,CAAC,CAAC,CAAC,GACxB,iBAAiB,CAAC,CAAC,CAAC,GACpB,IAAI,GACJ,SAAS,GACZ,qBAAqB,CAAC,CAAC,CAAC,CAK1B;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAC/D,KAAK,EACD,OAAO,CAAC,CAAC,CAAC,GACV,qBAAqB,CAAC,CAAC,CAAC,GACxB,iBAAiB,CAAC,CAAC,CAAC,GACpB,IAAI,GACJ,SAAS,GACZ,iBAAiB,CAAC,CAAC,CAAC,CAKtB;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,CACzB,CAAC,SAAS,MAAM,GAAG,MAAM,EACzB,CAAC,SACG,OAAO,CAAC,CAAC,CAAC,GACV,qBAAqB,CAAC,CAAC,CAAC,GACxB,iBAAiB,CAAC,CAAC,CAAC,GACpB,IAAI,GACJ,OAAO,CAAC,CAAC,CAAC,GACV,qBAAqB,CAAC,CAAC,CAAC,GACxB,iBAAiB,CAAC,CAAC,CAAC,GACpB,IAAI,IACN;IACF,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,OAAO,EACvB,uBAAuB,EAAE,SAAS,GAAG,WAAW,aAGrC,eAAe,KACvB,YAAY,GAAG,kBAAkB,GAAG,SAAS,CAoBjD;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,EAClE,KAAK,EACD,OAAO,CAAC,QAAQ,CAAC,GACjB,qBAAqB,CAAC,QAAQ,CAAC,GAC/B,iBAAiB,CAAC,QAAQ,CAAC,GAC9B,KAAK,IAAI,iBAAiB,CAAC,QAAQ,CAAC,CAOtC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Commitment,
|
|
1
|
+
import { Commitment, CompilableTransactionMessage, Rpc, RpcSubscriptions, SolanaRpcApi, SolanaRpcSubscriptionsApi, TransactionMessageWithBlockhashLifetime, TransactionSigner } from '@solana/web3.js';
|
|
2
2
|
type Client = {
|
|
3
3
|
rpc: Rpc<SolanaRpcApi>;
|
|
4
4
|
rpcSubscriptions: RpcSubscriptions<SolanaRpcSubscriptionsApi>;
|
|
5
5
|
};
|
|
6
6
|
export declare const createDefaultSolanaClient: () => Client;
|
|
7
7
|
export declare const generateKeyPairSignerWithSol: (client: Client, putativeLamports?: bigint) => Promise<import("@solana/web3.js").KeyPairSigner<string>>;
|
|
8
|
-
export declare const createDefaultTransaction: (client: Client, feePayer: TransactionSigner) => Promise<
|
|
9
|
-
instructions: readonly import("@solana/web3.js").IInstruction<string, readonly (import("@solana/web3.js").
|
|
8
|
+
export declare const createDefaultTransaction: (client: Client, feePayer: TransactionSigner) => Promise<TransactionMessageWithBlockhashLifetime & import("@solana/web3.js").ITransactionMessageWithFeePayerSigner<string, TransactionSigner<string>> & Readonly<{
|
|
9
|
+
instructions: readonly import("@solana/web3.js").IInstruction<string, readonly (import("@solana/web3.js").IAccountMeta<string> | import("@solana/web3.js").IAccountLookupMeta<string, string>)[]>[];
|
|
10
10
|
version: 0;
|
|
11
|
-
}
|
|
12
|
-
export declare const signAndSendTransaction: (client: Client,
|
|
11
|
+
}>>;
|
|
12
|
+
export declare const signAndSendTransaction: (client: Client, transactionMessage: CompilableTransactionMessage & TransactionMessageWithBlockhashLifetime, commitment?: Commitment) => Promise<import("@solana/web3.js").Signature>;
|
|
13
13
|
export {};
|
|
14
14
|
//# sourceMappingURL=_setup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_setup.d.ts","sourceRoot":"","sources":["../../../test/_setup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"_setup.d.ts","sourceRoot":"","sources":["../../../test/_setup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,GAAG,EACH,gBAAgB,EAChB,YAAY,EACZ,yBAAyB,EACzB,uCAAuC,EACvC,iBAAiB,EAalB,MAAM,iBAAiB,CAAC;AAEzB,KAAK,MAAM,GAAG;IACZ,GAAG,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC;IACvB,gBAAgB,EAAE,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;CAC/D,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAAO,MAI5C,CAAC;AAEF,eAAO,MAAM,4BAA4B,WAC/B,MAAM,qBACI,MAAM,6DASzB,CAAC;AAEF,eAAO,MAAM,wBAAwB,WAC3B,MAAM,YACJ,iBAAiB;;;GAU5B,CAAC;AAEF,eAAO,MAAM,sBAAsB,WACzB,MAAM,sBACM,4BAA4B,GAC9C,uCAAuC,eAC7B,UAAU,iDASvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana-program/compute-budget",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "JavaScript client for the Compute Budget program",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "./dist/src/index.js",
|
|
@@ -23,19 +23,14 @@
|
|
|
23
23
|
"registry": "https://registry.npmjs.org"
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
|
-
"
|
|
27
|
-
"@solana/
|
|
28
|
-
"@solana/addresses": "^2.0.0-preview",
|
|
29
|
-
"@solana/codecs": "^2.0.0-preview",
|
|
30
|
-
"@solana/instructions": "^2.0.0-preview",
|
|
31
|
-
"@solana/programs": "^2.0.0-preview",
|
|
32
|
-
"@solana/signers": "^2.0.0-preview"
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"@solana/web3.js": "2.0.0-preview.3"
|
|
33
28
|
},
|
|
34
29
|
"devDependencies": {
|
|
35
30
|
"@ava/typescript": "^4.1.0",
|
|
36
31
|
"@solana/eslint-config-solana": "^3.0.0",
|
|
37
|
-
"@solana/web3.js": "
|
|
38
|
-
"@solana/webcrypto-ed25519-polyfill": "
|
|
32
|
+
"@solana/web3.js": "tp3",
|
|
33
|
+
"@solana/webcrypto-ed25519-polyfill": "tp3",
|
|
39
34
|
"@typescript-eslint/eslint-plugin": "^7.3.1",
|
|
40
35
|
"@typescript-eslint/parser": "^7.3.1",
|
|
41
36
|
"ava": "^6.1.2",
|