@solana-program/compute-budget 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/index.js +78 -49
- package/dist/src/index.js.map +1 -1
- package/dist/src/{index.cjs → index.mjs} +50 -79
- package/dist/src/index.mjs.map +1 -0
- package/dist/types/{src/generated → generated}/index.d.ts +1 -1
- package/dist/types/generated/index.d.ts.map +1 -0
- package/dist/types/{src/generated → generated}/instructions/index.d.ts +1 -1
- package/dist/types/generated/instructions/index.d.ts.map +1 -0
- package/dist/types/{src/generated → generated}/instructions/requestHeapFrame.d.ts +2 -2
- package/dist/types/generated/instructions/requestHeapFrame.d.ts.map +1 -0
- package/dist/types/{src/generated → generated}/instructions/requestUnits.d.ts +2 -2
- package/dist/types/generated/instructions/requestUnits.d.ts.map +1 -0
- package/dist/types/{src/generated → generated}/instructions/setComputeUnitLimit.d.ts +2 -2
- package/dist/types/generated/instructions/setComputeUnitLimit.d.ts.map +1 -0
- package/dist/types/{src/generated → generated}/instructions/setComputeUnitPrice.d.ts +2 -2
- package/dist/types/generated/instructions/setComputeUnitPrice.d.ts.map +1 -0
- package/dist/types/{src/generated → generated}/instructions/setLoadedAccountsDataSizeLimit.d.ts +2 -2
- package/dist/types/generated/instructions/setLoadedAccountsDataSizeLimit.d.ts.map +1 -0
- package/dist/types/{src/generated → generated}/programs/computeBudget.d.ts +3 -3
- package/dist/types/generated/programs/computeBudget.d.ts.map +1 -0
- package/dist/types/{src/generated → generated}/programs/index.d.ts +1 -1
- package/dist/types/generated/programs/index.d.ts.map +1 -0
- package/dist/types/{src/generated → generated}/shared/index.d.ts +2 -2
- package/dist/types/generated/shared/index.d.ts.map +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +19 -19
- package/dist/src/index.cjs.map +0 -1
- package/dist/types/src/generated/index.d.ts.map +0 -1
- package/dist/types/src/generated/instructions/index.d.ts.map +0 -1
- package/dist/types/src/generated/instructions/requestHeapFrame.d.ts.map +0 -1
- package/dist/types/src/generated/instructions/requestUnits.d.ts.map +0 -1
- package/dist/types/src/generated/instructions/setComputeUnitLimit.d.ts.map +0 -1
- package/dist/types/src/generated/instructions/setComputeUnitPrice.d.ts.map +0 -1
- package/dist/types/src/generated/instructions/setLoadedAccountsDataSizeLimit.d.ts.map +0 -1
- package/dist/types/src/generated/programs/computeBudget.d.ts.map +0 -1
- package/dist/types/src/generated/programs/index.d.ts.map +0 -1
- package/dist/types/src/generated/shared/index.d.ts.map +0 -1
- package/dist/types/src/index.d.ts.map +0 -1
- package/dist/types/test/_setup.d.ts +0 -14
- package/dist/types/test/_setup.d.ts.map +0 -1
- package/dist/types/test/setComputeUnitLimit.test.d.ts +0 -2
- package/dist/types/test/setComputeUnitLimit.test.d.ts.map +0 -1
- /package/dist/types/{src/index.d.ts → index.d.ts} +0 -0
package/dist/src/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var web3_js = require('@solana/web3.js');
|
|
2
4
|
|
|
3
5
|
// src/generated/instructions/requestHeapFrame.ts
|
|
4
6
|
var COMPUTE_BUDGET_PROGRAM_ADDRESS = "ComputeBudget111111111111111111111111111111";
|
|
@@ -12,19 +14,19 @@ var ComputeBudgetInstruction = /* @__PURE__ */ ((ComputeBudgetInstruction2) => {
|
|
|
12
14
|
})(ComputeBudgetInstruction || {});
|
|
13
15
|
function identifyComputeBudgetInstruction(instruction) {
|
|
14
16
|
const data = instruction instanceof Uint8Array ? instruction : instruction.data;
|
|
15
|
-
if (containsBytes(data, getU8Encoder().encode(0), 0)) {
|
|
17
|
+
if (web3_js.containsBytes(data, web3_js.getU8Encoder().encode(0), 0)) {
|
|
16
18
|
return 0 /* RequestUnits */;
|
|
17
19
|
}
|
|
18
|
-
if (containsBytes(data, getU8Encoder().encode(1), 0)) {
|
|
20
|
+
if (web3_js.containsBytes(data, web3_js.getU8Encoder().encode(1), 0)) {
|
|
19
21
|
return 1 /* RequestHeapFrame */;
|
|
20
22
|
}
|
|
21
|
-
if (containsBytes(data, getU8Encoder().encode(2), 0)) {
|
|
23
|
+
if (web3_js.containsBytes(data, web3_js.getU8Encoder().encode(2), 0)) {
|
|
22
24
|
return 2 /* SetComputeUnitLimit */;
|
|
23
25
|
}
|
|
24
|
-
if (containsBytes(data, getU8Encoder().encode(3), 0)) {
|
|
26
|
+
if (web3_js.containsBytes(data, web3_js.getU8Encoder().encode(3), 0)) {
|
|
25
27
|
return 3 /* SetComputeUnitPrice */;
|
|
26
28
|
}
|
|
27
|
-
if (containsBytes(data, getU8Encoder().encode(4), 0)) {
|
|
29
|
+
if (web3_js.containsBytes(data, web3_js.getU8Encoder().encode(4), 0)) {
|
|
28
30
|
return 4 /* SetLoadedAccountsDataSizeLimit */;
|
|
29
31
|
}
|
|
30
32
|
throw new Error(
|
|
@@ -34,22 +36,22 @@ function identifyComputeBudgetInstruction(instruction) {
|
|
|
34
36
|
|
|
35
37
|
// src/generated/instructions/requestHeapFrame.ts
|
|
36
38
|
function getRequestHeapFrameInstructionDataEncoder() {
|
|
37
|
-
return transformEncoder(
|
|
38
|
-
getStructEncoder([
|
|
39
|
-
["discriminator", getU8Encoder()],
|
|
40
|
-
["bytes", getU32Encoder()]
|
|
39
|
+
return web3_js.transformEncoder(
|
|
40
|
+
web3_js.getStructEncoder([
|
|
41
|
+
["discriminator", web3_js.getU8Encoder()],
|
|
42
|
+
["bytes", web3_js.getU32Encoder()]
|
|
41
43
|
]),
|
|
42
44
|
(value) => ({ ...value, discriminator: 1 })
|
|
43
45
|
);
|
|
44
46
|
}
|
|
45
47
|
function getRequestHeapFrameInstructionDataDecoder() {
|
|
46
|
-
return getStructDecoder([
|
|
47
|
-
["discriminator", getU8Decoder()],
|
|
48
|
-
["bytes", getU32Decoder()]
|
|
48
|
+
return web3_js.getStructDecoder([
|
|
49
|
+
["discriminator", web3_js.getU8Decoder()],
|
|
50
|
+
["bytes", web3_js.getU32Decoder()]
|
|
49
51
|
]);
|
|
50
52
|
}
|
|
51
53
|
function getRequestHeapFrameInstructionDataCodec() {
|
|
52
|
-
return combineCodec(
|
|
54
|
+
return web3_js.combineCodec(
|
|
53
55
|
getRequestHeapFrameInstructionDataEncoder(),
|
|
54
56
|
getRequestHeapFrameInstructionDataDecoder()
|
|
55
57
|
);
|
|
@@ -72,24 +74,24 @@ function parseRequestHeapFrameInstruction(instruction) {
|
|
|
72
74
|
};
|
|
73
75
|
}
|
|
74
76
|
function getRequestUnitsInstructionDataEncoder() {
|
|
75
|
-
return transformEncoder(
|
|
76
|
-
getStructEncoder([
|
|
77
|
-
["discriminator", getU8Encoder()],
|
|
78
|
-
["units", getU32Encoder()],
|
|
79
|
-
["additionalFee", getU32Encoder()]
|
|
77
|
+
return web3_js.transformEncoder(
|
|
78
|
+
web3_js.getStructEncoder([
|
|
79
|
+
["discriminator", web3_js.getU8Encoder()],
|
|
80
|
+
["units", web3_js.getU32Encoder()],
|
|
81
|
+
["additionalFee", web3_js.getU32Encoder()]
|
|
80
82
|
]),
|
|
81
83
|
(value) => ({ ...value, discriminator: 0 })
|
|
82
84
|
);
|
|
83
85
|
}
|
|
84
86
|
function getRequestUnitsInstructionDataDecoder() {
|
|
85
|
-
return getStructDecoder([
|
|
86
|
-
["discriminator", getU8Decoder()],
|
|
87
|
-
["units", getU32Decoder()],
|
|
88
|
-
["additionalFee", getU32Decoder()]
|
|
87
|
+
return web3_js.getStructDecoder([
|
|
88
|
+
["discriminator", web3_js.getU8Decoder()],
|
|
89
|
+
["units", web3_js.getU32Decoder()],
|
|
90
|
+
["additionalFee", web3_js.getU32Decoder()]
|
|
89
91
|
]);
|
|
90
92
|
}
|
|
91
93
|
function getRequestUnitsInstructionDataCodec() {
|
|
92
|
-
return combineCodec(
|
|
94
|
+
return web3_js.combineCodec(
|
|
93
95
|
getRequestUnitsInstructionDataEncoder(),
|
|
94
96
|
getRequestUnitsInstructionDataDecoder()
|
|
95
97
|
);
|
|
@@ -112,22 +114,22 @@ function parseRequestUnitsInstruction(instruction) {
|
|
|
112
114
|
};
|
|
113
115
|
}
|
|
114
116
|
function getSetComputeUnitLimitInstructionDataEncoder() {
|
|
115
|
-
return transformEncoder(
|
|
116
|
-
getStructEncoder([
|
|
117
|
-
["discriminator", getU8Encoder()],
|
|
118
|
-
["units", getU32Encoder()]
|
|
117
|
+
return web3_js.transformEncoder(
|
|
118
|
+
web3_js.getStructEncoder([
|
|
119
|
+
["discriminator", web3_js.getU8Encoder()],
|
|
120
|
+
["units", web3_js.getU32Encoder()]
|
|
119
121
|
]),
|
|
120
122
|
(value) => ({ ...value, discriminator: 2 })
|
|
121
123
|
);
|
|
122
124
|
}
|
|
123
125
|
function getSetComputeUnitLimitInstructionDataDecoder() {
|
|
124
|
-
return getStructDecoder([
|
|
125
|
-
["discriminator", getU8Decoder()],
|
|
126
|
-
["units", getU32Decoder()]
|
|
126
|
+
return web3_js.getStructDecoder([
|
|
127
|
+
["discriminator", web3_js.getU8Decoder()],
|
|
128
|
+
["units", web3_js.getU32Decoder()]
|
|
127
129
|
]);
|
|
128
130
|
}
|
|
129
131
|
function getSetComputeUnitLimitInstructionDataCodec() {
|
|
130
|
-
return combineCodec(
|
|
132
|
+
return web3_js.combineCodec(
|
|
131
133
|
getSetComputeUnitLimitInstructionDataEncoder(),
|
|
132
134
|
getSetComputeUnitLimitInstructionDataDecoder()
|
|
133
135
|
);
|
|
@@ -152,22 +154,22 @@ function parseSetComputeUnitLimitInstruction(instruction) {
|
|
|
152
154
|
};
|
|
153
155
|
}
|
|
154
156
|
function getSetComputeUnitPriceInstructionDataEncoder() {
|
|
155
|
-
return transformEncoder(
|
|
156
|
-
getStructEncoder([
|
|
157
|
-
["discriminator", getU8Encoder()],
|
|
158
|
-
["microLamports", getU64Encoder()]
|
|
157
|
+
return web3_js.transformEncoder(
|
|
158
|
+
web3_js.getStructEncoder([
|
|
159
|
+
["discriminator", web3_js.getU8Encoder()],
|
|
160
|
+
["microLamports", web3_js.getU64Encoder()]
|
|
159
161
|
]),
|
|
160
162
|
(value) => ({ ...value, discriminator: 3 })
|
|
161
163
|
);
|
|
162
164
|
}
|
|
163
165
|
function getSetComputeUnitPriceInstructionDataDecoder() {
|
|
164
|
-
return getStructDecoder([
|
|
165
|
-
["discriminator", getU8Decoder()],
|
|
166
|
-
["microLamports", getU64Decoder()]
|
|
166
|
+
return web3_js.getStructDecoder([
|
|
167
|
+
["discriminator", web3_js.getU8Decoder()],
|
|
168
|
+
["microLamports", web3_js.getU64Decoder()]
|
|
167
169
|
]);
|
|
168
170
|
}
|
|
169
171
|
function getSetComputeUnitPriceInstructionDataCodec() {
|
|
170
|
-
return combineCodec(
|
|
172
|
+
return web3_js.combineCodec(
|
|
171
173
|
getSetComputeUnitPriceInstructionDataEncoder(),
|
|
172
174
|
getSetComputeUnitPriceInstructionDataDecoder()
|
|
173
175
|
);
|
|
@@ -192,22 +194,22 @@ function parseSetComputeUnitPriceInstruction(instruction) {
|
|
|
192
194
|
};
|
|
193
195
|
}
|
|
194
196
|
function getSetLoadedAccountsDataSizeLimitInstructionDataEncoder() {
|
|
195
|
-
return transformEncoder(
|
|
196
|
-
getStructEncoder([
|
|
197
|
-
["discriminator", getU8Encoder()],
|
|
198
|
-
["accountDataSizeLimit", getU32Encoder()]
|
|
197
|
+
return web3_js.transformEncoder(
|
|
198
|
+
web3_js.getStructEncoder([
|
|
199
|
+
["discriminator", web3_js.getU8Encoder()],
|
|
200
|
+
["accountDataSizeLimit", web3_js.getU32Encoder()]
|
|
199
201
|
]),
|
|
200
202
|
(value) => ({ ...value, discriminator: 4 })
|
|
201
203
|
);
|
|
202
204
|
}
|
|
203
205
|
function getSetLoadedAccountsDataSizeLimitInstructionDataDecoder() {
|
|
204
|
-
return getStructDecoder([
|
|
205
|
-
["discriminator", getU8Decoder()],
|
|
206
|
-
["accountDataSizeLimit", getU32Decoder()]
|
|
206
|
+
return web3_js.getStructDecoder([
|
|
207
|
+
["discriminator", web3_js.getU8Decoder()],
|
|
208
|
+
["accountDataSizeLimit", web3_js.getU32Decoder()]
|
|
207
209
|
]);
|
|
208
210
|
}
|
|
209
211
|
function getSetLoadedAccountsDataSizeLimitInstructionDataCodec() {
|
|
210
|
-
return combineCodec(
|
|
212
|
+
return web3_js.combineCodec(
|
|
211
213
|
getSetLoadedAccountsDataSizeLimitInstructionDataEncoder(),
|
|
212
214
|
getSetLoadedAccountsDataSizeLimitInstructionDataDecoder()
|
|
213
215
|
);
|
|
@@ -232,6 +234,33 @@ function parseSetLoadedAccountsDataSizeLimitInstruction(instruction) {
|
|
|
232
234
|
};
|
|
233
235
|
}
|
|
234
236
|
|
|
235
|
-
|
|
237
|
+
exports.COMPUTE_BUDGET_PROGRAM_ADDRESS = COMPUTE_BUDGET_PROGRAM_ADDRESS;
|
|
238
|
+
exports.ComputeBudgetInstruction = ComputeBudgetInstruction;
|
|
239
|
+
exports.getRequestHeapFrameInstruction = getRequestHeapFrameInstruction;
|
|
240
|
+
exports.getRequestHeapFrameInstructionDataCodec = getRequestHeapFrameInstructionDataCodec;
|
|
241
|
+
exports.getRequestHeapFrameInstructionDataDecoder = getRequestHeapFrameInstructionDataDecoder;
|
|
242
|
+
exports.getRequestHeapFrameInstructionDataEncoder = getRequestHeapFrameInstructionDataEncoder;
|
|
243
|
+
exports.getRequestUnitsInstruction = getRequestUnitsInstruction;
|
|
244
|
+
exports.getRequestUnitsInstructionDataCodec = getRequestUnitsInstructionDataCodec;
|
|
245
|
+
exports.getRequestUnitsInstructionDataDecoder = getRequestUnitsInstructionDataDecoder;
|
|
246
|
+
exports.getRequestUnitsInstructionDataEncoder = getRequestUnitsInstructionDataEncoder;
|
|
247
|
+
exports.getSetComputeUnitLimitInstruction = getSetComputeUnitLimitInstruction;
|
|
248
|
+
exports.getSetComputeUnitLimitInstructionDataCodec = getSetComputeUnitLimitInstructionDataCodec;
|
|
249
|
+
exports.getSetComputeUnitLimitInstructionDataDecoder = getSetComputeUnitLimitInstructionDataDecoder;
|
|
250
|
+
exports.getSetComputeUnitLimitInstructionDataEncoder = getSetComputeUnitLimitInstructionDataEncoder;
|
|
251
|
+
exports.getSetComputeUnitPriceInstruction = getSetComputeUnitPriceInstruction;
|
|
252
|
+
exports.getSetComputeUnitPriceInstructionDataCodec = getSetComputeUnitPriceInstructionDataCodec;
|
|
253
|
+
exports.getSetComputeUnitPriceInstructionDataDecoder = getSetComputeUnitPriceInstructionDataDecoder;
|
|
254
|
+
exports.getSetComputeUnitPriceInstructionDataEncoder = getSetComputeUnitPriceInstructionDataEncoder;
|
|
255
|
+
exports.getSetLoadedAccountsDataSizeLimitInstruction = getSetLoadedAccountsDataSizeLimitInstruction;
|
|
256
|
+
exports.getSetLoadedAccountsDataSizeLimitInstructionDataCodec = getSetLoadedAccountsDataSizeLimitInstructionDataCodec;
|
|
257
|
+
exports.getSetLoadedAccountsDataSizeLimitInstructionDataDecoder = getSetLoadedAccountsDataSizeLimitInstructionDataDecoder;
|
|
258
|
+
exports.getSetLoadedAccountsDataSizeLimitInstructionDataEncoder = getSetLoadedAccountsDataSizeLimitInstructionDataEncoder;
|
|
259
|
+
exports.identifyComputeBudgetInstruction = identifyComputeBudgetInstruction;
|
|
260
|
+
exports.parseRequestHeapFrameInstruction = parseRequestHeapFrameInstruction;
|
|
261
|
+
exports.parseRequestUnitsInstruction = parseRequestUnitsInstruction;
|
|
262
|
+
exports.parseSetComputeUnitLimitInstruction = parseSetComputeUnitLimitInstruction;
|
|
263
|
+
exports.parseSetComputeUnitPriceInstruction = parseSetComputeUnitPriceInstruction;
|
|
264
|
+
exports.parseSetLoadedAccountsDataSizeLimitInstruction = parseSetLoadedAccountsDataSizeLimitInstruction;
|
|
236
265
|
//# sourceMappingURL=out.js.map
|
|
237
266
|
//# 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/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,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,MAAM,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;AACpD,WAAO;AAAA,EACT;AACA,QAAM,IAAI;AAAA,IACR;AAAA,EACF;AACF;;;ADCO,SAAS,4CAA0F;AACxG,SAAO;AAAA,IACL,iBAAiB;AAAA,MACf,CAAC,iBAAiBD,cAAa,CAAC;AAAA,MAChC,CAAC,SAAS,cAAc,CAAC;AAAA,IA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A,EACA,gBAAAC;AAAA,EACA,gBAAAP;AAAA,EACA,oBAAAQ;AAAA,OACK;AAmBA,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 {\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
|
+
{"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,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAAA;AAAA,EACA;AAAA,OASK;;;ACjBP,SAAS,eAAe,oBAAkC;AASnD,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,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,MAAM,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;AACpD,WAAO;AAAA,EACT;AACA,QAAM,IAAI;AAAA,IACR;AAAA,EACF;AACF;;;ADCO,SAAS,4CAA0F;AACxG,SAAO;AA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AAAA,EACE,gBAAAA;AAAA,EACA,oBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAP;AAAA,EACA,oBAAAQ;AAAA,OASK;AAmBA,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/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\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/kinobi-so/kinobi\n */\n\nimport { containsBytes, getU8Encoder, type Address } from '@solana/web3.js';\nimport {\n type ParsedRequestHeapFrameInstruction,\n type ParsedRequestUnitsInstruction,\n type ParsedSetComputeUnitLimitInstruction,\n type ParsedSetComputeUnitPriceInstruction,\n type 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/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\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/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\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/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\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/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\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,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var web3_js = require('@solana/web3.js');
|
|
1
|
+
import { containsBytes, getU8Encoder, transformEncoder, getStructEncoder, getU32Encoder, getStructDecoder, getU8Decoder, getU32Decoder, combineCodec, getU64Encoder, getU64Decoder } from '@solana/web3.js';
|
|
4
2
|
|
|
5
3
|
// src/generated/instructions/requestHeapFrame.ts
|
|
6
4
|
var COMPUTE_BUDGET_PROGRAM_ADDRESS = "ComputeBudget111111111111111111111111111111";
|
|
@@ -14,19 +12,19 @@ var ComputeBudgetInstruction = /* @__PURE__ */ ((ComputeBudgetInstruction2) => {
|
|
|
14
12
|
})(ComputeBudgetInstruction || {});
|
|
15
13
|
function identifyComputeBudgetInstruction(instruction) {
|
|
16
14
|
const data = instruction instanceof Uint8Array ? instruction : instruction.data;
|
|
17
|
-
if (
|
|
15
|
+
if (containsBytes(data, getU8Encoder().encode(0), 0)) {
|
|
18
16
|
return 0 /* RequestUnits */;
|
|
19
17
|
}
|
|
20
|
-
if (
|
|
18
|
+
if (containsBytes(data, getU8Encoder().encode(1), 0)) {
|
|
21
19
|
return 1 /* RequestHeapFrame */;
|
|
22
20
|
}
|
|
23
|
-
if (
|
|
21
|
+
if (containsBytes(data, getU8Encoder().encode(2), 0)) {
|
|
24
22
|
return 2 /* SetComputeUnitLimit */;
|
|
25
23
|
}
|
|
26
|
-
if (
|
|
24
|
+
if (containsBytes(data, getU8Encoder().encode(3), 0)) {
|
|
27
25
|
return 3 /* SetComputeUnitPrice */;
|
|
28
26
|
}
|
|
29
|
-
if (
|
|
27
|
+
if (containsBytes(data, getU8Encoder().encode(4), 0)) {
|
|
30
28
|
return 4 /* SetLoadedAccountsDataSizeLimit */;
|
|
31
29
|
}
|
|
32
30
|
throw new Error(
|
|
@@ -36,22 +34,22 @@ function identifyComputeBudgetInstruction(instruction) {
|
|
|
36
34
|
|
|
37
35
|
// src/generated/instructions/requestHeapFrame.ts
|
|
38
36
|
function getRequestHeapFrameInstructionDataEncoder() {
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
["discriminator",
|
|
42
|
-
["bytes",
|
|
37
|
+
return transformEncoder(
|
|
38
|
+
getStructEncoder([
|
|
39
|
+
["discriminator", getU8Encoder()],
|
|
40
|
+
["bytes", getU32Encoder()]
|
|
43
41
|
]),
|
|
44
42
|
(value) => ({ ...value, discriminator: 1 })
|
|
45
43
|
);
|
|
46
44
|
}
|
|
47
45
|
function getRequestHeapFrameInstructionDataDecoder() {
|
|
48
|
-
return
|
|
49
|
-
["discriminator",
|
|
50
|
-
["bytes",
|
|
46
|
+
return getStructDecoder([
|
|
47
|
+
["discriminator", getU8Decoder()],
|
|
48
|
+
["bytes", getU32Decoder()]
|
|
51
49
|
]);
|
|
52
50
|
}
|
|
53
51
|
function getRequestHeapFrameInstructionDataCodec() {
|
|
54
|
-
return
|
|
52
|
+
return combineCodec(
|
|
55
53
|
getRequestHeapFrameInstructionDataEncoder(),
|
|
56
54
|
getRequestHeapFrameInstructionDataDecoder()
|
|
57
55
|
);
|
|
@@ -74,24 +72,24 @@ function parseRequestHeapFrameInstruction(instruction) {
|
|
|
74
72
|
};
|
|
75
73
|
}
|
|
76
74
|
function getRequestUnitsInstructionDataEncoder() {
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
["discriminator",
|
|
80
|
-
["units",
|
|
81
|
-
["additionalFee",
|
|
75
|
+
return transformEncoder(
|
|
76
|
+
getStructEncoder([
|
|
77
|
+
["discriminator", getU8Encoder()],
|
|
78
|
+
["units", getU32Encoder()],
|
|
79
|
+
["additionalFee", getU32Encoder()]
|
|
82
80
|
]),
|
|
83
81
|
(value) => ({ ...value, discriminator: 0 })
|
|
84
82
|
);
|
|
85
83
|
}
|
|
86
84
|
function getRequestUnitsInstructionDataDecoder() {
|
|
87
|
-
return
|
|
88
|
-
["discriminator",
|
|
89
|
-
["units",
|
|
90
|
-
["additionalFee",
|
|
85
|
+
return getStructDecoder([
|
|
86
|
+
["discriminator", getU8Decoder()],
|
|
87
|
+
["units", getU32Decoder()],
|
|
88
|
+
["additionalFee", getU32Decoder()]
|
|
91
89
|
]);
|
|
92
90
|
}
|
|
93
91
|
function getRequestUnitsInstructionDataCodec() {
|
|
94
|
-
return
|
|
92
|
+
return combineCodec(
|
|
95
93
|
getRequestUnitsInstructionDataEncoder(),
|
|
96
94
|
getRequestUnitsInstructionDataDecoder()
|
|
97
95
|
);
|
|
@@ -114,22 +112,22 @@ function parseRequestUnitsInstruction(instruction) {
|
|
|
114
112
|
};
|
|
115
113
|
}
|
|
116
114
|
function getSetComputeUnitLimitInstructionDataEncoder() {
|
|
117
|
-
return
|
|
118
|
-
|
|
119
|
-
["discriminator",
|
|
120
|
-
["units",
|
|
115
|
+
return transformEncoder(
|
|
116
|
+
getStructEncoder([
|
|
117
|
+
["discriminator", getU8Encoder()],
|
|
118
|
+
["units", getU32Encoder()]
|
|
121
119
|
]),
|
|
122
120
|
(value) => ({ ...value, discriminator: 2 })
|
|
123
121
|
);
|
|
124
122
|
}
|
|
125
123
|
function getSetComputeUnitLimitInstructionDataDecoder() {
|
|
126
|
-
return
|
|
127
|
-
["discriminator",
|
|
128
|
-
["units",
|
|
124
|
+
return getStructDecoder([
|
|
125
|
+
["discriminator", getU8Decoder()],
|
|
126
|
+
["units", getU32Decoder()]
|
|
129
127
|
]);
|
|
130
128
|
}
|
|
131
129
|
function getSetComputeUnitLimitInstructionDataCodec() {
|
|
132
|
-
return
|
|
130
|
+
return combineCodec(
|
|
133
131
|
getSetComputeUnitLimitInstructionDataEncoder(),
|
|
134
132
|
getSetComputeUnitLimitInstructionDataDecoder()
|
|
135
133
|
);
|
|
@@ -154,22 +152,22 @@ function parseSetComputeUnitLimitInstruction(instruction) {
|
|
|
154
152
|
};
|
|
155
153
|
}
|
|
156
154
|
function getSetComputeUnitPriceInstructionDataEncoder() {
|
|
157
|
-
return
|
|
158
|
-
|
|
159
|
-
["discriminator",
|
|
160
|
-
["microLamports",
|
|
155
|
+
return transformEncoder(
|
|
156
|
+
getStructEncoder([
|
|
157
|
+
["discriminator", getU8Encoder()],
|
|
158
|
+
["microLamports", getU64Encoder()]
|
|
161
159
|
]),
|
|
162
160
|
(value) => ({ ...value, discriminator: 3 })
|
|
163
161
|
);
|
|
164
162
|
}
|
|
165
163
|
function getSetComputeUnitPriceInstructionDataDecoder() {
|
|
166
|
-
return
|
|
167
|
-
["discriminator",
|
|
168
|
-
["microLamports",
|
|
164
|
+
return getStructDecoder([
|
|
165
|
+
["discriminator", getU8Decoder()],
|
|
166
|
+
["microLamports", getU64Decoder()]
|
|
169
167
|
]);
|
|
170
168
|
}
|
|
171
169
|
function getSetComputeUnitPriceInstructionDataCodec() {
|
|
172
|
-
return
|
|
170
|
+
return combineCodec(
|
|
173
171
|
getSetComputeUnitPriceInstructionDataEncoder(),
|
|
174
172
|
getSetComputeUnitPriceInstructionDataDecoder()
|
|
175
173
|
);
|
|
@@ -194,22 +192,22 @@ function parseSetComputeUnitPriceInstruction(instruction) {
|
|
|
194
192
|
};
|
|
195
193
|
}
|
|
196
194
|
function getSetLoadedAccountsDataSizeLimitInstructionDataEncoder() {
|
|
197
|
-
return
|
|
198
|
-
|
|
199
|
-
["discriminator",
|
|
200
|
-
["accountDataSizeLimit",
|
|
195
|
+
return transformEncoder(
|
|
196
|
+
getStructEncoder([
|
|
197
|
+
["discriminator", getU8Encoder()],
|
|
198
|
+
["accountDataSizeLimit", getU32Encoder()]
|
|
201
199
|
]),
|
|
202
200
|
(value) => ({ ...value, discriminator: 4 })
|
|
203
201
|
);
|
|
204
202
|
}
|
|
205
203
|
function getSetLoadedAccountsDataSizeLimitInstructionDataDecoder() {
|
|
206
|
-
return
|
|
207
|
-
["discriminator",
|
|
208
|
-
["accountDataSizeLimit",
|
|
204
|
+
return getStructDecoder([
|
|
205
|
+
["discriminator", getU8Decoder()],
|
|
206
|
+
["accountDataSizeLimit", getU32Decoder()]
|
|
209
207
|
]);
|
|
210
208
|
}
|
|
211
209
|
function getSetLoadedAccountsDataSizeLimitInstructionDataCodec() {
|
|
212
|
-
return
|
|
210
|
+
return combineCodec(
|
|
213
211
|
getSetLoadedAccountsDataSizeLimitInstructionDataEncoder(),
|
|
214
212
|
getSetLoadedAccountsDataSizeLimitInstructionDataDecoder()
|
|
215
213
|
);
|
|
@@ -234,33 +232,6 @@ function parseSetLoadedAccountsDataSizeLimitInstruction(instruction) {
|
|
|
234
232
|
};
|
|
235
233
|
}
|
|
236
234
|
|
|
237
|
-
|
|
238
|
-
exports.ComputeBudgetInstruction = ComputeBudgetInstruction;
|
|
239
|
-
exports.getRequestHeapFrameInstruction = getRequestHeapFrameInstruction;
|
|
240
|
-
exports.getRequestHeapFrameInstructionDataCodec = getRequestHeapFrameInstructionDataCodec;
|
|
241
|
-
exports.getRequestHeapFrameInstructionDataDecoder = getRequestHeapFrameInstructionDataDecoder;
|
|
242
|
-
exports.getRequestHeapFrameInstructionDataEncoder = getRequestHeapFrameInstructionDataEncoder;
|
|
243
|
-
exports.getRequestUnitsInstruction = getRequestUnitsInstruction;
|
|
244
|
-
exports.getRequestUnitsInstructionDataCodec = getRequestUnitsInstructionDataCodec;
|
|
245
|
-
exports.getRequestUnitsInstructionDataDecoder = getRequestUnitsInstructionDataDecoder;
|
|
246
|
-
exports.getRequestUnitsInstructionDataEncoder = getRequestUnitsInstructionDataEncoder;
|
|
247
|
-
exports.getSetComputeUnitLimitInstruction = getSetComputeUnitLimitInstruction;
|
|
248
|
-
exports.getSetComputeUnitLimitInstructionDataCodec = getSetComputeUnitLimitInstructionDataCodec;
|
|
249
|
-
exports.getSetComputeUnitLimitInstructionDataDecoder = getSetComputeUnitLimitInstructionDataDecoder;
|
|
250
|
-
exports.getSetComputeUnitLimitInstructionDataEncoder = getSetComputeUnitLimitInstructionDataEncoder;
|
|
251
|
-
exports.getSetComputeUnitPriceInstruction = getSetComputeUnitPriceInstruction;
|
|
252
|
-
exports.getSetComputeUnitPriceInstructionDataCodec = getSetComputeUnitPriceInstructionDataCodec;
|
|
253
|
-
exports.getSetComputeUnitPriceInstructionDataDecoder = getSetComputeUnitPriceInstructionDataDecoder;
|
|
254
|
-
exports.getSetComputeUnitPriceInstructionDataEncoder = getSetComputeUnitPriceInstructionDataEncoder;
|
|
255
|
-
exports.getSetLoadedAccountsDataSizeLimitInstruction = getSetLoadedAccountsDataSizeLimitInstruction;
|
|
256
|
-
exports.getSetLoadedAccountsDataSizeLimitInstructionDataCodec = getSetLoadedAccountsDataSizeLimitInstructionDataCodec;
|
|
257
|
-
exports.getSetLoadedAccountsDataSizeLimitInstructionDataDecoder = getSetLoadedAccountsDataSizeLimitInstructionDataDecoder;
|
|
258
|
-
exports.getSetLoadedAccountsDataSizeLimitInstructionDataEncoder = getSetLoadedAccountsDataSizeLimitInstructionDataEncoder;
|
|
259
|
-
exports.identifyComputeBudgetInstruction = identifyComputeBudgetInstruction;
|
|
260
|
-
exports.parseRequestHeapFrameInstruction = parseRequestHeapFrameInstruction;
|
|
261
|
-
exports.parseRequestUnitsInstruction = parseRequestUnitsInstruction;
|
|
262
|
-
exports.parseSetComputeUnitLimitInstruction = parseSetComputeUnitLimitInstruction;
|
|
263
|
-
exports.parseSetComputeUnitPriceInstruction = parseSetComputeUnitPriceInstruction;
|
|
264
|
-
exports.parseSetLoadedAccountsDataSizeLimitInstruction = parseSetLoadedAccountsDataSizeLimitInstruction;
|
|
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 };
|
|
265
236
|
//# sourceMappingURL=out.js.map
|
|
266
|
-
//# sourceMappingURL=index.
|
|
237
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAAA;AAAA,EACA;AAAA,OASK;;;ACjBP,SAAS,eAAe,oBAAkC;AASnD,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;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CACd,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/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\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/kinobi-so/kinobi\n */\n\nimport { containsBytes, getU8Encoder, type Address } from '@solana/web3.js';\nimport {\n type ParsedRequestHeapFrameInstruction,\n type ParsedRequestUnitsInstruction,\n type ParsedSetComputeUnitLimitInstruction,\n type ParsedSetComputeUnitPriceInstruction,\n type 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/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\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/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\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/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\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/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\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"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
4
|
* to add features, then rerun kinobi to update it.
|
|
5
5
|
*
|
|
6
|
-
* @see https://github.com/
|
|
6
|
+
* @see https://github.com/kinobi-so/kinobi
|
|
7
7
|
*/
|
|
8
8
|
export * from './instructions';
|
|
9
9
|
export * from './programs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
4
|
* to add features, then rerun kinobi to update it.
|
|
5
5
|
*
|
|
6
|
-
* @see https://github.com/
|
|
6
|
+
* @see https://github.com/kinobi-so/kinobi
|
|
7
7
|
*/
|
|
8
8
|
export * from './requestHeapFrame';
|
|
9
9
|
export * from './requestUnits';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
4
|
* to add features, then rerun kinobi to update it.
|
|
5
5
|
*
|
|
6
|
-
* @see https://github.com/
|
|
6
|
+
* @see https://github.com/kinobi-so/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address, Codec, Decoder, Encoder, IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/web3.js';
|
|
8
|
+
import { type Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData } from '@solana/web3.js';
|
|
9
9
|
import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
|
|
10
10
|
export type RequestHeapFrameInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
11
11
|
export type RequestHeapFrameInstructionData = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestHeapFrame.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/requestHeapFrame.ts"],"names":[],"mappings":"AAA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,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"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
4
|
* to add features, then rerun kinobi to update it.
|
|
5
5
|
*
|
|
6
|
-
* @see https://github.com/
|
|
6
|
+
* @see https://github.com/kinobi-so/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address, Codec, Decoder, Encoder, IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/web3.js';
|
|
8
|
+
import { type Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData } from '@solana/web3.js';
|
|
9
9
|
import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
|
|
10
10
|
export type RequestUnitsInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
11
11
|
export type RequestUnitsInstructionData = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestUnits.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/requestUnits.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EASL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;A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AAC,QAAQ,CAAC,GAAG,oBAAoB,CAAC,UAAU,CAAC,GACrE,6BAA6B,CAAC,QAAQ,CAAC,CAKzC"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
4
|
* to add features, then rerun kinobi to update it.
|
|
5
5
|
*
|
|
6
|
-
* @see https://github.com/
|
|
6
|
+
* @see https://github.com/kinobi-so/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address, Codec, Decoder, Encoder, IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/web3.js';
|
|
8
|
+
import { type Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData } from '@solana/web3.js';
|
|
9
9
|
import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
|
|
10
10
|
export type SetComputeUnitLimitInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
11
11
|
export type SetComputeUnitLimitInstructionData = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setComputeUnitLimit.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/setComputeUnitLimit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EASL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,MAAM,8BAA8B,CACxC,QAAQ,SAAS,MAAM,GAAG,OAAO,8BAA8B,EAC/D,kBAAkB,SAA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see https://github.com/
|
|
6
|
+
* @see https://github.com/kinobi-so/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address, Codec, Decoder, Encoder, IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/web3.js';
|
|
8
|
+
import { type Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData } from '@solana/web3.js';
|
|
9
9
|
import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
|
|
10
10
|
export type SetComputeUnitPriceInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
11
11
|
export type SetComputeUnitPriceInstructionData = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setComputeUnitPrice.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/setComputeUnitPrice.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EASL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,MAAM,8BAA8B,CACxC,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,kCAAkC,GAAG;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,sCAAsC,GAAG;IACnD,mEAAmE;IACnE,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC,CAAC;AAEF,wBAAgB,4CAA4C,IAAI,OAAO,CAAC,sCAAsC,CAAC,CAQ9G;AAED,wBAAgB,4CAA4C,IAAI,OAAO,CAAC,kCAAkC,CAAC,CAK1G;AAED,wBAAgB,0CAA0C,IAAI,KAAK,CACjE,sCAAsC,EACtC,kCAAkC,CACnC,CAKA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,sCAAsC,CAAC,eAAe,CAAC,CAAC;CACxE,CAAC;AAEF,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,wBAAwB,GAC9B,8BAA8B,CAAC,OAAO,8BAA8B,CAAC,CAevE;AAED,MAAM,MAAM,oCAAoC,CAC9C,QAAQ,SAAS,MAAM,GAAG,OAAO,8BAA8B,IAC7D;IACF,cAAc,EAAE,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"}
|
package/dist/types/{src/generated → generated}/instructions/setLoadedAccountsDataSizeLimit.d.ts
RENAMED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
4
|
* to add features, then rerun kinobi to update it.
|
|
5
5
|
*
|
|
6
|
-
* @see https://github.com/
|
|
6
|
+
* @see https://github.com/kinobi-so/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address, Codec, Decoder, Encoder, IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/web3.js';
|
|
8
|
+
import { type Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData } from '@solana/web3.js';
|
|
9
9
|
import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
|
|
10
10
|
export type SetLoadedAccountsDataSizeLimitInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
11
11
|
export type SetLoadedAccountsDataSizeLimitInstructionData = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setLoadedAccountsDataSizeLimit.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/setLoadedAccountsDataSizeLimit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EASL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,MAAM,yCAAyC,CACnD,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,6CAA6C,GAAG;IAC1D,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,iDAAiD,GAAG;IAC9D,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,wBAAgB,uDAAuD,IAAI,OAAO,CAAC,iDAAiD,CAAC,CAQpI;AAED,wBAAgB,uDAAuD,IAAI,OAAO,CAAC,6CAA6C,CAAC,CAKhI;AAED,wBAAgB,qDAAqD,IAAI,KAAK,CAC5E,iDAAiD,EACjD,6CAA6C,CAC9C,CAKA;AAED,MAAM,MAAM,mCAAmC,GAAG;IAChD,oBAAoB,EAAE,iDAAiD,CAAC,sBAAsB,CAAC,CAAC;CACjG,CAAC;AAEF,wBAAgB,4CAA4C,CAC1D,KAAK,EAAE,mCAAmC,GACzC,yCAAyC,CAC1C,OAAO,8BAA8B,CACtC,CAiBA;AAED,MAAM,MAAM,+CAA+C,CACzD,QAAQ,SAAS,MAAM,GAAG,OAAO,8BAA8B,IAC7D;IACF,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,IAAI,EAAE,6CAA6C,CAAC;CACrD,CAAC;AAEF,wBAAgB,8CAA8C,CAC5D,QAAQ,SAAS,MAAM,EAEvB,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAC,UAAU,CAAC,GACrE,+CAA+C,CAAC,QAAQ,CAAC,CAO3D"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
4
|
* to add features, then rerun kinobi to update it.
|
|
5
5
|
*
|
|
6
|
-
* @see https://github.com/
|
|
6
|
+
* @see https://github.com/kinobi-so/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address } from '@solana/web3.js';
|
|
9
|
-
import { ParsedRequestHeapFrameInstruction, ParsedRequestUnitsInstruction, ParsedSetComputeUnitLimitInstruction, ParsedSetComputeUnitPriceInstruction, ParsedSetLoadedAccountsDataSizeLimitInstruction } from '../instructions';
|
|
8
|
+
import { type Address } from '@solana/web3.js';
|
|
9
|
+
import { type ParsedRequestHeapFrameInstruction, type ParsedRequestUnitsInstruction, type ParsedSetComputeUnitLimitInstruction, type ParsedSetComputeUnitPriceInstruction, type ParsedSetLoadedAccountsDataSizeLimitInstruction } from '../instructions';
|
|
10
10
|
export declare const COMPUTE_BUDGET_PROGRAM_ADDRESS: Address<"ComputeBudget111111111111111111111111111111">;
|
|
11
11
|
export declare enum ComputeBudgetInstruction {
|
|
12
12
|
RequestUnits = 0,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computeBudget.d.ts","sourceRoot":"","sources":["../../../../src/generated/programs/computeBudget.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA+B,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EACL,KAAK,iCAAiC,EACtC,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,oCAAoC,EACzC,KAAK,+CAA+C,EACrD,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,8BAA8B,EACQ,OAAO,CAAC,6CAA6C,CAAC,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"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
4
|
* to add features, then rerun kinobi to update it.
|
|
5
5
|
*
|
|
6
|
-
* @see https://github.com/
|
|
6
|
+
* @see https://github.com/kinobi-so/kinobi
|
|
7
7
|
*/
|
|
8
8
|
export * from './computeBudget';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/programs/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,iBAAiB,CAAC"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
4
|
* to add features, then rerun kinobi to update it.
|
|
5
5
|
*
|
|
6
|
-
* @see https://github.com/
|
|
6
|
+
* @see https://github.com/kinobi-so/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address, IAccountMeta, IAccountSignerMeta, ProgramDerivedAddress, TransactionSigner } from '@solana/web3.js';
|
|
8
|
+
import { type Address, type IAccountMeta, type IAccountSignerMeta, type ProgramDerivedAddress, type TransactionSigner } from '@solana/web3.js';
|
|
9
9
|
/**
|
|
10
10
|
* Asserts that the given value is not null or undefined.
|
|
11
11
|
* @internal
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,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AC;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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana-program/compute-budget",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "JavaScript client for the Compute Budget program",
|
|
5
5
|
"sideEffects": false,
|
|
6
|
-
"module": "./dist/src/index.
|
|
7
|
-
"main": "./dist/src/index.
|
|
8
|
-
"types": "./dist/types/
|
|
9
|
-
"type": "
|
|
6
|
+
"module": "./dist/src/index.mjs",
|
|
7
|
+
"main": "./dist/src/index.js",
|
|
8
|
+
"types": "./dist/types/index.d.ts",
|
|
9
|
+
"type": "commonjs",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"types": "./dist/types/
|
|
13
|
-
"import": "./dist/src/index.
|
|
14
|
-
"require": "./dist/src/index.
|
|
12
|
+
"types": "./dist/types/index.d.ts",
|
|
13
|
+
"import": "./dist/src/index.mjs",
|
|
14
|
+
"require": "./dist/src/index.js"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
@@ -22,25 +22,26 @@
|
|
|
22
22
|
"access": "public",
|
|
23
23
|
"registry": "https://registry.npmjs.org"
|
|
24
24
|
},
|
|
25
|
-
"license": "
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@solana/web3.js": "2.0.0-preview.
|
|
27
|
+
"@solana/web3.js": "2.0.0-preview.4"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@ava/typescript": "^4.1.0",
|
|
31
|
-
"@solana/eslint-config-solana": "^3.0.
|
|
32
|
-
"@solana/web3.js": "
|
|
33
|
-
"@solana/webcrypto-ed25519-polyfill": "
|
|
34
|
-
"@
|
|
35
|
-
"@typescript-eslint/
|
|
36
|
-
"
|
|
31
|
+
"@solana/eslint-config-solana": "^3.0.3",
|
|
32
|
+
"@solana/web3.js": "2.0.0-preview.4",
|
|
33
|
+
"@solana/webcrypto-ed25519-polyfill": "2.0.0-preview.4",
|
|
34
|
+
"@types/node": "^20",
|
|
35
|
+
"@typescript-eslint/eslint-plugin": "^7.16.1",
|
|
36
|
+
"@typescript-eslint/parser": "^7.16.1",
|
|
37
|
+
"ava": "^6.1.3",
|
|
37
38
|
"eslint": "^8.57.0",
|
|
38
|
-
"prettier": "^3.
|
|
39
|
+
"prettier": "^3.3.3",
|
|
39
40
|
"rimraf": "^5.0.5",
|
|
40
41
|
"tsup": "^8.0.2",
|
|
41
42
|
"typedoc": "^0.25.12",
|
|
42
43
|
"typedoc-plugin-missing-exports": "^2.2.0",
|
|
43
|
-
"typescript": "^5.
|
|
44
|
+
"typescript": "^5.5.3"
|
|
44
45
|
},
|
|
45
46
|
"ava": {
|
|
46
47
|
"require": [
|
|
@@ -53,7 +54,6 @@
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
},
|
|
56
|
-
"packageManager": "pnpm@8.2.0",
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
|
|
59
59
|
"build:docs": "typedoc",
|
package/dist/src/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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,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,MAAM,aA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SAAS,oCACd,aACgD;AAChD,SAAO;AAAA,IACL,gBAAgB,YAAY;AAAA,IAC5B,MAAM,6CAA6C,EAAE;AAAA,MACnD,YAAY;AAAA,IACd;AAAA,EACF;AACF;;;ACxGA;AAAA,EASE,gBAAAA;AAAA,EACA,oBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAP;AAAA,EACA,oBAAAQ;AAAA,OACK;AAmBA,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 {\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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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,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AAC;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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setComputeUnitLimit.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/setComputeUnitLimit.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,8BAA8B,CACxC,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,kCAAkC,GAAG;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,sCAAsC,GAAG;IACnD,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,4CAA4C,IAAI,OAAO,CAAC,sCAAsC,CAAC,CAQ9G;AAED,wBAAgB,4CAA4C,IAAI,OAAO,CAAC,kCAAkC,CAAC,CAK1G;AAED,wBAAgB,0CAA0C,IAAI,KAAK,CACjE,sCAAsC,EACtC,kCAAkC,CACnC,CAKA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,sCAAsC,CAAC,OAA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E,MAAM,GAAG,MAAM,CAAC;CAChC,CAAC;AAEF,wBAAgB,4CAA4C,IAAI,OAAO,CAAC,sCAAsC,CAAC,CAQ9G;AAED,wBAAgB,4CAA4C,IAAI,OAAO,CAAC,kCAAkC,CAAC,CAK1G;AAED,wBAAgB,0CAA0C,IAAI,KAAK,CACjE,sCAAsC,EACtC,kCAAkC,CACnC,CAKA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,sCAAsC,CAAC,eAAe,CAAC,CAAC;CACxE,CAAC;AAEF,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,wBAAwB,GAC9B,8BAA8B,CAAC,OAAO,8BAA8B,CAAC,CAevE;AAED,MAAM,MAAM,oCAAoC,CAC9C,QAAQ,SAAS,MAAM,GAAG,OAAO,8BAA8B,IAC7D;IACF,cAAc,EAAE,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"}
|
|
@@ -1 +0,0 @@
|
|
|
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,GAAG,OAAO,8BAA8B,EAC/D,kBAAkB,SAAS,SAAS,YAAY,CAA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+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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/programs/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRo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AAC,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Commitment, CompilableTransactionMessage, Rpc, RpcSubscriptions, SolanaRpcApi, SolanaRpcSubscriptionsApi, TransactionMessageWithBlockhashLifetime, TransactionSigner } from '@solana/web3.js';
|
|
2
|
-
type Client = {
|
|
3
|
-
rpc: Rpc<SolanaRpcApi>;
|
|
4
|
-
rpcSubscriptions: RpcSubscriptions<SolanaRpcSubscriptionsApi>;
|
|
5
|
-
};
|
|
6
|
-
export declare const createDefaultSolanaClient: () => Client;
|
|
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<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
|
-
version: 0;
|
|
11
|
-
}>>;
|
|
12
|
-
export declare const signAndSendTransaction: (client: Client, transactionMessage: CompilableTransactionMessage & TransactionMessageWithBlockhashLifetime, commitment?: Commitment) => Promise<import("@solana/web3.js").Signature>;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=_setup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setComputeUnitLimit.test.d.ts","sourceRoot":"","sources":["../../../test/setComputeUnitLimit.test.ts"],"names":[],"mappings":""}
|
|
File without changes
|