@solana-program/compute-budget 0.1.1 → 0.3.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.cjs +108 -224
- package/dist/src/index.cjs.map +1 -1
- package/dist/src/index.js +72 -174
- package/dist/src/index.js.map +1 -1
- package/dist/types/src/generated/index.d.ts +0 -1
- package/dist/types/src/generated/index.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/requestHeapFrame.d.ts +5 -12
- package/dist/types/src/generated/instructions/requestHeapFrame.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/requestUnits.d.ts +5 -13
- package/dist/types/src/generated/instructions/requestUnits.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/setComputeUnitLimit.d.ts +5 -12
- package/dist/types/src/generated/instructions/setComputeUnitLimit.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/setComputeUnitPrice.d.ts +5 -12
- package/dist/types/src/generated/instructions/setComputeUnitPrice.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/setLoadedAccountsDataSizeLimit.d.ts +5 -12
- package/dist/types/src/generated/instructions/setLoadedAccountsDataSizeLimit.d.ts.map +1 -1
- package/dist/types/src/generated/programs/computeBudget.d.ts +1 -4
- package/dist/types/src/generated/programs/computeBudget.d.ts.map +1 -1
- package/dist/types/src/generated/shared/index.d.ts +2 -13
- package/dist/types/src/generated/shared/index.d.ts.map +1 -1
- package/dist/types/test/_setup.d.ts +4 -4
- package/dist/types/test/_setup.d.ts.map +1 -1
- package/package.json +13 -22
|
@@ -5,11 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address } from '@solana/
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
export type SetComputeUnitLimitInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
12
|
-
export type SetComputeUnitLimitInstructionWithSigners<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
8
|
+
import { Address, Codec, Decoder, Encoder, IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/web3.js';
|
|
9
|
+
import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
|
|
10
|
+
export type SetComputeUnitLimitInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
13
11
|
export type SetComputeUnitLimitInstructionData = {
|
|
14
12
|
discriminator: number;
|
|
15
13
|
/** Transaction-wide compute unit limit. */
|
|
@@ -25,13 +23,8 @@ export declare function getSetComputeUnitLimitInstructionDataCodec(): Codec<SetC
|
|
|
25
23
|
export type SetComputeUnitLimitInput = {
|
|
26
24
|
units: SetComputeUnitLimitInstructionDataArgs['units'];
|
|
27
25
|
};
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
export declare function getSetComputeUnitLimitInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'>(input: SetComputeUnitLimitInputWithSigners): SetComputeUnitLimitInstructionWithSigners<TProgram>;
|
|
32
|
-
export declare function getSetComputeUnitLimitInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'>(input: SetComputeUnitLimitInput): SetComputeUnitLimitInstruction<TProgram>;
|
|
33
|
-
export declare function getSetComputeUnitLimitInstructionRaw<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []>(args: SetComputeUnitLimitInstructionDataArgs, programAddress?: Address<TProgram>, remainingAccounts?: TRemainingAccounts): SetComputeUnitLimitInstruction<TProgram, TRemainingAccounts>;
|
|
34
|
-
export type ParsedSetComputeUnitLimitInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'> = {
|
|
26
|
+
export declare function getSetComputeUnitLimitInstruction(input: SetComputeUnitLimitInput): SetComputeUnitLimitInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;
|
|
27
|
+
export type ParsedSetComputeUnitLimitInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> = {
|
|
35
28
|
programAddress: Address<TProgram>;
|
|
36
29
|
data: SetComputeUnitLimitInstructionData;
|
|
37
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setComputeUnitLimit.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/setComputeUnitLimit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"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,OAAO,CAAC,CAAC;CACxD,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"}
|
|
@@ -5,11 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address } from '@solana/
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
export type SetComputeUnitPriceInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
12
|
-
export type SetComputeUnitPriceInstructionWithSigners<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
8
|
+
import { Address, Codec, Decoder, Encoder, IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/web3.js';
|
|
9
|
+
import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
|
|
10
|
+
export type SetComputeUnitPriceInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
13
11
|
export type SetComputeUnitPriceInstructionData = {
|
|
14
12
|
discriminator: number;
|
|
15
13
|
/** Transaction compute unit price used for prioritization fees. */
|
|
@@ -25,13 +23,8 @@ export declare function getSetComputeUnitPriceInstructionDataCodec(): Codec<SetC
|
|
|
25
23
|
export type SetComputeUnitPriceInput = {
|
|
26
24
|
microLamports: SetComputeUnitPriceInstructionDataArgs['microLamports'];
|
|
27
25
|
};
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
export declare function getSetComputeUnitPriceInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'>(input: SetComputeUnitPriceInputWithSigners): SetComputeUnitPriceInstructionWithSigners<TProgram>;
|
|
32
|
-
export declare function getSetComputeUnitPriceInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'>(input: SetComputeUnitPriceInput): SetComputeUnitPriceInstruction<TProgram>;
|
|
33
|
-
export declare function getSetComputeUnitPriceInstructionRaw<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []>(args: SetComputeUnitPriceInstructionDataArgs, programAddress?: Address<TProgram>, remainingAccounts?: TRemainingAccounts): SetComputeUnitPriceInstruction<TProgram, TRemainingAccounts>;
|
|
34
|
-
export type ParsedSetComputeUnitPriceInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'> = {
|
|
26
|
+
export declare function getSetComputeUnitPriceInstruction(input: SetComputeUnitPriceInput): SetComputeUnitPriceInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;
|
|
27
|
+
export type ParsedSetComputeUnitPriceInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> = {
|
|
35
28
|
programAddress: Address<TProgram>;
|
|
36
29
|
data: SetComputeUnitPriceInstructionData;
|
|
37
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setComputeUnitPrice.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/setComputeUnitPrice.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"setComputeUnitPrice.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/setComputeUnitPrice.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACxB,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,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"}
|
|
@@ -5,11 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address } from '@solana/
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
export type SetLoadedAccountsDataSizeLimitInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
12
|
-
export type SetLoadedAccountsDataSizeLimitInstructionWithSigners<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
8
|
+
import { Address, Codec, Decoder, Encoder, IAccountMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/web3.js';
|
|
9
|
+
import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
|
|
10
|
+
export type SetLoadedAccountsDataSizeLimitInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
|
|
13
11
|
export type SetLoadedAccountsDataSizeLimitInstructionData = {
|
|
14
12
|
discriminator: number;
|
|
15
13
|
accountDataSizeLimit: number;
|
|
@@ -23,13 +21,8 @@ export declare function getSetLoadedAccountsDataSizeLimitInstructionDataCodec():
|
|
|
23
21
|
export type SetLoadedAccountsDataSizeLimitInput = {
|
|
24
22
|
accountDataSizeLimit: SetLoadedAccountsDataSizeLimitInstructionDataArgs['accountDataSizeLimit'];
|
|
25
23
|
};
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
export declare function getSetLoadedAccountsDataSizeLimitInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'>(input: SetLoadedAccountsDataSizeLimitInputWithSigners): SetLoadedAccountsDataSizeLimitInstructionWithSigners<TProgram>;
|
|
30
|
-
export declare function getSetLoadedAccountsDataSizeLimitInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'>(input: SetLoadedAccountsDataSizeLimitInput): SetLoadedAccountsDataSizeLimitInstruction<TProgram>;
|
|
31
|
-
export declare function getSetLoadedAccountsDataSizeLimitInstructionRaw<TProgram extends string = 'ComputeBudget111111111111111111111111111111', TRemainingAccounts extends Array<IAccountMeta<string>> = []>(args: SetLoadedAccountsDataSizeLimitInstructionDataArgs, programAddress?: Address<TProgram>, remainingAccounts?: TRemainingAccounts): SetLoadedAccountsDataSizeLimitInstruction<TProgram, TRemainingAccounts>;
|
|
32
|
-
export type ParsedSetLoadedAccountsDataSizeLimitInstruction<TProgram extends string = 'ComputeBudget111111111111111111111111111111'> = {
|
|
24
|
+
export declare function getSetLoadedAccountsDataSizeLimitInstruction(input: SetLoadedAccountsDataSizeLimitInput): SetLoadedAccountsDataSizeLimitInstruction<typeof COMPUTE_BUDGET_PROGRAM_ADDRESS>;
|
|
25
|
+
export type ParsedSetLoadedAccountsDataSizeLimitInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS> = {
|
|
33
26
|
programAddress: Address<TProgram>;
|
|
34
27
|
data: SetLoadedAccountsDataSizeLimitInstructionData;
|
|
35
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setLoadedAccountsDataSizeLimit.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/setLoadedAccountsDataSizeLimit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"setLoadedAccountsDataSizeLimit.d.ts","sourceRoot":"","sources":["../../../../../src/generated/instructions/setLoadedAccountsDataSizeLimit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EASrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,MAAM,yCAAyC,CACnD,QAAQ,SAAS,MAAM,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"}
|
|
@@ -5,12 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address } from '@solana/
|
|
9
|
-
import { Program } from '@solana/programs';
|
|
8
|
+
import { Address } from '@solana/web3.js';
|
|
10
9
|
import { ParsedRequestHeapFrameInstruction, ParsedRequestUnitsInstruction, ParsedSetComputeUnitLimitInstruction, ParsedSetComputeUnitPriceInstruction, ParsedSetLoadedAccountsDataSizeLimitInstruction } from '../instructions';
|
|
11
10
|
export declare const COMPUTE_BUDGET_PROGRAM_ADDRESS: Address<"ComputeBudget111111111111111111111111111111">;
|
|
12
|
-
export type ComputeBudgetProgram = Program<'ComputeBudget111111111111111111111111111111'>;
|
|
13
|
-
export declare function getComputeBudgetProgram(): ComputeBudgetProgram;
|
|
14
11
|
export declare enum ComputeBudgetInstruction {
|
|
15
12
|
RequestUnits = 0,
|
|
16
13
|
RequestHeapFrame = 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeBudget.d.ts","sourceRoot":"","sources":["../../../../../src/generated/programs/computeBudget.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"computeBudget.d.ts","sourceRoot":"","sources":["../../../../../src/generated/programs/computeBudget.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAA+B,MAAM,iBAAiB,CAAC;AACvE,OAAO,EACL,iCAAiC,EACjC,6BAA6B,EAC7B,oCAAoC,EACpC,oCAAoC,EACpC,+CAA+C,EAChD,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,8BAA8B,wDAC8D,CAAC;AAE1G,oBAAY,wBAAwB;IAClC,YAAY,IAAA;IACZ,gBAAgB,IAAA;IAChB,mBAAmB,IAAA;IACnB,mBAAmB,IAAA;IACnB,8BAA8B,IAAA;CAC/B;AAED,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG,UAAU,GAC7C,wBAAwB,CAqB1B;AAED,MAAM,MAAM,8BAA8B,CACxC,QAAQ,SAAS,MAAM,GAAG,6CAA6C,IAErE,CAAC;IACC,eAAe,EAAE,wBAAwB,CAAC,YAAY,CAAC;CACxD,GAAG,6BAA6B,CAAC,QAAQ,CAAC,CAAC,GAC5C,CAAC;IACC,eAAe,EAAE,wBAAwB,CAAC,gBAAgB,CAAC;CAC5D,GAAG,iCAAiC,CAAC,QAAQ,CAAC,CAAC,GAChD,CAAC;IACC,eAAe,EAAE,wBAAwB,CAAC,mBAAmB,CAAC;CAC/D,GAAG,oCAAoC,CAAC,QAAQ,CAAC,CAAC,GACnD,CAAC;IACC,eAAe,EAAE,wBAAwB,CAAC,mBAAmB,CAAC;CAC/D,GAAG,oCAAoC,CAAC,QAAQ,CAAC,CAAC,GACnD,CAAC;IACC,eAAe,EAAE,wBAAwB,CAAC,8BAA8B,CAAC;CAC1E,GAAG,+CAA+C,CAAC,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/metaplex-foundation/kinobi
|
|
7
7
|
*/
|
|
8
|
-
import { Address, ProgramDerivedAddress } from '@solana/
|
|
9
|
-
import { AccountRole, IAccountMeta } from '@solana/instructions';
|
|
10
|
-
import { IAccountSignerMeta, TransactionSigner } from '@solana/signers';
|
|
8
|
+
import { Address, IAccountMeta, IAccountSignerMeta, ProgramDerivedAddress, TransactionSigner } from '@solana/web3.js';
|
|
11
9
|
/**
|
|
12
10
|
* Asserts that the given value is not null or undefined.
|
|
13
11
|
* @internal
|
|
@@ -36,14 +34,6 @@ export type ResolvedAccount<T extends string = string, U extends Address<T> | Pr
|
|
|
36
34
|
isWritable: boolean;
|
|
37
35
|
value: U;
|
|
38
36
|
};
|
|
39
|
-
/**
|
|
40
|
-
* Add an account meta with a default role if only an address is provided.
|
|
41
|
-
* @internal
|
|
42
|
-
*/
|
|
43
|
-
export declare function accountMetaWithDefault<TAccount extends string | IAccountMeta<string>, TRole extends AccountRole>(account: TAccount | undefined, role: TRole): (TAccount extends string ? {
|
|
44
|
-
address: Address<TAccount>;
|
|
45
|
-
role: TRole;
|
|
46
|
-
} : TAccount) | undefined;
|
|
47
37
|
/**
|
|
48
38
|
* Defines an instruction that stores additional bytes on-chain.
|
|
49
39
|
* @internal
|
|
@@ -55,7 +45,6 @@ export type IInstructionWithByteDelta = {
|
|
|
55
45
|
* Get account metas and signers from resolved accounts.
|
|
56
46
|
* @internal
|
|
57
47
|
*/
|
|
58
|
-
export declare function
|
|
48
|
+
export declare function getAccountMetaFactory(programAddress: Address, optionalAccountStrategy: 'omitted' | 'programId'): (account: ResolvedAccount) => IAccountMeta | IAccountSignerMeta | undefined;
|
|
59
49
|
export declare function isTransactionSigner<TAddress extends string = string>(value: Address<TAddress> | ProgramDerivedAddress<TAddress> | TransactionSigner<TAddress>): value is TransactionSigner<TAddress>;
|
|
60
|
-
export declare function memcmp(data: Uint8Array, bytes: Uint8Array, offset: number): boolean;
|
|
61
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAEL,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAEzB;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,CAK5D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EACrD,KAAK,EACD,OAAO,CAAC,CAAC,CAAC,GACV,qBAAqB,CAAC,CAAC,CAAC,GACxB,iBAAiB,CAAC,CAAC,CAAC,GACpB,IAAI,GACJ,SAAS,GACZ,OAAO,CAAC,CAAC,CAAC,CAWZ;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EACnE,KAAK,EACD,OAAO,CAAC,CAAC,CAAC,GACV,qBAAqB,CAAC,CAAC,CAAC,GACxB,iBAAiB,CAAC,CAAC,CAAC,GACpB,IAAI,GACJ,SAAS,GACZ,qBAAqB,CAAC,CAAC,CAAC,CAK1B;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAC/D,KAAK,EACD,OAAO,CAAC,CAAC,CAAC,GACV,qBAAqB,CAAC,CAAC,CAAC,GACxB,iBAAiB,CAAC,CAAC,CAAC,GACpB,IAAI,GACJ,SAAS,GACZ,iBAAiB,CAAC,CAAC,CAAC,CAKtB;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,CACzB,CAAC,SAAS,MAAM,GAAG,MAAM,EACzB,CAAC,SACG,OAAO,CAAC,CAAC,CAAC,GACV,qBAAqB,CAAC,CAAC,CAAC,GACxB,iBAAiB,CAAC,CAAC,CAAC,GACpB,IAAI,GACJ,OAAO,CAAC,CAAC,CAAC,GACV,qBAAqB,CAAC,CAAC,CAAC,GACxB,iBAAiB,CAAC,CAAC,CAAC,GACpB,IAAI,IACN;IACF,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,OAAO,EACvB,uBAAuB,EAAE,SAAS,GAAG,WAAW,aAGrC,eAAe,KACvB,YAAY,GAAG,kBAAkB,GAAG,SAAS,CAoBjD;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,EAClE,KAAK,EACD,OAAO,CAAC,QAAQ,CAAC,GACjB,qBAAqB,CAAC,QAAQ,CAAC,GAC/B,iBAAiB,CAAC,QAAQ,CAAC,GAC9B,KAAK,IAAI,iBAAiB,CAAC,QAAQ,CAAC,CAOtC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Commitment,
|
|
1
|
+
import { Commitment, CompilableTransactionMessage, Rpc, RpcSubscriptions, SolanaRpcApi, SolanaRpcSubscriptionsApi, TransactionMessageWithBlockhashLifetime, TransactionSigner } from '@solana/web3.js';
|
|
2
2
|
type Client = {
|
|
3
3
|
rpc: Rpc<SolanaRpcApi>;
|
|
4
4
|
rpcSubscriptions: RpcSubscriptions<SolanaRpcSubscriptionsApi>;
|
|
5
5
|
};
|
|
6
6
|
export declare const createDefaultSolanaClient: () => Client;
|
|
7
7
|
export declare const generateKeyPairSignerWithSol: (client: Client, putativeLamports?: bigint) => Promise<import("@solana/web3.js").KeyPairSigner<string>>;
|
|
8
|
-
export declare const createDefaultTransaction: (client: Client, feePayer: TransactionSigner) => Promise<
|
|
8
|
+
export declare const createDefaultTransaction: (client: Client, feePayer: TransactionSigner) => Promise<TransactionMessageWithBlockhashLifetime & import("@solana/web3.js").ITransactionMessageWithFeePayerSigner<string, TransactionSigner<string>> & Readonly<{
|
|
9
9
|
instructions: readonly import("@solana/web3.js").IInstruction<string, readonly (import("@solana/web3.js").IAccountMeta<string> | import("@solana/web3.js").IAccountLookupMeta<string, string>)[]>[];
|
|
10
10
|
version: 0;
|
|
11
|
-
}
|
|
12
|
-
export declare const signAndSendTransaction: (client: Client,
|
|
11
|
+
}>>;
|
|
12
|
+
export declare const signAndSendTransaction: (client: Client, transactionMessage: CompilableTransactionMessage & TransactionMessageWithBlockhashLifetime, commitment?: Commitment) => Promise<import("@solana/web3.js").Signature>;
|
|
13
13
|
export {};
|
|
14
14
|
//# sourceMappingURL=_setup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_setup.d.ts","sourceRoot":"","sources":["../../../test/_setup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"_setup.d.ts","sourceRoot":"","sources":["../../../test/_setup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,GAAG,EACH,gBAAgB,EAChB,YAAY,EACZ,yBAAyB,EACzB,uCAAuC,EACvC,iBAAiB,EAalB,MAAM,iBAAiB,CAAC;AAEzB,KAAK,MAAM,GAAG;IACZ,GAAG,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC;IACvB,gBAAgB,EAAE,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;CAC/D,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAAO,MAI5C,CAAC;AAEF,eAAO,MAAM,4BAA4B,WAC/B,MAAM,qBACI,MAAM,6DASzB,CAAC;AAEF,eAAO,MAAM,wBAAwB,WAC3B,MAAM,YACJ,iBAAiB;;;GAU5B,CAAC;AAEF,eAAO,MAAM,sBAAsB,WACzB,MAAM,sBACM,4BAA4B,GAC9C,uCAAuC,eAC7B,UAAU,iDASvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana-program/compute-budget",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "JavaScript client for the Compute Budget program",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "./dist/src/index.js",
|
|
@@ -23,33 +23,24 @@
|
|
|
23
23
|
"registry": "https://registry.npmjs.org"
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
|
-
"
|
|
27
|
-
"@solana/
|
|
28
|
-
"@solana/addresses": "^2.0.0-preview",
|
|
29
|
-
"@solana/codecs": "^2.0.0-preview",
|
|
30
|
-
"@solana/instructions": "^2.0.0-preview",
|
|
31
|
-
"@solana/programs": "^2.0.0-preview",
|
|
32
|
-
"@solana/signers": "^2.0.0-preview"
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"@solana/web3.js": "tp3"
|
|
33
28
|
},
|
|
34
29
|
"devDependencies": {
|
|
35
30
|
"@ava/typescript": "^4.1.0",
|
|
36
|
-
"@solana/
|
|
37
|
-
"@solana/
|
|
38
|
-
"@
|
|
39
|
-
"@typescript-eslint/
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"eslint
|
|
43
|
-
"
|
|
44
|
-
"eslint-plugin-import": "^2.26.0",
|
|
45
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
46
|
-
"prettier": "^2.5.1",
|
|
31
|
+
"@solana/eslint-config-solana": "^3.0.0",
|
|
32
|
+
"@solana/web3.js": "tp3",
|
|
33
|
+
"@solana/webcrypto-ed25519-polyfill": "tp3",
|
|
34
|
+
"@typescript-eslint/eslint-plugin": "^7.3.1",
|
|
35
|
+
"@typescript-eslint/parser": "^7.3.1",
|
|
36
|
+
"ava": "^6.1.2",
|
|
37
|
+
"eslint": "^8.57.0",
|
|
38
|
+
"prettier": "^3.2.5",
|
|
47
39
|
"rimraf": "^5.0.5",
|
|
48
40
|
"tsup": "^8.0.2",
|
|
49
|
-
"typedoc": "^0.25.
|
|
50
|
-
"typedoc-plugin-expand-object-like-types": "^0.1.2",
|
|
41
|
+
"typedoc": "^0.25.12",
|
|
51
42
|
"typedoc-plugin-missing-exports": "^2.2.0",
|
|
52
|
-
"typescript": "^5.
|
|
43
|
+
"typescript": "^5.4.2"
|
|
53
44
|
},
|
|
54
45
|
"ava": {
|
|
55
46
|
"require": [
|