@solana/transaction-messages 2.2.0-canary-20250708184753 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +9 -9
  2. package/dist/index.browser.cjs +32 -34
  3. package/dist/index.browser.cjs.map +1 -1
  4. package/dist/index.browser.mjs +34 -34
  5. package/dist/index.browser.mjs.map +1 -1
  6. package/dist/index.native.mjs +34 -34
  7. package/dist/index.native.mjs.map +1 -1
  8. package/dist/index.node.cjs +32 -34
  9. package/dist/index.node.cjs.map +1 -1
  10. package/dist/index.node.mjs +34 -34
  11. package/dist/index.node.mjs.map +1 -1
  12. package/dist/types/blockhash.d.ts +3 -2
  13. package/dist/types/blockhash.d.ts.map +1 -1
  14. package/dist/types/compilable-transaction-message.d.ts +5 -4
  15. package/dist/types/compilable-transaction-message.d.ts.map +1 -1
  16. package/dist/types/compile/accounts.d.ts +3 -3
  17. package/dist/types/compile/accounts.d.ts.map +1 -1
  18. package/dist/types/compile/instructions.d.ts +2 -2
  19. package/dist/types/compile/instructions.d.ts.map +1 -1
  20. package/dist/types/compress-transaction-message.d.ts +5 -5
  21. package/dist/types/compress-transaction-message.d.ts.map +1 -1
  22. package/dist/types/create-transaction-message.d.ts +3 -7
  23. package/dist/types/create-transaction-message.d.ts.map +1 -1
  24. package/dist/types/decompile-message.d.ts.map +1 -1
  25. package/dist/types/durable-nonce.d.ts +49 -47
  26. package/dist/types/durable-nonce.d.ts.map +1 -1
  27. package/dist/types/fee-payer.d.ts +3 -8
  28. package/dist/types/fee-payer.d.ts.map +1 -1
  29. package/dist/types/index.d.ts +0 -3
  30. package/dist/types/index.d.ts.map +1 -1
  31. package/dist/types/instructions.d.ts +6 -21
  32. package/dist/types/instructions.d.ts.map +1 -1
  33. package/dist/types/transaction-message.d.ts +5 -5
  34. package/dist/types/transaction-message.d.ts.map +1 -1
  35. package/package.json +10 -10
  36. package/dist/types/deprecated.d.ts +0 -65
  37. package/dist/types/deprecated.d.ts.map +0 -1
  38. package/dist/types/durable-nonce-instruction.d.ts +0 -43
  39. package/dist/types/durable-nonce-instruction.d.ts.map +0 -1
  40. package/dist/types/lifetime.d.ts +0 -12
  41. package/dist/types/lifetime.d.ts.map +0 -1
  42. package/dist/types/transaction-message-size.d.ts +0 -13
  43. package/dist/types/transaction-message-size.d.ts.map +0 -1
@@ -1,43 +0,0 @@
1
- import { Address } from '@solana/addresses';
2
- import { Instruction, InstructionWithAccounts, InstructionWithData, ReadonlyAccount, ReadonlySignerAccount, WritableAccount, WritableSignerAccount } from '@solana/instructions';
3
- import { Brand } from '@solana/nominal-types';
4
- export type AdvanceNonceAccountInstruction<TNonceAccountAddress extends string = string, TNonceAuthorityAddress extends string = string> = Instruction<'11111111111111111111111111111111'> & InstructionWithAccounts<readonly [
5
- WritableAccount<TNonceAccountAddress>,
6
- ReadonlyAccount<'SysvarRecentB1ockHashes11111111111111111111'>,
7
- ReadonlySignerAccount<TNonceAuthorityAddress> | WritableSignerAccount<TNonceAuthorityAddress>
8
- ]> & InstructionWithData<AdvanceNonceAccountInstructionData>;
9
- type AdvanceNonceAccountInstructionData = Brand<Uint8Array, 'AdvanceNonceAccountInstructionData'>;
10
- /**
11
- * Creates an instruction for the System program to advance a nonce.
12
- *
13
- * This instruction is a prerequisite for a transaction with a nonce-based lifetime to be landed on
14
- * the network. In order to be considered valid, the transaction must meet all of these criteria.
15
- *
16
- * 1. Its lifetime constraint must be a {@link NonceLifetimeConstraint}.
17
- * 2. The value contained in the on-chain account at the address `nonceAccountAddress` must be equal
18
- * to {@link NonceLifetimeConstraint.nonce} at the time the transaction is landed.
19
- * 3. The first instruction in that transaction message must be the one returned by this function.
20
- *
21
- * You could also use the `getAdvanceNonceAccountInstruction` method of `@solana-program/system`.
22
- */
23
- export declare function createAdvanceNonceAccountInstruction<TNonceAccountAddress extends string = string, TNonceAuthorityAddress extends string = string>(nonceAccountAddress: Address<TNonceAccountAddress>, nonceAuthorityAddress: Address<TNonceAuthorityAddress>): AdvanceNonceAccountInstruction<TNonceAccountAddress, TNonceAuthorityAddress>;
24
- /**
25
- * A type guard that returns `true` if the instruction conforms to the
26
- * {@link AdvanceNonceAccountInstruction} type, and refines its type for use in your program.
27
- *
28
- * @example
29
- * ```ts
30
- * import { isAdvanceNonceAccountInstruction } from '@solana/transaction-messages';
31
- *
32
- * if (isAdvanceNonceAccountInstruction(message.instructions[0])) {
33
- * // At this point, the first instruction in the message has been refined to a
34
- * // `AdvanceNonceAccountInstruction`.
35
- * setNonceAccountAddress(message.instructions[0].accounts[0].address);
36
- * } else {
37
- * setError('The first instruction is not an `AdvanceNonce` instruction');
38
- * }
39
- * ```
40
- */
41
- export declare function isAdvanceNonceAccountInstruction(instruction: Instruction): instruction is AdvanceNonceAccountInstruction;
42
- export {};
43
- //# sourceMappingURL=durable-nonce-instruction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"durable-nonce-instruction.d.ts","sourceRoot":"","sources":["../../src/durable-nonce-instruction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAEH,WAAW,EACX,uBAAuB,EACvB,mBAAmB,EAEnB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE9C,MAAM,MAAM,8BAA8B,CACtC,oBAAoB,SAAS,MAAM,GAAG,MAAM,EAC5C,sBAAsB,SAAS,MAAM,GAAG,MAAM,IAC9C,WAAW,CAAC,kCAAkC,CAAC,GAC/C,uBAAuB,CACnB,SAAS;IACL,eAAe,CAAC,oBAAoB,CAAC;IACrC,eAAe,CAAC,6CAA6C,CAAC;IAC9D,qBAAqB,CAAC,sBAAsB,CAAC,GAAG,qBAAqB,CAAC,sBAAsB,CAAC;CAChG,CACJ,GACD,mBAAmB,CAAC,kCAAkC,CAAC,CAAC;AAE5D,KAAK,kCAAkC,GAAG,KAAK,CAAC,UAAU,EAAE,oCAAoC,CAAC,CAAC;AAMlG;;;;;;;;;;;;GAYG;AACH,wBAAgB,oCAAoC,CAChD,oBAAoB,SAAS,MAAM,GAAG,MAAM,EAC5C,sBAAsB,SAAS,MAAM,GAAG,MAAM,EAE9C,mBAAmB,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAClD,qBAAqB,EAAE,OAAO,CAAC,sBAAsB,CAAC,GACvD,8BAA8B,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAa9E;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gCAAgC,CAC5C,WAAW,EAAE,WAAW,GACzB,WAAW,IAAI,8BAA8B,CAkB/C"}
@@ -1,12 +0,0 @@
1
- import { TransactionMessageWithBlockhashLifetime } from './blockhash';
2
- import { TransactionMessageWithDurableNonceLifetime } from './durable-nonce';
3
- import { BaseTransactionMessage } from './transaction-message';
4
- /**
5
- * A transaction message with any valid lifetime constraint.
6
- */
7
- export type TransactionMessageWithLifetime = TransactionMessageWithBlockhashLifetime | TransactionMessageWithDurableNonceLifetime;
8
- /**
9
- * A helper type to exclude any lifetime constraint from a transaction message.
10
- */
11
- export type ExcludeTransactionMessageLifetime<TTransactionMessage extends BaseTransactionMessage> = Omit<TTransactionMessage, 'lifetimeConstraint'>;
12
- //# sourceMappingURL=lifetime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lifetime.d.ts","sourceRoot":"","sources":["../../src/lifetime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,0CAA0C,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACpC,uCAAuC,GACvC,0CAA0C,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,iCAAiC,CAAC,mBAAmB,SAAS,sBAAsB,IAAI,IAAI,CACpG,mBAAmB,EACnB,oBAAoB,CACvB,CAAC"}
@@ -1,13 +0,0 @@
1
- import type { NominalType } from '@solana/nominal-types';
2
- import type { BaseTransactionMessage } from './transaction-message';
3
- /**
4
- * A type guard that checks if a transaction message is within the size limit
5
- * when compiled into a transaction.
6
- */
7
- export type TransactionMessageWithinSizeLimit = NominalType<'transactionSize', 'withinLimit'>;
8
- /**
9
- * Helper type that removes the `TransactionMessageWithinSizeLimit` flag
10
- * from a transaction message.
11
- */
12
- export type ExcludeTransactionMessageWithinSizeLimit<TTransactionMessage extends BaseTransactionMessage> = Omit<TTransactionMessage, '__transactionSize:@solana/kit'>;
13
- //# sourceMappingURL=transaction-message-size.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transaction-message-size.d.ts","sourceRoot":"","sources":["../../src/transaction-message-size.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE;;;GAGG;AACH,MAAM,MAAM,iCAAiC,GAAG,WAAW,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;AAE9F;;;GAGG;AACH,MAAM,MAAM,wCAAwC,CAAC,mBAAmB,SAAS,sBAAsB,IAAI,IAAI,CAC3G,mBAAmB,EACnB,+BAA+B,CAClC,CAAC"}