@solana-program/compute-budget 0.8.0 → 0.10.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.
Files changed (31) hide show
  1. package/dist/src/index.js +21 -48
  2. package/dist/src/index.js.map +1 -1
  3. package/dist/src/index.mjs +22 -49
  4. package/dist/src/index.mjs.map +1 -1
  5. package/dist/types/estimateAndSetComputeLimit.d.ts +2 -2
  6. package/dist/types/estimateAndSetComputeLimit.d.ts.map +1 -1
  7. package/dist/types/estimateComputeLimitInternal.d.ts +3 -3
  8. package/dist/types/estimateComputeLimitInternal.d.ts.map +1 -1
  9. package/dist/types/generated/index.d.ts +2 -2
  10. package/dist/types/generated/instructions/index.d.ts +2 -2
  11. package/dist/types/generated/instructions/requestHeapFrame.d.ts +9 -9
  12. package/dist/types/generated/instructions/requestHeapFrame.d.ts.map +1 -1
  13. package/dist/types/generated/instructions/requestUnits.d.ts +9 -9
  14. package/dist/types/generated/instructions/requestUnits.d.ts.map +1 -1
  15. package/dist/types/generated/instructions/setComputeUnitLimit.d.ts +9 -9
  16. package/dist/types/generated/instructions/setComputeUnitLimit.d.ts.map +1 -1
  17. package/dist/types/generated/instructions/setComputeUnitPrice.d.ts +9 -9
  18. package/dist/types/generated/instructions/setComputeUnitPrice.d.ts.map +1 -1
  19. package/dist/types/generated/instructions/setLoadedAccountsDataSizeLimit.d.ts +9 -9
  20. package/dist/types/generated/instructions/setLoadedAccountsDataSizeLimit.d.ts.map +1 -1
  21. package/dist/types/generated/programs/computeBudget.d.ts +2 -2
  22. package/dist/types/generated/programs/index.d.ts +2 -2
  23. package/dist/types/generated/shared/index.d.ts +5 -5
  24. package/dist/types/generated/shared/index.d.ts.map +1 -1
  25. package/dist/types/internal.d.ts +3 -3
  26. package/dist/types/internal.d.ts.map +1 -1
  27. package/dist/types/setComputePrice.d.ts +3 -1
  28. package/dist/types/setComputePrice.d.ts.map +1 -1
  29. package/package.json +4 -4
  30. package/dist/types/internalMoveToKit.d.ts +0 -20
  31. package/dist/types/internalMoveToKit.d.ts.map +0 -1
@@ -1,15 +1,15 @@
1
1
  /**
2
- * This code was AUTOGENERATED using the codama library.
2
+ * This code was AUTOGENERATED using the Codama library.
3
3
  * Please DO NOT EDIT THIS FILE, instead use visitors
4
- * to add features, then rerun codama to update it.
4
+ * to add features, then rerun Codama to update it.
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { type Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData } from '@solana/kit';
8
+ import { type AccountMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyUint8Array } from '@solana/kit';
9
9
  import { COMPUTE_BUDGET_PROGRAM_ADDRESS } from '../programs';
10
10
  export declare const SET_LOADED_ACCOUNTS_DATA_SIZE_LIMIT_DISCRIMINATOR = 4;
11
- export declare function getSetLoadedAccountsDataSizeLimitDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array;
12
- export type SetLoadedAccountsDataSizeLimitInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<TRemainingAccounts>;
11
+ export declare function getSetLoadedAccountsDataSizeLimitDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type SetLoadedAccountsDataSizeLimitInstruction<TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<TRemainingAccounts>;
13
13
  export type SetLoadedAccountsDataSizeLimitInstructionData = {
14
14
  discriminator: number;
15
15
  accountDataSizeLimit: number;
@@ -17,9 +17,9 @@ export type SetLoadedAccountsDataSizeLimitInstructionData = {
17
17
  export type SetLoadedAccountsDataSizeLimitInstructionDataArgs = {
18
18
  accountDataSizeLimit: number;
19
19
  };
20
- export declare function getSetLoadedAccountsDataSizeLimitInstructionDataEncoder(): Encoder<SetLoadedAccountsDataSizeLimitInstructionDataArgs>;
21
- export declare function getSetLoadedAccountsDataSizeLimitInstructionDataDecoder(): Decoder<SetLoadedAccountsDataSizeLimitInstructionData>;
22
- export declare function getSetLoadedAccountsDataSizeLimitInstructionDataCodec(): Codec<SetLoadedAccountsDataSizeLimitInstructionDataArgs, SetLoadedAccountsDataSizeLimitInstructionData>;
20
+ export declare function getSetLoadedAccountsDataSizeLimitInstructionDataEncoder(): FixedSizeEncoder<SetLoadedAccountsDataSizeLimitInstructionDataArgs>;
21
+ export declare function getSetLoadedAccountsDataSizeLimitInstructionDataDecoder(): FixedSizeDecoder<SetLoadedAccountsDataSizeLimitInstructionData>;
22
+ export declare function getSetLoadedAccountsDataSizeLimitInstructionDataCodec(): FixedSizeCodec<SetLoadedAccountsDataSizeLimitInstructionDataArgs, SetLoadedAccountsDataSizeLimitInstructionData>;
23
23
  export type SetLoadedAccountsDataSizeLimitInput = {
24
24
  accountDataSizeLimit: SetLoadedAccountsDataSizeLimitInstructionDataArgs['accountDataSizeLimit'];
25
25
  };
@@ -30,5 +30,5 @@ export type ParsedSetLoadedAccountsDataSizeLimitInstruction<TProgram extends str
30
30
  programAddress: Address<TProgram>;
31
31
  data: SetLoadedAccountsDataSizeLimitInstructionData;
32
32
  };
33
- export declare function parseSetLoadedAccountsDataSizeLimitInstruction<TProgram extends string>(instruction: IInstruction<TProgram> & IInstructionWithData<Uint8Array>): ParsedSetLoadedAccountsDataSizeLimitInstruction<TProgram>;
33
+ export declare function parseSetLoadedAccountsDataSizeLimitInstruction<TProgram extends string>(instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>): ParsedSetLoadedAccountsDataSizeLimitInstruction<TProgram>;
34
34
  //# sourceMappingURL=setLoadedAccountsDataSizeLimit.d.ts.map
@@ -1 +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,aAAa,CAAC;AACrB,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAE7D,eAAO,MAAM,iDAAiD,IAAI,CAAC;AAEnE,wBAAgB,mDAAmD,6CAIlE;AAED,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,CAWpI;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,eAAe,SAAS,OAAO,GAAG,OAAO,8BAA8B,EAEvE,KAAK,EAAE,mCAAmC,EAC1C,MAAM,CAAC,EAAE;IAAE,cAAc,CAAC,EAAE,eAAe,CAAA;CAAE,GAC5C,yCAAyC,CAAC,eAAe,CAAC,CAgB5D;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"}
1
+ {"version":3,"file":"setLoadedAccountsDataSizeLimit.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/setLoadedAccountsDataSizeLimit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EASL,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAE7D,eAAO,MAAM,iDAAiD,IAAI,CAAC;AAEnE,wBAAgB,mDAAmD,uBAIlE;AAED,MAAM,MAAM,yCAAyC,CACnD,QAAQ,SAAS,MAAM,GAAG,OAAO,8BAA8B,EAC/D,kBAAkB,SAAS,SAAS,WAAW,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,IAC5D,WAAW,CAAC,QAAQ,CAAC,GACvB,mBAAmB,CAAC,kBAAkB,CAAC,GACvC,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;AAE9C,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,gBAAgB,CAAC,iDAAiD,CAAC,CAW7I;AAED,wBAAgB,uDAAuD,IAAI,gBAAgB,CAAC,6CAA6C,CAAC,CAKzI;AAED,wBAAgB,qDAAqD,IAAI,cAAc,CACrF,iDAAiD,EACjD,6CAA6C,CAC9C,CAKA;AAED,MAAM,MAAM,mCAAmC,GAAG;IAChD,oBAAoB,EAAE,iDAAiD,CAAC,sBAAsB,CAAC,CAAC;CACjG,CAAC;AAEF,wBAAgB,4CAA4C,CAC1D,eAAe,SAAS,OAAO,GAAG,OAAO,8BAA8B,EAEvE,KAAK,EAAE,mCAAmC,EAC1C,MAAM,CAAC,EAAE;IAAE,cAAc,CAAC,EAAE,eAAe,CAAA;CAAE,GAC5C,yCAAyC,CAAC,eAAe,CAAC,CAc5D;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,WAAW,CAAC,QAAQ,CAAC,GAAG,mBAAmB,CAAC,kBAAkB,CAAC,GAC3E,+CAA+C,CAAC,QAAQ,CAAC,CAO3D"}
@@ -1,7 +1,7 @@
1
1
  /**
2
- * This code was AUTOGENERATED using the codama library.
2
+ * This code was AUTOGENERATED using the Codama library.
3
3
  * Please DO NOT EDIT THIS FILE, instead use visitors
4
- * to add features, then rerun codama to update it.
4
+ * to add features, then rerun Codama to update it.
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
- * This code was AUTOGENERATED using the codama library.
2
+ * This code was AUTOGENERATED using the Codama library.
3
3
  * Please DO NOT EDIT THIS FILE, instead use visitors
4
- * to add features, then rerun codama to update it.
4
+ * to add features, then rerun Codama to update it.
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
@@ -1,11 +1,11 @@
1
1
  /**
2
- * This code was AUTOGENERATED using the codama library.
2
+ * This code was AUTOGENERATED using the Codama library.
3
3
  * Please DO NOT EDIT THIS FILE, instead use visitors
4
- * to add features, then rerun codama to update it.
4
+ * to add features, then rerun Codama to update it.
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { type Address, type IAccountMeta, type IAccountSignerMeta, type ProgramDerivedAddress, type TransactionSigner } from '@solana/kit';
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type ProgramDerivedAddress, type TransactionSigner } from '@solana/kit';
9
9
  /**
10
10
  * Asserts that the given value is not null or undefined.
11
11
  * @internal
@@ -38,13 +38,13 @@ export type ResolvedAccount<T extends string = string, U extends Address<T> | Pr
38
38
  * Defines an instruction that stores additional bytes on-chain.
39
39
  * @internal
40
40
  */
41
- export type IInstructionWithByteDelta = {
41
+ export type InstructionWithByteDelta = {
42
42
  byteDelta: number;
43
43
  };
44
44
  /**
45
45
  * Get account metas and signers from resolved accounts.
46
46
  * @internal
47
47
  */
48
- export declare function getAccountMetaFactory(programAddress: Address, optionalAccountStrategy: 'omitted' | 'programId'): (account: ResolvedAccount) => IAccountMeta | IAccountSignerMeta | undefined;
48
+ export declare function getAccountMetaFactory(programAddress: Address, optionalAccountStrategy: 'omitted' | 'programId'): (account: ResolvedAccount) => AccountMeta | AccountSignerMeta | undefined;
49
49
  export declare function isTransactionSigner<TAddress extends string = string>(value: Address<TAddress> | ProgramDerivedAddress<TAddress> | TransactionSigner<TAddress>): value is TransactionSigner<TAddress>;
50
50
  //# sourceMappingURL=index.d.ts.map
@@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B,CAAC,QAAQ,CAAC,GAC/B,iBAAiB,CAAC,QAAQ,CAAC,GAC9B,KAAK,IAAI,iBAAiB,CAAC,QAAQ,CAAC,CAOtC"}
@@ -1,4 +1,4 @@
1
- import { BaseTransactionMessage, IInstruction, MicroLamports } from '@solana/kit';
1
+ import { BaseTransactionMessage, Instruction, MicroLamports } from '@solana/kit';
2
2
  import { SetComputeUnitLimitInstruction, SetComputeUnitPriceInstruction } from './generated';
3
3
  /**
4
4
  * Finds the index of the first `SetComputeUnitLimit` instruction in a transaction message
@@ -15,7 +15,7 @@ export declare function getSetComputeUnitLimitInstructionIndex(transactionMessag
15
15
  /**
16
16
  * Checks if the given instruction is a `SetComputeUnitLimit` instruction.
17
17
  */
18
- export declare function isSetComputeUnitLimitInstruction(instruction: IInstruction): instruction is SetComputeUnitLimitInstruction;
18
+ export declare function isSetComputeUnitLimitInstruction(instruction: Instruction): instruction is SetComputeUnitLimitInstruction;
19
19
  /**
20
20
  * Finds the index of the first `SetComputeUnitPrice` instruction in a transaction message
21
21
  * and its set micro-lamports, if any.
@@ -31,5 +31,5 @@ export declare function getSetComputeUnitPriceInstructionIndex(transactionMessag
31
31
  /**
32
32
  * Checks if the given instruction is a `SetComputeUnitPrice` instruction.
33
33
  */
34
- export declare function isSetComputeUnitPriceInstruction(instruction: IInstruction): instruction is SetComputeUnitPriceInstruction;
34
+ export declare function isSetComputeUnitPriceInstruction(instruction: Instruction): instruction is SetComputeUnitPriceInstruction;
35
35
  //# sourceMappingURL=internal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAGtB,YAAY,EACZ,aAAa,EAEd,MAAM,aAAa,CAAC;AACrB,OAAO,EAIL,8BAA8B,EAC9B,8BAA8B,EAC/B,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,wBAAgB,8CAA8C,CAC5D,kBAAkB,EAAE,sBAAsB,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;CAAE,GAAG,IAAI,CAYxD;AAED;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,kBAAkB,EAAE,sBAAsB,UAK3C;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE,WAAW,GACvB,WAAW,IAAI,8BAA8B,CAM/C"}
@@ -11,7 +11,9 @@ import { BaseTransactionMessage, MicroLamports } from '@solana/kit';
11
11
  * );
12
12
  * ```
13
13
  */
14
- export declare function setTransactionMessageComputeUnitPrice<TTransactionMessage extends BaseTransactionMessage>(microLamports: number | bigint, transactionMessage: TTransactionMessage): TTransactionMessage;
14
+ export declare function setTransactionMessageComputeUnitPrice<TTransactionMessage extends BaseTransactionMessage>(microLamports: number | bigint, transactionMessage: TTransactionMessage): Omit<import("@solana/kit").ExcludeTransactionMessageWithinSizeLimit<TTransactionMessage>, "instructions"> & {
15
+ readonly instructions: readonly [...TTransactionMessage["instructions"], import("./generated").SetComputeUnitPriceInstruction<import("@solana/kit").Address<"ComputeBudget111111111111111111111111111111">, []>];
16
+ };
15
17
  /**
16
18
  * Updates the first `SetComputeUnitPrice` instruction in a transaction message
17
19
  * with the given micro-Lamports, or appends a new instruction if none exists.
@@ -1 +1 @@
1
- {"version":3,"file":"setComputePrice.d.ts","sourceRoot":"","sources":["../../src/setComputePrice.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EACtB,aAAa,EACd,MAAM,aAAa,CAAC;AAIrB;;;;;;;;;;;GAWG;AACH,wBAAgB,qCAAqC,CACnD,mBAAmB,SAAS,sBAAsB,EAClD,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,kBAAkB,EAAE,mBAAmB,uBAKxE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,4CAA4C,CAC1D,mBAAmB,SAAS,sBAAsB,EAElD,aAAa,EACT,aAAa,GACb,CAAC,CAAC,qBAAqB,EAAE,aAAa,GAAG,IAAI,KAAK,aAAa,CAAC,EACpE,kBAAkB,EAAE,mBAAmB,GACtC,mBAAmB,CAkCrB"}
1
+ {"version":3,"file":"setComputePrice.d.ts","sourceRoot":"","sources":["../../src/setComputePrice.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EACtB,aAAa,EACd,MAAM,aAAa,CAAC;AAIrB;;;;;;;;;;;GAWG;AACH,wBAAgB,qCAAqC,CACnD,mBAAmB,SAAS,sBAAsB,EAClD,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,kBAAkB,EAAE,mBAAmB;;EAKxE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,4CAA4C,CAC1D,mBAAmB,SAAS,sBAAsB,EAElD,aAAa,EACT,aAAa,GACb,CAAC,CAAC,qBAAqB,EAAE,aAAa,GAAG,IAAI,KAAK,aAAa,CAAC,EACpE,kBAAkB,EAAE,mBAAmB,GACtC,mBAAmB,CAkCrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana-program/compute-budget",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "JavaScript client for the Compute Budget program",
5
5
  "sideEffects": false,
6
6
  "module": "./dist/src/index.mjs",
@@ -32,12 +32,12 @@
32
32
  },
33
33
  "homepage": "https://github.com/solana-program/compute-budget#readme",
34
34
  "peerDependencies": {
35
- "@solana/kit": "^2.1.0"
35
+ "@solana/kit": "^4.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@solana/eslint-config-solana": "^3.0.3",
39
- "@solana/kit": "^2.1.0",
40
- "@types/node": "^20",
39
+ "@solana/kit": "^4.0",
40
+ "@types/node": "^24",
41
41
  "@typescript-eslint/eslint-plugin": "^7.16.1",
42
42
  "@typescript-eslint/parser": "^7.16.1",
43
43
  "eslint": "^8.57.0",
@@ -1,20 +0,0 @@
1
- import { BaseTransactionMessage, TransactionMessageWithBlockhashLifetime, TransactionMessageWithDurableNonceLifetime } from '@solana/kit';
2
- /**
3
- * An invalid blockhash lifetime constraint used as a placeholder for
4
- * transaction messages that are not yet ready to be compiled.
5
- *
6
- * This enables various operations on the transaction message, such as
7
- * simulating it or calculating its transaction size, whilst defering
8
- * the actual blockhash to a later stage.
9
- */
10
- export declare const PROVISORY_BLOCKHASH_LIFETIME_CONSTRAINT: TransactionMessageWithBlockhashLifetime['lifetimeConstraint'];
11
- /**
12
- * Sets a provisory blockhash lifetime constraint on the transaction message
13
- * if and only if it doesn't already have a lifetime constraint.
14
- */
15
- export declare function fillMissingTransactionMessageLifetimeUsingProvisoryBlockhash<TTransactionMessage extends BaseTransactionMessage>(transactionMessage: TTransactionMessage): TTransactionMessage & (TransactionMessageWithBlockhashLifetime | TransactionMessageWithDurableNonceLifetime);
16
- /**
17
- * Sets a provisory blockhash lifetime constraint on the transaction message.
18
- */
19
- export declare function setTransactionMessageLifetimeUsingProvisoryBlockhash<TTransactionMessage extends BaseTransactionMessage>(transactionMessage: TTransactionMessage): TTransactionMessage & TransactionMessageWithBlockhashLifetime;
20
- //# sourceMappingURL=internalMoveToKit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"internalMoveToKit.d.ts","sourceRoot":"","sources":["../../src/internalMoveToKit.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EAGtB,uCAAuC,EACvC,0CAA0C,EAC3C,MAAM,aAAa,CAAC;AAErB;;;;;;;GAOG;AACH,eAAO,MAAM,uCAAuC,EAAE,uCAAuC,CAAC,oBAAoB,CAI/G,CAAC;AAEJ;;;GAGG;AACH,wBAAgB,4DAA4D,CAC1E,mBAAmB,SAAS,sBAAsB,EAElD,kBAAkB,EAAE,mBAAmB,GACtC,mBAAmB,GACpB,CACI,uCAAuC,GACvC,0CAA0C,CAC7C,CAcF;AAED;;GAEG;AACH,wBAAgB,oDAAoD,CAClE,mBAAmB,SAAS,sBAAsB,EAElD,kBAAkB,EAAE,mBAAmB,GACtC,mBAAmB,GAAG,uCAAuC,CAK/D"}